Lines Matching defs:txq
188 static int ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq,
267 * include them when checking the txq setup mask.
1827 * may be being scheduled between sw->hw txq. Tsk.
2288 * Grab all the currently set bits in the HAL txq bitmap
3987 ath_txq_init(struct ath_softc *sc, struct ath_txq *txq, int qnum)
3989 txq->axq_qnum = qnum;
3990 txq->axq_ac = 0;
3991 txq->axq_depth = 0;
3992 txq->axq_aggr_depth = 0;
3993 txq->axq_intrcnt = 0;
3994 txq->axq_link = NULL;
3995 txq->axq_softc = sc;
3996 TAILQ_INIT(&txq->axq_q);
3997 TAILQ_INIT(&txq->axq_tidq);
3998 TAILQ_INIT(&txq->fifo.axq_q);
3999 ATH_TXQ_LOCK_INIT(sc, txq);
4070 struct ath_txq *txq;
4077 txq = ath_txq_setup(sc, HAL_TX_QUEUE_DATA, haltype);
4078 if (txq != NULL) {
4079 txq->axq_ac = ac;
4080 sc->sc_ac2q[ac] = txq;
4094 struct ath_txq *txq = sc->sc_ac2q[ac];
4103 ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi);
4149 __func__, txq->axq_qnum, qi.tqi_qflags,
4152 if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) {
4157 ath_hal_resettxqueue(ah, txq->axq_qnum); /* push to h/w */
4181 ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
4184 ath_hal_releasetxqueue(sc->sc_ah, txq->axq_qnum);
4185 sc->sc_txqsetup &= ~(1<<txq->axq_qnum);
4186 ATH_TXQ_LOCK_DESTROY(txq);
4381 ath_tx_process_buf_completion(struct ath_softc *sc, struct ath_txq *txq,
4387 ATH_TXQ_UNLOCK_ASSERT(txq);
4431 ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched)
4445 __func__, txq->axq_qnum,
4446 (caddr_t)(uintptr_t) ath_hal_gettxbuf(sc->sc_ah, txq->axq_qnum),
4447 txq->axq_link);
4450 "ath_tx_processq: txq=%u head %p link %p depth %p",
4451 txq->axq_qnum,
4452 (caddr_t)(uintptr_t) ath_hal_gettxbuf(sc->sc_ah, txq->axq_qnum),
4453 txq->axq_link,
4454 txq->axq_depth);
4458 ATH_TXQ_LOCK(txq);
4459 txq->axq_intrcnt = 0; /* reset periodic desc intr count */
4460 bf = TAILQ_FIRST(&txq->axq_q);
4462 ATH_TXQ_UNLOCK(txq);
4471 ath_printtxbuf(sc, bf, txq->axq_qnum, 0,
4474 ath_printtxbuf(sc, bf, txq->axq_qnum, 0,
4488 "ath_tx_processq: txq=%u, bf=%p ds=%p, HAL_EINPROGRESS",
4489 txq->axq_qnum, bf, ds);
4490 ATH_TXQ_UNLOCK(txq);
4493 ATH_TXQ_REMOVE(txq, bf, bf_list);
4498 if (txq->axq_qnum != bf->bf_state.bfs_tx_queue) {
4502 txq->axq_qnum,
4506 if (txq->axq_qnum != bf->bf_last->bf_state.bfs_tx_queue) {
4510 txq->axq_qnum,
4516 if (txq->axq_depth > 0) {
4528 txq->axq_link = NULL;
4533 txq->axq_aggr_depth--;
4538 "ath_tx_processq: txq=%u, bf=%p, ds=%p, ni=%p, ts_status=0x%08x",
4539 txq->axq_qnum, bf, ds, ni, ts->ts_status);
4554 ATH_TXQ_UNLOCK(txq);
4559 ath_tx_process_buf_completion(sc, txq, ts, bf);
4567 if (txq->axq_depth <= 1)
4568 ieee80211_ff_flush(ic, txq->axq_ac);
4574 ath_txq_sched(sc, txq);
4579 "ath_tx_processq: txq=%u: done",
4580 txq->axq_qnum);
4826 ath_txq_freeholdingbuf(struct ath_softc *sc, struct ath_txq *txq)
4829 ATH_TXQ_LOCK_ASSERT(txq);
4831 if (txq->axq_holdingbf == NULL)
4834 txq->axq_holdingbf->bf_flags &= ~ATH_BUF_BUSY;
4837 ath_returnbuf_tail(sc, txq->axq_holdingbf);
4840 txq->axq_holdingbf = NULL;
4850 struct ath_txq *txq;
4852 txq = &sc->sc_txq[bf->bf_state.bfs_tx_queue];
4855 ATH_TXQ_LOCK_ASSERT(txq);
4869 ath_txq_freeholdingbuf(sc, txq);
4870 txq->axq_holdingbf = bf;
4887 * always completed there (pushed onto a txq or ath_bufhead) so we knew
4893 struct ath_txq *txq;
4895 txq = &sc->sc_txq[bf->bf_state.bfs_tx_queue];
4904 ATH_TXQ_LOCK(txq);
4906 ATH_TXQ_UNLOCK(txq);
4952 ath_tx_draintxq_get_one(struct ath_softc *sc, struct ath_txq *txq)
4956 ATH_TXQ_LOCK_ASSERT(txq);
4962 bf = TAILQ_FIRST(&txq->fifo.axq_q);
4969 if (txq->axq_fifo_depth == 0) {
4973 txq->axq_qnum,
4974 txq->fifo.axq_depth);
4976 txq->axq_fifo_depth--;
4978 ATH_TXQ_REMOVE(&txq->fifo, bf, bf_list);
4985 if (txq->axq_fifo_depth != 0 || txq->fifo.axq_depth != 0) {
4989 txq->axq_qnum,
4990 txq->axq_fifo_depth,
4991 txq->fifo.axq_depth);
4997 bf = TAILQ_FIRST(&txq->axq_q);
4999 txq->axq_link = NULL;
5002 ATH_TXQ_REMOVE(txq, bf, bf_list);
5007 ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
5020 ATH_TXQ_LOCK(txq);
5021 bf = ath_tx_draintxq_get_one(sc, txq);
5023 ATH_TXQ_UNLOCK(txq);
5027 txq->axq_aggr_depth--;
5044 ath_printtxbuf(sc, bf, txq->axq_qnum, ix, status);
5058 ATH_TXQ_UNLOCK(txq);
5069 ATH_TXQ_LOCK(txq);
5070 ath_txq_freeholdingbuf(sc, txq);
5071 ATH_TXQ_UNLOCK(txq);
5077 ath_tx_txq_drain(sc, txq);
5081 ath_tx_stopdma(struct ath_softc *sc, struct ath_txq *txq)
5085 ATH_TXQ_LOCK_ASSERT(txq);
5091 txq->axq_qnum,
5092 (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum),
5093 (int) (!! ath_hal_txqenabled(ah, txq->axq_qnum)),
5094 (int) ath_hal_numtxpending(ah, txq->axq_qnum),
5095 txq->axq_flags,
5096 txq->axq_link,
5097 txq->axq_holdingbf);
5099 (void) ath_hal_stoptxdma(ah, txq->axq_qnum);
5101 txq->axq_flags &= ~ATH_TXQ_PUTRUNNING;
5105 && (txq->axq_holdingbf != NULL)) {
5106 ath_printtxbuf(sc, txq->axq_holdingbf, txq->axq_qnum, 0, 0);
5146 ath_tx_dump(struct ath_softc *sc, struct ath_txq *txq)
5156 __func__, txq->axq_qnum);
5157 TAILQ_FOREACH(bf, &txq->axq_q, bf_list) {
5158 ath_printtxbuf(sc, bf, txq->axq_qnum, i,
5164 __func__, txq->axq_qnum);
6652 struct ath_txq *txq = sc->sc_ac2q[i];
6655 txq->axq_qnum, ieee80211_wme_acnames[i]);