wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/r04-005-hostapd-Update-Wide-Bandwidth-Channel-Switch-element.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

64 lines
1.8 KiB
Diff

From a67a5bed168483c24435746061467be007053d68 Mon Sep 17 00:00:00 2001
From: Yuvarani V <quic_yuvarani@quicinc.com>
Date: Sun, 3 Dec 2023 11:10:27 +0530
Subject: [PATCH] hostapd: Update Wide Bandwidth Channel Switch element
Update Wide Bandwidth Channel Switch element as per Draft P802.11Revme_D4.0
(9.4.2.159 Wide Bandwidth Channel Switch element).
Update the below subfields,
New Channel Width,
New Channel Center Frequency Segment 0 and
New Channel Center Frequency Segment 1
as per Draft P802.11Revme_D4.0 for 160 MHz and 80+80 MHz bandwidth.
Signed-off-by: Yuvarani V <quic_yuvarani@quicinc.com>
---
src/ap/ieee802_11.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7183,20 +7183,25 @@ u8 *hostapd_eid_wide_bw_chan_switch(stru
struct ieee80211_wb_chsw_element *wb_chsw_elem;
u8 bw;
- /* bandwidth: 0: 40, 1: 80, 2: 160, 3: 80+80, 4: 320 */
+ /* bandwidth: 0: 40, 1: 80, 160, 80+80, 4: 320 as per Draft P802.11Revme_D4.0 */
switch (hapd->cs_freq_params.bandwidth) {
case 40:
bw = 0;
break;
case 80:
- /* check if it's 80+80 */
- if (!hapd->cs_freq_params.center_freq2)
- bw = 1;
- else
- bw = 3;
+ bw = 1;
break;
case 160:
- bw = 2;
+ bw = 1;
+ /* ccfs1 - the channel center frequency index of the 160 MHz channel */
+ ccfs1 = ccfs0;
+ /* ccfs0 - the channel center frequency index of the 80 MHz
+ * channel segment that contains the primary channel
+ */
+ if (hapd->cs_freq_params.channel < ccfs0)
+ ccfs0 -= 8;
+ else
+ ccfs0 += 8;
break;
case 320:
bw = 4;
@@ -7309,7 +7314,7 @@ u8 *hostapd_eid_bw_indication(struct hos
u8 *hostapd_eid_chsw_wrapper(struct hostapd_data *hapd, u8 *eid)
{
u8 *pos = eid, *length_pos;
- u8 ccfs0, ccfs1;
+ u8 ccfs0 = 0, ccfs1 = 0;
int freq;
if (!hapd->cs_freq_params.channel ||