summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/mac.c
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2010-02-23 18:15:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-09 15:03:06 -0500
commit74bad5cb497080514c4a945f38589bdb574fdfb7 (patch)
tree769baaf1d6c61e2a1d69eb2af19cd813415321c6 /drivers/net/wireless/ath/ath9k/mac.c
parentb4d59a9317e41faec3d0b6a03f0454d1e8abb710 (diff)
downloadlinux-stable-74bad5cb497080514c4a945f38589bdb574fdfb7.tar.gz
linux-stable-74bad5cb497080514c4a945f38589bdb574fdfb7.tar.bz2
linux-stable-74bad5cb497080514c4a945f38589bdb574fdfb7.zip
ath9k: never read from the AR_IMR_S2 register
The AR_IMR_S2 register sometimes cannot be read correctly. Instead of a valid value, 0xdeadbeef is returned. The driver has been observed writing that value back to AR_IMR_S2 after changing a few bits. Cache the register value in ah->imrs2_reg and always write chached value to the register. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index efc420cd42bf..589490b69ddc 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -31,8 +31,10 @@ static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah,
REG_WRITE(ah, AR_IMR_S1,
SM(ah->txerr_interrupt_mask, AR_IMR_S1_QCU_TXERR)
| SM(ah->txeol_interrupt_mask, AR_IMR_S1_QCU_TXEOL));
- REG_RMW_FIELD(ah, AR_IMR_S2,
- AR_IMR_S2_QCU_TXURN, ah->txurn_interrupt_mask);
+
+ ah->imrs2_reg &= ~AR_IMR_S2_QCU_TXURN;
+ ah->imrs2_reg |= (ah->txurn_interrupt_mask & AR_IMR_S2_QCU_TXURN);
+ REG_WRITE(ah, AR_IMR_S2, ah->imrs2_reg);
}
u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q)