Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 6/8] ath9k: Fix bug in disabling MIB counters
@ 2009-02-12  4:36 Sujith
  0 siblings, 0 replies; only message in thread
From: Sujith @ 2009-02-12  4:36 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Jouni.Malinen, Luis.Rodriguez

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>
---
 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 d4df7e6..a39eb76 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)
 	REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING);
 }
 
+/* Freeze the MIB counters, get the stats and then clear them */
 void ath9k_hw_disable_mib_counters(struct ath_hw *ah)
 {
 	DPRINTF(ah->ah_sc, ATH_DBG_ANI, "Disable MIB counters\n");
-
-	REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC | AR_MIBC_CMC);
-
+	REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC);
 	ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
-
+	REG_WRITE(ah, AR_MIBC, AR_MIBC_CMC);
 	REG_WRITE(ah, AR_FILT_OFDM, 0);
 	REG_WRITE(ah, AR_FILT_CCK, 0);
 }
-- 
1.6.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-12  4:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12  4:36 [PATCH 6/8] ath9k: Fix bug in disabling MIB counters Sujith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox