summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-01-31 10:43:18 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-01-31 10:43:18 +0000
commitcfc20090f16bfe7f112e66384b4c1760f37bb051 (patch)
treef789787c271ea2c83d94352f6ced9fe2241f20bb /package
parentbb8c34d98c09e3e7e43043bdadcb928191308f9f (diff)
downloadmtk-20170518-cfc20090f16bfe7f112e66384b4c1760f37bb051.zip
mtk-20170518-cfc20090f16bfe7f112e66384b4c1760f37bb051.tar.gz
mtk-20170518-cfc20090f16bfe7f112e66384b4c1760f37bb051.tar.bz2
hostapd: fix basic rate list handling with netifd
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39431
Diffstat (limited to 'package')
-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 c8518b4..0c73aa7 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -6,6 +6,12 @@ hostapd_add_rate() {
[ $sub -gt 0 ] && append $var "."
}
+hostapd_add_basic_rate() {
+ local var="$1"
+ local val="$(($2 / 100))"
+ append $var "$val" " "
+}
+
hostapd_append_wep_key() {
local var="$1"
@@ -71,7 +77,7 @@ hostapd_prepare_device_config() {
local brlist= br
json_get_values basic_rate_list basic_rate
for br in $basic_rate_list; do
- hostapd_add_rate brlist "$br"
+ hostapd_add_basic_rate brlist "$br"
done
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
[ -n "$beacon_int" ] && append base_cfg "beacon_int=$beacon_int" "$N"