mac80211: apply mesh parameters after starting authsae/wpa_supplicant (#16697)
[openwrt/staging/jogo.git] / package / kernel / mac80211 / files / lib / netifd / wireless / mac80211.sh
index ec0966ea8d85dc9d960dbe432ac0e6dfe22a6179..824c87ac15cd068edf9d3f0798c152b0d4be5f88 100644 (file)
@@ -590,23 +590,22 @@ mac80211_setup_vif() {
 
        case "$mode" in
                mesh)
-                       for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do
-                               json_get_var mp_val "$var"
-                               [ -n "$mp_val" ] && iw dev "$ifname" set mesh_param "$var" "$mp_val"
-                       done
-
-                       # authsae
+                       # authsae or wpa_supplicant
                        json_get_vars key
                        if [ -n "$key" ]; then
                                if [ -e "/lib/wifi/authsae.sh" ]; then
                                        . /lib/wifi/authsae.sh
                                        authsae_start_interface || failed=1
                                else
-                                       wireless_setup_vif_failed AUTHSAE_NOT_INSTALLED
-                                       json_select ..
-                                       return
+                                       wireless_vif_parse_encryption
+                                       mac80211_setup_supplicant || failed=1
                                fi
                        fi
+
+                       for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do
+                               json_get_var mp_val "$var"
+                               [ -n "$mp_val" ] && iw dev "$ifname" set mesh_param "$var" "$mp_val"
+                       done
                ;;
                adhoc)
                        wireless_vif_parse_encryption