Lines Matching refs:sta
310 if (tx->sta) in ieee80211_tx_h_check_assoc()
311 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_check_assoc()
345 struct sta_info *sta; in purge_old_ps_buffers() local
369 list_for_each_entry_rcu(sta, &local->sta_list, list) { in purge_old_ps_buffers()
373 skb = skb_dequeue(&sta->ps_tx_buf[ac]); in purge_old_ps_buffers()
374 total += skb_queue_len(&sta->ps_tx_buf[ac]); in purge_old_ps_buffers()
452 static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta, in ieee80211_use_mfp() argument
458 if (sta == NULL || !test_sta_flag(sta, WLAN_STA_MFP)) in ieee80211_use_mfp()
470 struct sta_info *sta = tx->sta; in ieee80211_tx_h_unicast_ps_buf() local
475 if (unlikely(!sta)) in ieee80211_tx_h_unicast_ps_buf()
478 if (unlikely((test_sta_flag(sta, WLAN_STA_PS_STA) || in ieee80211_tx_h_unicast_ps_buf()
479 test_sta_flag(sta, WLAN_STA_PS_DRIVER) || in ieee80211_tx_h_unicast_ps_buf()
480 test_sta_flag(sta, WLAN_STA_PS_DELIVER)) && in ieee80211_tx_h_unicast_ps_buf()
490 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", in ieee80211_tx_h_unicast_ps_buf()
491 sta->sta.addr, sta->sta.aid, ac); in ieee80211_tx_h_unicast_ps_buf()
496 spin_lock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
502 if (!test_sta_flag(sta, WLAN_STA_PS_STA) && in ieee80211_tx_h_unicast_ps_buf()
503 !test_sta_flag(sta, WLAN_STA_PS_DRIVER) && in ieee80211_tx_h_unicast_ps_buf()
504 !test_sta_flag(sta, WLAN_STA_PS_DELIVER)) { in ieee80211_tx_h_unicast_ps_buf()
505 spin_unlock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
509 if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { in ieee80211_tx_h_unicast_ps_buf()
510 struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); in ieee80211_tx_h_unicast_ps_buf()
513 sta->sta.addr, ac); in ieee80211_tx_h_unicast_ps_buf()
522 skb_queue_tail(&sta->ps_tx_buf[ac], tx->skb); in ieee80211_tx_h_unicast_ps_buf()
523 spin_unlock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
534 sta_info_recalc_tim(sta); in ieee80211_tx_h_unicast_ps_buf()
537 } else if (unlikely(test_sta_flag(sta, WLAN_STA_PS_STA))) { in ieee80211_tx_h_unicast_ps_buf()
540 sta->sta.addr); in ieee80211_tx_h_unicast_ps_buf()
614 if (tx->sta && in ieee80211_tx_h_select_key()
615 (key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]))) in ieee80211_tx_h_select_key()
642 !ieee80211_use_mfp(hdr->frame_control, tx->sta, in ieee80211_tx_h_select_key()
668 } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta && in ieee80211_tx_h_select_key()
669 test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) { in ieee80211_tx_h_select_key()
733 (tx->sta && test_sta_flag(tx->sta, WLAN_STA_SHORT_PREAMBLE)))) in ieee80211_tx_h_rate_ctrl()
742 if (tx->sta) in ieee80211_tx_h_rate_ctrl()
743 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_rate_ctrl()
750 !rate_usable_index_exists(sband, &tx->sta->sta), in ieee80211_tx_h_rate_ctrl()
763 rate_control_get_rate(tx->sdata, tx->sta, &txrc); in ieee80211_tx_h_rate_ctrl()
765 if (tx->sta && !info->control.skip_table) in ieee80211_tx_h_rate_ctrl()
766 ratetbl = rcu_dereference(tx->sta->sta.rates); in ieee80211_tx_h_rate_ctrl()
789 if (tx->sta && ieee80211_is_tx_data(tx->skb)) in ieee80211_tx_h_rate_ctrl()
790 tx->sta->deflink.tx_stats.last_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
791 } else if (tx->sta) in ieee80211_tx_h_rate_ctrl()
792 tx->sta->deflink.tx_stats.last_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
807 static __le16 ieee80211_tx_next_seq(struct sta_info *sta, int tid) in ieee80211_tx_next_seq() argument
809 u16 *seq = &sta->tid_seq[tid]; in ieee80211_tx_next_seq()
868 if (tx->sta) in ieee80211_tx_h_sequence()
869 tx->sta->deflink.tx_stats.msdu[IEEE80211_NUM_TIDS]++; in ieee80211_tx_h_sequence()
878 if (!tx->sta) in ieee80211_tx_h_sequence()
883 tx->sta->deflink.tx_stats.msdu[tid]++; in ieee80211_tx_h_sequence()
885 hdr->seq_ctrl = ieee80211_tx_next_seq(tx->sta, tid); in ieee80211_tx_h_sequence()
1031 if (!tx->sta) in ieee80211_tx_h_stats()
1036 tx->sta->deflink.tx_stats.bytes[ac] += skb->len; in ieee80211_tx_h_stats()
1039 tx->sta->deflink.tx_stats.packets[ac]++; in ieee80211_tx_h_stats()
1122 } else if (!tx->sta->sta.txq[tid]) { in ieee80211_tx_prep_agg()
1123 spin_lock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1142 tid_tx = rcu_dereference_protected_tid_tx(tx->sta, tid); in ieee80211_tx_prep_agg()
1151 clear_sta_flag(tx->sta, WLAN_STA_SP); in ieee80211_tx_prep_agg()
1152 ps_dbg(tx->sta->sdata, in ieee80211_tx_prep_agg()
1154 tx->sta->sta.addr, tx->sta->sta.aid); in ieee80211_tx_prep_agg()
1163 spin_unlock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1177 struct sta_info *sta, struct sk_buff *skb) in ieee80211_aggr_check() argument
1185 if (!sta || !sta->sta.deflink.ht_cap.ht_supported || in ieee80211_aggr_check()
1186 !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO || in ieee80211_aggr_check()
1191 if (likely(sta->ampdu_mlme.tid_tx[tid])) in ieee80211_aggr_check()
1194 ieee80211_start_tx_ba_session(&sta->sta, tid, 0); in ieee80211_aggr_check()
1205 struct sta_info *sta, struct sk_buff *skb) in ieee80211_tx_prepare() argument
1228 if (likely(sta)) { in ieee80211_tx_prepare()
1229 if (!IS_ERR(sta)) in ieee80211_tx_prepare()
1230 tx->sta = sta; in ieee80211_tx_prepare()
1233 tx->sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_tx_prepare()
1234 if (!tx->sta && sdata->wdev.use_4addr) in ieee80211_tx_prepare()
1237 tx->sta = sta_info_get_bss(sdata, hdr->addr1); in ieee80211_tx_prepare()
1239 if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) { in ieee80211_tx_prepare()
1240 tx->sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_prepare()
1245 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && in ieee80211_tx_prepare()
1252 tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]); in ieee80211_tx_prepare()
1254 ieee80211_aggr_check(sdata, tx->sta, skb); in ieee80211_tx_prepare()
1255 tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]); in ieee80211_tx_prepare()
1282 if (!tx->sta) in ieee80211_tx_prepare()
1284 else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) { in ieee80211_tx_prepare()
1286 ieee80211_check_fast_xmit(tx->sta); in ieee80211_tx_prepare()
1296 struct sta_info *sta, in ieee80211_get_txq() argument
1312 sta && sta->uploaded) { in ieee80211_get_txq()
1317 txq = sta->sta.txq[IEEE80211_NUM_TIDS]; in ieee80211_get_txq()
1319 } else if (sta) { in ieee80211_get_txq()
1322 if (!sta->uploaded) in ieee80211_get_txq()
1325 txq = sta->sta.txq[tid]; in ieee80211_get_txq()
1406 if (txqi->txq.sta) { in fq_tin_dequeue_func()
1407 struct sta_info *sta = container_of(txqi->txq.sta, in fq_tin_dequeue_func() local
1408 struct sta_info, sta); in fq_tin_dequeue_func()
1409 cparams = &sta->cparams; in fq_tin_dequeue_func()
1504 struct sta_info *sta, in ieee80211_txq_init() argument
1515 if (!sta) { in ieee80211_txq_init()
1539 txqi->txq.sta = &sta->sta; in ieee80211_txq_init()
1541 sta->sta.txq[tid] = &txqi->txq; in ieee80211_txq_init()
1643 struct sta_info *sta, in ieee80211_queue_skb() argument
1657 txqi = ieee80211_get_txq(local, vif, sta, skb); in ieee80211_queue_skb()
1671 struct sta_info *sta, in ieee80211_tx_frags() argument
1733 control.sta = sta ? &sta->sta : NULL; in ieee80211_tx_frags()
1746 struct sk_buff_head *skbs, struct sta_info *sta, in __ieee80211_tx() argument
1761 if (sta && !sta->uploaded) in __ieee80211_tx()
1762 sta = NULL; in __ieee80211_tx()
1790 result = ieee80211_tx_frags(local, vif, sta, skbs, txpending); in __ieee80211_tx()
1893 int band, struct ieee80211_sta **sta) in ieee80211_tx_prepare_skb() argument
1910 if (sta) { in ieee80211_tx_prepare_skb()
1911 if (tx.sta) in ieee80211_tx_prepare_skb()
1912 *sta = &tx.sta->sta; in ieee80211_tx_prepare_skb()
1914 *sta = NULL; in ieee80211_tx_prepare_skb()
1933 struct sta_info *sta, struct sk_buff *skb, in ieee80211_tx() argument
1948 res_prepare = ieee80211_tx_prepare(sdata, &tx, sta, skb); in ieee80211_tx()
1966 if (ieee80211_queue_skb(local, sdata, tx.sta, tx.skb)) in ieee80211_tx()
1970 result = __ieee80211_tx(local, &tx.skbs, tx.sta, txpending); in ieee80211_tx()
2021 struct sta_info *sta, struct sk_buff *skb) in ieee80211_xmit() argument
2062 ieee80211_tx(sdata, sta, skb, false); in ieee80211_xmit()
2476 struct sta_info *sta; in ieee80211_lookup_ra_sta() local
2480 sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_lookup_ra_sta()
2481 if (sta) { in ieee80211_lookup_ra_sta()
2482 *sta_out = sta; in ieee80211_lookup_ra_sta()
2495 sta = sta_info_get_bss(sdata, skb->data); in ieee80211_lookup_ra_sta()
2505 sta = sta_info_get(sdata, skb->data); in ieee80211_lookup_ra_sta()
2506 if (sta && test_sta_flag(sta, WLAN_STA_TDLS_PEER)) { in ieee80211_lookup_ra_sta()
2507 if (test_sta_flag(sta, in ieee80211_lookup_ra_sta()
2509 *sta_out = sta; in ieee80211_lookup_ra_sta()
2526 sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr); in ieee80211_lookup_ra_sta()
2527 if (!sta) in ieee80211_lookup_ra_sta()
2534 *sta_out = sta ?: ERR_PTR(-ENOENT); in ieee80211_lookup_ra_sta()
2598 struct sta_info *sta, u32 ctrl_flags, in ieee80211_build_hdr() argument
2620 if (IS_ERR(sta)) in ieee80211_build_hdr()
2621 sta = NULL; in ieee80211_build_hdr()
2642 memcpy(hdr.addr1, sta->sta.addr, ETH_ALEN); in ieee80211_build_hdr()
2647 authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); in ieee80211_build_hdr()
2648 wme_sta = sta->sta.wme; in ieee80211_build_hdr()
2668 if (ieee80211_vif_is_mld(&sdata->vif) && sta && !sta->sta.mlo) { in ieee80211_build_hdr()
2671 link_id = sta->deflink.link_id; in ieee80211_build_hdr()
2679 (sta && sta->sta.mlo)) { in ieee80211_build_hdr()
2773 tdls_peer = test_sta_flag(sta, WLAN_STA_TDLS_PEER); in ieee80211_build_hdr()
2777 int tdls_link_id = ieee80211_tdls_sta_link_id(sta); in ieee80211_build_hdr()
2842 if (sta) { in ieee80211_build_hdr()
2843 authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); in ieee80211_build_hdr()
2844 wme_sta = sta->sta.wme; in ieee80211_build_hdr()
3025 void ieee80211_check_fast_xmit(struct sta_info *sta) in ieee80211_check_fast_xmit() argument
3028 struct ieee80211_local *local = sta->local; in ieee80211_check_fast_xmit()
3029 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_check_fast_xmit()
3038 mesh_fast_tx_flush_sta(sdata, sta); in ieee80211_check_fast_xmit()
3052 spin_lock_bh(&sta->lock); in ieee80211_check_fast_xmit()
3058 if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED) || !sta->uploaded) in ieee80211_check_fast_xmit()
3061 if (test_sta_flag(sta, WLAN_STA_PS_STA) || in ieee80211_check_fast_xmit()
3062 test_sta_flag(sta, WLAN_STA_PS_DRIVER) || in ieee80211_check_fast_xmit()
3063 test_sta_flag(sta, WLAN_STA_PS_DELIVER) || in ieee80211_check_fast_xmit()
3064 test_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT)) in ieee80211_check_fast_xmit()
3101 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER)) { in ieee80211_check_fast_xmit()
3103 int tdls_link_id = ieee80211_tdls_sta_link_id(sta); in ieee80211_check_fast_xmit()
3142 memcpy(hdr->addr1, sta->sta.addr, ETH_ALEN); in ieee80211_check_fast_xmit()
3154 if (sta->sta.mlo || !ieee80211_vif_is_mld(&sdata->vif)) { in ieee80211_check_fast_xmit()
3157 unsigned int link_id = sta->deflink.link_id; in ieee80211_check_fast_xmit()
3177 if (sta->sta.wme) { in ieee80211_check_fast_xmit()
3187 build.key = rcu_access_pointer(sta->ptk[sta->ptk_idx]); in ieee80211_check_fast_xmit()
3265 old = rcu_dereference_protected(sta->fast_tx, in ieee80211_check_fast_xmit()
3266 lockdep_is_held(&sta->lock)); in ieee80211_check_fast_xmit()
3267 rcu_assign_pointer(sta->fast_tx, fast_tx); in ieee80211_check_fast_xmit()
3270 spin_unlock_bh(&sta->lock); in ieee80211_check_fast_xmit()
3275 struct sta_info *sta; in ieee80211_check_fast_xmit_all() local
3278 list_for_each_entry_rcu(sta, &local->sta_list, list) in ieee80211_check_fast_xmit_all()
3279 ieee80211_check_fast_xmit(sta); in ieee80211_check_fast_xmit_all()
3286 struct sta_info *sta; in ieee80211_check_fast_xmit_iface() local
3290 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_check_fast_xmit_iface()
3291 if (sdata != sta->sdata && in ieee80211_check_fast_xmit_iface()
3292 (!sta->sdata->bss || sta->sdata->bss != sdata->bss)) in ieee80211_check_fast_xmit_iface()
3294 ieee80211_check_fast_xmit(sta); in ieee80211_check_fast_xmit_iface()
3300 void ieee80211_clear_fast_xmit(struct sta_info *sta) in ieee80211_clear_fast_xmit() argument
3304 spin_lock_bh(&sta->lock); in ieee80211_clear_fast_xmit()
3305 fast_tx = rcu_dereference_protected(sta->fast_tx, in ieee80211_clear_fast_xmit()
3306 lockdep_is_held(&sta->lock)); in ieee80211_clear_fast_xmit()
3307 RCU_INIT_POINTER(sta->fast_tx, NULL); in ieee80211_clear_fast_xmit()
3308 spin_unlock_bh(&sta->lock); in ieee80211_clear_fast_xmit()
3398 struct sta_info *sta, in ieee80211_amsdu_aggregate() argument
3408 struct ieee80211_txq *txq = sta->sta.txq[tid]; in ieee80211_amsdu_aggregate()
3412 u8 max_subframes = sta->sta.max_amsdu_subframes; in ieee80211_amsdu_aggregate()
3414 int max_amsdu_len = sta->sta.cur->max_amsdu_len; in ieee80211_amsdu_aggregate()
3443 if (sta->sta.cur->max_rc_amsdu_len) in ieee80211_amsdu_aggregate()
3445 sta->sta.cur->max_rc_amsdu_len); in ieee80211_amsdu_aggregate()
3447 if (sta->sta.cur->max_tid_amsdu_len[tid]) in ieee80211_amsdu_aggregate()
3449 sta->sta.cur->max_tid_amsdu_len[tid]); in ieee80211_amsdu_aggregate()
3549 struct sta_info *sta, u8 pn_offs, in ieee80211_xmit_fast_finish() argument
3569 hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); in ieee80211_xmit_fast_finish()
3577 sta->deflink.tx_stats.msdu[tid] += in ieee80211_xmit_fast_finish()
3580 sta->deflink.tx_stats.msdu[tid]++; in ieee80211_xmit_fast_finish()
3587 sta->deflink.tx_stats.bytes[skb_get_queue_mapping(skb)] += skb->len; in ieee80211_xmit_fast_finish()
3588 sta->deflink.tx_stats.packets[skb_get_queue_mapping(skb)]++; in ieee80211_xmit_fast_finish()
3667 struct sta_info *sta, in __ieee80211_xmit_fast() argument
3685 ieee80211_amsdu_aggregate(sdata, sta, fast_tx, skb, da, sa)) in __ieee80211_xmit_fast()
3729 tx.sta = sta; in __ieee80211_xmit_fast()
3732 if (ieee80211_queue_skb(local, sdata, sta, skb)) in __ieee80211_xmit_fast()
3736 r = ieee80211_xmit_fast_finish(sdata, sta, fast_tx->pn_offs, in __ieee80211_xmit_fast()
3747 ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false); in __ieee80211_xmit_fast()
3755 struct sta_info *sta, in ieee80211_xmit_fast() argument
3780 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); in ieee80211_xmit_fast()
3798 __ieee80211_xmit_fast(sdata, sta, fast_tx, skb, tid_tx, in ieee80211_xmit_fast()
3869 if (txq->sta) { in ieee80211_tx_dequeue()
3870 tx.sta = container_of(txq->sta, struct sta_info, sta); in ieee80211_tx_dequeue()
3880 !test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) && in ieee80211_tx_dequeue()
3917 struct sta_info *sta = container_of(txq->sta, struct sta_info, in ieee80211_tx_dequeue() local
3918 sta); in ieee80211_tx_dequeue()
3925 r = ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs, in ieee80211_tx_dequeue()
3985 if (tx.sta && in ieee80211_tx_dequeue()
3990 airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta, in ieee80211_tx_dequeue()
3994 ieee80211_sta_update_pending_airtime(local, tx.sta, in ieee80211_tx_dequeue()
4010 static inline s32 ieee80211_sta_deficit(struct sta_info *sta, u8 ac) in ieee80211_sta_deficit() argument
4012 struct airtime_info *air_info = &sta->airtime[ac]; in ieee80211_sta_deficit()
4020 struct sta_info *sta; in ieee80211_txq_set_active() local
4022 if (!txqi->txq.sta) in ieee80211_txq_set_active()
4025 sta = container_of(txqi->txq.sta, struct sta_info, sta); in ieee80211_txq_set_active()
4026 sta->airtime[txqi->txq.ac].last_active = jiffies; in ieee80211_txq_set_active()
4032 struct sta_info *sta; in ieee80211_txq_keep_active() local
4034 if (!txqi->txq.sta) in ieee80211_txq_keep_active()
4037 sta = container_of(txqi->txq.sta, struct sta_info, sta); in ieee80211_txq_keep_active()
4038 if (ieee80211_sta_deficit(sta, txqi->txq.ac) >= 0) in ieee80211_txq_keep_active()
4041 return ieee80211_sta_keep_active(sta, txqi->txq.ac); in ieee80211_txq_keep_active()
4073 if (txqi->txq.sta) { in ieee80211_next_txq()
4074 struct sta_info *sta = container_of(txqi->txq.sta, in ieee80211_next_txq() local
4075 struct sta_info, sta); in ieee80211_next_txq()
4077 s32 deficit = ieee80211_sta_deficit(sta, txqi->txq.ac); in ieee80211_next_txq()
4083 sta->airtime[txqi->txq.ac].deficit += in ieee80211_next_txq()
4084 sta->airtime_weight; in ieee80211_next_txq()
4126 if (txqi->txq.sta && local->airtime_flags && has_queue && in __ieee80211_schedule_txq()
4147 struct sta_info *sta; in ieee80211_txq_airtime_check() local
4156 if (!txq->sta) in ieee80211_txq_airtime_check()
4162 sta = container_of(txq->sta, struct sta_info, sta); in ieee80211_txq_airtime_check()
4163 if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) < in ieee80211_txq_airtime_check()
4164 sta->airtime[txq->ac].aql_limit_low) in ieee80211_txq_airtime_check()
4169 atomic_read(&sta->airtime[txq->ac].aql_tx_pending) < in ieee80211_txq_airtime_check()
4170 sta->airtime[txq->ac].aql_limit_high) in ieee80211_txq_airtime_check()
4201 struct sta_info *sta; in ieee80211_txq_may_transmit() local
4206 if (!txqi->txq.sta) in ieee80211_txq_may_transmit()
4220 if (!iter->txq.sta) { in ieee80211_txq_may_transmit()
4225 sta = container_of(iter->txq.sta, struct sta_info, sta); in ieee80211_txq_may_transmit()
4226 if (ieee80211_sta_deficit(sta, ac) < 0) in ieee80211_txq_may_transmit()
4227 sta->airtime[ac].deficit += sta->airtime_weight; in ieee80211_txq_may_transmit()
4231 sta = container_of(txqi->txq.sta, struct sta_info, sta); in ieee80211_txq_may_transmit()
4232 if (sta->airtime[ac].deficit >= 0) in ieee80211_txq_may_transmit()
4235 sta->airtime[ac].deficit += sta->airtime_weight; in ieee80211_txq_may_transmit()
4275 struct sta_info *sta; in __ieee80211_subif_start_xmit() local
4293 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) in __ieee80211_subif_start_xmit()
4296 if (IS_ERR(sta)) in __ieee80211_subif_start_xmit()
4297 sta = NULL; in __ieee80211_subif_start_xmit()
4299 skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); in __ieee80211_subif_start_xmit()
4300 ieee80211_aggr_check(sdata, sta, skb); in __ieee80211_subif_start_xmit()
4302 if (sta) { in __ieee80211_subif_start_xmit()
4305 fast_tx = rcu_dereference(sta->fast_tx); in __ieee80211_subif_start_xmit()
4308 ieee80211_xmit_fast(sdata, sta, fast_tx, skb)) in __ieee80211_subif_start_xmit()
4329 sta, ctrl_flags, cookie); in __ieee80211_subif_start_xmit()
4337 ieee80211_xmit(sdata, sta, skb); in __ieee80211_subif_start_xmit()
4349 static int ieee80211_change_da(struct sk_buff *skb, struct sta_info *sta) in ieee80211_change_da() argument
4359 ether_addr_copy(eth->h_dest, sta->sta.addr); in ieee80211_change_da()
4374 if (sdata->u.vlan.sta) in ieee80211_multicast_to_unicast()
4411 struct sta_info *sta, *first = NULL; in ieee80211_convert_to_unicast() local
4416 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_convert_to_unicast()
4417 if (sdata != sta->sdata) in ieee80211_convert_to_unicast()
4420 if (unlikely(ether_addr_equal(eth->h_source, sta->sta.addr))) in ieee80211_convert_to_unicast()
4424 first = sta; in ieee80211_convert_to_unicast()
4430 if (unlikely(ieee80211_change_da(cloned_skb, sta))) { in ieee80211_convert_to_unicast()
4542 struct sk_buff *skb, struct sta_info *sta, in __ieee80211_tx_8023() argument
4568 if (sta && sta->uploaded) in __ieee80211_tx_8023()
4569 pubsta = &sta->sta; in __ieee80211_tx_8023()
4571 control.sta = pubsta; in __ieee80211_tx_8023()
4579 struct sk_buff *skb, struct sta_info *sta, in ieee80211_tx_8023() argument
4586 if (ieee80211_queue_skb(local, sdata, sta, skb)) in ieee80211_tx_8023()
4591 if (!__ieee80211_tx_8023(sdata, skb, sta, txpending)) in ieee80211_tx_8023()
4599 struct net_device *dev, struct sta_info *sta, in ieee80211_8023_xmit() argument
4610 queue = ieee80211_select_queue(sdata, sta, skb); in ieee80211_8023_xmit()
4621 ieee80211_aggr_check(sdata, sta, skb); in ieee80211_8023_xmit()
4624 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); in ieee80211_8023_xmit()
4673 sta->deflink.tx_stats.packets[queue] += skbs; in ieee80211_8023_xmit()
4674 sta->deflink.tx_stats.bytes[queue] += len; in ieee80211_8023_xmit()
4678 ieee80211_tx_8023(sdata, skb, sta, false); in ieee80211_8023_xmit()
4692 struct sta_info *sta; in ieee80211_subif_start_xmit_8023() local
4701 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_subif_start_xmit_8023()
4706 if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded || in ieee80211_subif_start_xmit_8023()
4707 !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || in ieee80211_subif_start_xmit_8023()
4711 key = rcu_dereference(sta->ptk[sta->ptk_idx]); in ieee80211_subif_start_xmit_8023()
4720 ieee80211_8023_xmit(sdata, dev, sta, key, skb); in ieee80211_subif_start_xmit_8023()
4740 struct sta_info *sta; in ieee80211_build_data_template() local
4744 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_build_data_template()
4750 skb = ieee80211_build_hdr(sdata, skb, info_flags, sta, in ieee80211_build_data_template()
4756 tx.sta = sta_info_get(sdata, hdr->addr1); in ieee80211_build_data_template()
4795 struct sta_info *sta; in ieee80211_tx_pending_skb() local
4815 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_tx_pending_skb()
4820 if (IS_ERR(sta) || (sta && !sta->uploaded)) in ieee80211_tx_pending_skb()
4821 sta = NULL; in ieee80211_tx_pending_skb()
4823 result = ieee80211_tx_8023(sdata, skb, sta, true); in ieee80211_tx_pending_skb()
4831 sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_pending_skb()
4833 result = __ieee80211_tx(local, &skbs, sta, true); in ieee80211_tx_pending_skb()
5768 struct sta_info *sta; in ieee80211_nullfunc_get() local
5770 sta = sta_info_get(sdata, vif->cfg.ap_addr); in ieee80211_nullfunc_get()
5771 qos = sta && sta->sta.wme; in ieee80211_nullfunc_get()
5962 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_reserve_tid() local
5963 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_reserve_tid()
5984 if (sta->reserved_tid == tid) { in ieee80211_reserve_tid()
5989 if (sta->reserved_tid != IEEE80211_TID_UNRESERVED) { in ieee80211_reserve_tid()
6002 set_sta_flag(sta, WLAN_STA_BLOCK_BA); in ieee80211_reserve_tid()
6003 __ieee80211_stop_tx_ba_session(sta, tid, in ieee80211_reserve_tid()
6010 sta->reserved_tid = tid; in ieee80211_reserve_tid()
6016 clear_sta_flag(sta, WLAN_STA_BLOCK_BA); in ieee80211_reserve_tid()
6026 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_unreserve_tid() local
6027 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_unreserve_tid()
6042 if (tid != sta->reserved_tid) { in ieee80211_unreserve_tid()
6047 sta->reserved_tid = IEEE80211_TID_UNRESERVED; in ieee80211_unreserve_tid()
6143 struct sta_info *sta; in ieee80211_tx_control_port() local
6221 err = ieee80211_lookup_ra_sta(sdata, skb, &sta); in ieee80211_tx_control_port()
6228 if (!IS_ERR(sta)) { in ieee80211_tx_control_port()
6229 u16 queue = ieee80211_select_queue(sdata, sta, skb); in ieee80211_tx_control_port()
6237 if (sta && sta->sta.mlo) in ieee80211_tx_control_port()