wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC
authorJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Dec 2009 22:10:13 +0000 (17:10 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Dec 2009 20:10:08 +0000 (15:10 -0500)
This part was missed in "cfg80211: implement get_wireless_stats",
probably because sta_set_sinfo already existed and was only handling
dBm signals.

Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c

index 93ee1fd5c08dd6674152072e9045c48cb0863663..6dc3579c0ac5444a0d8811504aefd6c620c9d1f1 100644 (file)
@@ -354,7 +354,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
        sinfo->rx_packets = sta->rx_packets;
        sinfo->tx_packets = sta->tx_packets;
 
-       if (sta->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) {
+       if ((sta->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) ||
+           (sta->local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)) {
                sinfo->filled |= STATION_INFO_SIGNAL;
                sinfo->signal = (s8)sta->last_signal;
        }