From: John W. Linville Date: Tue, 8 Dec 2009 22:10:13 +0000 (-0500) Subject: wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC X-Git-Tag: firefly_0821_release~11625^2~567 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8cf6359fa10996157bd8030b572ac6050dff2580;p=firefly-linux-kernel-4.4.55.git wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC commit 19deffbeba930030cfaf000b920333c6ba99ad52 upstream. This part was missed in "cfg80211: implement get_wireless_stats", probably because sta_set_sinfo already existed and was only handling dBm signals. Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7b5131bd6fa1..cca675e25363 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -338,7 +338,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; }