|
@@ -1309,6 +1309,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
|
|
|
|
|
spin_lock_bh(&sc->sc_pcu_lock);
|
|
|
|
|
|
+ /* prevent tasklets to enable interrupts once we disable them */
|
|
|
+ ah->imask &= ~ATH9K_INT_GLOBAL;
|
|
|
+
|
|
|
/* make sure h/w will not generate any interrupt
|
|
|
* before setting the invalid flag. */
|
|
|
ath9k_hw_disable_interrupts(ah);
|
|
@@ -1326,6 +1329,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
|
|
|
|
|
spin_unlock_bh(&sc->sc_pcu_lock);
|
|
|
|
|
|
+ /* we can now sync irq and kill any running tasklets, since we already
|
|
|
+ * disabled interrupts and not holding a spin lock */
|
|
|
+ synchronize_irq(sc->irq);
|
|
|
+ tasklet_kill(&sc->intr_tq);
|
|
|
+ tasklet_kill(&sc->bcon_tasklet);
|
|
|
+
|
|
|
ath9k_ps_restore(sc);
|
|
|
|
|
|
sc->ps_idle = true;
|