Commit 6a01f0c0 authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by John W. Linville

ath9k: make use of list_for_each_entry_safe

this does the same thing as the previous code
Signed-off-by: default avatarMohammed Shafi Shajakhan <>
Signed-off-by: default avatarJohn W. Linville <>
parent d53c74e5
......@@ -169,22 +169,17 @@ static void ath_rx_addbuffer_edma(struct ath_softc *sc,
enum ath9k_rx_qtype qtype, int size)
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
u32 nbuf = 0;
struct ath_buf *bf, *tbf;
if (list_empty(&sc->rx.rxbuf)) {
ath_dbg(common, QUEUE, "No free rx buf available\n");
while (!list_empty(&sc->rx.rxbuf)) {
list_for_each_entry_safe(bf, tbf, &sc->rx.rxbuf, list)
if (!ath_rx_edma_buf_link(sc, qtype))
if (nbuf >= size)
static void ath_rx_remove_buffer(struct ath_softc *sc,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment