ipq8065: adjust SS USB PHY power settings
[openwrt/openwrt.git] / package / network / services / authsae / files / lib / wifi / authsae.sh
index d8c5598ed5939c1d5db8dc3478e3c2484461cc75..75be48e47396842993fc8b8eb22c1ffec37f0d13 100644 (file)
@@ -5,8 +5,8 @@ authsae_start_interface() {
        local authsae_conf_file="/var/run/authsae-$ifname.cfg"
        local ret=1
 
-       json_get_vars mcast_rate
-       set_default mcast_rate "12"
+       json_get_vars mcast_rate mesh_id
+       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