diff options
author | Purushottam Kushwaha <pkushwah@qti.qualcomm.com> | 2016-11-22 09:10:35 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2016-11-25 21:12:30 (GMT) |
commit | 29483a5678af176d41e9cc345514320ec2b2998b (patch) | |
tree | e6852ae17df9953f5a7eedd0c27e78fb7f4542cf /hostapd | |
parent | dff690b8597cd0ca17de470c1911352c63cbbbd1 (diff) | |
download | hostap-29483a5678af176d41e9cc345514320ec2b2998b.zip hostap-29483a5678af176d41e9cc345514320ec2b2998b.tar.gz hostap-29483a5678af176d41e9cc345514320ec2b2998b.tar.bz2 |
Add support for user configurable Beacon frame data rate for AP mode
Allow configuration of Beacon frame TX rate from hostapd.conf with
"beacon_rate=xx" option. The following format is used to set
legacy/HT/VHT beacon rates:
Legacy (CCK/OFDM rates):
beacon_rate=<legacy rate in 100 kbps>
HT:
beacon_rate=ht:<HT MCS>
VHT:
beacon_rate=vht:<VHT MCS>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r-- | hostapd/config_file.c | 34 | ||||
-rw-r--r-- | hostapd/hostapd.conf | 13 |
2 files changed, 47 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 8ff31b5..65f1eb9 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2756,6 +2756,40 @@ static int hostapd_config_fill(struct hostapd_config *conf, line); return 1; } + } else if (os_strcmp(buf, "beacon_rate") == 0) { + int val; + + if (os_strncmp(pos, "ht:", 3) == 0) { + val = atoi(pos + 3); + if (val < 0 || val > 31) { + wpa_printf(MSG_ERROR, + "Line %d: invalid beacon_rate HT-MCS %d", + line, val); + return 1; + } + conf->rate_type = BEACON_RATE_HT; + conf->beacon_rate = val; + } else if (os_strncmp(pos, "vht:", 4) == 0) { + val = atoi(pos + 4); + if (val < 0 || val > 9) { + wpa_printf(MSG_ERROR, + "Line %d: invalid beacon_rate VHT-MCS %d", + line, val); + return 1; + } + conf->rate_type = BEACON_RATE_VHT; + conf->beacon_rate = val; + } else { + val = atoi(pos); + if (val < 10 || val > 10000) { + wpa_printf(MSG_ERROR, + "Line %d: invalid legacy beacon_rate %d", + line, val); + return 1; + } + conf->rate_type = BEACON_RATE_LEGACY; + conf->beacon_rate = val; + } } else if (os_strcmp(buf, "preamble") == 0) { if (atoi(pos)) conf->preamble = SHORT_PREAMBLE; diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 54c8b95..9ea3d6c 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -227,6 +227,19 @@ fragm_threshold=-1 #basic_rates=10 20 55 110 #basic_rates=60 120 240 +# Beacon frame TX rate configuration +# This sets the TX rate that is used to transmit Beacon frames. If this item is +# not included, the driver default rate (likely lowest rate) is used. +# Legacy (CCK/OFDM rates): +# beacon_rate=<legacy rate in 100 kbps> +# HT: +# beacon_rate=ht:<HT MCS> +# VHT: +# beacon_rate=vht:<VHT MCS> +# +# For example, beacon_rate=10 for 1 Mbps or beacon_rate=60 for 6 Mbps (OFDM). +#beacon_rate=10 + # Short Preamble # This parameter can be used to enable optional use of short preamble for # frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance. |