summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Kumar Dhanotiya <adhanoti@codeaurora.org>2017-01-24 16:37:34 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-04 00:46:49 -0800
commit20e833937f65dc0176b7962d44f1b7ac78d4dc42 (patch)
tree801e09138f605dfec6ce9b174683a48980759913
parent72d473139104812ce87716be08181cee74d2e8df (diff)
qcacld-3.0: Check the device status during hdd cleanup of present mode
On a change of the mode ( from the current one to the FTM mode ) , the clean up of the adapters are again done though they are already cleaned ( signified by device_status = DRIVER_MODULES_CLOSED ). Hence check for this device_status while to avoid a redundant clean up of the adapters. Change-Id: I2a851b235809db5cd47ec5d738067d1553f83129 CRs-Fixed: 1115243
-rw-r--r--core/hdd/src/wlan_hdd_main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 8c459d976c39..d7755923db75 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -9665,12 +9665,18 @@ static enum tQDF_ADAPTER_MODE hdd_get_adpter_mode(
static void hdd_cleanup_present_mode(hdd_context_t *hdd_ctx,
enum tQDF_GLOBAL_CON_MODE curr_mode)
{
+ int driver_status;
+
+ driver_status = hdd_ctx->driver_status;
+
switch (curr_mode) {
case QDF_GLOBAL_MISSION_MODE:
case QDF_GLOBAL_MONITOR_MODE:
case QDF_GLOBAL_FTM_MODE:
- hdd_abort_mac_scan_all_adapters(hdd_ctx);
- hdd_stop_all_adapters(hdd_ctx);
+ if (driver_status != DRIVER_MODULES_CLOSED) {
+ hdd_abort_mac_scan_all_adapters(hdd_ctx);
+ hdd_stop_all_adapters(hdd_ctx);
+ }
hdd_deinit_all_adapters(hdd_ctx, false);
hdd_close_all_adapters(hdd_ctx, false);
break;