qcacmn: Get vdev stats based on arch

With Single Netdev Unified and Hybrid Mode,
the calculation of vdev stats is changed as
per the mode. For LI platforms the path
to get vdev stats is still same while for
BE the vdev stats config path is different.
Introduced Arch ops to handle this diversion.

Change-Id: If4f0f49e78d35126942cd3f1872a5856e4d0f5ba
CRs-Fixed: 3482567
This commit is contained in:
Kenvish Butani
2023-04-28 12:40:45 +05:30
committed by Madan Koyyalamudi
parent 6f869404f6
commit c0fe52d4c6
8 changed files with 50 additions and 25 deletions

View File

@@ -5751,8 +5751,8 @@ void dp_aggregate_vdev_stats(struct dp_vdev *vdev,
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
dp_wdi_event_handler(WDI_EVENT_UPDATE_DP_STATS, vdev->pdev->soc,
vdev_stats, vdev->vdev_id,
UPDATE_VDEV_STATS, vdev->pdev->pdev_id);
vdev_stats, vdev->vdev_id,
UPDATE_VDEV_STATS, vdev->pdev->pdev_id);
#endif
}
@@ -8191,7 +8191,7 @@ dp_txrx_reset_peer_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
*
* Return: QDF_STATUS
*/
static QDF_STATUS
QDF_STATUS
dp_txrx_get_vdev_stats(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
void *buf, bool is_aggregate)
{
@@ -8946,6 +8946,22 @@ QDF_STATUS dp_txrx_clear_dump_stats(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
return status;
}
static QDF_STATUS
dp_txrx_get_interface_stats(struct cdp_soc_t *soc_hdl,
uint8_t vdev_id,
void *buf,
bool is_aggregate)
{
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
if (soc && soc->arch_ops.dp_get_interface_stats)
return soc->arch_ops.dp_get_interface_stats(soc_hdl,
vdev_id,
buf,
is_aggregate);
return QDF_STATUS_E_FAILURE;
}
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
/**
* dp_update_flow_control_parameters() - API to store datapath
@@ -10908,11 +10924,7 @@ static struct cdp_host_stats_ops dp_ops_host_stats = {
dp_get_peer_extd_rate_link_stats,
.get_pdev_obss_stats = dp_get_obss_stats,
.clear_pdev_obss_pd_stats = dp_clear_pdev_obss_pd_stats,
#ifdef CONFIG_MLO_SINGLE_DEV
.txrx_get_interface_stats = dp_txrx_get_interface_stats,
#else
.txrx_get_interface_stats = dp_txrx_get_vdev_stats,
#endif
/* TODO */
};