aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-09 10:16:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-11 14:12:01 -0500
commita3dc48e82bb146ef11cf75676c8410c1df29b0c4 (patch)
tree8974868bb4a4edbbc9dd6266e68796306fe3cc7f
parent0981c3b24ef664f5611008a6e6d0622fac6d892b (diff)
ath9k: do not link receive buffers during flush
On AR9300 the rx FIFO needs to be empty during reset to ensure that no further DMA activity is generated, otherwise it might lead to memory corruption issues. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index d4df98a938bf..01c3ba47a5b9 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -744,6 +744,7 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc,
744 return NULL; 744 return NULL;
745 } 745 }
746 746
747 list_del(&bf->list);
747 if (!bf->bf_mpdu) 748 if (!bf->bf_mpdu)
748 return bf; 749 return bf;
749 750
@@ -1254,14 +1255,15 @@ requeue_drop_frag:
1254 sc->rx.frag = NULL; 1255 sc->rx.frag = NULL;
1255 } 1256 }
1256requeue: 1257requeue:
1258 list_add_tail(&bf->list, &sc->rx.rxbuf);
1259 if (flush)
1260 continue;
1261
1257 if (edma) { 1262 if (edma) {
1258 list_add_tail(&bf->list, &sc->rx.rxbuf);
1259 ath_rx_edma_buf_link(sc, qtype); 1263 ath_rx_edma_buf_link(sc, qtype);
1260 } else { 1264 } else {
1261 list_move_tail(&bf->list, &sc->rx.rxbuf);
1262 ath_rx_buf_link(sc, bf); 1265 ath_rx_buf_link(sc, bf);
1263 if (!flush) 1266 ath9k_hw_rxena(ah);
1264 ath9k_hw_rxena(ah);
1265 } 1267 }
1266 } while (1); 1268 } while (1);
1267 1269