Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 300f77c

Browse files
Felix FietkauKalle Valo
authored andcommitted
ath9k: fix DMA stop sequence for AR9003+
AR93xx and newer needs to stop rx before tx to avoid getting the DMA engine or MAC into a stuck state. This should reduce/fix the occurence of "Failed to stop Tx DMA" logspam. Cc: [email protected] Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent f2a800f commit 300f77c

File tree

1 file changed

+7
-5
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+7
-5
lines changed

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,13 @@ static bool ath_prepare_reset(struct ath_softc *sc)
216216
ath_stop_ani(sc);
217217
ath9k_hw_disable_interrupts(ah);
218218

219-
if (!ath_drain_all_txq(sc))
220-
ret = false;
221-
222-
if (!ath_stoprecv(sc))
223-
ret = false;
219+
if (AR_SREV_9300_20_OR_LATER(ah)) {
220+
ret &= ath_stoprecv(sc);
221+
ret &= ath_drain_all_txq(sc);
222+
} else {
223+
ret &= ath_drain_all_txq(sc);
224+
ret &= ath_stoprecv(sc);
225+
}
224226

225227
return ret;
226228
}

0 commit comments

Comments
 (0)