From dd109f4cf43dca3d759a4f51764d7cd9d2ff353c Mon Sep 17 00:00:00 2001 From: shgutte Date: Thu, 19 Oct 2023 18:22:29 +0530 Subject: [PATCH] Added changes for power cycle --- examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c index acbaa958c30bec..68d28ab979ac3f 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c @@ -414,7 +414,7 @@ static void wfx_rsi_save_ap_info() // translation if (SL_STATUS_IN_PROGRESS == status) { uint32_t start = osKernelGetTickCount(); - while (!scan_results_complete || (osKernelGetTickCount() - start) <= WIFI_SCAN_TIMEOUT_TICK) + while (!scan_results_complete && (osKernelGetTickCount() - start) <= WIFI_SCAN_TIMEOUT_TICK) { osThreadYield(); } @@ -636,8 +636,12 @@ void wfx_rsi_task(void * arg) } if (flags & WFX_EVT_STA_START_JOIN) { - // saving the AP related info - wfx_rsi_save_ap_info(); + if(!(wfx_rsi.join_retries > 0)) { + // saving the AP related info + wfx_rsi_save_ap_info(); + } + + // Joining to the network status = wfx_rsi_do_join(); }