Lines Matching full:bf

246 ath_legacy_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf)  in ath_legacy_rxbuf_init()  argument
255 m = bf->bf_m; in ath_legacy_rxbuf_init()
274 bf->bf_dmamap, m, in ath_legacy_rxbuf_init()
275 bf->bf_segs, &bf->bf_nseg, in ath_legacy_rxbuf_init()
285 KASSERT(bf->bf_nseg == 1, in ath_legacy_rxbuf_init()
286 ("multi-segment packet; nseg %u", bf->bf_nseg)); in ath_legacy_rxbuf_init()
287 bf->bf_m = m; in ath_legacy_rxbuf_init()
289 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREREAD); in ath_legacy_rxbuf_init()
312 ds = bf->bf_desc; in ath_legacy_rxbuf_init()
314 ds->ds_link = bf->bf_daddr; /* link to self */ in ath_legacy_rxbuf_init()
317 ds->ds_data = bf->bf_segs[0].ds_addr; in ath_legacy_rxbuf_init()
324 *sc->sc_rxlink = bf->bf_daddr; in ath_legacy_rxbuf_init()
650 * The mbuf must already be synced, unmapped and removed from bf->bf_m
658 uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, in ath_rx_pkt() argument
842 ath_printrxbuf(sc, bf, 0, status == HAL_OK); in ath_rx_pkt()
1075 struct ath_buf *bf; in ath_rx_proc() local
1119 bf = TAILQ_FIRST(&sc->sc_rxbuf); in ath_rx_proc()
1120 if (sc->sc_rxslink && bf == NULL) { /* NB: shouldn't happen */ in ath_rx_proc()
1123 } else if (bf == NULL) { in ath_rx_proc()
1131 m = bf->bf_m; in ath_rx_proc()
1139 TAILQ_REMOVE(&sc->sc_rxbuf, bf, bf_list); in ath_rx_proc()
1142 ds = bf->bf_desc; in ath_rx_proc()
1143 if (ds->ds_link == bf->bf_daddr) { in ath_rx_proc()
1160 rs = &bf->bf_status.ds_rxstat; in ath_rx_proc()
1162 bf->bf_daddr, PA2DESC(sc, ds->ds_link), rs); in ath_rx_proc()
1165 ath_printrxbuf(sc, bf, 0, status == HAL_OK); in ath_rx_proc()
1177 TAILQ_REMOVE(&sc->sc_rxbuf, bf, bf_list); in ath_rx_proc()
1183 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); in ath_rx_proc()
1184 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); in ath_rx_proc()
1185 bf->bf_m = NULL; in ath_rx_proc()
1186 if (ath_rx_pkt(sc, rs, status, tsf, nf, HAL_RX_QUEUE_HP, bf, m)) in ath_rx_proc()
1207 sc->sc_rxedma[HAL_RX_QUEUE_HP].m_holdbf = bf; in ath_rx_proc()
1261 bf = TAILQ_FIRST(&sc->sc_rxbuf); in ath_rx_proc()
1262 ath_hal_putrxbuf(ah, bf->bf_daddr, HAL_RX_QUEUE_HP); in ath_rx_proc()
1351 struct ath_buf *bf; in ath_legacy_flush_rxholdbf() local
1358 * XXX should just verify that bf->bf_m is NULL, as it must in ath_legacy_flush_rxholdbf()
1361 bf = sc->sc_rxedma[HAL_RX_QUEUE_HP].m_holdbf; in ath_legacy_flush_rxholdbf()
1362 if (bf != NULL) { in ath_legacy_flush_rxholdbf()
1363 if (bf->bf_m != NULL) in ath_legacy_flush_rxholdbf()
1364 m_freem(bf->bf_m); in ath_legacy_flush_rxholdbf()
1365 bf->bf_m = NULL; in ath_legacy_flush_rxholdbf()
1366 TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); in ath_legacy_flush_rxholdbf()
1367 (void) ath_rxbuf_init(sc, bf); in ath_legacy_flush_rxholdbf()
1371 bf = sc->sc_rxedma[HAL_RX_QUEUE_LP].m_holdbf; in ath_legacy_flush_rxholdbf()
1372 if (bf != NULL) { in ath_legacy_flush_rxholdbf()
1373 if (bf->bf_m != NULL) in ath_legacy_flush_rxholdbf()
1374 m_freem(bf->bf_m); in ath_legacy_flush_rxholdbf()
1375 bf->bf_m = NULL; in ath_legacy_flush_rxholdbf()
1376 TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); in ath_legacy_flush_rxholdbf()
1377 (void) ath_rxbuf_init(sc, bf); in ath_legacy_flush_rxholdbf()
1410 struct ath_buf *bf; in ath_legacy_stoprecv() local
1419 TAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { in ath_legacy_stoprecv()
1420 struct ath_desc *ds = bf->bf_desc; in ath_legacy_stoprecv()
1421 struct ath_rx_status *rs = &bf->bf_status.ds_rxstat; in ath_legacy_stoprecv()
1423 bf->bf_daddr, PA2DESC(sc, ds->ds_link), rs); in ath_legacy_stoprecv()
1425 ath_printrxbuf(sc, bf, ix, status == HAL_OK); in ath_legacy_stoprecv()
1453 struct ath_buf *bf; in ath_legacy_startrecv() local
1467 TAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { in ath_legacy_startrecv()
1468 int error = ath_rxbuf_init(sc, bf); in ath_legacy_startrecv()
1477 bf = TAILQ_FIRST(&sc->sc_rxbuf); in ath_legacy_startrecv()
1478 ath_hal_putrxbuf(ah, bf->bf_daddr, HAL_RX_QUEUE_HP); in ath_legacy_startrecv()