ath9k: more ani fixes
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 564-ath9k_fix_ani_update.patch
1 --- a/drivers/net/wireless/ath/ath9k/ani.c
2 +++ b/drivers/net/wireless/ath/ath9k/ani.c
3 @@ -153,9 +153,7 @@ static void ath9k_hw_set_ofdm_nil(struct
4 immunityLevel, BEACON_RSSI(ah),
5 aniState->rssiThrLow, aniState->rssiThrHigh);
6
7 - if (aniState->update_ani)
8 - aniState->ofdmNoiseImmunityLevel = immunityLevel;
9 -
10 + aniState->ofdmNoiseImmunityLevel = immunityLevel;
11 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
12 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
13
14 @@ -222,9 +220,7 @@ static void ath9k_hw_set_cck_nil(struct
15 immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
16 immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
17
18 - if (aniState->update_ani)
19 - aniState->cckNoiseImmunityLevel = immunityLevel;
20 -
21 + aniState->cckNoiseImmunityLevel = immunityLevel;
22 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
23 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
24
25 @@ -338,7 +334,6 @@ void ath9k_ani_reset(struct ath_hw *ah,
26 aniState->ofdmNoiseImmunityLevel,
27 aniState->cckNoiseImmunityLevel);
28
29 - aniState->update_ani = false;
30 ofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL;
31 cck_nil = ATH9K_ANI_CCK_DEF_LEVEL;
32 }
33 @@ -354,8 +349,6 @@ void ath9k_ani_reset(struct ath_hw *ah,
34 is_scanning,
35 aniState->ofdmNoiseImmunityLevel,
36 aniState->cckNoiseImmunityLevel);
37 -
38 - aniState->update_ani = true;
39 }
40 ath9k_hw_set_ofdm_nil(ah, ofdm_nil);
41 ath9k_hw_set_cck_nil(ah, cck_nil);
42 @@ -538,7 +531,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah
43 ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
44 ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
45 ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
46 - ani->update_ani = false;
47 }
48
49 /*
50 --- a/drivers/net/wireless/ath/ath9k/ani.h
51 +++ b/drivers/net/wireless/ath/ath9k/ani.h
52 @@ -116,7 +116,6 @@ struct ar5416AniState {
53 u8 firstepLevel;
54 u8 ofdmWeakSigDetect;
55 u8 cckWeakSigThreshold;
56 - bool update_ani;
57 u32 listenTime;
58 int32_t rssiThrLow;
59 int32_t rssiThrHigh;