diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2011-09-19 10:45:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-20 14:43:49 -0400 |
commit | f36369afce40a20b6328590c1f9a777d0810f815 (patch) | |
tree | a18988307bd51ed654575a947a36b8befa9d8569 /drivers/net/wireless | |
parent | 93aead46428d38729f430f395a8403795a019e54 (diff) |
ath9k: Store noise immunity values across scanning
CCK/OFDM noise immunilty values are always reset to defaults
during bgscan. This could affect the link quality and
performance when the STA is associated in a noisy channel.
So do not override the learned values across the scanning.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index d969a11e342..01240d63896 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -273,7 +273,8 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel) | |||
273 | immunityLevel, aniState->noiseFloor, | 273 | immunityLevel, aniState->noiseFloor, |
274 | aniState->rssiThrLow, aniState->rssiThrHigh); | 274 | aniState->rssiThrLow, aniState->rssiThrHigh); |
275 | 275 | ||
276 | aniState->ofdmNoiseImmunityLevel = immunityLevel; | 276 | if (aniState->update_ani) |
277 | aniState->ofdmNoiseImmunityLevel = immunityLevel; | ||
277 | 278 | ||
278 | entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; | 279 | entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; |
279 | entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; | 280 | entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; |
@@ -346,7 +347,8 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel) | |||
346 | immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI) | 347 | immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI) |
347 | immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI; | 348 | immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI; |
348 | 349 | ||
349 | aniState->cckNoiseImmunityLevel = immunityLevel; | 350 | if (aniState->update_ani) |
351 | aniState->cckNoiseImmunityLevel = immunityLevel; | ||
350 | 352 | ||
351 | entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; | 353 | entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; |
352 | entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; | 354 | entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; |
@@ -593,6 +595,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) | |||
593 | aniState->ofdmNoiseImmunityLevel, | 595 | aniState->ofdmNoiseImmunityLevel, |
594 | aniState->cckNoiseImmunityLevel); | 596 | aniState->cckNoiseImmunityLevel); |
595 | 597 | ||
598 | aniState->update_ani = false; | ||
596 | ath9k_hw_set_ofdm_nil(ah, ATH9K_ANI_OFDM_DEF_LEVEL); | 599 | ath9k_hw_set_ofdm_nil(ah, ATH9K_ANI_OFDM_DEF_LEVEL); |
597 | ath9k_hw_set_cck_nil(ah, ATH9K_ANI_CCK_DEF_LEVEL); | 600 | ath9k_hw_set_cck_nil(ah, ATH9K_ANI_CCK_DEF_LEVEL); |
598 | } | 601 | } |
@@ -609,6 +612,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) | |||
609 | aniState->ofdmNoiseImmunityLevel, | 612 | aniState->ofdmNoiseImmunityLevel, |
610 | aniState->cckNoiseImmunityLevel); | 613 | aniState->cckNoiseImmunityLevel); |
611 | 614 | ||
615 | aniState->update_ani = true; | ||
612 | ath9k_hw_set_ofdm_nil(ah, | 616 | ath9k_hw_set_ofdm_nil(ah, |
613 | aniState->ofdmNoiseImmunityLevel); | 617 | aniState->ofdmNoiseImmunityLevel); |
614 | ath9k_hw_set_cck_nil(ah, | 618 | ath9k_hw_set_cck_nil(ah, |
@@ -892,6 +896,8 @@ void ath9k_hw_ani_init(struct ath_hw *ah) | |||
892 | ani->ofdmWeakSigDetectOff = | 896 | ani->ofdmWeakSigDetectOff = |
893 | !ATH9K_ANI_USE_OFDM_WEAK_SIG; | 897 | !ATH9K_ANI_USE_OFDM_WEAK_SIG; |
894 | ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; | 898 | ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; |
899 | ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL; | ||
900 | ani->update_ani = false; | ||
895 | } | 901 | } |
896 | 902 | ||
897 | /* | 903 | /* |
diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h index a547005572e..83029d6c7b2 100644 --- a/drivers/net/wireless/ath/ath9k/ani.h +++ b/drivers/net/wireless/ath/ath9k/ani.h | |||
@@ -122,6 +122,7 @@ struct ar5416AniState { | |||
122 | u8 firstepLevel; | 122 | u8 firstepLevel; |
123 | u8 ofdmWeakSigDetectOff; | 123 | u8 ofdmWeakSigDetectOff; |
124 | u8 cckWeakSigThreshold; | 124 | u8 cckWeakSigThreshold; |
125 | bool update_ani; | ||
125 | u32 listenTime; | 126 | u32 listenTime; |
126 | int32_t rssiThrLow; | 127 | int32_t rssiThrLow; |
127 | int32_t rssiThrHigh; | 128 | int32_t rssiThrHigh; |