From ed2488e7b721ca430ddbe1245f7b40396b4685c9 Mon Sep 17 00:00:00 2001 From: Aloka Dixit 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 --- 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 00af762..c00c24f 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3259,6 +3259,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 a3a7dab..2893a4a 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -298,6 +298,8 @@ beacon_tx_mode=1 # beacon_rate=vht: # HE: # beacon_rate=he: +## EHT: +# beacon_rate=eht: # # 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 c0c6dbe..981ce1e 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -427,7 +427,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 9549683..a9c8e9c 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1428,8 +1428,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;