X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=package%2Fnetwork%2Fservices%2Fauthsae%2Ffiles%2Flib%2Fwifi%2Fauthsae.sh;h=d8c5598ed5939c1d5db8dc3478e3c2484461cc75;hb=e3670693e755bbd67d2ca2177feff8d78376716b;hp=daa43eb22a0d8a520b9bef8f98fa0387b6e468a0;hpb=c0ab9f8f3762b8b2637e247f2fd8ba4d20d25a67;p=openwrt.git diff --git a/package/network/services/authsae/files/lib/wifi/authsae.sh b/package/network/services/authsae/files/lib/wifi/authsae.sh index daa43eb22a..d8c5598ed5 100644 --- a/package/network/services/authsae/files/lib/wifi/authsae.sh +++ b/package/network/services/authsae/files/lib/wifi/authsae.sh @@ -1,28 +1,24 @@ authsae_start_interface() { - local device="$1" # to use the correct channel - local vif="$2" - local band + local mcast_rate + local mesh_htmode + local mesh_band + local authsae_conf_file="/var/run/authsae-$ifname.cfg" + local ret=1 - cfgfile="/var/run/authsae-$vif.cfg" - config_get channel "$device" channel - config_get hwmode "$device" hwmode - config_get htmode "$device" htmode - config_get ifname "$vif" ifname - config_get key "$vif" key - config_get mesh_id "$vif" mesh_id - config_get mcast_rate "$vif" mcast_rate "12" + json_get_vars mcast_rate + set_default mcast_rate "12" case "$htmode" in - HT20|HT40+|HT40-) htmode="$htmode";; - NOHT|none|*) htmode="none";; + HT20|HT40+|HT40-) mesh_htmode="$htmode";; + *) mesh_htmode="none";; esac case "$hwmode" in - *g*) band=11g;; - *a*) band=11a;; + *g*) mesh_band=11g;; + *a*) mesh_band=11a;; esac - cat > "$cfgfile" < "$authsae_conf_file" </dev/null 2>/dev/null & + authsae_pid="$!" + ret="$?" + + echo $authsae_pid > /var/run/authsae-$ifname.pid + wireless_add_process "$authsae_pid" "/usr/bin/meshd-nl80211" 1 + + [ "$ret" != 0 ] && wireless_setup_vif_failed AUTHSAE_FAILED + return $ret }