From: Tim Harvey Date: Mon, 21 Apr 2014 23:14:56 +0000 (-0700) Subject: ath9k: fix possible hang on flush X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3a758134e66ca74a9df792616b5288b2fa2cfd7f;p=openwrt%2Fstaging%2Fblogic.git ath9k: fix possible hang on flush If a flush is requested, make sure to clear the descriptor once we've processed it. This resolves a hang that will occur if all RX descriptors are full when a flush is requested. Signed-off-by: Tim Harvey Acked-by: Felix Fietkau Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 6c9accdb52e4..e77a2536b818 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1113,14 +1113,13 @@ requeue_drop_frag: } requeue: list_add_tail(&bf->list, &sc->rx.rxbuf); - if (flush) - continue; if (edma) { ath_rx_edma_buf_link(sc, qtype); } else { ath_rx_buf_relink(sc, bf); - ath9k_hw_rxena(ah); + if (!flush) + ath9k_hw_rxena(ah); } } while (1);