Lines Matching refs:conf

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