diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 93d19e0ba..7849be181 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -349,6 +349,22 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface) } } +#ifdef CONFIG_IEEE80211AX + if (iface->conf->secondary_channel && + iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G && + iface->conf->ieee80211ax) { + struct he_capabilities *he_cap; + + he_cap = &iface->current_mode->he_capab[IEEE80211_MODE_AP]; + if (!(he_cap->phy_cap[HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] & + HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_IN_2G)) { + wpa_printf(MSG_DEBUG, + "HE: 40 MHz channel width is not supported in 2.4 GHz; clear secondary channel configuration"); + iface->conf->secondary_channel = 0; + } + } +#endif /* CONFIG_IEEE80211AX */ + if (iface->conf->secondary_channel) res = ieee80211n_allowed_ht40_channel_pair(iface); if (!res) {