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
This commit is contained in:
Dustin Brown 2017-11-29 11:08:11 -08:00 committed by snandini
parent 0411bc9be0
commit d33276b0e3
2 changed files with 5 additions and 10 deletions

View File

@ -1122,6 +1122,11 @@ QDF_STATUS cds_close(struct wlan_objmgr_psoc *psoc)
{
QDF_STATUS qdf_status;
qdf_status = cds_sched_close();
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
if (QDF_IS_STATUS_ERROR(qdf_status))
cds_err("Failed to close CDS Scheduler");
dispatcher_psoc_close(psoc);
qdf_status = wma_wmi_work_close();

View File

@ -9781,16 +9781,6 @@ int hdd_wlan_stop_modules(struct hdd_context *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();
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->hdd_psoc);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hdd_warn("Failed to stop CDS: %d", qdf_status);