qcacmn: Modify wlanstats context to RDK stats context
peer wlanstats context is used only for RDK Plume stats but the name is misleading as wlan statistics Hence rename peer's wlanstats_ctx to rdkstats_ctx and the APIs the APIs around the same CRs-Fixed: 2767192 Change-Id: I9e8955554b94fa29a3964fed729a95a4db67c8f6
This commit is contained in:
@@ -2483,13 +2483,13 @@ cdp_peer_flush_rate_stats(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_peer_get_wlanstats_ctx() - get wlanstats context
|
||||
* cdp_peer_get_rdkstats_ctx() - get RDK stats context
|
||||
* @soc: opaque soc handle
|
||||
* @vdev_id: id of vdev handle
|
||||
* @mac: peer mac address
|
||||
*/
|
||||
static inline void
|
||||
*cdp_peer_get_wlanstats_ctx(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
*cdp_peer_get_rdkstats_ctx(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
uint8_t *mac_addr)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
@@ -2500,10 +2500,10 @@ static inline void
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->txrx_peer_get_wlan_stats_ctx)
|
||||
!soc->ops->cmn_drv_ops->txrx_peer_get_rdkstats_ctx)
|
||||
return NULL;
|
||||
|
||||
return soc->ops->cmn_drv_ops->txrx_peer_get_wlan_stats_ctx(soc,
|
||||
return soc->ops->cmn_drv_ops->txrx_peer_get_rdkstats_ctx(soc,
|
||||
vdev_id,
|
||||
mac_addr);
|
||||
}
|
||||
|
@@ -524,7 +524,7 @@ struct cdp_cmn_ops {
|
||||
QDF_STATUS (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t pdev_id,
|
||||
void *buf);
|
||||
void* (*txrx_peer_get_wlan_stats_ctx)(struct cdp_soc_t *soc,
|
||||
void* (*txrx_peer_get_rdkstats_ctx)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t *mac_addr);
|
||||
|
||||
|
@@ -5826,12 +5826,12 @@ dp_peer_create_wifi3(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
(void *)&peer_cookie,
|
||||
peer->peer_id, WDI_NO_VAL, pdev->pdev_id);
|
||||
#endif
|
||||
if (soc->wlanstats_enabled) {
|
||||
if (soc->rdkstats_enabled) {
|
||||
if (!peer_cookie.ctx) {
|
||||
pdev->next_peer_cookie--;
|
||||
qdf_err("Failed to initialize peer rate stats");
|
||||
} else {
|
||||
peer->wlanstats_ctx = (struct cdp_peer_rate_stats_ctx *)
|
||||
peer->rdkstats_ctx = (struct cdp_peer_rate_stats_ctx *)
|
||||
peer_cookie.ctx;
|
||||
}
|
||||
}
|
||||
@@ -6578,7 +6578,7 @@ void dp_peer_unref_delete(struct dp_peer *peer, enum dp_mod_id mod_id)
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
peer_cookie.ctx = NULL;
|
||||
peer_cookie.ctx = (struct cdp_stats_cookie *)
|
||||
peer->wlanstats_ctx;
|
||||
peer->rdkstats_ctx;
|
||||
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
|
||||
dp_wdi_event_handler(WDI_EVENT_PEER_DESTROY,
|
||||
soc,
|
||||
@@ -6587,7 +6587,7 @@ void dp_peer_unref_delete(struct dp_peer *peer, enum dp_mod_id mod_id)
|
||||
WDI_NO_VAL,
|
||||
pdev->pdev_id);
|
||||
#endif
|
||||
peer->wlanstats_ctx = NULL;
|
||||
peer->rdkstats_ctx = NULL;
|
||||
wlan_minidump_remove(peer);
|
||||
|
||||
qdf_spin_lock_bh(&soc->inactive_peer_list_lock);
|
||||
@@ -8725,7 +8725,7 @@ dp_set_psoc_param(struct cdp_soc_t *cdp_soc,
|
||||
|
||||
switch (param) {
|
||||
case CDP_ENABLE_RATE_STATS:
|
||||
soc->wlanstats_enabled = val.cdp_psoc_param_en_rate_stats;
|
||||
soc->rdkstats_enabled = val.cdp_psoc_param_en_rate_stats;
|
||||
break;
|
||||
case CDP_SET_NSS_CFG:
|
||||
wlan_cfg_set_dp_soc_nss_cfg(wlan_cfg_ctx,
|
||||
@@ -10178,7 +10178,7 @@ dp_peer_flush_rate_stats_req(struct dp_soc *soc, struct dp_peer *peer,
|
||||
|
||||
dp_wdi_event_handler(
|
||||
WDI_EVENT_FLUSH_RATE_STATS_REQ,
|
||||
soc, peer->wlanstats_ctx,
|
||||
soc, peer->rdkstats_ctx,
|
||||
peer->peer_id,
|
||||
WDI_NO_VAL, peer->vdev->pdev->pdev_id);
|
||||
}
|
||||
@@ -10214,13 +10214,13 @@ dp_flush_rate_stats_req(struct cdp_soc_t *soc_hdl,
|
||||
}
|
||||
#endif
|
||||
|
||||
static void *dp_peer_get_wlan_stats_ctx(struct cdp_soc_t *soc_hdl,
|
||||
static void *dp_peer_get_rdkstats_ctx(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t vdev_id,
|
||||
uint8_t *mac_addr)
|
||||
{
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||
struct dp_peer *peer;
|
||||
void *wlanstats_ctx = NULL;
|
||||
void *rdkstats_ctx = NULL;
|
||||
|
||||
if (mac_addr) {
|
||||
peer = dp_peer_find_hash_find(soc, mac_addr,
|
||||
@@ -10229,12 +10229,12 @@ static void *dp_peer_get_wlan_stats_ctx(struct cdp_soc_t *soc_hdl,
|
||||
if (!peer)
|
||||
return NULL;
|
||||
|
||||
wlanstats_ctx = peer->wlanstats_ctx;
|
||||
rdkstats_ctx = peer->rdkstats_ctx;
|
||||
|
||||
dp_peer_unref_delete(peer, DP_MOD_ID_CDP);
|
||||
}
|
||||
|
||||
return wlanstats_ctx;
|
||||
return rdkstats_ctx;
|
||||
}
|
||||
|
||||
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
|
||||
@@ -10550,7 +10550,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
||||
.get_rate_stats_ctx = dp_soc_get_rate_stats_ctx,
|
||||
.txrx_peer_flush_rate_stats = dp_peer_flush_rate_stats,
|
||||
.txrx_flush_rate_stats_request = dp_flush_rate_stats_req,
|
||||
.txrx_peer_get_wlan_stats_ctx = dp_peer_get_wlan_stats_ctx,
|
||||
.txrx_peer_get_rdkstats_ctx = dp_peer_get_rdkstats_ctx,
|
||||
|
||||
.set_pdev_pcp_tid_map = dp_set_pdev_pcp_tid_map_wifi3,
|
||||
.set_vdev_pcp_tid_map = dp_set_vdev_pcp_tid_map_wifi3,
|
||||
|
@@ -3489,7 +3489,7 @@ static inline void dp_tx_sojourn_stats_process(struct dp_pdev *pdev,
|
||||
sojourn_stats = (struct cdp_tx_sojourn_stats *)
|
||||
qdf_nbuf_data(pdev->sojourn_buf);
|
||||
|
||||
sojourn_stats->cookie = (void *)peer->wlanstats_ctx;
|
||||
sojourn_stats->cookie = (void *)peer->rdkstats_ctx;
|
||||
|
||||
delta_ms = qdf_ktime_to_ms(qdf_ktime_get()) -
|
||||
txdesc_ts;
|
||||
@@ -3723,7 +3723,7 @@ void dp_tx_comp_process_tx_status(struct dp_soc *soc,
|
||||
dp_tx_update_peer_ext_stats(peer, tx_desc, ts->tid, ring_id);
|
||||
|
||||
#ifdef QCA_SUPPORT_RDK_STATS
|
||||
if (soc->wlanstats_enabled)
|
||||
if (soc->rdkstats_enabled)
|
||||
dp_tx_sojourn_stats_process(vdev->pdev, peer, ts->tid,
|
||||
tx_desc->timestamp,
|
||||
ts->ppdu_id);
|
||||
|
@@ -1450,7 +1450,7 @@ struct dp_soc {
|
||||
/* rdk rate statistics context at soc level*/
|
||||
struct cdp_soc_rate_stats_ctx *rate_stats_ctx;
|
||||
/* rdk rate statistics control flag */
|
||||
bool wlanstats_enabled;
|
||||
bool rdkstats_enabled;
|
||||
|
||||
/* 8021p PCP-TID map values */
|
||||
uint8_t pcp_tid_map[PCP_TID_MAP_MAX];
|
||||
@@ -2562,7 +2562,7 @@ struct dp_peer {
|
||||
uint8_t peer_based_pktlog_filter;
|
||||
|
||||
/* rdk statistics context */
|
||||
struct cdp_peer_rate_stats_ctx *wlanstats_ctx;
|
||||
struct cdp_peer_rate_stats_ctx *rdkstats_ctx;
|
||||
/* average sojourn time */
|
||||
qdf_ewma_tx_lag avg_sojourn_msdu[CDP_DATA_TID_MAX];
|
||||
|
||||
|
Reference in New Issue
Block a user