qcacld-3.0: Checking assoc state for bw timer when resuming

In runtime resuming, there is no necessary to start bw timer
if adapter is in non-assoc state.
If bw timer has been started in idle state, there will be no
match bw timer stop. In hdd_bus_bandwidth_deinit, it will consider
as abnormal.

Change-Id: Id36af395269ebf3a09429b2606dbd438f147f24f
CRs-Fixed: 2678835
This commit is contained in:
Jingxiang Ge 2020-05-06 15:51:50 +08:00 • committed by nshrivas
commit 69a3183113
2 changed files with 5 additions and 1 deletions

View file

@ -1423,7 +1423,7 @@ static int wlan_hdd_runtime_resume(struct device *dev)
hdd_err("PMO Runtime resume failed: %d", status);
} else {
if (policy_mgr_get_connection_count(hdd_ctx->psoc))
hdd_bus_bw_compute_timer_start(hdd_ctx);
hdd_bus_bw_compute_timer_try_start(hdd_ctx);
}
hdd_debug("Runtime resume done");

View file

@ -9329,7 +9329,11 @@ void hdd_bus_bandwidth_deinit(struct hdd_context *hdd_ctx)
{
hdd_enter();
/* it is expecting the timer has been stopped or not started
* when coming deinit.
*/
QDF_BUG(!qdf_periodic_work_stop_sync(&hdd_ctx->bus_bw_work));
qdf_periodic_work_destroy(&hdd_ctx->bus_bw_work);
qdf_spinlock_destroy(&hdd_ctx->bus_bw_lock);
hdd_pm_qos_remove_request(hdd_ctx);