Browse Source

qcacmn: Add vdev id in cdp get peer deter API

User vdev id to get peer deter stats.

CRs-Fixed: 3380939
Change-Id: Ib843849adaaf7f85dd4108e96e5a2191ce1c0a43
aloksing 2 năm trước cách đây
mục cha
commit
db9c174c07

+ 3 - 1
dp/inc/cdp_txrx_host_stats.h

@@ -1065,6 +1065,7 @@ static inline QDF_STATUS cdp_get_pdev_deter_stats(
 /**
  * cdp_get_peer_deter_stats(): function to get peer deterministic stats
  * @soc: soc handle
+ * @vdev_id: id of vdev handle
  * @addr: peer address
  * @stats: pointer to peer telemetry stats
  *
@@ -1072,6 +1073,7 @@ static inline QDF_STATUS cdp_get_pdev_deter_stats(
  */
 static inline QDF_STATUS cdp_get_peer_deter_stats(
 				ol_txrx_soc_handle soc,
+				uint8_t vdev_id,
 				uint8_t *addr,
 				struct cdp_peer_deter_stats *stats)
 {
@@ -1086,7 +1088,7 @@ static inline QDF_STATUS cdp_get_peer_deter_stats(
 		return QDF_STATUS_E_FAILURE;
 
 	return soc->ops->host_stats_ops->txrx_peer_deter_stats(
-					soc, addr, stats);
+					soc, vdev_id, addr, stats);
 }
 
 /**

+ 1 - 0
dp/inc/cdp_txrx_ops.h

@@ -1252,6 +1252,7 @@ struct cdp_host_stats_ops {
 	QDF_STATUS
 		(*txrx_peer_deter_stats)(
 				struct cdp_soc_t *soc,
+				uint8_t vdev_id,
 				uint8_t *addr,
 				struct cdp_peer_deter_stats *stats);
 	QDF_STATUS

+ 1 - 0
dp/inc/cdp_txrx_stats_struct.h

@@ -162,6 +162,7 @@
 #define CDP_PPDU_STATS_MAX_TAG 14
 #define CDP_MAX_DATA_TIDS 9
 #define CDP_MAX_VOW_TID 4
+#define CDP_VDEV_ALL 0xff
 
 #define CDP_MAX_TIDS 17
 

+ 4 - 1
dp/wifi3.0/dp_internal.h

@@ -4231,6 +4231,7 @@ dp_get_peer_telemetry_stats(struct cdp_soc_t *soc_hdl, uint8_t *addr,
 /*
  * dp_get_peer_deter_stats- API to get peer deterministic stats
  * @soc_hdl: soc handle
+ * @vdev_id: id of vdev handle
  * @addr: peer mac
  * @stats: pointer to peer deterministic stats
  *
@@ -4238,7 +4239,9 @@ dp_get_peer_telemetry_stats(struct cdp_soc_t *soc_hdl, uint8_t *addr,
  *         QDF_STATUS_E_FAILURE: Error
  */
 QDF_STATUS
-dp_get_peer_deter_stats(struct cdp_soc_t *soc_hdl, uint8_t *addr,
+dp_get_peer_deter_stats(struct cdp_soc_t *soc_hdl,
+			uint8_t vdev_id,
+			uint8_t *addr,
 			struct cdp_peer_deter_stats *stats);
 
 /*

+ 4 - 2
dp/wifi3.0/dp_stats.c

@@ -9326,11 +9326,13 @@ dp_get_pdev_deter_stats(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
 }
 
 QDF_STATUS
-dp_get_peer_deter_stats(struct cdp_soc_t *soc_hdl, uint8_t *addr,
+dp_get_peer_deter_stats(struct cdp_soc_t *soc_hdl,
+			uint8_t vdev_id,
+			uint8_t *addr,
 			struct cdp_peer_deter_stats *stats)
 {
 	struct dp_soc *soc = (struct dp_soc *)soc_hdl;
-	struct dp_peer *peer = dp_peer_find_hash_find(soc, addr, 0, DP_VDEV_ALL,
+	struct dp_peer *peer = dp_peer_find_hash_find(soc, addr, 0, vdev_id,
 						      DP_MOD_ID_MISC);
 
 	if (!peer)

+ 1 - 1
dp/wifi3.0/dp_types.h

@@ -72,7 +72,7 @@
 #define DP_QOS_TID 0x0f
 #define DP_IPV6_PRIORITY_SHIFT 20
 #define MAX_MON_LINK_DESC_BANKS 2
-#define DP_VDEV_ALL 0xff
+#define DP_VDEV_ALL CDP_VDEV_ALL
 
 #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
 #define WLAN_DP_RESET_MON_BUF_RING_FILTER