mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Add a flag to enable/disable per-packet sync of DP stats
Currently all Host collected DP statitics are synced to upper layers on per-packet basis; This is causing significant CPU overhead. Add a flag which can be controlled through iwpriv to enable/disable updating of these statistics from DP to higher layers Change-Id: I983c6d91803c83c1efd49c5535769a0c10fbc9b5 CRs-Fixed: 2064113
This commit is contained in:
parent
45b1df25fc
commit
be379457e6
4 changed files with 46 additions and 9 deletions
|
|
@ -3399,6 +3399,32 @@ dp_get_host_peer_stats(struct cdp_pdev *pdev_handle, char *mac_addr)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_enable_enhanced_stats()- API to enable enhanced statistcs
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
dp_enable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
pdev->enhanced_stats_en = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_disable_enhanced_stats()- API to disable enhanced statistcs
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
dp_disable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
pdev->enhanced_stats_en = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_get_fw_peer_stats()- function to print peer stats
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
|
|
@ -3871,6 +3897,8 @@ static struct cdp_mon_ops dp_ops_mon = {
|
|||
static struct cdp_host_stats_ops dp_ops_host_stats = {
|
||||
.txrx_per_peer_stats = dp_get_host_peer_stats,
|
||||
.get_fw_peer_stats = dp_get_fw_peer_stats,
|
||||
.txrx_enable_enhanced_stats = dp_enable_enhanced_stats,
|
||||
.txrx_disable_enhanced_stats = dp_disable_enhanced_stats,
|
||||
/* TODO */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1123,6 +1123,8 @@ done:
|
|||
continue;
|
||||
}
|
||||
|
||||
pdev = vdev->pdev;
|
||||
|
||||
sgi = hal_rx_msdu_start_sgi_get(rx_tlv_hdr);
|
||||
mcs = hal_rx_msdu_start_rate_mcs_get(rx_tlv_hdr);
|
||||
tid = hal_rx_mpdu_start_tid_get(rx_tlv_hdr);
|
||||
|
|
@ -1279,10 +1281,12 @@ done:
|
|||
DP_STATS_INCC_PKT(peer, rx.multicast, 1, pkt_len,
|
||||
hal_rx_msdu_end_da_is_mcbc_get(
|
||||
rx_tlv_hdr));
|
||||
|
||||
DP_STATS_INC_PKT(peer, rx.to_stack, 1,
|
||||
pkt_len);
|
||||
|
||||
if (hal_rx_attn_first_mpdu_get(rx_tlv_hdr)) {
|
||||
if ((pdev->enhanced_stats_en) &&
|
||||
hal_rx_attn_first_mpdu_get(rx_tlv_hdr)) {
|
||||
if (soc->cdp_soc.ol_ops->update_dp_stats) {
|
||||
soc->cdp_soc.ol_ops->update_dp_stats(
|
||||
vdev->pdev->osif_pdev,
|
||||
|
|
@ -1302,7 +1306,7 @@ done:
|
|||
}
|
||||
|
||||
if (qdf_unlikely(vdev->rx_decap_type == htt_cmn_pkt_type_raw) ||
|
||||
(vdev->rx_decap_type == htt_cmn_pkt_type_native_wifi))
|
||||
(vdev->rx_decap_type == htt_cmn_pkt_type_native_wifi))
|
||||
dp_rx_deliver_raw(vdev, deliver_list_head);
|
||||
else if (qdf_likely(vdev->osif_rx) && deliver_list_head)
|
||||
vdev->osif_rx(vdev->osif_vdev, deliver_list_head);
|
||||
|
|
|
|||
|
|
@ -1802,6 +1802,7 @@ static inline void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc,
|
|||
struct dp_soc *soc = NULL;
|
||||
struct dp_vdev *vdev = tx_desc->vdev;
|
||||
struct dp_peer *peer = NULL;
|
||||
struct dp_pdev *pdev = NULL;
|
||||
uint8_t comp_status = 0;
|
||||
qdf_mem_zero(&ts, sizeof(struct hal_tx_completion_status));
|
||||
hal_tx_comp_get_status(&tx_desc->comp, &ts);
|
||||
|
|
@ -1931,15 +1932,19 @@ static inline void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc,
|
|||
/* TODO: This call is temporary.
|
||||
* Stats update has to be attached to the HTT PPDU message
|
||||
*/
|
||||
if (soc->cdp_soc.ol_ops->update_dp_stats)
|
||||
soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->osif_pdev,
|
||||
&peer->stats, ts.peer_id, UPDATE_PEER_STATS);
|
||||
|
||||
out:
|
||||
dp_aggregate_vdev_stats(tx_desc->vdev);
|
||||
if (soc->cdp_soc.ol_ops->update_dp_stats)
|
||||
pdev = vdev->pdev;
|
||||
|
||||
if (pdev->enhanced_stats_en && soc->cdp_soc.ol_ops->update_dp_stats) {
|
||||
if (peer) {
|
||||
soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
|
||||
&peer->stats, ts.peer_id,
|
||||
UPDATE_PEER_STATS);
|
||||
}
|
||||
dp_aggregate_vdev_stats(tx_desc->vdev);
|
||||
soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->osif_pdev,
|
||||
&vdev->stats, vdev->vdev_id, UPDATE_VDEV_STATS);
|
||||
}
|
||||
fail:
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -779,7 +779,7 @@ struct dp_pdev {
|
|||
enum htt_pkt_type rx_decap_mode;
|
||||
|
||||
/* Enhanced Stats is enabled */
|
||||
bool ap_stats_tx_cal_enable;
|
||||
bool enhanced_stats_en;
|
||||
|
||||
qdf_atomic_t num_tx_outstanding;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue