aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-06-12 00:33:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:29 -0400
commit6e97f0fb4dc8e95cd7507f3ae89841a79bac0193 (patch)
treef5399f33d9894fb41b3c6f1d1d0d8c0186db3373 /drivers
parent37e5bf6535a4d697fb9fa6f268a8354a612cbc00 (diff)
ath9k_hw: clear MIB interrupt causes when skipping ANI adjustments
We get an MIB interrupt when we hit certain PHY error counter thresholds. If ANI is disabled but the MIB interrupt is enabled we'll keep around the old MIB interrupt causes. Since ath9k disables the MIB interrupt when ANI is disabled this is not a fix, but more of a sanity fix in case we ever need the MIB interrupt enabled but disabling ANI. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index e879055c058f..66d0b8846a0e 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -585,8 +585,15 @@ void ath9k_hw_procmibevent(struct ath_hw *ah)
585 /* Clear the mib counters and save them in the stats */ 585 /* Clear the mib counters and save them in the stats */
586 ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); 586 ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
587 587
588 if (!DO_ANI(ah)) 588 if (!DO_ANI(ah)) {
589 /*
590 * We must always clear the interrupt cause by
591 * resetting the phy error regs.
592 */
593 REG_WRITE(ah, AR_PHY_ERR_1, 0);
594 REG_WRITE(ah, AR_PHY_ERR_2, 0);
589 return; 595 return;
596 }
590 597
591 /* NB: these are not reset-on-read */ 598 /* NB: these are not reset-on-read */
592 phyCnt1 = REG_READ(ah, AR_PHY_ERR_1); 599 phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);