mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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.
This commit is contained in:
parent
9f4c7ba460
commit
80b87f1814
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue