Lines Matching refs:txq

978 		struct mwl_txq *txq = &sc->sc_txq[i];
979 sc->sc_hwdma.wcbBase[i] = txq->dma.dd_desc_paddr;
1268 mwl_gettxbuf(struct mwl_softc *sc, struct mwl_txq *txq)
1275 MWL_TXQ_LOCK(txq);
1276 bf = STAILQ_FIRST(&txq->free);
1278 STAILQ_REMOVE_HEAD(&txq->free, bf_list);
1279 txq->nfree--;
1281 MWL_TXQ_UNLOCK(txq);
1284 "%s: out of xmit buffers on q %d\n", __func__, txq->qnum);
1295 mwl_puttxbuf_head(struct mwl_txq *txq, struct mwl_txbuf *bf)
1299 MWL_TXQ_LOCK(txq);
1300 STAILQ_INSERT_HEAD(&txq->free, bf, bf_list);
1301 txq->nfree++;
1302 MWL_TXQ_UNLOCK(txq);
1306 mwl_puttxbuf_tail(struct mwl_txq *txq, struct mwl_txbuf *bf)
1310 MWL_TXQ_LOCK(txq);
1311 STAILQ_INSERT_TAIL(&txq->free, bf, bf_list);
1312 txq->nfree++;
1313 MWL_TXQ_UNLOCK(txq);
1343 struct mwl_txq *txq = NULL; /* XXX silence gcc */
1361 txq = sc->sc_ac2q[M_WME_GETAC(m)];
1362 bf = mwl_gettxbuf(sc, txq);
1371 "%s: tail drop on q %d\n", __func__, txq->qnum);
1383 mwl_puttxbuf_head(txq, bf);
1422 struct mwl_txq *txq;
1436 txq = sc->sc_ac2q[M_WME_GETAC(m)];
1437 bf = mwl_gettxbuf(sc, txq);
1447 mwl_puttxbuf_head(txq, bf);
2009 mwl_txq_reset(struct mwl_softc *sc, struct mwl_txq *txq)
2014 bf = txq->dma.dd_bufptr;
2015 STAILQ_INIT(&txq->free);
2017 STAILQ_INSERT_TAIL(&txq->free, bf, bf_list);
2018 txq->nfree = i;
2025 mwl_txdma_setup(struct mwl_softc *sc, struct mwl_txq *txq)
2031 error = mwl_desc_setup(sc, "tx", &txq->dma,
2045 txq->dma.dd_bufptr = bf;
2047 ds = txq->dma.dd_desc;
2050 bf->bf_daddr = DS2PHYS(&txq->dma, ds);
2059 mwl_txq_reset(sc, txq);
2064 mwl_txdma_cleanup(struct mwl_softc *sc, struct mwl_txq *txq)
2069 bf = txq->dma.dd_bufptr;
2076 STAILQ_INIT(&txq->free);
2077 txq->nfree = 0;
2078 if (txq->dma.dd_bufptr != NULL) {
2079 free(txq->dma.dd_bufptr, M_MWLDEV);
2080 txq->dma.dd_bufptr = NULL;
2082 if (txq->dma.dd_desc_len != 0)
2083 mwl_desc_cleanup(sc, &txq->dma);
2828 mwl_txq_init(struct mwl_softc *sc, struct mwl_txq *txq, int qnum)
2833 MWL_TXQ_LOCK_INIT(sc, txq);
2834 txq->qnum = qnum;
2835 txq->txpri = 0; /* XXX */
2838 STAILQ_INIT(&txq->free);
2840 STAILQ_FOREACH(bf, &txq->free, bf_list) {
2841 bf->bf_txq = txq;
2846 bn = STAILQ_FIRST(&txq->free);
2849 STAILQ_INIT(&txq->active);
2860 struct mwl_txq *txq;
2872 txq = &sc->sc_txq[mvtype];
2873 mwl_txq_init(sc, txq, mvtype);
2874 sc->sc_ac2q[ac] = txq;
2886 struct mwl_txq *txq = sc->sc_ac2q[ac];
2897 if (mwl_hal_setedcaparams(mh, txq->qnum, cwmin, cwmax, aifs, txoplim)) {
2925 mwl_tx_cleanupq(struct mwl_softc *sc, struct mwl_txq *txq)
2928 MWL_TXQ_LOCK_DESTROY(txq);
3073 struct mwl_txq *txq;
3200 txq = bf->bf_txq;
3258 ds->TxPriority = txq->qnum;
3261 ds->TxPriority = mn->mn_ba[3].txq;
3265 ds->TxPriority = mn->mn_ba[2].txq;
3269 ds->TxPriority = mn->mn_ba[1].txq;
3273 ds->TxPriority = mn->mn_ba[0].txq;
3276 ds->TxPriority = txq->qnum;
3278 ds->TxPriority = txq->qnum;
3293 MWL_TXQ_LOCK(txq);
3295 STAILQ_INSERT_TAIL(&txq->active, bf, bf_list);
3296 MWL_TXDESC_SYNC(txq, ds, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
3299 MWL_TXQ_UNLOCK(txq);
3316 mwl_tx_processq(struct mwl_softc *sc, struct mwl_txq *txq)
3328 DPRINTF(sc, MWL_DEBUG_TX_PROC, "%s: tx queue %u\n", __func__, txq->qnum);
3330 MWL_TXQ_LOCK(txq);
3331 bf = STAILQ_FIRST(&txq->active);
3333 MWL_TXQ_UNLOCK(txq);
3337 MWL_TXDESC_SYNC(txq, ds,
3340 MWL_TXQ_UNLOCK(txq);
3343 STAILQ_REMOVE_HEAD(&txq->active, bf_list);
3344 MWL_TXQ_UNLOCK(txq);
3348 mwl_printtxbuf(bf, txq->qnum, nreaped);
3363 if (txq->qnum >= MWL_WME_AC_VO)
3395 mwl_puttxbuf_tail(txq, bf);
3435 mwl_tx_draintxq(struct mwl_softc *sc, struct mwl_txq *txq)
3446 MWL_TXQ_LOCK(txq);
3447 bf = STAILQ_FIRST(&txq->active);
3449 MWL_TXQ_UNLOCK(txq);
3452 STAILQ_REMOVE_HEAD(&txq->active, bf_list);
3453 MWL_TXQ_UNLOCK(txq);
3459 mwl_printtxbuf(bf, txq->qnum, ix);
3474 mwl_puttxbuf_tail(txq, bf);
3515 struct mwl_txq *txq;
3520 txq = &sc->sc_txq[i];
3521 MWL_TXQ_LOCK(txq);
3522 STAILQ_FOREACH(bf, &txq->active, bf_list) {
3529 MWL_TXQ_UNLOCK(txq);
3672 /* NB: cache txq to avoid ptr indirect */
3673 mwl_bastream_setup(bas, tap->txa_tid, bas->bastream->txq);
3675 "%s: bastream %p assigned to txq %d TID %d bufsiz %d "
3677 bas->txq, tap->txa_tid, bufsiz, ni->ni_htparam);
4537 mwl_txq_dump(struct mwl_txq *txq)
4542 MWL_TXQ_LOCK(txq);
4543 STAILQ_FOREACH(bf, &txq->active, bf_list) {
4545 MWL_TXDESC_SYNC(txq, ds,
4548 mwl_printtxbuf(bf, txq->qnum, i);
4552 MWL_TXQ_UNLOCK(txq);
4805 struct mwl_txq *txq = sc->sc_ac2q[i];
4807 txq->qnum, ieee80211_wme_acnames[i]);