qcacmn: provide an API to fetch individual peer stats

Provide an API to fetch required individual peer stats
from the data path peer stats instead of copying the
whole peer stats structure.

Change-Id: I1c9619bc7d9bb0e3e3df6d38cc5f4570869e31fe
此提交包含在:
Pavankumar Nandeshwar
2019-12-01 01:05:18 +05:30
提交者 nshrivas
父節點 06f280e5b5
當前提交 2771d985bc
共有 4 個檔案被更改,包括 182 行新增2 行删除

查看文件

@@ -476,6 +476,40 @@ cdp_update_vdev_host_stats(ol_txrx_soc_handle soc,
stats_id);
}
/**
* @brief Call to get specified peer stats
*
* @param soc - soc handle
* @param vdev_id - vdev_id of vdev object
* @param peer_mac - mac address of the peer
* @param type - enum of required stats
* @param buf - buffer to hold the value
* @return - QDF_STATUS
*/
static inline QDF_STATUS
cdp_txrx_get_peer_stats_param(ol_txrx_soc_handle soc, uint8_t vdev_id,
uint8_t *peer_mac,
enum cdp_peer_stats_type type,
cdp_peer_stats_param_t *buf)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return QDF_STATUS_E_FAILURE;
}
if (!soc->ops->host_stats_ops ||
!soc->ops->host_stats_ops->txrx_get_peer_stats_param)
return QDF_STATUS_E_FAILURE;
return soc->ops->host_stats_ops->txrx_get_peer_stats_param(soc,
vdev_id,
peer_mac,
type,
buf);
}
/**
* @brief Call to get peer stats
*