Lines Matching refs:bss
50 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
53 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
226 static int additional_roaming_consortiums(struct wpa_bss *bss) in additional_roaming_consortiums() argument
229 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in additional_roaming_consortiums()
244 struct wpa_bss *bss) in interworking_anqp_send_req() argument
255 MAC2STR(bss->bssid)); in interworking_anqp_send_req()
256 wpa_s->interworking_gas_bss = bss; in interworking_anqp_send_req()
264 additional_roaming_consortiums(bss))) in interworking_anqp_send_req()
280 if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE)) { in interworking_anqp_send_req()
313 res = gas_query_req(wpa_s->gas, bss->bssid, bss->freq, buf, in interworking_anqp_send_req()
875 struct wpa_cred *cred, struct wpa_bss *bss) in already_connected() argument
887 if (ssid->ssid_len != bss->ssid_len || in already_connected()
888 os_memcmp(ssid->ssid, bss->ssid, bss->ssid_len) != 0) in already_connected()
902 struct wpa_bss *bss) in remove_duplicate_network() argument
909 if (ssid->ssid_len != bss->ssid_len || in remove_duplicate_network()
910 os_memcmp(ssid->ssid, bss->ssid, bss->ssid_len) != 0) in remove_duplicate_network()
965 struct wpa_bss *bss, int only_add) in interworking_connect_3gpp() argument
973 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL) in interworking_connect_3gpp()
977 " (3GPP)", MAC2STR(bss->bssid)); in interworking_connect_3gpp()
979 if (already_connected(wpa_s, cred, bss)) { in interworking_connect_3gpp()
981 MAC2STR(bss->bssid)); in interworking_connect_3gpp()
985 remove_duplicate_network(wpa_s, cred, bss); in interworking_connect_3gpp()
996 ssid->ssid = os_zalloc(bss->ssid_len + 1); in interworking_connect_3gpp()
999 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len); in interworking_connect_3gpp()
1000 ssid->ssid_len = bss->ssid_len; in interworking_connect_3gpp()
1148 static int cred_no_required_oi_match(struct wpa_cred *cred, struct wpa_bss *bss) in cred_no_required_oi_match() argument
1155 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in cred_no_required_oi_match()
1158 (bss->anqp == NULL || bss->anqp->roaming_consortium == NULL)) in cred_no_required_oi_match()
1162 bss->anqp ? in cred_no_required_oi_match()
1163 bss->anqp->roaming_consortium : NULL, in cred_no_required_oi_match()
1169 static int cred_excluded_ssid(struct wpa_cred *cred, struct wpa_bss *bss) in cred_excluded_ssid() argument
1178 if (bss->ssid_len == e->ssid_len && in cred_excluded_ssid()
1179 os_memcmp(bss->ssid, e->ssid, e->ssid_len) == 0) in cred_excluded_ssid()
1188 struct wpa_cred *cred, struct wpa_bss *bss) in cred_below_min_backhaul() argument
1204 if (bss->anqp == NULL || bss->anqp->hs20_wan_metrics == NULL) in cred_below_min_backhaul()
1207 wan = wpabuf_head(bss->anqp->hs20_wan_metrics); in cred_below_min_backhaul()
1229 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_below_min_backhaul()
1230 bss->anqp->domain_name : NULL); in cred_below_min_backhaul()
1249 struct wpa_cred *cred, struct wpa_bss *bss) in cred_over_max_bss_load() argument
1257 ie = wpa_bss_get_ie(bss, WLAN_EID_BSS_LOAD); in cred_over_max_bss_load()
1261 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_over_max_bss_load()
1262 bss->anqp->domain_name : NULL); in cred_over_max_bss_load()
1301 struct wpa_cred *cred, struct wpa_bss *bss) in cred_conn_capab_missing() argument
1312 if (bss->anqp == NULL || bss->anqp->hs20_connection_capability == NULL) in cred_conn_capab_missing()
1316 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_conn_capab_missing()
1317 bss->anqp->domain_name : NULL); in cred_conn_capab_missing()
1321 capab = wpabuf_head(bss->anqp->hs20_connection_capability); in cred_conn_capab_missing()
1322 end = capab + wpabuf_len(bss->anqp->hs20_connection_capability); in cred_conn_capab_missing()
1347 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_roaming_consortium() argument
1354 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in interworking_credentials_available_roaming_consortium()
1357 (bss->anqp == NULL || bss->anqp->roaming_consortium == NULL)) in interworking_credentials_available_roaming_consortium()
1368 bss->anqp ? in interworking_credentials_available_roaming_consortium()
1369 bss->anqp->roaming_consortium : in interworking_credentials_available_roaming_consortium()
1375 if (cred_no_required_oi_match(cred, bss)) in interworking_credentials_available_roaming_consortium()
1377 if (!ignore_bw && cred_below_min_backhaul(wpa_s, cred, bss)) in interworking_credentials_available_roaming_consortium()
1379 if (!ignore_bw && cred_over_max_bss_load(wpa_s, cred, bss)) in interworking_credentials_available_roaming_consortium()
1381 if (!ignore_bw && cred_conn_capab_missing(wpa_s, cred, bss)) in interworking_credentials_available_roaming_consortium()
1383 if (cred_excluded_ssid(cred, bss)) { in interworking_credentials_available_roaming_consortium()
1535 struct wpa_bss *bss, int only_add) in interworking_connect_roaming_consortium() argument
1540 " based on roaming consortium match", MAC2STR(bss->bssid)); in interworking_connect_roaming_consortium()
1542 if (already_connected(wpa_s, cred, bss)) { in interworking_connect_roaming_consortium()
1544 MAC2STR(bss->bssid)); in interworking_connect_roaming_consortium()
1548 remove_duplicate_network(wpa_s, cred, bss); in interworking_connect_roaming_consortium()
1558 ssid->ssid = os_zalloc(bss->ssid_len + 1); in interworking_connect_roaming_consortium()
1561 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len); in interworking_connect_roaming_consortium()
1562 ssid->ssid_len = bss->ssid_len; in interworking_connect_roaming_consortium()
1594 struct wpa_bss *bss, int allow_excluded, in interworking_connect_helper() argument
1606 if (wpa_s->conf->cred == NULL || bss == NULL) in interworking_connect_helper()
1608 if (disallowed_bssid(wpa_s, bss->bssid) || in interworking_connect_helper()
1609 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) { in interworking_connect_helper()
1612 MACSTR, MAC2STR(bss->bssid)); in interworking_connect_helper()
1618 MAC2STR(bss->bssid), allow_excluded); in interworking_connect_helper()
1620 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) { in interworking_connect_helper()
1631 wpa_s, bss, 0, excl); in interworking_connect_helper()
1640 cred = interworking_credentials_available_realm(wpa_s, bss, 0, excl); in interworking_connect_helper()
1649 cred_3gpp = interworking_credentials_available_3gpp(wpa_s, bss, 0, in interworking_connect_helper()
1663 wpa_s, bss, 1, excl); in interworking_connect_helper()
1672 cred = interworking_credentials_available_realm(wpa_s, bss, 1, in interworking_connect_helper()
1682 cred_3gpp = interworking_credentials_available_3gpp(wpa_s, bss, in interworking_connect_helper()
1697 bss, only_add); in interworking_connect_helper()
1701 return interworking_connect_3gpp(wpa_s, cred_3gpp, bss, in interworking_connect_helper()
1708 MACSTR, MAC2STR(bss->bssid)); in interworking_connect_helper()
1712 realm = nai_realm_parse(bss->anqp ? bss->anqp->nai_realm : NULL, in interworking_connect_helper()
1717 MACSTR, MAC2STR(bss->bssid)); in interworking_connect_helper()
1732 MACSTR, MAC2STR(bss->bssid)); in interworking_connect_helper()
1738 MAC2STR(bss->bssid)); in interworking_connect_helper()
1740 if (already_connected(wpa_s, cred, bss)) { in interworking_connect_helper()
1742 MAC2STR(bss->bssid)); in interworking_connect_helper()
1747 remove_duplicate_network(wpa_s, cred, bss); in interworking_connect_helper()
1759 ssid->ssid = os_zalloc(bss->ssid_len + 1); in interworking_connect_helper()
1762 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len); in interworking_connect_helper()
1763 ssid->ssid_len = bss->ssid_len; in interworking_connect_helper()
1853 int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, in interworking_connect() argument
1856 return interworking_connect_helper(wpa_s, bss, 1, only_add); in interworking_connect()
1886 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_3gpp() argument
1895 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL) { in interworking_credentials_available_3gpp()
1898 bss->anqp, bss->anqp ? bss->anqp->anqp_3gpp : NULL); in interworking_credentials_available_3gpp()
1970 MAC2STR(bss->bssid)); in interworking_credentials_available_3gpp()
1971 ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len); in interworking_credentials_available_3gpp()
1975 if (cred_no_required_oi_match(cred, bss)) in interworking_credentials_available_3gpp()
1978 cred_below_min_backhaul(wpa_s, cred, bss)) in interworking_credentials_available_3gpp()
1981 cred_over_max_bss_load(wpa_s, cred, bss)) in interworking_credentials_available_3gpp()
1984 cred_conn_capab_missing(wpa_s, cred, bss)) in interworking_credentials_available_3gpp()
1986 if (cred_excluded_ssid(cred, bss)) { in interworking_credentials_available_3gpp()
2011 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_realm() argument
2019 if (bss->anqp == NULL || bss->anqp->nai_realm == NULL) in interworking_credentials_available_realm()
2026 MACSTR, MAC2STR(bss->bssid)); in interworking_credentials_available_realm()
2027 realm = nai_realm_parse(bss->anqp->nai_realm, &count); in interworking_credentials_available_realm()
2031 MACSTR, MAC2STR(bss->bssid)); in interworking_credentials_available_realm()
2043 if (cred_no_required_oi_match(cred, bss)) in interworking_credentials_available_realm()
2046 cred_below_min_backhaul(wpa_s, cred, bss)) in interworking_credentials_available_realm()
2049 cred_over_max_bss_load(wpa_s, cred, bss)) in interworking_credentials_available_realm()
2052 cred_conn_capab_missing(wpa_s, cred, bss)) in interworking_credentials_available_realm()
2054 if (cred_excluded_ssid(cred, bss)) { in interworking_credentials_available_realm()
2087 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_helper() argument
2093 if (disallowed_bssid(wpa_s, bss->bssid) || in interworking_credentials_available_helper()
2094 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) { in interworking_credentials_available_helper()
2096 MACSTR, MAC2STR(bss->bssid)); in interworking_credentials_available_helper()
2100 cred = interworking_credentials_available_realm(wpa_s, bss, ignore_bw, in interworking_credentials_available_helper()
2102 cred2 = interworking_credentials_available_3gpp(wpa_s, bss, ignore_bw, in interworking_credentials_available_helper()
2115 wpa_s, bss, ignore_bw, &excluded2); in interworking_credentials_available_helper()
2133 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int *excluded) in interworking_credentials_available() argument
2139 cred = interworking_credentials_available_helper(wpa_s, bss, 0, in interworking_credentials_available()
2143 return interworking_credentials_available_helper(wpa_s, bss, 1, in interworking_credentials_available()
2263 struct wpa_bss *bss; in interworking_find_network_match() local
2266 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in interworking_find_network_match()
2271 if (ssid->ssid_len != bss->ssid_len || in interworking_find_network_match()
2272 os_memcmp(ssid->ssid, bss->ssid, ssid->ssid_len) != in interworking_find_network_match()
2306 struct wpa_bss *bss) in roaming_prio() argument
2310 if (bss->anqp == NULL || bss->anqp->domain_name == NULL) { in roaming_prio()
2315 if (interworking_home_sp_cred(wpa_s, cred, bss->anqp->domain_name) > 0) in roaming_prio()
2323 bss->anqp->domain_name)) { in roaming_prio()
2339 struct wpa_bss *bss; in pick_best_roaming_partner() local
2353 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in pick_best_roaming_partner()
2354 if (bss == selected) in pick_best_roaming_partner()
2356 cred2 = interworking_credentials_available(wpa_s, bss, NULL); in pick_best_roaming_partner()
2359 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) in pick_best_roaming_partner()
2361 prio = roaming_prio(wpa_s, cred2, bss); in pick_best_roaming_partner()
2363 MACSTR " (cred=%d)", prio, MAC2STR(bss->bssid), in pick_best_roaming_partner()
2370 bh2 = cred_below_min_backhaul(wpa_s, cred2, bss); in pick_best_roaming_partner()
2371 load2 = cred_over_max_bss_load(wpa_s, cred2, bss); in pick_best_roaming_partner()
2372 conn2 = cred_conn_capab_missing(wpa_s, cred2, bss); in pick_best_roaming_partner()
2376 …wpa_printf(MSG_DEBUG, "Interworking: Better roaming partner " MACSTR " selected", MAC2STR(bss->bss… in pick_best_roaming_partner()
2378 selected = bss; in pick_best_roaming_partner()
2389 struct wpa_bss *bss, *selected = NULL, *selected_home = NULL; in interworking_select_network() local
2403 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in interworking_select_network()
2406 cred = interworking_credentials_available(wpa_s, bss, in interworking_select_network()
2411 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) { in interworking_select_network()
2419 MAC2STR(bss->bssid)); in interworking_select_network()
2424 res = interworking_home_sp(wpa_s, bss->anqp ? in interworking_select_network()
2425 bss->anqp->domain_name : NULL); in interworking_select_network()
2432 bh = cred_below_min_backhaul(wpa_s, cred, bss); in interworking_select_network()
2433 bss_load = cred_over_max_bss_load(wpa_s, cred, bss); in interworking_select_network()
2434 conn_capab = cred_conn_capab_missing(wpa_s, cred, bss); in interworking_select_network()
2437 MAC2STR(bss->bssid), type, in interworking_select_network()
2451 selected2 = bss; in interworking_select_network()
2459 selected2_home = bss; in interworking_select_network()
2466 selected = bss; in interworking_select_network()
2474 selected_home = bss; in interworking_select_network()
2548 interworking_match_anqp_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) in interworking_match_anqp_info() argument
2552 if (is_zero_ether_addr(bss->hessid)) in interworking_match_anqp_info()
2555 dl_list_for_each(other, &wpa_s->bss, struct wpa_bss, list) { in interworking_match_anqp_info()
2556 if (other == bss) in interworking_match_anqp_info()
2567 if (os_memcmp(bss->hessid, other->hessid, ETH_ALEN) != 0) in interworking_match_anqp_info()
2569 if (bss->ssid_len != other->ssid_len || in interworking_match_anqp_info()
2570 os_memcmp(bss->ssid, other->ssid, bss->ssid_len) != 0) in interworking_match_anqp_info()
2576 MAC2STR(other->bssid), MAC2STR(bss->bssid)); in interworking_match_anqp_info()
2587 struct wpa_bss *bss; in interworking_next_anqp_fetch() local
2609 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in interworking_next_anqp_fetch()
2610 if (!(bss->caps & IEEE80211_CAP_ESS)) in interworking_next_anqp_fetch()
2612 ie = wpa_bss_get_ie(bss, WLAN_EID_EXT_CAPAB); in interworking_next_anqp_fetch()
2615 if (disallowed_bssid(wpa_s, bss->bssid) || in interworking_next_anqp_fetch()
2616 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) in interworking_next_anqp_fetch()
2619 if (!(bss->flags & WPA_BSS_ANQP_FETCH_TRIED)) { in interworking_next_anqp_fetch()
2620 if (bss->anqp == NULL) { in interworking_next_anqp_fetch()
2621 bss->anqp = interworking_match_anqp_info(wpa_s, in interworking_next_anqp_fetch()
2622 bss); in interworking_next_anqp_fetch()
2623 if (bss->anqp) { in interworking_next_anqp_fetch()
2627 bss->anqp = wpa_bss_anqp_alloc(); in interworking_next_anqp_fetch()
2628 if (bss->anqp == NULL) in interworking_next_anqp_fetch()
2632 bss->flags |= WPA_BSS_ANQP_FETCH_TRIED; in interworking_next_anqp_fetch()
2634 MACSTR, MAC2STR(bss->bssid)); in interworking_next_anqp_fetch()
2635 interworking_anqp_send_req(wpa_s, bss); in interworking_next_anqp_fetch()
2665 struct wpa_bss *bss; in interworking_start_fetch_anqp() local
2667 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) in interworking_start_fetch_anqp()
2668 bss->flags &= ~WPA_BSS_ANQP_FETCH_TRIED; in interworking_start_fetch_anqp()
2711 struct wpa_bss *bss; in anqp_send_req() local
2714 bss = wpa_bss_get_bssid(wpa_s, dst); in anqp_send_req()
2715 if (!bss) { in anqp_send_req()
2722 wpa_bss_anqp_unshare_alloc(bss); in anqp_send_req()
2723 freq = bss->freq; in anqp_send_req()
2793 struct wpa_bss *bss, const u8 *sa, in interworking_parse_rx_anqp_resp() argument
2804 if (bss) in interworking_parse_rx_anqp_resp()
2805 anqp = bss->anqp; in interworking_parse_rx_anqp_resp()
2905 hs20_parse_rx_hs20_anqp_resp(wpa_s, bss, sa, in interworking_parse_rx_anqp_resp()
2943 struct wpa_bss *bss = NULL, *tmp; in anqp_resp_cb() local
2976 dl_list_for_each_reverse(tmp, &wpa_s->bss, struct wpa_bss, list) { in anqp_resp_cb()
2979 bss = tmp; in anqp_resp_cb()
2983 if (bss == NULL) in anqp_resp_cb()
2984 bss = wpa_bss_get_bssid(wpa_s, dst); in anqp_resp_cb()
3009 interworking_parse_rx_anqp_resp(wpa_s, bss, dst, info_id, pos, in anqp_resp_cb()
3092 struct wpa_bss *bss; in gas_send_request() local
3098 bss = wpa_bss_get_bssid(wpa_s, dst); in gas_send_request()
3099 if (bss) in gas_send_request()
3100 freq = bss->freq; in gas_send_request()