summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/beacon.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-08-05 18:59:40 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-08-09 15:52:05 -0400
commitb037b693265e5c83ddc3f003a713d19b9832bf24 (patch)
treecb2874b10fb0d8fe1d8c797e4c99e5dfb28859a8 /drivers/net/wireless/ath/ath9k/beacon.c
parent8d7763b4332b80028522f8a0d47e6339a13d1fdc (diff)
ath9k: do not enable interrupt on set interrupt mask
At preset set_interrupt also enables interrupt after changing mask. This is not necessary in all cases and also sometime it breaks the assumption that interrupt was disabled. So let us enable the interrupt explicity if it was disabled earlier. This could also avoid unnecessary register ops and also helps the follow up patch to have global ref count for interrupts ops. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 0d13ff74a68..f1d66abc367 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -522,6 +522,7 @@ static void ath_beacon_config_ap(struct ath_softc *sc,
ath9k_beacon_init(sc, nexttbtt, intval);
sc->beacon.bmisscnt = 0;
ath9k_hw_set_interrupts(ah, ah->imask);
+ ath9k_hw_enable_interrupts(ah);
}
/*
@@ -652,8 +653,10 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
* If the beacon config is called beacause of TSFOOR,
* Interrupts will be enabled back at the end of ath9k_tasklet
*/
- if (!(sc->ps_flags & PS_TSFOOR_SYNC))
+ if (!(sc->ps_flags & PS_TSFOOR_SYNC)) {
ath9k_hw_set_interrupts(ah, ah->imask);
+ ath9k_hw_enable_interrupts(ah);
+ }
}
static void ath_beacon_config_adhoc(struct ath_softc *sc,
@@ -691,8 +694,10 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
* If the beacon config is called beacause of TSFOOR,
* Interrupts will be enabled back at the end of ath9k_tasklet
*/
- if (!(sc->ps_flags & PS_TSFOOR_SYNC))
+ if (!(sc->ps_flags & PS_TSFOOR_SYNC)) {
ath9k_hw_set_interrupts(ah, ah->imask);
+ ath9k_hw_enable_interrupts(ah);
+ }
}
static bool ath9k_allow_beacon_config(struct ath_softc *sc,