aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-09 07:20:44 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-09-09 07:20:44 +0000
commitb0c42408191753bb3dbe0f8a7886b07c2df47173 (patch)
tree263e2a3da068e2f4a822fcfca5dafad5d15e0d59
parentaa1ec66431ec1916035d9cc798a5deb59df90f28 (diff)
downloadupstream-b0c42408191753bb3dbe0f8a7886b07c2df47173.tar.gz
upstream-b0c42408191753bb3dbe0f8a7886b07c2df47173.tar.bz2
upstream-b0c42408191753bb3dbe0f8a7886b07c2df47173.zip
ath9k: fix an rx path race condition that might be the cause of the "ath: DMA failed to stop in 10 ms" logspam as well as various connection stability issues
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28202 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/mac80211/patches/586-ath9k_fix_rx_flush.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/mac80211/patches/586-ath9k_fix_rx_flush.patch b/package/mac80211/patches/586-ath9k_fix_rx_flush.patch
new file mode 100644
index 0000000000..1629f5f737
--- /dev/null
+++ b/package/mac80211/patches/586-ath9k_fix_rx_flush.patch
@@ -0,0 +1,34 @@
+--- a/drivers/net/wireless/ath/ath9k/recv.c
++++ b/drivers/net/wireless/ath/ath9k/recv.c
+@@ -1845,7 +1845,7 @@ int ath_rx_tasklet(struct ath_softc *sc,
+ * If we're asked to flush receive queue, directly
+ * chain it back at the queue without processing it.
+ */
+- if (flush)
++ if (sc->sc_flags & SC_OP_RXFLUSH)
+ goto requeue_drop_frag;
+
+ retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
+@@ -1973,7 +1973,8 @@ requeue:
+ } else {
+ list_move_tail(&bf->list, &sc->rx.rxbuf);
+ ath_rx_buf_link(sc, bf);
+- ath9k_hw_rxena(ah);
++ if (!flush)
++ ath9k_hw_rxena(ah);
+ }
+ } while (1);
+
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -246,8 +246,8 @@ static bool ath_prepare_reset(struct ath
+
+ if (!flush) {
+ if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
+- ath_rx_tasklet(sc, 0, true);
+- ath_rx_tasklet(sc, 0, false);
++ ath_rx_tasklet(sc, 1, true);
++ ath_rx_tasklet(sc, 1, false);
+ } else {
+ ath_flushrecv(sc);
+ }