summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Brown <dustinb@codeaurora.org>2017-11-29 11:08:11 -0800
committersnandini <snandini@codeaurora.org>2017-11-29 20:28:12 -0800
commit7321a6d98314eebaaccd770697df45ff13680ab5 (patch)
tree23d17783b10233b3ddff1e2cd2cc9fee11bbfcc1
parent2a1146c2f5df9e56ef6ab8d56468398453dc8a1a (diff)
qcacld-3.0: Close cds sched as part of cds_close()
cds_sched_open is called as part of cds_open, but cds_sched_close is called outside of cds_close. This leads to situations where the CDS scheduler is started but not properly closed. Move the call to cds_sched_close into cds_close, such that the CDS scheduler lifecycle is tied directly to the CDS core lifecycle, to prevent CDS from closing without closing the CDS scheduler. Change-Id: I440ec279e6b750a7b41ec05000fc66b6cebdb8d8 CRs-Fixed: 2151049
-rw-r--r--core/cds/src/cds_api.c5
-rw-r--r--core/hdd/src/wlan_hdd_main.c10
2 files changed, 5 insertions, 10 deletions
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index a563ae86da09..d67c346df6cc 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -957,6 +957,11 @@ QDF_STATUS cds_close(v_CONTEXT_t cds_context)
{
QDF_STATUS qdf_status;
+ qdf_status = cds_sched_close(cds_context);
+ QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
+ if (QDF_IS_STATUS_ERROR(qdf_status))
+ cds_err("Failed to close CDS Scheduler");
+
qdf_status = wma_wmi_work_close(cds_context);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 48e98cd1ac05..e8b85c5da778 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -10002,16 +10002,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode)
QDF_ASSERT(0);
}
- /*
- * Close the scheduler before calling cds_close to make sure
- * no thread is scheduled after the each module close is
- * is called i.e after all the data structures are freed.
- */
- qdf_status = cds_sched_close(hdd_ctx->pcds_context);
- QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
- if (QDF_IS_STATUS_ERROR(qdf_status))
- hdd_alert("Failed to close CDS Scheduler");
-
qdf_status = cds_close(hdd_ctx->pcds_context);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hdd_warn("Failed to stop CDS: %d", qdf_status);