Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19252ecb authored by Nick Kossifidis's avatar Nick Kossifidis Committed by John W. Linville
Browse files

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: default avatarNick Kossifidis <mickflemm@gmail.com>
Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d84938c9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2661,9 +2661,11 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
	synchronize_irq(sc->irq);
	stop_tasklets(sc);

	if (chan) {
	/* We are going to empty hw queues
	 * so we should also free any remaining
	 * tx buffers */
	ath5k_drain_tx_buffs(sc);

	if (chan) {
		sc->curchan = chan;
		sc->curband = &sc->sbands[chan->band];
	}