]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ath9k_hw: fix PHY counter overflow handling in ANI v1
authorFelix Fietkau <nbd@openwrt.org>
Tue, 12 Oct 2010 14:08:02 +0000 (16:08 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Oct 2010 19:48:44 +0000 (15:48 -0400)
PHY counter overflows need to be checked for the old ANI version,
because of its use of interrupt based counter overflow reports when
the counters exceed the configured thresholds.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ani.c

index 9297f574b71cb567ec99be224543e50170eabfcb..63ccb39cdcd4abc42717ea4bccc5c442c6c97f39 100644 (file)
@@ -664,7 +664,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah)
        phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
        phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
 
-       if (use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
+       if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
                if (phyCnt1 < ofdm_base) {
                        ath_print(common, ATH_DBG_ANI,
                                  "phyCnt1 0x%x, resetting "