Parcourir la source

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
Jingxiang Ge il y a 4 ans
Parent
commit
69a3183113
2 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 1 1
      core/hdd/src/wlan_hdd_driver_ops.c
  2. 4 0
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/src/wlan_hdd_driver_ops.c

@@ -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");

+ 4 - 0
core/hdd/src/wlan_hdd_main.c

@@ -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);