(revised) improved statistics for bcm43xx-softmac
Subsystems (3)
PATCH 1/1 (revised) improved statistics for bcm43xx-softmac
This patch improves the statistics returned from bcm43xx_get_wireless_stats. The signal level comes
from smoothing the "rssi" value returned by the firmware after it is converted into a dBm value by the driver. The quality value is a hack derived from the smoothed level and an assumed RX_POWER_MAX of -10 dBM. The noise value is still the one calculated from the clean-room formula. On my system, this is roughly -65 dBm, which seems too high.
The revised version uses the ieee80211 spinlock to protect traversing of the network list.
Signed-off-by Larry Finger <[email protected]>
=======================================================
drivers/net/wireless/bcm43xx/bcm43xx_main.c +3 -11
@@ -1581,17 +1581,9 @@ static void handle_irq_noise(struct bcm4else 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 ) - bcm->stats.link_quality =1 ; -else if (average >-85 ) - bcm->stats.link_quality =2 ; -else - bcm->stats.link_quality =3 ; -// dprintk(KERN_INFO PFX "Link Quality: %u (avg was %d)\n", bcm->stats.link_quality, average); +/* FIXME: This matches the formula from http://bcm-specs.sipsolutions.net/LinkQuality, +but yields a value that is probably too large. */ + bcm->stats.noise = average; drop_calculation: bcm->noisecalc.calculation_running =0 ;return ;
drivers/net/wireless/bcm43xx/bcm43xx_wx.c +29 -15
72 lines not on this page · raw message
=======================