Skip to content

Commit

Permalink
[Silabs] Wifi bug fixes which were causing hardfault (#26092)
Browse files Browse the repository at this point in the history
* Wifi small bug fixes

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and pull[bot] committed Jul 13, 2023
1 parent 727ee19 commit 1054611
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 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 @@ -357,7 +357,7 @@ static void wfx_rsi_save_ap_info()
#else /* !WIFI_ENABLE_SECURITY_WPA3 */
wfx_rsi.sec.security = WFX_SEC_WPA2;
#endif /* WIFI_ENABLE_SECURITY_WPA3 */
SILABS_LOG("%s: warn: failed with status: %02x", status);
SILABS_LOG("%s: warn: failed with status: %02x", __func__, status);
return;
}
else
Expand Down Expand Up @@ -429,7 +429,7 @@ static void wfx_rsi_do_join(void)
connect_security_mode = RSI_OPEN;
break;
default:
SILABS_LOG("%s: error: unknown security type.");
SILABS_LOG("%s: error: unknown security type.", __func__);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions examples/platform/silabs/efr32/rs911x/rsi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static void wfx_rsi_save_ap_info() // translation
#else /* !WIFI_ENABLE_SECURITY_WPA3 */
wfx_rsi.sec.security = WFX_SEC_WPA2;
#endif /* WIFI_ENABLE_SECURITY_WPA3 */
SILABS_LOG("%s: warn: failed with status: %02x", status);
SILABS_LOG("%s: warn: failed with status: %02x", __func__, status);
return;
}
else
Expand Down Expand Up @@ -482,7 +482,7 @@ static void wfx_rsi_do_join(void)
connect_security_mode = RSI_OPEN;
break;
default:
SILABS_LOG("%s: error: unknown security type.");
SILABS_LOG("%s: error: unknown security type.", __func__);
return;
}

Expand Down
8 changes: 0 additions & 8 deletions examples/platform/silabs/efr32/wf200/efr_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,6 @@ sl_status_t sl_wfx_host_enable_spi(void)
{
if (spi_enabled == false)
{
#ifdef SLEEP_ENABLED
// Prevent the host to use lower EM than EM1
sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1);
#endif
spi_enabled = true;
}
return SL_STATUS_OK;
Expand All @@ -403,10 +399,6 @@ sl_status_t sl_wfx_host_disable_spi(void)
if (spi_enabled == true)
{
spi_enabled = false;
#ifdef SLEEP_ENABLED
// Allow the host to use the lowest allowed EM
sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1);
#endif
}
return SL_STATUS_OK;
}
Expand Down
1 change: 1 addition & 0 deletions examples/platform/silabs/efr32/wf200/host_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ static void wfx_events_task(void * p_arg)
if (!(wfx_get_wifi_state() & SL_WFX_AP_INTERFACE_UP))
{
// Enable the power save
SILABS_LOG("WF200 going to DTIM based sleep");
sl_wfx_set_power_mode(WFM_PM_MODE_DTIM, WFM_PM_POLL_FAST_PS, BEACON_1);
sl_wfx_enable_device_power_save();
}
Expand Down

0 comments on commit 1054611

Please sign in to comment.