From d12768c4c4025c1010b3082103bea5bdeb084c08 Mon Sep 17 00:00:00 2001 From: Harsh Kumar Bijlani Date: Thu, 1 Sep 2022 18:13:32 +0530 Subject: [PATCH] qcacmn: Change order of conditions for peer stats update Change order of conditions for peer stats update for KPI optimization. Change-Id: If764ecaf575f9fc60f5c6d3332a7716b6a50be65 CRs-Fixed: 3281386 --- dp/wifi3.0/dp_internal.h | 8 ++++---- dp/wifi3.0/dp_tx.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dp/wifi3.0/dp_internal.h b/dp/wifi3.0/dp_internal.h index acaad024c7..aa6436e6b6 100644 --- a/dp/wifi3.0/dp_internal.h +++ b/dp/wifi3.0/dp_internal.h @@ -1135,25 +1135,25 @@ void DP_PRINT_STATS(const char *fmt, ...); defined(QCA_ENHANCED_STATS_SUPPORT) #define DP_PEER_TO_STACK_INCC_PKT(_handle, _count, _bytes, _cond) \ { \ - if (!(_handle->hw_txrx_stats_en) || _cond) \ + if (_cond || !(_handle->hw_txrx_stats_en)) \ DP_PEER_STATS_FLAT_INC_PKT(_handle, to_stack, _count, _bytes); \ } #define DP_PEER_TO_STACK_DECC(_handle, _count, _cond) \ { \ - if (!(_handle->hw_txrx_stats_en) || _cond) \ + if (_cond || !(_handle->hw_txrx_stats_en)) \ DP_PEER_STATS_FLAT_DEC(_handle, to_stack.num, _count); \ } #define DP_PEER_MC_INCC_PKT(_handle, _count, _bytes, _cond) \ { \ - if (!(_handle->hw_txrx_stats_en) || _cond) \ + if (_cond || !(_handle->hw_txrx_stats_en)) \ DP_PEER_PER_PKT_STATS_INC_PKT(_handle, rx.multicast, _count, _bytes); \ } #define DP_PEER_BC_INCC_PKT(_handle, _count, _bytes, _cond) \ { \ - if (!(_handle->hw_txrx_stats_en) || _cond) \ + if (_cond || !(_handle->hw_txrx_stats_en)) \ DP_PEER_PER_PKT_STATS_INC_PKT(_handle, rx.bcast, _count, _bytes); \ } #elif defined(QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 58ecf2a729..59cd594136 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -4945,7 +4945,7 @@ void dp_tx_update_peer_basic_stats(struct dp_txrx_peer *txrx_peer, uint32_t length, uint8_t tx_status, bool update) { - if ((!txrx_peer->hw_txrx_stats_en) || update) { + if (update || (!txrx_peer->hw_txrx_stats_en)) { DP_PEER_STATS_FLAT_INC_PKT(txrx_peer, comp_pkt, 1, length); if (tx_status != HAL_TX_TQM_RR_FRAME_ACKED)