From a4cedce6e0b7b0511eb867a261ebea50ae01c98d Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Mon, 25 Nov 2019 20:03:09 +0530 Subject: [PATCH] qcacld-3.0: Flush the bandwidth work properly in shutdown In case interface timer has expired and modules have been stopped and there is an SSR the bus bandwidth work is not properly destroyed. Destroy the work before checking for status of modules state since the work will be re-initialized. Change-Id: Ie3b8f7d6d0fe1261f9f3c412e933748fb7637ca7 CRs-Fixed: 2573341 --- core/hdd/src/wlan_hdd_driver_ops.c | 2 ++ core/hdd/src/wlan_hdd_power.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 5d21a8638caa..6b1d8cf03269 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -774,6 +774,8 @@ static void __hdd_soc_recovery_shutdown(void) /* cancel/flush any pending/active idle shutdown work */ hdd_psoc_idle_timer_stop(hdd_ctx); + hdd_bus_bw_compute_timer_stop(hdd_ctx); + hdd_bus_bandwidth_deinit(hdd_ctx); /* nothing to do if the soc is already unloaded */ if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) { diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 994e43fbe254..8dc590105d79 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1296,7 +1296,6 @@ QDF_STATUS hdd_wlan_shutdown(void) return QDF_STATUS_E_FAILURE; } - hdd_bus_bw_compute_timer_stop(hdd_ctx); hdd_set_connection_in_progress(false); policy_mgr_clear_concurrent_session_count(hdd_ctx->psoc); @@ -1346,7 +1345,6 @@ QDF_STATUS hdd_wlan_shutdown(void) hdd_wlan_stop_modules(hdd_ctx, false); - hdd_bus_bandwidth_deinit(hdd_ctx); hdd_lpass_notify_stop(hdd_ctx); hdd_info("WLAN driver shutdown complete");