From dd4e50fad1a442a321c5e8a029c8c716f9262644 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Thu, 24 May 2018 15:43:42 -0700 Subject: [PATCH] Revert "qcacld-3.0: Fix resource leaks when change con_mode" This reverts change If06be4c9627eb345fb52609351417b155d336a4e for the following reasons: 1) hdd_debug_domain_set() should never be called outside of module start/stop 2) It effectively reverts I2fade59d1e4a27620cecadb91f69866e79c85612 Change-Id: Id132c516dd2600110912539df37eb1932730fef1 CRs-Fixed: 2248600 --- core/hdd/src/wlan_hdd_main.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index de49dddec286..4fa158e4394e 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12568,23 +12568,17 @@ static int __con_mode_handler(const char *kmessage, /* ensure adapters are stopped */ hdd_stop_present_mode(hdd_ctx, curr_mode); - /* Cleanup present mode before switching to new mode */ - hdd_cleanup_present_mode(hdd_ctx, curr_mode); - ret = hdd_wlan_stop_modules(hdd_ctx, true); if (ret) { hdd_err("Stop wlan modules failed"); goto reset_flags; } + /* Cleanup present mode before switching to new mode */ + hdd_cleanup_present_mode(hdd_ctx, curr_mode); hdd_set_conparam(new_con_mode); - /* - * Set ACTIVE domain before adapters created, otherwise check domain - * match will fail when cleanup adapters. - */ - hdd_debug_domain_set(QDF_DEBUG_DOMAIN_ACTIVE); /* Register for new con_mode & then kick_start modules again */ ret = hdd_register_req_mode(hdd_ctx, new_con_mode); if (ret) {