Lines Matching refs:sta

57  * Note that the sta can get destroyed before the BA tear down is
142 void ieee80211_assign_tid_tx(struct sta_info *sta, int tid,
145 lockdep_assert_held(&sta->ampdu_mlme.mtx);
146 lockdep_assert_held(&sta->lock);
147 rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx);
190 ieee80211_agg_stop_txq(struct sta_info *sta, int tid)
192 struct ieee80211_txq *txq = sta->sta.txq[tid];
211 ieee80211_agg_start_txq(struct sta_info *sta, int tid, bool enable)
213 struct ieee80211_txq *txq = sta->sta.txq[tid];
216 lockdep_assert_held(&sta->ampdu_mlme.mtx);
231 schedule_and_wake_txq(sta->sdata->local, txqi);
270 static void ieee80211_remove_tid_tx(struct sta_info *sta, int tid)
274 lockdep_assert_held(&sta->ampdu_mlme.mtx);
275 lockdep_assert_held(&sta->lock);
277 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
289 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid);
292 ieee80211_assign_tid_tx(sta, tid, NULL);
294 ieee80211_agg_splice_finish(sta->sdata, tid);
299 int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
302 struct ieee80211_local *local = sta->local;
305 .sta = &sta->sta,
314 lockdep_assert_held(&sta->ampdu_mlme.mtx);
330 spin_lock_bh(&sta->lock);
333 tid_tx = sta->ampdu_mlme.tid_start_tx[tid];
335 sta->ampdu_mlme.tid_start_tx[tid] = NULL;
337 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
339 spin_unlock_bh(&sta->lock);
348 spin_unlock_bh(&sta->lock);
352 ret = drv_ampdu_action(local, sta->sdata, &params);
359 ieee80211_assign_tid_tx(sta, tid, NULL);
360 spin_unlock_bh(&sta->lock);
367 ieee80211_agg_stop_txq(sta, tid);
369 spin_unlock_bh(&sta->lock);
371 ht_dbg(sta->sdata, "Tx BA session stop requested for %pM tid %u\n",
372 sta->sta.addr, tid);
404 ret = drv_ampdu_action(local, sta->sdata, &params);
435 struct sta_info *sta = tid_tx->sta;
440 ht_dbg(sta->sdata,
442 sta->sta.addr, tid);
446 ht_dbg(sta->sdata, "addBA response timer expired on %pM tid %d\n",
447 sta->sta.addr, tid);
449 ieee80211_stop_tx_ba_session(&sta->sta, tid);
452 static void ieee80211_send_addba_with_timeout(struct sta_info *sta,
455 struct ieee80211_sub_if_data *sdata = sta->sdata;
456 struct ieee80211_local *local = sta->local;
463 sta->sta.addr, tid);
465 spin_lock_bh(&sta->lock);
466 sta->ampdu_mlme.last_addba_req_time[tid] = jiffies;
467 sta->ampdu_mlme.addba_req_num[tid]++;
468 spin_unlock_bh(&sta->lock);
470 if (sta->sta.he_cap.has_he) {
483 ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
490 void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
493 struct ieee80211_local *local = sta->local;
496 .sta = &sta->sta,
505 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
514 ieee80211_agg_stop_txq(sta, tid);
524 sdata = sta->sdata;
525 params.ssn = sta->tid_seq[tid] >> 4;
543 sta->sta.addr, tid);
544 spin_lock_bh(&sta->lock);
546 ieee80211_assign_tid_tx(sta, tid, NULL);
548 spin_unlock_bh(&sta->lock);
550 ieee80211_agg_start_txq(sta, tid, false);
556 ieee80211_send_addba_with_timeout(sta, tid_tx);
566 struct sta_info *sta = tid_tx->sta;
580 ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n",
581 sta->sta.addr, tid);
583 ieee80211_stop_tx_ba_session(&sta->sta, tid);
589 struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
590 struct ieee80211_sub_if_data *sdata = sta->sdata;
597 if (WARN(sta->reserved_tid == tid,
602 sta->sdata->vif.bss_conf.chandef.chan->band != NL80211_BAND_6GHZ)
626 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) {
629 sta->sta.addr, tid);
633 if (test_sta_flag(sta, WLAN_STA_MFP) &&
634 !test_sta_flag(sta, WLAN_STA_AUTHORIZED)) {
637 sta->sta.addr, tid);
653 if (sta->sdata->vif.type == NL80211_IFTYPE_ADHOC &&
654 !sta->sta.ht_cap.ht_supported) {
661 spin_lock_bh(&sta->lock);
664 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_MAX_RETRIES) {
674 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_BURST_RETRIES &&
675 time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] +
679 sta->ampdu_mlme.addba_req_num[tid], sta->sta.addr, tid);
684 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
686 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) {
689 sta->sta.addr, tid);
705 tid_tx->sta = sta;
716 sta->ampdu_mlme.dialog_token_allocator++;
717 tid_tx->dialog_token = sta->ampdu_mlme.dialog_token_allocator;
723 sta->ampdu_mlme.tid_start_tx[tid] = tid_tx;
725 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
729 spin_unlock_bh(&sta->lock);
735 struct sta_info *sta, u16 tid)
739 .sta = &sta->sta,
746 lockdep_assert_held(&sta->ampdu_mlme.mtx);
748 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
752 ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n",
753 sta->sta.addr, tid);
755 drv_ampdu_action(local, sta->sdata, &params);
761 spin_lock_bh(&sta->lock);
763 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid);
770 ieee80211_agg_splice_finish(sta->sdata, tid);
772 spin_unlock_bh(&sta->lock);
774 ieee80211_agg_start_txq(sta, tid, true);
777 void ieee80211_start_tx_ba_cb(struct sta_info *sta, int tid,
780 struct ieee80211_sub_if_data *sdata = sta->sdata;
787 ieee80211_send_addba_with_timeout(sta, tid_tx);
793 ieee80211_agg_tx_operational(local, sta, tid);
798 const u8 *ra, u16 tid, struct sta_info **sta)
808 *sta = sta_info_get_bss(sdata, ra);
809 if (!*sta) {
814 tid_tx = rcu_dereference((*sta)->ampdu_mlme.tid_tx[tid]);
827 struct sta_info *sta;
833 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta);
838 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
844 int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
849 mutex_lock(&sta->ampdu_mlme.mtx);
851 ret = ___ieee80211_stop_tx_ba_session(sta, tid, reason);
853 mutex_unlock(&sta->ampdu_mlme.mtx);
860 struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
861 struct ieee80211_sub_if_data *sdata = sta->sdata;
874 spin_lock_bh(&sta->lock);
875 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
882 WARN(sta->reserved_tid == tid,
892 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
895 spin_unlock_bh(&sta->lock);
900 void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid,
903 struct ieee80211_sub_if_data *sdata = sta->sdata;
908 sta->sta.addr, tid);
910 spin_lock_bh(&sta->lock);
915 sta->sta.addr, tid);
922 ieee80211_remove_tid_tx(sta, tid);
926 spin_unlock_bh(&sta->lock);
929 ieee80211_agg_start_txq(sta, tid, false);
932 ieee80211_send_delba(sdata, sta->sta.addr, tid,
941 struct sta_info *sta;
947 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta);
952 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
960 struct sta_info *sta,
975 txq = sta->sta.txq[tid];
979 mutex_lock(&sta->ampdu_mlme.mtx);
981 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
986 ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n",
987 sta->sta.addr, tid);
993 ht_dbg(sta->sdata, "switched off addBA timer for %pM tid %d\n",
994 sta->sta.addr, tid);
1003 ht_dbg(sta->sdata,
1005 sta->sta.addr, tid);
1027 ieee80211_agg_tx_operational(local, sta, tid);
1029 sta->ampdu_mlme.addba_req_num[tid] = 0;
1041 ___ieee80211_stop_tx_ba_session(sta, tid, AGG_STOP_DECLINED);
1045 mutex_unlock(&sta->ampdu_mlme.mtx);