aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcm43xx/bcm43xx_main.c
diff options
context:
space:
mode:
authorMichael Buesch <mbuesch@freenet.de>2006-03-22 18:10:19 +0100
committerJohn W. Linville <linville@tuxdriver.com>2006-03-27 11:19:44 -0500
commit72fb851e971a416f47ad0a3ffca7342a424af37a (patch)
tree934229d25a830186335ef4b4b12b47844b4cdb23 /drivers/net/wireless/bcm43xx/bcm43xx_main.c
parentcf017e1b6f625978288e2cd8ede04f8185b97c08 (diff)
[PATCH] bcm43xx: add useless and broken statistics stuff. People seem to want it. well...
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.c')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index e680d2acc44..15deaa508e5 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -1539,6 +1539,7 @@ static void handle_irq_noise(struct bcm43xx_private *bcm)
average *= 125;
average += 64;
average /= 128;
+
tmp = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, 0x40C);
tmp = (tmp / 128) & 0x1F;
if (tmp >= 8)
@@ -1550,6 +1551,8 @@ static void handle_irq_noise(struct bcm43xx_private *bcm)
else
average -= 48;
+/* FIXME: This is wrong, but people want fancy stats. well... */
+bcm->stats.noise = average;
if (average > -65)
bcm->stats.link_quality = 0;
else if (average > -75)