Author: blogic Date: 2015-11-24 19:28:35 +0100 (Tue, 24 Nov 2015) New Revision: 47614
Modified: trunk/package/network/services/authsae/files/lib/wifi/authsae.sh Log: 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 <[email protected]> Modified: trunk/package/network/services/authsae/files/lib/wifi/authsae.sh =================================================================== --- trunk/package/network/services/authsae/files/lib/wifi/authsae.sh 2015-11-24 18:28:19 UTC (rev 47613) +++ trunk/package/network/services/authsae/files/lib/wifi/authsae.sh 2015-11-24 18:28:35 UTC (rev 47614) @@ -6,7 +6,7 @@ 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 @@ *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 @@ band = "$mesh_band"; channel = $channel; htmode = "$mesh_htmode"; - mcast-rate = $mcast_rate; + mcast-rate = $mcval; }; }; EOF _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
