From c88bfc6f5a330fb56cd408ec8701e76870351977 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Wed, 5 Feb 2020 11:39:13 -0800 Subject: [PATCH] qcacld-3.0: Trigger runtime pm sync resume during driver unload Runtime PM needs to be sync resumed during driver unload. Hence, call runtime pm sync resume during driver unload. Change-Id: I20423871a82f33fcbaa3a64d741022f128785075 CRs-Fixed: 2615676 --- core/hdd/src/wlan_hdd_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index ec440b8fbfa1..10db1db79b93 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -15035,10 +15035,23 @@ static void hdd_driver_unload(void) struct osif_driver_sync *driver_sync; struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); QDF_STATUS status; + void *hif_ctx; pr_info("%s: Unloading driver v%s\n", WLAN_MODULE_NAME, QWLAN_VERSIONSTR); + hif_ctx = cds_get_context(QDF_MODULE_ID_HIF); + if (!hif_ctx) { + hdd_err_rl("hif context is Null"); + return; + } + + /* + * Trigger runtime sync resume before setting unload in progress + * such that resume can happen successfully + */ + hif_pm_runtime_sync_resume(hif_ctx); + cds_set_driver_loaded(false); cds_set_unload_in_progress(true);