From: Christopher Söllinger Date: Mon, 23 Jun 2025 19:11:42 +0000 (+0200) Subject: ACS: Fix incorrect call to hostapd_config_check_bss_6g() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b60826a66885bffa2fd709ed5e48cd5fe241b6b;p=thirdparty%2Fhostap.git ACS: Fix incorrect call to hostapd_config_check_bss_6g() 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 --- diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index aeae0af20..7a5c5a492 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -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);