summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-04-01 20:11:19 +0000
committeradrian <adrian@FreeBSD.org>2013-04-01 20:11:19 +0000
commit883e8bd6090cb5fd70dcea8e32b462d09bcb1901 (patch)
treead9e96724a21a34d4c06538bb99919eb58f9ef35 /sys/dev/ath
parent50c97d79d92898d42c89c511f1d7b5971e269fc6 (diff)
downloadFreeBSD-src-883e8bd6090cb5fd70dcea8e32b462d09bcb1901.zip
FreeBSD-src-883e8bd6090cb5fd70dcea8e32b462d09bcb1901.tar.gz
Only unmap the RX mbuf DMA map if there's a buffer here.
The normal RX path (ath_rx_pkt()) will sync and unmap the buffer before passing it up the stack. We only need to do this if we're flushing the FIFO during reset/shutdown.
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath_rx_edma.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath_rx_edma.c b/sys/dev/ath/if_ath_rx_edma.c
index ec7fa77..7dd6974 100644
--- a/sys/dev/ath/if_ath_rx_edma.c
+++ b/sys/dev/ath/if_ath_rx_edma.c
@@ -680,10 +680,12 @@ ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf)
ATH_RX_LOCK_ASSERT(sc);
- /* We're doing this multiple times? */
- bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
-
+ /*
+ * Only unload the frame if we haven't consumed
+ * the mbuf via ath_rx_pkt().
+ */
if (bf->bf_m) {
+ bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
m_freem(bf->bf_m);
bf->bf_m = NULL;
}
OpenPOWER on IntegriCloud