From 3f49e5e9b17da8378a8cea327707bb98d718e68f Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 19 Mar 2019 16:42:12 -0700 Subject: [PATCH] qcacld-3.0: Remove start/stop modules in progress With the addition and integration of the Driver Synchronization feature, it is no longer necessary to keep track of whether the driver modules are starting or stopping. Remove the driver modules starting/stopping flags. Change-Id: I4718eedfaa1305780c5fcf6a2ff04114b210a911 CRs-Fixed: 2423618 --- core/cds/inc/cds_api.h | 12 ------------ core/cds/src/cds_sched.c | 3 +-- core/hdd/inc/wlan_hdd_main.h | 2 -- core/hdd/src/wlan_hdd_main.c | 19 ------------------- 4 files changed, 1 insertion(+), 35 deletions(-) diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 15ea5da072ac..a5022eb69c03 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -140,18 +140,6 @@ static inline bool cds_is_load_or_unload_in_progress(void) __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_UNLOADING); } -/** - * cds_is_module_stop_in_progress() - Is module stopping - * - * Return: true if module stop is in progress. - */ -static inline bool cds_is_module_stop_in_progress(void) -{ - enum cds_driver_state state = cds_get_driver_state(); - - return __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_MODULE_STOPPING); -} - /** * cds_is_target_ready() - Is target is in ready state * diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index d3448b173b61..2a4a74711d40 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -298,8 +298,7 @@ static void __cds_cpu_hotplug_notify(uint32_t cpu, bool cpu_up) if (!pSchedContext || !pSchedContext->ol_rx_thread) return; - if (cds_is_load_or_unload_in_progress() || - cds_is_module_stop_in_progress() || cds_is_driver_recovering()) + if (cds_is_load_or_unload_in_progress() || cds_is_driver_recovering()) return; cds_debug("'%s' event on CPU %u (of %d); Currently affine to CPU %u", diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 8a82b47ad8df..fca9b8f3b471 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1772,8 +1772,6 @@ struct hdd_context { /* support for DP RX threads */ bool enable_dp_rx_threads; bool napi_enable; - bool stop_modules_in_progress; - bool start_modules_in_progress; struct acs_dfs_policy acs_policy; uint16_t wmi_max_len; struct suspend_resume_stats suspend_resume_stats; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 8600ffbd58d2..415e664c6d44 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1031,16 +1031,6 @@ int __wlan_hdd_validate_context(struct hdd_context *hdd_ctx, const char *func) return -EAGAIN; } - if (hdd_ctx->start_modules_in_progress) { - hdd_debug("Start modules in progress (via %s)", func); - return -EAGAIN; - } - - if (hdd_ctx->stop_modules_in_progress) { - hdd_debug("Stop modules in progress (via %s)", func); - return -EAGAIN; - } - if (cds_is_driver_in_bad_state()) { hdd_debug("Driver in bad state (via %s); state:0x%x", func, cds_get_driver_state()); @@ -2772,8 +2762,6 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) return 0; } - hdd_ctx->start_modules_in_progress = true; - switch (hdd_ctx->driver_status) { case DRIVER_MODULES_UNINITIALIZED: hdd_info("Wlan transitioning (UNINITIALIZED -> CLOSED)"); @@ -2946,8 +2934,6 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) hdd_ctx->driver_status = DRIVER_MODULES_ENABLED; hdd_info("Wlan transitioned (now ENABLED)"); - hdd_ctx->start_modules_in_progress = false; - mutex_unlock(&hdd_ctx->iface_change_lock); hdd_exit(); @@ -2994,7 +2980,6 @@ power_down: if (!reinit && !unint) pld_power_off(qdf_dev->dev); release_lock: - hdd_ctx->start_modules_in_progress = false; mutex_unlock(&hdd_ctx->iface_change_lock); if (hdd_ctx->target_hw_name) { qdf_mem_free(hdd_ctx->target_hw_name); @@ -11283,7 +11268,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) } mutex_lock(&hdd_ctx->iface_change_lock); - hdd_ctx->stop_modules_in_progress = true; cds_set_module_stop_in_progress(true); debugfs_threads = hdd_return_debugfs_threads_count(); @@ -11295,7 +11279,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) if (IS_IDLE_STOP && !ftm_mode) { mutex_unlock(&hdd_ctx->iface_change_lock); hdd_psoc_idle_timer_start(hdd_ctx); - hdd_ctx->stop_modules_in_progress = false; cds_set_module_stop_in_progress(false); return 0; @@ -11431,7 +11414,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_NONE); done: - hdd_ctx->stop_modules_in_progress = false; cds_set_module_stop_in_progress(false); mutex_unlock(&hdd_ctx->iface_change_lock); @@ -11440,7 +11422,6 @@ done: return ret; } - #ifdef WLAN_FEATURE_MEMDUMP_ENABLE /** * hdd_state_info_dump() - prints state information of hdd layer