aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/authsae
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-11-24 18:28:35 +0000
committerJohn Crispin <blogic@openwrt.org>2015-11-24 18:28:35 +0000
commit9fbbdfc94455df1e4eb3a1eea27b6bbff696b1e5 (patch)
treebb41575b339d3d27aa88ad7f41687748072d8805 /package/network/services/authsae
parent26c58607f9d516d9fec50269e9b254fe1904256a (diff)
downloadmaster-187ad058-9fbbdfc94455df1e4eb3a1eea27b6bbff696b1e5.tar.gz
master-187ad058-9fbbdfc94455df1e4eb3a1eea27b6bbff696b1e5.tar.bz2
master-187ad058-9fbbdfc94455df1e4eb3a1eea27b6bbff696b1e5.zip
authsae: Use kbit/s as mcast_rate unit like wpad
The OpenWrt wireless configuration for mcast_rate is defined as Kbit/s when using wpa_supplicant for IBSS/802.11s and iw for unencrypted IBSS/802.11s. But when using authsae, the unit for the same option is redefined as Mbit/s. Better use the same unit for this option independent of the backend which is used. Old values for mcast_rate (< 1000) are still interpreted Mbit/s to avoid problems during upgrades from older versions. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47614 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/authsae')
-rw-r--r--package/network/services/authsae/files/lib/wifi/authsae.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/package/network/services/authsae/files/lib/wifi/authsae.sh b/package/network/services/authsae/files/lib/wifi/authsae.sh
index 6582a354de..75be48e473 100644
--- a/package/network/services/authsae/files/lib/wifi/authsae.sh
+++ b/package/network/services/authsae/files/lib/wifi/authsae.sh
@@ -6,7 +6,7 @@ authsae_start_interface() {
local ret=1
json_get_vars mcast_rate mesh_id
- set_default mcast_rate "12"
+ set_default mcast_rate "12000"
case "$htmode" in
HT20|HT40+|HT40-) mesh_htmode="$htmode";;
@@ -18,6 +18,14 @@ authsae_start_interface() {
*a*) mesh_band=11a;;
esac
+ if [ "$mcast_rate" -gt 1000 ]; then
+ # authsae only allows integers as rates and not things like 5.5
+ mcval=$(($mcast_rate / 1000))
+ else
+ # compat: to still support mbit/s rates
+ mcval="$mcast_rate"
+ fi
+
cat > "$authsae_conf_file" <<EOF
authsae:
{
@@ -40,7 +48,7 @@ authsae:
band = "$mesh_band";
channel = $channel;
htmode = "$mesh_htmode";
- mcast-rate = $mcast_rate;
+ mcast-rate = $mcval;
};
};
EOF