Lines Matching refs:sta
142 void ieee80211_assign_tid_tx(struct sta_info *sta, int tid, in ieee80211_assign_tid_tx() argument
145 lockdep_assert_held(&sta->ampdu_mlme.mtx); in ieee80211_assign_tid_tx()
146 lockdep_assert_held(&sta->lock); in ieee80211_assign_tid_tx()
147 rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx); in ieee80211_assign_tid_tx()
190 ieee80211_agg_stop_txq(struct sta_info *sta, int tid) in ieee80211_agg_stop_txq() argument
192 struct ieee80211_txq *txq = sta->sta.txq[tid]; in ieee80211_agg_stop_txq()
211 ieee80211_agg_start_txq(struct sta_info *sta, int tid, bool enable) in ieee80211_agg_start_txq() argument
213 struct ieee80211_txq *txq = sta->sta.txq[tid]; in ieee80211_agg_start_txq()
216 lockdep_assert_held(&sta->ampdu_mlme.mtx); in ieee80211_agg_start_txq()
231 schedule_and_wake_txq(sta->sdata->local, txqi); in ieee80211_agg_start_txq()
270 static void ieee80211_remove_tid_tx(struct sta_info *sta, int tid) in ieee80211_remove_tid_tx() argument
274 lockdep_assert_held(&sta->ampdu_mlme.mtx); in ieee80211_remove_tid_tx()
275 lockdep_assert_held(&sta->lock); in ieee80211_remove_tid_tx()
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()
292 ieee80211_assign_tid_tx(sta, tid, NULL); in ieee80211_remove_tid_tx()
294 ieee80211_agg_splice_finish(sta->sdata, tid); in ieee80211_remove_tid_tx()
299 int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, in ___ieee80211_stop_tx_ba_session() argument
302 struct ieee80211_local *local = sta->local; in ___ieee80211_stop_tx_ba_session()
305 .sta = &sta->sta, in ___ieee80211_stop_tx_ba_session()
314 lockdep_assert_held(&sta->ampdu_mlme.mtx); in ___ieee80211_stop_tx_ba_session()
330 spin_lock_bh(&sta->lock); in ___ieee80211_stop_tx_ba_session()
333 tid_tx = sta->ampdu_mlme.tid_start_tx[tid]; in ___ieee80211_stop_tx_ba_session()
335 sta->ampdu_mlme.tid_start_tx[tid] = NULL; in ___ieee80211_stop_tx_ba_session()
337 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ___ieee80211_stop_tx_ba_session()
339 spin_unlock_bh(&sta->lock); in ___ieee80211_stop_tx_ba_session()
348 spin_unlock_bh(&sta->lock); in ___ieee80211_stop_tx_ba_session()
352 ret = drv_ampdu_action(local, sta->sdata, ¶ms); in ___ieee80211_stop_tx_ba_session()
359 ieee80211_assign_tid_tx(sta, tid, NULL); in ___ieee80211_stop_tx_ba_session()
360 spin_unlock_bh(&sta->lock); in ___ieee80211_stop_tx_ba_session()
367 ieee80211_agg_stop_txq(sta, tid); in ___ieee80211_stop_tx_ba_session()
369 spin_unlock_bh(&sta->lock); in ___ieee80211_stop_tx_ba_session()
371 ht_dbg(sta->sdata, "Tx BA session stop requested for %pM tid %u\n", in ___ieee80211_stop_tx_ba_session()
372 sta->sta.addr, tid); in ___ieee80211_stop_tx_ba_session()
404 ret = drv_ampdu_action(local, sta->sdata, ¶ms); in ___ieee80211_stop_tx_ba_session()
435 struct sta_info *sta = tid_tx->sta; in sta_addba_resp_timer_expired() local
440 ht_dbg(sta->sdata, in sta_addba_resp_timer_expired()
442 sta->sta.addr, tid); in sta_addba_resp_timer_expired()
446 ht_dbg(sta->sdata, "addBA response timer expired on %pM tid %d\n", in sta_addba_resp_timer_expired()
447 sta->sta.addr, tid); in sta_addba_resp_timer_expired()
449 ieee80211_stop_tx_ba_session(&sta->sta, tid); in sta_addba_resp_timer_expired()
452 static void ieee80211_send_addba_with_timeout(struct sta_info *sta, in ieee80211_send_addba_with_timeout() argument
455 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_send_addba_with_timeout()
456 struct ieee80211_local *local = sta->local; in ieee80211_send_addba_with_timeout()
463 sta->sta.addr, tid); in ieee80211_send_addba_with_timeout()
465 spin_lock_bh(&sta->lock); in ieee80211_send_addba_with_timeout()
466 sta->ampdu_mlme.last_addba_req_time[tid] = jiffies; in ieee80211_send_addba_with_timeout()
467 sta->ampdu_mlme.addba_req_num[tid]++; in ieee80211_send_addba_with_timeout()
468 spin_unlock_bh(&sta->lock); in ieee80211_send_addba_with_timeout()
470 if (sta->sta.he_cap.has_he) { in ieee80211_send_addba_with_timeout()
483 ieee80211_send_addba_request(sdata, sta->sta.addr, tid, in ieee80211_send_addba_with_timeout()
490 void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) in ieee80211_tx_ba_session_handle_start() argument
493 struct ieee80211_local *local = sta->local; in ieee80211_tx_ba_session_handle_start()
494 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_tx_ba_session_handle_start()
496 .sta = &sta->sta, in ieee80211_tx_ba_session_handle_start()
505 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_tx_ba_session_handle_start()
514 ieee80211_agg_stop_txq(sta, tid); in ieee80211_tx_ba_session_handle_start()
524 params.ssn = sta->tid_seq[tid] >> 4; in ieee80211_tx_ba_session_handle_start()
539 sta->sta.addr, tid); in ieee80211_tx_ba_session_handle_start()
540 spin_lock_bh(&sta->lock); in ieee80211_tx_ba_session_handle_start()
542 ieee80211_assign_tid_tx(sta, tid, NULL); in ieee80211_tx_ba_session_handle_start()
544 spin_unlock_bh(&sta->lock); in ieee80211_tx_ba_session_handle_start()
546 ieee80211_agg_start_txq(sta, tid, false); in ieee80211_tx_ba_session_handle_start()
552 ieee80211_send_addba_with_timeout(sta, tid_tx); in ieee80211_tx_ba_session_handle_start()
562 struct sta_info *sta = tid_tx->sta; in sta_tx_agg_session_timer_expired() local
576 ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n", in sta_tx_agg_session_timer_expired()
577 sta->sta.addr, tid); in sta_tx_agg_session_timer_expired()
579 ieee80211_stop_tx_ba_session(&sta->sta, tid); in sta_tx_agg_session_timer_expired()
585 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_start_tx_ba_session() local
586 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_start_tx_ba_session()
593 if (WARN(sta->reserved_tid == tid, in ieee80211_start_tx_ba_session()
598 sta->sdata->vif.bss_conf.chandef.chan->band != NL80211_BAND_6GHZ) in ieee80211_start_tx_ba_session()
622 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { in ieee80211_start_tx_ba_session()
625 sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
629 if (test_sta_flag(sta, WLAN_STA_MFP) && in ieee80211_start_tx_ba_session()
630 !test_sta_flag(sta, WLAN_STA_AUTHORIZED)) { in ieee80211_start_tx_ba_session()
633 sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
649 if (sta->sdata->vif.type == NL80211_IFTYPE_ADHOC && in ieee80211_start_tx_ba_session()
650 !sta->sta.ht_cap.ht_supported) { in ieee80211_start_tx_ba_session()
657 spin_lock_bh(&sta->lock); in ieee80211_start_tx_ba_session()
660 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_MAX_RETRIES) { in ieee80211_start_tx_ba_session()
670 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_BURST_RETRIES && in ieee80211_start_tx_ba_session()
671 time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] + in ieee80211_start_tx_ba_session()
675 sta->ampdu_mlme.addba_req_num[tid], sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
680 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_start_tx_ba_session()
682 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) { in ieee80211_start_tx_ba_session()
685 sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
701 tid_tx->sta = sta; in ieee80211_start_tx_ba_session()
712 sta->ampdu_mlme.dialog_token_allocator++; in ieee80211_start_tx_ba_session()
713 tid_tx->dialog_token = sta->ampdu_mlme.dialog_token_allocator; in ieee80211_start_tx_ba_session()
719 sta->ampdu_mlme.tid_start_tx[tid] = tid_tx; in ieee80211_start_tx_ba_session()
721 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work); in ieee80211_start_tx_ba_session()
725 spin_unlock_bh(&sta->lock); in ieee80211_start_tx_ba_session()
731 struct sta_info *sta, u16 tid) in ieee80211_agg_tx_operational() argument
735 .sta = &sta->sta, in ieee80211_agg_tx_operational()
742 lockdep_assert_held(&sta->ampdu_mlme.mtx); in ieee80211_agg_tx_operational()
744 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_agg_tx_operational()
748 ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n", in ieee80211_agg_tx_operational()
749 sta->sta.addr, tid); in ieee80211_agg_tx_operational()
751 drv_ampdu_action(local, sta->sdata, ¶ms); in ieee80211_agg_tx_operational()
757 spin_lock_bh(&sta->lock); in ieee80211_agg_tx_operational()
759 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid); in ieee80211_agg_tx_operational()
766 ieee80211_agg_splice_finish(sta->sdata, tid); in ieee80211_agg_tx_operational()
768 spin_unlock_bh(&sta->lock); in ieee80211_agg_tx_operational()
770 ieee80211_agg_start_txq(sta, tid, true); in ieee80211_agg_tx_operational()
773 void ieee80211_start_tx_ba_cb(struct sta_info *sta, int tid, in ieee80211_start_tx_ba_cb() argument
776 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_start_tx_ba_cb()
783 ieee80211_send_addba_with_timeout(sta, tid_tx); in ieee80211_start_tx_ba_cb()
789 ieee80211_agg_tx_operational(local, sta, tid); in ieee80211_start_tx_ba_cb()
794 const u8 *ra, u16 tid, struct sta_info **sta) in ieee80211_lookup_tid_tx() argument
804 *sta = sta_info_get_bss(sdata, ra); in ieee80211_lookup_tid_tx()
805 if (!*sta) { in ieee80211_lookup_tid_tx()
810 tid_tx = rcu_dereference((*sta)->ampdu_mlme.tid_tx[tid]); in ieee80211_lookup_tid_tx()
823 struct sta_info *sta; in ieee80211_start_tx_ba_cb_irqsafe() local
829 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta); in ieee80211_start_tx_ba_cb_irqsafe()
834 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work); in ieee80211_start_tx_ba_cb_irqsafe()
840 int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, in __ieee80211_stop_tx_ba_session() argument
845 mutex_lock(&sta->ampdu_mlme.mtx); in __ieee80211_stop_tx_ba_session()
847 ret = ___ieee80211_stop_tx_ba_session(sta, tid, reason); in __ieee80211_stop_tx_ba_session()
849 mutex_unlock(&sta->ampdu_mlme.mtx); in __ieee80211_stop_tx_ba_session()
856 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_stop_tx_ba_session() local
857 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_stop_tx_ba_session()
870 spin_lock_bh(&sta->lock); in ieee80211_stop_tx_ba_session()
871 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_stop_tx_ba_session()
878 WARN(sta->reserved_tid == tid, in ieee80211_stop_tx_ba_session()
888 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work); in ieee80211_stop_tx_ba_session()
891 spin_unlock_bh(&sta->lock); in ieee80211_stop_tx_ba_session()
896 void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid, in ieee80211_stop_tx_ba_cb() argument
899 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_stop_tx_ba_cb()
904 sta->sta.addr, tid); in ieee80211_stop_tx_ba_cb()
906 spin_lock_bh(&sta->lock); in ieee80211_stop_tx_ba_cb()
911 sta->sta.addr, tid); in ieee80211_stop_tx_ba_cb()
918 ieee80211_remove_tid_tx(sta, tid); in ieee80211_stop_tx_ba_cb()
922 spin_unlock_bh(&sta->lock); in ieee80211_stop_tx_ba_cb()
925 ieee80211_agg_start_txq(sta, tid, false); in ieee80211_stop_tx_ba_cb()
928 ieee80211_send_delba(sdata, sta->sta.addr, tid, in ieee80211_stop_tx_ba_cb()
937 struct sta_info *sta; in ieee80211_stop_tx_ba_cb_irqsafe() local
943 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta); in ieee80211_stop_tx_ba_cb_irqsafe()
948 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work); in ieee80211_stop_tx_ba_cb_irqsafe()
956 struct sta_info *sta, in ieee80211_process_addba_resp() argument
971 txq = sta->sta.txq[tid]; in ieee80211_process_addba_resp()
975 mutex_lock(&sta->ampdu_mlme.mtx); in ieee80211_process_addba_resp()
977 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_process_addba_resp()
982 ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n", in ieee80211_process_addba_resp()
983 sta->sta.addr, tid); in ieee80211_process_addba_resp()
989 ht_dbg(sta->sdata, "switched off addBA timer for %pM tid %d\n", in ieee80211_process_addba_resp()
990 sta->sta.addr, tid); in ieee80211_process_addba_resp()
999 ht_dbg(sta->sdata, in ieee80211_process_addba_resp()
1001 sta->sta.addr, tid); in ieee80211_process_addba_resp()
1023 ieee80211_agg_tx_operational(local, sta, tid); in ieee80211_process_addba_resp()
1025 sta->ampdu_mlme.addba_req_num[tid] = 0; in ieee80211_process_addba_resp()
1037 ___ieee80211_stop_tx_ba_session(sta, tid, AGG_STOP_DECLINED); in ieee80211_process_addba_resp()
1041 mutex_unlock(&sta->ampdu_mlme.mtx); in ieee80211_process_addba_resp()