From 077f1fe6895af82fd97c0689720eea373305ba1f Mon Sep 17 00:00:00 2001 From: poyamini <108741504+poyamini@users.noreply.github.com> Date: Tue, 26 Sep 2023 19:43:53 +0530 Subject: [PATCH] [Silabs] Adding wpa3 transition support for SoC (#29346) * Adding wpa3 transition support for SoC * restyled * build failure fix --------- Co-authored-by: srningap <107042150+srningap@users.noreply.github.com> --- .../platform/silabs/SiWx917/SiWx917/sl_wifi_if.c | 5 ++++- src/platform/silabs/rs911x/rsi_ble_config.h | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c index 6b7801e1fac3cc..82bf3794f4bdda 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c @@ -310,6 +310,7 @@ sl_status_t scan_callback_handler(sl_wifi_event_t event, sl_wifi_scan_result_t * break; case SL_WIFI_WPA: case SL_WIFI_WPA_ENTERPRISE: + case SL_WIFI_WPA_WPA2_MIXED: wfx_rsi.sec.security = WFX_SEC_WPA; break; case SL_WIFI_WPA2: @@ -429,9 +430,11 @@ static sl_status_t wfx_rsi_do_join(void) case WFX_SEC_WPA2: connect_security_mode = SL_WIFI_WPA_WPA2_MIXED; break; +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION case WFX_SEC_WPA3: - connect_security_mode = SL_WIFI_WPA3; + connect_security_mode = SL_WIFI_WPA3_TRANSITION; break; +#endif /*WIFI_ENABLE_SECURITY_WPA3_TRANSITION*/ case WFX_SEC_NONE: connect_security_mode = SL_WIFI_OPEN; break; diff --git a/src/platform/silabs/rs911x/rsi_ble_config.h b/src/platform/silabs/rs911x/rsi_ble_config.h index 89ec2f81873f58..3e2e6b13378707 100644 --- a/src/platform/silabs/rs911x/rsi_ble_config.h +++ b/src/platform/silabs/rs911x/rsi_ble_config.h @@ -271,13 +271,23 @@ #define RSI_TCP_IP_FEATURE_BIT_MAP \ (SL_SI91X_TCP_IP_FEAT_DHCPV4_CLIENT) //! TCP/IP feature select bitmap for selecting TCP/IP features #define RSI_CUSTOM_FEATURE_BIT_MAP SL_SI91X_FEAT_CUSTOM_FEAT_EXTENTION_VALID //! To set custom feature select bit map -#ifdef CHIP_917 +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION // Adding Support for WPA3 transition +#ifdef CHIP_9117 +#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ + (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(1) | RAM_LEVEL_NWP_BASIC_MCU_ADV | \ + SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0 | SL_SI91X_EXT_FEAT_IEEE_80211W) +#else +#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(2)) +#endif /* CHIP_9117 */ +#else +#ifdef CHIP_9117 #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(1) | RAM_LEVEL_NWP_BASIC_MCU_ADV | \ SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0) #else #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(2)) -#endif +#endif /* CHIP_9117 */ +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ #define RSI_EXT_TCPIP_FEATURE_BITMAP 0 #define RSI_BT_FEATURE_BITMAP (SL_SI91X_BT_RF_TYPE | SL_SI91X_ENABLE_BLE_PROTOCOL) #define RSI_CONFIG_FEATURE_BITMAP 0