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);
1305 struct ieee80211_tx_ampdu *tap; in ieee80211_ht_node_init() local
1327 tap = &ni->ni_tx_ampdu[tid]; in ieee80211_ht_node_init()
1328 tap->txa_tid = tid; in ieee80211_ht_node_init()
1329 tap->txa_ni = ni; in ieee80211_ht_node_init()
1330 ieee80211_txampdu_init_pps(tap); in ieee80211_ht_node_init()
1357 struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[i]; in ieee80211_ht_node_cleanup() local
1358 if (tap->txa_flags & IEEE80211_AGGR_SETUP) in ieee80211_ht_node_cleanup()
1359 ampdu_tx_stop(tap); in ieee80211_ht_node_cleanup()
1456 struct ieee80211_tx_ampdu *tap; in ieee80211_ht_wds_init() local
1496 tap = &ni->ni_tx_ampdu[tid]; in ieee80211_ht_wds_init()
1497 tap->txa_tid = tid; in ieee80211_ht_wds_init()
1498 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()
2655 struct ieee80211_tx_ampdu *tap) in ieee80211_ampdu_enable() argument
2659 if (tap->txa_avgpps < in ieee80211_ampdu_enable()
2660 vap->iv_ampdu_mintraffic[TID_TO_WME_AC(tap->txa_tid)]) in ieee80211_ampdu_enable()
2663 if (tap->txa_attempts >= ieee80211_addba_maxtries && in ieee80211_ampdu_enable()
2664 ieee80211_time_after(ticks, tap->txa_nextrequest)) { in ieee80211_ampdu_enable()
2674 tap->txa_tid, ieee80211_wme_acnames[TID_TO_WME_AC(tap->txa_tid)], in ieee80211_ampdu_enable()
2675 tap->txa_avgpps, tap->txa_pkts, tap->txa_attempts); in ieee80211_ampdu_enable()
2686 struct ieee80211_tx_ampdu *tap) in ieee80211_ampdu_request() argument
2694 if ((tap->txa_flags & IEEE80211_AGGR_SETUP) == 0) { in ieee80211_ampdu_request()
2696 ampdu_tx_setup(tap); in ieee80211_ampdu_request()
2699 tap->txa_flags &= ~IEEE80211_AGGR_NAK; in ieee80211_ampdu_request()
2702 tid = tap->txa_tid; in ieee80211_ampdu_request()
2707 tap->txa_start = ni->ni_txseqs[tid]; in ieee80211_ampdu_request()
2724 if (!ic->ic_addba_request(ni, tap, dialogtoken, args[2], args[3])) { in ieee80211_ampdu_request()
2728 __func__, tap->txa_tid, TID_TO_WME_AC(tap->txa_tid)); in ieee80211_ampdu_request()
2730 tap->txa_attempts = ieee80211_addba_maxtries; in ieee80211_ampdu_request()
2732 if (tap->txa_nextrequest <= ticks) in ieee80211_ampdu_request()
2733 tap->txa_nextrequest = ticks + ieee80211_addba_backoff; in ieee80211_ampdu_request()
2738 args[4] = _IEEE80211_SHIFTMASK(tap->txa_start, IEEE80211_BASEQ_START) in ieee80211_ampdu_request()
2750 ieee80211_ampdu_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, in ieee80211_ampdu_stop() argument
2758 tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; in ieee80211_ampdu_stop()
2759 if (IEEE80211_AMPDU_RUNNING(tap)) { in ieee80211_ampdu_stop()
2762 __func__, tap->txa_tid, reason, in ieee80211_ampdu_stop()
2766 ic->ic_addba_stop(ni, tap); in ieee80211_ampdu_stop()
2767 args[0] = tap->txa_tid; in ieee80211_ampdu_stop()
2775 "(reason: %d (%s))", __func__, tap->txa_tid, reason, in ieee80211_ampdu_stop()
2782 static void bar_start_timer(struct ieee80211_tx_ampdu *tap);
2787 struct ieee80211_tx_ampdu *tap = arg; in bar_timeout() local
2788 struct ieee80211_node *ni = tap->txa_ni; in bar_timeout()
2790 KASSERT((tap->txa_flags & IEEE80211_AGGR_XCHGPEND) == 0, in bar_timeout()
2791 ("bar/addba collision, flags 0x%x", tap->txa_flags)); in bar_timeout()
2795 tap->txa_tid, tap->txa_flags, tap->txa_attempts); in bar_timeout()
2798 if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0) in bar_timeout()
2801 if (tap->txa_attempts >= ieee80211_bar_maxtries) { in bar_timeout()
2813 ic->ic_bar_response(ni, tap, 1); in bar_timeout()
2814 ieee80211_ampdu_stop(ni, tap, IEEE80211_REASON_TIMEOUT); in bar_timeout()
2817 if (ieee80211_send_bar(ni, tap, tap->txa_seqpending) != 0) { in bar_timeout()
2830 tap->txa_flags |= IEEE80211_AGGR_BARPEND; in bar_timeout()
2831 bar_start_timer(tap); in bar_timeout()
2837 bar_start_timer(struct ieee80211_tx_ampdu *tap) in bar_start_timer() argument
2839 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in bar_start_timer()
2840 tap->txa_ni, in bar_start_timer()
2843 callout_reset(&tap->txa_timer, ieee80211_bar_timeout, bar_timeout, tap); in bar_start_timer()
2847 bar_stop_timer(struct ieee80211_tx_ampdu *tap) in bar_stop_timer() argument
2849 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in bar_stop_timer()
2850 tap->txa_ni, in bar_stop_timer()
2853 callout_stop(&tap->txa_timer); in bar_stop_timer()
2859 struct ieee80211_tx_ampdu *tap = arg; in bar_tx_complete() local
2863 __func__, tap->txa_tid, tap->txa_flags, in bar_tx_complete()
2864 callout_pending(&tap->txa_timer), status); in bar_tx_complete()
2868 if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) && in bar_tx_complete()
2869 callout_pending(&tap->txa_timer)) { in bar_tx_complete()
2873 bar_stop_timer(tap); in bar_tx_complete()
2874 ic->ic_bar_response(ni, tap, status); in bar_tx_complete()
2881 struct ieee80211_tx_ampdu *tap, int status) in ieee80211_bar_response() argument
2884 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ieee80211_bar_response()
2885 tap->txa_ni, in ieee80211_bar_response()
2891 tap->txa_start, in ieee80211_bar_response()
2892 IEEE80211_SEQ_ADD(tap->txa_start, tap->txa_wnd-1), in ieee80211_bar_response()
2893 tap->txa_qframes, tap->txa_seqpending, in ieee80211_bar_response()
2894 tap->txa_tid); in ieee80211_bar_response()
2897 tap->txa_start = tap->txa_seqpending; in ieee80211_bar_response()
2898 tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; in ieee80211_bar_response()
2911 struct ieee80211_tx_ampdu *tap, ieee80211_seq seq) in ieee80211_send_bar() argument
2922 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ieee80211_send_bar()
2923 tap->txa_ni, in ieee80211_send_bar()
2927 if ((tap->txa_flags & IEEE80211_AGGR_RUNNING) == 0) { in ieee80211_send_bar()
2933 bar_stop_timer(tap); in ieee80211_send_bar()
2941 if (!ieee80211_add_callback(m, bar_tx_complete, tap)) { in ieee80211_send_bar()
2954 tid = tap->txa_tid; in ieee80211_send_bar()
2955 barctl = (tap->txa_flags & IEEE80211_AGGR_IMMEDIATE ? in ieee80211_send_bar()
2972 if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0) in ieee80211_send_bar()
2973 tap->txa_attempts = 1; in ieee80211_send_bar()
2975 tap->txa_attempts++; in ieee80211_send_bar()
2976 tap->txa_seqpending = seq; in ieee80211_send_bar()
2977 tap->txa_flags |= IEEE80211_AGGR_BARPEND; in ieee80211_send_bar()
2981 tid, barctl, seq, tap->txa_attempts); in ieee80211_send_bar()
2995 tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; in ieee80211_send_bar()
3000 if (tap->txa_flags & IEEE80211_AGGR_BARPEND) in ieee80211_send_bar()
3001 bar_start_timer(tap); in ieee80211_send_bar()
3004 IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, in ieee80211_send_bar()
3005 tap->txa_ni, in ieee80211_send_bar()