From bd9c13f2e879c4b679736bd69164ecc799e37dbf Mon Sep 17 00:00:00 2001 From: "Pamidipati, Vijay" Date: Tue, 17 Oct 2017 20:12:03 +0530 Subject: [PATCH] qcacmn: Enable update of per-peer statistics in MSDU Tx completions Update of per-peer statistics was disabled from per-MSDU indications as they are now updated from per-PPDU indications. However, the data from per-PPDU indications is incorrect for some fields. Re-enable update of statistics for per-MSDU completions till this issue is fixed in FW Change-Id: I2983ef9244a6f95104ba49ab6d1c6543a951d0b2 CRs-Fixed: 2128230 --- dp/inc/cdp_txrx_cmn_struct.h | 2 +- dp/wifi3.0/dp_htt.c | 6 ++++++ dp/wifi3.0/dp_tx.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index b0afaf1fba5f..36be353f6096 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -169,8 +169,8 @@ enum cdp_host_txrx_stats { * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames */ enum cdp_ppdu_ftype { - CDP_PPDU_FTYPE_DATA, CDP_PPDU_FTYPE_CTRL, + CDP_PPDU_FTYPE_DATA, CDP_PPDU_FTYPE_MAX }; diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 32c20cbc9fe3..12266bca461c 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -59,6 +59,12 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer, { struct dp_pdev *pdev = peer->vdev->pdev; + /* If the peer statistics are already processed as part of + * per-MSDU completion handler, do not process these again in per-PPDU + * indications */ + if (soc->process_tx_status) + return; + DP_STATS_INC_PKT(peer, tx.comp_pkt, (ppdu->success_msdus + ppdu->retry_msdus + ppdu->failed_msdus), diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 5323799de778..bcb372355ab7 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -2609,7 +2609,7 @@ QDF_STATUS dp_tx_soc_attach(struct dp_soc *soc) * only for NPR EMU, should be removed, once NPR platforms * are stable. */ - soc->process_tx_status = 0; + soc->process_tx_status = 1; QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO, "%s HAL Tx init Success\n", __func__);