Lines Matching refs:sta
306 struct sta_info *sta) in ieee80211_tdls_chandef_vht_upgrade() argument
310 struct cfg80211_chan_def uc = sta->tdls_chandef; in ieee80211_tdls_chandef_vht_upgrade()
311 enum nl80211_chan_width max_width = ieee80211_sta_cap_chan_bw(sta); in ieee80211_tdls_chandef_vht_upgrade()
343 (uc.width > sta->tdls_chandef.width && in ieee80211_tdls_chandef_vht_upgrade()
348 if (!cfg80211_chandef_identical(&uc, &sta->tdls_chandef)) { in ieee80211_tdls_chandef_vht_upgrade()
350 sta->tdls_chandef.width, uc.width); in ieee80211_tdls_chandef_vht_upgrade()
356 sta->tdls_chandef = uc; in ieee80211_tdls_chandef_vht_upgrade()
370 struct sta_info *sta = NULL; in ieee80211_tdls_add_setup_start_ies() local
432 sta = sta_info_get(sdata, peer); in ieee80211_tdls_add_setup_start_ies()
433 if (WARN_ON_ONCE(!sta)) { in ieee80211_tdls_add_setup_start_ies()
438 sta->tdls_chandef = sdata->vif.bss_conf.chandef; in ieee80211_tdls_add_setup_start_ies()
462 ht_cap.ht_supported && sta->sta.ht_cap.ht_supported) { in ieee80211_tdls_add_setup_start_ies()
464 memcpy(&ht_cap, &sta->sta.ht_cap, sizeof(ht_cap)); in ieee80211_tdls_add_setup_start_ies()
513 vht_cap.vht_supported && sta->sta.vht_cap.vht_supported) { in ieee80211_tdls_add_setup_start_ies()
515 memcpy(&vht_cap, &sta->sta.vht_cap, sizeof(vht_cap)); in ieee80211_tdls_add_setup_start_ies()
527 if (test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW)) in ieee80211_tdls_add_setup_start_ies()
528 ieee80211_tdls_chandef_vht_upgrade(sdata, sta); in ieee80211_tdls_add_setup_start_ies()
550 struct sta_info *sta, *ap_sta; in ieee80211_tdls_add_setup_cfm_ies() local
560 sta = sta_info_get(sdata, peer); in ieee80211_tdls_add_setup_cfm_ies()
562 if (WARN_ON_ONCE(!sta || !ap_sta)) { in ieee80211_tdls_add_setup_cfm_ies()
567 sta->tdls_chandef = sdata->vif.bss_conf.chandef; in ieee80211_tdls_add_setup_cfm_ies()
583 if (local->hw.queues >= IEEE80211_NUM_ACS && sta->sta.wme) in ieee80211_tdls_add_setup_cfm_ies()
606 if (!ap_sta->sta.ht_cap.ht_supported && sta->sta.ht_cap.ht_supported) { in ieee80211_tdls_add_setup_cfm_ies()
612 ieee80211_ie_build_ht_oper(pos, &sta->sta.ht_cap, in ieee80211_tdls_add_setup_cfm_ies()
621 sta->sta.vht_cap.vht_supported) { in ieee80211_tdls_add_setup_cfm_ies()
626 if (test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW)) in ieee80211_tdls_add_setup_cfm_ies()
627 ieee80211_tdls_chandef_vht_upgrade(sdata, sta); in ieee80211_tdls_add_setup_cfm_ies()
630 ieee80211_ie_build_vht_oper(pos, &sta->sta.vht_cap, in ieee80211_tdls_add_setup_cfm_ies()
631 &sta->tdls_chandef); in ieee80211_tdls_add_setup_cfm_ies()
941 struct sta_info *sta; in ieee80211_tdls_prep_mgmt_packet() local
946 sta = sta_info_get(sdata, peer); in ieee80211_tdls_prep_mgmt_packet()
951 if (sta) { in ieee80211_tdls_prep_mgmt_packet()
952 set_sta_flag(sta, WLAN_STA_TDLS_INITIATOR); in ieee80211_tdls_prep_mgmt_packet()
953 sta->sta.tdls_initiator = false; in ieee80211_tdls_prep_mgmt_packet()
966 if (sta) { in ieee80211_tdls_prep_mgmt_packet()
967 clear_sta_flag(sta, WLAN_STA_TDLS_INITIATOR); in ieee80211_tdls_prep_mgmt_packet()
968 sta->sta.tdls_initiator = true; in ieee80211_tdls_prep_mgmt_packet()
984 if (sta && test_sta_flag(sta, WLAN_STA_TDLS_INITIATOR)) in ieee80211_tdls_prep_mgmt_packet()
1032 sta = sta_info_get(sdata, peer); in ieee80211_tdls_prep_mgmt_packet()
1033 try_resend = sta && test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH); in ieee80211_tdls_prep_mgmt_packet()
1148 struct sta_info *sta; in ieee80211_tdls_mgmt_teardown() local
1175 sta = sta_info_get(sdata, peer); in ieee80211_tdls_mgmt_teardown()
1176 if (sta) in ieee80211_tdls_mgmt_teardown()
1177 clear_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH); in ieee80211_tdls_mgmt_teardown()
1248 struct sta_info *sta) in iee80211_tdls_recalc_chanctx() argument
1266 if (width != conf->def.width && sta && in iee80211_tdls_recalc_chanctx()
1267 test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW)) { in iee80211_tdls_recalc_chanctx()
1271 bw = min(bw, ieee80211_sta_cap_rx_bw(sta)); in iee80211_tdls_recalc_chanctx()
1272 if (bw != sta->sta.bandwidth) { in iee80211_tdls_recalc_chanctx()
1273 sta->sta.bandwidth = bw; in iee80211_tdls_recalc_chanctx()
1274 rate_control_rate_update(local, sband, sta, in iee80211_tdls_recalc_chanctx()
1291 struct sta_info *sta; in iee80211_tdls_have_ht_peers() local
1295 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in iee80211_tdls_have_ht_peers()
1296 if (!sta->sta.tdls || sta->sdata != sdata || !sta->uploaded || in iee80211_tdls_have_ht_peers()
1297 !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || in iee80211_tdls_have_ht_peers()
1298 !test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH) || in iee80211_tdls_have_ht_peers()
1299 !sta->sta.ht_cap.ht_supported) in iee80211_tdls_have_ht_peers()
1311 struct sta_info *sta) in iee80211_tdls_recalc_ht_protection() argument
1324 tdls_ht = (sta && sta->sta.ht_cap.ht_supported) || in iee80211_tdls_recalc_ht_protection()
1344 struct sta_info *sta; in ieee80211_tdls_oper() local
1382 sta = sta_info_get(sdata, peer); in ieee80211_tdls_oper()
1383 if (!sta) { in ieee80211_tdls_oper()
1389 iee80211_tdls_recalc_chanctx(sdata, sta); in ieee80211_tdls_oper()
1390 iee80211_tdls_recalc_ht_protection(sdata, sta); in ieee80211_tdls_oper()
1392 set_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH); in ieee80211_tdls_oper()
1489 ieee80211_tdls_ch_sw_tmpl_get(struct sta_info *sta, u8 oper_class, in ieee80211_tdls_ch_sw_tmpl_get() argument
1493 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_tdls_ch_sw_tmpl_get()
1525 skb = ieee80211_tdls_build_mgmt_packet_data(sdata, sta->sta.addr, in ieee80211_tdls_ch_sw_tmpl_get()
1527 0, 0, !sta->sta.tdls_initiator, in ieee80211_tdls_ch_sw_tmpl_get()
1553 sta->sta.addr, chandef->chan->center_freq, chandef->width); in ieee80211_tdls_ch_sw_tmpl_get()
1564 struct sta_info *sta; in ieee80211_tdls_channel_switch() local
1574 sta = sta_info_get(sdata, addr); in ieee80211_tdls_channel_switch()
1575 if (!sta) { in ieee80211_tdls_channel_switch()
1583 if (!test_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH)) { in ieee80211_tdls_channel_switch()
1590 skb = ieee80211_tdls_ch_sw_tmpl_get(sta, oper_class, chandef, in ieee80211_tdls_channel_switch()
1597 ret = drv_tdls_channel_switch(local, sdata, &sta->sta, oper_class, in ieee80211_tdls_channel_switch()
1600 set_sta_flag(sta, WLAN_STA_TDLS_OFF_CHANNEL); in ieee80211_tdls_channel_switch()
1615 struct sta_info *sta; in ieee80211_tdls_cancel_channel_switch() local
1618 sta = sta_info_get(sdata, addr); in ieee80211_tdls_cancel_channel_switch()
1619 if (!sta) { in ieee80211_tdls_cancel_channel_switch()
1626 if (!test_sta_flag(sta, WLAN_STA_TDLS_OFF_CHANNEL)) { in ieee80211_tdls_cancel_channel_switch()
1632 drv_tdls_cancel_channel_switch(local, sdata, &sta->sta); in ieee80211_tdls_cancel_channel_switch()
1633 clear_sta_flag(sta, WLAN_STA_TDLS_OFF_CHANNEL); in ieee80211_tdls_cancel_channel_switch()
1640 ieee80211_tdls_ch_sw_resp_tmpl_get(struct sta_info *sta, in ieee80211_tdls_ch_sw_resp_tmpl_get() argument
1643 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_tdls_ch_sw_resp_tmpl_get()
1650 skb = ieee80211_tdls_build_mgmt_packet_data(sdata, sta->sta.addr, in ieee80211_tdls_ch_sw_resp_tmpl_get()
1652 0, 0, !sta->sta.tdls_initiator, in ieee80211_tdls_ch_sw_resp_tmpl_get()
1678 sta->sta.addr); in ieee80211_tdls_ch_sw_resp_tmpl_get()
1688 struct sta_info *sta; in ieee80211_process_tdls_channel_switch_resp() local
1706 sta = sta_info_get(sdata, tf->sa); in ieee80211_process_tdls_channel_switch_resp()
1707 if (!sta || !test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) { in ieee80211_process_tdls_channel_switch_resp()
1714 params.sta = &sta->sta; in ieee80211_process_tdls_channel_switch_resp()
1739 if (local_initiator == sta->sta.tdls_initiator) { in ieee80211_process_tdls_channel_switch_resp()
1749 ieee80211_tdls_ch_sw_resp_tmpl_get(sta, ¶ms.ch_sw_tm_ie); in ieee80211_process_tdls_channel_switch_resp()
1781 struct sta_info *sta; in ieee80211_process_tdls_channel_switch_req() local
1872 sta = sta_info_get(sdata, tf->sa); in ieee80211_process_tdls_channel_switch_req()
1873 if (!sta || !test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) { in ieee80211_process_tdls_channel_switch_req()
1880 params.sta = &sta->sta; in ieee80211_process_tdls_channel_switch_req()
1885 if (local_initiator == sta->sta.tdls_initiator) { in ieee80211_process_tdls_channel_switch_req()
1892 if (!sta->sta.ht_cap.ht_supported && elems.sec_chan_offs && in ieee80211_process_tdls_channel_switch_req()
1904 ieee80211_tdls_ch_sw_resp_tmpl_get(sta, in ieee80211_process_tdls_channel_switch_req()
1958 struct sta_info *sta; in ieee80211_teardown_tdls_peers() local
1962 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in ieee80211_teardown_tdls_peers()
1963 if (!sta->sta.tdls || sta->sdata != sdata || !sta->uploaded || in ieee80211_teardown_tdls_peers()
1964 !test_sta_flag(sta, WLAN_STA_AUTHORIZED)) in ieee80211_teardown_tdls_peers()
1967 ieee80211_tdls_oper_request(&sdata->vif, sta->sta.addr, in ieee80211_teardown_tdls_peers()
2003 struct ieee80211_sta *sta; in ieee80211_tdls_handle_disconnect() local
2006 sta = ieee80211_find_sta(&sdata->vif, peer); in ieee80211_tdls_handle_disconnect()
2007 if (!sta || !sta->tdls) { in ieee80211_tdls_handle_disconnect()