Lines Matching refs:sta
300 if (tx->sta) in ieee80211_tx_h_check_assoc()
301 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_check_assoc()
335 struct sta_info *sta; in purge_old_ps_buffers() local
359 list_for_each_entry_rcu(sta, &local->sta_list, list) { in purge_old_ps_buffers()
363 skb = skb_dequeue(&sta->ps_tx_buf[ac]); in purge_old_ps_buffers()
364 total += skb_queue_len(&sta->ps_tx_buf[ac]); in purge_old_ps_buffers()
442 static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta, in ieee80211_use_mfp() argument
448 if (sta == NULL || !test_sta_flag(sta, WLAN_STA_MFP)) in ieee80211_use_mfp()
460 struct sta_info *sta = tx->sta; in ieee80211_tx_h_unicast_ps_buf() local
465 if (unlikely(!sta)) in ieee80211_tx_h_unicast_ps_buf()
468 if (unlikely((test_sta_flag(sta, WLAN_STA_PS_STA) || in ieee80211_tx_h_unicast_ps_buf()
469 test_sta_flag(sta, WLAN_STA_PS_DRIVER) || in ieee80211_tx_h_unicast_ps_buf()
470 test_sta_flag(sta, WLAN_STA_PS_DELIVER)) && in ieee80211_tx_h_unicast_ps_buf()
480 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", in ieee80211_tx_h_unicast_ps_buf()
481 sta->sta.addr, sta->sta.aid, ac); in ieee80211_tx_h_unicast_ps_buf()
486 spin_lock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
492 if (!test_sta_flag(sta, WLAN_STA_PS_STA) && in ieee80211_tx_h_unicast_ps_buf()
493 !test_sta_flag(sta, WLAN_STA_PS_DRIVER) && in ieee80211_tx_h_unicast_ps_buf()
494 !test_sta_flag(sta, WLAN_STA_PS_DELIVER)) { in ieee80211_tx_h_unicast_ps_buf()
495 spin_unlock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
499 if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { in ieee80211_tx_h_unicast_ps_buf()
500 struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); in ieee80211_tx_h_unicast_ps_buf()
503 sta->sta.addr, ac); in ieee80211_tx_h_unicast_ps_buf()
512 skb_queue_tail(&sta->ps_tx_buf[ac], tx->skb); in ieee80211_tx_h_unicast_ps_buf()
513 spin_unlock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
524 sta_info_recalc_tim(sta); in ieee80211_tx_h_unicast_ps_buf()
527 } else if (unlikely(test_sta_flag(sta, WLAN_STA_PS_STA))) { in ieee80211_tx_h_unicast_ps_buf()
530 sta->sta.addr); in ieee80211_tx_h_unicast_ps_buf()
604 if (tx->sta && in ieee80211_tx_h_select_key()
605 (key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]))) in ieee80211_tx_h_select_key()
638 !ieee80211_use_mfp(hdr->frame_control, tx->sta, in ieee80211_tx_h_select_key()
664 } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta && in ieee80211_tx_h_select_key()
665 test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) { in ieee80211_tx_h_select_key()
729 (tx->sta && test_sta_flag(tx->sta, WLAN_STA_SHORT_PREAMBLE)))) in ieee80211_tx_h_rate_ctrl()
738 if (tx->sta) in ieee80211_tx_h_rate_ctrl()
739 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_rate_ctrl()
746 !rate_usable_index_exists(sband, &tx->sta->sta), in ieee80211_tx_h_rate_ctrl()
759 rate_control_get_rate(tx->sdata, tx->sta, &txrc); in ieee80211_tx_h_rate_ctrl()
761 if (tx->sta && !info->control.skip_table) in ieee80211_tx_h_rate_ctrl()
762 ratetbl = rcu_dereference(tx->sta->sta.rates); in ieee80211_tx_h_rate_ctrl()
785 if (tx->sta && ieee80211_is_tx_data(tx->skb)) in ieee80211_tx_h_rate_ctrl()
786 tx->sta->deflink.tx_stats.last_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
787 } else if (tx->sta) in ieee80211_tx_h_rate_ctrl()
788 tx->sta->deflink.tx_stats.last_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
803 static __le16 ieee80211_tx_next_seq(struct sta_info *sta, int tid) in ieee80211_tx_next_seq() argument
805 u16 *seq = &sta->tid_seq[tid]; in ieee80211_tx_next_seq()
864 if (tx->sta) in ieee80211_tx_h_sequence()
865 tx->sta->deflink.tx_stats.msdu[IEEE80211_NUM_TIDS]++; in ieee80211_tx_h_sequence()
874 if (!tx->sta) in ieee80211_tx_h_sequence()
879 tx->sta->deflink.tx_stats.msdu[tid]++; in ieee80211_tx_h_sequence()
881 hdr->seq_ctrl = ieee80211_tx_next_seq(tx->sta, tid); in ieee80211_tx_h_sequence()
1027 if (!tx->sta) in ieee80211_tx_h_stats()
1032 tx->sta->deflink.tx_stats.bytes[ac] += skb->len; in ieee80211_tx_h_stats()
1035 tx->sta->deflink.tx_stats.packets[ac]++; in ieee80211_tx_h_stats()
1118 } else if (!tx->sta->sta.txq[tid]) { in ieee80211_tx_prep_agg()
1119 spin_lock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1138 tid_tx = rcu_dereference_protected_tid_tx(tx->sta, tid); in ieee80211_tx_prep_agg()
1147 clear_sta_flag(tx->sta, WLAN_STA_SP); in ieee80211_tx_prep_agg()
1148 ps_dbg(tx->sta->sdata, in ieee80211_tx_prep_agg()
1150 tx->sta->sta.addr, tx->sta->sta.aid); in ieee80211_tx_prep_agg()
1159 spin_unlock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1173 struct sta_info *sta, struct sk_buff *skb) in ieee80211_aggr_check() argument
1181 if (!sta || in ieee80211_aggr_check()
1182 (!sta->sta.valid_links && !sta->sta.deflink.ht_cap.ht_supported && in ieee80211_aggr_check()
1183 !sta->sta.deflink.s1g_cap.s1g) || in ieee80211_aggr_check()
1184 !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO || in ieee80211_aggr_check()
1189 if (likely(sta->ampdu_mlme.tid_tx[tid])) in ieee80211_aggr_check()
1192 ieee80211_start_tx_ba_session(&sta->sta, tid, 0); in ieee80211_aggr_check()
1203 struct sta_info *sta, struct sk_buff *skb) in ieee80211_tx_prepare() argument
1226 if (likely(sta)) { in ieee80211_tx_prepare()
1227 if (!IS_ERR(sta)) in ieee80211_tx_prepare()
1228 tx->sta = sta; in ieee80211_tx_prepare()
1231 tx->sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_tx_prepare()
1232 if (!tx->sta && sdata->wdev.use_4addr) in ieee80211_tx_prepare()
1235 tx->sta = sta_info_get_bss(sdata, hdr->addr1); in ieee80211_tx_prepare()
1237 if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) { in ieee80211_tx_prepare()
1238 tx->sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_prepare()
1243 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && in ieee80211_tx_prepare()
1250 tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]); in ieee80211_tx_prepare()
1252 ieee80211_aggr_check(sdata, tx->sta, skb); in ieee80211_tx_prepare()
1253 tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]); in ieee80211_tx_prepare()
1280 if (!tx->sta) in ieee80211_tx_prepare()
1282 else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) { in ieee80211_tx_prepare()
1284 ieee80211_check_fast_xmit(tx->sta); in ieee80211_tx_prepare()
1294 struct sta_info *sta, in ieee80211_get_txq() argument
1310 sta && sta->uploaded) { in ieee80211_get_txq()
1315 txq = sta->sta.txq[IEEE80211_NUM_TIDS]; in ieee80211_get_txq()
1317 } else if (sta) { in ieee80211_get_txq()
1320 if (!sta->uploaded) in ieee80211_get_txq()
1323 txq = sta->sta.txq[tid]; in ieee80211_get_txq()
1496 struct sta_info *sta, in ieee80211_txq_init() argument
1507 if (!sta) { in ieee80211_txq_init()
1531 txqi->txq.sta = &sta->sta; in ieee80211_txq_init()
1533 sta->sta.txq[tid] = &txqi->txq; in ieee80211_txq_init()
1635 struct sta_info *sta, in ieee80211_queue_skb() argument
1649 txqi = ieee80211_get_txq(local, vif, sta, skb); in ieee80211_queue_skb()
1663 struct sta_info *sta, in ieee80211_tx_frags() argument
1725 control.sta = sta ? &sta->sta : NULL; in ieee80211_tx_frags()
1738 struct sk_buff_head *skbs, struct sta_info *sta, in __ieee80211_tx() argument
1753 if (sta && !sta->uploaded) in __ieee80211_tx()
1754 sta = NULL; in __ieee80211_tx()
1783 result = ieee80211_tx_frags(local, vif, sta, skbs, txpending); in __ieee80211_tx()
1886 int band, struct ieee80211_sta **sta) in ieee80211_tx_prepare_skb() argument
1903 if (sta) { in ieee80211_tx_prepare_skb()
1904 if (tx.sta) in ieee80211_tx_prepare_skb()
1905 *sta = &tx.sta->sta; in ieee80211_tx_prepare_skb()
1907 *sta = NULL; in ieee80211_tx_prepare_skb()
1926 struct sta_info *sta, struct sk_buff *skb, in ieee80211_tx() argument
1941 res_prepare = ieee80211_tx_prepare(sdata, &tx, sta, skb); in ieee80211_tx()
1959 if (ieee80211_queue_skb(local, sdata, tx.sta, tx.skb)) in ieee80211_tx()
1963 result = __ieee80211_tx(local, &tx.skbs, tx.sta, txpending); in ieee80211_tx()
2014 struct sta_info *sta, struct sk_buff *skb) in ieee80211_xmit() argument
2055 ieee80211_tx(sdata, sta, skb, false); in ieee80211_xmit()
2469 struct sta_info *sta; in ieee80211_lookup_ra_sta() local
2473 sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_lookup_ra_sta()
2474 if (sta) { in ieee80211_lookup_ra_sta()
2475 *sta_out = sta; in ieee80211_lookup_ra_sta()
2488 sta = sta_info_get_bss(sdata, skb->data); in ieee80211_lookup_ra_sta()
2498 sta = sta_info_get(sdata, skb->data); in ieee80211_lookup_ra_sta()
2499 if (sta && test_sta_flag(sta, WLAN_STA_TDLS_PEER)) { in ieee80211_lookup_ra_sta()
2500 if (test_sta_flag(sta, in ieee80211_lookup_ra_sta()
2502 *sta_out = sta; in ieee80211_lookup_ra_sta()
2519 sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr); in ieee80211_lookup_ra_sta()
2520 if (!sta) in ieee80211_lookup_ra_sta()
2527 *sta_out = sta ?: ERR_PTR(-ENOENT); in ieee80211_lookup_ra_sta()
2591 struct sta_info *sta, u32 ctrl_flags, in ieee80211_build_hdr() argument
2613 if (IS_ERR(sta)) in ieee80211_build_hdr()
2614 sta = NULL; in ieee80211_build_hdr()
2635 memcpy(hdr.addr1, sta->sta.addr, ETH_ALEN); in ieee80211_build_hdr()
2640 authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); in ieee80211_build_hdr()
2641 wme_sta = sta->sta.wme; in ieee80211_build_hdr()
2661 if (ieee80211_vif_is_mld(&sdata->vif) && sta && !sta->sta.mlo) { in ieee80211_build_hdr()
2664 link_id = sta->deflink.link_id; in ieee80211_build_hdr()
2672 (sta && sta->sta.mlo)) { in ieee80211_build_hdr()
2766 tdls_peer = test_sta_flag(sta, WLAN_STA_TDLS_PEER); in ieee80211_build_hdr()
2770 int tdls_link_id = ieee80211_tdls_sta_link_id(sta); in ieee80211_build_hdr()
2835 if (sta) { in ieee80211_build_hdr()
2836 authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); in ieee80211_build_hdr()
2837 wme_sta = sta->sta.wme; in ieee80211_build_hdr()
3017 void ieee80211_check_fast_xmit(struct sta_info *sta) in ieee80211_check_fast_xmit() argument
3020 struct ieee80211_local *local = sta->local; in ieee80211_check_fast_xmit()
3021 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_check_fast_xmit()
3030 mesh_fast_tx_flush_sta(sdata, sta); in ieee80211_check_fast_xmit()
3044 spin_lock_bh(&sta->lock); in ieee80211_check_fast_xmit()
3050 if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED) || !sta->uploaded) in ieee80211_check_fast_xmit()
3053 if (test_sta_flag(sta, WLAN_STA_PS_STA) || in ieee80211_check_fast_xmit()
3054 test_sta_flag(sta, WLAN_STA_PS_DRIVER) || in ieee80211_check_fast_xmit()
3055 test_sta_flag(sta, WLAN_STA_PS_DELIVER) || in ieee80211_check_fast_xmit()
3056 test_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT)) in ieee80211_check_fast_xmit()
3093 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER)) { in ieee80211_check_fast_xmit()
3095 int tdls_link_id = ieee80211_tdls_sta_link_id(sta); in ieee80211_check_fast_xmit()
3134 memcpy(hdr->addr1, sta->sta.addr, ETH_ALEN); in ieee80211_check_fast_xmit()
3146 if (sta->sta.mlo || !ieee80211_vif_is_mld(&sdata->vif)) { in ieee80211_check_fast_xmit()
3149 unsigned int link_id = sta->deflink.link_id; in ieee80211_check_fast_xmit()
3169 if (sta->sta.wme) { in ieee80211_check_fast_xmit()
3179 build.key = rcu_access_pointer(sta->ptk[sta->ptk_idx]); in ieee80211_check_fast_xmit()
3257 old = rcu_dereference_protected(sta->fast_tx, in ieee80211_check_fast_xmit()
3258 lockdep_is_held(&sta->lock)); in ieee80211_check_fast_xmit()
3259 rcu_assign_pointer(sta->fast_tx, fast_tx); in ieee80211_check_fast_xmit()
3262 spin_unlock_bh(&sta->lock); in ieee80211_check_fast_xmit()
3267 struct sta_info *sta; in ieee80211_check_fast_xmit_all() local
3270 list_for_each_entry_rcu(sta, &local->sta_list, list) in ieee80211_check_fast_xmit_all()
3271 ieee80211_check_fast_xmit(sta); in ieee80211_check_fast_xmit_all()
3278 struct sta_info *sta; in ieee80211_check_fast_xmit_iface() local
3282 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_check_fast_xmit_iface()
3283 if (sdata != sta->sdata && in ieee80211_check_fast_xmit_iface()
3284 (!sta->sdata->bss || sta->sdata->bss != sdata->bss)) in ieee80211_check_fast_xmit_iface()
3286 ieee80211_check_fast_xmit(sta); in ieee80211_check_fast_xmit_iface()
3292 void ieee80211_clear_fast_xmit(struct sta_info *sta) in ieee80211_clear_fast_xmit() argument
3296 spin_lock_bh(&sta->lock); in ieee80211_clear_fast_xmit()
3297 fast_tx = rcu_dereference_protected(sta->fast_tx, in ieee80211_clear_fast_xmit()
3298 lockdep_is_held(&sta->lock)); in ieee80211_clear_fast_xmit()
3299 RCU_INIT_POINTER(sta->fast_tx, NULL); in ieee80211_clear_fast_xmit()
3300 spin_unlock_bh(&sta->lock); in ieee80211_clear_fast_xmit()
3390 struct sta_info *sta, in ieee80211_amsdu_aggregate() argument
3400 struct ieee80211_txq *txq = sta->sta.txq[tid]; in ieee80211_amsdu_aggregate()
3404 u8 max_subframes = sta->sta.max_amsdu_subframes; in ieee80211_amsdu_aggregate()
3406 int max_amsdu_len = sta->sta.cur->max_amsdu_len; in ieee80211_amsdu_aggregate()
3435 if (sta->sta.cur->max_rc_amsdu_len) in ieee80211_amsdu_aggregate()
3437 sta->sta.cur->max_rc_amsdu_len); in ieee80211_amsdu_aggregate()
3439 if (sta->sta.cur->max_tid_amsdu_len[tid]) in ieee80211_amsdu_aggregate()
3441 sta->sta.cur->max_tid_amsdu_len[tid]); in ieee80211_amsdu_aggregate()
3541 struct sta_info *sta, u8 pn_offs, in ieee80211_xmit_fast_finish() argument
3561 hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); in ieee80211_xmit_fast_finish()
3569 sta->deflink.tx_stats.msdu[tid] += in ieee80211_xmit_fast_finish()
3572 sta->deflink.tx_stats.msdu[tid]++; in ieee80211_xmit_fast_finish()
3579 sta->deflink.tx_stats.bytes[skb_get_queue_mapping(skb)] += skb->len; in ieee80211_xmit_fast_finish()
3580 sta->deflink.tx_stats.packets[skb_get_queue_mapping(skb)]++; in ieee80211_xmit_fast_finish()
3659 struct sta_info *sta, in __ieee80211_xmit_fast() argument
3677 ieee80211_amsdu_aggregate(sdata, sta, fast_tx, skb, da, sa)) in __ieee80211_xmit_fast()
3721 tx.sta = sta; in __ieee80211_xmit_fast()
3724 if (ieee80211_queue_skb(local, sdata, sta, skb)) in __ieee80211_xmit_fast()
3728 r = ieee80211_xmit_fast_finish(sdata, sta, fast_tx->pn_offs, in __ieee80211_xmit_fast()
3739 ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false); in __ieee80211_xmit_fast()
3747 struct sta_info *sta, in ieee80211_xmit_fast() argument
3772 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); in ieee80211_xmit_fast()
3790 __ieee80211_xmit_fast(sdata, sta, fast_tx, skb, tid_tx, in ieee80211_xmit_fast()
3861 if (txq->sta) { in ieee80211_tx_dequeue()
3862 tx.sta = container_of(txq->sta, struct sta_info, sta); in ieee80211_tx_dequeue()
3872 !test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) && in ieee80211_tx_dequeue()
3910 struct sta_info *sta = container_of(txq->sta, struct sta_info, in ieee80211_tx_dequeue() local
3911 sta); in ieee80211_tx_dequeue()
3918 r = ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs, in ieee80211_tx_dequeue()
3979 if (tx.sta && in ieee80211_tx_dequeue()
3984 airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta, in ieee80211_tx_dequeue()
3988 ieee80211_sta_update_pending_airtime(local, tx.sta, in ieee80211_tx_dequeue()
4004 static inline s32 ieee80211_sta_deficit(struct sta_info *sta, u8 ac) in ieee80211_sta_deficit() argument
4006 struct airtime_info *air_info = &sta->airtime[ac]; in ieee80211_sta_deficit()
4014 struct sta_info *sta; in ieee80211_txq_set_active() local
4016 if (!txqi->txq.sta) in ieee80211_txq_set_active()
4019 sta = container_of(txqi->txq.sta, struct sta_info, sta); in ieee80211_txq_set_active()
4020 sta->airtime[txqi->txq.ac].last_active = jiffies; in ieee80211_txq_set_active()
4026 struct sta_info *sta; in ieee80211_txq_keep_active() local
4028 if (!txqi->txq.sta) in ieee80211_txq_keep_active()
4031 sta = container_of(txqi->txq.sta, struct sta_info, sta); in ieee80211_txq_keep_active()
4032 if (ieee80211_sta_deficit(sta, txqi->txq.ac) >= 0) in ieee80211_txq_keep_active()
4035 return ieee80211_sta_keep_active(sta, txqi->txq.ac); in ieee80211_txq_keep_active()
4067 if (txqi->txq.sta) { in ieee80211_next_txq()
4068 struct sta_info *sta = container_of(txqi->txq.sta, in ieee80211_next_txq() local
4069 struct sta_info, sta); in ieee80211_next_txq()
4071 s32 deficit = ieee80211_sta_deficit(sta, txqi->txq.ac); in ieee80211_next_txq()
4077 sta->airtime[txqi->txq.ac].deficit += in ieee80211_next_txq()
4078 sta->airtime_weight; in ieee80211_next_txq()
4122 if (txqi->txq.sta && local->airtime_flags && has_queue && in __ieee80211_schedule_txq()
4143 struct sta_info *sta; in ieee80211_txq_airtime_check() local
4152 if (!txq->sta) in ieee80211_txq_airtime_check()
4158 sta = container_of(txq->sta, struct sta_info, sta); in ieee80211_txq_airtime_check()
4159 if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) < in ieee80211_txq_airtime_check()
4160 sta->airtime[txq->ac].aql_limit_low) in ieee80211_txq_airtime_check()
4165 atomic_read(&sta->airtime[txq->ac].aql_tx_pending) < in ieee80211_txq_airtime_check()
4166 sta->airtime[txq->ac].aql_limit_high) in ieee80211_txq_airtime_check()
4197 struct sta_info *sta; in ieee80211_txq_may_transmit() local
4202 if (!txqi->txq.sta) in ieee80211_txq_may_transmit()
4216 if (!iter->txq.sta) { in ieee80211_txq_may_transmit()
4221 sta = container_of(iter->txq.sta, struct sta_info, sta); in ieee80211_txq_may_transmit()
4222 if (ieee80211_sta_deficit(sta, ac) < 0) in ieee80211_txq_may_transmit()
4223 sta->airtime[ac].deficit += sta->airtime_weight; in ieee80211_txq_may_transmit()
4227 sta = container_of(txqi->txq.sta, struct sta_info, sta); in ieee80211_txq_may_transmit()
4228 if (sta->airtime[ac].deficit >= 0) in ieee80211_txq_may_transmit()
4231 sta->airtime[ac].deficit += sta->airtime_weight; in ieee80211_txq_may_transmit()
4271 struct sta_info *sta; in __ieee80211_subif_start_xmit() local
4289 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) in __ieee80211_subif_start_xmit()
4292 if (IS_ERR(sta)) in __ieee80211_subif_start_xmit()
4293 sta = NULL; in __ieee80211_subif_start_xmit()
4295 skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); in __ieee80211_subif_start_xmit()
4296 ieee80211_aggr_check(sdata, sta, skb); in __ieee80211_subif_start_xmit()
4298 if (sta) { in __ieee80211_subif_start_xmit()
4301 fast_tx = rcu_dereference(sta->fast_tx); in __ieee80211_subif_start_xmit()
4304 ieee80211_xmit_fast(sdata, sta, fast_tx, skb)) in __ieee80211_subif_start_xmit()
4325 sta, ctrl_flags, cookie); in __ieee80211_subif_start_xmit()
4333 ieee80211_xmit(sdata, sta, skb); in __ieee80211_subif_start_xmit()
4345 static int ieee80211_change_da(struct sk_buff *skb, struct sta_info *sta) in ieee80211_change_da() argument
4355 ether_addr_copy(eth->h_dest, sta->sta.addr); in ieee80211_change_da()
4370 if (sdata->u.vlan.sta) in ieee80211_multicast_to_unicast()
4407 struct sta_info *sta, *first = NULL; in ieee80211_convert_to_unicast() local
4412 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_convert_to_unicast()
4413 if (sdata != sta->sdata) in ieee80211_convert_to_unicast()
4416 if (unlikely(ether_addr_equal(eth->h_source, sta->sta.addr))) in ieee80211_convert_to_unicast()
4420 first = sta; in ieee80211_convert_to_unicast()
4426 if (unlikely(ieee80211_change_da(cloned_skb, sta))) { in ieee80211_convert_to_unicast()
4540 struct sk_buff *skb, struct sta_info *sta, in __ieee80211_tx_8023() argument
4566 if (sta && sta->uploaded) in __ieee80211_tx_8023()
4567 pubsta = &sta->sta; in __ieee80211_tx_8023()
4569 control.sta = pubsta; in __ieee80211_tx_8023()
4577 struct sk_buff *skb, struct sta_info *sta, in ieee80211_tx_8023() argument
4584 if (ieee80211_queue_skb(local, sdata, sta, skb)) in ieee80211_tx_8023()
4589 if (!__ieee80211_tx_8023(sdata, skb, sta, txpending)) in ieee80211_tx_8023()
4597 struct net_device *dev, struct sta_info *sta, in ieee80211_8023_xmit() argument
4608 queue = ieee80211_select_queue(sdata, sta, skb); in ieee80211_8023_xmit()
4619 ieee80211_aggr_check(sdata, sta, skb); in ieee80211_8023_xmit()
4622 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); in ieee80211_8023_xmit()
4670 sta->deflink.tx_stats.packets[queue] += skbs; in ieee80211_8023_xmit()
4671 sta->deflink.tx_stats.bytes[queue] += len; in ieee80211_8023_xmit()
4675 ieee80211_tx_8023(sdata, skb, sta, false); in ieee80211_8023_xmit()
4689 struct sta_info *sta; in ieee80211_subif_start_xmit_8023() local
4698 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_subif_start_xmit_8023()
4703 if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded || in ieee80211_subif_start_xmit_8023()
4704 !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || in ieee80211_subif_start_xmit_8023()
4708 key = rcu_dereference(sta->ptk[sta->ptk_idx]); in ieee80211_subif_start_xmit_8023()
4717 ieee80211_8023_xmit(sdata, dev, sta, key, skb); in ieee80211_subif_start_xmit_8023()
4737 struct sta_info *sta; in ieee80211_build_data_template() local
4741 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_build_data_template()
4747 skb = ieee80211_build_hdr(sdata, skb, info_flags, sta, in ieee80211_build_data_template()
4753 tx.sta = sta_info_get(sdata, hdr->addr1); in ieee80211_build_data_template()
4792 struct sta_info *sta; in ieee80211_tx_pending_skb() local
4812 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_tx_pending_skb()
4817 if (IS_ERR(sta) || (sta && !sta->uploaded)) in ieee80211_tx_pending_skb()
4818 sta = NULL; in ieee80211_tx_pending_skb()
4820 result = ieee80211_tx_8023(sdata, skb, sta, true); in ieee80211_tx_pending_skb()
4828 sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_pending_skb()
4830 result = __ieee80211_tx(local, &skbs, sta, true); in ieee80211_tx_pending_skb()
5851 struct sta_info *sta; in ieee80211_nullfunc_get() local
5853 sta = sta_info_get(sdata, vif->cfg.ap_addr); in ieee80211_nullfunc_get()
5854 qos = sta && sta->sta.wme; in ieee80211_nullfunc_get()
6045 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_reserve_tid() local
6046 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_reserve_tid()
6067 if (sta->reserved_tid == tid) { in ieee80211_reserve_tid()
6072 if (sta->reserved_tid != IEEE80211_TID_UNRESERVED) { in ieee80211_reserve_tid()
6085 set_sta_flag(sta, WLAN_STA_BLOCK_BA); in ieee80211_reserve_tid()
6086 __ieee80211_stop_tx_ba_session(sta, tid, in ieee80211_reserve_tid()
6093 sta->reserved_tid = tid; in ieee80211_reserve_tid()
6099 clear_sta_flag(sta, WLAN_STA_BLOCK_BA); in ieee80211_reserve_tid()
6109 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_unreserve_tid() local
6110 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_unreserve_tid()
6125 if (tid != sta->reserved_tid) { in ieee80211_unreserve_tid()
6130 sta->reserved_tid = IEEE80211_TID_UNRESERVED; in ieee80211_unreserve_tid()
6226 struct sta_info *sta; in ieee80211_tx_control_port() local
6304 err = ieee80211_lookup_ra_sta(sdata, skb, &sta); in ieee80211_tx_control_port()
6311 if (!IS_ERR(sta)) { in ieee80211_tx_control_port()
6312 u16 queue = ieee80211_select_queue(sdata, sta, skb); in ieee80211_tx_control_port()
6320 if (sta && sta->sta.mlo) in ieee80211_tx_control_port()