qcacmn: Add CDP ops for enabling MPDU stats
Add CDP ops for enabling SAWF MPDU stats. Change-Id: I07d1a143e843f885150a1fcc10a6d0554bd57aa4 CRs-Fixed: 3195257
This commit is contained in:

committed by
Madan Koyyalamudi

parent
3603943859
commit
09a9870b96
@@ -2007,6 +2007,10 @@ struct cdp_sawf_ops {
|
||||
uint32_t svc_id, uint8_t *mac,
|
||||
void *data);
|
||||
QDF_STATUS
|
||||
(*sawf_mpdu_stats_req)(struct cdp_soc_t *soc, uint8_t enable);
|
||||
QDF_STATUS
|
||||
(*sawf_mpdu_details_stats_req)(struct cdp_soc_t *soc, uint8_t enable);
|
||||
QDF_STATUS
|
||||
(*txrx_sawf_set_mov_avg_params)(uint32_t num_pkt, uint32_t num_win);
|
||||
QDF_STATUS
|
||||
(*txrx_sawf_set_sla_params)(uint32_t num_pkt, uint32_t time_secs);
|
||||
|
@@ -128,6 +128,52 @@ cdp_get_peer_sawf_tx_stats(ol_txrx_soc_handle soc, uint32_t svc_id,
|
||||
mac, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_sawf_mpdu_stats_req() - Call to subscribe to MPDU stats TLV
|
||||
* @soc: soc handle
|
||||
* @enable: 1: enable 0: disable
|
||||
*
|
||||
* return: status Success/Failure
|
||||
*/
|
||||
static inline QDF_STATUS
|
||||
cdp_sawf_mpdu_stats_req(ol_txrx_soc_handle soc, uint8_t enable)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_debug("Invalid Instance");
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->sawf_ops ||
|
||||
!soc->ops->sawf_ops->sawf_mpdu_stats_req)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->sawf_ops->sawf_mpdu_stats_req(soc, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_sawf_mpdu_details_stats_req - Call to subscribe to MPDU details stats TLV
|
||||
* @soc: soc handle
|
||||
* @enable: 1: enable 0: disable
|
||||
*
|
||||
* return: status Success/Failure
|
||||
*/
|
||||
static inline QDF_STATUS
|
||||
cdp_sawf_mpdu_details_stats_req(ol_txrx_soc_handle soc, uint8_t enable)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_debug("Invalid Instance");
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->sawf_ops ||
|
||||
!soc->ops->sawf_ops->sawf_mpdu_details_stats_req)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->sawf_ops->sawf_mpdu_details_stats_req(soc, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_sawf_set_mov_avg_params - Set moving average pararms
|
||||
* @num_pkt: No of packets per window to calucalte moving average
|
||||
@@ -147,7 +193,7 @@ cdp_sawf_set_mov_avg_params(ol_txrx_soc_handle soc,
|
||||
}
|
||||
|
||||
if (!soc->ops->sawf_ops ||
|
||||
!soc->ops->sawf_ops->txrx_get_peer_sawf_tx_stats)
|
||||
!soc->ops->sawf_ops->txrx_sawf_set_mov_avg_params)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->sawf_ops->txrx_sawf_set_mov_avg_params(num_pkt,
|
||||
@@ -173,7 +219,7 @@ cdp_sawf_set_sla_params(ol_txrx_soc_handle soc,
|
||||
}
|
||||
|
||||
if (!soc->ops->sawf_ops ||
|
||||
!soc->ops->sawf_ops->txrx_get_peer_sawf_tx_stats)
|
||||
!soc->ops->sawf_ops->txrx_sawf_set_sla_params)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->sawf_ops->txrx_sawf_set_sla_params(num_pkt,
|
||||
@@ -195,7 +241,7 @@ cdp_sawf_init_telemtery_params(ol_txrx_soc_handle soc)
|
||||
}
|
||||
|
||||
if (!soc->ops->sawf_ops ||
|
||||
!soc->ops->sawf_ops->txrx_get_peer_sawf_tx_stats)
|
||||
!soc->ops->sawf_ops->txrx_sawf_init_telemtery_params)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->sawf_ops->txrx_sawf_init_telemtery_params();
|
||||
|
@@ -12735,6 +12735,8 @@ static struct cdp_sawf_ops dp_ops_sawf = {
|
||||
#ifdef CONFIG_SAWF
|
||||
.txrx_get_peer_sawf_delay_stats = dp_sawf_get_peer_delay_stats,
|
||||
.txrx_get_peer_sawf_tx_stats = dp_sawf_get_peer_tx_stats,
|
||||
.sawf_mpdu_stats_req = dp_sawf_mpdu_stats_req,
|
||||
.sawf_mpdu_details_stats_req = dp_sawf_mpdu_details_stats_req,
|
||||
.txrx_sawf_set_mov_avg_params = dp_sawf_set_mov_avg_params,
|
||||
.txrx_sawf_set_sla_params = dp_sawf_set_sla_params,
|
||||
.txrx_sawf_init_telemtery_params = dp_sawf_init_telemetry_params,
|
||||
|
Reference in New Issue
Block a user