Lines Matching refs:conf
217 struct hostapd_bss_config *conf) in hostapd_config_read_eap_user() argument
226 os_free(conf->eap_user_sqlite); in hostapd_config_read_eap_user()
227 conf->eap_user_sqlite = os_strdup(fname + 7); in hostapd_config_read_eap_user()
520 hostapd_config_free_eap_users(conf->eap_user); in hostapd_config_read_eap_user()
521 conf->eap_user = new_user; in hostapd_config_read_eap_user()
808 static int hostapd_parse_chanlist(struct hostapd_config *conf, char *val) in hostapd_parse_chanlist() argument
819 if (freq_range_list_parse(&conf->acs_ch_list, val)) in hostapd_parse_chanlist()
865 static int hostapd_config_bss(struct hostapd_config *conf, const char *ifname) in hostapd_config_bss() argument
872 all = os_realloc_array(conf->bss, conf->num_bss + 1, in hostapd_config_bss()
879 conf->bss = all; in hostapd_config_bss()
892 conf->bss[conf->num_bss++] = bss; in hostapd_config_bss()
893 conf->last_bss = bss; in hostapd_config_bss()
939 static int hostapd_config_tx_queue(struct hostapd_config *conf, in hostapd_config_tx_queue() argument
967 queue = &conf->tx_queue[num]; in hostapd_config_tx_queue()
1095 static int hostapd_config_ht_capab(struct hostapd_config *conf, in hostapd_config_ht_capab() argument
1099 conf->ht_capab |= HT_CAP_INFO_LDPC_CODING_CAP; in hostapd_config_ht_capab()
1101 conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; in hostapd_config_ht_capab()
1102 conf->secondary_channel = -1; in hostapd_config_ht_capab()
1105 conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; in hostapd_config_ht_capab()
1106 conf->secondary_channel = 1; in hostapd_config_ht_capab()
1109 conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK; in hostapd_config_ht_capab()
1110 conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC; in hostapd_config_ht_capab()
1113 conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK; in hostapd_config_ht_capab()
1114 conf->ht_capab |= HT_CAP_INFO_SMPS_DYNAMIC; in hostapd_config_ht_capab()
1117 conf->ht_capab |= HT_CAP_INFO_GREEN_FIELD; in hostapd_config_ht_capab()
1119 conf->ht_capab |= HT_CAP_INFO_SHORT_GI20MHZ; in hostapd_config_ht_capab()
1121 conf->ht_capab |= HT_CAP_INFO_SHORT_GI40MHZ; in hostapd_config_ht_capab()
1123 conf->ht_capab |= HT_CAP_INFO_TX_STBC; in hostapd_config_ht_capab()
1125 conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK; in hostapd_config_ht_capab()
1126 conf->ht_capab |= HT_CAP_INFO_RX_STBC_1; in hostapd_config_ht_capab()
1129 conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK; in hostapd_config_ht_capab()
1130 conf->ht_capab |= HT_CAP_INFO_RX_STBC_12; in hostapd_config_ht_capab()
1133 conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK; in hostapd_config_ht_capab()
1134 conf->ht_capab |= HT_CAP_INFO_RX_STBC_123; in hostapd_config_ht_capab()
1137 conf->ht_capab |= HT_CAP_INFO_DELAYED_BA; in hostapd_config_ht_capab()
1139 conf->ht_capab |= HT_CAP_INFO_MAX_AMSDU_SIZE; in hostapd_config_ht_capab()
1141 conf->ht_capab |= HT_CAP_INFO_DSSS_CCK40MHZ; in hostapd_config_ht_capab()
1143 conf->ht_capab |= HT_CAP_INFO_40MHZ_INTOLERANT; in hostapd_config_ht_capab()
1145 conf->ht_capab |= HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT; in hostapd_config_ht_capab()
1153 static int hostapd_config_vht_capab(struct hostapd_config *conf, in hostapd_config_vht_capab() argument
1157 conf->vht_capab |= VHT_CAP_MAX_MPDU_LENGTH_7991; in hostapd_config_vht_capab()
1159 conf->vht_capab |= VHT_CAP_MAX_MPDU_LENGTH_11454; in hostapd_config_vht_capab()
1161 conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; in hostapd_config_vht_capab()
1163 conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; in hostapd_config_vht_capab()
1165 conf->vht_capab |= VHT_CAP_RXLDPC; in hostapd_config_vht_capab()
1167 conf->vht_capab |= VHT_CAP_SHORT_GI_80; in hostapd_config_vht_capab()
1169 conf->vht_capab |= VHT_CAP_SHORT_GI_160; in hostapd_config_vht_capab()
1171 conf->vht_capab |= VHT_CAP_TXSTBC; in hostapd_config_vht_capab()
1173 conf->vht_capab |= VHT_CAP_RXSTBC_1; in hostapd_config_vht_capab()
1175 conf->vht_capab |= VHT_CAP_RXSTBC_2; in hostapd_config_vht_capab()
1177 conf->vht_capab |= VHT_CAP_RXSTBC_3; in hostapd_config_vht_capab()
1179 conf->vht_capab |= VHT_CAP_RXSTBC_4; in hostapd_config_vht_capab()
1181 conf->vht_capab |= VHT_CAP_SU_BEAMFORMER_CAPABLE; in hostapd_config_vht_capab()
1183 conf->vht_capab |= VHT_CAP_SU_BEAMFORMEE_CAPABLE; in hostapd_config_vht_capab()
1185 (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) in hostapd_config_vht_capab()
1186 conf->vht_capab |= (1 << VHT_CAP_BEAMFORMEE_STS_OFFSET); in hostapd_config_vht_capab()
1188 (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) in hostapd_config_vht_capab()
1189 conf->vht_capab |= (2 << VHT_CAP_BEAMFORMEE_STS_OFFSET); in hostapd_config_vht_capab()
1191 (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) in hostapd_config_vht_capab()
1192 conf->vht_capab |= (3 << VHT_CAP_BEAMFORMEE_STS_OFFSET); in hostapd_config_vht_capab()
1194 (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) in hostapd_config_vht_capab()
1195 conf->vht_capab |= (1 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); in hostapd_config_vht_capab()
1197 (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) in hostapd_config_vht_capab()
1198 conf->vht_capab |= (2 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); in hostapd_config_vht_capab()
1200 (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) in hostapd_config_vht_capab()
1201 conf->vht_capab |= (3 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); in hostapd_config_vht_capab()
1203 conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; in hostapd_config_vht_capab()
1205 conf->vht_capab |= VHT_CAP_VHT_TXOP_PS; in hostapd_config_vht_capab()
1207 conf->vht_capab |= VHT_CAP_HTC_VHT; in hostapd_config_vht_capab()
1209 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX; in hostapd_config_vht_capab()
1211 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6; in hostapd_config_vht_capab()
1213 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5; in hostapd_config_vht_capab()
1215 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4; in hostapd_config_vht_capab()
1217 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3; in hostapd_config_vht_capab()
1219 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2; in hostapd_config_vht_capab()
1221 conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1; in hostapd_config_vht_capab()
1223 (conf->vht_capab & VHT_CAP_HTC_VHT)) in hostapd_config_vht_capab()
1224 conf->vht_capab |= VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB; in hostapd_config_vht_capab()
1226 (conf->vht_capab & VHT_CAP_HTC_VHT)) in hostapd_config_vht_capab()
1227 conf->vht_capab |= VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB; in hostapd_config_vht_capab()
1229 conf->vht_capab |= VHT_CAP_RX_ANTENNA_PATTERN; in hostapd_config_vht_capab()
1231 conf->vht_capab |= VHT_CAP_TX_ANTENNA_PATTERN; in hostapd_config_vht_capab()
1943 static int hostapd_config_parse_acs_chan_bias(struct hostapd_config *conf, in hostapd_config_parse_acs_chan_bias() argument
1972 os_free(conf->acs_chan_bias); in hostapd_config_parse_acs_chan_bias()
1973 conf->acs_chan_bias = bias; in hostapd_config_parse_acs_chan_bias()
1974 conf->num_acs_chan_bias = num; in hostapd_config_parse_acs_chan_bias()
2032 static int hostapd_config_fill(struct hostapd_config *conf, in hostapd_config_fill() argument
2037 os_strlcpy(conf->bss[0]->iface, pos, in hostapd_config_fill()
2038 sizeof(conf->bss[0]->iface)); in hostapd_config_fill()
2061 conf->driver = driver; in hostapd_config_fill()
2063 os_free(conf->driver_params); in hostapd_config_fill()
2064 conf->driver_params = os_strdup(pos); in hostapd_config_fill()
2140 os_memcpy(conf->country, pos, 2); in hostapd_config_fill()
2142 conf->country[2] = ' '; in hostapd_config_fill()
2144 conf->ieee80211d = atoi(pos); in hostapd_config_fill()
2146 conf->ieee80211h = atoi(pos); in hostapd_config_fill()
2683 conf->hw_mode = HOSTAPD_MODE_IEEE80211A; in hostapd_config_fill()
2685 conf->hw_mode = HOSTAPD_MODE_IEEE80211B; in hostapd_config_fill()
2687 conf->hw_mode = HOSTAPD_MODE_IEEE80211G; in hostapd_config_fill()
2689 conf->hw_mode = HOSTAPD_MODE_IEEE80211AD; in hostapd_config_fill()
2691 conf->hw_mode = HOSTAPD_MODE_IEEE80211ANY; in hostapd_config_fill()
2721 conf->acs = 1; in hostapd_config_fill()
2722 conf->channel = 0; in hostapd_config_fill()
2725 conf->channel = atoi(pos); in hostapd_config_fill()
2726 conf->acs = conf->channel == 0; in hostapd_config_fill()
2729 if (hostapd_parse_chanlist(conf, pos)) { in hostapd_config_fill()
2746 conf->beacon_int = val; in hostapd_config_fill()
2755 conf->acs_num_scans = val; in hostapd_config_fill()
2757 if (hostapd_config_parse_acs_chan_bias(conf, pos)) { in hostapd_config_fill()
2782 conf->rts_threshold = atoi(pos); in hostapd_config_fill()
2783 if (conf->rts_threshold < -1 || conf->rts_threshold > 65535) { in hostapd_config_fill()
2786 line, conf->rts_threshold); in hostapd_config_fill()
2790 conf->fragm_threshold = atoi(pos); in hostapd_config_fill()
2791 if (conf->fragm_threshold == -1) { in hostapd_config_fill()
2793 } else if (conf->fragm_threshold < 256 || in hostapd_config_fill()
2794 conf->fragm_threshold > 2346) { in hostapd_config_fill()
2797 line, conf->fragm_threshold); in hostapd_config_fill()
2807 conf->send_probe_response = val; in hostapd_config_fill()
2809 if (hostapd_parse_intlist(&conf->supported_rates, pos)) { in hostapd_config_fill()
2815 if (hostapd_parse_intlist(&conf->basic_rates, pos)) { in hostapd_config_fill()
2831 conf->rate_type = BEACON_RATE_HT; in hostapd_config_fill()
2832 conf->beacon_rate = val; in hostapd_config_fill()
2841 conf->rate_type = BEACON_RATE_VHT; in hostapd_config_fill()
2842 conf->beacon_rate = val; in hostapd_config_fill()
2851 conf->rate_type = BEACON_RATE_LEGACY; in hostapd_config_fill()
2852 conf->beacon_rate = val; in hostapd_config_fill()
2856 conf->preamble = SHORT_PREAMBLE; in hostapd_config_fill()
2858 conf->preamble = LONG_PREAMBLE; in hostapd_config_fill()
2908 conf->ap_table_max_size = atoi(pos); in hostapd_config_fill()
2910 conf->ap_table_expiration_time = atoi(pos); in hostapd_config_fill()
2912 if (hostapd_config_tx_queue(conf, buf, pos)) { in hostapd_config_fill()
2924 if (hostapd_config_wmm_ac(conf->wmm_ac_params, buf, pos)) { in hostapd_config_fill()
2930 if (hostapd_config_bss(conf, pos)) { in hostapd_config_fill()
2942 conf->use_driver_iface_addr = atoi(pos); in hostapd_config_fill()
2977 conf->ieee80211n = atoi(pos); in hostapd_config_fill()
2979 if (hostapd_config_ht_capab(conf, pos) < 0) { in hostapd_config_fill()
2985 conf->require_ht = atoi(pos); in hostapd_config_fill()
2987 conf->obss_interval = atoi(pos); in hostapd_config_fill()
2991 conf->ieee80211ac = atoi(pos); in hostapd_config_fill()
2993 if (hostapd_config_vht_capab(conf, pos) < 0) { in hostapd_config_fill()
2999 conf->require_vht = atoi(pos); in hostapd_config_fill()
3001 conf->vht_oper_chwidth = atoi(pos); in hostapd_config_fill()
3003 conf->vht_oper_centr_freq_seg0_idx = atoi(pos); in hostapd_config_fill()
3005 conf->vht_oper_centr_freq_seg1_idx = atoi(pos); in hostapd_config_fill()
3013 conf->ieee80211ax = atoi(pos); in hostapd_config_fill()
3015 conf->he_phy_capab.he_su_beamformer = atoi(pos); in hostapd_config_fill()
3017 conf->he_phy_capab.he_su_beamformee = atoi(pos); in hostapd_config_fill()
3019 conf->he_phy_capab.he_mu_beamformer = atoi(pos); in hostapd_config_fill()
3021 conf->he_op.he_bss_color = atoi(pos); in hostapd_config_fill()
3023 conf->he_op.he_default_pe_duration = atoi(pos); in hostapd_config_fill()
3025 conf->he_op.he_twt_required = atoi(pos); in hostapd_config_fill()
3027 conf->he_op.he_rts_threshold = atoi(pos); in hostapd_config_fill()
3454 conf->_val = strtod(pos, &end); \ in hostapd_config_fill()
3455 if (*end || conf->_val < 0.0 || \ in hostapd_config_fill()
3456 conf->_val > 1.0) { \ in hostapd_config_fill()
3468 conf->ecsa_ie_only = atoi(pos); in hostapd_config_fill()
3539 conf->local_pwr_constraint = val; in hostapd_config_fill()
3541 conf->spectrum_mgmt_required = atoi(pos); in hostapd_config_fill()
3549 if (!len || len >= sizeof(conf->fst_cfg.group_id)) { in hostapd_config_fill()
3556 if (conf->fst_cfg.group_id[0]) { in hostapd_config_fill()
3563 os_strlcpy(conf->fst_cfg.group_id, pos, in hostapd_config_fill()
3564 sizeof(conf->fst_cfg.group_id)); in hostapd_config_fill()
3583 conf->fst_cfg.priority = (u8) val; in hostapd_config_fill()
3602 conf->fst_cfg.llt = (u32) val; in hostapd_config_fill()
3605 conf->track_sta_max_num = atoi(pos); in hostapd_config_fill()
3607 conf->track_sta_max_age = atoi(pos); in hostapd_config_fill()
3615 wpabuf_free(conf->lci); in hostapd_config_fill()
3616 conf->lci = wpabuf_parse_bin(pos); in hostapd_config_fill()
3617 if (conf->lci && wpabuf_len(conf->lci) == 0) { in hostapd_config_fill()
3618 wpabuf_free(conf->lci); in hostapd_config_fill()
3619 conf->lci = NULL; in hostapd_config_fill()
3622 wpabuf_free(conf->civic); in hostapd_config_fill()
3623 conf->civic = wpabuf_parse_bin(pos); in hostapd_config_fill()
3624 if (conf->civic && wpabuf_len(conf->civic) == 0) { in hostapd_config_fill()
3625 wpabuf_free(conf->civic); in hostapd_config_fill()
3626 conf->civic = NULL; in hostapd_config_fill()
3641 conf->stationary_ap = atoi(pos); in hostapd_config_fill()
3694 struct hostapd_config *conf; in hostapd_config_read() local
3708 conf = hostapd_config_defaults(); in hostapd_config_read()
3709 if (conf == NULL) { in hostapd_config_read()
3715 conf->driver = wpa_drivers[0]; in hostapd_config_read()
3716 if (conf->driver == NULL) { in hostapd_config_read()
3718 hostapd_config_free(conf); in hostapd_config_read()
3723 conf->last_bss = conf->bss[0]; in hostapd_config_read()
3728 bss = conf->last_bss; in hostapd_config_read()
3753 errors += hostapd_config_fill(conf, bss, buf, pos, line); in hostapd_config_read()
3758 for (i = 0; i < conf->num_bss; i++) in hostapd_config_read()
3759 hostapd_set_security_params(conf->bss[i], 1); in hostapd_config_read()
3761 if (hostapd_config_check(conf, 1)) in hostapd_config_read()
3768 hostapd_config_free(conf); in hostapd_config_read()
3769 conf = NULL; in hostapd_config_read()
3773 return conf; in hostapd_config_read()
3777 int hostapd_set_iface(struct hostapd_config *conf, in hostapd_set_iface() argument
3784 errors = hostapd_config_fill(conf, bss, field, value, 0); in hostapd_set_iface()
3791 for (i = 0; i < conf->num_bss; i++) in hostapd_set_iface()
3792 hostapd_set_security_params(conf->bss[i], 0); in hostapd_set_iface()
3794 if (hostapd_config_check(conf, 0)) { in hostapd_set_iface()