Explorar el Código

qcacmn: Add new obj mgr api wlan_pdev_peek_active_first_vdev

wlan_pdev_vdev_list_peek_active_head can't be used out of object
manager, because object manager structures can't be referenced
outside object manager.

Add wlan_pdev_peek_active_first_vdev which can be used out of
object manager, because it only needs pdev parameters.

Change-Id: I1d32ec2b5342dbdcbbb817d80623f802011892b0
CRs-Fixed: 2507969
bings hace 5 años
padre
commit
b2e00f901f

+ 13 - 0
umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h

@@ -576,6 +576,19 @@ static inline struct wlan_objmgr_vdev *wlan_pdev_vdev_list_peek_head(
 	return vdev;
 }
 
+/**
+ * wlan_pdev_peek_active_first_vdev() - get first active vdev from pdev list
+ * @pdev: PDEV object
+ * @dbg_id: id of the caller
+ *
+ * API to get the head active vdev of given pdev (of pdev's vdev list)
+ *
+ * Return:
+ */
+struct wlan_objmgr_vdev *wlan_pdev_peek_active_first_vdev(
+		struct wlan_objmgr_pdev *pdev,
+		wlan_objmgr_ref_dbgid dbg_id);
+
 /**
  * wlan_pdev_vdev_list_peek_active_head() - get first active vdev from pdev list
  * @vdev: VDEV object

+ 14 - 0
umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c

@@ -1034,6 +1034,20 @@ struct wlan_objmgr_vdev *wlan_pdev_vdev_list_peek_active_head(
 	return NULL;
 }
 
+struct wlan_objmgr_vdev *wlan_pdev_peek_active_first_vdev(
+		struct wlan_objmgr_pdev *pdev,
+		wlan_objmgr_ref_dbgid dbg_id)
+{
+	struct wlan_objmgr_pdev_objmgr *objmgr = &pdev->pdev_objmgr;
+	qdf_list_t *vdev_list;
+
+	/* VDEV list */
+	vdev_list = &objmgr->wlan_vdev_list;
+
+	return wlan_pdev_vdev_list_peek_active_head(pdev, vdev_list,
+						    dbg_id);
+}
+
 struct wlan_objmgr_vdev *wlan_vdev_get_next_active_vdev_of_pdev(
 			struct wlan_objmgr_pdev *pdev,
 			qdf_list_t *vdev_list,