Skip to content

Commit 1006104

Browse files
chirag-silabsrestyled-commits
authored andcommitted
[Silabs] Wifi bug fixes which were causing hardfault (#26092)
* Wifi small bug fixes * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent d6f7696 commit 1006104

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

examples/platform/silabs/SiWx917/SiWx917/rsi_if.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ static void wfx_rsi_save_ap_info()
357357
#else /* !WIFI_ENABLE_SECURITY_WPA3 */
358358
wfx_rsi.sec.security = WFX_SEC_WPA2;
359359
#endif /* WIFI_ENABLE_SECURITY_WPA3 */
360-
SILABS_LOG("%s: warn: failed with status: %02x", status);
360+
SILABS_LOG("%s: warn: failed with status: %02x", __func__, status);
361361
return;
362362
}
363363
else
@@ -429,7 +429,7 @@ static void wfx_rsi_do_join(void)
429429
connect_security_mode = RSI_OPEN;
430430
break;
431431
default:
432-
SILABS_LOG("%s: error: unknown security type.");
432+
SILABS_LOG("%s: error: unknown security type.", __func__);
433433
return;
434434
}
435435

examples/platform/silabs/efr32/rs911x/rsi_if.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static void wfx_rsi_save_ap_info() // translation
408408
#else /* !WIFI_ENABLE_SECURITY_WPA3 */
409409
wfx_rsi.sec.security = WFX_SEC_WPA2;
410410
#endif /* WIFI_ENABLE_SECURITY_WPA3 */
411-
SILABS_LOG("%s: warn: failed with status: %02x", status);
411+
SILABS_LOG("%s: warn: failed with status: %02x", __func__, status);
412412
return;
413413
}
414414
else
@@ -482,7 +482,7 @@ static void wfx_rsi_do_join(void)
482482
connect_security_mode = RSI_OPEN;
483483
break;
484484
default:
485-
SILABS_LOG("%s: error: unknown security type.");
485+
SILABS_LOG("%s: error: unknown security type.", __func__);
486486
return;
487487
}
488488

examples/platform/silabs/efr32/wf200/efr_spi.c

-8
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,6 @@ sl_status_t sl_wfx_host_enable_spi(void)
381381
{
382382
if (spi_enabled == false)
383383
{
384-
#ifdef SLEEP_ENABLED
385-
// Prevent the host to use lower EM than EM1
386-
sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1);
387-
#endif
388384
spi_enabled = true;
389385
}
390386
return SL_STATUS_OK;
@@ -403,10 +399,6 @@ sl_status_t sl_wfx_host_disable_spi(void)
403399
if (spi_enabled == true)
404400
{
405401
spi_enabled = false;
406-
#ifdef SLEEP_ENABLED
407-
// Allow the host to use the lowest allowed EM
408-
sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1);
409-
#endif
410402
}
411403
return SL_STATUS_OK;
412404
}

examples/platform/silabs/efr32/wf200/host_if.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ static void wfx_events_task(void * p_arg)
606606
if (!(wfx_get_wifi_state() & SL_WFX_AP_INTERFACE_UP))
607607
{
608608
// Enable the power save
609+
SILABS_LOG("WF200 going to DTIM based sleep");
609610
sl_wfx_set_power_mode(WFM_PM_MODE_DTIM, WFM_PM_POLL_FAST_PS, BEACON_1);
610611
sl_wfx_enable_device_power_save();
611612
}

0 commit comments

Comments
 (0)