Lines Matching refs:bf

303 ath_setup_desc(ath_t *asc, struct ath_buf *bf)  in ath_setup_desc()  argument
307 ds = bf->bf_desc; in ath_setup_desc()
308 ds->ds_link = bf->bf_daddr; in ath_setup_desc()
309 ds->ds_data = bf->bf_dma.cookie.dmac_address; in ath_setup_desc()
311 bf->bf_dma.alength, /* buffer size */ in ath_setup_desc()
315 *asc->asc_rxlink = bf->bf_daddr; in ath_setup_desc()
391 struct ath_buf *bf = *pbf; in ath_buflist_setup() local
396 for (i = 0; i < nbuf; i++, bf++, ds++) { in ath_buflist_setup()
397 bf->bf_desc = ds; in ath_buflist_setup()
398 bf->bf_daddr = asc->asc_desc_dma.cookie.dmac_address + in ath_buflist_setup()
400 list_insert_tail(bflist, bf); in ath_buflist_setup()
405 dmabflags, &bf->bf_dma); in ath_buflist_setup()
409 *pbf = bf; in ath_buflist_setup()
421 struct ath_buf *bf; in ath_buflist_cleanup() local
426 bf = list_head(buflist); in ath_buflist_cleanup()
427 while (bf != NULL) { in ath_buflist_cleanup()
428 if (bf->bf_m != NULL) { in ath_buflist_cleanup()
429 freemsg(bf->bf_m); in ath_buflist_cleanup()
430 bf->bf_m = NULL; in ath_buflist_cleanup()
433 ath_free_dma_mem(&bf->bf_dma); in ath_buflist_cleanup()
434 if (bf->bf_in != NULL) { in ath_buflist_cleanup()
435 ieee80211_free_node(bf->bf_in); in ath_buflist_cleanup()
436 bf->bf_in = NULL; in ath_buflist_cleanup()
438 list_remove(buflist, bf); in ath_buflist_cleanup()
439 bf = list_head(buflist); in ath_buflist_cleanup()
464 struct ath_buf *bf; in ath_desc_alloc() local
483 bf = (struct ath_buf *)kmem_zalloc(asc->asc_vbuflen, KM_SLEEP); in ath_desc_alloc()
484 asc->asc_vbufptr = bf; in ath_desc_alloc()
493 err = ath_buflist_setup(devinfo, asc, &asc->asc_rxbuf_list, &bf, &ds, in ath_desc_alloc()
501 err = ath_buflist_setup(devinfo, asc, &asc->asc_txbuf_list, &bf, &ds, in ath_desc_alloc()
513 ath_printrxbuf(struct ath_buf *bf, int32_t done) in ath_printrxbuf() argument
515 struct ath_desc *ds = bf->bf_desc; in ath_printrxbuf()
516 const struct ath_rx_status *rs = &bf->bf_status.ds_rxstat; in ath_printrxbuf()
520 ds, bf->bf_daddr, in ath_printrxbuf()
531 struct ath_buf *bf; in ath_rx_handler() local
545 bf = list_head(&asc->asc_rxbuf_list); in ath_rx_handler()
546 if (bf == NULL) { in ath_rx_handler()
552 ASSERT(bf->bf_dma.cookie.dmac_address != 0); in ath_rx_handler()
553 ds = bf->bf_desc; in ath_rx_handler()
554 if (ds->ds_link == bf->bf_daddr) { in ath_rx_handler()
563 rs = &bf->bf_status.ds_rxstat; in ath_rx_handler()
565 bf->bf_daddr, in ath_rx_handler()
571 list_remove(&asc->asc_rxbuf_list, bf); in ath_rx_handler()
602 ATH_DMA_SYNC(bf->bf_dma, DDI_DMA_SYNC_FORCPU); in ath_rx_handler()
603 bcopy(bf->bf_dma.mem_va, rx_mp->b_rptr, len); in ath_rx_handler()
618 ath_printrxbuf(bf, status == HAL_OK); in ath_rx_handler()
637 list_insert_tail(&asc->asc_rxbuf_list, bf); in ath_rx_handler()
639 ath_setup_desc(asc, bf); in ath_rx_handler()
647 ath_printtxbuf(struct ath_buf *bf, int done) in ath_printtxbuf() argument
649 struct ath_desc *ds = bf->bf_desc; in ath_printtxbuf()
650 const struct ath_tx_status *ts = &bf->bf_status.ds_txstat; in ath_printtxbuf()
654 ds, bf->bf_daddr, in ath_printtxbuf()
669 ath_tx_start(ath_t *asc, struct ieee80211_node *in, struct ath_buf *bf, in ath_tx_start() argument
735 dest = bf->bf_dma.mem_va; in ath_tx_start()
741 mbslen = (uintptr_t)dest - (uintptr_t)bf->bf_dma.mem_va; in ath_tx_start()
744 bf->bf_in = in; in ath_tx_start()
747 ds = bf->bf_desc; in ath_tx_start()
897 bf->bf_flags = flags; in ath_tx_start()
921 ds->ds_data = bf->bf_dma.cookie.dmac_address; in ath_tx_start()
928 ATH_DMA_SYNC(bf->bf_dma, DDI_DMA_SYNC_FORDEV); in ath_tx_start()
931 list_insert_tail(&txq->axq_list, bf); in ath_tx_start()
933 ATH_HAL_PUTTXBUF(ah, txq->axq_qnum, bf->bf_daddr); in ath_tx_start()
935 *txq->axq_link = bf->bf_daddr; in ath_tx_start()
960 struct ath_buf *bf = NULL; in ath_xmit() local
976 bf = list_head(&asc->asc_txbuf_list); in ath_xmit()
977 if (bf != NULL) in ath_xmit()
978 list_remove(&asc->asc_txbuf_list, bf); in ath_xmit()
985 if (bf == NULL) { in ath_xmit()
1035 error = ath_tx_start(asc, in, bf, mp); in ath_xmit()
1039 if (bf != NULL) { in ath_xmit()
1041 list_insert_tail(&asc->asc_txbuf_list, bf); in ath_xmit()
1100 struct ath_buf *bf; in ath_tx_processq() local
1110 bf = list_head(&txq->axq_list); in ath_tx_processq()
1111 if (bf == NULL) { in ath_tx_processq()
1116 ds = bf->bf_desc; /* last decriptor */ in ath_tx_processq()
1117 ts = &bf->bf_status.ds_txstat; in ath_tx_processq()
1120 ath_printtxbuf(bf, status == HAL_OK); in ath_tx_processq()
1126 list_remove(&txq->axq_list, bf); in ath_tx_processq()
1128 in = bf->bf_in; in ath_tx_processq()
1158 (bf->bf_flags & HAL_TXDESC_NOACK) == 0) { in ath_tx_processq()
1172 bf->bf_in = NULL; in ath_tx_processq()
1174 list_insert_tail(&asc->asc_txbuf_list, bf); in ath_tx_processq()
1221 struct ath_buf *bf; in ath_node_free() local
1229 bf = list_head(&txq->axq_list); in ath_node_free()
1230 while (bf != NULL) { in ath_node_free()
1231 if (bf->bf_in == in) { in ath_node_free()
1232 bf->bf_in = NULL; in ath_node_free()
1234 bf = list_next(&txq->axq_list, bf); in ath_node_free()