Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

[nrf noup] zephyr: Fix possible race when getting scan results #138

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/drivers/driver_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,15 +962,16 @@ struct wpa_scan_results *wpa_drv_zep_get_scan_results2(void *priv)
goto out;
}

if_ctx->scan_res2_get_in_prog = true;

ret = dev_ops->get_scan_results2(if_ctx->dev_priv);

if (ret) {
wpa_printf(MSG_ERROR, "%s: get_scan_results2 op failed\n", __func__);
if_ctx->scan_res2_get_in_prog = false;
goto out;
}

if_ctx->scan_res2_get_in_prog = true;

k_sem_reset(&if_ctx->drv_resp_sem);
k_sem_take(&if_ctx->drv_resp_sem, K_SECONDS(SCAN_TIMEOUT));

Expand Down
Loading