From 54f0845b45dcc4ed72597929be5140c18c830953 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Tue, 25 Jan 2011 14:08:40 +0100 Subject: [PATCH] --- yaml --- r: 232863 b: refs/heads/master c: 203043f579ece44bb30291442cd56332651dd37d h: refs/heads/master i: 232861: c7e89d852d512eefb2c6bf1869dc5312e3153e66 232859: 9e97342086550ff0eae5255629f14266ed4ae26c 232855: 1805dc21e646c8849e93fd76ad609a6df4247034 232847: 29b29a34c71aa5bb1b475e9330f4c764fc9bd68c 232831: bfcff1b931088498b2064ae29e441e15d085f098 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath9k/init.c | 5 ----- trunk/drivers/net/wireless/ath/ath9k/main.c | 9 +++++++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 635315d77ee8..e89ad516a40f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c9234a662e38309d6fe272ad80e6cdb8d24654f0 +refs/heads/master: 203043f579ece44bb30291442cd56332651dd37d diff --git a/trunk/drivers/net/wireless/ath/ath9k/init.c b/trunk/drivers/net/wireless/ath/ath9k/init.c index 767d8b86f1e1..b3254a3484a5 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/init.c +++ b/trunk/drivers/net/wireless/ath/ath9k/init.c @@ -598,8 +598,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, err_queues: ath9k_hw_deinit(ah); err_hw: - tasklet_kill(&sc->intr_tq); - tasklet_kill(&sc->bcon_tasklet); kfree(ah); sc->sc_ah = NULL; @@ -807,9 +805,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc) ath9k_hw_deinit(sc->sc_ah); - tasklet_kill(&sc->intr_tq); - tasklet_kill(&sc->bcon_tasklet); - kfree(sc->sc_ah); sc->sc_ah = NULL; } diff --git a/trunk/drivers/net/wireless/ath/ath9k/main.c b/trunk/drivers/net/wireless/ath/ath9k/main.c index c79c97be6cd4..ace9f066fa20 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/main.c +++ b/trunk/drivers/net/wireless/ath/ath9k/main.c @@ -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;