Lines Matching refs:conf

49 			     struct hostapd_config *conf,  in wpas_conf_ap_vht()  argument
54 u8 channel = conf->channel; in wpas_conf_ap_vht()
56 if (!conf->secondary_channel) in wpas_conf_ap_vht()
64 conf->vht_oper_chwidth = 1; in wpas_conf_ap_vht()
65 conf->vht_oper_centr_freq_seg0_idx = center_chan; in wpas_conf_ap_vht()
69 conf->vht_oper_centr_freq_seg0_idx = in wpas_conf_ap_vht()
70 channel + conf->secondary_channel * 2; in wpas_conf_ap_vht()
72 conf->vht_oper_centr_freq_seg0_idx = in wpas_conf_ap_vht()
73 conf->channel + conf->secondary_channel * 2; in wpas_conf_ap_vht()
81 struct hostapd_config *conf) in wpa_supplicant_conf_ap_ht() argument
97 if (wpa_s->hw.modes[i].mode == conf->hw_mode) { in wpa_supplicant_conf_ap_ht()
105 conf->ieee80211n = 0; in wpa_supplicant_conf_ap_ht()
106 conf->ht_capab = 0; in wpa_supplicant_conf_ap_ht()
112 conf->ieee80211n = 1; in wpa_supplicant_conf_ap_ht()
114 if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && in wpa_supplicant_conf_ap_ht()
118 conf->secondary_channel = in wpa_supplicant_conf_ap_ht()
120 conf->channel); in wpa_supplicant_conf_ap_ht()
121 if (conf->secondary_channel) in wpa_supplicant_conf_ap_ht()
122 conf->ht_capab |= in wpa_supplicant_conf_ap_ht()
131 conf->ht_capab |= mode->ht_capab & in wpa_supplicant_conf_ap_ht()
140 conf->ieee80211ac = 1; in wpa_supplicant_conf_ap_ht()
141 wpas_conf_ap_vht(wpa_s, conf, mode); in wpa_supplicant_conf_ap_ht()
151 struct hostapd_config *conf) in wpa_supplicant_conf_ap() argument
153 struct hostapd_bss_config *bss = conf->bss[0]; in wpa_supplicant_conf_ap()
155 conf->driver = wpa_s->driver; in wpa_supplicant_conf_ap()
159 conf->hw_mode = ieee80211_freq_to_chan(ssid->frequency, in wpa_supplicant_conf_ap()
160 &conf->channel); in wpa_supplicant_conf_ap()
161 if (conf->hw_mode == NUM_HOSTAPD_MODES) { in wpa_supplicant_conf_ap()
167 wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf); in wpa_supplicant_conf_ap()
169 if (ieee80211_is_dfs(ssid->frequency) && wpa_s->conf->country[0]) { in wpa_supplicant_conf_ap()
170 conf->ieee80211h = 1; in wpa_supplicant_conf_ap()
171 conf->ieee80211d = 1; in wpa_supplicant_conf_ap()
172 conf->country[0] = wpa_s->conf->country[0]; in wpa_supplicant_conf_ap()
173 conf->country[1] = wpa_s->conf->country[1]; in wpa_supplicant_conf_ap()
177 if (conf->hw_mode == HOSTAPD_MODE_IEEE80211G && in wpa_supplicant_conf_ap()
188 conf->basic_rates = list; in wpa_supplicant_conf_ap()
202 conf->supported_rates = list; in wpa_supplicant_conf_ap()
205 bss->isolate = !wpa_s->conf->p2p_intra_bss; in wpa_supplicant_conf_ap()
209 os_memcpy(bss->ip_addr_go, wpa_s->parent->conf->ip_addr_go, 4); in wpa_supplicant_conf_ap()
210 os_memcpy(bss->ip_addr_mask, wpa_s->parent->conf->ip_addr_mask, in wpa_supplicant_conf_ap()
213 wpa_s->parent->conf->ip_addr_start, 4); in wpa_supplicant_conf_ap()
214 os_memcpy(bss->ip_addr_end, wpa_s->parent->conf->ip_addr_end, in wpa_supplicant_conf_ap()
268 else if (wpa_s->conf->dtim_period) in wpa_supplicant_conf_ap()
269 bss->dtim_period = wpa_s->conf->dtim_period; in wpa_supplicant_conf_ap()
272 conf->beacon_int = ssid->beacon_int; in wpa_supplicant_conf_ap()
273 else if (wpa_s->conf->beacon_int) in wpa_supplicant_conf_ap()
274 conf->beacon_int = wpa_s->conf->beacon_int; in wpa_supplicant_conf_ap()
277 if (wpa_s->conf->p2p_go_ctwindow > conf->beacon_int) { in wpa_supplicant_conf_ap()
280 wpa_s->conf->p2p_go_ctwindow, conf->beacon_int); in wpa_supplicant_conf_ap()
281 conf->p2p_go_ctwindow = 0; in wpa_supplicant_conf_ap()
283 conf->p2p_go_ctwindow = wpa_s->conf->p2p_go_ctwindow; in wpa_supplicant_conf_ap()
358 if (wpa_s->conf->config_methods) in wpa_supplicant_conf_ap()
359 bss->config_methods = os_strdup(wpa_s->conf->config_methods); in wpa_supplicant_conf_ap()
360 os_memcpy(bss->device_type, wpa_s->conf->device_type, in wpa_supplicant_conf_ap()
362 if (wpa_s->conf->device_name) { in wpa_supplicant_conf_ap()
363 bss->device_name = os_strdup(wpa_s->conf->device_name); in wpa_supplicant_conf_ap()
364 bss->friendly_name = os_strdup(wpa_s->conf->device_name); in wpa_supplicant_conf_ap()
366 if (wpa_s->conf->manufacturer) in wpa_supplicant_conf_ap()
367 bss->manufacturer = os_strdup(wpa_s->conf->manufacturer); in wpa_supplicant_conf_ap()
368 if (wpa_s->conf->model_name) in wpa_supplicant_conf_ap()
369 bss->model_name = os_strdup(wpa_s->conf->model_name); in wpa_supplicant_conf_ap()
370 if (wpa_s->conf->model_number) in wpa_supplicant_conf_ap()
371 bss->model_number = os_strdup(wpa_s->conf->model_number); in wpa_supplicant_conf_ap()
372 if (wpa_s->conf->serial_number) in wpa_supplicant_conf_ap()
373 bss->serial_number = os_strdup(wpa_s->conf->serial_number); in wpa_supplicant_conf_ap()
374 if (is_nil_uuid(wpa_s->conf->uuid)) in wpa_supplicant_conf_ap()
377 os_memcpy(bss->uuid, wpa_s->conf->uuid, WPS_UUID_LEN); in wpa_supplicant_conf_ap()
378 os_memcpy(bss->os_version, wpa_s->conf->os_version, 4); in wpa_supplicant_conf_ap()
379 bss->pbc_in_m1 = wpa_s->conf->pbc_in_m1; in wpa_supplicant_conf_ap()
384 wpa_s->max_stations < wpa_s->conf->max_num_sta) in wpa_supplicant_conf_ap()
387 bss->max_num_sta = wpa_s->conf->max_num_sta; in wpa_supplicant_conf_ap()
389 bss->disassoc_low_ack = wpa_s->conf->disassoc_low_ack; in wpa_supplicant_conf_ap()
391 if (wpa_s->conf->ap_vendor_elements) { in wpa_supplicant_conf_ap()
393 wpabuf_dup(wpa_s->conf->ap_vendor_elements); in wpa_supplicant_conf_ap()
523 struct hostapd_config *conf; in wpa_supplicant_create_ap() local
601 wpa_s->ap_iface->conf = conf = hostapd_config_defaults(); in wpa_supplicant_create_ap()
602 if (conf == NULL) { in wpa_supplicant_create_ap()
607 os_memcpy(wpa_s->ap_iface->conf->wmm_ac_params, in wpa_supplicant_create_ap()
608 wpa_s->conf->wmm_ac_params, in wpa_supplicant_create_ap()
609 sizeof(wpa_s->conf->wmm_ac_params)); in wpa_supplicant_create_ap()
612 conf->bss[0]->wmm_enabled = 1; in wpa_supplicant_create_ap()
613 conf->bss[0]->wmm_uapsd = 1; in wpa_supplicant_create_ap()
616 if (wpa_supplicant_conf_ap(wpa_s, ssid, conf)) { in wpa_supplicant_create_ap()
624 conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER; in wpa_supplicant_create_ap()
626 conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER | in wpa_supplicant_create_ap()
630 hapd_iface->num_bss = conf->num_bss; in wpa_supplicant_create_ap()
631 hapd_iface->bss = os_calloc(conf->num_bss, in wpa_supplicant_create_ap()
638 for (i = 0; i < conf->num_bss; i++) { in wpa_supplicant_create_ap()
640 hostapd_alloc_bss_data(hapd_iface, conf, in wpa_supplicant_create_ap()
641 conf->bss[i]); in wpa_supplicant_create_ap()
895 os_free(hapd->conf->ap_pin); in wpas_wps_ap_pin_disable()
896 hapd->conf->ap_pin = NULL; in wpas_wps_ap_pin_disable()
912 os_free(hapd->conf->ap_pin); in wpas_wps_ap_pin_random()
913 hapd->conf->ap_pin = os_strdup(pin_txt); in wpas_wps_ap_pin_random()
914 if (hapd->conf->ap_pin == NULL) in wpas_wps_ap_pin_random()
918 return hapd->conf->ap_pin; in wpas_wps_ap_pin_random()
928 return hapd->conf->ap_pin; in wpas_wps_ap_pin_get()
945 os_free(hapd->conf->ap_pin); in wpas_wps_ap_pin_set()
946 hapd->conf->ap_pin = os_strdup(pin_txt); in wpas_wps_ap_pin_set()
947 if (hapd->conf->ap_pin == NULL) in wpas_wps_ap_pin_set()
975 os_free(hapd->conf->ap_pin); in wpa_supplicant_ap_pwd_auth_fail()
976 hapd->conf->ap_pin = NULL; in wpa_supplicant_ap_pwd_auth_fail()
1095 struct hostapd_bss_config *conf; in ap_ctrl_iface_wpa_get_status() local
1100 conf = wpa_s->ap_iface->bss[0]->conf; in ap_ctrl_iface_wpa_get_status()
1101 if (conf->wpa == 0) in ap_ctrl_iface_wpa_get_status()
1108 wpa_cipher_txt(conf->rsn_pairwise), in ap_ctrl_iface_wpa_get_status()
1109 wpa_cipher_txt(conf->wpa_group), in ap_ctrl_iface_wpa_get_status()
1110 wpa_key_mgmt_txt(conf->wpa_key_mgmt, in ap_ctrl_iface_wpa_get_status()
1111 conf->wpa)); in ap_ctrl_iface_wpa_get_status()
1134 iface->conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER; in wpa_supplicant_ap_update_beacon()
1136 iface->conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER | in wpa_supplicant_ap_update_beacon()
1193 struct hostapd_bss_config *conf; in wpa_supplicant_ap_mac_addr_filter() local
1205 conf = hapd->conf; in wpa_supplicant_ap_mac_addr_filter()
1207 os_free(conf->accept_mac); in wpa_supplicant_ap_mac_addr_filter()
1208 conf->accept_mac = NULL; in wpa_supplicant_ap_mac_addr_filter()
1209 conf->num_accept_mac = 0; in wpa_supplicant_ap_mac_addr_filter()
1210 os_free(conf->deny_mac); in wpa_supplicant_ap_mac_addr_filter()
1211 conf->deny_mac = NULL; in wpa_supplicant_ap_mac_addr_filter()
1212 conf->num_deny_mac = 0; in wpa_supplicant_ap_mac_addr_filter()
1215 conf->macaddr_acl = ACCEPT_UNLESS_DENIED; in wpa_supplicant_ap_mac_addr_filter()
1219 conf->macaddr_acl = DENY_UNLESS_ACCEPTED; in wpa_supplicant_ap_mac_addr_filter()
1220 conf->accept_mac = os_zalloc(sizeof(struct mac_acl_entry)); in wpa_supplicant_ap_mac_addr_filter()
1221 if (conf->accept_mac == NULL) in wpa_supplicant_ap_mac_addr_filter()
1223 os_memcpy(conf->accept_mac[0].addr, addr, ETH_ALEN); in wpa_supplicant_ap_mac_addr_filter()
1224 conf->num_accept_mac = 1; in wpa_supplicant_ap_mac_addr_filter()
1242 if (wpa_s->parent->conf->wps_nfc_dh_pubkey == NULL || in wpas_ap_wps_add_nfc_pw()
1243 wpa_s->parent->conf->wps_nfc_dh_privkey == NULL) { in wpas_ap_wps_add_nfc_pw()
1252 wpa_s->parent->conf->wps_nfc_dh_privkey); in wpas_ap_wps_add_nfc_pw()
1254 wpa_s->parent->conf->wps_nfc_dh_pubkey); in wpas_ap_wps_add_nfc_pw()