diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-08-20 04:11:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:36:08 -0400 |
commit | ff36041652fcb9f5c17bdbeb081414f69521f1af (patch) | |
tree | f16b621fdaf648af95d18d0f7c1c4b81218e0793 /drivers | |
parent | 035d0243ebbdbd5f8f07d6ce378c9a9b36415bc9 (diff) |
ath9k: Fix bug in retrieving average beacon rssi
Currently the beacon rssi that LPF gives is divided and rounded
up by ATH_RSSI_EP_MULTIPLIER twice. This will leave the incorrect rssi
in ANI. Having correct rssi in ANI fixes the connection stability at
< 30dB rssi range. This patch removes the unncessary computation of average
rssi over already valid average rssi. Also removes the redundant macros to
find average rssi.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h index 119924511f85..6273fd056c2e 100644 --- a/drivers/net/wireless/ath/ath9k/ani.h +++ b/drivers/net/wireless/ath/ath9k/ani.h | |||
@@ -18,15 +18,10 @@ | |||
18 | #define ANI_H | 18 | #define ANI_H |
19 | 19 | ||
20 | #define HAL_PROCESS_ANI 0x00000001 | 20 | #define HAL_PROCESS_ANI 0x00000001 |
21 | #define ATH9K_RSSI_EP_MULTIPLIER (1<<7) | ||
22 | 21 | ||
23 | #define DO_ANI(ah) (((ah)->proc_phyerr & HAL_PROCESS_ANI)) | 22 | #define DO_ANI(ah) (((ah)->proc_phyerr & HAL_PROCESS_ANI)) |
24 | 23 | ||
25 | #define HAL_EP_RND(x, mul) \ | 24 | #define BEACON_RSSI(ahp) (ahp->stats.ast_nodestats.ns_avgbrssi) |
26 | ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) | ||
27 | #define BEACON_RSSI(ahp) \ | ||
28 | HAL_EP_RND(ahp->stats.ast_nodestats.ns_avgbrssi, \ | ||
29 | ATH9K_RSSI_EP_MULTIPLIER) | ||
30 | 25 | ||
31 | #define ATH9K_ANI_OFDM_TRIG_HIGH 500 | 26 | #define ATH9K_ANI_OFDM_TRIG_HIGH 500 |
32 | #define ATH9K_ANI_OFDM_TRIG_LOW 200 | 27 | #define ATH9K_ANI_OFDM_TRIG_LOW 200 |