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,
230 static int additional_roaming_consortiums(struct wpa_bss *bss) in additional_roaming_consortiums() argument
233 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in additional_roaming_consortiums()
248 struct wpa_bss *bss) in interworking_anqp_send_req() argument
259 MAC2STR(bss->bssid)); in interworking_anqp_send_req()
260 wpa_s->interworking_gas_bss = bss; in interworking_anqp_send_req()
268 additional_roaming_consortiums(bss))) in interworking_anqp_send_req()
284 if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE)) { in interworking_anqp_send_req()
319 res = gas_query_req(wpa_s->gas, bss->bssid, bss->freq, 0, 0, buf, in interworking_anqp_send_req()
881 struct wpa_cred *cred, struct wpa_bss *bss) in already_connected() argument
893 if (ssid->ssid_len != bss->ssid_len || in already_connected()
894 os_memcmp(ssid->ssid, bss->ssid, bss->ssid_len) != 0) in already_connected()
908 struct wpa_bss *bss) in remove_duplicate_network() argument
915 if (ssid->ssid_len != bss->ssid_len || in remove_duplicate_network()
916 os_memcmp(ssid->ssid, bss->ssid, bss->ssid_len) != 0) in remove_duplicate_network()
971 struct wpa_bss *bss, int only_add) in interworking_connect_3gpp() argument
979 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL) in interworking_connect_3gpp()
983 " (3GPP)", MAC2STR(bss->bssid)); in interworking_connect_3gpp()
985 if (already_connected(wpa_s, cred, bss)) { in interworking_connect_3gpp()
987 MAC2STR(bss->bssid)); in interworking_connect_3gpp()
991 remove_duplicate_network(wpa_s, cred, bss); in interworking_connect_3gpp()
1002 ssid->ssid = os_zalloc(bss->ssid_len + 1); in interworking_connect_3gpp()
1005 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len); in interworking_connect_3gpp()
1006 ssid->ssid_len = bss->ssid_len; in interworking_connect_3gpp()
1171 static int cred_no_required_oi_match(struct wpa_cred *cred, struct wpa_bss *bss) in cred_no_required_oi_match() argument
1178 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in cred_no_required_oi_match()
1181 (bss->anqp == NULL || bss->anqp->roaming_consortium == NULL)) in cred_no_required_oi_match()
1185 bss->anqp ? in cred_no_required_oi_match()
1186 bss->anqp->roaming_consortium : NULL, in cred_no_required_oi_match()
1192 static int cred_excluded_ssid(struct wpa_cred *cred, struct wpa_bss *bss) in cred_excluded_ssid() argument
1201 if (bss->ssid_len == e->ssid_len && in cred_excluded_ssid()
1202 os_memcmp(bss->ssid, e->ssid, e->ssid_len) == 0) in cred_excluded_ssid()
1211 struct wpa_cred *cred, struct wpa_bss *bss) in cred_below_min_backhaul() argument
1227 if (bss->anqp == NULL || bss->anqp->hs20_wan_metrics == NULL) in cred_below_min_backhaul()
1230 wan = wpabuf_head(bss->anqp->hs20_wan_metrics); in cred_below_min_backhaul()
1252 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_below_min_backhaul()
1253 bss->anqp->domain_name : NULL); in cred_below_min_backhaul()
1272 struct wpa_cred *cred, struct wpa_bss *bss) in cred_over_max_bss_load() argument
1280 ie = wpa_bss_get_ie(bss, WLAN_EID_BSS_LOAD); in cred_over_max_bss_load()
1284 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_over_max_bss_load()
1285 bss->anqp->domain_name : NULL); in cred_over_max_bss_load()
1324 struct wpa_cred *cred, struct wpa_bss *bss) in cred_conn_capab_missing() argument
1335 if (bss->anqp == NULL || bss->anqp->hs20_connection_capability == NULL) in cred_conn_capab_missing()
1339 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_conn_capab_missing()
1340 bss->anqp->domain_name : NULL); in cred_conn_capab_missing()
1344 capab = wpabuf_head(bss->anqp->hs20_connection_capability); in cred_conn_capab_missing()
1345 end = capab + wpabuf_len(bss->anqp->hs20_connection_capability); in cred_conn_capab_missing()
1370 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_roaming_consortium() argument
1378 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in interworking_credentials_available_roaming_consortium()
1379 anqp = bss->anqp ? bss->anqp->roaming_consortium : NULL; in interworking_credentials_available_roaming_consortium()
1406 if (cred_no_required_oi_match(cred, bss)) in interworking_credentials_available_roaming_consortium()
1408 if (!ignore_bw && cred_below_min_backhaul(wpa_s, cred, bss)) in interworking_credentials_available_roaming_consortium()
1410 if (!ignore_bw && cred_over_max_bss_load(wpa_s, cred, bss)) in interworking_credentials_available_roaming_consortium()
1412 if (!ignore_bw && cred_conn_capab_missing(wpa_s, cred, bss)) in interworking_credentials_available_roaming_consortium()
1414 if (cred_excluded_ssid(cred, bss)) { in interworking_credentials_available_roaming_consortium()
1566 struct wpa_bss *bss, int only_add) in interworking_connect_roaming_consortium() argument
1574 " based on roaming consortium match", MAC2STR(bss->bssid)); in interworking_connect_roaming_consortium()
1576 if (already_connected(wpa_s, cred, bss)) { in interworking_connect_roaming_consortium()
1578 MAC2STR(bss->bssid)); in interworking_connect_roaming_consortium()
1582 remove_duplicate_network(wpa_s, cred, bss); in interworking_connect_roaming_consortium()
1592 ssid->ssid = os_zalloc(bss->ssid_len + 1); in interworking_connect_roaming_consortium()
1595 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len); in interworking_connect_roaming_consortium()
1596 ssid->ssid_len = bss->ssid_len; in interworking_connect_roaming_consortium()
1601 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); in interworking_connect_roaming_consortium()
1602 anqp = bss->anqp ? bss->anqp->roaming_consortium : NULL; in interworking_connect_roaming_consortium()
1647 int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, in interworking_connect() argument
1659 if (wpa_s->conf->cred == NULL || bss == NULL) in interworking_connect()
1661 if (disallowed_bssid(wpa_s, bss->bssid) || in interworking_connect()
1662 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) { in interworking_connect()
1665 MACSTR, MAC2STR(bss->bssid)); in interworking_connect()
1671 MAC2STR(bss->bssid)); in interworking_connect()
1673 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) { in interworking_connect()
1684 wpa_s, bss, 0, excl); in interworking_connect()
1693 cred = interworking_credentials_available_realm(wpa_s, bss, 0, excl); in interworking_connect()
1702 cred_3gpp = interworking_credentials_available_3gpp(wpa_s, bss, 0, in interworking_connect()
1716 wpa_s, bss, 1, excl); in interworking_connect()
1725 cred = interworking_credentials_available_realm(wpa_s, bss, 1, in interworking_connect()
1735 cred_3gpp = interworking_credentials_available_3gpp(wpa_s, bss, in interworking_connect()
1750 bss, only_add); in interworking_connect()
1754 return interworking_connect_3gpp(wpa_s, cred_3gpp, bss, in interworking_connect()
1761 MACSTR, MAC2STR(bss->bssid)); in interworking_connect()
1765 realm = nai_realm_parse(bss->anqp ? bss->anqp->nai_realm : NULL, in interworking_connect()
1770 MACSTR, MAC2STR(bss->bssid)); in interworking_connect()
1785 MACSTR, MAC2STR(bss->bssid)); in interworking_connect()
1791 MAC2STR(bss->bssid)); in interworking_connect()
1793 if (already_connected(wpa_s, cred, bss)) { in interworking_connect()
1795 MAC2STR(bss->bssid)); in interworking_connect()
1800 remove_duplicate_network(wpa_s, cred, bss); in interworking_connect()
1812 ssid->ssid = os_zalloc(bss->ssid_len + 1); in interworking_connect()
1815 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len); in interworking_connect()
1816 ssid->ssid_len = bss->ssid_len; in interworking_connect()
1933 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_3gpp() argument
1942 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL) { in interworking_credentials_available_3gpp()
1945 bss->anqp, bss->anqp ? bss->anqp->anqp_3gpp : NULL); in interworking_credentials_available_3gpp()
2017 MAC2STR(bss->bssid)); in interworking_credentials_available_3gpp()
2018 ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len); in interworking_credentials_available_3gpp()
2022 if (cred_no_required_oi_match(cred, bss)) in interworking_credentials_available_3gpp()
2025 cred_below_min_backhaul(wpa_s, cred, bss)) in interworking_credentials_available_3gpp()
2028 cred_over_max_bss_load(wpa_s, cred, bss)) in interworking_credentials_available_3gpp()
2031 cred_conn_capab_missing(wpa_s, cred, bss)) in interworking_credentials_available_3gpp()
2033 if (cred_excluded_ssid(cred, bss)) { in interworking_credentials_available_3gpp()
2058 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_realm() argument
2066 if (bss->anqp == NULL || bss->anqp->nai_realm == NULL) in interworking_credentials_available_realm()
2073 MACSTR, MAC2STR(bss->bssid)); in interworking_credentials_available_realm()
2074 realm = nai_realm_parse(bss->anqp->nai_realm, &count); in interworking_credentials_available_realm()
2078 MACSTR, MAC2STR(bss->bssid)); in interworking_credentials_available_realm()
2090 if (cred_no_required_oi_match(cred, bss)) in interworking_credentials_available_realm()
2093 cred_below_min_backhaul(wpa_s, cred, bss)) in interworking_credentials_available_realm()
2096 cred_over_max_bss_load(wpa_s, cred, bss)) in interworking_credentials_available_realm()
2099 cred_conn_capab_missing(wpa_s, cred, bss)) in interworking_credentials_available_realm()
2101 if (cred_excluded_ssid(cred, bss)) { in interworking_credentials_available_realm()
2134 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw, in interworking_credentials_available_helper() argument
2140 if (disallowed_bssid(wpa_s, bss->bssid) || in interworking_credentials_available_helper()
2141 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) { in interworking_credentials_available_helper()
2143 MACSTR, MAC2STR(bss->bssid)); in interworking_credentials_available_helper()
2147 cred = interworking_credentials_available_realm(wpa_s, bss, ignore_bw, in interworking_credentials_available_helper()
2149 cred2 = interworking_credentials_available_3gpp(wpa_s, bss, ignore_bw, in interworking_credentials_available_helper()
2162 wpa_s, bss, ignore_bw, &excluded2); in interworking_credentials_available_helper()
2180 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int *excluded) in interworking_credentials_available() argument
2186 cred = interworking_credentials_available_helper(wpa_s, bss, 0, in interworking_credentials_available()
2190 return interworking_credentials_available_helper(wpa_s, bss, 1, in interworking_credentials_available()
2310 struct wpa_bss *bss; in interworking_find_network_match() local
2313 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in interworking_find_network_match()
2318 if (ssid->ssid_len != bss->ssid_len || in interworking_find_network_match()
2319 os_memcmp(ssid->ssid, bss->ssid, ssid->ssid_len) != in interworking_find_network_match()
2353 struct wpa_bss *bss) in roaming_prio() argument
2357 if (bss->anqp == NULL || bss->anqp->domain_name == NULL) { in roaming_prio()
2362 if (interworking_home_sp_cred(wpa_s, cred, bss->anqp->domain_name) > 0) in roaming_prio()
2370 bss->anqp->domain_name)) { in roaming_prio()
2386 struct wpa_bss *bss; in pick_best_roaming_partner() local
2400 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in pick_best_roaming_partner()
2401 if (bss == selected) in pick_best_roaming_partner()
2403 cred2 = interworking_credentials_available(wpa_s, bss, NULL); in pick_best_roaming_partner()
2406 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) in pick_best_roaming_partner()
2408 prio = roaming_prio(wpa_s, cred2, bss); in pick_best_roaming_partner()
2410 MACSTR " (cred=%d)", prio, MAC2STR(bss->bssid), in pick_best_roaming_partner()
2417 bh2 = cred_below_min_backhaul(wpa_s, cred2, bss); in pick_best_roaming_partner()
2418 load2 = cred_over_max_bss_load(wpa_s, cred2, bss); in pick_best_roaming_partner()
2419 conn2 = cred_conn_capab_missing(wpa_s, cred2, bss); in pick_best_roaming_partner()
2423 …wpa_printf(MSG_DEBUG, "Interworking: Better roaming partner " MACSTR " selected", MAC2STR(bss->bss… in pick_best_roaming_partner()
2425 selected = bss; in pick_best_roaming_partner()
2436 struct wpa_bss *bss, *selected = NULL, *selected_home = NULL; in interworking_select_network() local
2450 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in interworking_select_network()
2453 cred = interworking_credentials_available(wpa_s, bss, in interworking_select_network()
2458 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) { in interworking_select_network()
2466 MAC2STR(bss->bssid)); in interworking_select_network()
2471 res = interworking_home_sp(wpa_s, bss->anqp ? in interworking_select_network()
2472 bss->anqp->domain_name : NULL); in interworking_select_network()
2479 bh = cred_below_min_backhaul(wpa_s, cred, bss); in interworking_select_network()
2480 bss_load = cred_over_max_bss_load(wpa_s, cred, bss); in interworking_select_network()
2481 conn_capab = cred_conn_capab_missing(wpa_s, cred, bss); in interworking_select_network()
2484 MAC2STR(bss->bssid), type, in interworking_select_network()
2498 selected2 = bss; in interworking_select_network()
2506 selected2_home = bss; in interworking_select_network()
2513 selected = bss; in interworking_select_network()
2521 selected_home = bss; in interworking_select_network()
2596 interworking_match_anqp_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) in interworking_match_anqp_info() argument
2600 if (is_zero_ether_addr(bss->hessid)) in interworking_match_anqp_info()
2603 dl_list_for_each(other, &wpa_s->bss, struct wpa_bss, list) { in interworking_match_anqp_info()
2604 if (other == bss) in interworking_match_anqp_info()
2615 if (os_memcmp(bss->hessid, other->hessid, ETH_ALEN) != 0) in interworking_match_anqp_info()
2617 if (bss->ssid_len != other->ssid_len || in interworking_match_anqp_info()
2618 os_memcmp(bss->ssid, other->ssid, bss->ssid_len) != 0) in interworking_match_anqp_info()
2624 MAC2STR(other->bssid), MAC2STR(bss->bssid)); in interworking_match_anqp_info()
2635 struct wpa_bss *bss; in interworking_next_anqp_fetch() local
2656 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) { in interworking_next_anqp_fetch()
2657 if (!(bss->caps & IEEE80211_CAP_ESS)) in interworking_next_anqp_fetch()
2659 if (!wpa_bss_ext_capab(bss, WLAN_EXT_CAPAB_INTERWORKING)) in interworking_next_anqp_fetch()
2661 if (disallowed_bssid(wpa_s, bss->bssid) || in interworking_next_anqp_fetch()
2662 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) in interworking_next_anqp_fetch()
2665 if (!(bss->flags & WPA_BSS_ANQP_FETCH_TRIED)) { in interworking_next_anqp_fetch()
2666 if (bss->anqp == NULL) { in interworking_next_anqp_fetch()
2667 bss->anqp = interworking_match_anqp_info(wpa_s, in interworking_next_anqp_fetch()
2668 bss); in interworking_next_anqp_fetch()
2669 if (bss->anqp) { in interworking_next_anqp_fetch()
2673 bss->anqp = wpa_bss_anqp_alloc(); in interworking_next_anqp_fetch()
2674 if (bss->anqp == NULL) in interworking_next_anqp_fetch()
2678 bss->flags |= WPA_BSS_ANQP_FETCH_TRIED; in interworking_next_anqp_fetch()
2681 MAC2STR(bss->bssid), MAC2STR(bss->hessid)); in interworking_next_anqp_fetch()
2682 interworking_anqp_send_req(wpa_s, bss); in interworking_next_anqp_fetch()
2712 struct wpa_bss *bss; in interworking_start_fetch_anqp() local
2714 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) in interworking_start_fetch_anqp()
2715 bss->flags &= ~WPA_BSS_ANQP_FETCH_TRIED; in interworking_start_fetch_anqp()
2759 struct wpa_bss *bss; in anqp_send_req() local
2762 bss = wpa_bss_get_bssid(wpa_s, dst); in anqp_send_req()
2763 if (!bss) { in anqp_send_req()
2770 wpa_bss_anqp_unshare_alloc(bss); in anqp_send_req()
2771 freq = bss->freq; in anqp_send_req()
2790 mbo = mbo_build_anqp_buf(wpa_s, bss, mbo_subtypes); in anqp_send_req()
2884 struct wpa_bss *bss, const u8 *sa, in interworking_parse_rx_anqp_resp() argument
2893 if (bss) in interworking_parse_rx_anqp_resp()
2894 anqp = bss->anqp; in interworking_parse_rx_anqp_resp()
3018 hs20_parse_rx_hs20_anqp_resp(wpa_s, bss, sa, in interworking_parse_rx_anqp_resp()
3025 mbo_parse_rx_anqp_resp(wpa_s, bss, sa, in interworking_parse_rx_anqp_resp()
3062 struct wpa_bss *bss = NULL, *tmp; in anqp_resp_cb() local
3095 dl_list_for_each_reverse(tmp, &wpa_s->bss, struct wpa_bss, list) { in anqp_resp_cb()
3098 bss = tmp; in anqp_resp_cb()
3102 if (bss == NULL) in anqp_resp_cb()
3103 bss = wpa_bss_get_bssid(wpa_s, dst); in anqp_resp_cb()
3128 interworking_parse_rx_anqp_resp(wpa_s, bss, dst, info_id, pos, in anqp_resp_cb()
3140 wpas_notify_anqp_query_done(wpa_s, dst, anqp_result, bss ? bss->anqp : NULL); in anqp_resp_cb()
3212 struct wpa_bss *bss; in gas_send_request() local
3218 bss = wpa_bss_get_bssid(wpa_s, dst); in gas_send_request()
3219 if (bss) in gas_send_request()
3220 freq = bss->freq; in gas_send_request()