Lines Matching refs:txq

979 		struct mwl_txq *txq = &sc->sc_txq[i];
980 sc->sc_hwdma.wcbBase[i] = txq->dma.dd_desc_paddr;
1269 mwl_gettxbuf(struct mwl_softc *sc, struct mwl_txq *txq)
1276 MWL_TXQ_LOCK(txq);
1277 bf = STAILQ_FIRST(&txq->free);
1279 STAILQ_REMOVE_HEAD(&txq->free, bf_list);
1280 txq->nfree--;
1282 MWL_TXQ_UNLOCK(txq);
1285 "%s: out of xmit buffers on q %d\n", __func__, txq->qnum);
1296 mwl_puttxbuf_head(struct mwl_txq *txq, struct mwl_txbuf *bf)
1300 MWL_TXQ_LOCK(txq);
1301 STAILQ_INSERT_HEAD(&txq->free, bf, bf_list);
1302 txq->nfree++;
1303 MWL_TXQ_UNLOCK(txq);
1307 mwl_puttxbuf_tail(struct mwl_txq *txq, struct mwl_txbuf *bf)
1311 MWL_TXQ_LOCK(txq);
1312 STAILQ_INSERT_TAIL(&txq->free, bf, bf_list);
1313 txq->nfree++;
1314 MWL_TXQ_UNLOCK(txq);
1344 struct mwl_txq *txq = NULL; /* XXX silence gcc */
1362 txq = sc->sc_ac2q[M_WME_GETAC(m)];
1363 bf = mwl_gettxbuf(sc, txq);
1372 "%s: tail drop on q %d\n", __func__, txq->qnum);
1384 mwl_puttxbuf_head(txq, bf);
1423 struct mwl_txq *txq;
1437 txq = sc->sc_ac2q[M_WME_GETAC(m)];
1438 bf = mwl_gettxbuf(sc, txq);
1448 mwl_puttxbuf_head(txq, bf);
2011 mwl_txq_reset(struct mwl_softc *sc, struct mwl_txq *txq)
2016 bf = txq->dma.dd_bufptr;
2017 STAILQ_INIT(&txq->free);
2019 STAILQ_INSERT_TAIL(&txq->free, bf, bf_list);
2020 txq->nfree = i;
2027 mwl_txdma_setup(struct mwl_softc *sc, struct mwl_txq *txq)
2033 error = mwl_desc_setup(sc, "tx", &txq->dma,
2047 txq->dma.dd_bufptr = bf;
2049 ds = txq->dma.dd_desc;
2052 bf->bf_daddr = DS2PHYS(&txq->dma, ds);
2061 mwl_txq_reset(sc, txq);
2066 mwl_txdma_cleanup(struct mwl_softc *sc, struct mwl_txq *txq)
2071 bf = txq->dma.dd_bufptr;
2078 STAILQ_INIT(&txq->free);
2079 txq->nfree = 0;
2080 if (txq->dma.dd_bufptr != NULL) {
2081 free(txq->dma.dd_bufptr, M_MWLDEV);
2082 txq->dma.dd_bufptr = NULL;
2084 if (txq->dma.dd_desc_len != 0)
2085 mwl_desc_cleanup(sc, &txq->dma);
2830 mwl_txq_init(struct mwl_softc *sc, struct mwl_txq *txq, int qnum)
2835 MWL_TXQ_LOCK_INIT(sc, txq);
2836 txq->qnum = qnum;
2837 txq->txpri = 0; /* XXX */
2840 STAILQ_INIT(&txq->free);
2842 STAILQ_FOREACH(bf, &txq->free, bf_list) {
2843 bf->bf_txq = txq;
2848 bn = STAILQ_FIRST(&txq->free);
2851 STAILQ_INIT(&txq->active);
2862 struct mwl_txq *txq;
2874 txq = &sc->sc_txq[mvtype];
2875 mwl_txq_init(sc, txq, mvtype);
2876 sc->sc_ac2q[ac] = txq;
2889 struct mwl_txq *txq = sc->sc_ac2q[ac];
2903 if (mwl_hal_setedcaparams(mh, txq->qnum, cwmin, cwmax, aifs, txoplim)) {
2931 mwl_tx_cleanupq(struct mwl_softc *sc, struct mwl_txq *txq)
2934 MWL_TXQ_LOCK_DESTROY(txq);
3080 struct mwl_txq *txq;
3207 txq = bf->bf_txq;
3265 ds->TxPriority = txq->qnum;
3268 ds->TxPriority = mn->mn_ba[3].txq;
3272 ds->TxPriority = mn->mn_ba[2].txq;
3276 ds->TxPriority = mn->mn_ba[1].txq;
3280 ds->TxPriority = mn->mn_ba[0].txq;
3283 ds->TxPriority = txq->qnum;
3285 ds->TxPriority = txq->qnum;
3300 MWL_TXQ_LOCK(txq);
3302 STAILQ_INSERT_TAIL(&txq->active, bf, bf_list);
3303 MWL_TXDESC_SYNC(txq, ds, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
3306 MWL_TXQ_UNLOCK(txq);
3323 mwl_tx_processq(struct mwl_softc *sc, struct mwl_txq *txq)
3335 DPRINTF(sc, MWL_DEBUG_TX_PROC, "%s: tx queue %u\n", __func__, txq->qnum);
3337 MWL_TXQ_LOCK(txq);
3338 bf = STAILQ_FIRST(&txq->active);
3340 MWL_TXQ_UNLOCK(txq);
3344 MWL_TXDESC_SYNC(txq, ds,
3347 MWL_TXQ_UNLOCK(txq);
3350 STAILQ_REMOVE_HEAD(&txq->active, bf_list);
3351 MWL_TXQ_UNLOCK(txq);
3355 mwl_printtxbuf(bf, txq->qnum, nreaped);
3371 if (txq->qnum >= MWL_WME_AC_VO)
3404 mwl_puttxbuf_tail(txq, bf);
3444 mwl_tx_draintxq(struct mwl_softc *sc, struct mwl_txq *txq)
3455 MWL_TXQ_LOCK(txq);
3456 bf = STAILQ_FIRST(&txq->active);
3458 MWL_TXQ_UNLOCK(txq);
3461 STAILQ_REMOVE_HEAD(&txq->active, bf_list);
3462 MWL_TXQ_UNLOCK(txq);
3468 mwl_printtxbuf(bf, txq->qnum, ix);
3483 mwl_puttxbuf_tail(txq, bf);
3524 struct mwl_txq *txq;
3529 txq = &sc->sc_txq[i];
3530 MWL_TXQ_LOCK(txq);
3531 STAILQ_FOREACH(bf, &txq->active, bf_list) {
3538 MWL_TXQ_UNLOCK(txq);
3682 /* NB: cache txq to avoid ptr indirect */
3683 mwl_bastream_setup(bas, tap->txa_tid, bas->bastream->txq);
3685 "%s: bastream %p assigned to txq %d TID %d bufsiz %d "
3687 bas->txq, tap->txa_tid, bufsiz, ni->ni_htparam);
4547 mwl_txq_dump(struct mwl_txq *txq)
4552 MWL_TXQ_LOCK(txq);
4553 STAILQ_FOREACH(bf, &txq->active, bf_list) {
4555 MWL_TXDESC_SYNC(txq, ds,
4558 mwl_printtxbuf(bf, txq->qnum, i);
4562 MWL_TXQ_UNLOCK(txq);
4815 struct mwl_txq *txq = sc->sc_ac2q[i];
4817 txq->qnum, ieee80211_wme_acnames[i]);