Lines Matching refs:txq

97 static void arn_tx_send_ht_normal(struct arn_softc *sc, struct ath_txq *txq,
101 static void arn_tx_txqaddbuf(struct arn_softc *sc, struct ath_txq *txq,
148 arn_tx_queue_tid(struct ath_txq *txq, struct ath_atx_tid *tid) in arn_tx_queue_tid() argument
168 list_insert_tail(&txq->axq_acq, &ac->list); in arn_tx_queue_tid()
175 struct ath_txq *txq = &sc->sc_txq[tid->ac->qnum]; in arn_tx_pause_tid() local
177 mutex_enter(&txq->axq_lock); in arn_tx_pause_tid()
181 mutex_exit(&txq->axq_lock); in arn_tx_pause_tid()
188 struct ath_txq *txq = &sc->sc_txq[tid->ac->qnum]; in arn_tx_resume_tid() local
191 mutex_enter(&txq->axq_lock); in arn_tx_resume_tid()
204 arn_tx_queue_tid(txq, tid); in arn_tx_resume_tid()
205 arn_txq_schedule(sc, txq); in arn_tx_resume_tid()
207 mutex_exit(&txq->axq_lock); in arn_tx_resume_tid()
214 struct ath_txq *txq = &sc->sc_txq[tid->ac->qnum]; in arn_tx_flush_tid() local
222 mutex_enter(&txq->axq_lock); in arn_tx_flush_tid()
227 mutex_exit(&txq->axq_lock); in arn_tx_flush_tid()
236 arn_tx_send_ht_normal(sc, txq, tid, &list); in arn_tx_flush_tid()
239 mutex_exit(&txq->axq_lock); in arn_tx_flush_tid()
290 struct ath_txq *txq, in arn_tid_drain() argument
310 mutex_enter(&txq->axq_lock); in arn_tid_drain()
312 mutex_exit(&txq->axq_lock); in arn_tid_drain()
354 arn_tx_complete_aggr(struct arn_softc *sc, struct ath_txq *txq, in arn_tx_complete_aggr() argument
448 mutex_enter(&txq->axq_lock); in arn_tx_complete_aggr()
450 mutex_exit(&txq->axq_lock); in arn_tx_complete_aggr()
511 mutex_enter(&txq->axq_lock); in arn_tx_complete_aggr()
513 arn_tx_queue_tid(txq, tid); in arn_tx_complete_aggr()
514 mutex_exit(&txq->axq_lock); in arn_tx_complete_aggr()
721 arn_tx_sched_aggr(struct arn_softc *sc, struct ath_txq *txq, in arn_tx_sched_aggr() argument
753 arn_tx_txqaddbuf(sc, txq, &bf_q); in arn_tx_sched_aggr()
765 txq->axq_aggr_depth++; in arn_tx_sched_aggr()
766 arn_tx_txqaddbuf(sc, txq, &bf_q); in arn_tx_sched_aggr()
768 } while (txq->axq_depth < ATH_AGGR_MIN_QDEPTH && in arn_tx_sched_aggr()
796 struct ath_txq *txq = &sc->sc_txq[txtid->ac->qnum]; in arn_tx_aggr_stop() local
814 mutex_enter(&txq->axq_lock); in arn_tx_aggr_stop()
831 mutex_exit(&txq->axq_lock); in arn_tx_aggr_stop()
887 arn_txq_drain_pending_buffers(struct arn_softc *sc, struct ath_txq *txq) in arn_txq_drain_pending_buffers() argument
892 list_for_each_entry_safe(ac, ac_tmp, &txq->axq_acq) { in arn_txq_drain_pending_buffers()
893 list_remove(&txq->axq_acq, ac); in arn_txq_drain_pending_buffers()
898 arn_tid_drain(sc, txq, tid); in arn_txq_drain_pending_buffers()
935 struct ath_txq *txq = NULL; in arn_test_get_txq() local
977 txq = &sc->sc_txq[qnum]; in arn_test_get_txq()
979 mutex_enter(&txq->axq_lock); in arn_test_get_txq()
981 if (txq->axq_depth >= (ATH_TXBUF - 20)) { in arn_test_get_txq()
984 qnum, txq->axq_depth)); in arn_test_get_txq()
987 txq->stopped = 1; in arn_test_get_txq()
988 mutex_exit(&txq->axq_lock); in arn_test_get_txq()
992 mutex_exit(&txq->axq_lock); in arn_test_get_txq()
994 return (txq); in arn_test_get_txq()
1085 struct ath_txq *txq, in arn_tx_send_ht_normal() argument
1100 arn_tx_txqaddbuf(sc, txq, list); in arn_tx_send_ht_normal()
1109 struct ath_txq *txq, in arn_tx_txqaddbuf() argument
1124 list_splice_tail_init(list, &txq->axq_q); in arn_tx_txqaddbuf()
1126 txq->axq_depth++; in arn_tx_txqaddbuf()
1127 txq->axq_totalqueued++; in arn_tx_txqaddbuf()
1128 txq->axq_linkbuf = list_object(list, txq->axq_q.prev); in arn_tx_txqaddbuf()
1131 "qnum: %d, txq depth: %d\n", txq->axq_qnum, txq->axq_depth)); in arn_tx_txqaddbuf()
1133 if (txq->axq_link == NULL) { in arn_tx_txqaddbuf()
1134 ath9k_hw_puttxbuf(sc->sc_ah, txq->axq_qnum, bf->bf_daddr); in arn_tx_txqaddbuf()
1137 txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc)); in arn_tx_txqaddbuf()
1139 *txq->axq_link = bf->bf_daddr; in arn_tx_txqaddbuf()
1141 txq->axq_qnum, txq->axq_link, in arn_tx_txqaddbuf()
1144 txq->axq_link = &(bf->bf_lastbf->bf_desc->ds_link); in arn_tx_txqaddbuf()
1145 ath9k_hw_txstart(sc->sc_ah, txq->axq_qnum); in arn_tx_txqaddbuf()
1483 arn_tx_stopdma(struct arn_softc *sc, struct ath_txq *txq) in arn_tx_stopdma() argument
1487 (void) ath9k_hw_stoptxdma(ah, txq->axq_qnum); in arn_tx_stopdma()
1491 txq->axq_qnum, in arn_tx_stopdma()
1492 ath9k_hw_gettxbuf(ah, txq->axq_qnum), txq->axq_link)); in arn_tx_stopdma()
1591 struct ath_txq *txq = &sc->sc_txq[qnum]; in arn_txq_setup() local
1593 txq->axq_qnum = qnum; in arn_txq_setup()
1594 txq->axq_intrcnt = 0; /* legacy */ in arn_txq_setup()
1595 txq->axq_link = NULL; in arn_txq_setup()
1597 list_create(&txq->axq_list, sizeof (struct ath_buf), in arn_txq_setup()
1599 list_create(&txq->axq_acq, sizeof (struct ath_buf), in arn_txq_setup()
1601 mutex_init(&txq->axq_lock, NULL, MUTEX_DRIVER, NULL); in arn_txq_setup()
1603 txq->axq_depth = 0; in arn_txq_setup()
1604 txq->axq_aggr_depth = 0; in arn_txq_setup()
1605 txq->axq_totalqueued = 0; in arn_txq_setup()
1606 txq->axq_linkbuf = NULL; in arn_txq_setup()
1615 arn_tx_cleanupq(struct arn_softc *sc, struct ath_txq *txq) in arn_tx_cleanupq() argument
1617 (void) ath9k_hw_releasetxqueue(sc->sc_ah, txq->axq_qnum); in arn_tx_cleanupq()
1618 sc->sc_txqsetup &= ~(1<<txq->axq_qnum); in arn_tx_cleanupq()
1634 struct ath_txq *txq; in arn_tx_setup() local
1642 txq = arn_txq_setup(sc, ATH9K_TX_QUEUE_DATA, haltype); in arn_tx_setup()
1643 if (txq != NULL) { in arn_tx_setup()
1644 sc->sc_haltype2q[haltype] = txq->axq_qnum; in arn_tx_setup()
1651 arn_tx_draintxq(struct arn_softc *sc, struct ath_txq *txq) in arn_tx_draintxq() argument
1659 mutex_enter(&txq->axq_lock); in arn_tx_draintxq()
1660 bf = list_head(&txq->axq_list); in arn_tx_draintxq()
1662 txq->axq_link = NULL; in arn_tx_draintxq()
1663 mutex_exit(&txq->axq_lock); in arn_tx_draintxq()
1666 list_remove(&txq->axq_list, bf); in arn_tx_draintxq()
1667 mutex_exit(&txq->axq_lock); in arn_tx_draintxq()
1864 struct ath_txq *txq; in arn_tx_start() local
1967 txq = &sc->sc_txq[arn_get_hal_qnum(WME_AC_VO, sc)]; in arn_tx_start()
1974 txq = &sc->sc_txq[arn_get_hal_qnum(WME_AC_VO, sc)]; in arn_tx_start()
1982 txq = &sc->sc_txq[arn_get_hal_qnum(WME_AC_BE, sc)]; in arn_tx_start()
2011 txq->axq_qnum, shortPreamble, *(uint16_t *)wh->i_dur)); in arn_tx_start()
2024 mutex_enter(&txq->axq_lock); in arn_tx_start()
2025 list_insert_tail(&txq->axq_list, bf); in arn_tx_start()
2026 if (txq->axq_link == NULL) { in arn_tx_start()
2027 (void) ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); in arn_tx_start()
2029 *txq->axq_link = bf->bf_daddr; in arn_tx_start()
2031 txq->axq_link = &ds->ds_link; in arn_tx_start()
2032 mutex_exit(&txq->axq_lock); in arn_tx_start()
2036 (void) ath9k_hw_txstart(ah, txq->axq_qnum); in arn_tx_start()
2185 arn_tx_processq(struct arn_softc *sc, struct ath_txq *txq) in arn_tx_processq() argument
2199 mutex_enter(&txq->axq_lock); in arn_tx_processq()
2200 bf = list_head(&txq->axq_list); in arn_tx_processq()
2202 txq->axq_link = NULL; in arn_tx_processq()
2204 mutex_exit(&txq->axq_lock); in arn_tx_processq()
2216 mutex_exit(&txq->axq_lock); in arn_tx_processq()
2219 list_remove(&txq->axq_list, bf); in arn_tx_processq()
2220 mutex_exit(&txq->axq_lock); in arn_tx_processq()
2395 struct ath_txq *txq; in arn_tx_node_cleanup() local
2400 txq = &sc->sc_txq[i]; in arn_tx_node_cleanup()
2402 mutex_enter(&txq->axq_lock); in arn_tx_node_cleanup()
2404 list_for_each_entry_safe(ac, ac_tmp, &txq->axq_acq) { in arn_tx_node_cleanup()
2408 list_remove(&txq->axq_acq, ac); in arn_tx_node_cleanup()
2419 bf = list_next(&txq->axq_list, bf); in arn_tx_node_cleanup()
2421 arn_tid_drain(sc, txq, tid); in arn_tx_node_cleanup()
2428 mutex_exit(&txq->axq_lock); in arn_tx_node_cleanup()