Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 051b9191 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville
Browse files

ath9k: fix dma mapping leak of rx buffer upon rmmod



We were claiming DMA buffers on the RX tasklet but never
upon a simple module removal.

Cc: stable@kernel.org
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 14344b81
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -344,9 +344,14 @@ void ath_rx_cleanup(struct ath_softc *sc)

	list_for_each_entry(bf, &sc->rx.rxbuf, list) {
		skb = bf->bf_mpdu;
		if (skb)
		if (skb) {
			dma_unmap_single(sc->dev,
					 bf->bf_buf_addr,
					 sc->rx.bufsize,
					 DMA_FROM_DEVICE);
			dev_kfree_skb(skb);
		}
	}

	if (sc->rx.rxdma.dd_desc_len != 0)
		ath_descdma_cleanup(sc, &sc->rx.rxdma, &sc->rx.rxbuf);