diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-06-15 09:25:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-20 14:44:42 -0400 |
commit | 7067e7014d7013645f7e866b74814f1e59e6a7cd (patch) | |
tree | 627c388e4dff0f4053f1cbc62879c1fe65b871d9 /drivers/net/wireless/ath/ath9k/ani.c | |
parent | 0b81cc3922bce79d0f21189648bf4f9992e9a533 (diff) |
ath9k_hw: remove confusing logic inversion in an ANI variable
Code using this had already triggered smatch complaints, so remove it before
it gets fixed the wrong way.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ani.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index cf310508cac5..aef81707cf88 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -185,7 +185,7 @@ static void ath9k_hw_ani_ofdm_err_trigger_old(struct ath_hw *ah) | |||
185 | } | 185 | } |
186 | rssi = BEACON_RSSI(ah); | 186 | rssi = BEACON_RSSI(ah); |
187 | if (rssi > aniState->rssiThrHigh) { | 187 | if (rssi > aniState->rssiThrHigh) { |
188 | if (!aniState->ofdmWeakSigDetectOff) { | 188 | if (aniState->ofdmWeakSigDetect) { |
189 | if (ath9k_hw_ani_control(ah, | 189 | if (ath9k_hw_ani_control(ah, |
190 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, | 190 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
191 | false)) { | 191 | false)) { |
@@ -200,7 +200,7 @@ static void ath9k_hw_ani_ofdm_err_trigger_old(struct ath_hw *ah) | |||
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | } else if (rssi > aniState->rssiThrLow) { | 202 | } else if (rssi > aniState->rssiThrLow) { |
203 | if (aniState->ofdmWeakSigDetectOff) | 203 | if (!aniState->ofdmWeakSigDetect) |
204 | ath9k_hw_ani_control(ah, | 204 | ath9k_hw_ani_control(ah, |
205 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, | 205 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
206 | true); | 206 | true); |
@@ -211,7 +211,7 @@ static void ath9k_hw_ani_ofdm_err_trigger_old(struct ath_hw *ah) | |||
211 | } else { | 211 | } else { |
212 | if ((conf->channel->band == IEEE80211_BAND_2GHZ) && | 212 | if ((conf->channel->band == IEEE80211_BAND_2GHZ) && |
213 | !conf_is_ht(conf)) { | 213 | !conf_is_ht(conf)) { |
214 | if (!aniState->ofdmWeakSigDetectOff) | 214 | if (aniState->ofdmWeakSigDetect) |
215 | ath9k_hw_ani_control(ah, | 215 | ath9k_hw_ani_control(ah, |
216 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, | 216 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
217 | false); | 217 | false); |
@@ -296,7 +296,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel) | |||
296 | BEACON_RSSI(ah) <= aniState->rssiThrHigh) | 296 | BEACON_RSSI(ah) <= aniState->rssiThrHigh) |
297 | weak_sig = true; | 297 | weak_sig = true; |
298 | 298 | ||
299 | if (!aniState->ofdmWeakSigDetectOff != weak_sig) | 299 | if (aniState->ofdmWeakSigDetect != weak_sig) |
300 | ath9k_hw_ani_control(ah, | 300 | ath9k_hw_ani_control(ah, |
301 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, | 301 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
302 | entry_ofdm->ofdm_weak_signal_on); | 302 | entry_ofdm->ofdm_weak_signal_on); |
@@ -401,7 +401,7 @@ static void ath9k_hw_ani_lower_immunity_old(struct ath_hw *ah) | |||
401 | if (rssi > aniState->rssiThrHigh) { | 401 | if (rssi > aniState->rssiThrHigh) { |
402 | /* XXX: Handle me */ | 402 | /* XXX: Handle me */ |
403 | } else if (rssi > aniState->rssiThrLow) { | 403 | } else if (rssi > aniState->rssiThrLow) { |
404 | if (aniState->ofdmWeakSigDetectOff) { | 404 | if (!aniState->ofdmWeakSigDetect) { |
405 | if (ath9k_hw_ani_control(ah, | 405 | if (ath9k_hw_ani_control(ah, |
406 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, | 406 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
407 | true)) | 407 | true)) |
@@ -509,9 +509,9 @@ static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning) | |||
509 | if (aniState->spurImmunityLevel != 0) | 509 | if (aniState->spurImmunityLevel != 0) |
510 | ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, | 510 | ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, |
511 | aniState->spurImmunityLevel); | 511 | aniState->spurImmunityLevel); |
512 | if (aniState->ofdmWeakSigDetectOff) | 512 | if (!aniState->ofdmWeakSigDetect) |
513 | ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, | 513 | ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
514 | !aniState->ofdmWeakSigDetectOff); | 514 | aniState->ofdmWeakSigDetect); |
515 | if (aniState->cckWeakSigThreshold) | 515 | if (aniState->cckWeakSigThreshold) |
516 | ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR, | 516 | ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR, |
517 | aniState->cckWeakSigThreshold); | 517 | aniState->cckWeakSigThreshold); |
@@ -887,8 +887,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah) | |||
887 | 887 | ||
888 | ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH; | 888 | ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH; |
889 | ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW; | 889 | ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW; |
890 | ani->ofdmWeakSigDetectOff = | 890 | ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; |
891 | !ATH9K_ANI_USE_OFDM_WEAK_SIG; | ||
892 | ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; | 891 | ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; |
893 | ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL; | 892 | ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL; |
894 | ani->update_ani = false; | 893 | ani->update_ani = false; |