Lines Matching refs:ssid
126 const u8 *ssid, size_t ssid_len);
132 const u8 *ssid, size_t ssid_len);
137 const u8 *ssid, size_t ssid_len);
453 params->ssids[0].ssid = n; in wpas_p2p_scan()
562 const u8 *ssid, in wpas_get_p2p_group() argument
568 for (s = wpa_s->conf->ssid; s; s = s->next) { in wpas_get_p2p_group()
571 os_memcmp(ssid, s->ssid, ssid_len) != 0) in wpas_get_p2p_group()
624 for (s = wpa_s->conf->ssid; s; s = s->next) { in p2p_group_go_member_count()
707 for (s = wpa_s->conf->ssid; s; s = s->next) { in wpas_p2p_get_persistent_go()
917 struct wpa_ssid *ssid; in wpas_p2p_group_delete() local
921 ssid = wpa_s->current_ssid; in wpas_p2p_group_delete()
922 if (ssid == NULL) { in wpas_p2p_group_delete()
928 ssid = wpa_s->conf->ssid; in wpas_p2p_group_delete()
929 while (ssid) { in wpas_p2p_group_delete()
930 if (ssid->p2p_group && ssid->disabled != 2) in wpas_p2p_group_delete()
932 ssid = ssid->next; in wpas_p2p_group_delete()
934 if (ssid == NULL && in wpas_p2p_group_delete()
945 (ssid && ssid->mode == WPAS_MODE_INFRA)) { in wpas_p2p_group_delete()
952 if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid) in wpas_p2p_group_delete()
953 wpas_notify_p2p_group_removed(wpa_s, ssid, gtype); in wpas_p2p_group_delete()
1070 if (ssid && (ssid->p2p_group || in wpas_p2p_group_delete()
1071 ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION || in wpas_p2p_group_delete()
1072 (ssid->key_mgmt & WPA_KEY_MGMT_WPS))) { in wpas_p2p_group_delete()
1073 int id = ssid->id; in wpas_p2p_group_delete()
1074 if (ssid == wpa_s->current_ssid) { in wpas_p2p_group_delete()
1088 wpas_notify_network_removed(wpa_s, ssid); in wpas_p2p_group_delete()
1111 const u8 *ssid, size_t ssid_len) in wpas_p2p_persistent_group() argument
1124 bss = wpa_bss_get(wpa_s, bssid, ssid, ssid_len); in wpas_p2p_persistent_group()
1133 bss = wpa_bss_get(wpa_s, iface_addr, ssid, ssid_len); in wpas_p2p_persistent_group()
1179 struct wpa_ssid *ssid, in wpas_p2p_store_persistent_group() argument
1187 for (s = wpa_s->conf->ssid; s; s = s->next) { in wpas_p2p_store_persistent_group()
1190 s->ssid_len == ssid->ssid_len && in wpas_p2p_store_persistent_group()
1191 os_memcmp(ssid->ssid, s->ssid, ssid->ssid_len) == 0) in wpas_p2p_store_persistent_group()
1198 if (ssid->passphrase && !s->passphrase) in wpas_p2p_store_persistent_group()
1200 else if (ssid->passphrase && s->passphrase && in wpas_p2p_store_persistent_group()
1201 os_strcmp(ssid->passphrase, s->passphrase) != 0) in wpas_p2p_store_persistent_group()
1228 s->mode = ssid->mode; in wpas_p2p_store_persistent_group()
1232 s->pbss = ssid->pbss; in wpas_p2p_store_persistent_group()
1233 s->pairwise_cipher = ssid->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP; in wpas_p2p_store_persistent_group()
1235 if (ssid->passphrase) { in wpas_p2p_store_persistent_group()
1237 s->passphrase = os_strdup(ssid->passphrase); in wpas_p2p_store_persistent_group()
1239 if (ssid->psk_set) { in wpas_p2p_store_persistent_group()
1241 os_memcpy(s->psk, ssid->psk, 32); in wpas_p2p_store_persistent_group()
1245 if (s->ssid == NULL || s->ssid_len < ssid->ssid_len) { in wpas_p2p_store_persistent_group()
1246 os_free(s->ssid); in wpas_p2p_store_persistent_group()
1247 s->ssid = os_malloc(ssid->ssid_len); in wpas_p2p_store_persistent_group()
1249 if (s->ssid) { in wpas_p2p_store_persistent_group()
1250 s->ssid_len = ssid->ssid_len; in wpas_p2p_store_persistent_group()
1251 os_memcpy(s->ssid, ssid->ssid, s->ssid_len); in wpas_p2p_store_persistent_group()
1253 if (ssid->mode == WPAS_MODE_P2P_GO && wpa_s->global->add_psk) { in wpas_p2p_store_persistent_group()
1271 struct wpa_ssid *ssid, *s; in wpas_p2p_add_persistent_group_client() local
1277 ssid = wpa_s->current_ssid; in wpas_p2p_add_persistent_group_client()
1278 if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GO || in wpas_p2p_add_persistent_group_client()
1279 !ssid->p2p_persistent_group) in wpas_p2p_add_persistent_group_client()
1282 for (s = p2p_wpa_s->conf->ssid; s; s = s->next) { in wpas_p2p_add_persistent_group_client()
1286 if (s->ssid_len == ssid->ssid_len && in wpas_p2p_add_persistent_group_client()
1287 os_memcmp(s->ssid, ssid->ssid, s->ssid_len) == 0) in wpas_p2p_add_persistent_group_client()
1348 int go, struct wpa_ssid *ssid, int freq, in wpas_p2p_group_started() argument
1361 if (ssid) in wpas_p2p_group_started()
1362 ssid_txt = wpa_ssid_txt(ssid->ssid, ssid->ssid_len); in wpas_p2p_group_started()
1395 struct wpa_ssid *ssid; in wpas_group_formation_completed() local
1433 ssid = wpa_s->current_ssid; in wpas_group_formation_completed()
1434 if (ssid && ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) { in wpas_group_formation_completed()
1435 ssid->mode = WPAS_MODE_P2P_GO; in wpas_group_formation_completed()
1441 if (ssid) { in wpas_group_formation_completed()
1442 client = ssid->mode == WPAS_MODE_INFRA; in wpas_group_formation_completed()
1443 if (ssid->mode == WPAS_MODE_P2P_GO) { in wpas_group_formation_completed()
1444 persistent = ssid->p2p_persistent_group; in wpas_group_formation_completed()
1450 ssid->ssid, in wpas_group_formation_completed()
1451 ssid->ssid_len); in wpas_group_formation_completed()
1467 wpas_p2p_group_started(wpa_s, 1, ssid, in wpas_group_formation_completed()
1468 ssid ? ssid->frequency : 0, in wpas_group_formation_completed()
1469 ssid && ssid->passphrase == NULL && in wpas_group_formation_completed()
1470 ssid->psk_set ? ssid->psk : NULL, in wpas_group_formation_completed()
1471 ssid ? ssid->passphrase : NULL, in wpas_group_formation_completed()
1479 ssid, go_dev_addr); in wpas_group_formation_completed()
1486 wpas_notify_p2p_group_started(wpa_s, ssid, persistent, 0, NULL); in wpas_group_formation_completed()
1742 res->ssid, res->ssid_len); in wpas_start_wps_enrollee()
1772 struct wpa_ssid *ssid) in wpas_p2p_add_psk_list() argument
1781 persistent = wpas_p2p_get_persistent(wpa_s->p2pdev, NULL, ssid->ssid, in wpas_p2p_add_psk_list()
1782 ssid->ssid_len); in wpas_p2p_add_psk_list()
1803 hpsk->next = hapd->conf->ssid.wpa_psk; in wpas_p2p_add_psk_list()
1804 hapd->conf->ssid.wpa_psk = hpsk; in wpas_p2p_add_psk_list()
1866 struct wpa_ssid *ssid; in p2p_go_configured() local
1880 ssid = wpa_s->current_ssid; in p2p_go_configured()
1881 if (ssid && ssid->mode == WPAS_MODE_P2P_GO) { in p2p_go_configured()
1885 wpas_p2p_group_started(wpa_s, 1, ssid, ssid->frequency, in p2p_go_configured()
1914 wpa_s->p2pdev, ssid, in p2p_go_configured()
1916 wpas_p2p_add_psk_list(wpa_s, ssid); in p2p_go_configured()
1919 wpas_notify_p2p_group_started(wpa_s, ssid, in p2p_go_configured()
2055 struct wpa_ssid *ssid; in wpas_start_wps_go() local
2064 ssid = wpa_config_add_network(wpa_s->conf); in wpas_start_wps_go()
2065 if (ssid == NULL) { in wpas_start_wps_go()
2075 wpa_config_set_network_defaults(ssid); in wpas_start_wps_go()
2076 ssid->temporary = 1; in wpas_start_wps_go()
2077 ssid->p2p_group = 1; in wpas_start_wps_go()
2078 ssid->p2p_persistent_group = !!params->persistent_group; in wpas_start_wps_go()
2079 ssid->mode = group_formation ? WPAS_MODE_P2P_GROUP_FORMATION : in wpas_start_wps_go()
2081 ssid->frequency = params->freq; in wpas_start_wps_go()
2082 ssid->ht40 = params->ht40; in wpas_start_wps_go()
2083 ssid->vht = params->vht; in wpas_start_wps_go()
2084 ssid->max_oper_chwidth = params->max_oper_chwidth; in wpas_start_wps_go()
2085 ssid->vht_center_freq2 = params->vht_center_freq2; in wpas_start_wps_go()
2086 ssid->he = params->he; in wpas_start_wps_go()
2092 ssid->edmg_channel = op_channel; in wpas_start_wps_go()
2093 ssid->enable_edmg = params->edmg; in wpas_start_wps_go()
2101 ssid->ssid = os_zalloc(params->ssid_len + 1); in wpas_start_wps_go()
2102 if (ssid->ssid) { in wpas_start_wps_go()
2103 os_memcpy(ssid->ssid, params->ssid, params->ssid_len); in wpas_start_wps_go()
2104 ssid->ssid_len = params->ssid_len; in wpas_start_wps_go()
2106 ssid->auth_alg = WPA_AUTH_ALG_OPEN; in wpas_start_wps_go()
2107 ssid->key_mgmt = WPA_KEY_MGMT_PSK; in wpas_start_wps_go()
2108 if (is_6ghz_freq(ssid->frequency) && in wpas_start_wps_go()
2110 ssid->auth_alg |= WPA_AUTH_ALG_SAE; in wpas_start_wps_go()
2111 ssid->key_mgmt = WPA_KEY_MGMT_SAE; in wpas_start_wps_go()
2112 ssid->ieee80211w = MGMT_FRAME_PROTECTION_REQUIRED; in wpas_start_wps_go()
2113 ssid->sae_pwe = SAE_PWE_HASH_TO_ELEMENT; in wpas_start_wps_go()
2118 ssid->proto = WPA_PROTO_RSN; in wpas_start_wps_go()
2119 ssid->pairwise_cipher = WPA_CIPHER_CCMP; in wpas_start_wps_go()
2120 ssid->group_cipher = WPA_CIPHER_CCMP; in wpas_start_wps_go()
2126 ssid->pairwise_cipher = WPA_CIPHER_GCMP; in wpas_start_wps_go()
2127 ssid->group_cipher = WPA_CIPHER_GCMP; in wpas_start_wps_go()
2129 ssid->pbss = 1; in wpas_start_wps_go()
2132 ssid->passphrase = os_strdup(params->passphrase); in wpas_start_wps_go()
2133 if (ssid->passphrase == NULL) { in wpas_start_wps_go()
2136 wpa_config_remove_network(wpa_s->conf, ssid->id); in wpas_start_wps_go()
2140 ssid->passphrase = NULL; in wpas_start_wps_go()
2141 ssid->psk_set = params->psk_set; in wpas_start_wps_go()
2142 if (ssid->psk_set) in wpas_start_wps_go()
2143 os_memcpy(ssid->psk, params->psk, sizeof(ssid->psk)); in wpas_start_wps_go()
2144 else if (ssid->passphrase) in wpas_start_wps_go()
2145 wpa_config_update_psk(ssid); in wpas_start_wps_go()
2146 ssid->ap_max_inactivity = wpa_s->p2pdev->conf->p2p_go_max_inactivity; in wpas_start_wps_go()
2152 wpa_s->connect_without_scan = ssid; in wpas_start_wps_go()
2494 struct wpa_ssid *ssid; in wpas_go_neg_completed() local
2495 ssid = wpa_config_get_network(wpa_s->conf, in wpas_go_neg_completed()
2497 if (ssid && ssid->disabled == 2 && in wpas_go_neg_completed()
2498 ssid->mode == WPAS_MODE_P2P_GO && ssid->passphrase) { in wpas_go_neg_completed()
2499 size_t len = os_strlen(ssid->passphrase); in wpas_go_neg_completed()
2502 os_memcpy(res->passphrase, ssid->passphrase, len); in wpas_go_neg_completed()
2857 os_memcmp(group_id + ETH_ALEN, s->ssid, in wpas_prov_disc_req()
3182 const u8 *go_dev_addr, const u8 *ssid, in wpas_invitation_process() argument
3201 MAC2STR(sa), wpa_ssid_txt(ssid, ssid_len)); in wpas_invitation_process()
3231 grp = wpas_get_p2p_group(wpa_s, ssid, ssid_len, go); in wpas_invitation_process()
3248 for (s = wpa_s->conf->ssid; s; s = s->next) { in wpas_invitation_process()
3252 os_memcmp(ssid, s->ssid, ssid_len) == 0) in wpas_invitation_process()
3343 const u8 *ssid, size_t ssid_len, in wpas_invitation_received() argument
3350 for (s = wpa_s->conf->ssid; s; s = s->next) { in wpas_invitation_received()
3353 os_memcmp(ssid, s->ssid, ssid_len) == 0) in wpas_invitation_received()
3360 MAC2STR(sa), op_freq, wpa_ssid_txt(ssid, ssid_len)); in wpas_invitation_received()
3396 ssid, ssid_len); in wpas_invitation_received()
3442 struct wpa_ssid *ssid, in wpas_remove_persistent_peer() argument
3448 if (ssid == NULL) in wpas_remove_persistent_peer()
3451 for (i = 0; ssid->p2p_client_list && i < ssid->num_p2p_clients; i++) { in wpas_remove_persistent_peer()
3452 if (ether_addr_equal(ssid->p2p_client_list + i * 2 * ETH_ALEN, in wpas_remove_persistent_peer()
3456 if (i >= ssid->num_p2p_clients || !ssid->p2p_client_list) { in wpas_remove_persistent_peer()
3457 if (ssid->mode != WPAS_MODE_P2P_GO && in wpas_remove_persistent_peer()
3458 ether_addr_equal(ssid->bssid, peer)) { in wpas_remove_persistent_peer()
3460 "due to invitation result", ssid->id); in wpas_remove_persistent_peer()
3461 wpas_notify_network_removed(wpa_s, ssid); in wpas_remove_persistent_peer()
3462 wpa_config_remove_network(wpa_s->conf, ssid->id); in wpas_remove_persistent_peer()
3470 MAC2STR(peer), ssid->id, in wpas_remove_persistent_peer()
3472 os_memmove(ssid->p2p_client_list + i * 2 * ETH_ALEN, in wpas_remove_persistent_peer()
3473 ssid->p2p_client_list + (i + 1) * 2 * ETH_ALEN, in wpas_remove_persistent_peer()
3474 (ssid->num_p2p_clients - i - 1) * 2 * ETH_ALEN); in wpas_remove_persistent_peer()
3475 ssid->num_p2p_clients--; in wpas_remove_persistent_peer()
3485 struct wpa_ssid *ssid; in wpas_remove_persistent_client() local
3490 ssid = wpa_s->current_ssid; in wpas_remove_persistent_client()
3491 if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GO || in wpas_remove_persistent_client()
3492 !ssid->p2p_persistent_group) in wpas_remove_persistent_client()
3494 ssid = wpas_p2p_get_persistent(wpa_s->p2pdev, peer, in wpas_remove_persistent_client()
3495 ssid->ssid, ssid->ssid_len); in wpas_remove_persistent_client()
3496 wpas_remove_persistent_peer(wpa_s, ssid, peer, 1); in wpas_remove_persistent_client()
3506 struct wpa_ssid *ssid; in wpas_invitation_result() local
3563 ssid = wpa_config_get_network( in wpas_invitation_result()
3565 wpas_remove_persistent_peer(wpa_s, ssid, peer, 1); in wpas_invitation_result()
3571 ssid = wpa_config_get_network(wpa_s->conf, in wpas_invitation_result()
3573 if (ssid == NULL) { in wpas_invitation_result()
3591 if (neg_freq > 0 && ssid->mode == WPAS_MODE_P2P_GO && in wpas_invitation_result()
3594 else if (peer_oper_freq > 0 && ssid->mode != WPAS_MODE_P2P_GO && in wpas_invitation_result()
3601 freq, wpa_ssid_txt(ssid->ssid, ssid->ssid_len)); in wpas_invitation_result()
3602 wpas_p2p_group_add_persistent(wpa_s, ssid, in wpas_invitation_result()
3603 ssid->mode == WPAS_MODE_P2P_GO, in wpas_invitation_result()
3612 ssid->mode == WPAS_MODE_P2P_GO ? in wpas_invitation_result()
4164 const u8 *ssid, size_t ssid_len) in wpas_get_p2p_go_iface() argument
4175 os_memcmp(ssid, s->ssid, ssid_len) != 0) in wpas_get_p2p_go_iface()
4189 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpas_get_p2p_client_iface() local
4190 if (ssid && (ssid->mode != WPAS_MODE_INFRA || !ssid->p2p_group)) in wpas_get_p2p_client_iface()
4316 static int wpas_get_persistent_group(void *ctx, const u8 *addr, const u8 *ssid, in wpas_get_persistent_group() argument
4324 s = wpas_p2p_get_persistent(wpa_s, addr, ssid, ssid_len); in wpas_get_persistent_group()
4326 os_memcpy(ret_ssid, s->ssid, s->ssid_len); in wpas_get_persistent_group()
4350 u8 *ssid, size_t *ssid_len, int *group_iface, in wpas_get_go_info() argument
4384 os_memcpy(ssid, s->ssid, s->ssid_len); in wpas_get_go_info()
4392 const u8 *ssid, size_t ssid_len) in wpas_remove_stale_groups() argument
4401 if (go && ssid && ssid_len && in wpas_remove_stale_groups()
4404 os_memcmp(ssid, s->ssid, ssid_len) == 0) in wpas_remove_stale_groups()
4575 os_memcmp(stale->ssid, s->ssid, s->ssid_len) == 0) in wpas_p2ps_prov_complete()
4843 if (!wpa_s->conf->ssid) { in wpas_p2p_mac_setup()
5196 struct wpa_ssid *ssid, unsigned int pref_freq) in wpas_p2p_start_go_neg() argument
5210 persistent_group, ssid ? ssid->ssid : NULL, in wpas_p2p_start_go_neg()
5211 ssid ? ssid->ssid_len : 0, in wpas_p2p_start_go_neg()
5223 struct wpa_ssid *ssid, unsigned int pref_freq) in wpas_p2p_auth_go_neg() argument
5230 persistent_group, ssid ? ssid->ssid : NULL, in wpas_p2p_auth_go_neg()
5231 ssid ? ssid->ssid_len : 0, pref_freq, in wpas_p2p_auth_go_neg()
5475 wpa_ssid_txt(bss->ssid, bss->ssid_len)); in wpas_p2p_scan_res_join()
5567 const u8 *ssid, size_t ssid_len) in wpas_p2p_join_scan_req() argument
5580 if (ssid && ssid_len) { in wpas_p2p_join_scan_req()
5581 params.ssids[0].ssid = ssid; in wpas_p2p_join_scan_req()
5583 os_memcpy(wpa_s->p2p_join_ssid, ssid, ssid_len); in wpas_p2p_join_scan_req()
5586 params.ssids[0].ssid = (u8 *) P2P_WILDCARD_SSID; in wpas_p2p_join_scan_req()
5677 const u8 *ssid, size_t ssid_len) in wpas_p2p_join() argument
5683 if (ssid && ssid_len) { in wpas_p2p_join()
5685 wpa_ssid_txt(ssid, ssid_len)); in wpas_p2p_join()
5698 wpas_p2p_join_scan_req(wpa_s, op_freq, ssid, ssid_len); in wpas_p2p_join()
5704 const u8 *ssid, size_t ssid_len) in wpas_p2p_join_start() argument
5737 if (freq && ssid && ssid_len) { in wpas_p2p_join_start()
5740 os_memcpy(res.ssid, ssid, ssid_len); in wpas_p2p_join_start()
5742 if (ssid && ssid_len) { in wpas_p2p_join_start()
5744 ssid, ssid_len); in wpas_p2p_join_start()
5752 os_memcpy(res.ssid, bss->ssid, bss->ssid_len); in wpas_p2p_join_start()
5755 wpa_ssid_txt(bss->ssid, bss->ssid_len)); in wpas_p2p_join_start()
5756 } else if (ssid && ssid_len) { in wpas_p2p_join_start()
5758 os_memcpy(res.ssid, ssid, ssid_len); in wpas_p2p_join_start()
5760 wpa_ssid_txt(ssid, ssid_len)); in wpas_p2p_join_start()
5979 struct wpa_ssid *ssid = NULL; in wpas_p2p_connect() local
5987 ssid = wpa_config_get_network(wpa_s->conf, persistent_id); in wpas_p2p_connect()
5988 if (ssid == NULL || ssid->disabled != 2 || in wpas_p2p_connect()
5989 ssid->mode != WPAS_MODE_P2P_GO) in wpas_p2p_connect()
6107 force_freq, persistent_group, ssid, in wpas_p2p_connect()
6115 persistent_group, ssid, pref_freq) < 0) { in wpas_p2p_connect()
6945 struct wpa_ssid *ssid; in wpas_start_p2p_client() local
6958 ssid = wpa_config_add_network(wpa_s->conf); in wpas_start_p2p_client()
6959 if (ssid == NULL) in wpas_start_p2p_client()
6962 wpa_config_set_network_defaults(ssid); in wpas_start_p2p_client()
6963 ssid->temporary = 1; in wpas_start_p2p_client()
6964 ssid->proto = WPA_PROTO_RSN; in wpas_start_p2p_client()
6965 ssid->pbss = params->pbss; in wpas_start_p2p_client()
6966 ssid->pairwise_cipher = params->pbss ? WPA_CIPHER_GCMP : in wpas_start_p2p_client()
6968 ssid->group_cipher = params->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP; in wpas_start_p2p_client()
6969 ssid->key_mgmt = WPA_KEY_MGMT_PSK; in wpas_start_p2p_client()
6972 ssid->auth_alg |= WPA_AUTH_ALG_SAE; in wpas_start_p2p_client()
6973 ssid->key_mgmt |= WPA_KEY_MGMT_SAE; in wpas_start_p2p_client()
6974 ssid->ieee80211w = MGMT_FRAME_PROTECTION_OPTIONAL; in wpas_start_p2p_client()
6975 ssid->sae_pwe = SAE_PWE_HASH_TO_ELEMENT; in wpas_start_p2p_client()
6980 ssid->ssid = os_malloc(params->ssid_len); in wpas_start_p2p_client()
6981 if (ssid->ssid == NULL) { in wpas_start_p2p_client()
6982 wpa_config_remove_network(wpa_s->conf, ssid->id); in wpas_start_p2p_client()
6985 os_memcpy(ssid->ssid, params->ssid, params->ssid_len); in wpas_start_p2p_client()
6986 ssid->ssid_len = params->ssid_len; in wpas_start_p2p_client()
6987 ssid->p2p_group = 1; in wpas_start_p2p_client()
6988 ssid->export_keys = 1; in wpas_start_p2p_client()
6990 os_memcpy(ssid->psk, params->psk, 32); in wpas_start_p2p_client()
6991 ssid->psk_set = 1; in wpas_start_p2p_client()
6994 ssid->passphrase = os_strdup(params->passphrase); in wpas_start_p2p_client()
6997 ssid->bssid_set = 1; in wpas_start_p2p_client()
6998 os_memcpy(ssid->bssid, go_bssid, ETH_ALEN); in wpas_start_p2p_client()
7033 wpa_supplicant_select_network(wpa_s, ssid); in wpas_start_p2p_client()
7040 struct wpa_ssid *ssid, int addr_allocated, in wpas_p2p_group_add_persistent() argument
7053 if (ssid->disabled != 2 || ssid->ssid == NULL) in wpas_p2p_group_add_persistent()
7056 if (wpas_get_p2p_group(wpa_s, ssid->ssid, ssid->ssid_len, &go) && in wpas_p2p_group_add_persistent()
7057 go == (ssid->mode == WPAS_MODE_P2P_GO)) { in wpas_p2p_group_add_persistent()
7088 if (ssid->mode == WPAS_MODE_P2P_GO) { in wpas_p2p_group_add_persistent()
7100 } else if (ssid->mode == WPAS_MODE_INFRA) { in wpas_p2p_group_add_persistent()
7105 wpa_bss_get_p2p_dev_addr(wpa_s, ssid->bssid); in wpas_p2p_group_add_persistent()
7116 return wpas_start_p2p_client(wpa_s, ssid, addr_allocated, freq, in wpas_p2p_group_add_persistent()
7128 params.psk_set = ssid->psk_set; in wpas_p2p_group_add_persistent()
7130 os_memcpy(params.psk, ssid->psk, sizeof(params.psk)); in wpas_p2p_group_add_persistent()
7131 if (ssid->passphrase) { in wpas_p2p_group_add_persistent()
7132 if (os_strlen(ssid->passphrase) >= sizeof(params.passphrase)) { in wpas_p2p_group_add_persistent()
7137 os_strlcpy(params.passphrase, ssid->passphrase, in wpas_p2p_group_add_persistent()
7140 os_memcpy(params.ssid, ssid->ssid, ssid->ssid_len); in wpas_p2p_group_add_persistent()
7141 params.ssid_len = ssid->ssid_len; in wpas_p2p_group_add_persistent()
7201 struct wpa_ssid *ssid) in wpas_p2p_group_init() argument
7207 !ssid->p2p_group) in wpas_p2p_group_init()
7214 if (ssid->p2p_persistent_group && wpa_s->conf->persistent_reconnect) in wpas_p2p_group_init()
7216 else if (ssid->p2p_persistent_group) in wpas_p2p_group_init()
7224 os_memcpy(cfg->ssid, ssid->ssid, ssid->ssid_len); in wpas_p2p_group_init()
7225 cfg->ssid_len = ssid->ssid_len; in wpas_p2p_group_init()
7226 cfg->freq = ssid->frequency; in wpas_p2p_group_init()
7236 if (ssid->mode != WPAS_MODE_P2P_GROUP_FORMATION) in wpas_p2p_group_init()
7246 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpas_p2p_wps_success() local
7254 if (ssid && ssid->mode == WPAS_MODE_INFRA) { in wpas_p2p_wps_success()
7257 wpas_p2p_persistent_group(wpa_s, go_dev_addr, ssid->ssid, in wpas_p2p_wps_success()
7258 ssid->ssid_len); in wpas_p2p_wps_success()
7266 if (ssid && ssid->mode == WPAS_MODE_INFRA) { in wpas_p2p_wps_success()
7281 } else if (ssid) { in wpas_p2p_wps_success()
7679 struct wpa_ssid *ssid, const u8 *go_dev_addr, int freq, in wpas_p2p_invite() argument
7707 if (ssid->mode == WPAS_MODE_P2P_GO) { in wpas_p2p_invite()
7729 peer_addr = ssid->bssid; in wpas_p2p_invite()
7731 wpa_s->pending_invite_ssid_id = ssid->id; in wpas_p2p_invite()
7761 ssid->ssid, ssid->ssid_len, force_freq, go_dev_addr, in wpas_p2p_invite()
7774 struct wpa_ssid *ssid; in wpas_p2p_invite_group() local
7797 ssid = wpa_s->current_ssid; in wpas_p2p_invite_group()
7798 if (ssid == NULL) { in wpas_p2p_invite_group()
7805 persistent = ssid->p2p_persistent_group && in wpas_p2p_invite_group()
7807 ssid->ssid, ssid->ssid_len); in wpas_p2p_invite_group()
7809 if (ssid->mode == WPAS_MODE_P2P_GO) { in wpas_p2p_invite_group()
7814 freq = ssid->frequency; in wpas_p2p_invite_group()
7845 ssid->ssid, ssid->ssid_len, force_freq, in wpas_p2p_invite_group()
7852 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpas_p2p_completed() local
7859 if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GROUP_FORMATION) { in wpas_p2p_completed()
7864 if (!wpa_s->show_group_started || !ssid) in wpas_p2p_completed()
7880 if (ssid->bssid_set) in wpas_p2p_completed()
7881 os_memcpy(go_dev_addr, ssid->bssid, ETH_ALEN); in wpas_p2p_completed()
7882 persistent = wpas_p2p_persistent_group(wpa_s, go_dev_addr, ssid->ssid, in wpas_p2p_completed()
7883 ssid->ssid_len); in wpas_p2p_completed()
7907 wpas_p2p_group_started(wpa_s, 0, ssid, freq, in wpas_p2p_completed()
7908 ssid->passphrase == NULL && ssid->psk_set ? in wpas_p2p_completed()
7909 ssid->psk : NULL, in wpas_p2p_completed()
7910 ssid->passphrase, go_dev_addr, persistent, in wpas_p2p_completed()
7915 ssid, go_dev_addr); in wpas_p2p_completed()
7917 wpas_notify_p2p_group_started(wpa_s, ssid, persistent, 1, ip_ptr); in wpas_p2p_completed()
8618 struct wpa_ssid *ssid) in wpas_p2p_network_removed() argument
8620 if (wpa_s->p2p_in_provisioning && ssid->p2p_group && in wpas_p2p_network_removed()
8640 const u8 *addr, const u8 *ssid, in wpas_p2p_get_persistent() argument
8646 for (s = wpa_s->conf->ssid; s; s = s->next) { in wpas_p2p_get_persistent()
8649 if (ssid && in wpas_p2p_get_persistent()
8651 os_memcmp(ssid, s->ssid, ssid_len) != 0)) in wpas_p2p_get_persistent()
8827 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpas_p2p_new_psk_cb() local
8845 if (ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) { in wpas_p2p_new_psk_cb()
8865 if (ssid->mode != WPAS_MODE_P2P_GO || !ssid->p2p_persistent_group) { in wpas_p2p_new_psk_cb()
8870 persistent = wpas_p2p_get_persistent(wpa_s->p2pdev, NULL, ssid->ssid, in wpas_p2p_new_psk_cb()
8871 ssid->ssid_len); in wpas_p2p_new_psk_cb()
8945 psk = hapd->conf->ssid.wpa_psk; in wpas_p2p_remove_client_go()
8956 hapd->conf->ssid.wpa_psk = psk->next; in wpas_p2p_remove_client_go()
8992 for (s = p2p_wpa_s->conf->ssid; s; s = s->next) { in wpas_p2p_remove_client()
9023 struct wpa_ssid *ssid) in wpas_p2p_handle_frequency_conflicts() argument
9052 ssid); in wpas_p2p_handle_frequency_conflicts()
9054 WPA_EVENT_FREQ_CONFLICT " id=%d", ssid->id); in wpas_p2p_handle_frequency_conflicts()
9072 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpas_p2p_4way_hs_failed() local
9074 if (ssid == NULL || !ssid->p2p_group) in wpas_p2p_4way_hs_failed()
9078 wpa_s->p2p_last_4way_hs_fail == ssid) { in wpas_p2p_4way_hs_failed()
9083 ssid->ssid, in wpas_p2p_4way_hs_failed()
9084 ssid->ssid_len) <= 0) { in wpas_p2p_4way_hs_failed()
9092 ssid->ssid, in wpas_p2p_4way_hs_failed()
9093 ssid->ssid_len); in wpas_p2p_4way_hs_failed()
9113 wpa_s->p2p_last_4way_hs_fail = ssid; in wpas_p2p_4way_hs_failed()
9167 struct wpa_ssid **ssid, u8 *go_dev_addr) in wpas_p2p_cli_freq() argument
9173 if (ssid) in wpas_p2p_cli_freq()
9174 *ssid = NULL; in wpas_p2p_cli_freq()
9181 if (ssid) in wpas_p2p_cli_freq()
9182 *ssid = iface->current_ssid; in wpas_p2p_cli_freq()
9195 struct wpa_ssid *ssid; in wpas_p2p_nfc_handover_req() local
9197 int cli_freq = wpas_p2p_cli_freq(wpa_s, &ssid, go_dev_addr); in wpas_p2p_nfc_handover_req()
9217 go_dev_addr, ssid ? ssid->ssid : NULL, in wpas_p2p_nfc_handover_req()
9218 ssid ? ssid->ssid_len : 0); in wpas_p2p_nfc_handover_req()
9228 struct wpa_ssid *ssid; in wpas_p2p_nfc_handover_sel() local
9230 int cli_freq = wpas_p2p_cli_freq(wpa_s, &ssid, go_dev_addr); in wpas_p2p_nfc_handover_sel()
9250 go_dev_addr, ssid ? ssid->ssid : NULL, in wpas_p2p_nfc_handover_sel()
9251 ssid ? ssid->ssid_len : 0); in wpas_p2p_nfc_handover_sel()
9289 struct wpa_ssid *ssid; in wpas_p2p_nfc_auth_join() local
9294 ssid = wpa_s->current_ssid; in wpas_p2p_nfc_auth_join()
9295 if (ssid == NULL) in wpas_p2p_nfc_auth_join()
9297 if (ssid->mode != WPAS_MODE_P2P_GO) in wpas_p2p_nfc_auth_join()
9335 persistent = ssid->p2p_persistent_group && in wpas_p2p_nfc_auth_join()
9338 ssid->ssid, ssid->ssid_len); in wpas_p2p_nfc_auth_join()
9343 ssid->ssid, ssid->ssid_len, ssid->frequency, in wpas_p2p_nfc_auth_join()