qcacmn: add wrapper function to dp_txrx_get_peer_stats

add wrapper function to dp_txrx_get_peer_stats to handle
identical mlo and link peer case

Change-Id: Ia2d05eca143dd2759c6765c54f26da7f73210271
CRs-Fixed: 3595756
This commit is contained in:
Mukul Dhiman
2023-08-29 15:39:41 +05:30
committed by Rahul Choudhary
szülő 667450308d
commit 8f9aadc071
3 fájl változott, egészen pontosan 96 új sor hozzáadva és 10 régi sor törölve

Fájl megtekintése

@@ -541,6 +541,41 @@ cdp_host_get_peer_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
peer_stats);
}
/**
* cdp_host_get_peer_stats_based_on_peer_type() - Fetch peer stats based on the
* peer type
* @soc: soc handle
* @vdev_id: vdev_id of vdev object
* @peer_mac: mac address of the peer
* @peer_stats: destination buffer
* @peer_type: type of peer
*
* Return: QDF_STATUS
*/
static inline QDF_STATUS
cdp_host_get_peer_stats_based_on_peer_type(ol_txrx_soc_handle soc, uint8_t vdev_id,
uint8_t *peer_mac,
struct cdp_peer_stats *peer_stats,
enum cdp_peer_type peer_type)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance");
QDF_BUG(0);
return QDF_STATUS_E_FAILURE;
}
if (!soc->ops->host_stats_ops ||
!soc->ops->host_stats_ops->txrx_get_peer_stats_based_on_peer_type)
return QDF_STATUS_E_FAILURE;
return soc->ops->host_stats_ops->txrx_get_peer_stats_based_on_peer_type(
soc, vdev_id,
peer_mac,
peer_stats,
peer_type);
}
/**
* cdp_host_get_per_link_peer_stats() - Call to get peer stats
* @soc: soc handle

Fájl megtekintése

@@ -1163,6 +1163,7 @@ struct cdp_mon_ops {
* @txrx_update_pdev_stats:
* @txrx_get_peer_stats_param:
* @txrx_get_peer_stats:
* @txrx_get_peer_stats_based_on_peer_type:
* @txrx_get_per_link_stats:
* @txrx_get_soc_stats:
* @txrx_reset_peer_ald_stats:
@@ -1264,6 +1265,12 @@ struct cdp_host_stats_ops {
(*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
uint8_t *peer_mac,
struct cdp_peer_stats *peer_stats);
QDF_STATUS
(*txrx_get_peer_stats_based_on_peer_type)(struct cdp_soc_t *soc,
uint8_t vdev_id,
uint8_t *peer_mac,
struct cdp_peer_stats *peer_stats,
enum cdp_peer_type peer_type);
QDF_STATUS
(*txrx_get_per_link_stats)(struct cdp_soc_t *soc,
uint8_t vdev_id, uint8_t *peer_mac,