Lines Matching refs:conf
65 (hapd->conf->wps_independent || in wps_for_each()
66 data->calling_hapd->conf->wps_independent)) in wps_for_each()
101 struct hostapd_ssid *ssid = &hapd->conf->ssid; in hostapd_wps_new_psk_cb()
191 if (hapd->conf->wps_pin_requests) { in hostapd_wps_pin_needed_cb()
194 f = fopen(hapd->conf->wps_pin_requests, "a"); in hostapd_wps_pin_needed_cb()
322 struct hostapd_bss_config *bss = hapd->conf; in hapd_wps_reconfig_in_memory()
428 if ((hapd->conf->wps_cred_processing == 1 || in hapd_wps_cred_cb()
429 hapd->conf->wps_cred_processing == 2) && cred->cred_attr) { in hapd_wps_cred_cb()
431 } else if (hapd->conf->wps_cred_processing == 1 || in hapd_wps_cred_cb()
432 hapd->conf->wps_cred_processing == 2) { in hapd_wps_cred_cb()
442 if (hapd->conf->wps_cred_processing == 1) in hapd_wps_cred_cb()
633 if (hapd->conf->ap_setup_locked) in hostapd_wps_reenable_ap_pin()
649 if (!data->enrollee || hapd->conf->ap_pin == NULL || hapd->wps == NULL) in wps_pwd_auth_fail()
670 if (!hapd->conf->ap_setup_locked && in wps_pwd_auth_fail()
678 } else if (!hapd->conf->ap_setup_locked) { in wps_pwd_auth_fail()
712 if (hapd->conf->ap_pin == NULL || hapd->wps == NULL) in wps_ap_pin_success()
887 if (hapd->wps && !hapd->conf->wps_independent && in get_uuid_cb()
940 if (hapd->conf->wps_vendor_ext[i] == NULL) in hostapd_wps_set_vendor_ext()
944 wpabuf_dup(hapd->conf->wps_vendor_ext[i]); in hostapd_wps_set_vendor_ext()
972 struct hostapd_bss_config *conf) in hostapd_init_wps() argument
977 if (conf->wps_state == 0) { in hostapd_init_wps()
992 wps->wps_state = hapd->conf->wps_state; in hostapd_init_wps()
993 wps->ap_setup_locked = hapd->conf->ap_setup_locked; in hostapd_init_wps()
994 if (is_nil_uuid(hapd->conf->uuid)) { in hostapd_init_wps()
997 if (uuid && !conf->wps_independent) { in hostapd_init_wps()
1007 os_memcpy(wps->uuid, hapd->conf->uuid, UUID_LEN); in hostapd_init_wps()
1011 wps->ssid_len = hapd->conf->ssid.ssid_len; in hostapd_init_wps()
1012 os_memcpy(wps->ssid, hapd->conf->ssid.ssid, wps->ssid_len); in hostapd_init_wps()
1015 wps->dev.device_name = hapd->conf->device_name ? in hostapd_init_wps()
1016 os_strdup(hapd->conf->device_name) : NULL; in hostapd_init_wps()
1017 wps->dev.manufacturer = hapd->conf->manufacturer ? in hostapd_init_wps()
1018 os_strdup(hapd->conf->manufacturer) : NULL; in hostapd_init_wps()
1019 wps->dev.model_name = hapd->conf->model_name ? in hostapd_init_wps()
1020 os_strdup(hapd->conf->model_name) : NULL; in hostapd_init_wps()
1021 wps->dev.model_number = hapd->conf->model_number ? in hostapd_init_wps()
1022 os_strdup(hapd->conf->model_number) : NULL; in hostapd_init_wps()
1023 wps->dev.serial_number = hapd->conf->serial_number ? in hostapd_init_wps()
1024 os_strdup(hapd->conf->serial_number) : NULL; in hostapd_init_wps()
1026 wps_config_methods_str2bin(hapd->conf->config_methods); in hostapd_init_wps()
1041 os_memcpy(wps->dev.pri_dev_type, hapd->conf->device_type, in hostapd_init_wps()
1047 wps->dev.os_version = WPA_GET_BE32(hapd->conf->os_version); in hostapd_init_wps()
1049 if (conf->wps_rf_bands) { in hostapd_init_wps()
1050 wps->dev.rf_bands = conf->wps_rf_bands; in hostapd_init_wps()
1059 if (conf->wpa & WPA_PROTO_RSN) { in hostapd_init_wps()
1060 if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) in hostapd_init_wps()
1062 if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) in hostapd_init_wps()
1065 if (conf->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP)) in hostapd_init_wps()
1067 if (conf->rsn_pairwise & WPA_CIPHER_TKIP) in hostapd_init_wps()
1071 if (conf->wpa & WPA_PROTO_WPA) { in hostapd_init_wps()
1072 if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) in hostapd_init_wps()
1074 if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) in hostapd_init_wps()
1077 if (conf->wpa_pairwise & WPA_CIPHER_CCMP) in hostapd_init_wps()
1079 if (conf->wpa_pairwise & WPA_CIPHER_TKIP) in hostapd_init_wps()
1083 if (conf->ssid.security_policy == SECURITY_PLAINTEXT) { in hostapd_init_wps()
1088 if (conf->ssid.wpa_psk_file) { in hostapd_init_wps()
1090 } else if (conf->ssid.wpa_passphrase) { in hostapd_init_wps()
1091 wps->network_key = (u8 *) os_strdup(conf->ssid.wpa_passphrase); in hostapd_init_wps()
1092 wps->network_key_len = os_strlen(conf->ssid.wpa_passphrase); in hostapd_init_wps()
1093 } else if (conf->ssid.wpa_psk) { in hostapd_init_wps()
1098 conf->ssid.wpa_psk->psk, PMK_LEN); in hostapd_init_wps()
1100 } else if (conf->ssid.wep.keys_set && conf->ssid.wep.key[0]) { in hostapd_init_wps()
1101 wps->network_key = os_malloc(conf->ssid.wep.len[0]); in hostapd_init_wps()
1104 os_memcpy(wps->network_key, conf->ssid.wep.key[0], in hostapd_init_wps()
1105 conf->ssid.wep.len[0]); in hostapd_init_wps()
1106 wps->network_key_len = conf->ssid.wep.len[0]; in hostapd_init_wps()
1109 if (conf->ssid.wpa_psk) { in hostapd_init_wps()
1110 os_memcpy(wps->psk, conf->ssid.wpa_psk->psk, PMK_LEN); in hostapd_init_wps()
1116 if (conf->wps_state == WPS_STATE_NOT_CONFIGURED) { in hostapd_init_wps()
1122 wps->ap_settings = conf->ap_settings; in hostapd_init_wps()
1123 wps->ap_settings_len = conf->ap_settings_len; in hostapd_init_wps()
1131 cfg.skip_cred_build = conf->skip_cred_build; in hostapd_init_wps()
1132 cfg.extra_cred = conf->extra_cred; in hostapd_init_wps()
1133 cfg.extra_cred_len = conf->extra_cred_len; in hostapd_init_wps()
1134 cfg.disable_auto_conf = (hapd->conf->wps_cred_processing == 1) && in hostapd_init_wps()
1135 conf->skip_cred_build; in hostapd_init_wps()
1136 if (conf->ssid.security_policy == SECURITY_STATIC_WEP) in hostapd_init_wps()
1144 cfg.force_per_enrollee_psk = conf->force_per_enrollee_psk; in hostapd_init_wps()
1153 wps->friendly_name = hapd->conf->friendly_name; in hostapd_init_wps()
1154 wps->manufacturer_url = hapd->conf->manufacturer_url; in hostapd_init_wps()
1155 wps->model_description = hapd->conf->model_description; in hostapd_init_wps()
1156 wps->model_url = hapd->conf->model_url; in hostapd_init_wps()
1157 wps->upc = hapd->conf->upc; in hostapd_init_wps()
1234 hapd->wps->friendly_name = hapd->conf->friendly_name; in hostapd_update_wps()
1235 hapd->wps->manufacturer_url = hapd->conf->manufacturer_url; in hostapd_update_wps()
1236 hapd->wps->model_description = hapd->conf->model_description; in hostapd_update_wps()
1237 hapd->wps->model_url = hapd->conf->model_url; in hostapd_update_wps()
1238 hapd->wps->upc = hapd->conf->upc; in hostapd_update_wps()
1243 if (hapd->conf->wps_state) in hostapd_update_wps()
1356 (elems.ssid_len != hapd->conf->ssid.ssid_len || in hostapd_wps_probe_req_rx()
1357 os_memcmp(elems.ssid, hapd->conf->ssid.ssid, elems.ssid_len) != in hostapd_wps_probe_req_rx()
1471 if (!hapd->conf->upnp_iface) in hostapd_wps_upnp_init()
1478 if (hapd->conf->ap_pin) in hostapd_wps_upnp_init()
1479 ctx->ap_pin = os_strdup(hapd->conf->ap_pin); in hostapd_wps_upnp_init()
1482 hapd->conf->upnp_iface); in hostapd_wps_upnp_init()
1522 hapd->conf->ap_setup_locked = 0; in hostapd_wps_ap_pin_enable()
1537 os_free(hapd->conf->ap_pin); in wps_ap_pin_disable()
1538 hapd->conf->ap_pin = NULL; in wps_ap_pin_disable()
1563 os_free(hapd->conf->ap_pin); in wps_ap_pin_set()
1564 hapd->conf->ap_pin = os_strdup(data->pin_txt); in wps_ap_pin_set()
1582 return hapd->conf->ap_pin; in hostapd_wps_ap_pin_random()
1588 return hapd->conf->ap_pin; in hostapd_wps_ap_pin_get()
1782 if (hapd->conf->wps_nfc_dh_pubkey == NULL) { in hostapd_wps_nfc_hs_cr()
1784 if (wps_nfc_gen_dh(&hapd->conf->wps_nfc_dh_pubkey, in hostapd_wps_nfc_hs_cr()
1785 &hapd->conf->wps_nfc_dh_privkey) < 0) in hostapd_wps_nfc_hs_cr()
1790 wpabuf_dup(hapd->conf->wps_nfc_dh_pubkey); in hostapd_wps_nfc_hs_cr()
1792 wpabuf_dup(hapd->conf->wps_nfc_dh_privkey); in hostapd_wps_nfc_hs_cr()
1800 hapd->conf->wps_nfc_dh_pubkey, in hostapd_wps_nfc_hs_cr()
1912 if (hapd->conf->wps_nfc_pw_from_config) { in hostapd_wps_nfc_token_gen()
1914 hapd->conf->wps_nfc_dev_pw_id, in hostapd_wps_nfc_token_gen()
1915 hapd->conf->wps_nfc_dh_pubkey, in hostapd_wps_nfc_token_gen()
1916 hapd->conf->wps_nfc_dev_pw); in hostapd_wps_nfc_token_gen()
1919 return wps_nfc_token_gen(ndef, &hapd->conf->wps_nfc_dev_pw_id, in hostapd_wps_nfc_token_gen()
1920 &hapd->conf->wps_nfc_dh_pubkey, in hostapd_wps_nfc_token_gen()
1921 &hapd->conf->wps_nfc_dh_privkey, in hostapd_wps_nfc_token_gen()
1922 &hapd->conf->wps_nfc_dev_pw); in hostapd_wps_nfc_token_gen()
1934 if (!hapd->conf->wps_nfc_dh_pubkey || in hostapd_wps_nfc_token_enable()
1935 !hapd->conf->wps_nfc_dh_privkey || in hostapd_wps_nfc_token_enable()
1936 !hapd->conf->wps_nfc_dev_pw || in hostapd_wps_nfc_token_enable()
1937 !hapd->conf->wps_nfc_dev_pw_id) in hostapd_wps_nfc_token_enable()
1943 hapd->conf->wps_nfc_dev_pw_id, hapd->conf->iface, wps); in hostapd_wps_nfc_token_enable()
1944 wps->ap_nfc_dev_pw_id = hapd->conf->wps_nfc_dev_pw_id; in hostapd_wps_nfc_token_enable()
1945 wps->ap_nfc_dh_pubkey = wpabuf_dup(hapd->conf->wps_nfc_dh_pubkey); in hostapd_wps_nfc_token_enable()
1946 wps->ap_nfc_dh_privkey = wpabuf_dup(hapd->conf->wps_nfc_dh_privkey); in hostapd_wps_nfc_token_enable()
1947 pw = hapd->conf->wps_nfc_dev_pw; in hostapd_wps_nfc_token_enable()
1971 hapd->conf->iface); in hostapd_wps_nfc_token_disable()