From 8d1af37af9b7624fce00c1c749947659b170d368 Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Mon, 27 Apr 2020 21:48:46 +0530 Subject: [PATCH] qcacld-3.0: stop the bus bw timer during the driver unload When the driver unload is triggered, the device could be in the runtime suspend state, so the 1st thing driver does to do runtime resume, During this runtime resume the bus bw timer could be started which in some race conditions is not getting stopped. Stop the bus bandwidth timer after the wlan chip is runtime resume. Change-Id: Ie29f9b4d44cea5c5624020aa3b6b3f08489860d3 CRs-Fixed: 2672120 --- core/hdd/src/wlan_hdd_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 69b1d02fa8..47af027600 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -15530,8 +15530,14 @@ static void hdd_driver_unload(void) cds_set_driver_loaded(false); cds_set_unload_in_progress(true); - if (hdd_ctx) + if (hdd_ctx) { hdd_psoc_idle_timer_stop(hdd_ctx); + /* + * Runtime PM sync resume may have started the bus bandwidth + * periodic work hence stop it. + */ + hdd_bus_bw_compute_timer_stop(hdd_ctx); + } /* trigger SoC remove */ wlan_hdd_unregister_driver();