wlan-ap-Telecominfraproject/feeds/ipq95xx/hostapd/patches/q02-51-hostapd-Fix-WDS-Repeater-assoc-fail-on-6G-with-160MH.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

48 lines
1.7 KiB
Diff

From abec20dcfc7e4f38c6b9a90d95914d11a27d114c Mon Sep 17 00:00:00 2001
From: Sivashankari Madhavan <quic_sivamadh@quicinc.com>
Date: Sat, 26 Nov 2022 11:26:37 +0530
Subject: [PATCH] hostapd: Fix WDS Repeater assoc fail on 6G with 160MHz
While trying to connect the STA with WDS AP, filling the chandef info
in the driver. In the Problematic case, receiving the EHT160 center
frequency is invalid. Due to this chandef validation getting fail and
returns a failure message.
[ 6340.667455] wlan1: authenticate with 00:03:7f:01:58:33
[ 6340.667502] wlan1: HE 6GHz operation resulted in invalid chandef: 6195 MHz/5/0 MHz/0 MHz
[ 6340.671605] wlan1: Rejecting non-HE 6/7 GHz connection
[ 6343.937592] wlan1: authenticate with 00:03:7f:01:58:33
From the analysis, didn't update the EHT160 center frequency information
in hostapd.
Fix it by updating the EHT160 center frequency information.
Signed-off-by: Sivashankari Madhavan <quic_sivamadh@quicinc.com>
---
src/ap/ieee802_11_eht.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
index e208352..ac88c2a 100644
--- a/src/ap/ieee802_11_eht.c
+++ b/src/ap/ieee802_11_eht.c
@@ -243,6 +243,14 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid,
break;
case CHANWIDTH_160MHZ:
oper->width = EHT_OPERATION_CHANNEL_WIDTH_160MHZ;
+ if (!oper->ccfs1) {
+ /* CCFS0 points to center channel frequency in config */
+ oper->ccfs1 = oper->ccfs0;
+ if (hapd->iconf->channel < oper->ccfs0)
+ oper->ccfs0 = oper->ccfs1 - 8;
+ else
+ oper->ccfs0 = oper->ccfs1 + 8;
+ }
if (hapd->iconf->ru_punct_bitmap &&
hapd->iface->ru_punct_supp_bw == CHANWIDTH_320MHZ) {
hapd->iconf->ru_punct_bitmap = 0;
--
2.17.1