mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-22 11:53:02 +00:00
55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
From 6ea74653334ab1ab9d347e40bc0ef64960526c05 Mon Sep 17 00:00:00 2001
|
|
From: Muna Sinada <quic_msinada@quicinc.com>
|
|
Date: Wed, 21 Jul 2021 10:17:40 -0700
|
|
Subject: [PATCH 19/23] eht: add checks for channel switch announcement
|
|
|
|
Add checks to confirm that respective modes VHT/HE/EHT are not disabled
|
|
for the interface before adding the CSA related fields in the management
|
|
frames.
|
|
|
|
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
|
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
|
|
---
|
|
src/ap/beacon.c | 10 ++++++++--
|
|
src/ap/ieee802_11.c | 3 ++-
|
|
2 files changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
--- a/src/ap/beacon.c
|
|
+++ b/src/ap/beacon.c
|
|
@@ -643,7 +643,10 @@ static u8 * hostapd_gen_probe_resp(struc
|
|
pos = hostapd_eid_txpower_envelope(hapd, pos);
|
|
#endif /* CONFIG_IEEE80211AX */
|
|
|
|
- pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
|
|
+ if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) ||
|
|
+ (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) ||
|
|
+ (hapd->iconf->ieee80211be && !hapd->conf->disable_11be))
|
|
+ pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
|
|
|
|
pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_PROBE_RESP);
|
|
pos = hostapd_eid_fils_indic(hapd, pos, 0);
|
|
@@ -1757,7 +1760,10 @@ int ieee802_11_build_ap_params(struct ho
|
|
tailpos = hostapd_eid_txpower_envelope(hapd, tailpos);
|
|
#endif /* CONFIG_IEEE80211AX */
|
|
|
|
- tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
|
|
+ if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) ||
|
|
+ (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) ||
|
|
+ (hapd->iconf->ieee80211be && !hapd->conf->disable_11be))
|
|
+ tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
|
|
|
|
tailpos = hostapd_eid_rnr(hapd, tailpos, WLAN_FC_STYPE_BEACON);
|
|
tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
|
|
--- a/src/ap/ieee802_11.c
|
|
+++ b/src/ap/ieee802_11.c
|
|
@@ -7198,7 +7198,8 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct
|
|
|
|
if (!hapd->cs_freq_params.channel ||
|
|
(!hapd->cs_freq_params.vht_enabled &&
|
|
- !hapd->cs_freq_params.he_enabled))
|
|
+ !hapd->cs_freq_params.he_enabled &&
|
|
+ !hapd->cs_freq_params.eht_enabled))
|
|
return eid;
|
|
|
|
/* bandwidth: 0: 40, 1: 80, 2: 160, 3: 80+80 */
|