Jelajahi Sumber

Cleanup of script for WPA3 mode on RS91x (#21669)

chirag-silabs 3 tahun lalu
induk
melakukan
0ac799e419

+ 3 - 2
examples/light-switch-app/efr32/BUILD.gn

@@ -65,7 +65,7 @@ declare_args() {
   chip_enable_wifi_ipv4 = false
 
   # Argument to force enable WPA3 security
-  wifi_enable_security_wpa3 = false
+  rs91x_wpa3_only = false
 }
 
 declare_args() {
@@ -258,7 +258,8 @@ efr32_executable("light_switch_app") {
       defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ]
     }
 
-    if (wifi_enable_security_wpa3) {
+    if (rs91x_wpa3_only) {
+      # TODO: Change this macro once WF200 support is provided
       defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ]
     }
   }

+ 4 - 3
examples/lighting-app/efr32/BUILD.gn

@@ -64,8 +64,8 @@ declare_args() {
   # Argument to Disable IPv4 for wifi(rs911)
   chip_enable_wifi_ipv4 = false
 
-  # Argument to force enable WPA3 security
-  wifi_enable_security_wpa3 = false
+  # Argument to force enable WPA3 security on rs91x
+  rs91x_wpa3_only = false
 }
 
 declare_args() {
@@ -258,7 +258,8 @@ efr32_executable("lighting_app") {
       defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ]
     }
 
-    if (wifi_enable_security_wpa3) {
+    if (rs91x_wpa3_only) {
+      # TODO: Change this macro once WF200 support is provided
       defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ]
     }
   }

+ 3 - 2
examples/lock-app/efr32/BUILD.gn

@@ -65,7 +65,7 @@ declare_args() {
   chip_enable_wifi_ipv4 = false
 
   # Argument to force enable WPA3 security
-  wifi_enable_security_wpa3 = false
+  rs91x_wpa3_only = false
 }
 
 declare_args() {
@@ -255,7 +255,8 @@ efr32_executable("lock_app") {
       defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ]
     }
 
-    if (wifi_enable_security_wpa3) {
+    if (rs91x_wpa3_only) {
+      # TODO: Change this macro once WF200 support is provided
       defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ]
     }
   }

+ 3 - 2
examples/window-app/efr32/BUILD.gn

@@ -58,7 +58,7 @@ declare_args() {
   chip_enable_wifi_ipv4 = false
 
   # Argument to force enable WPA3 security
-  wifi_enable_security_wpa3 = false
+  rs91x_wpa3_only = false
 }
 
 declare_args() {
@@ -241,7 +241,8 @@ efr32_executable("window_app") {
       defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ]
     }
 
-    if (wifi_enable_security_wpa3) {
+    if (rs91x_wpa3_only) {
+      # TODO: Change this macro once WF200 support is provided
       defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ]
     }
   }

+ 2 - 16
scripts/examples/gn_efr32_example.sh

@@ -92,6 +92,8 @@ if [ "$#" == "0" ]; then
             Use to build the example with pigweed RPC
         OTA_periodic_query_timeout
             Periodic query timeout variable for OTA in seconds
+        rs91x_wpa3_only
+            Support for WPA3 only mode on RS91x
         Presets
         --sed
             enable sleepy end device, set thread mtd
@@ -143,22 +145,6 @@ else
                 optArgs+="chip_enable_wifi_ipv4=true "
                 shift
                 ;;
-            --rs91x_setSecurityType)
-                if [ -z "$2" ]; then
-                    echo "--rs911x_setSecurityType requires WPA_WPA2 or WPA3_ONLY"
-                    exit 1
-                fi
-                if [ "$2" = "WPA_WPA2" ]; then
-                    optArgs+="wifi_enable_security_wpa3=false "
-                elif [ "$2" = "WPA3_ONLY" ]; then
-                    optArgs+="wifi_enable_security_wpa3=true "
-                else
-                    echo "Set security usage: --rs911x_setSecurityType WPA_WPA2|WPA3_ONLY"
-                    exit 1
-                fi
-                shift
-                shift
-                ;;
             --additional_data_advertising)
                 optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true "
                 shift