qcacmn: DP histogram print fixes

This change fixes the below issue.
1. Clear the histogram statistics per peer.
2. Separate out the Tx/Rx histogram prints.

Change-Id: I5fc51f6bca14dc4c615c5501441e1a6b28bb0f02
This commit is contained in:
Aniruddha Paul
2020-09-28 18:29:26 +05:30
committed by snandini
parent 0fb3541617
commit ec14dd22d8
2 changed files with 62 additions and 6 deletions

View File

@@ -7775,6 +7775,22 @@ void dp_print_napi_stats(struct dp_soc *soc)
hif_print_napi_stats(soc->hif_handle);
}
#ifdef QCA_PEER_EXT_STATS
/**
* dp_txrx_host_peer_ext_stats_clr: Reinitialize the txrx peer ext stats
*
*/
static inline void dp_txrx_host_peer_ext_stats_clr(struct dp_peer *peer)
{
if (peer->pext_stats)
qdf_mem_zero(peer->pext_stats, sizeof(*peer->pext_stats));
}
#else
static inline void dp_txrx_host_peer_ext_stats_clr(struct dp_peer *peer)
{
}
#endif
/**
* dp_txrx_host_peer_stats_clr): Reinitialize the txrx peer stats
* @soc: Datapath soc
@@ -7795,8 +7811,11 @@ dp_txrx_host_peer_stats_clr(struct dp_soc *soc,
rx_tid = &peer->rx_tid[tid];
DP_STATS_CLR(rx_tid);
}
DP_STATS_CLR(peer);
dp_txrx_host_peer_ext_stats_clr(peer);
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
dp_wdi_event_handler(WDI_EVENT_UPDATE_DP_STATS, peer->vdev->pdev->soc,
&peer->stats, peer->peer_id,