Lines Matching refs:sta

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