aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-15 10:30:08 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-15 10:30:08 +0000
commit4b085f6a37dfdb8722dc914d7858a5035d64c08a (patch)
tree425af91a745da8b223918d454b27e34aaa4953c1 /package/network/services/hostapd/files
parent8e570d48b0be0b7aa80684708f1ba985619535a2 (diff)
downloadupstream-4b085f6a37dfdb8722dc914d7858a5035d64c08a.tar.gz
upstream-4b085f6a37dfdb8722dc914d7858a5035d64c08a.tar.bz2
upstream-4b085f6a37dfdb8722dc914d7858a5035d64c08a.zip
hostapd: add a require_mode option in wifi-device sections to select the minimum hardware mode that the AP requires from clients
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41665 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/hostapd/files')
-rw-r--r--package/network/services/hostapd/files/netifd.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 8b5e731d7b..ba43439c4c 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -52,6 +52,7 @@ hostapd_common_add_device_config() {
config_add_string country
config_add_boolean country_ie doth
+ config_add_string require_mode
hostapd_add_log_config
}
@@ -63,7 +64,7 @@ hostapd_prepare_device_config() {
local base="${config%%.conf}"
local base_cfg=
- json_get_vars country country_ie beacon_int doth
+ json_get_vars country country_ie beacon_int doth require_mode
hostapd_set_log_options base_cfg
@@ -83,6 +84,11 @@ hostapd_prepare_device_config() {
for br in $basic_rate_list; do
hostapd_add_basic_rate brlist "$br"
done
+ case "$require_mode" in
+ g) brlist="60 120 240" ;;
+ n) append base_cfg "require_ht=1" "$N";;
+ ac) append base_cfg "require_vht=1" "$N";;
+ esac
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
[ -n "$beacon_int" ] && append base_cfg "beacon_int=$beacon_int" "$N"