Lines Matching refs:conf

102 	struct hostapd_config *conf;  in hostapd_config_defaults()  local
125 conf = os_zalloc(sizeof(*conf)); in hostapd_config_defaults()
127 if (conf == NULL || bss == NULL) { in hostapd_config_defaults()
130 os_free(conf); in hostapd_config_defaults()
134 conf->bss = os_calloc(1, sizeof(struct hostapd_bss_config *)); in hostapd_config_defaults()
135 if (conf->bss == NULL) { in hostapd_config_defaults()
136 os_free(conf); in hostapd_config_defaults()
140 conf->bss[0] = bss; in hostapd_config_defaults()
144 os_free(conf->bss); in hostapd_config_defaults()
145 os_free(conf); in hostapd_config_defaults()
152 conf->num_bss = 1; in hostapd_config_defaults()
154 conf->beacon_int = 100; in hostapd_config_defaults()
155 conf->rts_threshold = -1; /* use driver default: 2347 */ in hostapd_config_defaults()
156 conf->fragm_threshold = -1; /* user driver default: 2346 */ in hostapd_config_defaults()
157 conf->send_probe_response = 1; in hostapd_config_defaults()
159 conf->local_pwr_constraint = -1; in hostapd_config_defaults()
161 conf->wmm_ac_params[0] = ac_be; in hostapd_config_defaults()
162 conf->wmm_ac_params[1] = ac_bk; in hostapd_config_defaults()
163 conf->wmm_ac_params[2] = ac_vi; in hostapd_config_defaults()
164 conf->wmm_ac_params[3] = ac_vo; in hostapd_config_defaults()
166 conf->tx_queue[0] = txq_vo; in hostapd_config_defaults()
167 conf->tx_queue[1] = txq_vi; in hostapd_config_defaults()
168 conf->tx_queue[2] = txq_be; in hostapd_config_defaults()
169 conf->tx_queue[3] = txq_bk; in hostapd_config_defaults()
171 conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED; in hostapd_config_defaults()
173 conf->ap_table_max_size = 255; in hostapd_config_defaults()
174 conf->ap_table_expiration_time = 60; in hostapd_config_defaults()
177 conf->ignore_probe_probability = 0.0; in hostapd_config_defaults()
178 conf->ignore_auth_probability = 0.0; in hostapd_config_defaults()
179 conf->ignore_assoc_probability = 0.0; in hostapd_config_defaults()
180 conf->ignore_reassoc_probability = 0.0; in hostapd_config_defaults()
181 conf->corrupt_gtk_rekey_mic_probability = 0.0; in hostapd_config_defaults()
184 conf->acs = 0; in hostapd_config_defaults()
185 conf->acs_ch_list.num = 0; in hostapd_config_defaults()
187 conf->acs_num_scans = 5; in hostapd_config_defaults()
190 return conf; in hostapd_config_defaults()
317 int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf) in hostapd_setup_wpa_psk() argument
319 struct hostapd_ssid *ssid = &conf->ssid; in hostapd_setup_wpa_psk()
336 &conf->ssid)) in hostapd_setup_wpa_psk()
412 void hostapd_config_free_bss(struct hostapd_bss_config *conf) in hostapd_config_free_bss() argument
416 if (conf == NULL) in hostapd_config_free_bss()
419 hostapd_config_clear_wpa_psk(&conf->ssid.wpa_psk); in hostapd_config_free_bss()
421 str_clear_free(conf->ssid.wpa_passphrase); in hostapd_config_free_bss()
422 os_free(conf->ssid.wpa_psk_file); in hostapd_config_free_bss()
423 hostapd_config_free_wep(&conf->ssid.wep); in hostapd_config_free_bss()
425 os_free(conf->ssid.vlan_tagged_interface); in hostapd_config_free_bss()
428 user = conf->eap_user; in hostapd_config_free_bss()
434 os_free(conf->eap_user_sqlite); in hostapd_config_free_bss()
436 os_free(conf->eap_req_id_text); in hostapd_config_free_bss()
437 os_free(conf->erp_domain); in hostapd_config_free_bss()
438 os_free(conf->accept_mac); in hostapd_config_free_bss()
439 os_free(conf->deny_mac); in hostapd_config_free_bss()
440 os_free(conf->nas_identifier); in hostapd_config_free_bss()
441 if (conf->radius) { in hostapd_config_free_bss()
442 hostapd_config_free_radius(conf->radius->auth_servers, in hostapd_config_free_bss()
443 conf->radius->num_auth_servers); in hostapd_config_free_bss()
444 hostapd_config_free_radius(conf->radius->acct_servers, in hostapd_config_free_bss()
445 conf->radius->num_acct_servers); in hostapd_config_free_bss()
447 hostapd_config_free_radius_attr(conf->radius_auth_req_attr); in hostapd_config_free_bss()
448 hostapd_config_free_radius_attr(conf->radius_acct_req_attr); in hostapd_config_free_bss()
449 os_free(conf->rsn_preauth_interfaces); in hostapd_config_free_bss()
450 os_free(conf->ctrl_interface); in hostapd_config_free_bss()
451 os_free(conf->ca_cert); in hostapd_config_free_bss()
452 os_free(conf->server_cert); in hostapd_config_free_bss()
453 os_free(conf->private_key); in hostapd_config_free_bss()
454 os_free(conf->private_key_passwd); in hostapd_config_free_bss()
455 os_free(conf->ocsp_stapling_response); in hostapd_config_free_bss()
456 os_free(conf->dh_file); in hostapd_config_free_bss()
457 os_free(conf->openssl_ciphers); in hostapd_config_free_bss()
458 os_free(conf->pac_opaque_encr_key); in hostapd_config_free_bss()
459 os_free(conf->eap_fast_a_id); in hostapd_config_free_bss()
460 os_free(conf->eap_fast_a_id_info); in hostapd_config_free_bss()
461 os_free(conf->eap_sim_db); in hostapd_config_free_bss()
462 os_free(conf->radius_server_clients); in hostapd_config_free_bss()
463 os_free(conf->radius); in hostapd_config_free_bss()
464 os_free(conf->radius_das_shared_secret); in hostapd_config_free_bss()
465 hostapd_config_free_vlan(conf); in hostapd_config_free_bss()
466 os_free(conf->time_zone); in hostapd_config_free_bss()
473 r0kh = conf->r0kh_list; in hostapd_config_free_bss()
474 conf->r0kh_list = NULL; in hostapd_config_free_bss()
481 r1kh = conf->r1kh_list; in hostapd_config_free_bss()
482 conf->r1kh_list = NULL; in hostapd_config_free_bss()
492 os_free(conf->wps_pin_requests); in hostapd_config_free_bss()
493 os_free(conf->device_name); in hostapd_config_free_bss()
494 os_free(conf->manufacturer); in hostapd_config_free_bss()
495 os_free(conf->model_name); in hostapd_config_free_bss()
496 os_free(conf->model_number); in hostapd_config_free_bss()
497 os_free(conf->serial_number); in hostapd_config_free_bss()
498 os_free(conf->config_methods); in hostapd_config_free_bss()
499 os_free(conf->ap_pin); in hostapd_config_free_bss()
500 os_free(conf->extra_cred); in hostapd_config_free_bss()
501 os_free(conf->ap_settings); in hostapd_config_free_bss()
502 os_free(conf->upnp_iface); in hostapd_config_free_bss()
503 os_free(conf->friendly_name); in hostapd_config_free_bss()
504 os_free(conf->manufacturer_url); in hostapd_config_free_bss()
505 os_free(conf->model_description); in hostapd_config_free_bss()
506 os_free(conf->model_url); in hostapd_config_free_bss()
507 os_free(conf->upc); in hostapd_config_free_bss()
512 wpabuf_free(conf->wps_vendor_ext[i]); in hostapd_config_free_bss()
514 wpabuf_free(conf->wps_nfc_dh_pubkey); in hostapd_config_free_bss()
515 wpabuf_free(conf->wps_nfc_dh_privkey); in hostapd_config_free_bss()
516 wpabuf_free(conf->wps_nfc_dev_pw); in hostapd_config_free_bss()
519 os_free(conf->roaming_consortium); in hostapd_config_free_bss()
520 os_free(conf->venue_name); in hostapd_config_free_bss()
521 os_free(conf->nai_realm_data); in hostapd_config_free_bss()
522 os_free(conf->network_auth_type); in hostapd_config_free_bss()
523 os_free(conf->anqp_3gpp_cell_net); in hostapd_config_free_bss()
524 os_free(conf->domain_name); in hostapd_config_free_bss()
527 os_free(conf->dump_msk_file); in hostapd_config_free_bss()
531 os_free(conf->hs20_oper_friendly_name); in hostapd_config_free_bss()
532 os_free(conf->hs20_wan_metrics); in hostapd_config_free_bss()
533 os_free(conf->hs20_connection_capability); in hostapd_config_free_bss()
534 os_free(conf->hs20_operating_class); in hostapd_config_free_bss()
535 os_free(conf->hs20_icons); in hostapd_config_free_bss()
536 if (conf->hs20_osu_providers) { in hostapd_config_free_bss()
538 for (i = 0; i < conf->hs20_osu_providers_count; i++) { in hostapd_config_free_bss()
541 p = &conf->hs20_osu_providers[i]; in hostapd_config_free_bss()
551 os_free(conf->hs20_osu_providers); in hostapd_config_free_bss()
553 os_free(conf->subscr_remediation_url); in hostapd_config_free_bss()
556 wpabuf_free(conf->vendor_elements); in hostapd_config_free_bss()
558 os_free(conf->sae_groups); in hostapd_config_free_bss()
560 os_free(conf->wowlan_triggers); in hostapd_config_free_bss()
562 os_free(conf->server_id); in hostapd_config_free_bss()
564 os_free(conf); in hostapd_config_free_bss()
572 void hostapd_config_free(struct hostapd_config *conf) in hostapd_config_free() argument
576 if (conf == NULL) in hostapd_config_free()
579 for (i = 0; i < conf->num_bss; i++) in hostapd_config_free()
580 hostapd_config_free_bss(conf->bss[i]); in hostapd_config_free()
581 os_free(conf->bss); in hostapd_config_free()
582 os_free(conf->supported_rates); in hostapd_config_free()
583 os_free(conf->basic_rates); in hostapd_config_free()
584 os_free(conf->acs_ch_list.range); in hostapd_config_free()
585 os_free(conf->driver_params); in hostapd_config_free()
587 os_free(conf->acs_chan_bias); in hostapd_config_free()
590 os_free(conf); in hostapd_config_free()
669 const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf, in hostapd_get_psk() argument
687 for (psk = conf->ssid.wpa_psk; psk != NULL; psk = psk->next) { in hostapd_get_psk()
705 struct hostapd_config *conf, in hostapd_config_check_bss() argument
754 for (i = 0; i < conf->num_bss; i++) { in hostapd_config_check_bss()
755 if (conf->bss[i] != bss && in hostapd_config_check_bss()
756 (hostapd_mac_comp(conf->bss[i]->bssid, in hostapd_config_check_bss()
761 conf->bss[i]->iface, bss->iface); in hostapd_config_check_bss()
780 if (full_config && conf->ieee80211n && in hostapd_config_check_bss()
781 conf->hw_mode == HOSTAPD_MODE_IEEE80211B) { in hostapd_config_check_bss()
787 if (full_config && conf->ieee80211n && in hostapd_config_check_bss()
794 if (full_config && conf->ieee80211n && bss->wpa && in hostapd_config_check_bss()
846 static int hostapd_config_check_cw(struct hostapd_config *conf, int queue) in hostapd_config_check_cw() argument
848 int tx_cwmin = conf->tx_queue[queue].cwmin; in hostapd_config_check_cw()
849 int tx_cwmax = conf->tx_queue[queue].cwmax; in hostapd_config_check_cw()
850 int ac_cwmin = conf->wmm_ac_params[queue].cwmin; in hostapd_config_check_cw()
851 int ac_cwmax = conf->wmm_ac_params[queue].cwmax; in hostapd_config_check_cw()
869 int hostapd_config_check(struct hostapd_config *conf, int full_config) in hostapd_config_check() argument
873 if (full_config && conf->ieee80211d && in hostapd_config_check()
874 (!conf->country[0] || !conf->country[1])) { in hostapd_config_check()
880 if (full_config && conf->ieee80211h && !conf->ieee80211d) { in hostapd_config_check()
886 if (full_config && conf->local_pwr_constraint != -1 && in hostapd_config_check()
887 !conf->ieee80211d) { in hostapd_config_check()
892 if (full_config && conf->spectrum_mgmt_required && in hostapd_config_check()
893 conf->local_pwr_constraint == -1) { in hostapd_config_check()
899 if (hostapd_config_check_cw(conf, i)) in hostapd_config_check()
903 for (i = 0; i < conf->num_bss; i++) { in hostapd_config_check()
904 if (hostapd_config_check_bss(conf->bss[i], conf, full_config)) in hostapd_config_check()