]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
ACS: Fix incorrect call to hostapd_config_check_bss_6g()
authorChristopher Söllinger <christopher.soellinger@gmail.com>
Mon, 23 Jun 2025 19:11:42 +0000 (21:11 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 25 Jun 2025 09:18:05 +0000 (12:18 +0300)
In ap_drv_ops.c, the call to hostapd_config_check_bss_6g() is executed
unconditionally. However, it should only be used when the BSS is
actually configured on a 6 GHz operating class. This leads to false
configuration errors in setups where the 6 GHz BSS has proper settings
but other bands (2.4/5 GHz) share the same config structure.

Add the missing is_6ghz_op_class() condition, mirroring how it's already
used elsewhere in the codebase (e.g., in ap_config.c).

Fix verified on OpenWRT 24.10-SNAPSHOT using Mediatek Wi-Fi 7 hardware.

Fixes: 02a8d40c9ffb ("ACS: Validate 6 GHz AP criteria before ACS")
Signed-off-by: Christopher Söllinger <christopher.soellinger@gmail.com>
src/ap/ap_drv_ops.c

index aeae0af20abc46744559bb8514435411e00ab033..7a5c5a492ec9f989c1f2a2bdde0a77dc942b077a 100644 (file)
@@ -1154,7 +1154,8 @@ void hostapd_get_hw_mode_any_channels(struct hostapd_data *hapd,
 {
        int i;
        bool is_no_ir = false;
-       bool allow_6g_acs = hostapd_config_check_bss_6g(hapd->conf) &&
+       bool allow_6g_acs = is_6ghz_op_class(hapd->iconf->op_class) &&
+               hostapd_config_check_bss_6g(hapd->conf) &&
                (hapd->iface->conf->ieee80211ax ||
                 hapd->iface->conf->ieee80211be);