Skip to content

Commit

Permalink
[Silabs] Adds fix for #25500 (#25529)
Browse files Browse the repository at this point in the history
* Adds fix for #25500

* Adds missed code change in header of function

* Adds build fix for SiWx917
  • Loading branch information
rosahay-silabs authored and pull[bot] committed Aug 10, 2023
1 parent 46e93e9 commit 5b97fef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
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

0 comments on commit 5b97fef

Please sign in to comment.