aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kossifidis <mickflemm@gmail.com>2010-12-02 23:05:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-06 16:00:23 -0500
commit19252ecb672d3f35959c576d1d26b9aca350f5bf (patch)
tree83760e5ce884d9ec459a9dcab3d733e5ac6b9df1
parentd84938c9be85f4738a350ef44210789fef915cb7 (diff)
ath5k: Always free tx buffers before reset
* Always free tx buffers before reset, since we also empty hw queues. If we don't and a queue gets stuck, we'll never decrease txq_len and sw will keep thinking the queue is still stuck even after reset. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 5ece94708371..1522cf82c16c 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2661,9 +2661,11 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
2661 synchronize_irq(sc->irq); 2661 synchronize_irq(sc->irq);
2662 stop_tasklets(sc); 2662 stop_tasklets(sc);
2663 2663
2664 /* We are going to empty hw queues
2665 * so we should also free any remaining
2666 * tx buffers */
2667 ath5k_drain_tx_buffs(sc);
2664 if (chan) { 2668 if (chan) {
2665 ath5k_drain_tx_buffs(sc);
2666
2667 sc->curchan = chan; 2669 sc->curchan = chan;
2668 sc->curband = &sc->sbands[chan->band]; 2670 sc->curband = &sc->sbands[chan->band];
2669 } 2671 }