mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-02 03:17:48 +00:00
59 lines
2.2 KiB
Diff
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++) {
|