CMake: bump the minimum required CMake version to 3.5
[project/netifd.git] / scripts / netifd-wireless.sh
index 0e3293ce439e76f5d3dfe156b3898bfd62826c0c..5b852e0937631aa0e89a410010bffe6f1d4cdad7 100644 (file)
@@ -108,14 +108,16 @@ _wdev_wrapper() {
 }
 
 _wdev_notify_init() {
-       local command="$1"
-       local name="$2"
-       local value="$3"
+       local command="$1"; shift;
 
        json_init
        json_add_int "command" "$command"
        json_add_string "device" "$__netifd_device"
-       [ -n "$name" -a -n "$value" ] && json_add_string "$name" "$value"
+       while [ -n "$1" ]; do
+               local name="$1"; shift
+               local value="$1"; shift
+               json_add_string "$name" "$value"
+       done
        json_add_object "data"
 }
 
@@ -151,7 +153,7 @@ _wireless_add_vlan() {
        local name="$1"; shift
        local ifname="$1"; shift
 
-       _wdev_notify_init $CMD_SET_DATA "vlan" "$name"
+       _wdev_notify_init $CMD_SET_DATA interface "$__cur_interface" "vlan" "$name"
        json_add_string "ifname" "$ifname"
        _wdev_add_variables "$@"
        _wdev_notify
@@ -218,9 +220,12 @@ wireless_vif_parse_encryption() {
 
        case "$encryption" in
                *tkip+aes|*tkip+ccmp|*aes+tkip|*ccmp+tkip) wpa_cipher="CCMP TKIP";;
+               *ccmp256) wpa_cipher="CCMP-256";;
                *aes|*ccmp) wpa_cipher="CCMP";;
                *tkip) wpa_cipher="TKIP";;
+               *gcmp256) wpa_cipher="GCMP-256";;
                *gcmp) wpa_cipher="GCMP";;
+               wpa3-192*) wpa_cipher="GCMP-256";;
        esac
 
        # 802.11n requires CCMP for WPA
@@ -252,11 +257,14 @@ wireless_vif_parse_encryption() {
                owe*)
                        auth_type=owe
                ;;
+               wpa3-192*)
+                       auth_type=eap192
+               ;;
                wpa3-mixed*)
-                       auth_type=eap-eap192
+                       auth_type=eap-eap2
                ;;
                wpa3*)
-                       auth_type=eap192
+                       auth_type=eap2
                ;;
                psk3-mixed*|sae-mixed*)
                        auth_type=psk-sae
@@ -327,6 +335,7 @@ for_each_interface() {
                                continue
                        }
                fi
+               __cur_interface="$_w_iface"
                "$@" "$_w_iface"
                json_select ..
        done
@@ -369,10 +378,12 @@ _wdev_common_device_config() {
 
 _wdev_common_iface_config() {
        config_add_string mode ssid encryption 'key:wpakey'
+       config_add_boolean bridge_isolate
 }
 
 _wdev_common_vlan_config() {
        config_add_string name vid iface
+       config_add_boolean bridge_isolate
 }
 
 _wdev_common_station_config() {