aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/ani.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k/ani.c')
-rw-r--r--drivers/net/wireless/ath9k/ani.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath9k/ani.c b/drivers/net/wireless/ath9k/ani.c
index 251e2d9a7a4a..4dd086073ad9 100644
--- a/drivers/net/wireless/ath9k/ani.c
+++ b/drivers/net/wireless/ath9k/ani.c
@@ -279,9 +279,8 @@ static void ath9k_ani_restart(struct ath_hal *ah)
279static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah) 279static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
280{ 280{
281 struct ath_hal_5416 *ahp = AH5416(ah); 281 struct ath_hal_5416 *ahp = AH5416(ah);
282 struct ath9k_channel *chan = ah->ah_curchan; 282 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
283 struct ar5416AniState *aniState; 283 struct ar5416AniState *aniState;
284 enum wireless_mode mode;
285 int32_t rssi; 284 int32_t rssi;
286 285
287 if (!DO_ANI(ah)) 286 if (!DO_ANI(ah))
@@ -336,8 +335,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
336 aniState->firstepLevel + 1); 335 aniState->firstepLevel + 1);
337 return; 336 return;
338 } else { 337 } else {
339 mode = ath9k_hw_chan2wmode(ah, chan); 338 if (conf->channel->band == IEEE80211_BAND_2GHZ) {
340 if (mode == ATH9K_MODE_11G || mode == ATH9K_MODE_11B) {
341 if (!aniState->ofdmWeakSigDetectOff) 339 if (!aniState->ofdmWeakSigDetectOff)
342 ath9k_hw_ani_control(ah, 340 ath9k_hw_ani_control(ah,
343 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, 341 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
@@ -353,9 +351,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
353static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah) 351static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah)
354{ 352{
355 struct ath_hal_5416 *ahp = AH5416(ah); 353 struct ath_hal_5416 *ahp = AH5416(ah);
356 struct ath9k_channel *chan = ah->ah_curchan; 354 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
357 struct ar5416AniState *aniState; 355 struct ar5416AniState *aniState;
358 enum wireless_mode mode;
359 int32_t rssi; 356 int32_t rssi;
360 357
361 if (!DO_ANI(ah)) 358 if (!DO_ANI(ah))
@@ -381,8 +378,7 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah)
381 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 378 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
382 aniState->firstepLevel + 1); 379 aniState->firstepLevel + 1);
383 } else { 380 } else {
384 mode = ath9k_hw_chan2wmode(ah, chan); 381 if (conf->channel->band == IEEE80211_BAND_2GHZ) {
385 if (mode == ATH9K_MODE_11G || mode == ATH9K_MODE_11B) {
386 if (aniState->firstepLevel > 0) 382 if (aniState->firstepLevel > 0)
387 ath9k_hw_ani_control(ah, 383 ath9k_hw_ani_control(ah,
388 ATH9K_ANI_FIRSTEP_LEVEL, 0); 384 ATH9K_ANI_FIRSTEP_LEVEL, 0);