wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/q06-hostapd-Add-Operating-Class-and-Primary-ch-in-FD.patch
John Crispin 008ca9618d
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00

62 lines
2.4 KiB
Diff

From 343eb477b5b08b45f2f420ce753ab187657b31aa Mon Sep 17 00:00:00 2001
From: Sriram R <quic_srirrama@quicinc.com>
Date: Fri, 24 Mar 2023 23:20:49 +0530
Subject: [PATCH] hostapd: Add Operating Class and Primary channel in FD for
non PSC chan
If a non PSC 6GHz channel is configured, duplicate beacons/FD/UBPR
will be transmitted in other 20MHz channels of the current configured
bandwidth to aid in faster scan. In such cases the duplicate FD
needs to carry the Operating Class and Primary channel for clients
to identify the primary non PSC.
As per IEEE802.11 2020,
"The Operating Class subfield specifies the operating class of the Primary Channel of the transmitting AP
(see 9.4.1.36).
The Primary Channel subfield is set to the channel number of the primary channel (see 11.15.2) if the FILS
Discovery frame is transmitted as a non-HT duplicate PPDU; otherwise, the subfield is not present."
Hence, add the Oper class and Primary channel if the current channel
is non PSC.
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
---
src/ap/beacon.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index e3d2c5d..24abf52 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1505,6 +1505,15 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len)
FD_FRAME_CTL_CAP_PRESENT;
total_len += 4 + 1 + 2;
+ /* Fill Primary Channel info, if primary channel is not a PSC */
+ if (is_6ghz_op_class(hapd->iconf->op_class) &&
+ !is_6ghz_psc_frequency(ieee80211_chan_to_freq(NULL,
+ hapd->iconf->op_class, hapd->iconf->channel)) &&
+ op_class_to_bandwidth(hapd->iconf->op_class) > 20) {
+ ctl |= FD_FRAME_CTL_PRI_CHAN_PRESENT;
+ total_len += 2;
+ }
+
/* Check for optional subfields and calculate length */
if (wpa_auth_write_fd_rsn_info(hapd->wpa_auth, fd_rsn_info)) {
ctl |= FD_FRAME_CTL_RSN_INFO_PRESENT;
@@ -1571,9 +1580,11 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len)
WPA_PUT_LE16(pos, hostapd_fils_discovery_cap(hapd));
pos += 2;
- /* Operating Class - not present */
-
- /* Primary Channel - not present */
+ /* Operating Class and Primary Channel - if chan is non PSC */
+ if (ctl & FD_FRAME_CTL_PRI_CHAN_PRESENT) {
+ *pos++ = hapd->iconf->op_class;
+ *pos++ = hapd->iconf->channel;
+ }
/* AP Configuration Sequence Number - not present */