diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-06-02 23:49:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-03 15:55:47 -0400 |
commit | e323300d9741d44e6543ece3659671742f93acba (patch) | |
tree | 01229002abc7f9fa51b3205583a785736b0dd0d7 /drivers/net/wireless/ath/ath9k/ani.c | |
parent | 380013fc9442f65d5b898fc168e9994049ea2937 (diff) |
ath9k: Simplify ANI initialization
The check "enable_ani" is not required since it is always
set to true and the logic for disabling/enabling ANI via
debugfs is done at a higher layer.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
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 | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index 7ecd40f07a74..734e72db039a 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -118,7 +118,7 @@ static void ath9k_ani_restart(struct ath_hw *ah) | |||
118 | { | 118 | { |
119 | struct ar5416AniState *aniState; | 119 | struct ar5416AniState *aniState; |
120 | 120 | ||
121 | if (!DO_ANI(ah)) | 121 | if (!ah->curchan) |
122 | return; | 122 | return; |
123 | 123 | ||
124 | aniState = &ah->curchan->ani; | 124 | aniState = &ah->curchan->ani; |
@@ -195,7 +195,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) | |||
195 | { | 195 | { |
196 | struct ar5416AniState *aniState; | 196 | struct ar5416AniState *aniState; |
197 | 197 | ||
198 | if (!DO_ANI(ah)) | 198 | if (!ah->curchan) |
199 | return; | 199 | return; |
200 | 200 | ||
201 | aniState = &ah->curchan->ani; | 201 | aniState = &ah->curchan->ani; |
@@ -251,7 +251,7 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah) | |||
251 | { | 251 | { |
252 | struct ar5416AniState *aniState; | 252 | struct ar5416AniState *aniState; |
253 | 253 | ||
254 | if (!DO_ANI(ah)) | 254 | if (!ah->curchan) |
255 | return; | 255 | return; |
256 | 256 | ||
257 | aniState = &ah->curchan->ani; | 257 | aniState = &ah->curchan->ani; |
@@ -297,7 +297,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) | |||
297 | struct ath_common *common = ath9k_hw_common(ah); | 297 | struct ath_common *common = ath9k_hw_common(ah); |
298 | int ofdm_nil, cck_nil; | 298 | int ofdm_nil, cck_nil; |
299 | 299 | ||
300 | if (!DO_ANI(ah)) | 300 | if (!ah->curchan) |
301 | return; | 301 | return; |
302 | 302 | ||
303 | BUG_ON(aniState == NULL); | 303 | BUG_ON(aniState == NULL); |
@@ -415,7 +415,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan) | |||
415 | struct ath_common *common = ath9k_hw_common(ah); | 415 | struct ath_common *common = ath9k_hw_common(ah); |
416 | u32 ofdmPhyErrRate, cckPhyErrRate; | 416 | u32 ofdmPhyErrRate, cckPhyErrRate; |
417 | 417 | ||
418 | if (!DO_ANI(ah)) | 418 | if (!ah->curchan) |
419 | return; | 419 | return; |
420 | 420 | ||
421 | aniState = &ah->curchan->ani; | 421 | aniState = &ah->curchan->ani; |
@@ -524,9 +524,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah) | |||
524 | ah->aniperiod = ATH9K_ANI_PERIOD; | 524 | ah->aniperiod = ATH9K_ANI_PERIOD; |
525 | ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; | 525 | ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; |
526 | 526 | ||
527 | if (ah->config.enable_ani) | ||
528 | ah->proc_phyerr |= HAL_PROCESS_ANI; | ||
529 | |||
530 | ath9k_ani_restart(ah); | 527 | ath9k_ani_restart(ah); |
531 | ath9k_enable_mib_counters(ah); | 528 | ath9k_enable_mib_counters(ah); |
532 | } | 529 | } |