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
This commit is contained in:
Dustin Brown
2019-03-19 16:42:12 -07:00
committed by nshrivas
parent e0a77273a9
commit 3f49e5e9b1
4 changed files with 1 additions and 35 deletions

View File

@@ -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_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 * cds_is_target_ready() - Is target is in ready state
* *

View File

@@ -298,8 +298,7 @@ static void __cds_cpu_hotplug_notify(uint32_t cpu, bool cpu_up)
if (!pSchedContext || !pSchedContext->ol_rx_thread) if (!pSchedContext || !pSchedContext->ol_rx_thread)
return; return;
if (cds_is_load_or_unload_in_progress() || if (cds_is_load_or_unload_in_progress() || cds_is_driver_recovering())
cds_is_module_stop_in_progress() || cds_is_driver_recovering())
return; return;
cds_debug("'%s' event on CPU %u (of %d); Currently affine to CPU %u", cds_debug("'%s' event on CPU %u (of %d); Currently affine to CPU %u",

View File

@@ -1772,8 +1772,6 @@ struct hdd_context {
/* support for DP RX threads */ /* support for DP RX threads */
bool enable_dp_rx_threads; bool enable_dp_rx_threads;
bool napi_enable; bool napi_enable;
bool stop_modules_in_progress;
bool start_modules_in_progress;
struct acs_dfs_policy acs_policy; struct acs_dfs_policy acs_policy;
uint16_t wmi_max_len; uint16_t wmi_max_len;
struct suspend_resume_stats suspend_resume_stats; struct suspend_resume_stats suspend_resume_stats;

View File

@@ -1031,16 +1031,6 @@ int __wlan_hdd_validate_context(struct hdd_context *hdd_ctx, const char *func)
return -EAGAIN; 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()) { if (cds_is_driver_in_bad_state()) {
hdd_debug("Driver in bad state (via %s); state:0x%x", hdd_debug("Driver in bad state (via %s); state:0x%x",
func, cds_get_driver_state()); func, cds_get_driver_state());
@@ -2772,8 +2762,6 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
return 0; return 0;
} }
hdd_ctx->start_modules_in_progress = true;
switch (hdd_ctx->driver_status) { switch (hdd_ctx->driver_status) {
case DRIVER_MODULES_UNINITIALIZED: case DRIVER_MODULES_UNINITIALIZED:
hdd_info("Wlan transitioning (UNINITIALIZED -> CLOSED)"); 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_ctx->driver_status = DRIVER_MODULES_ENABLED;
hdd_info("Wlan transitioned (now ENABLED)"); hdd_info("Wlan transitioned (now ENABLED)");
hdd_ctx->start_modules_in_progress = false;
mutex_unlock(&hdd_ctx->iface_change_lock); mutex_unlock(&hdd_ctx->iface_change_lock);
hdd_exit(); hdd_exit();
@@ -2994,7 +2980,6 @@ power_down:
if (!reinit && !unint) if (!reinit && !unint)
pld_power_off(qdf_dev->dev); pld_power_off(qdf_dev->dev);
release_lock: release_lock:
hdd_ctx->start_modules_in_progress = false;
mutex_unlock(&hdd_ctx->iface_change_lock); mutex_unlock(&hdd_ctx->iface_change_lock);
if (hdd_ctx->target_hw_name) { if (hdd_ctx->target_hw_name) {
qdf_mem_free(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); mutex_lock(&hdd_ctx->iface_change_lock);
hdd_ctx->stop_modules_in_progress = true;
cds_set_module_stop_in_progress(true); cds_set_module_stop_in_progress(true);
debugfs_threads = hdd_return_debugfs_threads_count(); 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) { if (IS_IDLE_STOP && !ftm_mode) {
mutex_unlock(&hdd_ctx->iface_change_lock); mutex_unlock(&hdd_ctx->iface_change_lock);
hdd_psoc_idle_timer_start(hdd_ctx); hdd_psoc_idle_timer_start(hdd_ctx);
hdd_ctx->stop_modules_in_progress = false;
cds_set_module_stop_in_progress(false); cds_set_module_stop_in_progress(false);
return 0; 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); pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_NONE);
done: done:
hdd_ctx->stop_modules_in_progress = false;
cds_set_module_stop_in_progress(false); cds_set_module_stop_in_progress(false);
mutex_unlock(&hdd_ctx->iface_change_lock); mutex_unlock(&hdd_ctx->iface_change_lock);
@@ -11440,7 +11422,6 @@ done:
return ret; return ret;
} }
#ifdef WLAN_FEATURE_MEMDUMP_ENABLE #ifdef WLAN_FEATURE_MEMDUMP_ENABLE
/** /**
* hdd_state_info_dump() - prints state information of hdd layer * hdd_state_info_dump() - prints state information of hdd layer