qcacmn: Add logic for allocation and reset of vdev_stats_id

In BE architecture, HW provides basic vdev stats support for upto
48 vdevs. For each vdev, there is vdev_stats_id which represents the
id of this vdev on HW. This vdev_stats_id is assigned by host and
is conveyed to HW at the time of REO TID Queue setup for the peer.

Add logic for allocation and deallocation of vdev_stats_id and
convey this id to HW.

Change-Id: If5611bf54d057ccf71c6444b5c79a26eb28df87e
CRs-Fixed: 3067843
This commit is contained in:
Harsh Kumar Bijlani
2021-04-28 18:43:09 +05:30
committed by Madan Koyyalamudi
parent f76548dd04
commit 6c7fcf1d61
13 changed files with 152 additions and 10 deletions

View File

@@ -404,6 +404,41 @@ cdp_txrx_get_psoc_param(ol_txrx_soc_handle soc,
return soc->ops->ctrl_ops->txrx_get_psoc_param(soc, type, val);
}
static inline
QDF_STATUS cdp_vdev_alloc_vdev_stats_id(ol_txrx_soc_handle soc,
uint8_t *vdev_stats_id)
{
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_alloc_vdev_stats_id)
return QDF_STATUS_E_FAILURE;
return soc->ops->host_stats_ops->txrx_alloc_vdev_stats_id
(soc, vdev_stats_id);
}
static inline
void cdp_vdev_reset_vdev_stats_id(ol_txrx_soc_handle soc,
uint8_t vdev_stats_id)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance:");
QDF_BUG(0);
return;
}
if (!soc->ops->host_stats_ops ||
!soc->ops->host_stats_ops->txrx_reset_vdev_stats_id)
return;
soc->ops->host_stats_ops->txrx_reset_vdev_stats_id(soc, vdev_stats_id);
}
#ifdef VDEV_PEER_PROTOCOL_COUNT
/**
* cdp_set_vdev_peer_protocol_count() - set per-peer protocol count tracking