Lines Matching refs:ssid

101 			      struct wpa_ssid *ssid,  in wpa_supplicant_conf_ap_ht()  argument
104 conf->hw_mode = ieee80211_freq_to_chan(ssid->frequency, in wpa_supplicant_conf_ap_ht()
109 ssid->frequency); in wpa_supplicant_conf_ap_ht()
134 if (ssid->disable_ht) { in wpa_supplicant_conf_ap_ht()
147 ssid->ht40) in wpa_supplicant_conf_ap_ht()
169 if (mode->vht_capab && ssid->vht) { in wpa_supplicant_conf_ap_ht()
183 (int) iface->assoc_freq != ssid->frequency) in wpa_supplicant_conf_ap_ht()
205 struct wpa_ssid *ssid, in wpa_supplicant_conf_ap() argument
214 if (wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf)) in wpa_supplicant_conf_ap()
218 if (ssid->acs) { in wpa_supplicant_conf_ap()
225 if (ieee80211_is_dfs(ssid->frequency) && wpa_s->conf->country[0]) { in wpa_supplicant_conf_ap()
234 (ssid->mode == WPAS_MODE_P2P_GO || in wpa_supplicant_conf_ap()
235 ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION)) { in wpa_supplicant_conf_ap()
264 if (ssid->p2p_group) { in wpa_supplicant_conf_ap()
275 if (ssid->ssid_len == 0) { in wpa_supplicant_conf_ap()
279 os_memcpy(bss->ssid.ssid, ssid->ssid, ssid->ssid_len); in wpa_supplicant_conf_ap()
280 bss->ssid.ssid_len = ssid->ssid_len; in wpa_supplicant_conf_ap()
281 bss->ssid.ssid_set = 1; in wpa_supplicant_conf_ap()
283 bss->ignore_broadcast_ssid = ssid->ignore_broadcast_ssid; in wpa_supplicant_conf_ap()
285 if (ssid->auth_alg) in wpa_supplicant_conf_ap()
286 bss->auth_algs = ssid->auth_alg; in wpa_supplicant_conf_ap()
288 if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt)) in wpa_supplicant_conf_ap()
289 bss->wpa = ssid->proto; in wpa_supplicant_conf_ap()
290 bss->wpa_key_mgmt = ssid->key_mgmt; in wpa_supplicant_conf_ap()
291 bss->wpa_pairwise = ssid->pairwise_cipher; in wpa_supplicant_conf_ap()
292 if (ssid->psk_set) { in wpa_supplicant_conf_ap()
293 bin_clear_free(bss->ssid.wpa_psk, sizeof(*bss->ssid.wpa_psk)); in wpa_supplicant_conf_ap()
294 bss->ssid.wpa_psk = os_zalloc(sizeof(struct hostapd_wpa_psk)); in wpa_supplicant_conf_ap()
295 if (bss->ssid.wpa_psk == NULL) in wpa_supplicant_conf_ap()
297 os_memcpy(bss->ssid.wpa_psk->psk, ssid->psk, PMK_LEN); in wpa_supplicant_conf_ap()
298 bss->ssid.wpa_psk->group = 1; in wpa_supplicant_conf_ap()
299 } else if (ssid->passphrase) { in wpa_supplicant_conf_ap()
300 bss->ssid.wpa_passphrase = os_strdup(ssid->passphrase); in wpa_supplicant_conf_ap()
301 } else if (ssid->wep_key_len[0] || ssid->wep_key_len[1] || in wpa_supplicant_conf_ap()
302 ssid->wep_key_len[2] || ssid->wep_key_len[3]) { in wpa_supplicant_conf_ap()
303 struct hostapd_wep_keys *wep = &bss->ssid.wep; in wpa_supplicant_conf_ap()
306 if (ssid->wep_key_len[i] == 0) in wpa_supplicant_conf_ap()
308 wep->key[i] = os_malloc(ssid->wep_key_len[i]); in wpa_supplicant_conf_ap()
311 os_memcpy(wep->key[i], ssid->wep_key[i], in wpa_supplicant_conf_ap()
312 ssid->wep_key_len[i]); in wpa_supplicant_conf_ap()
313 wep->len[i] = ssid->wep_key_len[i]; in wpa_supplicant_conf_ap()
315 wep->idx = ssid->wep_tx_keyidx; in wpa_supplicant_conf_ap()
319 if (ssid->ap_max_inactivity) in wpa_supplicant_conf_ap()
320 bss->ap_max_inactivity = ssid->ap_max_inactivity; in wpa_supplicant_conf_ap()
322 if (ssid->dtim_period) in wpa_supplicant_conf_ap()
323 bss->dtim_period = ssid->dtim_period; in wpa_supplicant_conf_ap()
327 if (ssid->beacon_int) in wpa_supplicant_conf_ap()
328 conf->beacon_int = ssid->beacon_int; in wpa_supplicant_conf_ap()
333 if (ssid->mode == WPAS_MODE_P2P_GO || in wpa_supplicant_conf_ap()
334 ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) { in wpa_supplicant_conf_ap()
353 bss->ssid.security_policy = SECURITY_WPA; in wpa_supplicant_conf_ap()
355 bss->ssid.security_policy = SECURITY_WPA_PSK; in wpa_supplicant_conf_ap()
358 bss->ssid.security_policy = SECURITY_IEEE_802_1X; in wpa_supplicant_conf_ap()
359 bss->ssid.wep.default_len = bss->default_wep_key_len; in wpa_supplicant_conf_ap()
366 } else if (bss->ssid.wep.keys_set) { in wpa_supplicant_conf_ap()
368 if (bss->ssid.wep.len[0] >= 13) in wpa_supplicant_conf_ap()
370 bss->ssid.security_policy = SECURITY_STATIC_WEP; in wpa_supplicant_conf_ap()
375 bss->ssid.security_policy = SECURITY_PLAINTEXT; in wpa_supplicant_conf_ap()
394 if (ssid->ieee80211w != MGMT_FRAME_PROTECTION_DEFAULT) in wpa_supplicant_conf_ap()
395 bss->ieee80211w = ssid->ieee80211w; in wpa_supplicant_conf_ap()
404 if (bss->ssid.security_policy != SECURITY_WPA_PSK && in wpa_supplicant_conf_ap()
405 bss->ssid.security_policy != SECURITY_PLAINTEXT) in wpa_supplicant_conf_ap()
407 if (bss->ssid.security_policy == SECURITY_WPA_PSK && in wpa_supplicant_conf_ap()
414 if (!ssid->ignore_broadcast_ssid) in wpa_supplicant_conf_ap()
456 bss->pbss = ssid->pbss; in wpa_supplicant_conf_ap()
586 struct wpa_ssid *ssid) in wpa_supplicant_create_ap() argument
593 if (ssid->ssid == NULL || ssid->ssid_len == 0) { in wpa_supplicant_create_ap()
601 wpa_ssid_txt(ssid->ssid, ssid->ssid_len)); in wpa_supplicant_create_ap()
604 params.ssid = ssid->ssid; in wpa_supplicant_create_ap()
605 params.ssid_len = ssid->ssid_len; in wpa_supplicant_create_ap()
606 switch (ssid->mode) { in wpa_supplicant_create_ap()
615 if (ssid->frequency == 0) in wpa_supplicant_create_ap()
616 ssid->frequency = 2462; /* default channel 11 */ in wpa_supplicant_create_ap()
617 params.freq.freq = ssid->frequency; in wpa_supplicant_create_ap()
619 params.wpa_proto = ssid->proto; in wpa_supplicant_create_ap()
620 if (ssid->key_mgmt & WPA_KEY_MGMT_PSK) in wpa_supplicant_create_ap()
626 wpa_s->pairwise_cipher = wpa_pick_pairwise_cipher(ssid->pairwise_cipher, in wpa_supplicant_create_ap()
637 if (ssid->mode == WPAS_MODE_P2P_GO || in wpa_supplicant_create_ap()
638 ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) in wpa_supplicant_create_ap()
675 if (ssid->max_oper_chwidth) in wpa_supplicant_create_ap()
676 conf->vht_oper_chwidth = ssid->max_oper_chwidth; in wpa_supplicant_create_ap()
678 ieee80211_freq_to_chan(ssid->vht_center_freq2, in wpa_supplicant_create_ap()
690 if (wpa_supplicant_conf_ap(wpa_s, ssid, conf)) { in wpa_supplicant_create_ap()
697 if (ssid->mode == WPAS_MODE_P2P_GO) in wpa_supplicant_create_ap()
699 else if (ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) in wpa_supplicant_create_ap()
740 ssid); in wpa_supplicant_create_ap()
754 wpa_s->current_ssid = ssid; in wpa_supplicant_create_ap()
757 wpa_s->assoc_freq = ssid->frequency; in wpa_supplicant_create_ap()
1202 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpa_supplicant_ap_update_beacon() local
1205 if (ssid == NULL || wpa_s->ap_iface == NULL || in wpa_supplicant_ap_update_beacon()
1206 ssid->mode == WPAS_MODE_INFRA || in wpa_supplicant_ap_update_beacon()
1207 ssid->mode == WPAS_MODE_IBSS) in wpa_supplicant_ap_update_beacon()
1211 if (ssid->mode == WPAS_MODE_P2P_GO) in wpa_supplicant_ap_update_beacon()
1213 else if (ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) in wpa_supplicant_ap_update_beacon()