From dea98597c8e7de6e6a5efbf8330b93f4aacc2b83 Mon Sep 17 00:00:00 2001 From: Muna Sinada Date: Wed, 28 May 2025 21:13:05 +0530 Subject: [PATCH] Do not add Channel Switch Wrapper element without VHT/HE/EHT Only include the Channel Switch Wrapper element in Beacon and Probe Response frames when at least one of the PHY modes IEEE 802.11ac, IEEE 802.11ax, or IEEE 802.11be is enabled and not explicitly disabled in the configuration. This avoids unnecessary inclusion of the Channel Switch Wrapper element when none of these modes are active, ensuring better compliance with the capabilities advertised by the AP. Signed-off-by: Aloka Dixit Signed-off-by: Muna Sinada Signed-off-by: Maharaja Kennadyrajan --- src/ap/ieee802_11.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index ef5b4d243..53c32b0ef 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -7675,6 +7675,11 @@ u8 * hostapd_eid_chsw_wrapper(struct hostapd_data *hapd, u8 *eid) u8 *eid_len_offset; int freq1; + if (!(hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) && + !(hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) && + !(hapd->iconf->ieee80211be && !hapd->conf->disable_11be)) + return eid; + if (!hapd->cs_freq_params.channel || (!hapd->cs_freq_params.vht_enabled && !hapd->cs_freq_params.he_enabled && -- 2.47.3