Skip to content

Commit

Permalink
ath9k: stop rx after tx
Browse files Browse the repository at this point in the history
Completing frame transmission can fail if the rx engine is stopped
prematurely, as the hw might be waiting for an ACK from the other side.
Shutting down tx before rx might make the DMA shutdown more reliable.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jan 22, 2013
1 parent eee569e commit 0a62acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx, bool flush)
ath9k_debug_samp_bb_mac(sc);
ath9k_hw_disable_interrupts(ah);

if (!ath_stoprecv(sc))
if (!ath_drain_all_txq(sc, retry_tx))
ret = false;

if (!ath_drain_all_txq(sc, retry_tx))
if (!ath_stoprecv(sc))
ret = false;

if (!flush) {
Expand Down

0 comments on commit 0a62acb

Please sign in to comment.