]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow HE-without-VHT to add the Channel Switch Wrapper element
authorMuna Sinada <msinada@codeaurora.org>
Mon, 18 May 2020 13:57:16 +0000 (06:57 -0700)
committerJouni Malinen <j@w1.fi>
Wed, 10 Jun 2020 21:56:45 +0000 (00:56 +0300)
Modify the check for VHT to include an option for HE in
hostapd_eid_wb_chsw_wrapper() and its callers to allow the Channel
Switch Wrapper element with the Wide Bandwidth Channel Switch subelement
to be included in Beacon and Probe Response frames when AP is operating
in HE mode without VHT.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
src/ap/beacon.c
src/ap/ieee802_11.c

index 22e672c8d5b15a79e3fbcd11597df8d5e6238880..b3b33b7faf1d968e95c35ac3b023b44bb7e59628 100644 (file)
@@ -560,10 +560,13 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
                pos = hostapd_eid_vht_capabilities(hapd, pos, 0);
                pos = hostapd_eid_vht_operation(hapd, pos);
                pos = hostapd_eid_txpower_envelope(hapd, pos);
-               pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
        }
 #endif /* CONFIG_IEEE80211AC */
 
+       if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) ||
+           hapd->iconf->ieee80211ax)
+               pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
+
        pos = hostapd_eid_fils_indic(hapd, pos, 0);
        pos = hostapd_get_rsnxe(hapd, pos, epos - pos);
 
@@ -1281,10 +1284,13 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
                tailpos = hostapd_eid_vht_capabilities(hapd, tailpos, 0);
                tailpos = hostapd_eid_vht_operation(hapd, tailpos);
                tailpos = hostapd_eid_txpower_envelope(hapd, tailpos);
-               tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
        }
 #endif /* CONFIG_IEEE80211AC */
 
+       if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) ||
+            hapd->iconf->ieee80211ax)
+               tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
+
        tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
        tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos);
 
index 9176700840e28f1b30763e56645c9191ef97c226..b91640070f4f8aeabede4d4b511c722ba4762b64 100644 (file)
@@ -5570,7 +5570,8 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid)
        int freq1;
 
        if (!hapd->cs_freq_params.channel ||
-           !hapd->cs_freq_params.vht_enabled)
+           (!hapd->cs_freq_params.vht_enabled &&
+            !hapd->cs_freq_params.he_enabled))
                return eid;
 
        /* bandwidth: 0: 40, 1: 80, 2: 160, 3: 80+80 */