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