Lines Matching defs:conf
74 struct mesh_conf *conf;
77 conf = os_zalloc(sizeof(struct mesh_conf));
78 if (!conf)
81 os_memcpy(conf->meshid, ssid->ssid, ssid->ssid_len);
82 conf->meshid_len = ssid->ssid_len;
85 conf->security |= MESH_CONF_SEC_AUTH |
88 conf->security |= MESH_CONF_SEC_NONE;
90 conf->ieee80211w = ssid->ieee80211w;
91 if (conf->ieee80211w == MGMT_FRAME_PROTECTION_DEFAULT) {
93 conf->ieee80211w = wpa_s->conf->pmf;
95 conf->ieee80211w = NO_MGMT_FRAME_PROTECTION;
99 conf->ocv = ssid->ocv;
105 os_free(conf);
108 conf->pairwise_cipher = cipher;
114 os_free(conf);
118 conf->group_cipher = cipher;
119 if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION)
120 conf->mgmt_group_cipher = WPA_CIPHER_AES_128_CMAC;
123 conf->mesh_pp_id = MESH_PATH_PROTOCOL_HWMP;
124 conf->mesh_pm_id = MESH_PATH_METRIC_AIRTIME;
125 conf->mesh_cc_id = 0;
126 conf->mesh_sp_id = MESH_SYNC_METHOD_NEIGHBOR_OFFSET;
127 conf->mesh_auth_id = (conf->security & MESH_CONF_SEC_AUTH) ? 1 : 0;
128 conf->dot11MeshMaxRetries = ssid->dot11MeshMaxRetries;
129 conf->dot11MeshRetryTimeout = ssid->dot11MeshRetryTimeout;
130 conf->dot11MeshConfirmTimeout = ssid->dot11MeshConfirmTimeout;
131 conf->dot11MeshHoldingTimeout = ssid->dot11MeshHoldingTimeout;
133 return conf;
143 for (num_groups = 0; wpa_s->conf->sae_groups[num_groups] > 0;
147 groups_size = (num_groups + 1) * sizeof(wpa_s->conf->sae_groups[0]);
148 bss->conf->sae_groups = os_malloc(groups_size);
149 if (bss->conf->sae_groups)
150 os_memcpy(bss->conf->sae_groups, wpa_s->conf->sae_groups,
173 bss->conf->wpa = ssid->proto;
174 bss->conf->wpa_key_mgmt = ssid->key_mgmt;
176 if (wpa_s->conf->sae_groups && wpa_s->conf->sae_groups[0] > 0) {
179 bss->conf->sae_groups = os_memdup(default_groups,
181 if (!bss->conf->sae_groups)
186 bss->conf->ssid.wpa_passphrase = dup_binstr(password, len);
224 params->conf.flags |= WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE;
225 params->conf.ht_opmode = ifmsh->bss[0]->iface->ht_op_mode;
249 struct hostapd_config *conf;
255 if (!wpa_s->conf->user_mpm) {
293 conf = hostapd_config_defaults();
294 if (!conf)
297 bss->conf = *conf->bss;
298 bss->conf->start_disabled = 1;
299 bss->conf->mesh = MESH_ENABLED;
300 bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity;
303 wpa_s->hw.num_modes) && wpa_s->conf->country[0]) {
304 conf->ieee80211h = 1;
305 conf->ieee80211d = 1;
306 conf->country[0] = wpa_s->conf->country[0];
307 conf->country[1] = wpa_s->conf->country[1];
308 conf->country[2] = ' ';
311 bss->iconf = conf;
312 ifmsh->conf = conf;
314 ifmsh->bss[0]->max_plinks = wpa_s->conf->max_peer_links;
316 wpa_s->conf->dot11RSNASAERetransPeriod;
317 os_strlcpy(bss->conf->iface, wpa_s->ifname, sizeof(bss->conf->iface));
324 /* need conf->hw_mode for supported rates. */
325 conf->hw_mode = ieee80211_freq_to_chan(frequency, &conf->channel);
326 if (conf->hw_mode == NUM_HOSTAPD_MODES) {
332 conf->secondary_channel = ssid->ht40;
333 if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
335 conf->vht_oper_chwidth = ssid->max_oper_chwidth;
336 switch (conf->vht_oper_chwidth) {
341 &conf->vht_oper_centr_freq_seg0_idx);
342 conf->vht_oper_centr_freq_seg0_idx += ssid->ht40 * 2;
347 &conf->vht_oper_centr_freq_seg0_idx);
348 conf->vht_oper_centr_freq_seg0_idx += ssid->ht40 * 2;
349 conf->vht_oper_centr_freq_seg0_idx += 40 / 5;
353 &conf->vht_oper_centr_freq_seg1_idx);
364 if (conf->hw_mode == HOSTAPD_MODE_IEEE80211G) {
365 conf->basic_rates = os_memdup(basic_rates_erp,
367 if (!conf->basic_rates)
377 conf->basic_rates = os_calloc(rate_len + 1, sizeof(int));
378 if (conf->basic_rates == NULL)
380 os_memcpy(conf->basic_rates, ssid->mesh_basic_rates,
382 conf->basic_rates[rate_len] = -1;
396 wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
488 else if (wpa_s->conf->beacon_int > 0)
489 params->beacon_int = wpa_s->conf->beacon_int;
492 else if (wpa_s->conf->dtim_period > 0)
493 params->dtim_period = wpa_s->conf->dtim_period;
494 params->conf.max_peer_links = wpa_s->conf->max_peer_links;
496 params->conf.rssi_threshold = ssid->mesh_rssi_threshold;
497 params->conf.flags |= WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD;
503 wpa_s->conf->user_mpm = 1;
506 if (wpa_s->conf->user_mpm) {
508 params->conf.auto_plinks = 0;
511 params->conf.auto_plinks = 1;
513 params->conf.peer_link_timeout = wpa_s->conf->mesh_max_inactivity;
687 iface.driver_param = wpa_s->conf->driver_param;
688 iface.ctrl_interface = wpa_s->conf->ctrl_interface;