Lines Matching refs:tid
98 struct ath_atx_tid *tid, list_t *bf_list);
133 struct ath_atx_tid *tid;
134 tid = ATH_AN_2_TID(an, tidno);
136 if (tid->state & AGGR_ADDBA_COMPLETE ||
137 tid->state & AGGR_ADDBA_PROGRESS)
148 arn_tx_queue_tid(struct ath_txq *txq, struct ath_atx_tid *tid)
150 struct ath_atx_ac *ac = tid->ac;
152 /* if tid is paused, hold off */
153 if (tid->paused)
156 /* add tid to ac atmost once */
157 if (tid->sched)
160 tid->sched = B_TRUE;
161 list_insert_tail(&ac->tid_q, &tid->list);
171 /* pause a tid */
173 arn_tx_pause_tid(struct arn_softc *sc, struct ath_atx_tid *tid)
175 struct ath_txq *txq = &sc->sc_txq[tid->ac->qnum];
179 tid->paused++;
184 /* resume a tid and schedule aggregate */
186 arn_tx_resume_tid(struct arn_softc *sc, struct ath_atx_tid *tid)
188 struct ath_txq *txq = &sc->sc_txq[tid->ac->qnum];
190 ASSERT(tid->paused > 0);
193 tid->paused--;
195 if (tid->paused > 0)
198 if (list_empty(&tid->buf_q))
204 arn_tx_queue_tid(txq, tid);
210 /* flush tid's software queue and send frames as non-ampdu's */
212 arn_tx_flush_tid(struct arn_softc *sc, struct ath_atx_tid *tid)
214 struct ath_txq *txq = &sc->sc_txq[tid->ac->qnum];
221 ASSERT(tid->paused > 0);
224 tid->paused--;
226 if (tid->paused > 0) {
231 while (!list_empty(&tid->buf_q)) {
232 bf = list_head(&tid->buf_q);
234 list_remove(&tid->buf_q, bf);
236 arn_tx_send_ht_normal(sc, txq, tid, &list);
244 arn_tx_update_baw(struct arn_softc *sc, struct ath_atx_tid *tid, int seqno)
248 index = ATH_BA_INDEX(tid->seq_start, seqno);
249 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
251 tid->tx_buf[cindex] = NULL;
253 while (tid->baw_head != tid->baw_tail && !tid->tx_buf[tid->baw_head]) {
254 INCR(tid->seq_start, IEEE80211_SEQ_MAX);
255 INCR(tid->baw_head, ATH_TID_MAX_BUFS);
261 arn_tx_addto_baw(struct arn_softc *sc, struct ath_atx_tid *tid,
269 index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
270 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
272 ASSERT(tid->tx_buf[cindex] == NULL);
273 tid->tx_buf[cindex] = bf;
275 if (index >= ((tid->baw_tail - tid->baw_head) &
277 tid->baw_tail = cindex;
278 INCR(tid->baw_tail, ATH_TID_MAX_BUFS);
291 struct ath_atx_tid *tid)
300 if (list_empty(&tid->buf_q))
303 bf = list_head(&tid->buf_q);
304 list_remove(&tid->buf_q, bf);
308 arn_tx_update_baw(sc, tid, bf->bf_seqno);
315 tid->seq_next = tid->seq_start;
316 tid->baw_tail = tid->baw_head;
359 struct ath_atx_tid *tid = NULL;
370 tid = ATH_AN_2_TID(an, bf->bf_tidno);
413 if (!(tid->state & AGGR_CLEANUP) &&
449 arn_tx_update_baw(sc, tid, bf->bf_seqno);
493 if (tid->state & AGGR_CLEANUP) {
494 if (tid->baw_head == tid->baw_tail) {
495 tid->state &= ~AGGR_ADDBA_COMPLETE;
496 tid->addba_exchangeattempts = 0;
497 tid->state &= ~AGGR_CLEANUP;
500 arn_tx_flush_tid(sc, tid);
512 list_move_tail(&list_pending, &tid->buf_q);
513 arn_tx_queue_tid(txq, tid);
520 struct ath_atx_tid *tid)
569 maxampdu = tid->an->maxampdu;
582 arn_compute_num_delims(struct arn_softc *sc, struct ath_atx_tid *tid,
610 mpdudensity = tid->an->mpdudensity;
645 arn_tx_form_aggr(struct arn_softc *sc, struct ath_atx_tid *tid,
652 al_delta, h_baw = tid->baw_size / 2;
655 bf_first = list_head(&tid->buf_q);
658 bf = list_head(&tid->buf_q);
661 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, bf->bf_seqno)) {
667 aggr_limit = arn_lookup_rate(sc, bf, tid);
695 arn_compute_num_delims(sc, tid, bf_first, bf->bf_frmlen);
702 arn_tx_addto_baw(sc, tid, bf);
704 list_remove(&tid->buf_q, bf);
711 } while (!list_empty(&tid->buf_q));
722 struct ath_atx_tid *tid)
729 if (list_empty(&tid->buf_q))
736 status = arn_tx_form_aggr(sc, tid, &bf_q);
774 uint16_t tid, uint16_t *ssn)
782 txtid = ATH_AN_2_TID(an, tid);
792 arn_tx_aggr_stop(struct arn_softc *sc, struct ieee80211_node *in, uint16_t tid)
795 struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
847 uint16_t tid)
855 txtid = ATH_AN_2_TID(an, tid);
890 struct ath_atx_tid *tid, *tid_tmp;
895 list_for_each_entry_safe(tid, tid_tmp, &ac->tid_q) {
896 list_remove(&ac->tid_q, tid);
897 tid->sched = B_FALSE;
898 arn_tid_drain(sc, txq, tid);
936 int tid = -1;
948 tid = qwh->i_qos[0] & IEEE80211_QOS_TID;
949 switch (tid) {
1004 struct ath_atx_tid *tid;
1038 tid = ATH_AN_2_TID(an, bf->bf_tidno);
1041 LE_16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
1042 bf->bf_seqno = tid->seq_next;
1044 INCR(tid->seq_next, IEEE80211_SEQ_MAX);
1086 struct ath_atx_tid *tid,
1095 INCR(tid->seq_start, IEEE80211_SEQ_MAX);
2340 struct ath_atx_tid *tid;
2344 for (tidno = 0, tid = &an->tid[tidno]; tidno < WME_NUM_TID;
2345 tidno++, tid++) {
2346 tid->an = an;
2347 tid->tidno = tidno;
2348 tid->seq_start = tid->seq_next = 0;
2349 tid->baw_size = WME_MAX_BA;
2350 tid->baw_head = tid->baw_tail = 0;
2351 tid->sched = B_FALSE;
2352 tid->paused = B_FALSE;
2353 tid->state &= ~AGGR_CLEANUP;
2354 list_create(&tid->buf_q, sizeof (struct ath_buf),
2357 tid->ac = &an->ac[acno];
2358 tid->state &= ~AGGR_ADDBA_COMPLETE;
2359 tid->state &= ~AGGR_ADDBA_PROGRESS;
2360 tid->addba_exchangeattempts = 0;
2394 struct ath_atx_tid *tid, *tid_tmp;
2405 tid = list_head(&ac->tid_q);
2406 if (tid && tid->an != an)
2411 list_for_each_entry_safe(tid, tid_tmp,
2413 list_remove(&ac->tid_q, tid);
2414 bf = list_head(&tid->buf_q);
2420 tid->sched = B_FALSE;
2421 arn_tid_drain(sc, txq, tid);
2422 tid->state &= ~AGGR_ADDBA_COMPLETE;
2423 tid->addba_exchangeattempts = 0;
2424 tid->state &= ~AGGR_CLEANUP;