Jelajahi Sumber

qcacld-3.0: Fix assert for wmi cmd for invalid vdev

During vdev creating, RTPM suspend/resume may happen, after vdev
created in host, if ITO config wmi cmd is sent to firmware
before vdev create wmi cmd, firmware will assert for invalid
vdev.

To fix it, only config ITO when vdev is up.

Change-Id: I3d744d7fffd9afc7780d3a19c92613a94556cfa0
CRs-Fixed: 3152034
Jianmin Zhu 3 tahun lalu
induk
melakukan
24bfb9a343
1 mengubah file dengan 8 tambahan dan 2 penghapusan
  1. 8 2
      components/pmo/core/src/wlan_pmo_suspend_resume.c

+ 8 - 2
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -363,7 +363,10 @@ static void pmo_core_set_suspend_ps_params(struct wlan_objmgr_psoc *psoc)
 							    WLAN_PMO_ID);
 		if (!vdev)
 			continue;
-
+		if (wlan_vdev_mlme_get_state(vdev) != WLAN_VDEV_S_UP) {
+			wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
+			continue;
+		}
 		vdev_ctx = pmo_vdev_get_priv(vdev);
 		pmo_configure_vdev_suspend_params(psoc, vdev, vdev_ctx);
 		wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
@@ -675,7 +678,10 @@ static void pmo_core_set_resume_ps_params(struct wlan_objmgr_psoc *psoc)
 							    WLAN_PMO_ID);
 		if (!vdev)
 			continue;
-
+		if (wlan_vdev_mlme_get_state(vdev) != WLAN_VDEV_S_UP) {
+			wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
+			continue;
+		}
 		vdev_ctx = pmo_vdev_get_priv(vdev);
 		pmo_configure_vdev_resume_params(psoc, vdev, vdev_ctx);
 		wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);