aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index 18ce69d7feac..cf310508cac5 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -265,6 +265,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
265 struct ath_common *common = ath9k_hw_common(ah); 265 struct ath_common *common = ath9k_hw_common(ah);
266 const struct ani_ofdm_level_entry *entry_ofdm; 266 const struct ani_ofdm_level_entry *entry_ofdm;
267 const struct ani_cck_level_entry *entry_cck; 267 const struct ani_cck_level_entry *entry_cck;
268 bool weak_sig;
268 269
269 ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", 270 ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
270 aniState->ofdmNoiseImmunityLevel, 271 aniState->ofdmNoiseImmunityLevel,
@@ -290,13 +291,15 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
290 ATH9K_ANI_FIRSTEP_LEVEL, 291 ATH9K_ANI_FIRSTEP_LEVEL,
291 entry_ofdm->fir_step_level); 292 entry_ofdm->fir_step_level);
292 293
293 if (BEACON_RSSI(ah) >= aniState->rssiThrHigh && 294 weak_sig = entry_ofdm->ofdm_weak_signal_on;
294 (!aniState->ofdmWeakSigDetectOff != 295 if (ah->opmode == NL80211_IFTYPE_STATION &&
295 entry_ofdm->ofdm_weak_signal_on)) { 296 BEACON_RSSI(ah) <= aniState->rssiThrHigh)
297 weak_sig = true;
298
299 if (!aniState->ofdmWeakSigDetectOff != weak_sig)
296 ath9k_hw_ani_control(ah, 300 ath9k_hw_ani_control(ah,
297 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, 301 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
298 entry_ofdm->ofdm_weak_signal_on); 302 entry_ofdm->ofdm_weak_signal_on);
299 }
300} 303}
301 304
302static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) 305static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)