Forráskód Böngészése

qcacld-3.0: Optimize logs in wlan_cm_is_roam_sync_in_progress

In api wlan_cm_is_roam_sync_in_progress(), the roam_sync
status is checked for every instance of
wlan_cm_is_roam_sync_in_progress resulting in excessive
printing of cm_is_vdev_roam_sync_inprogress logs

Add check to verify roam_sync status for STA mode which
results in trimming of cm_is_vdev_roam_sync_inprogress()
logs.

Change-Id: If0228edb90d718c7fde2b8f34e0003256cfd139b
CRs-Fixed: 3211915
VIJAY RAJ 2 éve
szülő
commit
26ad4c366c

+ 8 - 0
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -3307,6 +3307,7 @@ bool wlan_cm_is_roam_sync_in_progress(struct wlan_objmgr_psoc *psoc,
 {
 	struct wlan_objmgr_vdev *vdev;
 	bool ret;
+	enum QDF_OPMODE opmode;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_MLME_CM_ID);
@@ -3314,6 +3315,13 @@ bool wlan_cm_is_roam_sync_in_progress(struct wlan_objmgr_psoc *psoc,
 	if (!vdev)
 		return false;
 
+	opmode = wlan_vdev_mlme_get_opmode(vdev);
+
+	if (opmode != QDF_STA_MODE) {
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
+		return false;
+	}
+
 	ret = cm_is_vdev_roam_sync_inprogress(vdev);
 
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);