From 901b69f08763994cab4b337670ff05edad3b7793 Mon Sep 17 00:00:00 2001 From: Chirag Bansal Date: Mon, 4 Sep 2023 13:25:21 +0530 Subject: [PATCH] Setting the flag correctly in the callback --- examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c index 22032e33f4a928..8f738e36159dc6 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c @@ -162,6 +162,7 @@ int32_t wfx_rsi_disconnect() sl_status_t join_callback_handler(sl_wifi_event_t event, char * result, uint32_t result_length, void * arg) { + wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING); temp_reset = (wfx_wifi_scan_ext_t *) malloc(sizeof(wfx_wifi_scan_ext_t)); memset(temp_reset, 0, sizeof(wfx_wifi_scan_ext_t)); if (CHECK_IF_EVENT_FAILED(event)) @@ -169,7 +170,7 @@ sl_status_t join_callback_handler(sl_wifi_event_t event, char * result, uint32_t SILABS_LOG("F: Join Event received with %u bytes payload\n", result_length); callback_status = *(sl_status_t *) result; wfx_rsi.join_retries += 1; - wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED); + wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTED); wfx_retry_interval_handler(is_wifi_disconnection_event, wfx_rsi.join_retries++); if (is_wifi_disconnection_event || wfx_rsi.join_retries <= WFX_RSI_CONFIG_MAX_JOIN) {