qcacmn: Add CDP support for RDK peer statistics framework
Add CDP APIs for: a. To get/set rdk stats context into soc b. To set rdk stats flag into soc c. To flush rdk stats Change-Id: I74e35f5fa244d6d38f46a4f64ebbad8a630589bd
Bu işleme şunda yer alıyor:
@@ -2250,4 +2250,98 @@ static inline uint32_t cdp_cfg_get(ol_txrx_soc_handle soc, enum cdp_dp_cfg cfg)
|
||||
|
||||
return soc->ops->cmn_drv_ops->txrx_get_cfg(soc, cfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_soc_set_rate_stats_ctx() - set rate stats context in soc
|
||||
* @soc: opaque soc handle
|
||||
* @ctx: rate stats context
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
cdp_soc_set_rate_stats_ctx(ol_txrx_soc_handle soc, void *ctx)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->set_rate_stats_ctx)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->set_rate_stats_ctx((struct cdp_soc_t *)soc,
|
||||
ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_soc_get_rate_stats_ctx() - get rate stats context in soc
|
||||
* @soc: opaque soc handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void*
|
||||
cdp_soc_get_rate_stats_ctx(ol_txrx_soc_handle soc)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->get_rate_stats_ctx)
|
||||
return NULL;
|
||||
|
||||
return soc->ops->cmn_drv_ops->get_rate_stats_ctx(soc);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_peer_flush_rate_stats() - flush peer rate statistics
|
||||
* @soc: opaque soc handle
|
||||
* @pdev: pdev handle
|
||||
* @buf: stats buffer
|
||||
*/
|
||||
static inline void
|
||||
cdp_peer_flush_rate_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
void *buf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->txrx_peer_flush_rate_stats)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->txrx_peer_flush_rate_stats(soc, pdev, buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_flush_rate_stats_request() - request flush rate statistics
|
||||
* @soc: opaque soc handle
|
||||
* @pdev: pdev handle
|
||||
*/
|
||||
static inline void
|
||||
cdp_flush_rate_stats_request(struct cdp_soc_t *soc, struct cdp_pdev *pdev)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->txrx_flush_rate_stats_request)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->txrx_flush_rate_stats_request(soc, pdev);
|
||||
}
|
||||
#endif /* _CDP_TXRX_CMN_H_ */
|
||||
|
@@ -672,6 +672,30 @@ cdp_host_get_radio_stats(ol_txrx_soc_handle soc,
|
||||
buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief confgure rate stats at soc
|
||||
*
|
||||
* @param soc - opaque soc handle
|
||||
* @param vap - capabilities
|
||||
* @return - void
|
||||
*/
|
||||
static inline void
|
||||
cdp_soc_configure_rate_stats(ol_txrx_soc_handle soc, uint8_t val)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->configure_rate_stats)
|
||||
return;
|
||||
|
||||
return soc->ops->host_stats_ops->configure_rate_stats(soc, val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse the stats header and get the payload from the message.
|
||||
*
|
||||
|
@@ -439,6 +439,13 @@ struct cdp_cmn_ops {
|
||||
|
||||
bool (*get_dp_capabilities)(struct cdp_soc_t *soc,
|
||||
enum cdp_capabilities dp_caps);
|
||||
void (*set_rate_stats_ctx)(struct cdp_soc_t *soc, void *ctx);
|
||||
void* (*get_rate_stats_ctx)(struct cdp_soc_t *soc);
|
||||
void (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc,
|
||||
struct cdp_pdev *pdev,
|
||||
void *buf);
|
||||
void (*txrx_flush_rate_stats_request)(struct cdp_soc_t *soc,
|
||||
struct cdp_pdev *pdev);
|
||||
};
|
||||
|
||||
struct cdp_ctrl_ops {
|
||||
@@ -792,6 +799,9 @@ struct cdp_host_stats_ops {
|
||||
int
|
||||
(*txrx_get_ratekbps)(int preamb, int mcs,
|
||||
int htflag, int gintval);
|
||||
void
|
||||
(*configure_rate_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t val);
|
||||
};
|
||||
|
||||
struct cdp_wds_ops {
|
||||
|
@@ -1579,6 +1579,7 @@ enum _ol_ath_param_t {
|
||||
OL_ATH_PARAM_HE_UL_PPDU_DURATION = 402,
|
||||
OL_ATH_PARAM_HE_UL_RU_ALLOCATION = 403,
|
||||
OL_ATH_PARAM_PERIODIC_CFR_CAPTURE = 404,
|
||||
OL_ATH_PARAM_FLUSH_PEER_RATE_STATS = 405,
|
||||
};
|
||||
|
||||
/* Enumeration of PDEV Configuration parameter */
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle