Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:bss

27 #include "bss.h"
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,
220 static int additional_roaming_consortiums(struct wpa_bss *bss)
223 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM);
238 struct wpa_bss *bss)
249 MAC2STR(bss->bssid));
250 wpa_s->interworking_gas_bss = bss;
258 additional_roaming_consortiums(bss)))
274 if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE)) {
307 res = gas_query_req(wpa_s->gas, bss->bssid, bss->freq, buf,
818 struct wpa_cred *cred, struct wpa_bss *bss)
830 if (ssid->ssid_len != bss->ssid_len ||
831 os_memcmp(ssid->ssid, bss->ssid, bss->ssid_len) != 0)
845 struct wpa_bss *bss)
852 if (ssid->ssid_len != bss->ssid_len ||
853 os_memcmp(ssid->ssid, bss->ssid, bss->ssid_len) != 0)
907 struct wpa_bss *bss)
915 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL)
919 MAC2STR(bss->bssid));
921 if (already_connected(wpa_s, cred, bss)) {
923 MAC2STR(bss->bssid));
927 remove_duplicate_network(wpa_s, cred, bss);
938 ssid->ssid = os_zalloc(bss->ssid_len + 1);
941 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len);
942 ssid->ssid_len = bss->ssid_len;
1089 static int cred_no_required_oi_match(struct wpa_cred *cred, struct wpa_bss *bss)
1096 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM);
1099 (bss->anqp == NULL || bss->anqp->roaming_consortium == NULL))
1103 bss->anqp ?
1104 bss->anqp->roaming_consortium : NULL,
1110 static int cred_excluded_ssid(struct wpa_cred *cred, struct wpa_bss *bss)
1119 if (bss->ssid_len == e->ssid_len &&
1120 os_memcmp(bss->ssid, e->ssid, e->ssid_len) == 0)
1129 struct wpa_cred *cred, struct wpa_bss *bss)
1144 if (bss->anqp == NULL || bss->anqp->hs20_wan_metrics == NULL)
1147 wan = wpabuf_head(bss->anqp->hs20_wan_metrics);
1169 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ?
1170 bss->anqp->domain_name : NULL);
1188 struct wpa_cred *cred, struct wpa_bss *bss)
1194 return 0; /* No BSS Load constraint specified */
1196 ie = wpa_bss_get_ie(bss, WLAN_EID_BSS_LOAD);
1198 return 0; /* No BSS Load advertised */
1200 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ?
1201 bss->anqp->domain_name : NULL);
1236 struct wpa_cred *cred, struct wpa_bss *bss)
1246 if (bss->anqp == NULL || bss->anqp->hs20_connection_capability == NULL)
1250 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ?
1251 bss->anqp->domain_name : NULL);
1255 capab = wpabuf_head(bss->anqp->hs20_connection_capability);
1256 end = capab + wpabuf_len(bss->anqp->hs20_connection_capability);
1280 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
1287 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM);
1290 (bss->anqp == NULL || bss->anqp->roaming_consortium == NULL))
1301 bss->anqp ?
1302 bss->anqp->roaming_consortium :
1308 if (cred_no_required_oi_match(cred, bss))
1310 if (!ignore_bw && cred_below_min_backhaul(wpa_s, cred, bss))
1312 if (!ignore_bw && cred_over_max_bss_load(wpa_s, cred, bss))
1314 if (!ignore_bw && cred_conn_capab_missing(wpa_s, cred, bss))
1316 if (cred_excluded_ssid(cred, bss)) {
1451 struct wpa_bss *bss)
1456 "roaming consortium match", MAC2STR(bss->bssid));
1458 if (already_connected(wpa_s, cred, bss)) {
1460 MAC2STR(bss->bssid));
1464 remove_duplicate_network(wpa_s, cred, bss);
1474 ssid->ssid = os_zalloc(bss->ssid_len + 1);
1477 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len);
1478 ssid->ssid_len = bss->ssid_len;
1509 struct wpa_bss *bss, int allow_excluded)
1520 if (wpa_s->conf->cred == NULL || bss == NULL)
1522 if (disallowed_bssid(wpa_s, bss->bssid) ||
1523 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) {
1524 wpa_printf(MSG_DEBUG, "Interworking: Reject connection to disallowed BSS "
1525 MACSTR, MAC2STR(bss->bssid));
1529 wpa_printf(MSG_DEBUG, "Interworking: Considering BSS " MACSTR
1531 MAC2STR(bss->bssid), allow_excluded);
1533 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) {
1544 wpa_s, bss, 0, excl);
1554 cred = interworking_credentials_available_realm(wpa_s, bss, 0, excl);
1563 cred_3gpp = interworking_credentials_available_3gpp(wpa_s, bss, 0,
1576 wpa_s, bss, 1, excl);
1586 cred = interworking_credentials_available_realm(wpa_s, bss, 1,
1597 cred_3gpp = interworking_credentials_available_3gpp(wpa_s, bss,
1613 bss);
1617 return interworking_connect_3gpp(wpa_s, cred_3gpp, bss);
1622 "found for " MACSTR, MAC2STR(bss->bssid));
1626 realm = nai_realm_parse(bss->anqp ? bss->anqp->nai_realm : NULL,
1630 "Realm list from " MACSTR, MAC2STR(bss->bssid));
1645 MAC2STR(bss->bssid));
1651 MAC2STR(bss->bssid));
1653 if (already_connected(wpa_s, cred, bss)) {
1655 MAC2STR(bss->bssid));
1660 remove_duplicate_network(wpa_s, cred, bss);
1672 ssid->ssid = os_zalloc(bss->ssid_len + 1);
1675 os_memcpy(ssid->ssid, bss->ssid, bss->ssid_len);
1676 ssid->ssid_len = bss->ssid_len;
1765 int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
1767 return interworking_connect_helper(wpa_s, bss, 1);
1797 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
1806 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL)
1873 MACSTR, MAC2STR(bss->bssid));
1874 ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len);
1877 if (cred_no_required_oi_match(cred, bss))
1880 cred_below_min_backhaul(wpa_s, cred, bss))
1883 cred_over_max_bss_load(wpa_s, cred, bss))
1886 cred_conn_capab_missing(wpa_s, cred, bss))
1888 if (cred_excluded_ssid(cred, bss)) {
1913 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
1921 if (bss->anqp == NULL || bss->anqp->nai_realm == NULL)
1928 MACSTR, MAC2STR(bss->bssid));
1929 realm = nai_realm_parse(bss->anqp->nai_realm, &count);
1932 "Realm list from " MACSTR, MAC2STR(bss->bssid));
1944 if (cred_no_required_oi_match(cred, bss))
1947 cred_below_min_backhaul(wpa_s, cred, bss))
1950 cred_over_max_bss_load(wpa_s, cred, bss))
1953 cred_conn_capab_missing(wpa_s, cred, bss))
1955 if (cred_excluded_ssid(cred, bss)) {
1985 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
1991 if (disallowed_bssid(wpa_s, bss->bssid) ||
1992 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) {
1993 wpa_printf(MSG_DEBUG, "Interworking: Ignore disallowed BSS "
1994 MACSTR, MAC2STR(bss->bssid));
1998 cred = interworking_credentials_available_realm(wpa_s, bss, ignore_bw,
2000 cred2 = interworking_credentials_available_3gpp(wpa_s, bss, ignore_bw,
2013 wpa_s, bss, ignore_bw, &excluded2);
2031 struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int *excluded)
2037 cred = interworking_credentials_available_helper(wpa_s, bss, 0,
2041 return interworking_credentials_available_helper(wpa_s, bss, 1,
2155 struct wpa_bss *bss;
2158 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
2163 if (ssid->ssid_len != bss->ssid_len ||
2164 os_memcmp(ssid->ssid, bss->ssid, ssid->ssid_len) !=
2198 struct wpa_bss *bss)
2202 if (bss->anqp == NULL || bss->anqp->domain_name == NULL) {
2207 if (interworking_home_sp_cred(wpa_s, cred, bss->anqp->domain_name) > 0)
2215 bss->anqp->domain_name)) {
2231 struct wpa_bss *bss;
2236 * Check if any other BSS is operated by a more preferred roaming
2241 wpa_printf(MSG_DEBUG, "Interworking: roaming_prio=%u for selected BSS "
2245 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
2246 if (bss == selected)
2248 cred2 = interworking_credentials_available(wpa_s, bss, NULL);
2251 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN))
2253 prio = roaming_prio(wpa_s, cred2, bss);
2254 wpa_printf(MSG_DEBUG, "Interworking: roaming_prio=%u for BSS "
2255 MACSTR " (cred=%d)", prio, MAC2STR(bss->bssid),
2262 bh2 = cred_below_min_backhaul(wpa_s, cred2, bss);
2263 load2 = cred_over_max_bss_load(wpa_s, cred2, bss);
2264 conn2 = cred_conn_capab_missing(wpa_s, cred2, bss);
2268 wpa_printf(MSG_DEBUG, "Interworking: Better roaming partner " MACSTR " selected", MAC2STR(bss->bssid));
2270 selected = bss;
2281 struct wpa_bss *bss, *selected = NULL, *selected_home = NULL;
2295 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
2298 cred = interworking_credentials_available(wpa_s, bss,
2302 if (!wpa_bss_get_ie(bss, WLAN_EID_RSN)) {
2309 "RSN", MAC2STR(bss->bssid));
2314 res = interworking_home_sp(wpa_s, bss->anqp ?
2315 bss->anqp->domain_name : NULL);
2322 bh = cred_below_min_backhaul(wpa_s, cred, bss);
2323 bss_load = cred_over_max_bss_load(wpa_s, cred, bss);
2324 conn_capab = cred_conn_capab_missing(wpa_s, cred, bss);
2327 MAC2STR(bss->bssid), type,
2341 selected2 = bss;
2349 selected2_home = bss;
2356 selected = bss;
2364 selected_home = bss;
2383 wpa_printf(MSG_DEBUG, "Interworking: Use home BSS with BW limit mismatch since no other network could be selected");
2387 wpa_printf(MSG_DEBUG, "Interworking: Use visited BSS with BW limit mismatch since no other network could be selected");
2400 wpa_printf(MSG_DEBUG, "Interworking: Possible BSS "
2436 interworking_match_anqp_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
2440 if (is_zero_ether_addr(bss->hessid))
2443 dl_list_for_each(other, &wpa_s->bss, struct wpa_bss, list) {
2444 if (other == bss)
2455 if (os_memcmp(bss->hessid, other->hessid, ETH_ALEN) != 0)
2457 if (bss->ssid_len != other->ssid_len ||
2458 os_memcmp(bss->ssid, other->ssid, bss->ssid_len) != 0)
2463 MAC2STR(other->bssid), MAC2STR(bss->bssid));
2474 struct wpa_bss *bss;
2494 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
2495 if (!(bss->caps & IEEE80211_CAP_ESS))
2497 ie = wpa_bss_get_ie(bss, WLAN_EID_EXT_CAPAB);
2500 if (disallowed_bssid(wpa_s, bss->bssid) ||
2501 disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len))
2502 continue; /* Disallowed BSS */
2504 if (!(bss->flags & WPA_BSS_ANQP_FETCH_TRIED)) {
2505 if (bss->anqp == NULL) {
2506 bss->anqp = interworking_match_anqp_info(wpa_s,
2507 bss);
2508 if (bss->anqp) {
2512 bss->anqp = wpa_bss_anqp_alloc();
2513 if (bss->anqp == NULL)
2517 bss->flags |= WPA_BSS_ANQP_FETCH_TRIED;
2519 MACSTR, MAC2STR(bss->bssid));
2520 interworking_anqp_send_req(wpa_s, bss);
2547 struct wpa_bss *bss;
2549 dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list)
2550 bss->flags &= ~WPA_BSS_ANQP_FETCH_TRIED;
2588 struct wpa_bss *bss;
2592 bss = wpa_bss_get_bssid(wpa_s, dst);
2593 if (bss) {
2594 wpa_bss_anqp_unshare_alloc(bss);
2595 freq = bss->freq;
2631 struct wpa_bss *bss, const u8 *sa,
2641 if (bss)
2642 anqp = bss->anqp;
2771 struct wpa_bss *bss = NULL, *tmp;
2793 * If possible, select the BSS entry based on which BSS entry was used
2794 * for the request. This can help in cases where multiple BSS entries
2797 dl_list_for_each_reverse(tmp, &wpa_s->bss, struct wpa_bss, list) {
2800 bss = tmp;
2804 if (bss == NULL)
2805 bss = wpa_bss_get_bssid(wpa_s, dst);
2824 interworking_parse_rx_anqp_resp(wpa_s, bss, dst, info_id, pos,
2901 struct wpa_bss *bss;
2907 bss = wpa_bss_get_bssid(wpa_s, dst);
2908 if (bss)
2909 freq = bss->freq;