• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/wpa/wpa_supplicant/

Lines Matching defs:conf

234 	if (wpa_s->conf->p2p_ignore_shared_freq &&
489 for (s = wpa_s->conf->ssid; s; s = s->next) {
545 for (s = wpa_s->conf->ssid; s; s = s->next) {
628 for (s = wpa_s->conf->ssid; s; s = s->next) {
848 ssid = wpa_s->conf->ssid;
1006 wpa_config_remove_network(wpa_s->conf, id);
1102 for (s = wpa_s->conf->ssid; s; s = s->next) {
1122 s = wpa_config_add_network(wpa_s->conf);
1174 if (changed && wpa_s->conf->update_config &&
1175 wpa_config_write(wpa_s->confname, wpa_s->conf)) {
1197 for (s = p2p_wpa_s->conf->ssid; s; s = s->next) {
1256 if (p2p_wpa_s->conf->update_config &&
1257 wpa_config_write(p2p_wpa_s->confname, p2p_wpa_s->conf))
1717 hpsk->next = hapd->conf->ssid.wpa_psk;
1718 hapd->conf->ssid.wpa_psk = hpsk;
1769 if (wpa_s->p2pdev->conf->update_config &&
1770 wpa_config_write(wpa_s->p2pdev->confname, wpa_s->p2pdev->conf))
1901 ssid = wpa_config_add_network(wpa_s->conf);
1949 wpa_config_remove_network(wpa_s->conf, ssid->id);
1959 ssid->ap_max_inactivity = wpa_s->p2pdev->conf->p2p_go_max_inactivity;
1980 d = dst->conf;
1981 s = src->conf;
2087 if (wpa_s->conf->p2p_interface_random_mac_addr) {
2150 if (wpa_s->conf->ctrl_interface == NULL &&
2154 iface.ctrl_interface = wpa_s->parent->conf->ctrl_interface;
2156 iface.ctrl_interface = wpa_s->conf->ctrl_interface;
2157 iface.driver_param = wpa_s->conf->driver_param;
2172 if (wpa_s->conf->p2p_interface_random_mac_addr) {
2287 ssid = wpa_config_get_network(wpa_s->conf,
2966 } else if (!wpa_s->conf->persistent_reconnect)
2969 for (s = wpa_s->conf->ssid; s; s = s->next) {
3065 for (s = wpa_s->conf->ssid; s; s = s->next) {
3171 wpa_config_remove_network(wpa_s->conf, ssid->id);
3185 if (p2p_wpa_s->conf->update_config &&
3186 wpa_config_write(p2p_wpa_s->confname, p2p_wpa_s->conf))
3273 wpa_s->conf, wpa_s->pending_invite_ssid_id);
3280 ssid = wpa_config_get_network(wpa_s->conf,
3636 wpa_s->conf->p2p_add_cli_chan) {
3822 iface.driver_param = wpa_s->conf->driver_param;
3833 iface.ctrl_interface = wpa_s->conf->ctrl_interface;
3967 wpa_config_remove_network(wpa_s->conf, s->id);
4095 wpa_config_remove_network(wpa_s->conf,
4139 wpa_config_remove_network(wpa_s->conf, stale->id);
4176 wpa_config_remove_network(wpa_s->conf,
4293 wpa_config_remove_network(wpa_s->conf, persistent_go->id);
4382 if (wpa_s->conf->p2p_device_random_mac_addr == 0)
4385 if (!wpa_s->conf->ssid) {
4393 os_memcpy(wpa_s->conf->p2p_device_persistent_mac_addr, addr,
4400 wpa_s->conf->p2p_device_persistent_mac_addr))
4402 os_memcpy(addr, wpa_s->conf->p2p_device_persistent_mac_addr,
4437 if (wpa_s->conf->p2p_disabled)
4489 p2p.dev_name = wpa_s->conf->device_name;
4490 p2p.manufacturer = wpa_s->conf->manufacturer;
4491 p2p.model_name = wpa_s->conf->model_name;
4492 p2p.model_number = wpa_s->conf->model_number;
4493 p2p.serial_number = wpa_s->conf->serial_number;
4505 if (wpa_s->conf->p2p_listen_reg_class &&
4506 wpa_s->conf->p2p_listen_channel) {
4507 p2p.reg_class = wpa_s->conf->p2p_listen_reg_class;
4508 p2p.channel = wpa_s->conf->p2p_listen_channel;
4529 if (wpa_s->conf->p2p_oper_reg_class &&
4530 wpa_s->conf->p2p_oper_channel) {
4531 p2p.op_reg_class = wpa_s->conf->p2p_oper_reg_class;
4532 p2p.op_channel = wpa_s->conf->p2p_oper_channel;
4558 if (wpa_s->conf->p2p_pref_chan && wpa_s->conf->num_p2p_pref_chan) {
4559 p2p.pref_chan = wpa_s->conf->p2p_pref_chan;
4560 p2p.num_pref_chan = wpa_s->conf->num_p2p_pref_chan;
4563 if (wpa_s->conf->country[0] && wpa_s->conf->country[1]) {
4564 os_memcpy(p2p.country, wpa_s->conf->country, 2);
4569 os_memcpy(p2p.pri_dev_type, wpa_s->conf->device_type,
4572 p2p.num_sec_dev_types = wpa_s->conf->num_sec_device_types;
4573 os_memcpy(p2p.sec_dev_type, wpa_s->conf->sec_device_type,
4581 if (wpa_s->conf->p2p_ssid_postfix) {
4583 os_strlen(wpa_s->conf->p2p_ssid_postfix);
4586 os_memcpy(p2p.ssid_postfix, wpa_s->conf->p2p_ssid_postfix,
4590 p2p.p2p_intra_bss = wpa_s->conf->p2p_intra_bss;
4594 if (wpa_s->conf->p2p_passphrase_len >= 8 &&
4595 wpa_s->conf->p2p_passphrase_len <= 63)
4596 p2p.passphrase_len = wpa_s->conf->p2p_passphrase_len;
4606 if (wpa_s->conf->wps_vendor_ext[i] == NULL)
4609 global->p2p, wpa_s->conf->wps_vendor_ext[i]);
4612 p2p_set_no_go_freq(global->p2p, &wpa_s->conf->p2p_no_go_freq);
4713 if (wpa_s->conf->p2p_no_group_iface)
4737 if (persistent_group && wpa_s->conf->persistent_reconnect)
4764 if (persistent_group && wpa_s->conf->persistent_reconnect)
5387 if (!wpa_s->conf->num_p2p_pref_chan && *pref_freq == 0) {
5507 ssid = wpa_config_get_network(wpa_s->conf, persistent_id);
5522 go_intent = wpa_s->conf->p2p_go_intent;
5763 if (!wpa_s->conf->num_p2p_pref_chan && !freq) {
6062 (!wpa_s->conf->p2p_ignore_shared_freq || !unused_channels)) {
6092 if (wpa_s->conf->p2p_oper_reg_class == 81 &&
6093 wpa_s->conf->p2p_oper_channel >= 1 &&
6094 wpa_s->conf->p2p_oper_channel <= 11 &&
6097 2407 + 5 * wpa_s->conf->p2p_oper_channel)) {
6098 params->freq = 2407 + 5 * wpa_s->conf->p2p_oper_channel;
6104 if ((wpa_s->conf->p2p_oper_reg_class == 115 ||
6105 wpa_s->conf->p2p_oper_reg_class == 116 ||
6106 wpa_s->conf->p2p_oper_reg_class == 117 ||
6107 wpa_s->conf->p2p_oper_reg_class == 124 ||
6108 wpa_s->conf->p2p_oper_reg_class == 125 ||
6109 wpa_s->conf->p2p_oper_reg_class == 126 ||
6110 wpa_s->conf->p2p_oper_reg_class == 127) &&
6113 5 * wpa_s->conf->p2p_oper_channel)) {
6114 params->freq = 5000 + 5 * wpa_s->conf->p2p_oper_channel;
6121 if (wpa_s->conf->p2p_oper_channel == 0 &&
6131 if (wpa_s->conf->p2p_oper_channel == 0 &&
6141 if (wpa_s->conf->p2p_oper_channel == 0 &&
6383 ssid = wpa_config_add_network(wpa_s->conf);
6397 wpa_config_remove_network(wpa_s->conf, ssid->id);
6547 if (!(hapd->conf->p2p & P2P_GROUP_OWNER)) {
6598 if (ssid->p2p_persistent_group && wpa_s->conf->persistent_reconnect)
6604 wpa_s->max_stations < wpa_s->conf->max_num_sta)
6607 cfg->max_clients = wpa_s->conf->max_num_sta;
6614 cfg->ip_addr_alloc = WPA_GET_BE32(wpa_s->p2pdev->conf->ip_addr_start)
6962 if (wpa_s->conf->p2p_disabled && p2p_group)
7119 if (wpa_s->parent->conf->p2p_ignore_shared_freq &&
7341 if (wpa_s->conf->p2p_group_idle == 0 && !wpas_p2p_is_client(wpa_s)) {
7363 timeout = wpa_s->conf->p2p_group_idle;
7460 if (wpa_s->conf->changed_parameters & CFG_CHANGED_DEVICE_NAME)
7461 p2p_set_dev_name(p2p, wpa_s->conf->device_name);
7463 if (wpa_s->conf->changed_parameters & CFG_CHANGED_DEVICE_TYPE)
7464 p2p_set_pri_dev_type(p2p, wpa_s->conf->device_type);
7467 (wpa_s->conf->changed_parameters & CFG_CHANGED_CONFIG_METHODS))
7470 if (wpa_s->wps && (wpa_s->conf->changed_parameters & CFG_CHANGED_UUID))
7473 if (wpa_s->conf->changed_parameters & CFG_CHANGED_WPS_STRING) {
7474 p2p_set_manufacturer(p2p, wpa_s->conf->manufacturer);
7475 p2p_set_model_name(p2p, wpa_s->conf->model_name);
7476 p2p_set_model_number(p2p, wpa_s->conf->model_number);
7477 p2p_set_serial_number(p2p, wpa_s->conf->serial_number);
7480 if (wpa_s->conf->changed_parameters & CFG_CHANGED_SEC_DEVICE_TYPE)
7482 (void *) wpa_s->conf->sec_device_type,
7483 wpa_s->conf->num_sec_device_types);
7485 if (wpa_s->conf->changed_parameters & CFG_CHANGED_VENDOR_EXTENSION) {
7489 if (wpa_s->conf->wps_vendor_ext[i] == NULL)
7492 p2p, wpa_s->conf->wps_vendor_ext[i]);
7496 if ((wpa_s->conf->changed_parameters & CFG_CHANGED_COUNTRY) &&
7497 wpa_s->conf->country[0] && wpa_s->conf->country[1]) {
7499 country[0] = wpa_s->conf->country[0];
7500 country[1] = wpa_s->conf->country[1];
7505 if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_SSID_POSTFIX) {
7506 p2p_set_ssid_postfix(p2p, (u8 *) wpa_s->conf->p2p_ssid_postfix,
7507 wpa_s->conf->p2p_ssid_postfix ?
7508 os_strlen(wpa_s->conf->p2p_ssid_postfix) :
7512 if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_INTRA_BSS)
7513 p2p_set_intra_bss_dist(p2p, wpa_s->conf->p2p_intra_bss);
7515 if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_LISTEN_CHANNEL) {
7521 if (wpa_s->conf->p2p_listen_reg_class &&
7522 wpa_s->conf->p2p_listen_channel) {
7523 reg_class = wpa_s->conf->p2p_listen_reg_class;
7524 channel = wpa_s->conf->p2p_listen_channel;
7544 if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_OPER_CHANNEL) {
7548 if (wpa_s->conf->p2p_oper_reg_class &&
7549 wpa_s->conf->p2p_oper_channel) {
7550 op_reg_class = wpa_s->conf->p2p_oper_reg_class;
7551 op_channel = wpa_s->conf->p2p_oper_channel;
7572 if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_PREF_CHAN) {
7573 if (p2p_set_pref_chan(p2p, wpa_s->conf->num_p2p_pref_chan,
7574 wpa_s->conf->p2p_pref_chan) < 0) {
7579 if (p2p_set_no_go_freq(p2p, &wpa_s->conf->p2p_no_go_freq) < 0) {
7585 if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_PASSPHRASE_LEN)
7586 p2p_set_passphrase_len(p2p, wpa_s->conf->p2p_passphrase_len);
8009 for (s = wpa_s->conf->ssid; s; s = s->next) {
8136 wpa_s->conf->p2p_search_delay);
8137 return wpa_s->conf->p2p_search_delay;
8146 wpa_s->conf->p2p_search_delay,
8148 return wpa_s->conf->p2p_search_delay;
8271 if (wpa_s->p2pdev->conf->update_config &&
8272 wpa_config_write(wpa_s->p2pdev->confname, wpa_s->p2pdev->conf))
8284 if (res > 0 && wpa_s->conf->update_config &&
8285 wpa_config_write(wpa_s->confname, wpa_s->conf))
8305 psk = hapd->conf->ssid.wpa_psk;
8316 hapd->conf->ssid.wpa_psk = psk->next;
8352 for (s = p2p_wpa_s->conf->ssid; s; s = s->next) {
8564 if (wpa_s->conf->wps_nfc_dh_pubkey == NULL &&
8565 wps_nfc_gen_dh(&wpa_s->conf->wps_nfc_dh_pubkey,
8566 &wpa_s->conf->wps_nfc_dh_privkey) < 0) {
8573 wpa_s->parent->wps, wpa_s->conf->wps_nfc_dh_pubkey);
8595 if (!tag && wpa_s->conf->wps_nfc_dh_pubkey == NULL &&
8596 wps_nfc_gen_dh(&wpa_s->conf->wps_nfc_dh_pubkey,
8597 &wpa_s->conf->wps_nfc_dh_privkey) < 0)
8603 tag ? wpa_s->conf->wps_nfc_dev_pw_id :
8605 wpa_s->conf->wps_nfc_dh_pubkey,
8606 tag ? wpa_s->conf->wps_nfc_dev_pw : NULL);
8636 WPS_NFC, 0, 0, 1, 0, wpa_s->conf->p2p_go_intent,
8716 WPS_NFC, 0, 0, 0, 0, wpa_s->conf->p2p_go_intent,
8732 WPS_NFC, 0, 0, 0, 1, wpa_s->conf->p2p_go_intent,
8883 if (wpa_s->conf->wps_nfc_dh_pubkey == NULL &&
8884 wps_nfc_gen_dh(&wpa_s->conf->wps_nfc_dh_pubkey,
8885 &wpa_s->conf->wps_nfc_dh_privkey) < 0)
8959 int go_intent = wpa_s->conf->p2p_go_intent;
8984 if (wpa_s->conf->wps_nfc_dh_pubkey == NULL ||
8985 wpa_s->conf->wps_nfc_dh_privkey == NULL ||
8986 wpa_s->conf->wps_nfc_dev_pw == NULL ||
8987 wpa_s->conf->wps_nfc_dev_pw_id < 0x10) {
8995 wpa_s->p2p_oob_dev_pw_id = wpa_s->conf->wps_nfc_dev_pw_id;
8997 wpa_s->p2p_oob_dev_pw = wpabuf_dup(wpa_s->conf->wps_nfc_dev_pw);
9038 wpabuf_free(hapd->conf->wps_nfc_dh_pubkey);
9039 hapd->conf->wps_nfc_dh_pubkey =
9040 wpabuf_dup(wpa_s->conf->wps_nfc_dh_pubkey);
9041 wpabuf_free(hapd->conf->wps_nfc_dh_privkey);
9042 hapd->conf->wps_nfc_dh_privkey =
9043 wpabuf_dup(wpa_s->conf->wps_nfc_dh_privkey);
9044 wpabuf_free(hapd->conf->wps_nfc_dev_pw);
9045 hapd->conf->wps_nfc_dev_pw =
9046 wpabuf_dup(wpa_s->conf->wps_nfc_dev_pw);
9047 hapd->conf->wps_nfc_dev_pw_id = wpa_s->conf->wps_nfc_dev_pw_id;
9055 wpa_s->global->p2p, wpa_s->conf->wps_nfc_dev_pw_id, go_intent,
9075 if (!wpa_s->conf->p2p_optimize_listen_chan)
9104 struct hostapd_config *conf;
9132 conf = hostapd_config_defaults();
9133 if (!conf) {
9140 if (wpa_supplicant_conf_ap_ht(wpa_s, current_ssid, conf)) {
9147 if (conf->hw_mode != wpa_s->ap_iface->current_mode->mode) {
9158 csa_settings.freq_params.sec_channel_offset = conf->secondary_channel;
9159 csa_settings.freq_params.ht_enabled = conf->ieee80211n;
9160 csa_settings.freq_params.bandwidth = conf->secondary_channel ? 40 : 20;
9162 if (conf->ieee80211ac) {
9167 conf->secondary_channel,
9168 conf->vht_oper_chwidth,
9176 if (conf->vht_oper_centr_freq_seg0_idx)
9179 conf->vht_oper_centr_freq_seg0_idx);
9181 if (conf->vht_oper_centr_freq_seg1_idx)
9184 conf->vht_oper_centr_freq_seg1_idx);
9193 csa_settings.freq_params.vht_enabled = conf->ieee80211ac;
9197 switch (conf->vht_oper_chwidth) {
9211 hostapd_config_free(conf);
9349 } else if (wpa_s->conf->p2p_go_freq_change_policy ==
9352 } else if (wpa_s->conf->p2p_go_freq_change_policy ==
9356 } else if ((wpa_s->conf->p2p_go_freq_change_policy ==
9529 dev_types_len = (wpa_s->conf->num_sec_device_types + 1) *
9534 os_memcpy(device_types, wpa_s->conf->device_type, WPS_DEV_TYPE_LEN);
9535 os_memcpy(&device_types[WPS_DEV_TYPE_LEN], wpa_s->conf->sec_device_type,
9536 wpa_s->conf->num_sec_device_types * WPS_DEV_TYPE_LEN);