• Home
  • Raw
  • Download

Lines Matching refs:conf

117 	struct hostapd_config *conf;  in hostapd_config_defaults()  local
140 conf = os_zalloc(sizeof(*conf)); in hostapd_config_defaults()
142 if (conf == NULL || bss == NULL) { in hostapd_config_defaults()
145 os_free(conf); in hostapd_config_defaults()
149 conf->bss = os_calloc(1, sizeof(struct hostapd_bss_config *)); in hostapd_config_defaults()
150 if (conf->bss == NULL) { in hostapd_config_defaults()
151 os_free(conf); in hostapd_config_defaults()
155 conf->bss[0] = bss; in hostapd_config_defaults()
159 os_free(conf->bss); in hostapd_config_defaults()
160 os_free(conf); in hostapd_config_defaults()
167 conf->num_bss = 1; in hostapd_config_defaults()
169 conf->beacon_int = 100; in hostapd_config_defaults()
170 conf->rts_threshold = -1; /* use driver default: 2347 */ in hostapd_config_defaults()
171 conf->fragm_threshold = -1; /* user driver default: 2346 */ in hostapd_config_defaults()
172 conf->send_probe_response = 1; in hostapd_config_defaults()
174 conf->local_pwr_constraint = -1; in hostapd_config_defaults()
176 conf->wmm_ac_params[0] = ac_be; in hostapd_config_defaults()
177 conf->wmm_ac_params[1] = ac_bk; in hostapd_config_defaults()
178 conf->wmm_ac_params[2] = ac_vi; in hostapd_config_defaults()
179 conf->wmm_ac_params[3] = ac_vo; in hostapd_config_defaults()
181 conf->tx_queue[0] = txq_vo; in hostapd_config_defaults()
182 conf->tx_queue[1] = txq_vi; in hostapd_config_defaults()
183 conf->tx_queue[2] = txq_be; in hostapd_config_defaults()
184 conf->tx_queue[3] = txq_bk; in hostapd_config_defaults()
186 conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED; in hostapd_config_defaults()
188 conf->ap_table_max_size = 255; in hostapd_config_defaults()
189 conf->ap_table_expiration_time = 60; in hostapd_config_defaults()
190 conf->track_sta_max_age = 180; in hostapd_config_defaults()
193 conf->ignore_probe_probability = 0.0; in hostapd_config_defaults()
194 conf->ignore_auth_probability = 0.0; in hostapd_config_defaults()
195 conf->ignore_assoc_probability = 0.0; in hostapd_config_defaults()
196 conf->ignore_reassoc_probability = 0.0; in hostapd_config_defaults()
197 conf->corrupt_gtk_rekey_mic_probability = 0.0; in hostapd_config_defaults()
198 conf->ecsa_ie_only = 0; in hostapd_config_defaults()
201 conf->acs = 0; in hostapd_config_defaults()
202 conf->acs_ch_list.num = 0; in hostapd_config_defaults()
204 conf->acs_num_scans = 5; in hostapd_config_defaults()
207 return conf; in hostapd_config_defaults()
327 int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf) in hostapd_setup_wpa_psk() argument
329 struct hostapd_ssid *ssid = &conf->ssid; in hostapd_setup_wpa_psk()
344 return hostapd_config_read_wpa_psk(ssid->wpa_psk_file, &conf->ssid); in hostapd_setup_wpa_psk()
428 static void hostapd_config_free_anqp_elem(struct hostapd_bss_config *conf) in hostapd_config_free_anqp_elem() argument
432 while ((elem = dl_list_first(&conf->anqp_elem, struct anqp_element, in hostapd_config_free_anqp_elem()
441 static void hostapd_config_free_fils_realms(struct hostapd_bss_config *conf) in hostapd_config_free_fils_realms() argument
446 while ((realm = dl_list_first(&conf->fils_realms, struct fils_realm, in hostapd_config_free_fils_realms()
455 void hostapd_config_free_bss(struct hostapd_bss_config *conf) in hostapd_config_free_bss() argument
457 if (conf == NULL) in hostapd_config_free_bss()
460 hostapd_config_clear_wpa_psk(&conf->ssid.wpa_psk); in hostapd_config_free_bss()
462 str_clear_free(conf->ssid.wpa_passphrase); in hostapd_config_free_bss()
463 os_free(conf->ssid.wpa_psk_file); in hostapd_config_free_bss()
464 hostapd_config_free_wep(&conf->ssid.wep); in hostapd_config_free_bss()
466 os_free(conf->ssid.vlan_tagged_interface); in hostapd_config_free_bss()
469 hostapd_config_free_eap_users(conf->eap_user); in hostapd_config_free_bss()
470 os_free(conf->eap_user_sqlite); in hostapd_config_free_bss()
472 os_free(conf->eap_req_id_text); in hostapd_config_free_bss()
473 os_free(conf->erp_domain); in hostapd_config_free_bss()
474 os_free(conf->accept_mac); in hostapd_config_free_bss()
475 os_free(conf->deny_mac); in hostapd_config_free_bss()
476 os_free(conf->nas_identifier); in hostapd_config_free_bss()
477 if (conf->radius) { in hostapd_config_free_bss()
478 hostapd_config_free_radius(conf->radius->auth_servers, in hostapd_config_free_bss()
479 conf->radius->num_auth_servers); in hostapd_config_free_bss()
480 hostapd_config_free_radius(conf->radius->acct_servers, in hostapd_config_free_bss()
481 conf->radius->num_acct_servers); in hostapd_config_free_bss()
483 hostapd_config_free_radius_attr(conf->radius_auth_req_attr); in hostapd_config_free_bss()
484 hostapd_config_free_radius_attr(conf->radius_acct_req_attr); in hostapd_config_free_bss()
485 os_free(conf->rsn_preauth_interfaces); in hostapd_config_free_bss()
486 os_free(conf->ctrl_interface); in hostapd_config_free_bss()
487 os_free(conf->ca_cert); in hostapd_config_free_bss()
488 os_free(conf->server_cert); in hostapd_config_free_bss()
489 os_free(conf->private_key); in hostapd_config_free_bss()
490 os_free(conf->private_key_passwd); in hostapd_config_free_bss()
491 os_free(conf->ocsp_stapling_response); in hostapd_config_free_bss()
492 os_free(conf->ocsp_stapling_response_multi); in hostapd_config_free_bss()
493 os_free(conf->dh_file); in hostapd_config_free_bss()
494 os_free(conf->openssl_ciphers); in hostapd_config_free_bss()
495 os_free(conf->pac_opaque_encr_key); in hostapd_config_free_bss()
496 os_free(conf->eap_fast_a_id); in hostapd_config_free_bss()
497 os_free(conf->eap_fast_a_id_info); in hostapd_config_free_bss()
498 os_free(conf->eap_sim_db); in hostapd_config_free_bss()
499 os_free(conf->radius_server_clients); in hostapd_config_free_bss()
500 os_free(conf->radius); in hostapd_config_free_bss()
501 os_free(conf->radius_das_shared_secret); in hostapd_config_free_bss()
502 hostapd_config_free_vlan(conf); in hostapd_config_free_bss()
503 os_free(conf->time_zone); in hostapd_config_free_bss()
510 r0kh = conf->r0kh_list; in hostapd_config_free_bss()
511 conf->r0kh_list = NULL; in hostapd_config_free_bss()
518 r1kh = conf->r1kh_list; in hostapd_config_free_bss()
519 conf->r1kh_list = NULL; in hostapd_config_free_bss()
529 os_free(conf->wps_pin_requests); in hostapd_config_free_bss()
530 os_free(conf->device_name); in hostapd_config_free_bss()
531 os_free(conf->manufacturer); in hostapd_config_free_bss()
532 os_free(conf->model_name); in hostapd_config_free_bss()
533 os_free(conf->model_number); in hostapd_config_free_bss()
534 os_free(conf->serial_number); in hostapd_config_free_bss()
535 os_free(conf->config_methods); in hostapd_config_free_bss()
536 os_free(conf->ap_pin); in hostapd_config_free_bss()
537 os_free(conf->extra_cred); in hostapd_config_free_bss()
538 os_free(conf->ap_settings); in hostapd_config_free_bss()
539 os_free(conf->upnp_iface); in hostapd_config_free_bss()
540 os_free(conf->friendly_name); in hostapd_config_free_bss()
541 os_free(conf->manufacturer_url); in hostapd_config_free_bss()
542 os_free(conf->model_description); in hostapd_config_free_bss()
543 os_free(conf->model_url); in hostapd_config_free_bss()
544 os_free(conf->upc); in hostapd_config_free_bss()
549 wpabuf_free(conf->wps_vendor_ext[i]); in hostapd_config_free_bss()
551 wpabuf_free(conf->wps_nfc_dh_pubkey); in hostapd_config_free_bss()
552 wpabuf_free(conf->wps_nfc_dh_privkey); in hostapd_config_free_bss()
553 wpabuf_free(conf->wps_nfc_dev_pw); in hostapd_config_free_bss()
556 os_free(conf->roaming_consortium); in hostapd_config_free_bss()
557 os_free(conf->venue_name); in hostapd_config_free_bss()
558 os_free(conf->nai_realm_data); in hostapd_config_free_bss()
559 os_free(conf->network_auth_type); in hostapd_config_free_bss()
560 os_free(conf->anqp_3gpp_cell_net); in hostapd_config_free_bss()
561 os_free(conf->domain_name); in hostapd_config_free_bss()
562 hostapd_config_free_anqp_elem(conf); in hostapd_config_free_bss()
565 os_free(conf->dump_msk_file); in hostapd_config_free_bss()
569 os_free(conf->hs20_oper_friendly_name); in hostapd_config_free_bss()
570 os_free(conf->hs20_wan_metrics); in hostapd_config_free_bss()
571 os_free(conf->hs20_connection_capability); in hostapd_config_free_bss()
572 os_free(conf->hs20_operating_class); in hostapd_config_free_bss()
573 os_free(conf->hs20_icons); in hostapd_config_free_bss()
574 if (conf->hs20_osu_providers) { in hostapd_config_free_bss()
576 for (i = 0; i < conf->hs20_osu_providers_count; i++) { in hostapd_config_free_bss()
579 p = &conf->hs20_osu_providers[i]; in hostapd_config_free_bss()
589 os_free(conf->hs20_osu_providers); in hostapd_config_free_bss()
591 os_free(conf->subscr_remediation_url); in hostapd_config_free_bss()
594 wpabuf_free(conf->vendor_elements); in hostapd_config_free_bss()
595 wpabuf_free(conf->assocresp_elements); in hostapd_config_free_bss()
597 os_free(conf->sae_groups); in hostapd_config_free_bss()
599 os_free(conf->wowlan_triggers); in hostapd_config_free_bss()
601 os_free(conf->server_id); in hostapd_config_free_bss()
604 wpabuf_free(conf->own_ie_override); in hostapd_config_free_bss()
607 os_free(conf->no_probe_resp_if_seen_on); in hostapd_config_free_bss()
608 os_free(conf->no_auth_if_seen_on); in hostapd_config_free_bss()
610 hostapd_config_free_fils_realms(conf); in hostapd_config_free_bss()
612 os_free(conf); in hostapd_config_free_bss()
620 void hostapd_config_free(struct hostapd_config *conf) in hostapd_config_free() argument
624 if (conf == NULL) in hostapd_config_free()
627 for (i = 0; i < conf->num_bss; i++) in hostapd_config_free()
628 hostapd_config_free_bss(conf->bss[i]); in hostapd_config_free()
629 os_free(conf->bss); in hostapd_config_free()
630 os_free(conf->supported_rates); in hostapd_config_free()
631 os_free(conf->basic_rates); in hostapd_config_free()
632 os_free(conf->acs_ch_list.range); in hostapd_config_free()
633 os_free(conf->driver_params); in hostapd_config_free()
635 os_free(conf->acs_chan_bias); in hostapd_config_free()
637 wpabuf_free(conf->lci); in hostapd_config_free()
638 wpabuf_free(conf->civic); in hostapd_config_free()
640 os_free(conf); in hostapd_config_free()
734 const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf, in hostapd_get_psk() argument
752 for (psk = conf->ssid.wpa_psk; psk != NULL; psk = psk->next) { in hostapd_get_psk()
770 struct hostapd_config *conf, in hostapd_config_check_bss() argument
819 for (i = 0; i < conf->num_bss; i++) { in hostapd_config_check_bss()
820 if (conf->bss[i] != bss && in hostapd_config_check_bss()
821 (hostapd_mac_comp(conf->bss[i]->bssid, in hostapd_config_check_bss()
826 conf->bss[i]->iface, bss->iface); in hostapd_config_check_bss()
845 if (full_config && conf->ieee80211n && in hostapd_config_check_bss()
846 conf->hw_mode == HOSTAPD_MODE_IEEE80211B) { in hostapd_config_check_bss()
852 if (full_config && conf->ieee80211n && in hostapd_config_check_bss()
859 if (full_config && conf->ieee80211n && bss->wpa && in hostapd_config_check_bss()
872 if (full_config && conf->ieee80211ac && in hostapd_config_check_bss()
879 if (full_config && conf->ieee80211ac && bss->wpa && in hostapd_config_check_bss()
939 static int hostapd_config_check_cw(struct hostapd_config *conf, int queue) in hostapd_config_check_cw() argument
941 int tx_cwmin = conf->tx_queue[queue].cwmin; in hostapd_config_check_cw()
942 int tx_cwmax = conf->tx_queue[queue].cwmax; in hostapd_config_check_cw()
943 int ac_cwmin = conf->wmm_ac_params[queue].cwmin; in hostapd_config_check_cw()
944 int ac_cwmax = conf->wmm_ac_params[queue].cwmax; in hostapd_config_check_cw()
962 int hostapd_config_check(struct hostapd_config *conf, int full_config) in hostapd_config_check() argument
966 if (full_config && conf->ieee80211d && in hostapd_config_check()
967 (!conf->country[0] || !conf->country[1])) { in hostapd_config_check()
973 if (full_config && conf->ieee80211h && !conf->ieee80211d) { in hostapd_config_check()
979 if (full_config && conf->local_pwr_constraint != -1 && in hostapd_config_check()
980 !conf->ieee80211d) { in hostapd_config_check()
985 if (full_config && conf->spectrum_mgmt_required && in hostapd_config_check()
986 conf->local_pwr_constraint == -1) { in hostapd_config_check()
992 if (hostapd_config_check_cw(conf, i)) in hostapd_config_check()
996 for (i = 0; i < conf->num_bss; i++) { in hostapd_config_check()
997 if (hostapd_config_check_bss(conf->bss[i], conf, full_config)) in hostapd_config_check()