diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-02-11 23:36:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:51:44 -0500 |
commit | 0fd06c90c2a9e837da6f34383a9ca38cfa702e5b (patch) | |
tree | b20d3fd5134a284e6e464ba74fc16b10076f1204 /drivers/net/wireless/ath9k/ani.c | |
parent | edf7c060f094f33b68b34b9312688fb823ebc0ff (diff) |
ath9k: Fix bug in disabling MIB counters
This patch fixes a bug in ANI, where the MIB counters were
being cleared before the stats were updated.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/ani.c')
-rw-r--r-- | drivers/net/wireless/ath9k/ani.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath9k/ani.c b/drivers/net/wireless/ath9k/ani.c index d4df7e611df5..a39eb760cbb7 100644 --- a/drivers/net/wireless/ath9k/ani.c +++ b/drivers/net/wireless/ath9k/ani.c | |||
@@ -642,14 +642,13 @@ void ath9k_enable_mib_counters(struct ath_hw *ah) | |||
642 | REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING); | 642 | REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING); |
643 | } | 643 | } |
644 | 644 | ||
645 | /* Freeze the MIB counters, get the stats and then clear them */ | ||
645 | void ath9k_hw_disable_mib_counters(struct ath_hw *ah) | 646 | void ath9k_hw_disable_mib_counters(struct ath_hw *ah) |
646 | { | 647 | { |
647 | DPRINTF(ah->ah_sc, ATH_DBG_ANI, "Disable MIB counters\n"); | 648 | DPRINTF(ah->ah_sc, ATH_DBG_ANI, "Disable MIB counters\n"); |
648 | 649 | REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC); | |
649 | REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC | AR_MIBC_CMC); | ||
650 | |||
651 | ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); | 650 | ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); |
652 | 651 | REG_WRITE(ah, AR_MIBC, AR_MIBC_CMC); | |
653 | REG_WRITE(ah, AR_FILT_OFDM, 0); | 652 | REG_WRITE(ah, AR_FILT_OFDM, 0); |
654 | REG_WRITE(ah, AR_FILT_CCK, 0); | 653 | REG_WRITE(ah, AR_FILT_CCK, 0); |
655 | } | 654 | } |