From 22921b0eb5f0cd4aedeaff5b01bb6005c057ebf8 Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Thu, 4 Aug 2022 18:32:41 +0530 Subject: [PATCH] [EFR32]Added connectivity for RS9116 when AP has WPA3 security mode (#21589) * Added connectivity for RS9116 when AP has WPA3 security mode * Formatting to get it aligned correctly --- examples/light-switch-app/efr32/BUILD.gn | 7 +++++++ examples/lighting-app/efr32/BUILD.gn | 7 +++++++ examples/lock-app/efr32/BUILD.gn | 7 +++++++ examples/window-app/efr32/BUILD.gn | 7 +++++++ scripts/examples/gn_efr32_example.sh | 16 ++++++++++++++++ third_party/silabs/matter_support | 2 +- 6 files changed, 45 insertions(+), 1 deletion(-) diff --git a/examples/light-switch-app/efr32/BUILD.gn b/examples/light-switch-app/efr32/BUILD.gn index cb9dacf9b4e6e7..00030f6d79303e 100644 --- a/examples/light-switch-app/efr32/BUILD.gn +++ b/examples/light-switch-app/efr32/BUILD.gn @@ -63,6 +63,9 @@ 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 } declare_args() { @@ -227,6 +230,10 @@ efr32_executable("light_switch_app") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } + if (wifi_enable_security_wpa3) { + defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ] + } + # WiFi Settings if (chip_enable_wifi) { if (use_rs911x) { diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 80f3a9dc3fee30..396bf2b6a8a780 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -63,6 +63,9 @@ 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 } declare_args() { @@ -227,6 +230,10 @@ efr32_executable("lighting_app") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } + if (wifi_enable_security_wpa3) { + defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ] + } + # WiFi Settings if (chip_enable_wifi) { if (use_rs911x) { diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index a4b32d8f6c7c80..918ee1a87642b9 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -63,6 +63,9 @@ 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 } declare_args() { @@ -224,6 +227,10 @@ efr32_executable("lock_app") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } + if (wifi_enable_security_wpa3) { + defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ] + } + # WiFi Settings if (chip_enable_wifi) { if (use_rs911x) { diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index d217a317271cf1..31f3300e31e33b 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -56,6 +56,9 @@ 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 } declare_args() { @@ -210,6 +213,10 @@ efr32_executable("window_app") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } + if (wifi_enable_security_wpa3) { + defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ] + } + # WiFi Settings if (chip_enable_wifi) { if (use_rs911x) { diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index a8e200b028ae56..6cc9d6efd0a146 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -143,6 +143,22 @@ 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 diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 573a098c7cb553..54a74616ac15f1 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 573a098c7cb55340f68f407907d9137ae54ef16d +Subproject commit 54a74616ac15f1ef00393d1c9d22f04df0298b18