Explorar el Código

qcacld-3.0: Add UCFG API to get DP vdev stats

Add UCFG API to get DP vdev stats.

Change-Id: Icc0eab717ed02c544240379b8f5fcfa9d98a251a
CRs-Fixed: 3554687
Amit Mehta hace 1 año
padre
commit
fe6f4d208b

+ 11 - 0
components/dp/dispatcher/inc/wlan_dp_ucfg_api.h

@@ -1606,4 +1606,15 @@ ucfg_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc *psoc)
 }
 #endif /* WLAN_FEATURE_LOCAL_PKT_CAPTURE */
 
+/**
+ * ucfg_dp_get_vdev_stats () - API to get vdev stats
+ * @soc: dp soc object
+ * @vdev_id: Vdev ID of vdev for which stats is requested
+ * @buf: Pointer to buffer in which stats need to be updated
+ *
+ * Return: QDF_STATUS_SUCCESS on success else error code
+ */
+QDF_STATUS ucfg_dp_get_vdev_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
+				  struct cdp_vdev_stats *buf);
+
 #endif /* _WLAN_DP_UCFG_API_H_ */

+ 6 - 0
components/dp/dispatcher/src/wlan_dp_ucfg_api.c

@@ -2523,3 +2523,9 @@ bool ucfg_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc *psoc)
 	return cdp_cfg_get(soc, cfg_dp_local_pkt_capture);
 }
 #endif
+
+QDF_STATUS ucfg_dp_get_vdev_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
+				  struct cdp_vdev_stats *buf)
+{
+	return cdp_host_get_vdev_stats(soc, vdev_id, buf, true);
+}