]> Pileus Git - ~andy/linux/commitdiff
ath9k: stop rx after tx
authorFelix Fietkau <nbd@openwrt.org>
Sun, 20 Jan 2013 17:51:52 +0000 (18:51 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 22 Jan 2013 21:02:15 +0000 (16:02 -0500)
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>
drivers/net/wireless/ath/ath9k/main.c

index 32417fd4bf5a7bba051abf3f40ac246fc6048000..407199ba79db77a96a247cc60b53c107450c9977 100644 (file)
@@ -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) {