wlan-ap-Telecominfraproject/feeds/ipq95xx/hostapd/patches/q02-019-eht-add-checks-for-channel-switch-announcement.patch
John Crispin b9b03a6e38 ipq95xx: add Qualcomm wifi-7 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00

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 */