Lines Matching refs:sta

307 	if (tx->sta)  in ieee80211_tx_h_check_assoc()
308 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_check_assoc()
343 struct sta_info *sta; in purge_old_ps_buffers() local
367 list_for_each_entry_rcu(sta, &local->sta_list, list) { in purge_old_ps_buffers()
371 skb = skb_dequeue(&sta->ps_tx_buf[ac]); in purge_old_ps_buffers()
372 total += skb_queue_len(&sta->ps_tx_buf[ac]); in purge_old_ps_buffers()
450 static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta, in ieee80211_use_mfp() argument
456 if (sta == NULL || !test_sta_flag(sta, WLAN_STA_MFP)) in ieee80211_use_mfp()
468 struct sta_info *sta = tx->sta; in ieee80211_tx_h_unicast_ps_buf() local
473 if (unlikely(!sta)) in ieee80211_tx_h_unicast_ps_buf()
476 if (unlikely((test_sta_flag(sta, WLAN_STA_PS_STA) || in ieee80211_tx_h_unicast_ps_buf()
477 test_sta_flag(sta, WLAN_STA_PS_DRIVER) || in ieee80211_tx_h_unicast_ps_buf()
478 test_sta_flag(sta, WLAN_STA_PS_DELIVER)) && in ieee80211_tx_h_unicast_ps_buf()
488 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", in ieee80211_tx_h_unicast_ps_buf()
489 sta->sta.addr, sta->sta.aid, ac); in ieee80211_tx_h_unicast_ps_buf()
494 spin_lock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
500 if (!test_sta_flag(sta, WLAN_STA_PS_STA) && in ieee80211_tx_h_unicast_ps_buf()
501 !test_sta_flag(sta, WLAN_STA_PS_DRIVER) && in ieee80211_tx_h_unicast_ps_buf()
502 !test_sta_flag(sta, WLAN_STA_PS_DELIVER)) { in ieee80211_tx_h_unicast_ps_buf()
503 spin_unlock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
507 if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { in ieee80211_tx_h_unicast_ps_buf()
508 struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); in ieee80211_tx_h_unicast_ps_buf()
511 sta->sta.addr, ac); in ieee80211_tx_h_unicast_ps_buf()
520 skb_queue_tail(&sta->ps_tx_buf[ac], tx->skb); in ieee80211_tx_h_unicast_ps_buf()
521 spin_unlock(&sta->ps_lock); in ieee80211_tx_h_unicast_ps_buf()
532 sta_info_recalc_tim(sta); in ieee80211_tx_h_unicast_ps_buf()
535 } else if (unlikely(test_sta_flag(sta, WLAN_STA_PS_STA))) { in ieee80211_tx_h_unicast_ps_buf()
538 sta->sta.addr); in ieee80211_tx_h_unicast_ps_buf()
580 else if (tx->sta && in ieee80211_tx_h_select_key()
581 (key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]))) in ieee80211_tx_h_select_key()
615 !ieee80211_use_mfp(hdr->frame_control, tx->sta, in ieee80211_tx_h_select_key()
698 (tx->sta && test_sta_flag(tx->sta, WLAN_STA_SHORT_PREAMBLE)))) in ieee80211_tx_h_rate_ctrl()
703 if (tx->sta) in ieee80211_tx_h_rate_ctrl()
704 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_rate_ctrl()
711 !rate_usable_index_exists(sband, &tx->sta->sta), in ieee80211_tx_h_rate_ctrl()
723 rate_control_get_rate(tx->sdata, tx->sta, &txrc); in ieee80211_tx_h_rate_ctrl()
725 if (tx->sta && !info->control.skip_table) in ieee80211_tx_h_rate_ctrl()
726 ratetbl = rcu_dereference(tx->sta->sta.rates); in ieee80211_tx_h_rate_ctrl()
749 if (tx->sta && ieee80211_is_data(hdr->frame_control)) in ieee80211_tx_h_rate_ctrl()
750 tx->sta->last_tx_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
751 } else if (tx->sta) in ieee80211_tx_h_rate_ctrl()
752 tx->sta->last_tx_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
767 static __le16 ieee80211_tx_next_seq(struct sta_info *sta, int tid) in ieee80211_tx_next_seq() argument
769 u16 *seq = &sta->tid_seq[tid]; in ieee80211_tx_next_seq()
816 if (tx->sta) in ieee80211_tx_h_sequence()
817 tx->sta->tx_msdu[IEEE80211_NUM_TIDS]++; in ieee80211_tx_h_sequence()
826 if (!tx->sta) in ieee80211_tx_h_sequence()
833 tx->sta->tx_msdu[tid]++; in ieee80211_tx_h_sequence()
835 if (!tx->sta->sta.txq[0]) in ieee80211_tx_h_sequence()
836 hdr->seq_ctrl = ieee80211_tx_next_seq(tx->sta, tid); in ieee80211_tx_h_sequence()
982 if (!tx->sta) in ieee80211_tx_h_stats()
987 tx->sta->tx_fragments++; in ieee80211_tx_h_stats()
988 tx->sta->tx_bytes[ac] += skb->len; in ieee80211_tx_h_stats()
991 tx->sta->tx_packets[ac]++; in ieee80211_tx_h_stats()
1077 } else if (!tx->sta->sta.txq[tid]) { in ieee80211_tx_prep_agg()
1078 spin_lock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1097 tid_tx = rcu_dereference_protected_tid_tx(tx->sta, tid); in ieee80211_tx_prep_agg()
1113 spin_unlock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1134 struct sta_info *sta, struct sk_buff *skb) in ieee80211_tx_prepare() argument
1157 if (likely(sta)) { in ieee80211_tx_prepare()
1158 if (!IS_ERR(sta)) in ieee80211_tx_prepare()
1159 tx->sta = sta; in ieee80211_tx_prepare()
1162 tx->sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_tx_prepare()
1163 if (!tx->sta && sdata->wdev.use_4addr) in ieee80211_tx_prepare()
1168 tx->sta = sta_info_get_bss(sdata, hdr->addr1); in ieee80211_tx_prepare()
1170 if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) in ieee80211_tx_prepare()
1171 tx->sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_prepare()
1174 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && in ieee80211_tx_prepare()
1183 tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]); in ieee80211_tx_prepare()
1208 if (!tx->sta) in ieee80211_tx_prepare()
1210 else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) in ieee80211_tx_prepare()
1227 .sta = pubsta, in ieee80211_drv_tx()
1289 if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) { in ieee80211_tx_dequeue()
1290 struct sta_info *sta = container_of(txq->sta, struct sta_info, in ieee80211_tx_dequeue() local
1291 sta); in ieee80211_tx_dequeue()
1294 hdr->seq_ctrl = ieee80211_tx_next_seq(sta, txq->tid); in ieee80211_tx_dequeue()
1310 struct ieee80211_sta *sta, in ieee80211_tx_frags() argument
1373 ieee80211_drv_tx(local, vif, sta, skb); in ieee80211_tx_frags()
1384 struct sta_info *sta, bool txpending) in __ieee80211_tx() argument
1401 if (sta && !sta->uploaded) in __ieee80211_tx()
1402 sta = NULL; in __ieee80211_tx()
1404 if (sta) in __ieee80211_tx()
1405 pubsta = &sta->sta; in __ieee80211_tx()
1503 int band, struct ieee80211_sta **sta) in ieee80211_tx_prepare_skb() argument
1520 if (sta) { in ieee80211_tx_prepare_skb()
1521 if (tx.sta) in ieee80211_tx_prepare_skb()
1522 *sta = &tx.sta->sta; in ieee80211_tx_prepare_skb()
1524 *sta = NULL; in ieee80211_tx_prepare_skb()
1543 struct sta_info *sta, struct sk_buff *skb, in ieee80211_tx() argument
1560 res_prepare = ieee80211_tx_prepare(sdata, &tx, sta, skb); in ieee80211_tx()
1577 tx.sta, txpending); in ieee80211_tx()
1617 struct sta_info *sta, struct sk_buff *skb) in ieee80211_xmit() argument
1652 ieee80211_tx(sdata, sta, skb, false); in ieee80211_xmit()
1898 struct sta_info *sta; in ieee80211_lookup_ra_sta() local
1902 sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_lookup_ra_sta()
1903 if (sta) { in ieee80211_lookup_ra_sta()
1904 *sta_out = sta; in ieee80211_lookup_ra_sta()
1917 sta = sta_info_get_bss(sdata, skb->data); in ieee80211_lookup_ra_sta()
1920 sta = sta_info_get(sdata, sdata->u.wds.remote_addr); in ieee80211_lookup_ra_sta()
1930 sta = sta_info_get(sdata, skb->data); in ieee80211_lookup_ra_sta()
1931 if (sta) { in ieee80211_lookup_ra_sta()
1934 tdls_peer = test_sta_flag(sta, in ieee80211_lookup_ra_sta()
1936 tdls_auth = test_sta_flag(sta, in ieee80211_lookup_ra_sta()
1940 *sta_out = sta; in ieee80211_lookup_ra_sta()
1958 sta = sta_info_get(sdata, sdata->u.mgd.bssid); in ieee80211_lookup_ra_sta()
1959 if (!sta) in ieee80211_lookup_ra_sta()
1966 *sta_out = sta ?: ERR_PTR(-ENOENT); in ieee80211_lookup_ra_sta()
1990 struct sta_info *sta) in ieee80211_build_hdr() argument
2012 if (IS_ERR(sta)) in ieee80211_build_hdr()
2013 sta = NULL; in ieee80211_build_hdr()
2025 memcpy(hdr.addr1, sta->sta.addr, ETH_ALEN); in ieee80211_build_hdr()
2030 authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); in ieee80211_build_hdr()
2031 wme_sta = sta->sta.wme; in ieee80211_build_hdr()
2146 tdls_peer = test_sta_flag(sta, WLAN_STA_TDLS_PEER); in ieee80211_build_hdr()
2213 if (sta) { in ieee80211_build_hdr()
2214 authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); in ieee80211_build_hdr()
2215 wme_sta = sta->sta.wme; in ieee80211_build_hdr()
2392 struct sta_info *sta; in __ieee80211_subif_start_xmit() local
2401 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in __ieee80211_subif_start_xmit()
2406 skb = ieee80211_build_hdr(sdata, skb, info_flags, sta); in __ieee80211_subif_start_xmit()
2414 ieee80211_xmit(sdata, sta, skb); in __ieee80211_subif_start_xmit()
2442 struct sta_info *sta; in ieee80211_build_data_template() local
2446 if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { in ieee80211_build_data_template()
2452 skb = ieee80211_build_hdr(sdata, skb, info_flags, sta); in ieee80211_build_data_template()
2457 tx.sta = sta_info_get(sdata, hdr->addr1); in ieee80211_build_data_template()
2496 struct sta_info *sta; in ieee80211_tx_pending_skb() local
2518 sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_pending_skb()
2520 result = __ieee80211_tx(local, &skbs, skb->len, sta, true); in ieee80211_tx_pending_skb()
3269 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_reserve_tid() local
3270 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_reserve_tid()
3291 if (sta->reserved_tid == tid) { in ieee80211_reserve_tid()
3296 if (sta->reserved_tid != IEEE80211_TID_UNRESERVED) { in ieee80211_reserve_tid()
3309 set_sta_flag(sta, WLAN_STA_BLOCK_BA); in ieee80211_reserve_tid()
3310 __ieee80211_stop_tx_ba_session(sta, tid, in ieee80211_reserve_tid()
3317 sta->reserved_tid = tid; in ieee80211_reserve_tid()
3323 clear_sta_flag(sta, WLAN_STA_BLOCK_BA); in ieee80211_reserve_tid()
3333 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); in ieee80211_unreserve_tid() local
3334 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_unreserve_tid()
3349 if (tid != sta->reserved_tid) { in ieee80211_unreserve_tid()
3354 sta->reserved_tid = IEEE80211_TID_UNRESERVED; in ieee80211_unreserve_tid()