Ensure that the 6 GHz AP criteria (RSN parameters) are met before
selecting the ACS candidate channels. Currently, hostapd includes 6 GHz
channels as ACS candidates. However, if the BSS configuration does not
comply with 6 GHz AP criteria, ACS might inadvertently start an 6 GHz AP
with configuration that does not meet RSN configuration requirements for
the 6 GHz band.
Add a validation step to check 6 GHz AP criteria before ACS candidates
channel selection.
Signed-off-by: Tianfeng Ren <quic_tianfeng@quicinc.com>
#endif /* CONFIG_SAE_PK */
-static bool hostapd_config_check_bss_6g(struct hostapd_bss_config *bss)
+bool hostapd_config_check_bss_6g(struct hostapd_bss_config *bss)
{
if (bss->wpa != WPA_PROTO_RSN) {
wpa_printf(MSG_ERROR,
int vlan_id, const u8 *addr);
void hostapd_remove_acl_mac(struct mac_acl_entry **acl, int *num,
const u8 *addr);
+bool hostapd_config_check_bss_6g(struct hostapd_bss_config *bss);
#endif /* HOSTAPD_CONFIG_H */
{
int i;
bool is_no_ir = false;
+ bool allow_6g_acs = hostapd_config_check_bss_6g(hapd->conf) &&
+ (hapd->iface->conf->ieee80211ax ||
+ hapd->iface->conf->ieee80211be);
for (i = 0; i < mode->num_channels; i++) {
struct hostapd_channel_data *chan = &mode->channels[i];
if (is_6ghz_freq(chan->freq) &&
((hapd->iface->conf->acs_exclude_6ghz_non_psc &&
!is_6ghz_psc_frequency(chan->freq)) ||
- (!hapd->iface->conf->ieee80211ax &&
- !hapd->iface->conf->ieee80211be)))
+ !allow_6g_acs))
continue;
if ((!(chan->flag & HOSTAPD_CHAN_DISABLED) || allow_disabled) &&
!(hapd->iface->conf->acs_exclude_dfs &&