aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuna Sinada <msinada@codeaurora.org>2020-05-18 13:57:16 (GMT)
committerJouni Malinen <j@w1.fi>2020-06-10 21:56:45 (GMT)
commit621745917f66932210e878dc674635800e47d680 (patch)
treec157c22d01a378dba34424c97b0f6889e88620f9
parentd51b1b7a660b5cba2e8059ccf8fb8955f6ee890f (diff)
downloadhostap-621745917f66932210e878dc674635800e47d680.zip
hostap-621745917f66932210e878dc674635800e47d680.tar.gz
hostap-621745917f66932210e878dc674635800e47d680.tar.bz2
Allow HE-without-VHT to add the Channel Switch Wrapper element
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>
-rw-r--r--src/ap/beacon.c10
-rw-r--r--src/ap/ieee802_11.c3
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 22e672c..b3b33b7 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -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);
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 9176700..b916400 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -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 */