From cd522439bc7775218e7b9a6f961a2f418a40208b Mon Sep 17 00:00:00 2001 From: rosahay-silabs Date: Tue, 7 Mar 2023 21:20:35 +0530 Subject: [PATCH] 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; }