int hostapd_config_check(struct hostapd_config *conf, int full_config) { size_t i; if (full_config && conf->ieee80211d && (!conf->country[0] || !conf->country[1])) { wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11d without " "setting the country_code"); return -1; } if (full_config && conf->ieee80211h && !conf->ieee80211d) { wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11h without " "IEEE 802.11d enabled"); return -1; } if (full_config && conf->local_pwr_constraint != -1 && !conf->ieee80211d) { wpa_printf(MSG_ERROR, "Cannot add Power Constraint element without Country element"); return -1; } if (full_config && conf->spectrum_mgmt_required && conf->local_pwr_constraint == -1) { wpa_printf(MSG_ERROR, "Cannot set Spectrum Management bit without Country and Power Constraint elements"); return -1; } for (i = 0; i < NUM_TX_QUEUES; i++) { if (hostapd_config_check_cw(conf, i)) return -1; } for (i = 0; i < conf->num_bss; i++) { if (hostapd_config_check_bss(conf->bss[i], conf, full_config)) return -1; } return 0; }
int hostapd_config_check(struct hostapd_config *conf, int full_config) { size_t i; if (full_config && conf->ieee80211d && (!conf->country[0] || !conf->country[1])) { wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11d without " "setting the country_code"); return -1; } if (full_config && conf->ieee80211h && !conf->ieee80211d) { wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11h without " "IEEE 802.11d enabled"); return -1; } for (i = 0; i < conf->num_bss; i++) { if (hostapd_config_check_bss(conf->bss[i], conf, full_config)) return -1; } return 0; }