aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-04-13 07:14:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-16 14:38:44 -0400
commitaf1e8a6fb4051b8f34a49d00281f09ffcb1bd256 (patch)
tree2997c7052f5aad33592d1df97ae51f02f9fb1954 /drivers/net/wireless
parentf9616e0f8828fba6c06d1feff1c26eaf049b1e8a (diff)
ath9k: reset noiseimmunity level to default
After the chip reset, the noise immunity levels are restored with history values. If the immunity levels are lower than the defaults, lets start with the optimal values. 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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index 47a9fb4a116a..b4c77f9d7470 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -274,7 +274,9 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
274 aniState->rssiThrLow, aniState->rssiThrHigh); 274 aniState->rssiThrLow, aniState->rssiThrHigh);
275 275
276 if (aniState->update_ani) 276 if (aniState->update_ani)
277 aniState->ofdmNoiseImmunityLevel = immunityLevel; 277 aniState->ofdmNoiseImmunityLevel =
278 (immunityLevel > ATH9K_ANI_OFDM_DEF_LEVEL) ?
279 immunityLevel : ATH9K_ANI_OFDM_DEF_LEVEL;
278 280
279 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; 281 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
280 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; 282 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
@@ -340,7 +342,9 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel)
340 immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI; 342 immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
341 343
342 if (aniState->update_ani) 344 if (aniState->update_ani)
343 aniState->cckNoiseImmunityLevel = immunityLevel; 345 aniState->cckNoiseImmunityLevel =
346 (immunityLevel > ATH9K_ANI_CCK_DEF_LEVEL) ?
347 immunityLevel : ATH9K_ANI_CCK_DEF_LEVEL;
344 348
345 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; 349 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
346 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; 350 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];