Lines Matching refs:tid

51 			       struct ath_atx_tid *tid, struct sk_buff *skb);
64 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
68 struct ath_atx_tid *tid,
116 void ath_tx_queue_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
119 container_of((void *)tid, struct ieee80211_txq, drv_priv);
128 struct ath_atx_tid *tid = (struct ath_atx_tid *) queue->drv_priv;
129 struct ath_txq *txq = tid->txq;
133 tid->tidno);
148 static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
150 if (!tid->an->sta)
153 ieee80211_send_bar(tid->an->vif, tid->an->sta->addr, tid->tidno,
187 ath_tid_pull(struct ath_atx_tid *tid, struct sk_buff **skbuf)
189 struct ieee80211_txq *txq = container_of((void*)tid, struct ieee80211_txq, drv_priv);
190 struct ath_softc *sc = tid->an->sc;
193 .txq = tid->txq,
194 .sta = tid->an->sta,
211 if (tid->txq == sc->tx.txq_map[q]) {
214 ++tid->txq->pending_frames;
221 static int ath_tid_dequeue(struct ath_atx_tid *tid,
225 *skb = __skb_dequeue(&tid->retry_q);
227 ret = ath_tid_pull(tid, skb);
232 static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
234 struct ath_txq *txq = tid->txq;
246 while ((skb = __skb_dequeue(&tid->retry_q))) {
256 ath_tx_update_baw(sc, tid, bf);
266 ath_send_bar(tid, tid->seq_start);
271 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
281 index = ATH_BA_INDEX(tid->seq_start, seqno);
282 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
284 __clear_bit(cindex, tid->tx_buf);
286 while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
287 INCR(tid->seq_start, IEEE80211_SEQ_MAX);
288 INCR(tid->baw_head, ATH_TID_MAX_BUFS);
289 if (tid->bar_index >= 0)
290 tid->bar_index--;
294 static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
304 index = ATH_BA_INDEX(tid->seq_start, seqno);
305 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
306 __set_bit(cindex, tid->tx_buf);
309 if (index >= ((tid->baw_tail - tid->baw_head) &
311 tid->baw_tail = cindex;
312 INCR(tid->baw_tail, ATH_TID_MAX_BUFS);
317 struct ath_atx_tid *tid)
330 while ((ret = ath_tid_dequeue(tid, &skb)) == 0) {
442 struct ath_atx_tid *tid,
487 seq_first = tid->seq_start;
498 if (isba && tid->tidno != ts->tid)
534 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno) ||
535 !tid->active) {
576 ath_tx_update_baw(sc, tid, bf);
606 ath_tx_update_baw(sc, tid, bf);
632 ieee80211_sta_set_buffered(sta, tid->tidno, true);
634 skb_queue_splice_tail(&bf_pending, &tid->retry_q);
636 ath_tx_queue_tid(sc, tid);
638 tid->clear_ps_filter = true;
645 if (BAW_WITHIN(tid->seq_start, tid->baw_size, bar_seq))
646 tid->bar_index = ATH_BA_INDEX(tid->seq_start, bar_seq);
649 ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1));
667 u8 tid)
678 ieee80211_sta_register_airtime(sta, tid, airtime, 0);
689 struct ath_atx_tid *tid = NULL;
707 tid = ath_get_skb_tid(sc, an, bf->bf_mpdu);
708 ath_tx_count_airtime(sc, sta, bf, ts, tid->tidno);
710 tid->clear_ps_filter = true;
724 ath_tx_complete_aggr(sc, txq, bf, bf_head, sta, tid, ts, txok);
753 struct ath_atx_tid *tid)
760 int q = tid->txq->mac80211_qnum;
813 if (tid->an->maxampdu)
814 aggr_limit = min(aggr_limit, tid->an->maxampdu);
823 static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
865 if (tid->an->mpdudensity == 0)
874 nsymbols = NUM_SYMBOLS_PER_USEC_HALFGI(tid->an->mpdudensity);
876 nsymbols = NUM_SYMBOLS_PER_USEC(tid->an->mpdudensity);
895 struct ath_atx_tid *tid, struct ath_buf **buf)
905 ret = ath_tid_dequeue(tid, &skb);
912 bf = ath_tx_setup_buffer(sc, txq, tid, skb);
934 if (!tid->active)
946 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) {
947 __skb_queue_tail(&tid->retry_q, skb);
952 if (!skb_queue_is_first(&tid->retry_q, skb) &&
961 if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) {
967 ath_tx_update_baw(sc, tid, bf);
973 ath_tx_addto_baw(sc, tid, bf);
984 struct ath_atx_tid *tid, struct list_head *bf_q,
991 al_delta, h_baw = tid->baw_size / 2;
998 aggr_limit = ath_lookup_rate(sc, bf, tid);
1025 ndelim = ath_compute_num_delims(sc, tid, bf_first, fi->framelen,
1041 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf);
1047 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
1441 struct ath_atx_tid *tid, struct list_head *bf_q,
1459 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf);
1465 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
1469 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1474 struct ath_atx_tid *tid)
1484 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf);
1492 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
1496 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1498 aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf);
1500 ath_tx_form_burst(sc, txq, tid, &bf_q, bf);
1505 if (tid->clear_ps_filter || tid->an->no_ps_filter) {
1506 tid->clear_ps_filter = false;
1516 u16 tid, u16 *ssn)
1527 txtid = ATH_AN_2_TID(an, tid);
1555 void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
1559 struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
1574 struct ath_atx_tid *tid;
1580 tid = ath_node_to_tid(an, tidno);
1582 if (!skb_queue_empty(&tid->retry_q))
1583 ieee80211_sta_set_buffered(sta, tid->tidno, true);
1591 struct ath_atx_tid *tid;
1598 tid = ath_node_to_tid(an, tidno);
1599 txq = tid->txq;
1602 tid->clear_ps_filter = true;
1603 if (!skb_queue_empty(&tid->retry_q)) {
1604 ath_tx_queue_tid(sc, tid);
1645 struct ath_atx_tid *tid;
1650 tid = ATH_AN_2_TID(an, i);
1652 ath_txq_lock(sc, tid->txq);
1655 tid, &bf);
1661 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1672 if (an->sta && skb_queue_empty(&tid->retry_q))
1675 ath_txq_unlock_complete(sc, tid->txq);
1917 /* For each acq entry, for each tid, try to schedule packets
1925 struct ath_atx_tid *tid;
1944 tid = (struct ath_atx_tid *)queue->drv_priv;
1946 ret = ath_tx_sched_aggr(sc, txq, tid);
1949 force = !skb_queue_empty(&tid->retry_q);
2049 struct ath_atx_tid *tid, struct sk_buff *skb)
2059 if (tid && (tx_info->flags & IEEE80211_TX_CTL_AMPDU)) {
2061 ath_tx_addto_baw(sc, tid, bf);
2155 struct ath_atx_tid *tid,
2173 if (tid && ieee80211_is_data_present(hdr->frame_control)) {
2175 seqno = tid->seq_next;
2176 hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
2182 INCR(tid->seq_next, IEEE80211_SEQ_MAX);
2283 struct ath_atx_tid *tid = NULL;
2307 tid = ath_get_skb_tid(sc, an, skb);
2316 bf = ath_tx_setup_buffer(sc, txq, tid, skb);
2332 ath_tx_send_normal(sc, txq, tid, skb);
2807 struct ath_atx_tid *tid;
2811 tid = ath_node_to_tid(an, tidno);
2812 tid->an = an;
2813 tid->tidno = tidno;
2814 tid->seq_start = tid->seq_next = 0;
2815 tid->baw_size = WME_MAX_BA;
2816 tid->baw_head = tid->baw_tail = 0;
2817 tid->active = false;
2818 tid->clear_ps_filter = true;
2819 __skb_queue_head_init(&tid->retry_q);
2820 INIT_LIST_HEAD(&tid->list);
2822 tid->txq = sc->tx.txq_map[acno];
2831 struct ath_atx_tid *tid;
2838 tid = ath_node_to_tid(an, tidno);
2839 txq = tid->txq;
2843 if (!list_empty(&tid->list))
2844 list_del_init(&tid->list);
2846 ath_tid_drain(sc, txq, tid);
2847 tid->active = false;