diff options
author | Bruno Randolf <br1@einfach.org> | 2010-05-18 21:31:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 16:13:26 -0400 |
commit | 9537a1623359fd24ec95ba1fe60528c70e84b2a2 (patch) | |
tree | 3cf0d0e6d61d02c00809cc13a316be1b64e8ef34 /drivers/net/wireless/ath | |
parent | 40ca22eafeb61ee1419dd7c4c2698459183c582c (diff) |
ath5k: always calculate ANI listen time
Calculate 'listen' time also when automatic ANI is off, since this and the
"busy" time is useful information also in manual mode.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ani.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ani.c b/drivers/net/wireless/ath/ath5k/ani.c index f2311ab35504..987e3d3fa5cb 100644 --- a/drivers/net/wireless/ath/ath5k/ani.c +++ b/drivers/net/wireless/ath/ath5k/ani.c | |||
@@ -481,14 +481,15 @@ ath5k_ani_calibration(struct ath5k_hw *ah) | |||
481 | struct ath5k_ani_state *as = &ah->ah_sc->ani_state; | 481 | struct ath5k_ani_state *as = &ah->ah_sc->ani_state; |
482 | int listen, ofdm_high, ofdm_low, cck_high, cck_low; | 482 | int listen, ofdm_high, ofdm_low, cck_high, cck_low; |
483 | 483 | ||
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 | 484 | /* get listen time since last call and add it to the counter because we |
488 | * might not have restarted the "ani period" last time */ | 485 | * might not have restarted the "ani period" last time. |
486 | * always do this to calculate the busy time also in manual mode */ | ||
489 | listen = ath5k_hw_ani_get_listen_time(ah, as); | 487 | listen = ath5k_hw_ani_get_listen_time(ah, as); |
490 | as->listen_time += listen; | 488 | as->listen_time += listen; |
491 | 489 | ||
490 | if (as->ani_mode != ATH5K_ANI_MODE_AUTO) | ||
491 | return; | ||
492 | |||
492 | ath5k_ani_save_and_clear_phy_errors(ah, as); | 493 | ath5k_ani_save_and_clear_phy_errors(ah, as); |
493 | 494 | ||
494 | ofdm_high = as->listen_time * ATH5K_ANI_OFDM_TRIG_HIGH / 1000; | 495 | ofdm_high = as->listen_time * ATH5K_ANI_OFDM_TRIG_HIGH / 1000; |