1 --- a/drivers/net/wireless/ath/ath9k/ani.c
2 +++ b/drivers/net/wireless/ath/ath9k/ani.c
3 @@ -185,7 +185,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
5 rssi = BEACON_RSSI(ah);
6 if (rssi > aniState->rssiThrHigh) {
7 - if (!aniState->ofdmWeakSigDetectOff) {
8 + if (aniState->ofdmWeakSigDetect) {
9 if (ath9k_hw_ani_control(ah,
10 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
12 @@ -200,7 +200,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
15 } else if (rssi > aniState->rssiThrLow) {
16 - if (aniState->ofdmWeakSigDetectOff)
17 + if (!aniState->ofdmWeakSigDetect)
18 ath9k_hw_ani_control(ah,
19 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
21 @@ -211,7 +211,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
23 if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
25 - if (!aniState->ofdmWeakSigDetectOff)
26 + if (aniState->ofdmWeakSigDetect)
27 ath9k_hw_ani_control(ah,
28 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
30 @@ -296,7 +296,7 @@ static void ath9k_hw_set_ofdm_nil(struct
31 BEACON_RSSI(ah) <= aniState->rssiThrHigh)
34 - if (!aniState->ofdmWeakSigDetectOff != weak_sig)
35 + if (aniState->ofdmWeakSigDetect != weak_sig)
36 ath9k_hw_ani_control(ah,
37 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
38 entry_ofdm->ofdm_weak_signal_on);
39 @@ -401,7 +401,7 @@ static void ath9k_hw_ani_lower_immunity_
40 if (rssi > aniState->rssiThrHigh) {
42 } else if (rssi > aniState->rssiThrLow) {
43 - if (aniState->ofdmWeakSigDetectOff) {
44 + if (!aniState->ofdmWeakSigDetect) {
45 if (ath9k_hw_ani_control(ah,
46 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
48 @@ -509,9 +509,9 @@ static void ath9k_ani_reset_old(struct a
49 if (aniState->spurImmunityLevel != 0)
50 ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
51 aniState->spurImmunityLevel);
52 - if (aniState->ofdmWeakSigDetectOff)
53 + if (!aniState->ofdmWeakSigDetect)
54 ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
55 - !aniState->ofdmWeakSigDetectOff);
56 + aniState->ofdmWeakSigDetect);
57 if (aniState->cckWeakSigThreshold)
58 ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
59 aniState->cckWeakSigThreshold);
60 @@ -887,8 +887,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah
62 ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH;
63 ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW;
64 - ani->ofdmWeakSigDetectOff =
65 - !ATH9K_ANI_USE_OFDM_WEAK_SIG;
66 + ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
67 ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
68 ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
69 ani->update_ani = false;
70 --- a/drivers/net/wireless/ath/ath9k/ani.h
71 +++ b/drivers/net/wireless/ath/ath9k/ani.h
72 @@ -122,7 +122,7 @@ struct ar5416AniState {
76 - u8 ofdmWeakSigDetectOff;
77 + u8 ofdmWeakSigDetect;
78 u8 cckWeakSigThreshold;
81 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
82 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
83 @@ -1042,12 +1042,12 @@ static bool ar5008_hw_ani_control_old(st
84 REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
85 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
87 - if (!on != aniState->ofdmWeakSigDetectOff) {
88 + if (on != aniState->ofdmWeakSigDetect) {
90 ah->stats.ast_ani_ofdmon++;
92 ah->stats.ast_ani_ofdmoff++;
93 - aniState->ofdmWeakSigDetectOff = !on;
94 + aniState->ofdmWeakSigDetect = on;
98 @@ -1114,10 +1114,10 @@ static bool ar5008_hw_ani_control_old(st
100 ath_dbg(common, ANI, "ANI parameters:\n");
102 - "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetectOff=%d\n",
103 + "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetect=%d\n",
104 aniState->noiseImmunityLevel,
105 aniState->spurImmunityLevel,
106 - !aniState->ofdmWeakSigDetectOff);
107 + aniState->ofdmWeakSigDetect);
109 "cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
110 aniState->cckWeakSigThreshold,
111 @@ -1206,18 +1206,18 @@ static bool ar5008_hw_ani_control_new(st
112 REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
113 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
115 - if (!on != aniState->ofdmWeakSigDetectOff) {
116 + if (on != aniState->ofdmWeakSigDetect) {
118 "** ch %d: ofdm weak signal: %s=>%s\n",
120 - !aniState->ofdmWeakSigDetectOff ?
121 + aniState->ofdmWeakSigDetect ?
125 ah->stats.ast_ani_ofdmon++;
127 ah->stats.ast_ani_ofdmoff++;
128 - aniState->ofdmWeakSigDetectOff = !on;
129 + aniState->ofdmWeakSigDetect = on;
133 @@ -1367,7 +1367,7 @@ static bool ar5008_hw_ani_control_new(st
135 "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
136 aniState->spurImmunityLevel,
137 - !aniState->ofdmWeakSigDetectOff ? "on" : "off",
138 + aniState->ofdmWeakSigDetect ? "on" : "off",
139 aniState->firstepLevel,
140 !aniState->mrcCCKOff ? "on" : "off",
141 aniState->listenTime,
142 @@ -1456,7 +1456,7 @@ static void ar5008_hw_ani_cache_ini_regs
143 /* these levels just got reset to defaults by the INI */
144 aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
145 aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
146 - aniState->ofdmWeakSigDetectOff = !ATH9K_ANI_USE_OFDM_WEAK_SIG;
147 + aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
148 aniState->mrcCCKOff = true; /* not available on pre AR9003 */
151 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
152 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
153 @@ -821,18 +821,18 @@ static bool ar9003_hw_ani_control(struct
154 REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
155 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
157 - if (!on != aniState->ofdmWeakSigDetectOff) {
158 + if (on != aniState->ofdmWeakSigDetect) {
160 "** ch %d: ofdm weak signal: %s=>%s\n",
162 - !aniState->ofdmWeakSigDetectOff ?
163 + aniState->ofdmWeakSigDetect ?
167 ah->stats.ast_ani_ofdmon++;
169 ah->stats.ast_ani_ofdmoff++;
170 - aniState->ofdmWeakSigDetectOff = !on;
171 + aniState->ofdmWeakSigDetect = on;
175 @@ -998,7 +998,7 @@ static bool ar9003_hw_ani_control(struct
177 "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
178 aniState->spurImmunityLevel,
179 - !aniState->ofdmWeakSigDetectOff ? "on" : "off",
180 + aniState->ofdmWeakSigDetect ? "on" : "off",
181 aniState->firstepLevel,
182 !aniState->mrcCCKOff ? "on" : "off",
183 aniState->listenTime,
184 @@ -1109,7 +1109,7 @@ static void ar9003_hw_ani_cache_ini_regs
185 /* these levels just got reset to defaults by the INI */
186 aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
187 aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
188 - aniState->ofdmWeakSigDetectOff = !ATH9K_ANI_USE_OFDM_WEAK_SIG;
189 + aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
190 aniState->mrcCCKOff = !ATH9K_ANI_ENABLE_MRC_CCK;