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