aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 767d8b86f1e1..b3254a3484a5 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -598,8 +598,6 @@ err_btcoex:
598err_queues: 598err_queues:
599 ath9k_hw_deinit(ah); 599 ath9k_hw_deinit(ah);
600err_hw: 600err_hw:
601 tasklet_kill(&sc->intr_tq);
602 tasklet_kill(&sc->bcon_tasklet);
603 601
604 kfree(ah); 602 kfree(ah);
605 sc->sc_ah = NULL; 603 sc->sc_ah = NULL;
@@ -807,9 +805,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
807 805
808 ath9k_hw_deinit(sc->sc_ah); 806 ath9k_hw_deinit(sc->sc_ah);
809 807
810 tasklet_kill(&sc->intr_tq);
811 tasklet_kill(&sc->bcon_tasklet);
812
813 kfree(sc->sc_ah); 808 kfree(sc->sc_ah);
814 sc->sc_ah = NULL; 809 sc->sc_ah = NULL;
815} 810}
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c79c97be6cd4..ace9f066fa20 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1309,6 +1309,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
1309 1309
1310 spin_lock_bh(&sc->sc_pcu_lock); 1310 spin_lock_bh(&sc->sc_pcu_lock);
1311 1311
1312 /* prevent tasklets to enable interrupts once we disable them */
1313 ah->imask &= ~ATH9K_INT_GLOBAL;
1314
1312 /* make sure h/w will not generate any interrupt 1315 /* make sure h/w will not generate any interrupt
1313 * before setting the invalid flag. */ 1316 * before setting the invalid flag. */
1314 ath9k_hw_disable_interrupts(ah); 1317 ath9k_hw_disable_interrupts(ah);
@@ -1326,6 +1329,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
1326 1329
1327 spin_unlock_bh(&sc->sc_pcu_lock); 1330 spin_unlock_bh(&sc->sc_pcu_lock);
1328 1331
1332 /* we can now sync irq and kill any running tasklets, since we already
1333 * disabled interrupts and not holding a spin lock */
1334 synchronize_irq(sc->irq);
1335 tasklet_kill(&sc->intr_tq);
1336 tasklet_kill(&sc->bcon_tasklet);
1337
1329 ath9k_ps_restore(sc); 1338 ath9k_ps_restore(sc);
1330 1339
1331 sc->ps_idle = true; 1340 sc->ps_idle = true;