Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs] Adds fix for #25500 #25529

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/platform/silabs/SiWx917/SiWx917/rsi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/platform/silabs/NetworkCommissioningWiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,22 +194,22 @@ void SlWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback
}
}

chip::BitFlags<WiFiSecurity> SlWiFiDriver::ConvertSecuritytype(uint8_t security)
chip::BitFlags<WiFiSecurity> SlWiFiDriver::ConvertSecuritytype(wfx_sec_t security)
{
chip::BitFlags<WiFiSecurity> 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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/NetworkCommissioningWiFiDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<WiFiSecurity> ConvertSecuritytype(uint8_t security);
chip::BitFlags<WiFiSecurity> ConvertSecuritytype(wfx_sec_t security);

void OnConnectWiFiNetwork();
static SlWiFiDriver & GetInstance()
Expand Down