Lines Matching refs:conf
219 struct hostapd_bss_config *conf)
231 os_free(conf->eap_user_sqlite);
232 conf->eap_user_sqlite = os_strdup(fname + 7);
525 user = conf->eap_user;
533 conf->eap_user = new_user;
789 static int hostapd_parse_chanlist(struct hostapd_config *conf, char *val)
793 /* for backwards compatibility, translate ' ' in conf str to ',' */
800 if (freq_range_list_parse(&conf->acs_ch_list, val))
846 static int hostapd_config_bss(struct hostapd_config *conf, const char *ifname)
853 all = os_realloc_array(conf->bss, conf->num_bss + 1,
860 conf->bss = all;
873 conf->bss[conf->num_bss++] = bss;
874 conf->last_bss = bss;
920 static int hostapd_config_tx_queue(struct hostapd_config *conf,
948 queue = &conf->tx_queue[num];
1076 static int hostapd_config_ht_capab(struct hostapd_config *conf,
1080 conf->ht_capab |= HT_CAP_INFO_LDPC_CODING_CAP;
1082 conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
1083 conf->secondary_channel = -1;
1086 conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
1087 conf->secondary_channel = 1;
1090 conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
1091 conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC;
1094 conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
1095 conf->ht_capab |= HT_CAP_INFO_SMPS_DYNAMIC;
1098 conf->ht_capab |= HT_CAP_INFO_GREEN_FIELD;
1100 conf->ht_capab |= HT_CAP_INFO_SHORT_GI20MHZ;
1102 conf->ht_capab |= HT_CAP_INFO_SHORT_GI40MHZ;
1104 conf->ht_capab |= HT_CAP_INFO_TX_STBC;
1106 conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
1107 conf->ht_capab |= HT_CAP_INFO_RX_STBC_1;
1110 conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
1111 conf->ht_capab |= HT_CAP_INFO_RX_STBC_12;
1114 conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
1115 conf->ht_capab |= HT_CAP_INFO_RX_STBC_123;
1118 conf->ht_capab |= HT_CAP_INFO_DELAYED_BA;
1120 conf->ht_capab |= HT_CAP_INFO_MAX_AMSDU_SIZE;
1122 conf->ht_capab |= HT_CAP_INFO_DSSS_CCK40MHZ;
1124 conf->ht_capab |= HT_CAP_INFO_40MHZ_INTOLERANT;
1126 conf->ht_capab |= HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT;
1134 static int hostapd_config_vht_capab(struct hostapd_config *conf,
1138 conf->vht_capab |= VHT_CAP_MAX_MPDU_LENGTH_7991;
1140 conf->vht_capab |= VHT_CAP_MAX_MPDU_LENGTH_11454;
1142 conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
1144 conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
1146 conf->vht_capab |= VHT_CAP_RXLDPC;
1148 conf->vht_capab |= VHT_CAP_SHORT_GI_80;
1150 conf->vht_capab |= VHT_CAP_SHORT_GI_160;
1152 conf->vht_capab |= VHT_CAP_TXSTBC;
1154 conf->vht_capab |= VHT_CAP_RXSTBC_1;
1156 conf->vht_capab |= VHT_CAP_RXSTBC_2;
1158 conf->vht_capab |= VHT_CAP_RXSTBC_3;
1160 conf->vht_capab |= VHT_CAP_RXSTBC_4;
1162 conf->vht_capab |= VHT_CAP_SU_BEAMFORMER_CAPABLE;
1164 conf->vht_capab |= VHT_CAP_SU_BEAMFORMEE_CAPABLE;
1166 (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE))
1167 conf->vht_capab |= (1 << VHT_CAP_BEAMFORMEE_STS_OFFSET);
1169 (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE))
1170 conf->vht_capab |= (2 << VHT_CAP_BEAMFORMEE_STS_OFFSET);
1172 (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE))
1173 conf->vht_capab |= (3 << VHT_CAP_BEAMFORMEE_STS_OFFSET);
1175 (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE))
1176 conf->vht_capab |= (1 << VHT_CAP_SOUNDING_DIMENSION_OFFSET);
1178 (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE))
1179 conf->vht_capab |= (2 << VHT_CAP_SOUNDING_DIMENSION_OFFSET);
1181 (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE))
1182 conf->vht_capab |= (3 << VHT_CAP_SOUNDING_DIMENSION_OFFSET);
1184 conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE;
1186 conf->vht_capab |= VHT_CAP_VHT_TXOP_PS;
1188 conf->vht_capab |= VHT_CAP_HTC_VHT;
1190 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX;
1192 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6;
1194 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5;
1196 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4;
1198 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3;
1200 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2;
1202 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1;
1204 (conf->vht_capab & VHT_CAP_HTC_VHT))
1205 conf->vht_capab |= VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB;
1207 (conf->vht_capab & VHT_CAP_HTC_VHT))
1208 conf->vht_capab |= VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB;
1210 conf->vht_capab |= VHT_CAP_RX_ANTENNA_PATTERN;
1212 conf->vht_capab |= VHT_CAP_TX_ANTENNA_PATTERN;
1949 static int hostapd_config_parse_acs_chan_bias(struct hostapd_config *conf,
1978 os_free(conf->acs_chan_bias);
1979 conf->acs_chan_bias = bias;
1980 conf->num_acs_chan_bias = num;
1990 static int hostapd_config_fill(struct hostapd_config *conf,
1995 os_strlcpy(conf->bss[0]->iface, pos,
1996 sizeof(conf->bss[0]->iface));
2006 conf->driver = NULL;
2009 conf->driver = wpa_drivers[j];
2013 if (conf->driver == NULL) {
2020 os_free(conf->driver_params);
2021 conf->driver_params = os_strdup(pos);
2094 os_memcpy(conf->country, pos, 2);
2096 conf->country[2] = ' ';
2098 conf->ieee80211d = atoi(pos);
2100 conf->ieee80211h = atoi(pos);
2607 conf->hw_mode = HOSTAPD_MODE_IEEE80211A;
2609 conf->hw_mode = HOSTAPD_MODE_IEEE80211B;
2611 conf->hw_mode = HOSTAPD_MODE_IEEE80211G;
2613 conf->hw_mode = HOSTAPD_MODE_IEEE80211AD;
2615 conf->hw_mode = HOSTAPD_MODE_IEEE80211ANY;
2645 conf->acs = 1;
2646 conf->channel = 0;
2649 conf->channel = atoi(pos);
2650 conf->acs = conf->channel == 0;
2653 if (hostapd_parse_chanlist(conf, pos)) {
2670 conf->beacon_int = val;
2679 conf->acs_num_scans = val;
2681 if (hostapd_config_parse_acs_chan_bias(conf, pos)) {
2704 conf->rts_threshold = atoi(pos);
2705 if (conf->rts_threshold < -1 || conf->rts_threshold > 65535) {
2708 line, conf->rts_threshold);
2712 conf->fragm_threshold = atoi(pos);
2713 if (conf->fragm_threshold == -1) {
2715 } else if (conf->fragm_threshold < 256 ||
2716 conf->fragm_threshold > 2346) {
2719 line, conf->fragm_threshold);
2729 conf->send_probe_response = val;
2731 if (hostapd_parse_intlist(&conf->supported_rates, pos)) {
2737 if (hostapd_parse_intlist(&conf->basic_rates, pos)) {
2744 conf->preamble = SHORT_PREAMBLE;
2746 conf->preamble = LONG_PREAMBLE;
2796 conf->ap_table_max_size = atoi(pos);
2798 conf->ap_table_expiration_time = atoi(pos);
2800 if (hostapd_config_tx_queue(conf, buf, pos)) {
2812 if (hostapd_config_wmm_ac(conf->wmm_ac_params, buf, pos)) {
2818 if (hostapd_config_bss(conf, pos)) {
2830 conf->use_driver_iface_addr = atoi(pos);
2865 conf->ieee80211n = atoi(pos);
2867 if (hostapd_config_ht_capab(conf, pos) < 0) {
2873 conf->require_ht = atoi(pos);
2875 conf->obss_interval = atoi(pos);
2879 conf->ieee80211ac = atoi(pos);
2881 if (hostapd_config_vht_capab(conf, pos) < 0) {
2887 conf->require_vht = atoi(pos);
2889 conf->vht_oper_chwidth = atoi(pos);
2891 conf->vht_oper_centr_freq_seg0_idx = atoi(pos);
2893 conf->vht_oper_centr_freq_seg1_idx = atoi(pos);
3314 conf->_val = strtod(pos, &end); \
3315 if (*end || conf->_val < 0.0 || \
3316 conf->_val > 1.0) { \
3328 conf->ecsa_ie_only = atoi(pos);
3415 conf->local_pwr_constraint = val;
3417 conf->spectrum_mgmt_required = atoi(pos);
3425 if (!len || len >= sizeof(conf->fst_cfg.group_id)) {
3432 if (conf->fst_cfg.group_id[0]) {
3439 os_strlcpy(conf->fst_cfg.group_id, pos,
3440 sizeof(conf->fst_cfg.group_id));
3459 conf->fst_cfg.priority = (u8) val;
3478 conf->fst_cfg.llt = (u32) val;
3481 conf->track_sta_max_num = atoi(pos);
3483 conf->track_sta_max_age = atoi(pos);
3508 struct hostapd_config *conf;
3522 conf = hostapd_config_defaults();
3523 if (conf == NULL) {
3529 conf->driver = wpa_drivers[0];
3530 if (conf->driver == NULL) {
3532 hostapd_config_free(conf);
3537 conf->last_bss = conf->bss[0];
3542 bss = conf->last_bss;
3567 errors += hostapd_config_fill(conf, bss, buf, pos, line);
3572 for (i = 0; i < conf->num_bss; i++)
3573 hostapd_set_security_params(conf->bss[i], 1);
3575 if (hostapd_config_check(conf, 1))
3582 hostapd_config_free(conf);
3583 conf = NULL;
3587 return conf;
3591 int hostapd_set_iface(struct hostapd_config *conf,
3598 errors = hostapd_config_fill(conf, bss, field, value, 0);
3605 for (i = 0; i < conf->num_bss; i++)
3606 hostapd_set_security_params(conf->bss[i], 0);
3608 if (hostapd_config_check(conf, 0)) {