Lines Matching full: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);
368 /* P2P Wildcard SSID */
374 params->ssids[0].ssid = n;
475 const u8 *ssid,
481 for (s = wpa_s->conf->ssid; s; s = s->next) {
484 os_memcmp(ssid, s->ssid, ssid_len) != 0)
537 for (s = wpa_s->conf->ssid; s; s = s->next) {
539 "P2P: sup:%p ssid:%p disabled:%d p2p:%d mode:%d",
620 for (s = wpa_s->conf->ssid; s; s = s->next) {
671 "P2P: GO(iface)=%p members=%u CLI(iface)=%p persistent(ssid)=%p",
828 struct wpa_ssid *ssid;
832 ssid = wpa_s->current_ssid;
833 if (ssid == NULL) {
835 * The current SSID was not known, but there may still be a
839 ssid = wpa_s->conf->ssid;
840 while (ssid) {
841 if (ssid->p2p_group && ssid->disabled != 2)
843 ssid = ssid->next;
845 if (ssid == NULL &&
856 (ssid && ssid->mode == WPAS_MODE_INFRA)) {
863 if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
864 wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);
978 if (ssid && (ssid->p2p_group ||
979 ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION ||
980 (ssid->key_mgmt & WPA_KEY_MGMT_WPS))) {
981 int id = ssid->id;
982 if (ssid == wpa_s->current_ssid) {
1016 const u8 *ssid, size_t ssid_len)
1029 bss = wpa_bss_get(wpa_s, bssid, ssid, ssid_len);
1038 bss = wpa_bss_get(wpa_s, iface_addr, ssid, ssid_len);
1084 struct wpa_ssid *ssid,
1092 for (s = wpa_s->conf->ssid; s; s = s->next) {
1095 s->ssid_len == ssid->ssid_len &&
1096 os_memcmp(ssid->ssid, s->ssid, ssid->ssid_len) == 0)
1103 if (ssid->passphrase && !s->passphrase)
1105 else if (ssid->passphrase && s->passphrase &&
1106 os_strcmp(ssid->passphrase, s->passphrase) != 0)
1133 s->mode = ssid->mode;
1137 s->pbss = ssid->pbss;
1138 s->pairwise_cipher = ssid->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP;
1140 if (ssid->passphrase) {
1142 s->passphrase = os_strdup(ssid->passphrase);
1144 if (ssid->psk_set) {
1146 os_memcpy(s->psk, ssid->psk, 32);
1150 if (s->ssid == NULL || s->ssid_len < ssid->ssid_len) {
1151 os_free(s->ssid);
1152 s->ssid = os_malloc(ssid->ssid_len);
1154 if (s->ssid) {
1155 s->ssid_len = ssid->ssid_len;
1156 os_memcpy(s->ssid, ssid->ssid, s->ssid_len);
1158 if (ssid
1176 struct wpa_ssid *ssid, *s;
1182 ssid = wpa_s->current_ssid;
1183 if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GO ||
1184 !ssid->p2p_persistent_group)
1187 for (s = p2p_wpa_s->conf->ssid; s; s = s->next) {
1191 if (s->ssid_len == ssid->ssid_len &&
1192 os_memcmp(s->ssid, ssid->ssid, s->ssid_len) == 0)
1253 int go, struct wpa_ssid *ssid, int freq,
1266 if (ssid)
1267 ssid_txt = wpa_ssid_txt(ssid->ssid, ssid->ssid_len);
1280 "%s %s ssid=\"%s\" freq=%d%s%s%s%s%s go_dev_addr="
1290 "%s %s ssid=\"%s\" freq=%d go_dev_addr=" MACSTR "%s%s",
1300 struct wpa_ssid *ssid;
1334 ssid = wpa_s->current_ssid;
1335 if (ssid && ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) {
1336 ssid->mode = WPAS_MODE_P2P_GO;
1342 if (ssid) {
1343 client = ssid->mode == WPAS_MODE_INFRA;
1344 if (ssid->mode == WPAS_MODE_P2P_GO) {
1345 persistent = ssid->p2p_persistent_group;
1351 ssid->ssid,
1352 ssid->ssid_len);
1368 wpas_p2p_group_started(wpa_s, 1, ssid,
1369 ssid ? ssid->frequency : 0,
1370 ssid && ssid->passphrase == NULL &&
1371 ssid->psk_set ? ssid->psk : NULL,
1372 ssid ? ssid->passphrase : NULL,
1380 ssid, go_dev_addr);
1385 if (network_id < 0 && ssid)
1386 network_id = ssid->id;
1388 wpas_notify_p2p_group_started(wpa_s, ssid, network_id, 0);
1636 wpa_hexdump_ascii(MSG_DEBUG, "P2P: Start WPS Enrollee for SSID",
1637 res->ssid, res->ssid_len);
1667 struct wpa_ssid *ssid)
1676 persistent = wpas_p2p_get_persistent(wpa_s->p2pdev, NULL, ssid->ssid,
1677 ssid->ssid_len);
1698 hpsk->next = hapd->conf->ssid.wpa_psk;
1699 hapd->conf->ssid.wpa_psk = hpsk;
1752 struct wpa_ssid *ssid;
1767 ssid = wpa_s->current_ssid;
1768 if (ssid && ssid->mode == WPAS_MODE_P2P_GO) {
1772 wpas_p2p_group_started(wpa_s, 1, ssid, ssid->frequency,
1801 wpa_s->p2pdev, ssid,
1803 wpas_p2p_add_psk_list(wpa_s, ssid);
1806 network_id = ssid->id;
1807 wpas_notify_p2p_group_started(wpa_s, ssid, network_id, 0);
1864 struct wpa_ssid *ssid;
1873 ssid = wpa_config_add_network(wpa_s->conf);
1874 if (ssid == NULL) {
1884 wpa_config_set_network_defaults(ssid);
1885 ssid->temporary = 1;
1886 ssid->p2p_group = 1;
1887 ssid->p2p_persistent_group = params->persistent_group;
1888 ssid->mode = group_formation ? WPAS_MODE_P2P_GROUP_FORMATION :
1890 ssid->frequency = params->freq;
1891 ssid->ht40 = params->ht40;
1892 ssid->vht = params->vht;
1893 ssid->max_oper_chwidth = params->max_oper_chwidth;
1894 ssid->vht_center_freq2 = params->vht_center_freq2;
1895 ssid->ssid = os_zalloc(params->ssid_len + 1);
1896 if (ssid->ssid) {
1897 os_memcpy(ssid->ssid, params->ssid, params->ssid_len);
1898 ssid->ssid_len = params->ssid_len;
1900 ssid->auth_alg = WPA_AUTH_ALG_OPEN;
1901 ssid->key_mgmt = WPA_KEY_MGMT_PSK;
1902 ssid->proto = WPA_PROTO_RSN;
1903 ssid->pairwise_cipher = WPA_CIPHER_CCMP;
1904 ssid->group_cipher = WPA_CIPHER_CCMP;
1910 ssid->pairwise_cipher = WPA_CIPHER_GCMP;
1911 ssid->group_cipher = WPA_CIPHER_GCMP;
1913 ssid->pbss = 1;
1916 ssid->passphrase = os_strdup(params->passphrase);
1917 if (ssid->passphrase == NULL) {
1920 wpa_config_remove_network(wpa_s->conf, ssid->id);
1924 ssid->passphrase = NULL;
1925 ssid->psk_set = params->psk_set;
1926 if (ssid->psk_set)
1927 os_memcpy(ssid->psk, params->psk, sizeof(ssid->psk));
1928 else if (ssid->passphrase)
1929 wpa_config_update_psk(ssid);
1930 ssid->ap_max_inactivity = wpa_s->p2pdev->conf->p2p_go_max_inactivity;
1936 wpa_s->connect_without_scan = ssid;
2229 struct wpa_ssid *ssid;
2230 ssid = wpa_config_get_network(wpa_s->conf,
2232 if (ssid && ssid->disabled == 2 &&
2233 ssid->mode == WPAS_MODE_P2P_GO && ssid->passphrase) {
2234 size_t len = os_strlen(ssid->passphrase);
2237 os_memcpy(res->passphrase, ssid->passphrase, len);
2586 os_memcmp(group_id + ETH_ALEN, s->ssid,
2849 const u8 *go_dev_addr, const u8 *ssid,
2863 " to join an active group (SSID: %s)",
2864 MAC2STR(sa), wpa_ssid_txt(ssid, ssid_len));
2895 grp = wpas_get_p2p_group(wpa_s, ssid, ssid_len, go);
2912 for (s = wpa_s->conf->ssid; s; s = s->next) {
2916 os_memcmp(ssid, s->ssid, ssid_len) == 0)
3001 const u8 *ssid, size_t ssid_len,
3008 for (s = wpa_s->conf->ssid; s; s = s->next) {
3011 os_memcmp(ssid, s->ssid, ssid_len) == 0)
3017 " was accepted; op_freq=%d MHz, SSID=%s",
3018 MAC2STR(sa), op_freq, wpa_ssid_txt(ssid, ssid_len));
3029 ssid, ssid_len);
3075 struct wpa_ssid *ssid,
3081 if (ssid == NULL)
3084 for (i = 0; ssid->p2p_client_list && i < ssid->num_p2p_clients; i++) {
3085 if (os_memcmp(ssid->p2p_client_list + i * 2 * ETH_ALEN, peer,
3089 if (i >= ssid->num_p2p_clients || !ssid->p2p_client_list) {
3090 if (ssid->mode != WPAS_MODE_P2P_GO &&
3091 os_memcmp(ssid->bssid, peer, ETH_ALEN) == 0) {
3093 "due to invitation result", ssid->id);
3094 wpas_notify_network_removed(wpa_s, ssid);
3095 wpa_config_remove_network(wpa_s->conf, ssid->id);
3103 MAC2STR(peer), ssid->id,
3105 os_memmove(ssid->p2p_client_list + i * 2 * ETH_ALEN,
3106 ssid->p2p_client_list + (i + 1) * 2 * ETH_ALEN,
3107 (ssid->num_p2p_clients - i - 1) * 2 * ETH_ALEN);
3108 ssid->num_p2p_clients--;
3118 struct wpa_ssid *ssid;
3123 ssid = wpa_s->current_ssid;
3124 if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GO ||
3125 !ssid->p2p_persistent_group)
3127 ssid = wpas_p2p_get_persistent(wpa_s->p2pdev, peer,
3128 ssid->ssid, ssid->ssid_len);
3129 wpas_remove_persistent_peer(wpa_s, ssid, peer, 1);
3139 struct wpa_ssid *ssid;
3196 ssid = wpa_config_get_network(
3198 wpas_remove_persistent_peer(wpa_s, ssid, peer, 1);
3204 ssid = wpa_config_get_network(wpa_s->conf,
3206 if (ssid == NULL) {
3224 if (neg_freq > 0 && ssid->mode == WPAS_MODE_P2P_GO &&
3227 else if (peer_oper_freq > 0 && ssid->mode != WPAS_MODE_P2P_GO &&
3233 wpa_printf(MSG_DEBUG, "P2P: Persistent group invitation success - op_freq=%d MHz SSID=%s",
3234 freq, wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
3235 wpas_p2p_group_add_persistent(wpa_s, ssid,
3236 ssid->mode == WPAS_MODE_P2P_GO,
3243 ssid->mode == WPAS_MODE_P2P_GO ?
3655 const u8 *ssid, size_t ssid_len)
3666 os_memcmp(ssid, s->ssid, ssid_len) != 0)
3680 struct wpa_ssid *ssid = wpa_s->current_ssid;
3681 if (ssid && (ssid->mode != WPAS_MODE_INFRA || !ssid->p2p_group))
3797 static int wpas_get_persistent_group(void *ctx, const u8 *addr, const u8 *ssid,
3805 s = wpas_p2p_get_persistent(wpa_s, addr, ssid, ssid_len);
3807 os_memcpy(ret_ssid, s->ssid, s->ssid_len);
3831 u8 *ssid, size_t *ssid_len, int *group_iface,
3865 os_memcpy(ssid, s->ssid, s->ssid_len);
3873 const u8 *ssid, size_t ssid_len)
3882 if (go && ssid && ssid_len &&
3885 os_memcmp(ssid, s->ssid, ssid_len) == 0)
3912 /* Return TRUE if valid SSID remains */
4047 os_memcmp(stale->ssid, s->ssid, s->ssid_len) == 0)
4573 struct wpa_ssid *ssid, unsigned int pref_freq)
4587 persistent_group, ssid ? ssid->ssid : NULL,
4588 ssid ? ssid->ssid_len : 0,
4600 struct wpa_ssid *ssid, unsigned int pref_freq)
4607 persistent_group, ssid ? ssid->ssid : NULL,
4608 ssid ? ssid->ssid_len : 0, pref_freq,
4821 MACSTR " and SSID %s",
4839 "from BSS table: %d MHz (SSID %s)", freq,
4840 wpa_ssid_txt(bss->ssid, bss->ssid_len));
4933 const u8 *ssid, size_t ssid_len)
4944 /* P2P Wildcard SSID */
4946 if (ssid && ssid_len) {
4947 params.ssids[0].ssid = ssid;
4949 os_memcpy(wpa_s->p2p_join_ssid, ssid, ssid_len);
4952 params.ssids[0].ssid = (u8 *) P2P_WILDCARD_SSID;
5032 const u8 *ssid, size_t ssid_len)
5038 if (ssid && ssid_len) {
5039 wpa_printf(MSG_DEBUG, "P2P: Group SSID specified: %s",
5040 wpa_ssid_txt(ssid, ssid_len));
5053 wpas_p2p_join_scan_req(wpa_s, op_freq, ssid, ssid_len);
5059 const u8 *ssid, size_t ssid_len)
5091 if (freq && ssid && ssid_len) {
5094 os_memcpy(res.ssid, ssid, ssid_len);
5096 if (ssid && ssid_len) {
5098 ssid, ssid_len);
5106 os_memcpy(res.ssid, bss->ssid, bss->ssid_len);
5107 wpa_printf(MSG_DEBUG, "P2P: Join target GO operating frequency from BSS table: %d MHz (SSID %s)",
5109 wpa_ssid_txt(bss->ssid, bss->ssid_len));
5110 } else if (ssid && ssid_len) {
5112 os_memcpy(res.ssid, ssid, ssid_len);
5113 wpa_printf(MSG_DEBUG, "P2P: Join target GO (SSID %s)",
5114 wpa_ssid_txt(ssid, ssid_len));
5301 * parameters or -1 to generate new values (SSID/passphrase)
5308 * @group_ssid: Specific Group SSID for join or %NULL if not set
5326 struct wpa_ssid *ssid = NULL;
5333 ssid = wpa_config_get_network(wpa_s->conf, persistent_id);
5334 if (ssid == NULL || ssid->disabled != 2 ||
5335 ssid->mode != WPAS_MODE_P2P_GO)
5445 force_freq, persistent_group, ssid,
5453 persistent_group, ssid, pref_freq) < 0) {
6093 struct wpa_ssid *ssid;
6104 ssid = wpa_config_add_network(wpa_s->conf);
6105 if (ssid == NULL)
6108 wpa_config_set_network_defaults(ssid);
6109 ssid->temporary = 1;
6110 ssid->proto = WPA_PROTO_RSN;
6111 ssid->pbss = params->pbss;
6112 ssid->pairwise_cipher = params->pbss ? WPA_CIPHER_GCMP :
6114 ssid->group_cipher = params->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP;
6115 ssid->key_mgmt = WPA_KEY_MGMT_PSK;
6116 ssid->ssid = os_malloc(params->ssid_len);
6117 if (ssid->ssid == NULL) {
6118 wpa_config_remove_network(wpa_s->conf, ssid->id);
6121 os_memcpy(ssid->ssid, params->ssid, params->ssid_len);
6122 ssid->ssid_len = params->ssid_len;
6123 ssid->p2p_group = 1;
6124 ssid->export_keys = 1;
6126 os_memcpy(ssid->psk, params->psk, 32);
6127 ssid->psk_set = 1;
6130 ssid->passphrase = os_strdup(params->passphrase);
6143 wpa_supplicant_select_network(wpa_s, ssid);
6150 struct wpa_ssid *ssid, int addr_allocated,
6160 if (ssid->disabled != 2 || ssid->ssid == NULL)
6163 if (wpas_get_p2p_group(wpa_s, ssid->ssid, ssid->ssid_len, &go) &&
6164 go == (ssid->mode == WPAS_MODE_P2P_GO)) {
6195 if (ssid->mode == WPAS_MODE_P2P_GO) {
6206 } else if (ssid->mode == WPAS_MODE_INFRA) {
6211 wpa_bss_get_p2p_dev_addr(wpa_s, ssid->bssid);
6222 return wpas_start_p2p_client(wpa_s, ssid, addr_allocated, freq,
6233 params.psk_set = ssid->psk_set;
6235 os_memcpy(params.psk, ssid->psk, sizeof(params.psk));
6236 if (ssid->passphrase) {
6237 if (os_strlen(ssid->passphrase) >= sizeof(params.passphrase)) {
6242 os_strlcpy(params.passphrase, ssid->passphrase,
6245 os_memcpy(params.ssid, ssid->ssid, ssid->ssid_len);
6246 params.ssid_len = ssid->ssid_len;
6306 struct wpa_ssid *ssid)
6318 if (ssid->p2p_persistent_group && wpa_s->conf->persistent_reconnect)
6320 else if (ssid->p2p_persistent_group)
6328 os_memcpy(cfg->ssid, ssid->ssid, ssid->ssid_len);
6329 cfg->ssid_len = ssid->ssid_len;
6330 cfg->freq = ssid->frequency;
6340 if (ssid->mode != WPAS_MODE_P2P_GROUP_FORMATION)
6350 struct wpa_ssid *ssid = wpa_s->current_ssid;
6358 if (ssid && ssid->mode == WPAS_MODE_INFRA) {
6361 wpas_p2p_persistent_group(wpa_s, go_dev_addr, ssid->ssid,
6362 ssid->ssid_len);
6370 if (ssid && ssid->mode == WPAS_MODE_INFRA) {
6385 } else if (ssid) {
6766 struct wpa_ssid *ssid, const u8 *go_dev_addr, int freq,
6788 if (ssid->mode == WPAS_MODE_P2P_GO) {
6810 peer_addr = ssid->bssid;
6812 wpa_s->pending_invite_ssid_id = ssid->id;
6842 ssid->ssid, ssid->ssid_len, force_freq, go_dev_addr,
6854 struct wpa_ssid *ssid;
6875 ssid = wpa_s->current_ssid;
6876 if (ssid == NULL) {
6877 wpa_printf(MSG_DEBUG, "P2P: No current SSID to use for "
6883 persistent = ssid->p2p_persistent_group &&
6885 ssid->ssid, ssid->ssid_len);
6887 if (ssid->mode == WPAS_MODE_P2P_GO) {
6892 freq = ssid->frequency;
6921 ssid->ssid, ssid->ssid_len, force_freq,
6928 struct wpa_ssid *ssid = wpa_s->current_ssid;
6936 if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GROUP_FORMATION) {
6941 if (!wpa_s->show_group_started || !ssid)
6956 if (ssid->bssid_set)
6957 os_memcpy(go_dev_addr, ssid->bssid, ETH_ALEN);
6958 persistent = wpas_p2p_persistent_group(wpa_s, go_dev_addr, ssid->ssid,
6959 ssid->ssid_len);
6982 wpas_p2p_group_started(wpa_s, 0, ssid, freq,
6983 ssid->passphrase == NULL && ssid->psk_set ?
6984 ssid->psk : NULL,
6985 ssid->passphrase, go_dev_addr, persistent,
6990 ssid, go_dev_addr);
6992 network_id = ssid->id;
6993 wpas_notify_p2p_group_started(wpa_s, ssid, network_id, 1);
7689 struct wpa_ssid *ssid)
7691 if (wpa_s->p2p_in_provisioning && ssid->p2p_group &&
7711 const u8 *addr, const u8 *ssid,
7717 for (s = wpa_s->conf->ssid; s; s = s->next) {
7720 if (ssid &&
7722 os_memcmp(ssid, s->ssid, ssid_len) != 0))
7894 struct wpa_ssid *ssid = wpa_s->current_ssid;
7912 if (ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) {
7932 if (ssid->mode != WPAS_MODE_P2P_GO || !ssid->p2p_persistent_group) {
7937 persistent = wpas_p2p_get_persistent(wpa_s->p2pdev, NULL, ssid->ssid,
7938 ssid->ssid_len);
8012 psk = hapd->conf->ssid.wpa_psk;
8023 hapd->conf->ssid.wpa_psk = psk->next;
8059 for (s = p2p_wpa_s->conf->ssid; s; s = s->next) {
8090 struct wpa_ssid *ssid)
8119 ssid);
8121 WPA_EVENT_FREQ_CONFLICT " id=%d", ssid->id);
8139 struct wpa_ssid *ssid = wpa_s->current_ssid;
8141 if (ssid == NULL || !ssid->p2p_group)
8145 wpa_s->p2p_last_4way_hs_fail == ssid) {
8150 ssid->ssid,
8151 ssid->ssid_len) <= 0) {
8159 ssid->ssid,
8160 ssid->ssid_len);
8180 wpa_s->p2p_last_4way_hs_fail = ssid;
8234 struct wpa_ssid **ssid, u8 *go_dev_addr)
8240 if (ssid)
8241 *ssid = NULL;
8248 if (ssid)
8249 *ssid = iface->current_ssid;
8262 struct wpa_ssid *ssid;
8264 int cli_freq = wpas_p2p_cli_freq(wpa_s, &ssid, go_dev_addr);
8284 go_dev_addr, ssid ? ssid->ssid : NULL,
8285 ssid ? ssid->ssid_len : 0);
8295 struct wpa_ssid *ssid;
8297 int cli_freq = wpas_p2p_cli_freq(wpa_s, &ssid, go_dev_addr);
8317 go_dev_addr, ssid ? ssid->ssid : NULL,
8318 ssid ? ssid->ssid_len : 0);
8355 struct wpa_ssid *ssid;
8360 ssid = wpa_s->current_ssid;
8361 if (ssid == NULL)
8363 if (ssid->mode != WPAS_MODE_P2P_GO)
8401 persistent = ssid->p2p_persistent_group &&
8404 ssid->ssid, ssid->ssid_len);
8409 ssid->ssid, ssid->ssid_len, ssid->frequency,
8531 " ssid=\"%s\"",