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) in ath_tx_queue_tid() argument
119 container_of((void *)tid, struct ieee80211_txq, drv_priv); in ath_tx_queue_tid()
128 struct ath_atx_tid *tid = (struct ath_atx_tid *) queue->drv_priv; in ath9k_wake_tx_queue() local
129 struct ath_txq *txq = tid->txq; in ath9k_wake_tx_queue()
133 tid->tidno); in ath9k_wake_tx_queue()
148 static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno) in ath_send_bar() argument
150 if (!tid->an->sta) in ath_send_bar()
153 ieee80211_send_bar(tid->an->vif, tid->an->sta->addr, tid->tidno, in ath_send_bar()
187 ath_tid_pull(struct ath_atx_tid *tid, struct sk_buff **skbuf) in ath_tid_pull() argument
189 struct ieee80211_txq *txq = container_of((void*)tid, struct ieee80211_txq, drv_priv); in ath_tid_pull()
190 struct ath_softc *sc = tid->an->sc; in ath_tid_pull()
193 .txq = tid->txq, in ath_tid_pull()
194 .sta = tid->an->sta, in ath_tid_pull()
211 if (tid->txq == sc->tx.txq_map[q]) { in ath_tid_pull()
214 ++tid->txq->pending_frames; in ath_tid_pull()
221 static int ath_tid_dequeue(struct ath_atx_tid *tid, in ath_tid_dequeue() argument
225 *skb = __skb_dequeue(&tid->retry_q); in ath_tid_dequeue()
227 ret = ath_tid_pull(tid, skb); in ath_tid_dequeue()
232 static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid) in ath_tx_flush_tid() argument
234 struct ath_txq *txq = tid->txq; in ath_tx_flush_tid()
246 while ((skb = __skb_dequeue(&tid->retry_q))) { in ath_tx_flush_tid()
256 ath_tx_update_baw(sc, tid, bf); in ath_tx_flush_tid()
266 ath_send_bar(tid, tid->seq_start); in ath_tx_flush_tid()
271 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid, in ath_tx_update_baw() argument
281 index = ATH_BA_INDEX(tid->seq_start, seqno); in ath_tx_update_baw()
282 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); in ath_tx_update_baw()
284 __clear_bit(cindex, tid->tx_buf); in ath_tx_update_baw()
286 while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) { in ath_tx_update_baw()
287 INCR(tid->seq_start, IEEE80211_SEQ_MAX); in ath_tx_update_baw()
288 INCR(tid->baw_head, ATH_TID_MAX_BUFS); in ath_tx_update_baw()
289 if (tid->bar_index >= 0) in ath_tx_update_baw()
290 tid->bar_index--; in ath_tx_update_baw()
294 static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid, in ath_tx_addto_baw() argument
304 index = ATH_BA_INDEX(tid->seq_start, seqno); in ath_tx_addto_baw()
305 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); in ath_tx_addto_baw()
306 __set_bit(cindex, tid->tx_buf); in ath_tx_addto_baw()
309 if (index >= ((tid->baw_tail - tid->baw_head) & in ath_tx_addto_baw()
311 tid->baw_tail = cindex; in ath_tx_addto_baw()
312 INCR(tid->baw_tail, ATH_TID_MAX_BUFS); in ath_tx_addto_baw()
317 struct ath_atx_tid *tid) in ath_tid_drain() argument
330 while ((ret = ath_tid_dequeue(tid, &skb)) == 0) { in ath_tid_drain()
442 struct ath_atx_tid *tid, in ath_tx_complete_aggr() argument
487 seq_first = tid->seq_start; in ath_tx_complete_aggr()
498 if (isba && tid->tidno != ts->tid) in ath_tx_complete_aggr()
534 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno) || in ath_tx_complete_aggr()
535 !tid->active) { in ath_tx_complete_aggr()
576 ath_tx_update_baw(sc, tid, bf); in ath_tx_complete_aggr()
606 ath_tx_update_baw(sc, tid, bf); in ath_tx_complete_aggr()
632 ieee80211_sta_set_buffered(sta, tid->tidno, true); in ath_tx_complete_aggr()
634 skb_queue_splice_tail(&bf_pending, &tid->retry_q); in ath_tx_complete_aggr()
636 ath_tx_queue_tid(sc, tid); in ath_tx_complete_aggr()
638 tid->clear_ps_filter = true; in ath_tx_complete_aggr()
645 if (BAW_WITHIN(tid->seq_start, tid->baw_size, bar_seq)) in ath_tx_complete_aggr()
646 tid->bar_index = ATH_BA_INDEX(tid->seq_start, bar_seq); in ath_tx_complete_aggr()
649 ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1)); in ath_tx_complete_aggr()
667 u8 tid) in ath_tx_count_airtime() argument
678 ieee80211_sta_register_airtime(sta, tid, airtime, 0); in ath_tx_count_airtime()
689 struct ath_atx_tid *tid = NULL; in ath_tx_process_buffer() local
707 tid = ath_get_skb_tid(sc, an, bf->bf_mpdu); in ath_tx_process_buffer()
708 ath_tx_count_airtime(sc, sta, bf, ts, tid->tidno); in ath_tx_process_buffer()
710 tid->clear_ps_filter = true; in ath_tx_process_buffer()
724 ath_tx_complete_aggr(sc, txq, bf, bf_head, sta, tid, ts, txok); in ath_tx_process_buffer()
753 struct ath_atx_tid *tid) in ath_lookup_rate() argument
760 int q = tid->txq->mac80211_qnum; in ath_lookup_rate()
813 if (tid->an->maxampdu) in ath_lookup_rate()
814 aggr_limit = min(aggr_limit, tid->an->maxampdu); in ath_lookup_rate()
823 static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, in ath_compute_num_delims() argument
865 if (tid->an->mpdudensity == 0) in ath_compute_num_delims()
874 nsymbols = NUM_SYMBOLS_PER_USEC_HALFGI(tid->an->mpdudensity); in ath_compute_num_delims()
876 nsymbols = NUM_SYMBOLS_PER_USEC(tid->an->mpdudensity); in ath_compute_num_delims()
895 struct ath_atx_tid *tid, struct ath_buf **buf) in ath_tx_get_tid_subframe() argument
905 ret = ath_tid_dequeue(tid, &skb); in ath_tx_get_tid_subframe()
912 bf = ath_tx_setup_buffer(sc, txq, tid, skb); in ath_tx_get_tid_subframe()
934 if (!tid->active) in ath_tx_get_tid_subframe()
946 if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) { in ath_tx_get_tid_subframe()
947 __skb_queue_tail(&tid->retry_q, skb); in ath_tx_get_tid_subframe()
952 if (!skb_queue_is_first(&tid->retry_q, skb) && in ath_tx_get_tid_subframe()
961 if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) { in ath_tx_get_tid_subframe()
967 ath_tx_update_baw(sc, tid, bf); in ath_tx_get_tid_subframe()
973 ath_tx_addto_baw(sc, tid, bf); in ath_tx_get_tid_subframe()
984 struct ath_atx_tid *tid, struct list_head *bf_q, in ath_tx_form_aggr() argument
991 al_delta, h_baw = tid->baw_size / 2; in ath_tx_form_aggr()
998 aggr_limit = ath_lookup_rate(sc, bf, tid); in ath_tx_form_aggr()
1025 ndelim = ath_compute_num_delims(sc, tid, bf_first, fi->framelen, in ath_tx_form_aggr()
1041 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf); in ath_tx_form_aggr()
1047 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu); in ath_tx_form_aggr()
1436 struct ath_atx_tid *tid, struct list_head *bf_q, in ath_tx_form_burst() argument
1454 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf); in ath_tx_form_burst()
1460 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu); in ath_tx_form_burst()
1464 ath_set_rates(tid->an->vif, tid->an->sta, bf); in ath_tx_form_burst()
1469 struct ath_atx_tid *tid) in ath_tx_sched_aggr() argument
1479 ret = ath_tx_get_tid_subframe(sc, txq, tid, &bf); in ath_tx_sched_aggr()
1487 __skb_queue_tail(&tid->retry_q, bf->bf_mpdu); in ath_tx_sched_aggr()
1491 ath_set_rates(tid->an->vif, tid->an->sta, bf); in ath_tx_sched_aggr()
1493 aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf); in ath_tx_sched_aggr()
1495 ath_tx_form_burst(sc, txq, tid, &bf_q, bf); in ath_tx_sched_aggr()
1500 if (tid->clear_ps_filter || tid->an->no_ps_filter) { in ath_tx_sched_aggr()
1501 tid->clear_ps_filter = false; in ath_tx_sched_aggr()
1511 u16 tid, u16 *ssn) in ath_tx_aggr_start() argument
1522 txtid = ATH_AN_2_TID(an, tid); in ath_tx_aggr_start()
1550 void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid) in ath_tx_aggr_stop() argument
1554 struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid); in ath_tx_aggr_stop()
1569 struct ath_atx_tid *tid; in ath_tx_aggr_sleep() local
1575 tid = ath_node_to_tid(an, tidno); in ath_tx_aggr_sleep()
1577 if (!skb_queue_empty(&tid->retry_q)) in ath_tx_aggr_sleep()
1578 ieee80211_sta_set_buffered(sta, tid->tidno, true); in ath_tx_aggr_sleep()
1586 struct ath_atx_tid *tid; in ath_tx_aggr_wakeup() local
1593 tid = ath_node_to_tid(an, tidno); in ath_tx_aggr_wakeup()
1594 txq = tid->txq; in ath_tx_aggr_wakeup()
1597 tid->clear_ps_filter = true; in ath_tx_aggr_wakeup()
1598 if (!skb_queue_empty(&tid->retry_q)) { in ath_tx_aggr_wakeup()
1599 ath_tx_queue_tid(sc, tid); in ath_tx_aggr_wakeup()
1640 struct ath_atx_tid *tid; in ath9k_release_buffered_frames() local
1645 tid = ATH_AN_2_TID(an, i); in ath9k_release_buffered_frames()
1647 ath_txq_lock(sc, tid->txq); in ath9k_release_buffered_frames()
1650 tid, &bf); in ath9k_release_buffered_frames()
1656 ath_set_rates(tid->an->vif, tid->an->sta, bf); in ath9k_release_buffered_frames()
1667 if (an->sta && skb_queue_empty(&tid->retry_q)) in ath9k_release_buffered_frames()
1670 ath_txq_unlock_complete(sc, tid->txq); in ath9k_release_buffered_frames()
1920 struct ath_atx_tid *tid; in ath_txq_schedule() local
1939 tid = (struct ath_atx_tid *)queue->drv_priv; in ath_txq_schedule()
1941 ret = ath_tx_sched_aggr(sc, txq, tid); in ath_txq_schedule()
1944 force = !skb_queue_empty(&tid->retry_q); in ath_txq_schedule()
2044 struct ath_atx_tid *tid, struct sk_buff *skb) in ath_tx_send_normal() argument
2054 if (tid && (tx_info->flags & IEEE80211_TX_CTL_AMPDU)) { in ath_tx_send_normal()
2056 ath_tx_addto_baw(sc, tid, bf); in ath_tx_send_normal()
2149 struct ath_atx_tid *tid, in ath_tx_setup_buffer() argument
2167 if (tid && ieee80211_is_data_present(hdr->frame_control)) { in ath_tx_setup_buffer()
2169 seqno = tid->seq_next; in ath_tx_setup_buffer()
2170 hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT); in ath_tx_setup_buffer()
2176 INCR(tid->seq_next, IEEE80211_SEQ_MAX); in ath_tx_setup_buffer()
2277 struct ath_atx_tid *tid = NULL; in ath_tx_start() local
2301 tid = ath_get_skb_tid(sc, an, skb); in ath_tx_start()
2310 bf = ath_tx_setup_buffer(sc, txq, tid, skb); in ath_tx_start()
2326 ath_tx_send_normal(sc, txq, tid, skb); in ath_tx_start()
2792 struct ath_atx_tid *tid; in ath_tx_node_init() local
2796 tid = ath_node_to_tid(an, tidno); in ath_tx_node_init()
2797 tid->an = an; in ath_tx_node_init()
2798 tid->tidno = tidno; in ath_tx_node_init()
2799 tid->seq_start = tid->seq_next = 0; in ath_tx_node_init()
2800 tid->baw_size = WME_MAX_BA; in ath_tx_node_init()
2801 tid->baw_head = tid->baw_tail = 0; in ath_tx_node_init()
2802 tid->active = false; in ath_tx_node_init()
2803 tid->clear_ps_filter = true; in ath_tx_node_init()
2804 __skb_queue_head_init(&tid->retry_q); in ath_tx_node_init()
2805 INIT_LIST_HEAD(&tid->list); in ath_tx_node_init()
2807 tid->txq = sc->tx.txq_map[acno]; in ath_tx_node_init()
2816 struct ath_atx_tid *tid; in ath_tx_node_cleanup() local
2823 tid = ath_node_to_tid(an, tidno); in ath_tx_node_cleanup()
2824 txq = tid->txq; in ath_tx_node_cleanup()
2828 if (!list_empty(&tid->list)) in ath_tx_node_cleanup()
2829 list_del_init(&tid->list); in ath_tx_node_cleanup()
2831 ath_tid_drain(sc, txq, tid); in ath_tx_node_cleanup()
2832 tid->active = false; in ath_tx_node_cleanup()