diff options
| author | Jeff Johnson <jjohnson@codeaurora.org> | 2017-03-10 11:01:53 -0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-14 22:23:24 -0700 |
| commit | a7fb6e9b8324deb0d071943903fb64ea9615b98f (patch) | |
| tree | 003bcf232d146aa81c5691d7aa7e6b83f4b9a357 | |
| parent | 25c36f8d3b130a897051f27d0db51f1300409a81 (diff) | |
qcacld-3.0: Fix HDD scan cleanup issues
While addressing the issue fixed by change "qcacld-3.0: Cleanup scan
queue during driver unload" a couple of issues were observed in the
HDD scan cleanup code:
1) list node was directly typecast to hdd_scan_req instead of using
container_of() operation.
2) hdd_scan_req_q_lock spinlock was not being destroyed.
Address these issues.
Change-Id: I6d1e7f5a78848d43e62f893b82f538b960ea0609
CRs-Fixed: 2018045
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 4 |
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); |
