]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
rt2x00: Fix SW antenna diversity
authorIvo van Doorn <ivdoorn@gmail.com>
Sun, 1 Mar 2009 16:42:00 +0000 (17:42 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Mar 2009 19:39:37 +0000 (14:39 -0500)
commit64abd80330baba9d87df2b952a7eec5af5158470
tree83aeeab4cdbd58d956ed1f89db729940856ae4d5
parent14d2aac580993ac8faeac0d903207e316c0881c3
rt2x00: Fix SW antenna diversity

Software antenna tuning is broken because of an function
ordering problem during rt2x00link_tuner().

rt2x00link_precalculate_signal()
rt2x00leds_led_quality()
rt2x00lib_antenna_diversity()

rt2x00link_precalculate_signal() will reset the quality TX/RX counters,
however rt2x00lib_antenna_diversity() requires the RX counter to
see what RSSI value must be used for a particular antenna.
We can't change the ordering since rt2x00lib_antenna_diversity() might
reset other statistics which are needed by the function called earlier.

Move the reset of the quality TX/RX counters into a seperate function
and move the call to after rt2x00lib_antenna_diversity().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00link.c