Lines Matching refs:sta

309 				   struct sta_info *sta)
313 struct cfg80211_chan_def uc = sta->tdls_chandef;
315 ieee80211_sta_cap_chan_bw(&sta->deflink);
347 (uc.width > sta->tdls_chandef.width &&
352 if (!cfg80211_chandef_identical(&uc, &sta->tdls_chandef)) {
354 sta->tdls_chandef.width, uc.width);
360 sta->tdls_chandef = uc;
377 struct sta_info *sta = NULL;
437 sta = sta_info_get(sdata, peer);
438 if (WARN_ON_ONCE(!sta))
441 sta->tdls_chandef = link->conf->chanreq.oper;
465 ht_cap.ht_supported && sta->sta.deflink.ht_cap.ht_supported) {
467 memcpy(&ht_cap, &sta->sta.deflink.ht_cap, sizeof(ht_cap));
520 vht_cap.vht_supported && sta->sta.deflink.vht_cap.vht_supported) {
522 memcpy(&vht_cap, &sta->sta.deflink.vht_cap, sizeof(vht_cap));
531 if (test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW))
532 ieee80211_tdls_chandef_vht_upgrade(sdata, sta);
600 struct sta_info *sta, *ap_sta;
608 sta = sta_info_get(sdata, peer);
611 if (WARN_ON_ONCE(!sta || !ap_sta))
614 sta->tdls_chandef = link->conf->chanreq.oper;
630 if (local->hw.queues >= IEEE80211_NUM_ACS && sta->sta.wme)
653 if (!ap_sta->sta.deflink.ht_cap.ht_supported && sta->sta.deflink.ht_cap.ht_supported) {
659 ieee80211_ie_build_ht_oper(pos, &sta->sta.deflink.ht_cap,
668 sta->sta.deflink.vht_cap.vht_supported) {
673 if (test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW))
674 ieee80211_tdls_chandef_vht_upgrade(sdata, sta);
677 ieee80211_ie_build_vht_oper(pos, &sta->sta.deflink.vht_cap,
678 &sta->tdls_chandef);
1008 struct sta_info *sta;
1013 sta = sta_info_get(sdata, peer);
1018 if (sta) {
1019 set_sta_flag(sta, WLAN_STA_TDLS_INITIATOR);
1020 sta->sta.tdls_initiator = false;
1033 if (sta) {
1034 clear_sta_flag(sta, WLAN_STA_TDLS_INITIATOR);
1035 sta->sta.tdls_initiator = true;
1051 if (sta && test_sta_flag(sta, WLAN_STA_TDLS_INITIATOR))
1099 sta = sta_info_get(sdata, peer);
1100 try_resend = sta && test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH);
1216 struct sta_info *sta;
1244 sta = sta_info_get(sdata, peer);
1245 if (sta)
1246 clear_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH);
1318 struct sta_info *sta)
1337 if (width != conf->def.width && sta &&
1338 test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW)) {
1342 bw = min(bw, ieee80211_sta_cap_rx_bw(&sta->deflink));
1343 if (bw != sta->sta.deflink.bandwidth) {
1344 sta->sta.deflink.bandwidth = bw;
1345 rate_control_rate_update(local, sband, sta, 0,
1361 struct sta_info *sta;
1365 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) {
1366 if (!sta->sta.tdls || sta->sdata != sdata || !sta->uploaded ||
1367 !test_sta_flag(sta, WLAN_STA_AUTHORIZED) ||
1368 !test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH) ||
1369 !sta->sta.deflink.ht_cap.ht_supported)
1381 struct sta_info *sta)
1393 tdls_ht = (sta && sta->sta.deflink.ht_cap.ht_supported) ||
1414 struct sta_info *sta;
1450 sta = sta_info_get(sdata, peer);
1451 if (!sta)
1454 iee80211_tdls_recalc_chanctx(sdata, sta);
1455 iee80211_tdls_recalc_ht_protection(sdata, sta);
1457 set_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH);
1549 ieee80211_tdls_ch_sw_tmpl_get(struct sta_info *sta, u8 oper_class,
1553 struct ieee80211_sub_if_data *sdata = sta->sdata;
1559 int link_id = sta->sta.valid_links ? ffs(sta->sta.valid_links) - 1 : 0;
1586 skb = ieee80211_tdls_build_mgmt_packet_data(sdata, sta->sta.addr,
1589 0, 0, !sta->sta.tdls_initiator,
1615 sta->sta.addr, chandef->chan->center_freq, chandef->width);
1626 struct sta_info *sta;
1637 sta = sta_info_get(sdata, addr);
1638 if (!sta) {
1646 if (!test_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH)) {
1653 skb = ieee80211_tdls_ch_sw_tmpl_get(sta, oper_class, chandef,
1660 ret = drv_tdls_channel_switch(local, sdata, &sta->sta, oper_class,
1663 set_sta_flag(sta, WLAN_STA_TDLS_OFF_CHANNEL);
1677 struct sta_info *sta;
1681 sta = sta_info_get(sdata, addr);
1682 if (!sta) {
1689 if (!test_sta_flag(sta, WLAN_STA_TDLS_OFF_CHANNEL)) {
1695 drv_tdls_cancel_channel_switch(local, sdata, &sta->sta);
1696 clear_sta_flag(sta, WLAN_STA_TDLS_OFF_CHANNEL);
1700 ieee80211_tdls_ch_sw_resp_tmpl_get(struct sta_info *sta,
1703 struct ieee80211_sub_if_data *sdata = sta->sdata;
1706 int link_id = sta->sta.valid_links ? ffs(sta->sta.valid_links) - 1 : 0;
1711 skb = ieee80211_tdls_build_mgmt_packet_data(sdata, sta->sta.addr,
1714 0, 0, !sta->sta.tdls_initiator,
1740 sta->sta.addr);
1750 struct sta_info *sta;
1769 sta = sta_info_get(sdata, tf->sa);
1770 if (!sta || !test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) {
1771 tdls_dbg(sdata, "TDLS chan switch from non-peer sta %pM\n",
1777 params.sta = &sta->sta;
1806 if (local_initiator == sta->sta.tdls_initiator) {
1816 ieee80211_tdls_ch_sw_resp_tmpl_get(sta, &params.ch_sw_tm_ie);
1848 struct sta_info *sta;
1946 sta = sta_info_get(sdata, tf->sa);
1947 if (!sta || !test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) {
1948 tdls_dbg(sdata, "TDLS chan switch from non-peer sta %pM\n",
1954 params.sta = &sta->sta;
1959 if (local_initiator == sta->sta.tdls_initiator) {
1966 if (!sta->sta.deflink.ht_cap.ht_supported && elems->sec_chan_offs &&
1978 ieee80211_tdls_ch_sw_resp_tmpl_get(sta,
2034 struct sta_info *sta;
2038 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) {
2039 if (!sta->sta.tdls || sta->sdata != sdata || !sta->uploaded ||
2040 !test_sta_flag(sta, WLAN_STA_AUTHORIZED))
2043 if (sta->deflink.link_id != link->link_id)
2046 ieee80211_tdls_oper_request(&sdata->vif, sta->sta.addr,
2056 struct ieee80211_sta *sta;
2059 sta = ieee80211_find_sta(&sdata->vif, peer);
2060 if (!sta || !sta->tdls) {