rt2x00: Fix quality houskeeping for software diversity

Antanna quality statistics is not handled correctly, which leads to
software diversity being shutdown completly.

The main problem is that during antenna diversity statistics can
be reset resulting in loosing the signal strength just before
evaluation.

rssi history is not updated correctly leading to incorrect comparison
material for basing antenna switching on.

Signed-off-by: Lars Ericsson <Lars_Ericsson@telia.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Lars Ericsson
2009-08-08 23:54:24 +02:00
committed by John W. Linville
parent 93354cbbcb
commit 193df183b1
2 changed files with 38 additions and 50 deletions

View File

@ -245,14 +245,11 @@ struct link_ant {
struct antenna_setup active;
/*
* RSSI information for the different antennas.
* These statistics are used to determine when
* to switch antenna when using software diversity.
*
* rssi[0] -> Antenna A RSSI
* rssi[1] -> Antenna B RSSI
* RSSI history information for the antenna.
* Used to determine when to switch antenna
* when using software diversity.
*/
int rssi_history[2];
int rssi_history;
/*
* Current RSSI average of the currently active antenna.