Lines Matching refs:tid
57 struct ath_atx_tid *tid, struct sk_buff *skb);
70 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
74 struct ath_atx_tid *tid,
122 void ath_tx_queue_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
125 container_of((void *)tid, struct ieee80211_txq, drv_priv);
134 struct ath_atx_tid *tid = (struct ath_atx_tid *) queue->drv_priv;
135 struct ath_txq *txq = tid->txq;
139 tid->tidno);
154 static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
156 if (!tid->an->sta)
159 ieee80211_send_bar(tid->an->vif, tid->an->sta->addr, tid->tidno,
234 ath_tid_pull(struct ath_atx_tid *tid, struct sk_buff **skbuf)
236 struct ieee80211_txq *txq = container_of((void*)tid, struct ieee80211_txq, drv_priv);
237 struct ath_softc *sc = tid->an->sc;
240 .txq = tid->txq,
241 .sta = tid->an->sta,
258 if (tid->txq == sc->tx.txq_map[q]) {
261 ++tid->txq->pending_frames;
268 static int ath_tid_dequeue(struct ath_atx_tid *tid,
272 *skb = __skb_dequeue(&tid->retry_q);
274 ret = ath_tid_pull(tid, skb);
279 static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
281 struct ath_txq *txq = tid->txq;
293 while ((skb = __skb_dequeue(&tid->retry_q))) {
303 ath_tx_update_baw(sc, tid, bf);
313 ath_send_bar(tid, tid->seq_start);
318 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
328 index = ATH_BA_INDEX(tid->seq_start, seqno);
329 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
331 __clear_bit(cindex, tid->tx_buf);
333 while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
334 INCR(tid->seq_start, IEEE80211_SEQ_MAX);
335 INCR(tid->baw_head, ATH_TID_MAX_BUFS);
336 if (tid->bar_index >= 0)
337 tid->bar_index--;
341 static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
351 index = ATH_BA_INDEX(tid->seq_start, seqno);
352 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
353 __set_bit(cindex, tid->tx_buf);
356 if (index >= ((tid->baw_tail - tid->baw_head) &
358 tid->baw_tail = cindex;
359 INCR(tid->baw_tail, ATH_TID_MAX_BUFS);
364 struct ath_atx_tid *tid)
377 while ((ret = ath_tid_dequeue(tid, &skb)) == 0) {
491 struct ath_atx_tid *tid,
536 seq_first = tid->seq_start;
547 if (isba && tid->tidno != ts->tid)
583 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno) ||
584 !tid->active) {
625 ath_tx_update_baw(sc, tid, bf);
655 ath_tx_update_baw(sc, tid, bf);
681 ieee80211_sta_set_buffered(sta, tid->tidno, true);
683 skb_queue_splice_tail(&bf_pending, &tid->retry_q);
685 ath_tx_queue_tid(sc, tid);
687 tid->clear_ps_filter = true;
694 if (BAW_WITHIN(tid->seq_start, tid->baw_size, bar_seq))
695 tid->bar_index = ATH_BA_INDEX(tid->seq_start, bar_seq);
698 ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1));
716 u8 tid)
727 ieee80211_sta_register_airtime(sta, tid, airtime, 0);
738 struct ath_atx_tid *tid = NULL;
756 tid = ath_get_skb_tid(sc, an, bf->bf_mpdu);
757 ath_tx_count_airtime(sc, sta, bf, ts, tid->tidno);
759 tid->clear_ps_filter = true;
773 ath_tx_complete_aggr(sc, txq, bf, bf_head, sta, tid, ts, txok);
802 struct ath_atx_tid *tid)
809 int q = tid->txq->mac80211_qnum;
862 if (tid->an->maxampdu)
863 aggr_limit = min(aggr_limit, tid->an->maxampdu);
872 static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
914 if (tid->an->mpdudensity == 0)
923 nsymbols = NUM_SYMBOLS_PER_USEC_HALFGI(tid->an->mpdudensity);
925 nsymbols = NUM_SYMBOLS_PER_USEC(tid->an->mpdudensity);
944 struct ath_atx_tid *tid, struct ath_buf **buf)
954 ret = ath_tid_dequeue(tid, &skb);
961 bf = ath_tx_setup_buffer(sc, txq, tid, skb);
983 if (!tid->active)
995 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) {
996 __skb_queue_tail(&tid->retry_q, skb);
1001 if (!skb_queue_is_first(&tid->retry_q, skb) &&
1010 if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) {
1016 ath_tx_update_baw(sc, tid, bf);
1022 ath_tx_addto_baw(sc, tid, bf);
1033 struct ath_atx_tid *tid, struct list_head *bf_q,
1040 al_delta, h_baw = tid->baw_size / 2;
1047 aggr_limit = ath_lookup_rate(sc, bf, tid);
1074 ndelim = ath_compute_num_delims(sc, tid, bf_first, fi->framelen,
1090 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf);
1096 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
1502 struct ath_atx_tid *tid, struct list_head *bf_q,
1520 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf);
1526 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
1530 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1535 struct ath_atx_tid *tid)
1545 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf);
1553 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
1557 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1559 aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf);
1561 ath_tx_form_burst(sc, txq, tid, &bf_q, bf);
1566 if (tid->clear_ps_filter || tid->an->no_ps_filter) {
1567 tid->clear_ps_filter = false;
1577 u16 tid, u16 *ssn)
1588 txtid = ATH_AN_2_TID(an, tid);
1616 void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
1620 struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
1635 struct ath_atx_tid *tid;
1641 tid = ath_node_to_tid(an, tidno);
1643 if (!skb_queue_empty(&tid->retry_q))
1644 ieee80211_sta_set_buffered(sta, tid->tidno, true);
1652 struct ath_atx_tid *tid;
1659 tid = ath_node_to_tid(an, tidno);
1660 txq = tid->txq;
1663 tid->clear_ps_filter = true;
1664 if (!skb_queue_empty(&tid->retry_q)) {
1665 ath_tx_queue_tid(sc, tid);
1705 struct ath_atx_tid *tid;
1710 tid = ATH_AN_2_TID(an, i);
1712 ath_txq_lock(sc, tid->txq);
1715 tid, &bf);
1721 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1731 if (an->sta && skb_queue_empty(&tid->retry_q))
1734 ath_txq_unlock_complete(sc, tid->txq);
1976 /* For each acq entry, for each tid, try to schedule packets
1984 struct ath_atx_tid *tid;
2003 tid = (struct ath_atx_tid *)queue->drv_priv;
2005 ret = ath_tx_sched_aggr(sc, txq, tid);
2008 force = !skb_queue_empty(&tid->retry_q);
2108 struct ath_atx_tid *tid, struct sk_buff *skb)
2118 if (tid && (tx_info->flags & IEEE80211_TX_CTL_AMPDU)) {
2120 ath_tx_addto_baw(sc, tid, bf);
2214 struct ath_atx_tid *tid,
2232 if (tid && ieee80211_is_data_present(hdr->frame_control)) {
2234 seqno = tid->seq_next;
2235 hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
2241 INCR(tid->seq_next, IEEE80211_SEQ_MAX);
2342 struct ath_atx_tid *tid = NULL;
2366 tid = ath_get_skb_tid(sc, an, skb);
2375 bf = ath_tx_setup_buffer(sc, txq, tid, skb);
2391 ath_tx_send_normal(sc, txq, tid, skb);
2866 struct ath_atx_tid *tid;
2870 tid = ath_node_to_tid(an, tidno);
2871 tid->an = an;
2872 tid->tidno = tidno;
2873 tid->seq_start = tid->seq_next = 0;
2874 tid->baw_size = WME_MAX_BA;
2875 tid->baw_head = tid->baw_tail = 0;
2876 tid->active = false;
2877 tid->clear_ps_filter = true;
2878 __skb_queue_head_init(&tid->retry_q);
2879 INIT_LIST_HEAD(&tid->list);
2881 tid->txq = sc->tx.txq_map[acno];
2890 struct ath_atx_tid *tid;
2897 tid = ath_node_to_tid(an, tidno);
2898 txq = tid->txq;
2902 if (!list_empty(&tid->list))
2903 list_del_init(&tid->list);
2905 ath_tid_drain(sc, txq, tid);
2906 tid->active = false;