Merge branch 'fix/roam_scan_ongoing_flag_set_v5.3' into 'release/v5.3'

Set and unset roam scan ongoing flag properly(v5.3)

See merge request espressif/esp-idf!46240
This commit is contained in:
Jiang Jiang Jian
2026-03-12 11:14:52 +08:00
3 changed files with 5 additions and 4 deletions
@@ -650,7 +650,8 @@ static void conduct_scan(void)
gettimeofday(&g_roaming_app.scanned_aps.time, NULL);
/* Issue scan */
os_memset(&g_roaming_app.scanned_aps, 0, sizeof(struct scanned_ap_info));
if (esp_wifi_promiscuous_scan_start(&g_roaming_app.config.scan_config, scan_done_event_handler) < 0) {
/* Issue scan */
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");
return;
}
@@ -253,7 +253,7 @@ static int issue_scan(struct wpa_supplicant *wpa_s,
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);
/* 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;
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;
uint8_t cand_list = 0;
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;
if (!pos) {
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 */
wifi_scan_config_t params;
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;
}
/* cleanup from net802.11 */