]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not add Channel Switch Wrapper element without VHT/HE/EHT
authorMuna Sinada <muna.sinada@oss.qualcomm.com>
Wed, 28 May 2025 15:43:05 +0000 (21:13 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 3 Jun 2025 15:15:45 +0000 (18:15 +0300)
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 <aloka.dixit@oss.qualcomm.com>
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
src/ap/ieee802_11.c

index ef5b4d2435ac54068c1e30dda5be5592415553ee..53c32b0efee0195348add0790f792d600c9f2d96 100644 (file)
@@ -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 &&