Skip to content

Commit

Permalink
ath9k: fix possible hang on flush
Browse files Browse the repository at this point in the history
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 <tharvey@gateworks.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Tim Harvey authored and John W. Linville committed Apr 22, 2014
1 parent 328e203 commit 3a75813
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,14 +1113,13 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
}
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);

Expand Down

0 comments on commit 3a75813

Please sign in to comment.