From 857cb8464faae4de2fc06b1749c8151557787635 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Sun, 28 Apr 2019 04:55:17 -0400 Subject: [PATCH] qcacld-3.0: deregister policy mgr cb upon stop modules There is chance that some active thread is running and skip stop modules. In that case driver should not deregister policy mgr callback. Call hdd_deregister_policy_manager_callback after active thread check when stop modules. Change-Id: I5fe3e438e87da0b333ae9b20994e58228fa67918 CRs-Fixed: 2443271 --- core/hdd/src/wlan_hdd_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index ee6ff182e2..d6c2ff5d63 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11223,9 +11223,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) struct target_psoc_info *tgt_hdl; hdd_enter(); - - hdd_deregister_policy_manager_callback(hdd_ctx->psoc); - qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE); if (!qdf_ctx) { hdd_err("QDF device context NULL"); @@ -11248,6 +11245,8 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) } } + hdd_deregister_policy_manager_callback(hdd_ctx->psoc); + /* free user wowl patterns */ hdd_free_user_wowl_ptrns();