From f8511dcee4f697bbde51a5c99e55500b558fb185 Mon Sep 17 00:00:00 2001 From: Mukul Sharma Date: Mon, 26 Oct 2015 12:54:44 +0530 Subject: [PATCH] qcacld-3.0: Avoid SSR injection when driver load is in progress Propagation qcacld-2.0 to qcacld-3.0 Host avoid SSR injection ioctl using hdd->isLoadInProgress, But ol_target_failure handler checks for the cds_set_load_unload_in_progress. As these two flags are not set back to back so there is possible time window in which SSR ioctl is allowed but ol target failure handling is not allowed. Change-Id: Ib97d3693f82f6ca94fa048a8120786065e99087a CRs-Fixed: 913741 --- core/hdd/src/wlan_hdd_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 669943275857..0a81fc36d9de 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5265,8 +5265,6 @@ ftm_processing: mutex_init(&hdd_ctx->sap_lock); - hdd_ctx->isLoadInProgress = false; - #if defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) if (rtnl_lock_enable == true) { rtnl_lock_enable = false; @@ -5289,8 +5287,6 @@ ftm_processing: hdd_hostapd_channel_wakelock_init(hdd_ctx); - cds_set_load_unload_in_progress(false); - hdd_set_idle_ps_config(hdd_ctx, true); #ifdef FEATURE_WLAN_AUTO_SHUTDOWN if (hdd_ctx->config->WlanAutoShutdown != 0) @@ -5435,7 +5431,8 @@ ftm_processing: } hif_enable_power_gating(hif_sc); - + hdd_ctx->isLoadInProgress = false; + cds_set_load_unload_in_progress(false); complete(&wlan_start_comp); goto success;