summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 1f97c66111e1..a97564e53fa6 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -3313,7 +3313,7 @@ void hdd_cleanup_scan_queue(hdd_context_t *hdd_ctx)
return;
}
qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_scan_req = (struct hdd_scan_req *)node;
+ hdd_scan_req = container_of(node, struct hdd_scan_req, node);
req = hdd_scan_req->scan_request;
source = hdd_scan_req->source;
adapter = hdd_scan_req->adapter;
@@ -3346,6 +3346,7 @@ void hdd_cleanup_scan_queue(hdd_context_t *hdd_ctx)
void hdd_scan_context_destroy(hdd_context_t *hdd_ctx)
{
qdf_list_destroy(&hdd_ctx->hdd_scan_req_q);
+ qdf_spinlock_destroy(&hdd_ctx->hdd_scan_req_q_lock);
qdf_spinlock_destroy(&hdd_ctx->sched_scan_lock);
}
@@ -3360,7 +3361,6 @@ void hdd_scan_context_destroy(hdd_context_t *hdd_ctx)
int hdd_scan_context_init(hdd_context_t *hdd_ctx)
{
qdf_spinlock_create(&hdd_ctx->sched_scan_lock);
-
qdf_spinlock_create(&hdd_ctx->hdd_scan_req_q_lock);
qdf_list_create(&hdd_ctx->hdd_scan_req_q, CFG_MAX_SCAN_COUNT_MAX);