fix(roam) : Set and unset roam scan ongoing flag properly

This commit is contained in:
tarun.kumar
2026-03-12 14:34:05 +08:00
committed by BOT
parent d1733defe6
commit 0d7a3416bc
3 changed files with 4 additions and 4 deletions
@@ -784,7 +784,7 @@ static bool conduct_scan(void)
gettimeofday(&g_roaming_app.scanned_aps.time, NULL); gettimeofday(&g_roaming_app.scanned_aps.time, NULL);
os_memset(&g_roaming_app.scanned_aps, 0, sizeof(struct scanned_ap_info)); os_memset(&g_roaming_app.scanned_aps, 0, sizeof(struct scanned_ap_info));
/* Issue scan */ /* Issue scan */
if (esp_wifi_promiscuous_scan_start(&g_roaming_app.config.scan_config, scan_done_event_handler) < 0) { if (esp_wifi_promiscuous_scan_start(&g_roaming_app.config.scan_config, scan_done_event_handler) != ESP_OK) {
ESP_LOGE(ROAMING_TAG, "failed to issue scan"); ESP_LOGE(ROAMING_TAG, "failed to issue scan");
return false; return false;
} }
@@ -262,7 +262,7 @@ static int issue_scan(struct wpa_supplicant *wpa_s,
typedef void (* scan_done_cb_t)(void *arg, ETS_STATUS status); typedef void (* scan_done_cb_t)(void *arg, ETS_STATUS status);
extern int esp_wifi_promiscuous_scan_start(wifi_scan_config_t *config, scan_done_cb_t cb); extern int esp_wifi_promiscuous_scan_start(wifi_scan_config_t *config, scan_done_cb_t cb);
/* issue scan */ /* issue scan */
if (esp_wifi_promiscuous_scan_start(params, scan_done_event_handler) < 0) { if (esp_wifi_promiscuous_scan_start(params, scan_done_event_handler) != ESP_OK) {
ret = -1; ret = -1;
goto cleanup; goto cleanup;
} }
@@ -325,7 +325,7 @@ static void esp_neighbor_report_recv_handler(void* arg, esp_event_base_t event_b
g_neighbor_report_active = false; g_neighbor_report_active = false;
uint8_t cand_list = 0; uint8_t cand_list = 0;
wifi_event_neighbor_report_t *neighbor_report_event = (wifi_event_neighbor_report_t*)event_data; wifi_event_neighbor_report_t *neighbor_report_event = (wifi_event_neighbor_report_t*)event_data;
uint8_t *pos = (uint8_t *)neighbor_report_event->report; uint8_t *pos = (uint8_t *)neighbor_report_event->n_report;
char * neighbor_list = NULL; char * neighbor_list = NULL;
if (!pos) { if (!pos) {
ESP_LOGE(TAG, "Neighbor report is empty"); ESP_LOGE(TAG, "Neighbor report is empty");
@@ -343,7 +343,7 @@ static void esp_neighbor_report_recv_handler(void* arg, esp_event_base_t event_b
/* issue scan */ /* issue scan */
wifi_scan_config_t params; wifi_scan_config_t params;
memset(&params, 0, sizeof(wifi_scan_config_t)); memset(&params, 0, sizeof(wifi_scan_config_t));
if (esp_wifi_scan_start(&params, true) < 0) { if (esp_wifi_scan_start(&params, true) != ESP_OK) {
goto cleanup; goto cleanup;
} }
/* cleanup from net802.11 */ /* cleanup from net802.11 */