diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-09 16:16:52 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-02-06 04:33:43 +0000 |
commit | 8e75bb199071d3c86cd04ecb98b35e5b65d39594 (patch) | |
tree | 04b37b4eb4a696b4ec6bda6b1b4f87e5eab40e5f | |
parent | 04d88fd9a962521d352b67c4ff3a86aa474315b4 (diff) | |
download | lwn-8e75bb199071d3c86cd04ecb98b35e5b65d39594.tar.gz lwn-8e75bb199071d3c86cd04ecb98b35e5b65d39594.zip |
ath9k: do not link receive buffers during flush
commit a3dc48e82bb146ef11cf75676c8410c1df29b0c4 upstream.
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.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 10 |
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 b4cbc82c2c77..d171a7242e4a 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -786,6 +786,7 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc, return NULL; } + list_del(&bf->list); if (!bf->bf_mpdu) return bf; @@ -1966,14 +1967,15 @@ requeue_drop_frag: sc->rx.frag = NULL; } requeue: + list_add_tail(&bf->list, &sc->rx.rxbuf); + if (flush) + continue; + if (edma) { - list_add_tail(&bf->list, &sc->rx.rxbuf); ath_rx_edma_buf_link(sc, qtype); } else { - list_move_tail(&bf->list, &sc->rx.rxbuf); ath_rx_buf_link(sc, bf); - if (!flush) - ath9k_hw_rxena(ah); + ath9k_hw_rxena(ah); } } while (1); |