diff options
| author | Hanumanth Reddy Pothula <c_hpothu@codeaurora.org> | 2018-03-22 19:30:08 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-03-23 05:01:48 -0700 |
| commit | d99f08ab6cdfbfc4750325f9085872a89dcb663f (patch) | |
| tree | 8073aa6c31d8c01a9103054e63373832f8fb621e | |
| parent | 2f7ab0312997bec363a6f9d2431dc54f117e0e0c (diff) | |
qcacld-3.0: Flush message queues before sending suspend event to firmware
There is a possibility of driver to post a command to firmware
after sending suspend indication, leading firmware to go bad
state.
To mitigate this issue flush all MC thread message queues before
posting suspend event to firmware.
Change-Id: I7a94d120fb73192d06165c3c5261e2fcec92458a
CRs-Fixed: 2207306
| -rw-r--r-- | core/cds/src/cds_api.c | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 536d50843bc6..c5086b1ae806 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -915,6 +915,10 @@ QDF_STATUS cds_post_disable(void) return QDF_STATUS_E_INVAL; } + /* Clean up all MC thread message queues */ + if (gp_cds_sched_context) + cds_sched_flush_mc_mqs(gp_cds_sched_context); + /* * With new state machine changes cds_close can be invoked without * cds_disable. So, send the following clean up prerequisites to fw, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 17b21ac6e20c..7daec3f41fcd 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10416,7 +10416,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode) qdf_device_t qdf_ctx; QDF_STATUS qdf_status; int ret = 0; - p_cds_sched_context cds_sched_context = NULL; bool is_unload_stop = cds_is_driver_unloading(); bool is_recover_stop = cds_is_driver_recovering(); bool is_idle_stop = !is_unload_stop && !is_recover_stop; @@ -10513,13 +10512,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode) QDF_ASSERT(0); } - /* Clean up message queues of TX, RX and MC thread */ - if (!is_recover_stop) { - cds_sched_context = get_cds_sched_ctxt(); - if (cds_sched_context) - cds_sched_flush_mc_mqs(cds_sched_context); - } - hif_ctx = cds_get_context(QDF_MODULE_ID_HIF); if (!hif_ctx) { hdd_err("Hif context is Null"); |
