Lines Matching refs:txq

188 static int	ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq,
266 * include them when checking the txq setup mask.
1743 * may be being scheduled between sw->hw txq. Tsk.
2203 * Grab all the currently set bits in the HAL txq bitmap
3831 ath_txq_init(struct ath_softc *sc, struct ath_txq *txq, int qnum)
3833 txq->axq_qnum = qnum;
3834 txq->axq_ac = 0;
3835 txq->axq_depth = 0;
3836 txq->axq_aggr_depth = 0;
3837 txq->axq_intrcnt = 0;
3838 txq->axq_link = NULL;
3839 txq->axq_softc = sc;
3840 TAILQ_INIT(&txq->axq_q);
3841 TAILQ_INIT(&txq->axq_tidq);
3842 TAILQ_INIT(&txq->fifo.axq_q);
3843 ATH_TXQ_LOCK_INIT(sc, txq);
3914 struct ath_txq *txq;
3921 txq = ath_txq_setup(sc, HAL_TX_QUEUE_DATA, haltype);
3922 if (txq != NULL) {
3923 txq->axq_ac = ac;
3924 sc->sc_ac2q[ac] = txq;
3938 struct ath_txq *txq = sc->sc_ac2q[ac];
3943 ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi);
3989 __func__, txq->axq_qnum, qi.tqi_qflags,
3992 if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) {
3997 ath_hal_resettxqueue(ah, txq->axq_qnum); /* push to h/w */
4021 ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
4024 ath_hal_releasetxqueue(sc->sc_ah, txq->axq_qnum);
4025 sc->sc_txqsetup &= ~(1<<txq->axq_qnum);
4026 ATH_TXQ_LOCK_DESTROY(txq);
4206 ath_tx_process_buf_completion(struct ath_softc *sc, struct ath_txq *txq,
4212 ATH_TXQ_UNLOCK_ASSERT(txq);
4253 ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched)
4267 __func__, txq->axq_qnum,
4268 (caddr_t)(uintptr_t) ath_hal_gettxbuf(sc->sc_ah, txq->axq_qnum),
4269 txq->axq_link);
4272 "ath_tx_processq: txq=%u head %p link %p depth %p",
4273 txq->axq_qnum,
4274 (caddr_t)(uintptr_t) ath_hal_gettxbuf(sc->sc_ah, txq->axq_qnum),
4275 txq->axq_link,
4276 txq->axq_depth);
4280 ATH_TXQ_LOCK(txq);
4281 txq->axq_intrcnt = 0; /* reset periodic desc intr count */
4282 bf = TAILQ_FIRST(&txq->axq_q);
4284 ATH_TXQ_UNLOCK(txq);
4293 ath_printtxbuf(sc, bf, txq->axq_qnum, 0,
4296 ath_printtxbuf(sc, bf, txq->axq_qnum, 0,
4310 "ath_tx_processq: txq=%u, bf=%p ds=%p, HAL_EINPROGRESS",
4311 txq->axq_qnum, bf, ds);
4312 ATH_TXQ_UNLOCK(txq);
4315 ATH_TXQ_REMOVE(txq, bf, bf_list);
4320 if (txq->axq_qnum != bf->bf_state.bfs_tx_queue) {
4324 txq->axq_qnum,
4328 if (txq->axq_qnum != bf->bf_last->bf_state.bfs_tx_queue) {
4332 txq->axq_qnum,
4338 if (txq->axq_depth > 0) {
4350 txq->axq_link = NULL;
4355 txq->axq_aggr_depth--;
4360 "ath_tx_processq: txq=%u, bf=%p, ds=%p, ni=%p, ts_status=0x%08x",
4361 txq->axq_qnum, bf, ds, ni, ts->ts_status);
4374 ATH_TXQ_UNLOCK(txq);
4379 ath_tx_process_buf_completion(sc, txq, ts, bf);
4387 if (txq->axq_depth <= 1)
4388 ieee80211_ff_flush(ic, txq->axq_ac);
4394 ath_txq_sched(sc, txq);
4399 "ath_tx_processq: txq=%u: done",
4400 txq->axq_qnum);
4646 ath_txq_freeholdingbuf(struct ath_softc *sc, struct ath_txq *txq)
4649 ATH_TXQ_LOCK_ASSERT(txq);
4651 if (txq->axq_holdingbf == NULL)
4654 txq->axq_holdingbf->bf_flags &= ~ATH_BUF_BUSY;
4657 ath_returnbuf_tail(sc, txq->axq_holdingbf);
4660 txq->axq_holdingbf = NULL;
4670 struct ath_txq *txq;
4672 txq = &sc->sc_txq[bf->bf_state.bfs_tx_queue];
4675 ATH_TXQ_LOCK_ASSERT(txq);
4689 ath_txq_freeholdingbuf(sc, txq);
4690 txq->axq_holdingbf = bf;
4707 * always completed there (pushed onto a txq or ath_bufhead) so we knew
4713 struct ath_txq *txq;
4715 txq = &sc->sc_txq[bf->bf_state.bfs_tx_queue];
4724 ATH_TXQ_LOCK(txq);
4726 ATH_TXQ_UNLOCK(txq);
4772 ath_tx_draintxq_get_one(struct ath_softc *sc, struct ath_txq *txq)
4776 ATH_TXQ_LOCK_ASSERT(txq);
4782 bf = TAILQ_FIRST(&txq->fifo.axq_q);
4789 if (txq->axq_fifo_depth == 0) {
4793 txq->axq_qnum,
4794 txq->fifo.axq_depth);
4796 txq->axq_fifo_depth--;
4798 ATH_TXQ_REMOVE(&txq->fifo, bf, bf_list);
4805 if (txq->axq_fifo_depth != 0 || txq->fifo.axq_depth != 0) {
4809 txq->axq_qnum,
4810 txq->axq_fifo_depth,
4811 txq->fifo.axq_depth);
4817 bf = TAILQ_FIRST(&txq->axq_q);
4819 txq->axq_link = NULL;
4822 ATH_TXQ_REMOVE(txq, bf, bf_list);
4827 ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
4840 ATH_TXQ_LOCK(txq);
4841 bf = ath_tx_draintxq_get_one(sc, txq);
4843 ATH_TXQ_UNLOCK(txq);
4847 txq->axq_aggr_depth--;
4864 ath_printtxbuf(sc, bf, txq->axq_qnum, ix, status);
4878 ATH_TXQ_UNLOCK(txq);
4889 ATH_TXQ_LOCK(txq);
4890 ath_txq_freeholdingbuf(sc, txq);
4891 ATH_TXQ_UNLOCK(txq);
4897 ath_tx_txq_drain(sc, txq);
4901 ath_tx_stopdma(struct ath_softc *sc, struct ath_txq *txq)
4905 ATH_TXQ_LOCK_ASSERT(txq);
4911 txq->axq_qnum,
4912 (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum),
4913 (int) (!! ath_hal_txqenabled(ah, txq->axq_qnum)),
4914 (int) ath_hal_numtxpending(ah, txq->axq_qnum),
4915 txq->axq_flags,
4916 txq->axq_link,
4917 txq->axq_holdingbf);
4919 (void) ath_hal_stoptxdma(ah, txq->axq_qnum);
4921 txq->axq_flags &= ~ATH_TXQ_PUTRUNNING;
4925 && (txq->axq_holdingbf != NULL)) {
4926 ath_printtxbuf(sc, txq->axq_holdingbf, txq->axq_qnum, 0, 0);
4966 ath_tx_dump(struct ath_softc *sc, struct ath_txq *txq)
4976 __func__, txq->axq_qnum);
4977 TAILQ_FOREACH(bf, &txq->axq_q, bf_list) {
4978 ath_printtxbuf(sc, bf, txq->axq_qnum, i,
4984 __func__, txq->axq_qnum);
6196 struct ath_txq *txq = sc->sc_ac2q[i];
6199 txq->axq_qnum, ieee80211_wme_acnames[i]);