Lines Matching refs:tid_tx
143 struct tid_ampdu_tx *tid_tx) in ieee80211_assign_tid_tx() argument
147 rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx); in ieee80211_assign_tid_tx()
242 struct tid_ampdu_tx *tid_tx, u16 tid) in __acquires()
250 if (WARN(!tid_tx, in __acquires()
255 if (!skb_queue_empty(&tid_tx->pending)) { in __acquires()
258 skb_queue_splice_tail_init(&tid_tx->pending, in __acquires()
272 struct tid_ampdu_tx *tid_tx; in ieee80211_remove_tid_tx() local
277 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_remove_tid_tx()
289 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid); in ieee80211_remove_tid_tx()
296 kfree_rcu(tid_tx, rcu_head); in ieee80211_remove_tid_tx()
303 struct tid_ampdu_tx *tid_tx; in ___ieee80211_stop_tx_ba_session() local
333 tid_tx = sta->ampdu_mlme.tid_start_tx[tid]; in ___ieee80211_stop_tx_ba_session()
334 kfree(tid_tx); in ___ieee80211_stop_tx_ba_session()
337 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ___ieee80211_stop_tx_ba_session()
338 if (!tid_tx) { in ___ieee80211_stop_tx_ba_session()
347 if (test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { in ___ieee80211_stop_tx_ba_session()
357 if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state)) { in ___ieee80211_stop_tx_ba_session()
361 kfree_rcu(tid_tx, rcu_head); in ___ieee80211_stop_tx_ba_session()
365 set_bit(HT_AGG_STATE_STOPPING, &tid_tx->state); in ___ieee80211_stop_tx_ba_session()
374 del_timer_sync(&tid_tx->addba_resp_timer); in ___ieee80211_stop_tx_ba_session()
375 del_timer_sync(&tid_tx->session_timer); in ___ieee80211_stop_tx_ba_session()
382 clear_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state); in ___ieee80211_stop_tx_ba_session()
399 tid_tx->stop_initiator = reason == AGG_STOP_PEER_REQUEST ? in ___ieee80211_stop_tx_ba_session()
402 tid_tx->tx_stop = reason == AGG_STOP_LOCAL_REQUEST; in ___ieee80211_stop_tx_ba_session()
434 struct tid_ampdu_tx *tid_tx = from_timer(tid_tx, t, addba_resp_timer); in sta_addba_resp_timer_expired() local
435 struct sta_info *sta = tid_tx->sta; in sta_addba_resp_timer_expired()
436 u8 tid = tid_tx->tid; in sta_addba_resp_timer_expired()
439 if (test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) { in sta_addba_resp_timer_expired()
453 struct tid_ampdu_tx *tid_tx) in ieee80211_send_addba_with_timeout() argument
457 u8 tid = tid_tx->tid; in ieee80211_send_addba_with_timeout()
460 if (WARN_ON_ONCE(test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state) || in ieee80211_send_addba_with_timeout()
461 test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state))) in ieee80211_send_addba_with_timeout()
467 mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL); in ieee80211_send_addba_with_timeout()
490 tid_tx->dialog_token, tid_tx->ssn, in ieee80211_send_addba_with_timeout()
491 buf_size, tid_tx->timeout); in ieee80211_send_addba_with_timeout()
493 WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state)); in ieee80211_send_addba_with_timeout()
498 struct tid_ampdu_tx *tid_tx; in ieee80211_tx_ba_session_handle_start() local
511 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_tx_ba_session_handle_start()
518 clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state); in ieee80211_tx_ba_session_handle_start()
530 tid_tx->ssn = params.ssn; in ieee80211_tx_ba_session_handle_start()
539 set_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state); in ieee80211_tx_ba_session_handle_start()
545 ieee80211_agg_splice_packets(sdata, tid_tx, tid); in ieee80211_tx_ba_session_handle_start()
552 kfree_rcu(tid_tx, rcu_head); in ieee80211_tx_ba_session_handle_start()
556 ieee80211_send_addba_with_timeout(sta, tid_tx); in ieee80211_tx_ba_session_handle_start()
563 struct tid_ampdu_tx *tid_tx; in ieee80211_refresh_tx_agg_session_timer() local
568 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); in ieee80211_refresh_tx_agg_session_timer()
569 if (!tid_tx) in ieee80211_refresh_tx_agg_session_timer()
572 tid_tx->last_tx = jiffies; in ieee80211_refresh_tx_agg_session_timer()
582 struct tid_ampdu_tx *tid_tx = from_timer(tid_tx, t, session_timer); in sta_tx_agg_session_timer_expired() local
583 struct sta_info *sta = tid_tx->sta; in sta_tx_agg_session_timer_expired()
584 u8 tid = tid_tx->tid; in sta_tx_agg_session_timer_expired()
587 if (test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { in sta_tx_agg_session_timer_expired()
591 timeout = tid_tx->last_tx + TU_TO_JIFFIES(tid_tx->timeout); in sta_tx_agg_session_timer_expired()
593 mod_timer(&tid_tx->session_timer, timeout); in sta_tx_agg_session_timer_expired()
609 struct tid_ampdu_tx *tid_tx; in ieee80211_start_tx_ba_session() local
701 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_start_tx_ba_session()
703 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) { in ieee80211_start_tx_ba_session()
712 tid_tx = kzalloc(sizeof(struct tid_ampdu_tx), GFP_ATOMIC); in ieee80211_start_tx_ba_session()
713 if (!tid_tx) { in ieee80211_start_tx_ba_session()
718 skb_queue_head_init(&tid_tx->pending); in ieee80211_start_tx_ba_session()
719 __set_bit(HT_AGG_STATE_WANT_START, &tid_tx->state); in ieee80211_start_tx_ba_session()
721 tid_tx->timeout = timeout; in ieee80211_start_tx_ba_session()
722 tid_tx->sta = sta; in ieee80211_start_tx_ba_session()
723 tid_tx->tid = tid; in ieee80211_start_tx_ba_session()
726 timer_setup(&tid_tx->addba_resp_timer, sta_addba_resp_timer_expired, 0); in ieee80211_start_tx_ba_session()
729 timer_setup(&tid_tx->session_timer, in ieee80211_start_tx_ba_session()
734 tid_tx->dialog_token = sta->ampdu_mlme.dialog_token_allocator; in ieee80211_start_tx_ba_session()
740 sta->ampdu_mlme.tid_start_tx[tid] = tid_tx; in ieee80211_start_tx_ba_session()
754 struct tid_ampdu_tx *tid_tx; in ieee80211_agg_tx_operational() local
765 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_agg_tx_operational()
766 params.buf_size = tid_tx->buf_size; in ieee80211_agg_tx_operational()
767 params.amsdu = tid_tx->amsdu; in ieee80211_agg_tx_operational()
780 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid); in ieee80211_agg_tx_operational()
786 set_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state); in ieee80211_agg_tx_operational()
795 struct tid_ampdu_tx *tid_tx) in ieee80211_start_tx_ba_cb() argument
802 if (WARN_ON(test_and_set_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state))) in ieee80211_start_tx_ba_cb()
805 if (test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state) || in ieee80211_start_tx_ba_cb()
806 test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state)) in ieee80211_start_tx_ba_cb()
809 if (!test_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state)) { in ieee80211_start_tx_ba_cb()
810 ieee80211_send_addba_with_timeout(sta, tid_tx); in ieee80211_start_tx_ba_cb()
815 if (test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) in ieee80211_start_tx_ba_cb()
823 struct tid_ampdu_tx *tid_tx; in ieee80211_lookup_tid_tx() local
837 tid_tx = rcu_dereference((*sta)->ampdu_mlme.tid_tx[tid]); in ieee80211_lookup_tid_tx()
839 if (WARN_ON(!tid_tx)) in ieee80211_lookup_tid_tx()
842 return tid_tx; in ieee80211_lookup_tid_tx()
851 struct tid_ampdu_tx *tid_tx; in ieee80211_start_tx_ba_cb_irqsafe() local
856 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta); in ieee80211_start_tx_ba_cb_irqsafe()
857 if (!tid_tx) in ieee80211_start_tx_ba_cb_irqsafe()
860 set_bit(HT_AGG_STATE_START_CB, &tid_tx->state); in ieee80211_start_tx_ba_cb_irqsafe()
886 struct tid_ampdu_tx *tid_tx; in ieee80211_stop_tx_ba_session() local
898 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_stop_tx_ba_session()
900 if (!tid_tx) { in ieee80211_stop_tx_ba_session()
908 if (test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { in ieee80211_stop_tx_ba_session()
914 set_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state); in ieee80211_stop_tx_ba_session()
924 struct tid_ampdu_tx *tid_tx) in ieee80211_stop_tx_ba_cb() argument
935 if (!test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { in ieee80211_stop_tx_ba_cb()
942 if (tid_tx->stop_initiator == WLAN_BACK_INITIATOR && tid_tx->tx_stop) in ieee80211_stop_tx_ba_cb()
965 struct tid_ampdu_tx *tid_tx; in ieee80211_stop_tx_ba_cb_irqsafe() local
970 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta); in ieee80211_stop_tx_ba_cb_irqsafe()
971 if (!tid_tx) in ieee80211_stop_tx_ba_cb_irqsafe()
974 set_bit(HT_AGG_STATE_STOP_CB, &tid_tx->state); in ieee80211_stop_tx_ba_cb_irqsafe()
987 struct tid_ampdu_tx *tid_tx; in ieee80211_process_addba_resp() local
1004 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_process_addba_resp()
1005 if (!tid_tx) in ieee80211_process_addba_resp()
1008 if (mgmt->u.action.u.addba_resp.dialog_token != tid_tx->dialog_token) { in ieee80211_process_addba_resp()
1014 del_timer_sync(&tid_tx->addba_resp_timer); in ieee80211_process_addba_resp()
1024 if (test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state) || in ieee80211_process_addba_resp()
1025 test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { in ieee80211_process_addba_resp()
1041 &tid_tx->state)) { in ieee80211_process_addba_resp()
1046 tid_tx->buf_size = buf_size; in ieee80211_process_addba_resp()
1047 tid_tx->amsdu = amsdu; in ieee80211_process_addba_resp()
1049 if (test_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state)) in ieee80211_process_addba_resp()
1054 tid_tx->timeout = in ieee80211_process_addba_resp()
1057 if (tid_tx->timeout) { in ieee80211_process_addba_resp()
1058 mod_timer(&tid_tx->session_timer, in ieee80211_process_addba_resp()
1059 TU_TO_EXP_TIME(tid_tx->timeout)); in ieee80211_process_addba_resp()
1060 tid_tx->last_tx = jiffies; in ieee80211_process_addba_resp()