From 0b793cce32bef6aa607ec46de6cecc8f80e2ca15 Mon Sep 17 00:00:00 2001 From: rosahay-silabs Date: Tue, 7 Mar 2023 21:20:35 +0530 Subject: [PATCH 1/3] Adds fix for #25500 --- src/platform/silabs/NetworkCommissioningWiFiDriver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp index 65931fce7059bb..f3a745773d8092 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp @@ -194,22 +194,22 @@ void SlWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback } } -chip::BitFlags SlWiFiDriver::ConvertSecuritytype(uint8_t security) +chip::BitFlags SlWiFiDriver::ConvertSecuritytype(wfx_sec_t security) { chip::BitFlags securityType; if (security == WFX_SEC_NONE) { securityType = WiFiSecurity::kUnencrypted; } - else if (security & WFX_SEC_WEP) + else if (security == WFX_SEC_WEP) { securityType = WiFiSecurity::kWep; } - else if (security & WFX_SEC_WPA) + else if (security == WFX_SEC_WPA) { securityType = WiFiSecurity::kWpaPersonal; } - else if (security & WFX_SEC_WPA2) + else if (security == WFX_SEC_WPA2) { securityType = WiFiSecurity::kWpa2Personal; } From 8c5dc7632ff1b7d27a0a10dea36d271ce4c7aa45 Mon Sep 17 00:00:00 2001 From: rosahay-silabs Date: Tue, 7 Mar 2023 23:11:42 +0530 Subject: [PATCH 2/3] Adds missed code change in header of function --- src/platform/silabs/NetworkCommissioningWiFiDriver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.h b/src/platform/silabs/NetworkCommissioningWiFiDriver.h index d311b11dda43a7..7e7dad3f3e9cdc 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.h +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.h @@ -120,7 +120,7 @@ class SlWiFiDriver final : public WiFiDriver CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); - chip::BitFlags ConvertSecuritytype(uint8_t security); + chip::BitFlags ConvertSecuritytype(wfx_sec_t security); void OnConnectWiFiNetwork(); static SlWiFiDriver & GetInstance() From 14e0fa1bceb0ab002713fa1257a8919a3aa4c63d Mon Sep 17 00:00:00 2001 From: rosahay-silabs Date: Wed, 8 Mar 2023 08:14:32 +0530 Subject: [PATCH 3/3] Adds build fix for SiWx917 --- 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 d2e3a5124695dc..e491e0f93682e5 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c @@ -473,8 +473,8 @@ static void wfx_rsi_do_join(void) /* Call rsi connect call with given ssid and password * And check there is a success */ - if ((status = rsi_wlan_connect_async((int8_t *) &wfx_rsi.sec.ssid[0], (rsi_security_mode_t) wfx_rsi.sec.security, - &wfx_rsi.sec.passkey[0], wfx_rsi_join_cb)) != RSI_SUCCESS) + if ((status = rsi_wlan_connect_async((int8_t *) &wfx_rsi.sec.ssid[0], connect_security_mode, &wfx_rsi.sec.passkey[0], + wfx_rsi_join_cb)) != RSI_SUCCESS) { wfx_rsi.dev_state &= ~WFX_RSI_ST_STA_CONNECTING;