Lines Matching full:tap
205 struct ieee80211_tx_ampdu *tap);
207 struct ieee80211_tx_ampdu *tap,
210 struct ieee80211_tx_ampdu *tap,
213 struct ieee80211_tx_ampdu *tap);
215 struct ieee80211_tx_ampdu *tap);
218 struct ieee80211_tx_ampdu *tap, int status);
219 static void ampdu_tx_stop(struct ieee80211_tx_ampdu *tap);
220 static void bar_stop_timer(struct ieee80211_tx_ampdu *tap);
1308 struct ieee80211_tx_ampdu *tap; in ieee80211_ht_node_init() local
1330 tap = &ni->ni_tx_ampdu[tid]; in ieee80211_ht_node_init()
1331 tap->txa_tid = tid; in ieee80211_ht_node_init()
1332 tap->txa_ni = ni; in ieee80211_ht_node_init()
1333 ieee80211_txampdu_init_pps(tap); in ieee80211_ht_node_init()
1360 struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[i]; in ieee80211_ht_node_cleanup() local
1361 if (tap->txa_flags & IEEE80211_AGGR_SETUP) in ieee80211_ht_node_cleanup()
1362 ampdu_tx_stop(tap); in ieee80211_ht_node_cleanup()
1459 struct ieee80211_tx_ampdu *tap; in ieee80211_ht_wds_init() local
1499 tap = &ni->ni_tx_ampdu[tid]; in ieee80211_ht_wds_init()
1500 tap->txa_tid = tid; in ieee80211_ht_wds_init()
1501 ieee80211_txampdu_init_pps(tap); in ieee80211_ht_wds_init()
2181 ampdu_tx_setup(struct ieee80211_tx_ampdu *tap) in ampdu_tx_setup() argument
2183 callout_init(&tap->txa_timer, 1); in ampdu_tx_setup()
2184 tap->txa_flags |= IEEE80211_AGGR_SETUP; in ampdu_tx_setup()
2185 tap->txa_lastsample = ticks; in ampdu_tx_setup()
2189 ampdu_tx_stop(struct ieee80211_tx_ampdu *tap) in ampdu_tx_stop() argument
2191 struct ieee80211_node *ni = tap->txa_ni; in ampdu_tx_stop()
2194 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ampdu_tx_stop()
2195 tap->txa_ni, in ampdu_tx_stop()
2199 KASSERT(tap->txa_flags & IEEE80211_AGGR_SETUP, in ampdu_tx_stop()
2200 ("txa_flags 0x%x tid %d ac %d", tap->txa_flags, tap->txa_tid, in ampdu_tx_stop()
2201 TID_TO_WME_AC(tap->txa_tid))); in ampdu_tx_stop()
2207 ic->ic_addba_stop(ni, tap); in ampdu_tx_stop()
2211 bar_stop_timer(tap); in ampdu_tx_stop()
2216 ieee80211_txampdu_init_pps(tap); in ampdu_tx_stop()
2219 tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK); in ampdu_tx_stop()
2231 struct ieee80211_tx_ampdu *tap = arg; in addba_timeout() local
2232 struct ieee80211_node *ni = tap->txa_ni; in addba_timeout()
2236 tap->txa_flags &= ~IEEE80211_AGGR_XCHGPEND; in addba_timeout()
2237 tap->txa_attempts++; in addba_timeout()
2238 ic->ic_addba_response_timeout(ni, tap); in addba_timeout()
2242 addba_start_timeout(struct ieee80211_tx_ampdu *tap) in addba_start_timeout() argument
2245 callout_reset(&tap->txa_timer, ieee80211_addba_timeout, in addba_start_timeout()
2246 addba_timeout, tap); in addba_start_timeout()
2247 tap->txa_flags |= IEEE80211_AGGR_XCHGPEND; in addba_start_timeout()
2248 tap->txa_nextrequest = ticks + ieee80211_addba_timeout; in addba_start_timeout()
2252 addba_stop_timeout(struct ieee80211_tx_ampdu *tap) in addba_stop_timeout() argument
2255 if (tap->txa_flags & IEEE80211_AGGR_XCHGPEND) { in addba_stop_timeout()
2256 callout_stop(&tap->txa_timer); in addba_stop_timeout()
2257 tap->txa_flags &= ~IEEE80211_AGGR_XCHGPEND; in addba_stop_timeout()
2263 struct ieee80211_tx_ampdu *tap) in null_addba_response_timeout() argument
2274 struct ieee80211_tx_ampdu *tap, in ieee80211_addba_request() argument
2280 tap->txa_token = dialogtoken; in ieee80211_addba_request()
2281 tap->txa_flags |= IEEE80211_AGGR_IMMEDIATE; in ieee80211_addba_request()
2283 tap->txa_wnd = (bufsiz == 0) ? in ieee80211_addba_request()
2285 addba_start_timeout(tap); in ieee80211_addba_request()
2296 struct ieee80211_tx_ampdu *tap; in ieee80211_ampdu_tx_request_ext() local
2300 tap = &ni->ni_tx_ampdu[tid]; in ieee80211_ampdu_tx_request_ext()
2303 if ((tap->txa_flags & IEEE80211_AGGR_SETUP) == 0) { in ieee80211_ampdu_tx_request_ext()
2305 ampdu_tx_setup(tap); in ieee80211_ampdu_tx_request_ext()
2308 tap->txa_flags &= ~IEEE80211_AGGR_NAK; in ieee80211_ampdu_tx_request_ext()
2309 addba_start_timeout(tap); in ieee80211_ampdu_tx_request_ext()
2320 struct ieee80211_tx_ampdu *tap; in ieee80211_ampdu_tx_request_active_ext() local
2324 tap = &ni->ni_tx_ampdu[tid]; in ieee80211_ampdu_tx_request_active_ext()
2327 addba_stop_timeout(tap); in ieee80211_ampdu_tx_request_active_ext()
2329 tap->txa_flags |= IEEE80211_AGGR_RUNNING; in ieee80211_ampdu_tx_request_active_ext()
2330 tap->txa_attempts = 0; in ieee80211_ampdu_tx_request_active_ext()
2333 tap->txa_flags |= IEEE80211_AGGR_NAK; in ieee80211_ampdu_tx_request_active_ext()
2345 struct ieee80211_tx_ampdu *tap, in ieee80211_addba_response() argument
2352 addba_stop_timeout(tap); in ieee80211_addba_response()
2356 tap->txa_wnd = (bufsiz == 0) ? in ieee80211_addba_response()
2361 tap->txa_flags |= IEEE80211_AGGR_RUNNING; in ieee80211_addba_response()
2362 tap->txa_attempts = 0; in ieee80211_addba_response()
2367 tap->txa_flags |= IEEE80211_AGGR_AMSDU; in ieee80211_addba_response()
2369 tap->txa_flags &= ~IEEE80211_AGGR_AMSDU; in ieee80211_addba_response()
2372 tap->txa_flags |= IEEE80211_AGGR_NAK; in ieee80211_addba_response()
2382 ieee80211_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) in ieee80211_addba_stop() argument
2385 addba_stop_timeout(tap); in ieee80211_addba_stop()
2386 if (tap->txa_flags & IEEE80211_AGGR_RUNNING) { in ieee80211_addba_stop()
2388 tap->txa_flags &= ~(IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_AMSDU); in ieee80211_addba_stop()
2390 tap->txa_attempts = 0; in ieee80211_addba_stop()
2483 struct ieee80211_tx_ampdu *tap; in ht_recv_action_ba_addba_response() local
2502 tap = &ni->ni_tx_ampdu[tid]; in ht_recv_action_ba_addba_response()
2503 if ((tap->txa_flags & IEEE80211_AGGR_XCHGPEND) == 0) { in ht_recv_action_ba_addba_response()
2512 if (dialogtoken != tap->txa_token) { in ht_recv_action_ba_addba_response()
2518 tap->txa_token, dialogtoken, tid, code); in ht_recv_action_ba_addba_response()
2523 if (policy != (tap->txa_flags & IEEE80211_AGGR_IMMEDIATE)) { in ht_recv_action_ba_addba_response()
2529 tap->txa_flags & IEEE80211_AGGR_IMMEDIATE, in ht_recv_action_ba_addba_response()
2555 ic->ic_addba_response(ni, tap, code, baparamset, batimeout); in ht_recv_action_ba_addba_response()
2566 struct ieee80211_tx_ampdu *tap; in ht_recv_action_ba_delba() local
2586 tap = &ni->ni_tx_ampdu[tid]; in ht_recv_action_ba_delba()
2587 ic->ic_addba_stop(ni, tap); in ht_recv_action_ba_delba()
2660 struct ieee80211_tx_ampdu *tap) in ieee80211_ampdu_enable() argument
2664 if (tap->txa_avgpps < in ieee80211_ampdu_enable()
2665 vap->iv_ampdu_mintraffic[TID_TO_WME_AC(tap->txa_tid)]) in ieee80211_ampdu_enable()
2668 if (tap->txa_attempts >= ieee80211_addba_maxtries && in ieee80211_ampdu_enable()
2669 ieee80211_time_after(ticks, tap->txa_nextrequest)) { in ieee80211_ampdu_enable()
2679 tap->txa_tid, ieee80211_wme_acnames[TID_TO_WME_AC(tap->txa_tid)], in ieee80211_ampdu_enable()
2680 tap->txa_avgpps, tap->txa_pkts, tap->txa_attempts); in ieee80211_ampdu_enable()
2691 struct ieee80211_tx_ampdu *tap) in ieee80211_ampdu_request() argument
2699 if ((tap->txa_flags & IEEE80211_AGGR_SETUP) == 0) { in ieee80211_ampdu_request()
2701 ampdu_tx_setup(tap); in ieee80211_ampdu_request()
2704 tap->txa_flags &= ~IEEE80211_AGGR_NAK; in ieee80211_ampdu_request()
2707 tid = tap->txa_tid; in ieee80211_ampdu_request()
2712 tap->txa_start = ni->ni_txseqs[tid]; in ieee80211_ampdu_request()
2729 if (!ic->ic_addba_request(ni, tap, dialogtoken, args[2], args[3])) { in ieee80211_ampdu_request()
2733 __func__, tap->txa_tid, TID_TO_WME_AC(tap->txa_tid)); in ieee80211_ampdu_request()
2735 tap->txa_attempts = ieee80211_addba_maxtries; in ieee80211_ampdu_request()
2737 if (tap->txa_nextrequest <= ticks) in ieee80211_ampdu_request()
2738 tap->txa_nextrequest = ticks + ieee80211_addba_backoff; in ieee80211_ampdu_request()
2743 args[4] = _IEEE80211_SHIFTMASK(tap->txa_start, IEEE80211_BASEQ_START) in ieee80211_ampdu_request()
2755 ieee80211_ampdu_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, in ieee80211_ampdu_stop() argument
2763 tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; in ieee80211_ampdu_stop()
2764 if (IEEE80211_AMPDU_RUNNING(tap)) { in ieee80211_ampdu_stop()
2767 __func__, tap->txa_tid, reason, in ieee80211_ampdu_stop()
2771 ic->ic_addba_stop(ni, tap); in ieee80211_ampdu_stop()
2772 args[0] = tap->txa_tid; in ieee80211_ampdu_stop()
2780 "(reason: %d (%s))", __func__, tap->txa_tid, reason, in ieee80211_ampdu_stop()
2787 static void bar_start_timer(struct ieee80211_tx_ampdu *tap);
2792 struct ieee80211_tx_ampdu *tap = arg; in bar_timeout() local
2793 struct ieee80211_node *ni = tap->txa_ni; in bar_timeout()
2795 KASSERT((tap->txa_flags & IEEE80211_AGGR_XCHGPEND) == 0, in bar_timeout()
2796 ("bar/addba collision, flags 0x%x", tap->txa_flags)); in bar_timeout()
2800 tap->txa_tid, tap->txa_flags, tap->txa_attempts); in bar_timeout()
2803 if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0) in bar_timeout()
2806 if (tap->txa_attempts >= ieee80211_bar_maxtries) { in bar_timeout()
2818 ic->ic_bar_response(ni, tap, 1); in bar_timeout()
2819 ieee80211_ampdu_stop(ni, tap, IEEE80211_REASON_TIMEOUT); in bar_timeout()
2822 if (ieee80211_send_bar(ni, tap, tap->txa_seqpending) != 0) { in bar_timeout()
2835 tap->txa_flags |= IEEE80211_AGGR_BARPEND; in bar_timeout()
2836 bar_start_timer(tap); in bar_timeout()
2842 bar_start_timer(struct ieee80211_tx_ampdu *tap) in bar_start_timer() argument
2844 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in bar_start_timer()
2845 tap->txa_ni, in bar_start_timer()
2848 callout_reset(&tap->txa_timer, ieee80211_bar_timeout, bar_timeout, tap); in bar_start_timer()
2852 bar_stop_timer(struct ieee80211_tx_ampdu *tap) in bar_stop_timer() argument
2854 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in bar_stop_timer()
2855 tap->txa_ni, in bar_stop_timer()
2858 callout_stop(&tap->txa_timer); in bar_stop_timer()
2864 struct ieee80211_tx_ampdu *tap = arg; in bar_tx_complete() local
2868 __func__, tap->txa_tid, tap->txa_flags, in bar_tx_complete()
2869 callout_pending(&tap->txa_timer), status); in bar_tx_complete()
2873 if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) && in bar_tx_complete()
2874 callout_pending(&tap->txa_timer)) { in bar_tx_complete()
2878 bar_stop_timer(tap); in bar_tx_complete()
2879 ic->ic_bar_response(ni, tap, status); in bar_tx_complete()
2886 struct ieee80211_tx_ampdu *tap, int status) in ieee80211_bar_response() argument
2889 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ieee80211_bar_response()
2890 tap->txa_ni, in ieee80211_bar_response()
2896 tap->txa_start, in ieee80211_bar_response()
2897 IEEE80211_SEQ_ADD(tap->txa_start, tap->txa_wnd-1), in ieee80211_bar_response()
2898 tap->txa_qframes, tap->txa_seqpending, in ieee80211_bar_response()
2899 tap->txa_tid); in ieee80211_bar_response()
2902 tap->txa_start = tap->txa_seqpending; in ieee80211_bar_response()
2903 tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; in ieee80211_bar_response()
2916 struct ieee80211_tx_ampdu *tap, ieee80211_seq seq) in ieee80211_send_bar() argument
2927 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ieee80211_send_bar()
2928 tap->txa_ni, in ieee80211_send_bar()
2932 if ((tap->txa_flags & IEEE80211_AGGR_RUNNING) == 0) { in ieee80211_send_bar()
2938 bar_stop_timer(tap); in ieee80211_send_bar()
2946 if (!ieee80211_add_callback(m, bar_tx_complete, tap)) { in ieee80211_send_bar()
2959 tid = tap->txa_tid; in ieee80211_send_bar()
2960 barctl = (tap->txa_flags & IEEE80211_AGGR_IMMEDIATE ? in ieee80211_send_bar()
2977 if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0) in ieee80211_send_bar()
2978 tap->txa_attempts = 1; in ieee80211_send_bar()
2980 tap->txa_attempts++; in ieee80211_send_bar()
2981 tap->txa_seqpending = seq; in ieee80211_send_bar()
2982 tap->txa_flags |= IEEE80211_AGGR_BARPEND; in ieee80211_send_bar()
2986 tid, barctl, seq, tap->txa_attempts); in ieee80211_send_bar()
3000 tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; in ieee80211_send_bar()
3005 if (tap->txa_flags & IEEE80211_AGGR_BARPEND) in ieee80211_send_bar()
3006 bar_start_timer(tap); in ieee80211_send_bar()
3009 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ieee80211_send_bar()
3010 tap->txa_ni, in ieee80211_send_bar()