linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC
@ 2009-12-08 22:15 John W. Linville
  2009-12-08 22:33 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2009-12-08 22:15 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, John W. Linville

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 <linville@tuxdriver.com>
---
 net/mac80211/cfg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 93ee1fd..6dc3579 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -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;
 	}
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC
  2009-12-08 22:15 [PATCH] wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC John W. Linville
@ 2009-12-08 22:33 ` Johannes Berg
  2009-12-09  0:17   ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-12-08 22:33 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

On Tue, 2009-12-08 at 17:15 -0500, John W. Linville wrote:
> This part was missed in "cfg80211: implement get_wireless_stats",
> probably because sta_set_sinfo already existed and was only handling
> dBm signals.

Now I do have to wonder how you found this, but yeah, looks right to me.

johannes

> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
>  net/mac80211/cfg.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 93ee1fd..6dc3579 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -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;
>  	}


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC
  2009-12-08 22:33 ` Johannes Berg
@ 2009-12-09  0:17   ` John W. Linville
  0 siblings, 0 replies; 3+ messages in thread
From: John W. Linville @ 2009-12-09  0:17 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, Dec 08, 2009 at 11:33:33PM +0100, Johannes Berg wrote:
> On Tue, 2009-12-08 at 17:15 -0500, John W. Linville wrote:
> > This part was missed in "cfg80211: implement get_wireless_stats",
> > probably because sta_set_sinfo already existed and was only handling
> > dBm signals.
> 
> Now I do have to wonder how you found this, but yeah, looks right to me.

Someone reported it at bugzilla.kernel.org, and I tracked it down
with an RTL8185 cardbus card plugged into a box running one of my
pre-RHEL5.5 test kernels... :-)

John
--
John W. Linvlle
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-09  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 22:15 [PATCH] wireless: correctly report signal value for IEEE80211_HW_SIGNAL_UNSPEC John W. Linville
2009-12-08 22:33 ` Johannes Berg
2009-12-09  0:17   ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).