Lines Matching refs:conf
105 struct hostapd_config *conf;
128 conf = os_zalloc(sizeof(*conf));
130 if (conf == NULL || bss == NULL) {
133 os_free(conf);
137 conf->bss = os_calloc(1, sizeof(struct hostapd_bss_config *));
138 if (conf->bss == NULL) {
139 os_free(conf);
143 conf->bss[0] = bss;
147 os_free(conf->bss);
148 os_free(conf);
155 conf->num_bss = 1;
157 conf->beacon_int = 100;
158 conf->rts_threshold = -1; /* use driver default: 2347 */
159 conf->fragm_threshold = -1; /* user driver default: 2346 */
160 conf->send_probe_response = 1;
162 conf->local_pwr_constraint = -1;
164 conf->wmm_ac_params[0] = ac_be;
165 conf->wmm_ac_params[1] = ac_bk;
166 conf->wmm_ac_params[2] = ac_vi;
167 conf->wmm_ac_params[3] = ac_vo;
169 conf->tx_queue[0] = txq_vo;
170 conf->tx_queue[1] = txq_vi;
171 conf->tx_queue[2] = txq_be;
172 conf->tx_queue[3] = txq_bk;
174 conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED;
176 conf->ap_table_max_size = 255;
177 conf->ap_table_expiration_time = 60;
178 conf->track_sta_max_age = 180;
181 conf->ignore_probe_probability = 0.0;
182 conf->ignore_auth_probability = 0.0;
183 conf->ignore_assoc_probability = 0.0;
184 conf->ignore_reassoc_probability = 0.0;
185 conf->corrupt_gtk_rekey_mic_probability = 0.0;
186 conf->ecsa_ie_only = 0;
189 conf->acs = 0;
190 conf->acs_ch_list.num = 0;
192 conf->acs_num_scans = 5;
195 return conf;
315 int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf)
317 struct hostapd_ssid *ssid = &conf->ssid;
334 &conf->ssid))
410 static void hostapd_config_free_anqp_elem(struct hostapd_bss_config *conf)
414 while ((elem = dl_list_first(&conf->anqp_elem, struct anqp_element,
423 void hostapd_config_free_bss(struct hostapd_bss_config *conf)
427 if (conf == NULL)
430 hostapd_config_clear_wpa_psk(&conf->ssid.wpa_psk);
432 str_clear_free(conf->ssid.wpa_passphrase);
433 os_free(conf->ssid.wpa_psk_file);
434 hostapd_config_free_wep(&conf->ssid.wep);
436 os_free(conf->ssid.vlan_tagged_interface);
439 user = conf->eap_user;
445 os_free(conf->eap_user_sqlite);
447 os_free(conf->eap_req_id_text);
448 os_free(conf->erp_domain);
449 os_free(conf->accept_mac);
450 os_free(conf->deny_mac);
451 os_free(conf->nas_identifier);
452 if (conf->radius) {
453 hostapd_config_free_radius(conf->radius->auth_servers,
454 conf->radius->num_auth_servers);
455 hostapd_config_free_radius(conf->radius->acct_servers,
456 conf->radius->num_acct_servers);
458 hostapd_config_free_radius_attr(conf->radius_auth_req_attr);
459 hostapd_config_free_radius_attr(conf->radius_acct_req_attr);
460 os_free(conf->rsn_preauth_interfaces);
461 os_free(conf->ctrl_interface);
462 os_free(conf->ca_cert);
463 os_free(conf->server_cert);
464 os_free(conf->private_key);
465 os_free(conf->private_key_passwd);
466 os_free(conf->ocsp_stapling_response);
467 os_free(conf->ocsp_stapling_response_multi);
468 os_free(conf->dh_file);
469 os_free(conf->openssl_ciphers);
470 os_free(conf->pac_opaque_encr_key);
471 os_free(conf->eap_fast_a_id);
472 os_free(conf->eap_fast_a_id_info);
473 os_free(conf->eap_sim_db);
474 os_free(conf->radius_server_clients);
475 os_free(conf->radius);
476 os_free(conf->radius_das_shared_secret);
477 hostapd_config_free_vlan(conf);
478 os_free(conf->time_zone);
485 r0kh = conf->r0kh_list;
486 conf->r0kh_list = NULL;
493 r1kh = conf->r1kh_list;
494 conf->r1kh_list = NULL;
504 os_free(conf->wps_pin_requests);
505 os_free(conf->device_name);
506 os_free(conf->manufacturer);
507 os_free(conf->model_name);
508 os_free(conf->model_number);
509 os_free(conf->serial_number);
510 os_free(conf->config_methods);
511 os_free(conf->ap_pin);
512 os_free(conf->extra_cred);
513 os_free(conf->ap_settings);
514 os_free(conf->upnp_iface);
515 os_free(conf->friendly_name);
516 os_free(conf->manufacturer_url);
517 os_free(conf->model_description);
518 os_free(conf->model_url);
519 os_free(conf->upc);
524 wpabuf_free(conf->wps_vendor_ext[i]);
526 wpabuf_free(conf->wps_nfc_dh_pubkey);
527 wpabuf_free(conf->wps_nfc_dh_privkey);
528 wpabuf_free(conf->wps_nfc_dev_pw);
531 os_free(conf->roaming_consortium);
532 os_free(conf->venue_name);
533 os_free(conf->nai_realm_data);
534 os_free(conf->network_auth_type);
535 os_free(conf->anqp_3gpp_cell_net);
536 os_free(conf->domain_name);
537 hostapd_config_free_anqp_elem(conf);
540 os_free(conf->dump_msk_file);
544 os_free(conf->hs20_oper_friendly_name);
545 os_free(conf->hs20_wan_metrics);
546 os_free(conf->hs20_connection_capability);
547 os_free(conf->hs20_operating_class);
548 os_free(conf->hs20_icons);
549 if (conf->hs20_osu_providers) {
551 for (i = 0; i < conf->hs20_osu_providers_count; i++) {
554 p = &conf->hs20_osu_providers[i];
564 os_free(conf->hs20_osu_providers);
566 os_free(conf->subscr_remediation_url);
569 wpabuf_free(conf->vendor_elements);
571 os_free(conf->sae_groups);
573 os_free(conf->wowlan_triggers);
575 os_free(conf->server_id);
578 wpabuf_free(conf->own_ie_override);
581 os_free(conf->no_probe_resp_if_seen_on);
582 os_free(conf->no_auth_if_seen_on);
584 os_free(conf);
590 * @conf: Configuration data from hostapd_config_read().
592 void hostapd_config_free(struct hostapd_config *conf)
596 if (conf == NULL)
599 for (i = 0; i < conf->num_bss; i++)
600 hostapd_config_free_bss(conf->bss[i]);
601 os_free(conf->bss);
602 os_free(conf->supported_rates);
603 os_free(conf->basic_rates);
604 os_free(conf->acs_ch_list.range);
605 os_free(conf->driver_params);
607 os_free(conf->acs_chan_bias);
610 os_free(conf);
704 const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,
722 for (psk = conf->ssid.wpa_psk; psk != NULL; psk = psk->next) {
740 struct hostapd_config *conf,
789 for (i = 0; i < conf->num_bss; i++) {
790 if (conf->bss[i] != bss &&
791 (hostapd_mac_comp(conf->bss[i]->bssid,
796 conf->bss[i]->iface, bss->iface);
815 if (full_config && conf->ieee80211n &&
816 conf->hw_mode == HOSTAPD_MODE_IEEE80211B) {
822 if (full_config && conf->ieee80211n &&
829 if (full_config && conf->ieee80211n && bss->wpa &&
890 static int hostapd_config_check_cw(struct hostapd_config *conf, int queue)
892 int tx_cwmin = conf->tx_queue[queue].cwmin;
893 int tx_cwmax = conf->tx_queue[queue].cwmax;
894 int ac_cwmin = conf->wmm_ac_params[queue].cwmin;
895 int ac_cwmax = conf->wmm_ac_params[queue].cwmax;
913 int hostapd_config_check(struct hostapd_config *conf, int full_config)
917 if (full_config && conf->ieee80211d &&
918 (!conf->country[0] || !conf->country[1])) {
924 if (full_config && conf->ieee80211h && !conf->ieee80211d) {
930 if (full_config && conf->local_pwr_constraint != -1 &&
931 !conf->ieee80211d) {
936 if (full_config && conf->spectrum_mgmt_required &&
937 conf->local_pwr_constraint == -1) {
943 if (hostapd_config_check_cw(conf, i))
947 for (i = 0; i < conf->num_bss; i++) {
948 if (hostapd_config_check_bss(conf->bss[i], conf, full_config))