diff mbox

ath5k: disable all tasklets while resetting

Message ID 20100611101221.26538.46913.stgit@tt-desk (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bruno Randolf June 11, 2010, 10:12 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 9d37c1a..585c517 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2908,6 +2908,12 @@  ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan)
 
 	ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
 
+	tasklet_disable(&sc->rxtq);		/* ath5k_tasklet_rx */
+	tasklet_disable(&sc->txtq);		/* ath5k_tasklet_tx */
+	tasklet_disable(&sc->calib);		/* ath5k_tasklet_calibrate */
+	tasklet_disable(&sc->beacontq);		/* ath5k_tasklet_beacon */
+	tasklet_disable(&sc->ani_tasklet);	/* ath5k_tasklet_ani */
+
 	if (chan) {
 		ath5k_hw_set_imr(ah, 0);
 		ath5k_txq_cleanup(sc);
@@ -2948,6 +2954,12 @@  ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan)
 	ath5k_beacon_config(sc);
 	/* intrs are enabled by ath5k_beacon_config */
 
+	tasklet_enable(&sc->rxtq);		/* ath5k_tasklet_rx */
+	tasklet_enable(&sc->txtq);		/* ath5k_tasklet_tx */
+	tasklet_enable(&sc->calib);		/* ath5k_tasklet_calibrate */
+	tasklet_enable(&sc->beacontq);		/* ath5k_tasklet_beacon */
+	tasklet_enable(&sc->ani_tasklet);	/* ath5k_tasklet_ani */
+
 	ieee80211_wake_queues(sc->hw);
 
 	return 0;