From 9fa2b045de75fcb8c7b1a0a52757e0bf8f2ffce2 Mon Sep 17 00:00:00 2001 From: yap Date: Thu, 15 Jun 2023 17:58:17 +0530 Subject: [PATCH 01/11] WPA3 transition support --- examples/platform/silabs/efr32/BUILD.gn | 8 ++--- .../platform/silabs/efr32/rs911x/rsi_if.c | 33 +++++++++++++++---- .../silabs/efr32/rs911x/rsi_wlan_config.h | 32 +++++++++++++++--- .../silabs/efr32/wifi/wfx_host_events.h | 3 +- 4 files changed, 60 insertions(+), 16 deletions(-) diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 860800e7fb8d68..dc80ae1432fba3 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -31,7 +31,8 @@ declare_args() { sl_wfx_config_scan = true # Argument to force enable WPA3 security on rs91x - rs91x_wpa3_only = false + + rs91x_wpa3_trans = false #default WiFi SSID chip_default_wifi_ssid = "" @@ -254,10 +255,9 @@ config("silabs-wifi-config") { if (chip_enable_wifi_ipv4) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } - - if (rs91x_wpa3_only) { + if (rs91x_wpa3_trans) { # TODO: Change this macro once WF200 support is provided - defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ] + defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANS=1" ] } } diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index f29cf010a79e73..fdfbb09dd57dae 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -420,9 +420,11 @@ static void wfx_rsi_save_ap_info() // translation /* * Scan is done - failed */ -#if WIFI_ENABLE_SECURITY_WPA3 - wfx_rsi.sec.security = WFX_SEC_WPA3; -#else /* !WIFI_ENABLE_SECURITY_WPA3 */ +// #if WIFI_ENABLE_SECURITY_WPA3 +// wfx_rsi.sec.security = WFX_SEC_WPA3; +#if WIFI_ENABLE_SECURITY_WPA3_TRANS + wfx_rsi.sec.security =WFX_SEC_WPA3_TRANSITION; +#else /* !WIFI_ENABLE_SECURITY_WPA3 */ wfx_rsi.sec.security = WFX_SEC_WPA2; #endif /* WIFI_ENABLE_SECURITY_WPA3 */ SILABS_LOG("%s: warn: failed with status: %02x", __func__, status); @@ -434,7 +436,7 @@ static void wfx_rsi_save_ap_info() // translation wfx_rsi.ap_chan = rsp.scan_info->rf_channel; memcpy(&wfx_rsi.ap_mac.octet[0], &rsp.scan_info->bssid[0], BSSID_MAX_STR_LEN); } - +SILABS_LOG("\nuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu - rsp.scan_info->security_mode=%d", rsp.scan_info->security_mode); switch (rsp.scan_info->security_mode) { case SME_OPEN: @@ -451,10 +453,18 @@ static void wfx_rsi_save_ap_info() // translation case SME_WEP: wfx_rsi.sec.security = WFX_SEC_WEP; break; +//#if WIFI_ENABLE_SECURITY_WPA3 + // case SME_WPA3: + // wfx_rsi.sec.security = WFX_SEC_WPA3; + // break; +//#endif +//#if WIFI_ENABLE_SECURITY_WPA3_TRANS case SME_WPA3: case SME_WPA3_TRANSITION: - wfx_rsi.sec.security = WFX_SEC_WPA3; + SILABS_LOG("\nuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu - already in progress"); + wfx_rsi.sec.security = WFX_SEC_WPA3_TRANSITION; break; +//#endif default: wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; break; @@ -492,9 +502,18 @@ static void wfx_rsi_do_join(void) case WFX_SEC_WPA2: connect_security_mode = RSI_WPA_WPA2_MIXED; break; - case WFX_SEC_WPA3: - connect_security_mode = RSI_WPA3; +//#if WIFI_ENABLE_SECURITY_WPA3 + // case WFX_SEC_WPA3: + // connect_security_mode = RSI_WPA3; + // break; +//#endif +//#if WIFI_ENABLE_SECURITY_WPA3_TRANS + case WFX_SEC_WPA3: + case WFX_SEC_WPA3_TRANSITION: + SILABS_LOG("\nerr))))))))))))))))))))))))vvvvvvvvvvvvvvvvvvvvnot joining - already in progress"); + connect_security_mode = RSI_WPA3_TRANSITION; break; +//#endif case WFX_SEC_NONE: connect_security_mode = RSI_OPEN; break; diff --git a/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h b/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h index 9fb927adc5631e..61b9af943baab3 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h +++ b/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h @@ -41,7 +41,24 @@ #define RSI_TCP_IP_FEATURE_BIT_MAP (TCP_IP_FEAT_BYPASS /*| TCP_IP_FEAT_EXTENSION_VALID*/) //! To set Extended custom feature select bit map -#if WIFI_ENABLE_SECURITY_WPA3 +// #if WIFI_ENABLE_SECURITY_WPA3 +// #ifdef CHIP_9117 +// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP +// (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_IEEE_80211W | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) +// #else +// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_384K_MODE | EXT_FEAT_IEEE_80211W) +// #endif /* CHIP_9117 */ +// #else +// #ifdef CHIP_9117 +// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) +// #else +// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_384K_MODE +// #endif /* CHIP_9117 */ +// #endif /* WIFI_ENABLE_SECURITY_WPA3 */ + +//! To set Extended custom feature select bit map +#if WIFI_ENABLE_SECURITY_WPA3_TRANS +#define RSI_CUSTOM_FEATURE_BIT_MAP BIT(31) #ifdef CHIP_9117 #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_IEEE_80211W | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) @@ -54,7 +71,7 @@ #else #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_384K_MODE #endif /* CHIP_9117 */ -#endif /* WIFI_ENABLE_SECURITY_WPA3 */ +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ //! To set Extended TCPIP feature select bit map #define RSI_EXT_TCPIP_FEATURE_BITMAP (/*EXT_FEAT_HTTP_OTAF_SUPPORT |*/ EXT_TCP_IP_SSL_16K_RECORD) @@ -242,12 +259,19 @@ #define RSI_POWER_LEVEL RSI_POWER_LEVEL_HIGH //! RSI_JOIN_FEAT_STA_BG_ONLY_MODE_ENABLE or RSI_JOIN_FEAT_LISTEN_INTERVAL_VALID -#if WIFI_ENABLE_SECURITY_WPA3 -#define RSI_JOIN_FEAT_BIT_MAP RSI_JOIN_FEAT_MFP_CAPABLE_REQUIRED +// #if WIFI_ENABLE_SECURITY_WPA3 +// #define RSI_JOIN_FEAT_BIT_MAP RSI_JOIN_FEAT_MFP_CAPABLE_REQUIRED +// #else +// #define RSI_JOIN_FEAT_BIT_MAP 0 +// #endif + +#if WIFI_ENABLE_SECURITY_WPA3_TRANS +#define RSI_JOIN_FEAT_BIT_MAP RSI_JOIN_FEAT_MFP_CAPABLE_ONLY #else #define RSI_JOIN_FEAT_BIT_MAP 0 #endif + #define RSI_LISTEN_INTERVAL 0 //! Transmission data rate. Physical rate at which data has to be transmitted. diff --git a/src/platform/silabs/efr32/wifi/wfx_host_events.h b/src/platform/silabs/efr32/wifi/wfx_host_events.h index c0724b7237e808..a4f28dc5b00ce6 100644 --- a/src/platform/silabs/efr32/wifi/wfx_host_events.h +++ b/src/platform/silabs/efr32/wifi/wfx_host_events.h @@ -239,7 +239,8 @@ typedef enum WFX_SEC_WEP = 2, WFX_SEC_WPA = 3, WFX_SEC_WPA2 = 4, - WFX_SEC_WPA3 = 5 + WFX_SEC_WPA3 = 5, + WFX_SEC_WPA3_TRANSITION = 6 } wfx_sec_t; typedef struct From 9b5f692774dd7c09aa04913d0a0712ed9f48f16a Mon Sep 17 00:00:00 2001 From: yap Date: Mon, 19 Jun 2023 20:14:34 +0530 Subject: [PATCH 02/11] WPA3 transition mode support --- examples/platform/silabs/SiWx917/BUILD.gn | 6 +- .../platform/silabs/SiWx917/SiWx917/rsi_if.c | 18 ++++-- examples/platform/silabs/efr32/BUILD.gn | 1 - .../platform/silabs/efr32/rs911x/rsi_if.c | 59 ++++++++----------- .../silabs/efr32/rs911x/rsi_wlan_config.h | 43 ++++---------- .../silabs/efr32/wifi/wfx_host_events.h | 1 - 6 files changed, 51 insertions(+), 77 deletions(-) diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index beefb835d64172..2c9d5df47024e3 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -33,7 +33,7 @@ declare_args() { sl_wfx_config_scan = true # Argument to force enable WPA3 security on rs91x - rs91x_wpa3_only = false + rs91x_wpa3_transition = false # use commissionable data for SiWx917 siwx917_commissionable_data = false @@ -219,8 +219,8 @@ config("silabs-wifi-config") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } - if (rs91x_wpa3_only) { - defines += [ "WIFI_ENABLE_SECURITY_WPA3=1" ] + if (rs91x_wpa3_trans) { + defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANSITION=1" ] } } diff --git a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c index 9dc57d81636733..d71298e5c82c3a 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c @@ -355,11 +355,11 @@ static void wfx_rsi_save_ap_info() /* * Scan is done - failed */ -#if WIFI_ENABLE_SECURITY_WPA3 +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION wfx_rsi.sec.security = WFX_SEC_WPA3; -#else /* !WIFI_ENABLE_SECURITY_WPA3 */ +#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ wfx_rsi.sec.security = WFX_SEC_WPA2; -#endif /* WIFI_ENABLE_SECURITY_WPA3 */ +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ SILABS_LOG("%s: warn: failed with status: %02x", __func__, status); return; } @@ -386,9 +386,13 @@ static void wfx_rsi_save_ap_info() case SME_WEP: wfx_rsi.sec.security = WFX_SEC_WEP; break; - case SME_WPA3: case SME_WPA3_TRANSITION: - wfx_rsi.sec.security = WFX_SEC_WPA3; +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION + case SME_WPA3: + wfx_rsi.sec.security = RSI_WPA3_PERSONAL; +#else + wfx_rsi.sec.security = WFX_SEC_WPA2; +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ break; default: wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; @@ -425,9 +429,11 @@ static void wfx_rsi_do_join(void) case WFX_SEC_WPA2: connect_security_mode = RSI_WPA_WPA2_MIXED; break; +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_WPA3: - connect_security_mode = RSI_WPA3; + connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; break; +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ case WFX_SEC_NONE: connect_security_mode = RSI_OPEN; break; diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index dc80ae1432fba3..2c020720b9f581 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -31,7 +31,6 @@ declare_args() { sl_wfx_config_scan = true # Argument to force enable WPA3 security on rs91x - rs91x_wpa3_trans = false #default WiFi SSID diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index fdfbb09dd57dae..7539cf9adc9dc3 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -420,23 +420,18 @@ static void wfx_rsi_save_ap_info() // translation /* * Scan is done - failed */ -// #if WIFI_ENABLE_SECURITY_WPA3 -// wfx_rsi.sec.security = WFX_SEC_WPA3; -#if WIFI_ENABLE_SECURITY_WPA3_TRANS - wfx_rsi.sec.security =WFX_SEC_WPA3_TRANSITION; -#else /* !WIFI_ENABLE_SECURITY_WPA3 */ +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION + wfx_rsi.sec.security = WFX_SEC_WPA3; +#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ wfx_rsi.sec.security = WFX_SEC_WPA2; -#endif /* WIFI_ENABLE_SECURITY_WPA3 */ +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ SILABS_LOG("%s: warn: failed with status: %02x", __func__, status); return; } - else - { - wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; - wfx_rsi.ap_chan = rsp.scan_info->rf_channel; - memcpy(&wfx_rsi.ap_mac.octet[0], &rsp.scan_info->bssid[0], BSSID_MAX_STR_LEN); - } -SILABS_LOG("\nuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu - rsp.scan_info->security_mode=%d", rsp.scan_info->security_mode); + wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; + wfx_rsi.ap_chan = rsp.scan_info->rf_channel; + memcpy(&wfx_rsi.ap_mac.octet[0], &rsp.scan_info->bssid[0], BSSID_MAX_STR_LEN); + switch (rsp.scan_info->security_mode) { case SME_OPEN: @@ -453,18 +448,14 @@ SILABS_LOG("\nuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu - rsp.s case SME_WEP: wfx_rsi.sec.security = WFX_SEC_WEP; break; -//#if WIFI_ENABLE_SECURITY_WPA3 - // case SME_WPA3: - // wfx_rsi.sec.security = WFX_SEC_WPA3; - // break; -//#endif -//#if WIFI_ENABLE_SECURITY_WPA3_TRANS + case SME_WPA3_TRANSITIONITION: +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case SME_WPA3: - case SME_WPA3_TRANSITION: - SILABS_LOG("\nuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu - already in progress"); - wfx_rsi.sec.security = WFX_SEC_WPA3_TRANSITION; + wfx_rsi.sec.security = WFX_SEC_WPA3; +#else + wfx_rsi.sec.security = WFX_SEC_WPA2; +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ break; -//#endif default: wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; break; @@ -502,18 +493,20 @@ static void wfx_rsi_do_join(void) case WFX_SEC_WPA2: connect_security_mode = RSI_WPA_WPA2_MIXED; break; -//#if WIFI_ENABLE_SECURITY_WPA3 - // case WFX_SEC_WPA3: - // connect_security_mode = RSI_WPA3; - // break; -//#endif -//#if WIFI_ENABLE_SECURITY_WPA3_TRANS - case WFX_SEC_WPA3: - case WFX_SEC_WPA3_TRANSITION: - SILABS_LOG("\nerr))))))))))))))))))))))))vvvvvvvvvvvvvvvvvvvvnot joining - already in progress"); +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION +#ifdef CHIP_9117 + case WFX_SEC_WPA3: + connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; + break; +#else + case WFX_SEC_WPA3: connect_security_mode = RSI_WPA3_TRANSITION; break; -//#endif +#endif // CHIP_9117 +#endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION + case WFX_SEC_NONE: + connect_security_mode = RSI_OPEN; + case WFX_SEC_NONE: connect_security_mode = RSI_OPEN; break; diff --git a/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h b/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h index 61b9af943baab3..a62bd96c564246 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h +++ b/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h @@ -41,37 +41,20 @@ #define RSI_TCP_IP_FEATURE_BIT_MAP (TCP_IP_FEAT_BYPASS /*| TCP_IP_FEAT_EXTENSION_VALID*/) //! To set Extended custom feature select bit map -// #if WIFI_ENABLE_SECURITY_WPA3 -// #ifdef CHIP_9117 -// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP -// (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_IEEE_80211W | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) -// #else -// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_384K_MODE | EXT_FEAT_IEEE_80211W) -// #endif /* CHIP_9117 */ -// #else -// #ifdef CHIP_9117 -// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) -// #else -// #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_384K_MODE -// #endif /* CHIP_9117 */ -// #endif /* WIFI_ENABLE_SECURITY_WPA3 */ - -//! To set Extended custom feature select bit map -#if WIFI_ENABLE_SECURITY_WPA3_TRANS -#define RSI_CUSTOM_FEATURE_BIT_MAP BIT(31) -#ifdef CHIP_9117 +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION + #ifdef CHIP_9117 #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ - (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_IEEE_80211W | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) -#else + (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE | EXT_FEAT_IEEE_80211W) +#else /* !CHIP_9117 */ #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_384K_MODE | EXT_FEAT_IEEE_80211W) #endif /* CHIP_9117 */ -#else -#ifdef CHIP_9117 +#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ + #ifdef CHIP_9117 #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) -#else +#else /* !CHIP_9117 */ #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_384K_MODE #endif /* CHIP_9117 */ -#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ //! To set Extended TCPIP feature select bit map #define RSI_EXT_TCPIP_FEATURE_BITMAP (/*EXT_FEAT_HTTP_OTAF_SUPPORT |*/ EXT_TCP_IP_SSL_16K_RECORD) @@ -259,17 +242,11 @@ #define RSI_POWER_LEVEL RSI_POWER_LEVEL_HIGH //! RSI_JOIN_FEAT_STA_BG_ONLY_MODE_ENABLE or RSI_JOIN_FEAT_LISTEN_INTERVAL_VALID -// #if WIFI_ENABLE_SECURITY_WPA3 -// #define RSI_JOIN_FEAT_BIT_MAP RSI_JOIN_FEAT_MFP_CAPABLE_REQUIRED -// #else -// #define RSI_JOIN_FEAT_BIT_MAP 0 -// #endif - -#if WIFI_ENABLE_SECURITY_WPA3_TRANS +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION #define RSI_JOIN_FEAT_BIT_MAP RSI_JOIN_FEAT_MFP_CAPABLE_ONLY #else #define RSI_JOIN_FEAT_BIT_MAP 0 -#endif +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ #define RSI_LISTEN_INTERVAL 0 diff --git a/src/platform/silabs/efr32/wifi/wfx_host_events.h b/src/platform/silabs/efr32/wifi/wfx_host_events.h index a4f28dc5b00ce6..3c9d12be5dff6e 100644 --- a/src/platform/silabs/efr32/wifi/wfx_host_events.h +++ b/src/platform/silabs/efr32/wifi/wfx_host_events.h @@ -240,7 +240,6 @@ typedef enum WFX_SEC_WPA = 3, WFX_SEC_WPA2 = 4, WFX_SEC_WPA3 = 5, - WFX_SEC_WPA3_TRANSITION = 6 } wfx_sec_t; typedef struct From 986a31f079680f4a6081c125c6478319a67a03ea Mon Sep 17 00:00:00 2001 From: yap Date: Tue, 20 Jun 2023 11:56:31 +0530 Subject: [PATCH 03/11] wpa3 transition name changes --- examples/platform/silabs/SiWx917/BUILD.gn | 2 +- examples/platform/silabs/efr32/BUILD.gn | 4 ++-- examples/platform/silabs/efr32/rs911x/rsi_if.c | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 2c9d5df47024e3..2d8ec861663b3a 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -219,7 +219,7 @@ config("silabs-wifi-config") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } - if (rs91x_wpa3_trans) { + if (rs91x_wpa3_transition) { defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANSITION=1" ] } } diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 2c020720b9f581..5d607dc51579ff 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -31,7 +31,7 @@ declare_args() { sl_wfx_config_scan = true # Argument to force enable WPA3 security on rs91x - rs91x_wpa3_trans = false + rs91x_wpa3_transition = false #default WiFi SSID chip_default_wifi_ssid = "" @@ -254,7 +254,7 @@ config("silabs-wifi-config") { if (chip_enable_wifi_ipv4) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } - if (rs91x_wpa3_trans) { + if (rs91x_wpa3_transition) { # TODO: Change this macro once WF200 support is provided defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANS=1" ] } diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index 7539cf9adc9dc3..8ad02e88dd367c 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -448,7 +448,7 @@ static void wfx_rsi_save_ap_info() // translation case SME_WEP: wfx_rsi.sec.security = WFX_SEC_WEP; break; - case SME_WPA3_TRANSITIONITION: + case SME_WPA3_TRANSITION: #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case SME_WPA3: wfx_rsi.sec.security = WFX_SEC_WPA3; @@ -504,9 +504,6 @@ static void wfx_rsi_do_join(void) break; #endif // CHIP_9117 #endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION - case WFX_SEC_NONE: - connect_security_mode = RSI_OPEN; - case WFX_SEC_NONE: connect_security_mode = RSI_OPEN; break; From 650dade9839af5807c9134ff2aaf74741d03d10b Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 20 Jun 2023 06:45:08 +0000 Subject: [PATCH 04/11] Restyled by clang-format --- examples/platform/silabs/efr32/rs911x/rsi_if.c | 4 ++-- examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index 8ad02e88dd367c..f3114ff2aa169a 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -422,7 +422,7 @@ static void wfx_rsi_save_ap_info() // translation */ #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION wfx_rsi.sec.security = WFX_SEC_WPA3; -#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ +#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ wfx_rsi.sec.security = WFX_SEC_WPA2; #endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ SILABS_LOG("%s: warn: failed with status: %02x", __func__, status); @@ -502,7 +502,7 @@ static void wfx_rsi_do_join(void) case WFX_SEC_WPA3: connect_security_mode = RSI_WPA3_TRANSITION; break; -#endif // CHIP_9117 +#endif // CHIP_9117 #endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_NONE: connect_security_mode = RSI_OPEN; diff --git a/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h b/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h index a62bd96c564246..96bd71bb80539a 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h +++ b/examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h @@ -42,14 +42,14 @@ //! To set Extended custom feature select bit map #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION - #ifdef CHIP_9117 +#ifdef CHIP_9117 #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE | EXT_FEAT_IEEE_80211W) #else /* !CHIP_9117 */ #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_384K_MODE | EXT_FEAT_IEEE_80211W) #endif /* CHIP_9117 */ #else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ - #ifdef CHIP_9117 +#ifdef CHIP_9117 #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE) #else /* !CHIP_9117 */ #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_384K_MODE @@ -248,7 +248,6 @@ #define RSI_JOIN_FEAT_BIT_MAP 0 #endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ - #define RSI_LISTEN_INTERVAL 0 //! Transmission data rate. Physical rate at which data has to be transmitted. From 065368309fe20fd21e959159e92e57144467a86f Mon Sep 17 00:00:00 2001 From: yap Date: Tue, 20 Jun 2023 12:39:38 +0530 Subject: [PATCH 05/11] adding the wpa3 transition support for 917 ncp --- examples/platform/silabs/SiWx917/SiWx917/rsi_if.c | 2 +- examples/platform/silabs/efr32/rs911x/rsi_if.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c index d71298e5c82c3a..0f58a2154419eb 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c @@ -389,7 +389,7 @@ static void wfx_rsi_save_ap_info() case SME_WPA3_TRANSITION: #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case SME_WPA3: - wfx_rsi.sec.security = RSI_WPA3_PERSONAL; + wfx_rsi.sec.security = RSI_WPA3_PERSONAL_TRANSITION; #else wfx_rsi.sec.security = WFX_SEC_WPA2; #endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index f3114ff2aa169a..3299c23674adff 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -494,15 +494,14 @@ static void wfx_rsi_do_join(void) connect_security_mode = RSI_WPA_WPA2_MIXED; break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION -#ifdef CHIP_9117 case WFX_SEC_WPA3: + #ifdef CHIP_9117 connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; - break; -#else - case WFX_SEC_WPA3: + #else + /* TODO: RSI_WPA3_TRANSITION to RSI_WPA3_PERSONAL_TRANSITION in coming release */ connect_security_mode = RSI_WPA3_TRANSITION; - break; #endif // CHIP_9117 + break; #endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_NONE: connect_security_mode = RSI_OPEN; From 6b017ab238ce5fb2028df1913af3310c6f575f75 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 20 Jun 2023 07:10:14 +0000 Subject: [PATCH 06/11] Restyled by whitespace --- examples/platform/silabs/efr32/rs911x/rsi_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index 3299c23674adff..8da87461985d06 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -495,9 +495,9 @@ static void wfx_rsi_do_join(void) break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_WPA3: - #ifdef CHIP_9117 + #ifdef CHIP_9117 connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; - #else + #else /* TODO: RSI_WPA3_TRANSITION to RSI_WPA3_PERSONAL_TRANSITION in coming release */ connect_security_mode = RSI_WPA3_TRANSITION; #endif // CHIP_9117 From 69ee703444af93acb7bc1a30308414b1bb904fb1 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 20 Jun 2023 07:10:15 +0000 Subject: [PATCH 07/11] Restyled by clang-format --- examples/platform/silabs/efr32/rs911x/rsi_if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index 8da87461985d06..5068f56d99f64d 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -495,10 +495,10 @@ static void wfx_rsi_do_join(void) break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_WPA3: - #ifdef CHIP_9117 +#ifdef CHIP_9117 connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; - #else - /* TODO: RSI_WPA3_TRANSITION to RSI_WPA3_PERSONAL_TRANSITION in coming release */ +#else + /* TODO: RSI_WPA3_TRANSITION to RSI_WPA3_PERSONAL_TRANSITION in coming release */ connect_security_mode = RSI_WPA3_TRANSITION; #endif // CHIP_9117 break; From cbf72d9183b10ec4ffc787ba092684b175700ed8 Mon Sep 17 00:00:00 2001 From: yap Date: Tue, 20 Jun 2023 14:41:12 +0530 Subject: [PATCH 08/11] wpa3 transition name changes --- examples/platform/silabs/efr32/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 5d607dc51579ff..4a7119dbc5398b 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -256,7 +256,7 @@ config("silabs-wifi-config") { } if (rs91x_wpa3_transition) { # TODO: Change this macro once WF200 support is provided - defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANS=1" ] + defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANSITION=1" ] } } From 79f4cc9d90c526746345c1fbebc6d6243ac96f74 Mon Sep 17 00:00:00 2001 From: yap Date: Tue, 20 Jun 2023 15:15:46 +0530 Subject: [PATCH 09/11] wpa3 transition personal --- examples/platform/silabs/efr32/rs911x/rsi_if.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index 5068f56d99f64d..d0d5844448d618 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -495,12 +495,7 @@ static void wfx_rsi_do_join(void) break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_WPA3: -#ifdef CHIP_9117 - connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; -#else - /* TODO: RSI_WPA3_TRANSITION to RSI_WPA3_PERSONAL_TRANSITION in coming release */ connect_security_mode = RSI_WPA3_TRANSITION; -#endif // CHIP_9117 break; #endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_NONE: From 278f4f7eb27314099161c6ed41616c0214c5a144 Mon Sep 17 00:00:00 2001 From: yap Date: Tue, 20 Jun 2023 15:25:24 +0530 Subject: [PATCH 10/11] removing wpa3 transition personal --- examples/platform/silabs/SiWx917/SiWx917/rsi_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c index 0f58a2154419eb..6f9afa54e23f8b 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c @@ -389,7 +389,7 @@ static void wfx_rsi_save_ap_info() case SME_WPA3_TRANSITION: #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case SME_WPA3: - wfx_rsi.sec.security = RSI_WPA3_PERSONAL_TRANSITION; + wfx_rsi.sec.security = RSI_WPA3; #else wfx_rsi.sec.security = WFX_SEC_WPA2; #endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ @@ -431,7 +431,7 @@ static void wfx_rsi_do_join(void) break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_WPA3: - connect_security_mode = RSI_WPA3_PERSONAL_TRANSITION; + connect_security_mode = RSI_WPA3_TRANSITION; break; #endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ case WFX_SEC_NONE: From b9e0b0d6c53718171367eb235c172c85cec340b6 Mon Sep 17 00:00:00 2001 From: yap Date: Tue, 20 Jun 2023 17:27:27 +0530 Subject: [PATCH 11/11] changing comments --- scripts/examples/gn_silabs_example.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index 25d181efe26a7d..06f6ee57599c23 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -96,8 +96,8 @@ if [ "$#" == "0" ]; then Use to build the example with pigweed RPC ota_periodic_query_timeout_sec Periodic query timeout variable for OTA in seconds - rs91x_wpa3_only - Support for WPA3 only mode on RS91x + rs91x_wpa3_transition + Support for WPA3 transition mode on RS91x sl_matter_version Use provided software version at build time sl_matter_version_str