Lines Matching defs:tsb
1191 rtw_txsoft_blk_init(struct rtw_txsoft_blk *tsb)
1196 SIMPLEQ_INIT(&tsb->tsb_dirtyq);
1197 SIMPLEQ_INIT(&tsb->tsb_freeq);
1198 for (i = 0; i < tsb->tsb_ndesc; i++) {
1199 ts = &tsb->tsb_desc[i];
1201 SIMPLEQ_INSERT_TAIL(&tsb->tsb_freeq, ts, ts_q);
1203 tsb->tsb_tx_timer = 0;
1208 rtw_txsoft_blk_init_all(struct rtw_txsoft_blk *tsb)
1212 rtw_txsoft_blk_init(&tsb[pri]);
1693 struct rtw_txsoft_blk *tsb)
1697 while ((ts = SIMPLEQ_FIRST(&tsb->tsb_dirtyq)) != NULL) {
1699 SIMPLEQ_REMOVE_HEAD(&tsb->tsb_dirtyq, ts_q);
1700 SIMPLEQ_INSERT_TAIL(&tsb->tsb_freeq, ts, ts_q);
1702 tsb->tsb_tx_timer = 0;
1750 struct rtw_txsoft_blk *tsb;
1754 tsb = &sc->sc_txsoft_blk[pri];
1756 if (!SIMPLEQ_EMPTY(&tsb->tsb_freeq) && tdb->tdb_nfree > 0)
1767 rtw_collect_txring(struct rtw_softc *sc, struct rtw_txsoft_blk *tsb,
1778 while ((ts = SIMPLEQ_FIRST(&tsb->tsb_dirtyq)) != NULL) {
1826 SIMPLEQ_REMOVE_HEAD(&tsb->tsb_dirtyq, ts_q);
1827 SIMPLEQ_INSERT_TAIL(&tsb->tsb_freeq, ts, ts_q);
1832 tsb->tsb_tx_timer = 0;
1842 struct rtw_txsoft_blk *tsb;
1849 tsb = &sc->sc_txsoft_blk[pri];
1851 rtw_collect_txring(sc, tsb, tdb, 0);
1867 struct rtw_txsoft_blk *tsb = &sc->sc_txsoft_blk[RTW_TXPRIBCN];
1890 rtw_collect_txring(sc, tsb, tdb, 1);
1896 SIMPLEQ_EMPTY(&tsb->tsb_dirtyq)) {
2070 struct rtw_txsoft_blk *tsb;
2074 tsb = &sc->sc_txsoft_blk[pri];
2076 rtw_collect_txring(sc, tsb, tdb, 1);
2078 if (!SIMPLEQ_EMPTY(&tsb->tsb_dirtyq))
3078 struct rtw_txsoft_blk *tsb;
3083 tsb = &sc->sc_txsoft_blk[pri];
3086 if (SIMPLEQ_EMPTY(&tsb->tsb_freeq) || tdb->tdb_nfree == 0) {
3087 if (tsb->tsb_tx_timer == 0)
3088 tsb->tsb_tx_timer = 5;
3093 *tsbp = tsb;
3314 struct rtw_txsoft_blk *tsb = NULL; /* XXX: GCC */
3336 if (rtw_dequeue(ifp, &tsb, &tdb, &m0, &ni) == -1)
3350 ts = SIMPLEQ_FIRST(&tsb->tsb_freeq);
3518 SIMPLEQ_REMOVE_HEAD(&tsb->tsb_freeq, ts_q);
3519 SIMPLEQ_INSERT_TAIL(&tsb->tsb_dirtyq, ts, ts_q);
3521 if (tsb != &sc->sc_txsoft_blk[RTW_TXPRIBCN])
3523 tsb->tsb_tx_timer = 5;
3525 rtw_tx_kick(&sc->sc_regs, tsb->tsb_poll);
3562 struct rtw_txsoft_blk *tsb;
3572 tsb = &sc->sc_txsoft_blk[pri];
3574 if (tsb->tsb_tx_timer == 0)
3576 else if (--tsb->tsb_tx_timer == 0) {
3577 if (SIMPLEQ_EMPTY(&tsb->tsb_dirtyq))
3579 else if (rtw_collect_txring(sc, tsb,
3885 rtw_txsoft_blk_setup(struct rtw_txsoft_blk *tsb, u_int qlen)
3887 SIMPLEQ_INIT(&tsb->tsb_dirtyq);
3888 SIMPLEQ_INIT(&tsb->tsb_freeq);
3889 tsb->tsb_ndesc = qlen;
3890 tsb->tsb_desc = malloc(qlen * sizeof(*tsb->tsb_desc), M_DEVBUF,
3899 struct rtw_txsoft_blk *tsb;
3902 tsb = &sc->sc_txsoft_blk[pri];
3903 free(tsb->tsb_desc, M_DEVBUF);
3904 tsb->tsb_desc = NULL;
4041 struct rtw_txsoft_blk *tsb;
4135 tsb = &sc->sc_txsoft_blk[pri];
4138 &tsb->tsb_desc[0], tsb->tsb_ndesc)) != 0) {