Browse Source

qcacld-3.0: Return VDEV_ID_MAX if any exception

It is improper to return false in
policy_mgr_get_roam_enabled_sta_session_id,
which return value recognized as vdev id.
Use WLAN_UMAC_VDEV_ID_MAX instead.

Change-Id: If99f903c9344a99832d8d010deb5b2c35f2622f1
CRs-Fixed: 3172279
Lin Bai 3 years ago
parent
commit
179eaa34b4

+ 2 - 2
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -6958,14 +6958,14 @@ uint8_t policy_mgr_get_roam_enabled_sta_session_id(
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
 		policy_mgr_err("Invalid Context");
-		return false;
+		return WLAN_UMAC_VDEV_ID_MAX;
 	}
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_POLICY_MGR_ID);
 	if (!vdev) {
 		policy_mgr_err("Invalid vdev");
-		return false;
+		return WLAN_UMAC_VDEV_ID_MAX;
 	}
 
 	if (wlan_vdev_mlme_is_link_sta_vdev(vdev)) {