Lines Matching refs:bss
138 struct wpa_bss *bss = NULL; in wpa_supplicant_get_new_bss() local
142 bss = wpa_bss_get(wpa_s, bssid, ssid->ssid, ssid->ssid_len); in wpa_supplicant_get_new_bss()
143 if (!bss) in wpa_supplicant_get_new_bss()
144 bss = wpa_bss_get_bssid(wpa_s, bssid); in wpa_supplicant_get_new_bss()
146 return bss; in wpa_supplicant_get_new_bss()
152 struct wpa_bss *bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid); in wpa_supplicant_update_current_bss() local
154 if (!bss) { in wpa_supplicant_update_current_bss()
158 bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid); in wpa_supplicant_update_current_bss()
161 if (bss) in wpa_supplicant_update_current_bss()
162 wpa_s->current_bss = bss; in wpa_supplicant_update_current_bss()
507 static int wpa_supplicant_match_privacy(struct wpa_bss *bss, in wpa_supplicant_match_privacy() argument
543 if (bss->caps & IEEE80211_CAP_PRIVACY) in wpa_supplicant_match_privacy()
551 struct wpa_bss *bss, int debug_print) in wpa_supplicant_ssid_bss_match() argument
561 ret = wpas_wps_ssid_bss_match(wpa_s, ssid, bss); in wpa_supplicant_ssid_bss_match()
573 rsn_ie = wpa_bss_get_ie(bss, WLAN_EID_RSN); in wpa_supplicant_ssid_bss_match()
584 ie.pairwise_cipher = wpa_default_rsn_cipher(bss->freq); in wpa_supplicant_ssid_bss_match()
586 ie.group_cipher = wpa_default_rsn_cipher(bss->freq); in wpa_supplicant_ssid_bss_match()
667 wpa_ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE); in wpa_supplicant_ssid_bss_match()
735 wpa_bss_get_vendor_ie(bss, OWE_IE_VENDOR_TYPE) && in wpa_supplicant_ssid_bss_match()
763 wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE)) { in wpa_supplicant_ssid_bss_match()
798 struct wpa_bss *bss, int debug_print) in rate_match() argument
805 if (bss->freq == 0) in rate_match()
821 if (freq == bss->freq) { in rate_match()
836 rate_ie = wpa_bss_get_ie(bss, scan_ie[i]); in rate_match()
915 bss->freq, mode->mode, mode->num_rates); in rate_match()
929 static int bss_is_ess(struct wpa_bss *bss) in bss_is_ess() argument
931 if (bss_is_dmg(bss)) { in bss_is_ess()
932 return (bss->caps & IEEE80211_CAP_DMG_MASK) == in bss_is_ess()
936 return ((bss->caps & (IEEE80211_CAP_ESS | IEEE80211_CAP_IBSS)) == in bss_is_ess()
968 static void owe_trans_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, in owe_trans_ssid() argument
976 owe = wpa_bss_get_vendor_ie(bss, OWE_IE_VENDOR_TYPE); in owe_trans_ssid()
977 if (!owe || !wpa_bss_get_ie(bss, WLAN_EID_RSN)) in owe_trans_ssid()
998 if (!(bss->flags & WPA_BSS_OWE_TRANSITION)) { in owe_trans_ssid()
1010 bss->flags |= WPA_BSS_OWE_TRANSITION; in owe_trans_ssid()
1016 if (bss->ssid_len > 0) in owe_trans_ssid()
1042 if (os_memcmp(pos, bss->bssid, ETH_ALEN) != 0) { in owe_trans_ssid()
1054 os_memcpy(bss->ssid, pos, ssid_len); in owe_trans_ssid()
1055 bss->ssid_len = ssid_len; in owe_trans_ssid()
1056 bss->flags |= WPA_BSS_OWE_TRANSITION; in owe_trans_ssid()
1084 int i, struct wpa_bss *bss, in wpa_scan_res_match() argument
1101 ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE); in wpa_scan_res_match()
1104 ie = wpa_bss_get_ie(bss, WLAN_EID_RSN); in wpa_scan_res_match()
1110 ie = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE); in wpa_scan_res_match()
1116 i, MAC2STR(bss->bssid), in wpa_scan_res_match()
1117 wpa_ssid_txt(bss->ssid, bss->ssid_len), in wpa_scan_res_match()
1118 wpa_ie_len, rsn_ie_len, bss->caps, bss->level, in wpa_scan_res_match()
1119 bss->freq, in wpa_scan_res_match()
1120 wpa_bss_get_vendor_ie(bss, WPS_IE_VENDOR_TYPE) ? in wpa_scan_res_match()
1122 (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE) || in wpa_scan_res_match()
1123 wpa_bss_get_vendor_ie_beacon(bss, P2P_IE_VENDOR_TYPE)) in wpa_scan_res_match()
1128 e = wpa_blacklist_get(wpa_s, bss->bssid); in wpa_scan_res_match()
1152 match_ssid = bss->ssid; in wpa_scan_res_match()
1153 match_ssid_len = bss->ssid_len; in wpa_scan_res_match()
1154 owe_trans_ssid(wpa_s, bss, &match_ssid, &match_ssid_len); in wpa_scan_res_match()
1162 if (disallowed_bssid(wpa_s, bss->bssid)) { in wpa_scan_res_match()
1174 if (disabled_freq(wpa_s, bss->freq)) { in wpa_scan_res_match()
1210 wpas_wps_ssid_wildcard_ok(wpa_s, ssid, bss)) in wpa_scan_res_match()
1219 wpas_wps_ssid_wildcard_ok(wpa_s, ssid, bss)) in wpa_scan_res_match()
1225 os_memcmp(bss->bssid, ssid->bssid, ETH_ALEN) == 0) in wpa_scan_res_match()
1238 os_memcmp(bss->bssid, ssid->bssid, ETH_ALEN) != 0) { in wpa_scan_res_match()
1247 addr_in_list(bss->bssid, ssid->bssid_blacklist, in wpa_scan_res_match()
1257 !addr_in_list(bss->bssid, ssid->bssid_whitelist, in wpa_scan_res_match()
1265 if (!wpa_supplicant_ssid_bss_match(wpa_s, ssid, bss, in wpa_scan_res_match()
1298 if (!wpa_supplicant_match_privacy(bss, ssid)) { in wpa_scan_res_match()
1305 if (ssid->mode != WPAS_MODE_MESH && !bss_is_ess(bss) && in wpa_scan_res_match()
1306 !bss_is_pbss(bss)) { in wpa_scan_res_match()
1313 if (ssid->pbss != 2 && ssid->pbss != bss_is_pbss(bss)) { in wpa_scan_res_match()
1317 ssid->pbss, bss_is_pbss(bss)); in wpa_scan_res_match()
1321 if (!freq_allowed(ssid->freq_list, bss->freq)) { in wpa_scan_res_match()
1330 ssid->frequency != bss->freq) { in wpa_scan_res_match()
1338 if (!rate_match(wpa_s, ssid, bss, debug_print)) { in wpa_scan_res_match()
1349 (!(ie = wpa_bss_get_ie(bss, WLAN_EID_RSNX)) || in wpa_scan_res_match()
1372 !wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE) && in wpa_scan_res_match()
1373 !wpa_bss_get_vendor_ie_beacon(bss, P2P_IE_VENDOR_TYPE)) { in wpa_scan_res_match()
1384 ie = wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE); in wpa_scan_res_match()
1392 bss, P2P_IE_VENDOR_TYPE); in wpa_scan_res_match()
1419 if (os_reltime_before(&bss->last_update, &wpa_s->scan_min_time)) in wpa_scan_res_match()
1424 &bss->last_update, &diff); in wpa_scan_res_match()
1438 bss, MBO_ATTR_ID_ASSOC_DISALLOW); in wpa_scan_res_match()
1447 if (wpa_is_bss_tmp_disallowed(wpa_s, bss)) { in wpa_scan_res_match()
1460 !wpa_sm_pmksa_exists(wpa_s->wpa, bss->bssid, ssid) && in wpa_scan_res_match()
1494 struct wpa_bss *bss = wpa_s->last_scan_res[i]; in wpa_supplicant_select_bss() local
1496 ssid = wpa_scan_res_match(wpa_s, i, bss, group, in wpa_supplicant_select_bss()
1502 i, MAC2STR(bss->bssid), bss->freq, bss->level, in wpa_supplicant_select_bss()
1503 bss->snr, bss->est_throughput); in wpa_supplicant_select_bss()
1515 struct wpa_bss *bss = wpa_s->last_scan_res[i]; in wpa_supplicant_select_bss() local
1518 *selected_ssid = wpa_scan_res_match(wpa_s, i, bss, group, in wpa_supplicant_select_bss()
1525 bss == wpa_s->current_bss ? "current ": "", in wpa_supplicant_select_bss()
1526 MAC2STR(bss->bssid), in wpa_supplicant_select_bss()
1527 wpa_ssid_txt(bss->ssid, bss->ssid_len)); in wpa_supplicant_select_bss()
1528 return bss; in wpa_supplicant_select_bss()
1728 struct wpa_bss *bss; in wpa_supplicant_rsn_preauth_scan_results() local
1733 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in wpa_supplicant_rsn_preauth_scan_results()
1736 ssid = wpa_bss_get_ie(bss, WLAN_EID_SSID); in wpa_supplicant_rsn_preauth_scan_results()
1740 rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN); in wpa_supplicant_rsn_preauth_scan_results()
1744 rsn_preauth_scan_result(wpa_s->wpa, bss->bssid, ssid, rsn); in wpa_supplicant_rsn_preauth_scan_results()
1763 const struct wpa_bss *bss, int snr) in wpas_get_est_throughput_from_bss_snr() argument
1765 int rate = wpa_bss_get_max_rate(bss); in wpas_get_est_throughput_from_bss_snr()
1766 const u8 *ies = (const void *) (bss + 1); in wpas_get_est_throughput_from_bss_snr()
1767 size_t ie_len = bss->ie_len ? bss->ie_len : bss->beacon_ie_len; in wpas_get_est_throughput_from_bss_snr()
2921 struct wpa_bss *bss = wpa_s->current_bss; in wpas_fst_update_mb_assoc() local
2941 if (!bss) in wpas_fst_update_mb_assoc()
2944 ieprb = (const u8 *) (bss + 1); in wpas_fst_update_mb_assoc()
2945 iebcn = ieprb + bss->ie_len; in wpas_fst_update_mb_assoc()
2947 if (!wpas_fst_update_mbie(wpa_s, ieprb, bss->ie_len)) in wpas_fst_update_mb_assoc()
2949 else if (!wpas_fst_update_mbie(wpa_s, iebcn, bss->beacon_ie_len)) in wpas_fst_update_mb_assoc()
2962 struct wpa_bss *bss; in wpa_supplicant_event_assoc() local
2969 hostapd_notif_assoc(wpa_s->ap_iface->bss[0], in wpa_supplicant_event_assoc()
3210 bss = wpa_bss_get_bssid(wpa_s, bssid); in wpa_supplicant_event_assoc()
3214 const u8 *fils_cache_id = wpa_bss_get_fils_cache_id(bss); in wpa_supplicant_event_assoc()
3222 wpas_mbo_check_pmf(wpa_s, bss, wpa_s->current_ssid); in wpa_supplicant_event_assoc()
3777 struct wpa_bss *bss; in ft_rx_action() local
3778 bss = wpa_bss_get_bssid(wpa_s, target_ap_addr); in ft_rx_action()
3779 if (bss) in ft_rx_action()
3780 wpa_s->sme.freq = bss->freq; in ft_rx_action()
3818 hostapd_notif_disassoc(wpa_s->ap_iface->bss[0], addr); in wpas_event_disconnect()
3887 hostapd_notif_disassoc(wpa_s->ap_iface->bss[0], info->addr); in wpas_event_disassoc()
4308 struct wpa_bss *bss = wpa_bss_get_bssid(wpa_s, wpa_s->bssid); in wpa_supplicant_event_assoc_auth() local
4309 const u8 *fils_cache_id = wpa_bss_get_fils_cache_id(bss); in wpa_supplicant_event_assoc_auth()
4379 struct wpa_bss *bss = wpa_s->current_bss; in wpas_event_assoc_reject() local
4381 if (!bss) { in wpas_event_assoc_reject()
4382 bss = wpa_supplicant_get_new_bss(wpa_s, bssid); in wpas_event_assoc_reject()
4383 if (!bss) { in wpas_event_assoc_reject()
4392 wpa_supplicant_connect(wpa_s, bss, ssid); in wpas_event_assoc_reject()
4409 struct wpa_bss *bss = wpa_s->current_bss; in wpas_event_assoc_reject() local
4412 if (!bss) in wpas_event_assoc_reject()
4413 bss = wpa_supplicant_get_new_bss(wpa_s, bssid); in wpas_event_assoc_reject()
4414 if (!bss || wpa_s->dpp_pfs_fallback) { in wpas_event_assoc_reject()
4425 wpa_supplicant_connect(wpa_s, bss, ssid); in wpas_event_assoc_reject()
5011 hostapd_probe_req_rx(wpa_s->ap_iface->bss[0], in wpa_supplicant_event()
5200 hostapd_event_sta_low_ack(wpa_s->ap_iface->bss[0], in wpa_supplicant_event()
5272 wpa_s->ap_iface->bss[0], in wpa_supplicant_event()
5299 hostapd_acs_channel_selected(wpa_s->ap_iface->bss[0], in wpa_supplicant_event()
5335 hostapd_event_sta_opmode_changed(wpa_s->ap_iface->bss[0], in wpa_supplicant_event()