wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/q003-001-hostapd-Add-config-to-truncate-ext-capabilities.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

59 lines
2.2 KiB
Diff

From 234aa775f8046dc823a0ce72267f62045d81ee08 Mon Sep 17 00:00:00 2001
From: Harshitha Prem <quic_hprem@quicinc.com>
Date: Wed, 6 Jul 2022 17:03:52 +0530
Subject: [PATCH] hostapd: Add config to truncate ext capabilities
Certain legacy clients are not able to scan 11ax vaps due to
extended capabilities which are more than 8bytes in length.
Hence added a work around to trucate the ext caps to 8bytes
based on the hostapd config ext_cap_len.
Legacy clients are able to scan and connect if hostapd config
as ext_cap_len=8, ieee80211ac=1, ieee80211ax=0
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
---
hostapd/config_file.c | 2 ++
src/ap/ap_config.h | 1 +
src/ap/ieee802_11_shared.c | 3 +++
3 files changed, 6 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index ea44ce0..a6334b1 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2371,6 +2371,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
conf->country[2] = strtol(pos, NULL, 16);
} else if (os_strcmp(buf, "ieee80211d") == 0) {
conf->ieee80211d = atoi(pos);
+ } else if (os_strcmp(buf, "ext_cap_len") == 0) {
+ conf->ext_cap_len = atoi(pos);
} else if (os_strcmp(buf, "ieee80211h") == 0) {
conf->ieee80211h = atoi(pos);
} else if (os_strcmp(buf, "dfs_test_mode") == 0) {
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 1f083c4..4e7108a 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1104,6 +1104,7 @@ struct hostapd_config {
/* Use driver-generated interface addresses when adding multiple BSSs */
u8 use_driver_iface_addr;
u8 skip_unii1_dfs_switch;
+ u8 ext_cap_len;
#ifdef CONFIG_FST
struct fst_iface_cfg fst_cfg;
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index 8d6b89d..ff68256 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -465,6 +465,9 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid,
if (len < hapd->iface->extended_capa_len)
len = hapd->iface->extended_capa_len;
+ if (hapd->iconf->ext_cap_len > 0 && hapd->iconf->ext_cap_len < len)
+ len = hapd->iconf->ext_cap_len;
+
*pos++ = WLAN_EID_EXT_CAPAB;
*pos++ = len;
for (i = 0; i < len; i++, pos++) {