linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm43xx-mac80211: Make wireless statistics yield  reasonable values
@ 2007-04-15  4:22 Larry Finger
  2007-04-15  4:50 ` Michael Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2007-04-15  4:22 UTC (permalink / raw)
  To: John Linville; +Cc: Michael Buesch, Bcm43xx-dev, linux-wireless

The variables in mac80211 are confusing and should be renamed; however, that may take
some time to reach a consensus. In the meantime, these changes are needed to get
reasonable numbers from bcm43xx-mac80211.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

John,

This is wireless-dev material. The extensive renaming patches
that were submitted on 4/14 should be discarded.

Larry

 bcm43xx_main.c |    4 ++--
 bcm43xx_xmit.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Index: wireless-dev/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_xmit.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_xmit.c
+++ wireless-dev/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_xmit.c
@@ -525,12 +525,12 @@ void bcm43xx_rx(struct bcm43xx_wldev *de
 		}
 	}
 
-	status.signal = bcm43xx_rssi_postprocess(dev, jssi,
+	status.ssi = bcm43xx_rssi_postprocess(dev, jssi,
 					      (phystat0 & BCM43xx_RX_PHYST0_OFDM),
 					      (phystat0 & BCM43xx_RX_PHYST0_GAINCTL),
 					      (phystat3 & BCM43xx_RX_PHYST3_TRSTATE));
 	status.noise = dev->stats.link_noise;
-	status.ssi = jssi;
+	status.signal = jssi; /* this looks wrong, but is what mac80211 wants */
 	if (phystat0 & BCM43xx_RX_PHYST0_OFDM)
 		status.rate = bcm43xx_plcp_get_bitrate_ofdm(plcp);
 	else
Index: wireless-dev/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
+++ wireless-dev/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
@@ -3757,8 +3757,8 @@ static int bcm43xx_wireless_init(struct 
 		    IEEE80211_HW_MONITOR_DURING_OPER |
 		    IEEE80211_HW_DEVICE_HIDES_WEP |
 		    IEEE80211_HW_WEP_INCLUDE_IV;
-	hw->max_rssi = -110;
-	hw->max_signal = BCM43xx_RX_MAX_SSI;
+	hw->max_signal = 100; /* This looks wrong, but is what mac80211 wants */
+	hw->max_rssi = BCM43xx_RX_MAX_SSI;
 	hw->max_noise = -110;
 	hw->queues = 1;
 	SET_IEEE80211_DEV(hw, dev->dev);

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

* Re: [PATCH] bcm43xx-mac80211: Make wireless statistics yield reasonable values
  2007-04-15  4:22 [PATCH] bcm43xx-mac80211: Make wireless statistics yield reasonable values Larry Finger
@ 2007-04-15  4:50 ` Michael Wu
  2007-04-15 19:47   ` Larry Finger
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Wu @ 2007-04-15  4:50 UTC (permalink / raw)
  To: Larry Finger; +Cc: John Linville, Michael Buesch, Bcm43xx-dev, linux-wireless

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

On Sunday 15 April 2007 00:22, Larry Finger wrote:
> -	hw->max_rssi = -110;
> -	hw->max_signal = BCM43xx_RX_MAX_SSI;
> +	hw->max_signal = 100; /* This looks wrong, but is what mac80211 wants */
> +	hw->max_rssi = BCM43xx_RX_MAX_SSI;
The number being passed into ssi is dBm, so why is the max being set to 60? It 
should be set to the minimum dBm that the device can report, like -110 as it 
was set before. Since SSI is actually being passed into signal, MAX_SSI 
should go to max_signal.

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH] bcm43xx-mac80211: Make wireless statistics yield reasonable  values
  2007-04-15  4:50 ` Michael Wu
@ 2007-04-15 19:47   ` Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2007-04-15 19:47 UTC (permalink / raw)
  To: Michael Wu; +Cc: John Linville, Michael Buesch, Bcm43xx-dev, linux-wireless

Michael Wu wrote:
> On Sunday 15 April 2007 00:22, Larry Finger wrote:
>> -	hw->max_rssi = -110;
>> -	hw->max_signal = BCM43xx_RX_MAX_SSI;
>> +	hw->max_signal = 100; /* This looks wrong, but is what mac80211 wants */
>> +	hw->max_rssi = BCM43xx_RX_MAX_SSI;
> The number being passed into ssi is dBm, so why is the max being set to 60? It 
> should be set to the minimum dBm that the device can report, like -110 as it 
> was set before. Since SSI is actually being passed into signal, MAX_SSI 
> should go to max_signal.

You are correct that -110 would be better than -196, which is what 60 translates to given the s8 
arithmetic. Due to the internal workings of mac80211, the quantity in max_signal ends up as the 
denominator in the qual report of x/y. I would sooner give the users a percentage that parts per 60.

Larry

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

end of thread, other threads:[~2007-04-15 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-15  4:22 [PATCH] bcm43xx-mac80211: Make wireless statistics yield reasonable values Larry Finger
2007-04-15  4:50 ` Michael Wu
2007-04-15 19:47   ` Larry Finger

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).