mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 02:43:38 +00:00
84 lines
2.7 KiB
Diff
84 lines
2.7 KiB
Diff
From ed2488e7b721ca430ddbe1245f7b40396b4685c9 Mon Sep 17 00:00:00 2001
|
|
From: Aloka Dixit <quic_alokad@quicinc.com>
|
|
Date: Thu, 22 Jul 2021 13:07:26 -0700
|
|
Subject: [PATCH 22/23] eht: configuration option for beacon rates
|
|
|
|
Add a new option 'eht' under 'beacon_rate' to configure EHT MCS rates.
|
|
Valid values for this option will be 0-15.
|
|
|
|
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
|
|
---
|
|
hostapd/config_file.c | 10 ++++++++++
|
|
hostapd/hostapd.conf | 2 ++
|
|
src/common/defs.h | 3 ++-
|
|
src/drivers/driver.h | 5 +++--
|
|
4 files changed, 17 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
|
index dada06c365b2..a5c1efb20b2d 100644
|
|
--- a/hostapd/config_file.c
|
|
+++ b/hostapd/config_file.c
|
|
@@ -3334,6 +3334,16 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
|
}
|
|
conf->rate_type = BEACON_RATE_HE;
|
|
conf->beacon_rate = val;
|
|
+ } else if (os_strncmp(pos, "eht:", 3) == 0) {
|
|
+ val = atoi(pos + 3);
|
|
+ if (val < 0 || val > 15) {
|
|
+ wpa_printf(MSG_ERROR,
|
|
+ "Line %d: invalid beacon_rate EHT-MCS %d",
|
|
+ line, val);
|
|
+ return 1;
|
|
+ }
|
|
+ conf->rate_type = BEACON_RATE_EHT;
|
|
+ conf->beacon_rate = val;
|
|
} else {
|
|
val = atoi(pos);
|
|
if (val < 10 || val > 10000) {
|
|
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
|
|
index b84d3d9fa677..e03bea2b3541 100644
|
|
--- a/hostapd/hostapd.conf
|
|
+++ b/hostapd/hostapd.conf
|
|
@@ -285,6 +285,8 @@ fragm_threshold=-1
|
|
# beacon_rate=vht:<VHT MCS>
|
|
# HE:
|
|
# beacon_rate=he:<HE MCS>
|
|
+# EHT:
|
|
+# beacon_rate=eht:<EHT MCS>
|
|
#
|
|
# For example, beacon_rate=10 for 1 Mbps or beacon_rate=60 for 6 Mbps (OFDM).
|
|
#beacon_rate=10
|
|
diff --git a/src/common/defs.h b/src/common/defs.h
|
|
index f43bdb5d1b15..ad66eb244715 100644
|
|
--- a/src/common/defs.h
|
|
+++ b/src/common/defs.h
|
|
@@ -406,7 +406,8 @@ enum beacon_rate_type {
|
|
BEACON_RATE_LEGACY,
|
|
BEACON_RATE_HT,
|
|
BEACON_RATE_VHT,
|
|
- BEACON_RATE_HE
|
|
+ BEACON_RATE_HE,
|
|
+ BEACON_RATE_EHT,
|
|
};
|
|
|
|
enum eap_proxy_sim_state {
|
|
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
|
|
index cc09eddfd168..076f290b28a4 100644
|
|
--- a/src/drivers/driver.h
|
|
+++ b/src/drivers/driver.h
|
|
@@ -1290,8 +1290,9 @@ struct wpa_driver_ap_params {
|
|
* This parameter can be used to set a specific Beacon frame data rate
|
|
* for the BSS. The interpretation of this value depends on the
|
|
* rate_type (legacy: in 100 kbps units, HT: HT-MCS, VHT: VHT-MCS,
|
|
- * HE: HE-MCS). If beacon_rate == 0 and rate_type == 0
|
|
- * (BEACON_RATE_LEGACY), the default Beacon frame data rate is used.
|
|
+ * HE: HE-MCS, EHT: EHT-MCS).
|
|
+ * If beacon_rate == 0 and rate_type == 0 (BEACON_RATE_LEGACY),
|
|
+ * the default Beacon frame data rate is used.
|
|
*/
|
|
unsigned int beacon_rate;
|
|
|
|
--
|
|
2.31.1
|
|
|