Lines Matching refs:sta

129 void ieee80211_assign_tid_tx(struct sta_info *sta, int tid,  in ieee80211_assign_tid_tx()  argument
132 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_assign_tid_tx()
133 lockdep_assert_held(&sta->lock); in ieee80211_assign_tid_tx()
134 rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx); in ieee80211_assign_tid_tx()
177 ieee80211_agg_stop_txq(struct sta_info *sta, int tid) in ieee80211_agg_stop_txq() argument
179 struct ieee80211_txq *txq = sta->sta.txq[tid]; in ieee80211_agg_stop_txq()
198 ieee80211_agg_start_txq(struct sta_info *sta, int tid, bool enable) in ieee80211_agg_start_txq() argument
200 struct ieee80211_txq *txq = sta->sta.txq[tid]; in ieee80211_agg_start_txq()
203 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_agg_start_txq()
218 schedule_and_wake_txq(sta->sdata->local, txqi); in ieee80211_agg_start_txq()
257 static void ieee80211_remove_tid_tx(struct sta_info *sta, int tid) in ieee80211_remove_tid_tx() argument
261 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_remove_tid_tx()
262 lockdep_assert_held(&sta->lock); in ieee80211_remove_tid_tx()
264 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_remove_tid_tx()
276 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid); in ieee80211_remove_tid_tx()
279 ieee80211_assign_tid_tx(sta, tid, NULL); in ieee80211_remove_tid_tx()
281 ieee80211_agg_splice_finish(sta->sdata, tid); in ieee80211_remove_tid_tx()
286 int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, in __ieee80211_stop_tx_ba_session() argument
289 struct ieee80211_local *local = sta->local; in __ieee80211_stop_tx_ba_session()
292 .sta = &sta->sta, in __ieee80211_stop_tx_ba_session()
301 lockdep_assert_wiphy(sta->local->hw.wiphy); in __ieee80211_stop_tx_ba_session()
317 spin_lock_bh(&sta->lock); in __ieee80211_stop_tx_ba_session()
320 tid_tx = sta->ampdu_mlme.tid_start_tx[tid]; in __ieee80211_stop_tx_ba_session()
322 sta->ampdu_mlme.tid_start_tx[tid] = NULL; in __ieee80211_stop_tx_ba_session()
324 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in __ieee80211_stop_tx_ba_session()
326 spin_unlock_bh(&sta->lock); in __ieee80211_stop_tx_ba_session()
335 spin_unlock_bh(&sta->lock); in __ieee80211_stop_tx_ba_session()
339 ret = drv_ampdu_action(local, sta->sdata, &params); in __ieee80211_stop_tx_ba_session()
346 ieee80211_assign_tid_tx(sta, tid, NULL); in __ieee80211_stop_tx_ba_session()
347 spin_unlock_bh(&sta->lock); in __ieee80211_stop_tx_ba_session()
354 ieee80211_agg_stop_txq(sta, tid); in __ieee80211_stop_tx_ba_session()
356 spin_unlock_bh(&sta->lock); in __ieee80211_stop_tx_ba_session()
358 ht_dbg(sta->sdata, "Tx BA session stop requested for %pM tid %u\n", in __ieee80211_stop_tx_ba_session()
359 sta->sta.addr, tid); in __ieee80211_stop_tx_ba_session()
391 ret = drv_ampdu_action(local, sta->sdata, &params); in __ieee80211_stop_tx_ba_session()
422 struct sta_info *sta = tid_tx->sta; in sta_addba_resp_timer_expired() local
427 ht_dbg(sta->sdata, in sta_addba_resp_timer_expired()
429 sta->sta.addr, tid); in sta_addba_resp_timer_expired()
433 ht_dbg(sta->sdata, "addBA response timer expired on %pM tid %d\n", in sta_addba_resp_timer_expired()
434 sta->sta.addr, tid); in sta_addba_resp_timer_expired()
436 ieee80211_stop_tx_ba_session(&sta->sta, tid); in sta_addba_resp_timer_expired()
439 static void ieee80211_send_addba_with_timeout(struct sta_info *sta, in ieee80211_send_addba_with_timeout() argument
442 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_send_addba_with_timeout()
443 struct ieee80211_local *local = sta->local; in ieee80211_send_addba_with_timeout()
451 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_send_addba_with_timeout()
456 sta->sta.addr, tid); in ieee80211_send_addba_with_timeout()
458 spin_lock_bh(&sta->lock); in ieee80211_send_addba_with_timeout()
459 sta->ampdu_mlme.last_addba_req_time[tid] = jiffies; in ieee80211_send_addba_with_timeout()
460 sta->ampdu_mlme.addba_req_num[tid]++; in ieee80211_send_addba_with_timeout()
461 spin_unlock_bh(&sta->lock); in ieee80211_send_addba_with_timeout()
463 if (sta->sta.deflink.he_cap.has_he) { in ieee80211_send_addba_with_timeout()
476 ieee80211_send_addba_request(sdata, sta->sta.addr, tid, in ieee80211_send_addba_with_timeout()
483 void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) in ieee80211_tx_ba_session_handle_start() argument
486 struct ieee80211_local *local = sta->local; in ieee80211_tx_ba_session_handle_start()
487 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_tx_ba_session_handle_start()
489 .sta = &sta->sta, in ieee80211_tx_ba_session_handle_start()
498 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_tx_ba_session_handle_start()
515 params.ssn = sta->tid_seq[tid] >> 4; in ieee80211_tx_ba_session_handle_start()
530 sta->sta.addr, tid); in ieee80211_tx_ba_session_handle_start()
531 spin_lock_bh(&sta->lock); in ieee80211_tx_ba_session_handle_start()
533 ieee80211_assign_tid_tx(sta, tid, NULL); in ieee80211_tx_ba_session_handle_start()
535 spin_unlock_bh(&sta->lock); in ieee80211_tx_ba_session_handle_start()
537 ieee80211_agg_start_txq(sta, tid, false); in ieee80211_tx_ba_session_handle_start()
543 ieee80211_send_addba_with_timeout(sta, tid_tx); in ieee80211_tx_ba_session_handle_start()
549 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_refresh_tx_agg_session_timer() local
555 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); in ieee80211_refresh_tx_agg_session_timer()
570 struct sta_info *sta = tid_tx->sta; in sta_tx_agg_session_timer_expired() local
584 ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n", in sta_tx_agg_session_timer_expired()
585 sta->sta.addr, tid); in sta_tx_agg_session_timer_expired()
587 ieee80211_stop_tx_ba_session(&sta->sta, tid); in sta_tx_agg_session_timer_expired()
593 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_start_tx_ba_session() local
594 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_start_tx_ba_session()
601 if (WARN(sta->reserved_tid == tid, in ieee80211_start_tx_ba_session()
632 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { in ieee80211_start_tx_ba_session()
635 sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
639 if (test_sta_flag(sta, WLAN_STA_MFP) && in ieee80211_start_tx_ba_session()
640 !test_sta_flag(sta, WLAN_STA_AUTHORIZED)) { in ieee80211_start_tx_ba_session()
643 sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
659 if (sta->sdata->vif.type == NL80211_IFTYPE_ADHOC && in ieee80211_start_tx_ba_session()
660 !sta->sta.deflink.ht_cap.ht_supported) { in ieee80211_start_tx_ba_session()
667 spin_lock_bh(&sta->lock); in ieee80211_start_tx_ba_session()
670 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_MAX_RETRIES) { in ieee80211_start_tx_ba_session()
680 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_BURST_RETRIES && in ieee80211_start_tx_ba_session()
681 time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] + in ieee80211_start_tx_ba_session()
685 sta->ampdu_mlme.addba_req_num[tid], sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
690 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_start_tx_ba_session()
692 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) { in ieee80211_start_tx_ba_session()
695 sta->sta.addr, tid); in ieee80211_start_tx_ba_session()
711 tid_tx->sta = sta; in ieee80211_start_tx_ba_session()
722 sta->ampdu_mlme.dialog_token_allocator++; in ieee80211_start_tx_ba_session()
723 tid_tx->dialog_token = sta->ampdu_mlme.dialog_token_allocator; in ieee80211_start_tx_ba_session()
729 sta->ampdu_mlme.tid_start_tx[tid] = tid_tx; in ieee80211_start_tx_ba_session()
731 wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work); in ieee80211_start_tx_ba_session()
735 spin_unlock_bh(&sta->lock); in ieee80211_start_tx_ba_session()
741 struct sta_info *sta, u16 tid) in ieee80211_agg_tx_operational() argument
745 .sta = &sta->sta, in ieee80211_agg_tx_operational()
752 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_agg_tx_operational()
754 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_agg_tx_operational()
758 ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n", in ieee80211_agg_tx_operational()
759 sta->sta.addr, tid); in ieee80211_agg_tx_operational()
761 drv_ampdu_action(local, sta->sdata, &params); in ieee80211_agg_tx_operational()
767 spin_lock_bh(&sta->lock); in ieee80211_agg_tx_operational()
769 ieee80211_agg_splice_packets(sta->sdata, tid_tx, tid); in ieee80211_agg_tx_operational()
776 ieee80211_agg_splice_finish(sta->sdata, tid); in ieee80211_agg_tx_operational()
778 spin_unlock_bh(&sta->lock); in ieee80211_agg_tx_operational()
780 ieee80211_agg_start_txq(sta, tid, true); in ieee80211_agg_tx_operational()
783 void ieee80211_start_tx_ba_cb(struct sta_info *sta, int tid, in ieee80211_start_tx_ba_cb() argument
786 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_start_tx_ba_cb()
789 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_start_tx_ba_cb()
799 ieee80211_send_addba_with_timeout(sta, tid_tx); in ieee80211_start_tx_ba_cb()
805 ieee80211_agg_tx_operational(local, sta, tid); in ieee80211_start_tx_ba_cb()
810 const u8 *ra, u16 tid, struct sta_info **sta) in ieee80211_lookup_tid_tx() argument
820 *sta = sta_info_get_bss(sdata, ra); in ieee80211_lookup_tid_tx()
821 if (!*sta) { in ieee80211_lookup_tid_tx()
826 tid_tx = rcu_dereference((*sta)->ampdu_mlme.tid_tx[tid]); in ieee80211_lookup_tid_tx()
839 struct sta_info *sta; in ieee80211_start_tx_ba_cb_irqsafe() local
845 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta); in ieee80211_start_tx_ba_cb_irqsafe()
850 wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work); in ieee80211_start_tx_ba_cb_irqsafe()
858 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_stop_tx_ba_session() local
859 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_stop_tx_ba_session()
872 spin_lock_bh(&sta->lock); in ieee80211_stop_tx_ba_session()
873 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_stop_tx_ba_session()
880 WARN(sta->reserved_tid == tid, in ieee80211_stop_tx_ba_session()
890 wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work); in ieee80211_stop_tx_ba_session()
893 spin_unlock_bh(&sta->lock); in ieee80211_stop_tx_ba_session()
898 void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid, in ieee80211_stop_tx_ba_cb() argument
901 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_stop_tx_ba_cb()
906 sta->sta.addr, tid); in ieee80211_stop_tx_ba_cb()
908 spin_lock_bh(&sta->lock); in ieee80211_stop_tx_ba_cb()
913 sta->sta.addr, tid); in ieee80211_stop_tx_ba_cb()
920 ieee80211_remove_tid_tx(sta, tid); in ieee80211_stop_tx_ba_cb()
924 spin_unlock_bh(&sta->lock); in ieee80211_stop_tx_ba_cb()
927 ieee80211_agg_start_txq(sta, tid, false); in ieee80211_stop_tx_ba_cb()
930 ieee80211_send_delba(sdata, sta->sta.addr, tid, in ieee80211_stop_tx_ba_cb()
939 struct sta_info *sta; in ieee80211_stop_tx_ba_cb_irqsafe() local
945 tid_tx = ieee80211_lookup_tid_tx(sdata, ra, tid, &sta); in ieee80211_stop_tx_ba_cb_irqsafe()
950 wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work); in ieee80211_stop_tx_ba_cb_irqsafe()
958 struct sta_info *sta, in ieee80211_process_addba_resp() argument
967 lockdep_assert_wiphy(sta->local->hw.wiphy); in ieee80211_process_addba_resp()
975 txq = sta->sta.txq[tid]; in ieee80211_process_addba_resp()
979 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); in ieee80211_process_addba_resp()
984 ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n", in ieee80211_process_addba_resp()
985 sta->sta.addr, tid); in ieee80211_process_addba_resp()
991 ht_dbg(sta->sdata, "switched off addBA timer for %pM tid %d\n", in ieee80211_process_addba_resp()
992 sta->sta.addr, tid); in ieee80211_process_addba_resp()
1001 ht_dbg(sta->sdata, in ieee80211_process_addba_resp()
1003 sta->sta.addr, tid); in ieee80211_process_addba_resp()
1025 ieee80211_agg_tx_operational(local, sta, tid); in ieee80211_process_addba_resp()
1027 sta->ampdu_mlme.addba_req_num[tid] = 0; in ieee80211_process_addba_resp()
1039 __ieee80211_stop_tx_ba_session(sta, tid, AGG_STOP_DECLINED); in ieee80211_process_addba_resp()