diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ani.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ani.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ani.c b/drivers/net/wireless/ath/ath5k/ani.c index f2311ab35504..26dbe65fedb0 100644 --- a/drivers/net/wireless/ath/ath5k/ani.c +++ b/drivers/net/wireless/ath/ath5k/ani.c | |||
@@ -74,8 +74,8 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level) | |||
74 | const s8 fr[] = { -78, -80 }; | 74 | const s8 fr[] = { -78, -80 }; |
75 | #endif | 75 | #endif |
76 | if (level < 0 || level >= ARRAY_SIZE(sz)) { | 76 | if (level < 0 || level >= ARRAY_SIZE(sz)) { |
77 | ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, | 77 | ATH5K_ERR(ah->ah_sc, "noise immuniy level %d out of range", |
78 | "level out of range %d", level); | 78 | level); |
79 | return; | 79 | return; |
80 | } | 80 | } |
81 | 81 | ||
@@ -106,8 +106,8 @@ ath5k_ani_set_spur_immunity_level(struct ath5k_hw *ah, int level) | |||
106 | 106 | ||
107 | if (level < 0 || level >= ARRAY_SIZE(val) || | 107 | if (level < 0 || level >= ARRAY_SIZE(val) || |
108 | level > ah->ah_sc->ani_state.max_spur_level) { | 108 | level > ah->ah_sc->ani_state.max_spur_level) { |
109 | ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, | 109 | ATH5K_ERR(ah->ah_sc, "spur immunity level %d out of range", |
110 | "level out of range %d", level); | 110 | level); |
111 | return; | 111 | return; |
112 | } | 112 | } |
113 | 113 | ||
@@ -130,8 +130,7 @@ ath5k_ani_set_firstep_level(struct ath5k_hw *ah, int level) | |||
130 | const int val[] = { 0, 4, 8 }; | 130 | const int val[] = { 0, 4, 8 }; |
131 | 131 | ||
132 | if (level < 0 || level >= ARRAY_SIZE(val)) { | 132 | if (level < 0 || level >= ARRAY_SIZE(val)) { |
133 | ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, | 133 | ATH5K_ERR(ah->ah_sc, "firstep level %d out of range", level); |
134 | "level out of range %d", level); | ||
135 | return; | 134 | return; |
136 | } | 135 | } |
137 | 136 | ||
@@ -481,14 +480,15 @@ ath5k_ani_calibration(struct ath5k_hw *ah) | |||
481 | struct ath5k_ani_state *as = &ah->ah_sc->ani_state; | 480 | struct ath5k_ani_state *as = &ah->ah_sc->ani_state; |
482 | int listen, ofdm_high, ofdm_low, cck_high, cck_low; | 481 | int listen, ofdm_high, ofdm_low, cck_high, cck_low; |
483 | 482 | ||
484 | if (as->ani_mode != ATH5K_ANI_MODE_AUTO) | ||
485 | return; | ||
486 | |||
487 | /* get listen time since last call and add it to the counter because we | 483 | /* get listen time since last call and add it to the counter because we |
488 | * might not have restarted the "ani period" last time */ | 484 | * might not have restarted the "ani period" last time. |
485 | * always do this to calculate the busy time also in manual mode */ | ||
489 | listen = ath5k_hw_ani_get_listen_time(ah, as); | 486 | listen = ath5k_hw_ani_get_listen_time(ah, as); |
490 | as->listen_time += listen; | 487 | as->listen_time += listen; |
491 | 488 | ||
489 | if (as->ani_mode != ATH5K_ANI_MODE_AUTO) | ||
490 | return; | ||
491 | |||
492 | ath5k_ani_save_and_clear_phy_errors(ah, as); | 492 | ath5k_ani_save_and_clear_phy_errors(ah, as); |
493 | 493 | ||
494 | ofdm_high = as->listen_time * ATH5K_ANI_OFDM_TRIG_HIGH / 1000; | 494 | ofdm_high = as->listen_time * ATH5K_ANI_OFDM_TRIG_HIGH / 1000; |