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
This commit is contained in:
Harsh Kumar Bijlani
2022-09-01 18:13:32 +05:30
committed by Madan Koyyalamudi
parent 9fa8fc8b46
commit d12768c4c4
2 changed files with 5 additions and 5 deletions

View File

@@ -1135,25 +1135,25 @@ void DP_PRINT_STATS(const char *fmt, ...);
defined(QCA_ENHANCED_STATS_SUPPORT) defined(QCA_ENHANCED_STATS_SUPPORT)
#define DP_PEER_TO_STACK_INCC_PKT(_handle, _count, _bytes, _cond) \ #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); \ DP_PEER_STATS_FLAT_INC_PKT(_handle, to_stack, _count, _bytes); \
} }
#define DP_PEER_TO_STACK_DECC(_handle, _count, _cond) \ #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); \ DP_PEER_STATS_FLAT_DEC(_handle, to_stack.num, _count); \
} }
#define DP_PEER_MC_INCC_PKT(_handle, _count, _bytes, _cond) \ #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); \ DP_PEER_PER_PKT_STATS_INC_PKT(_handle, rx.multicast, _count, _bytes); \
} }
#define DP_PEER_BC_INCC_PKT(_handle, _count, _bytes, _cond) \ #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); \ DP_PEER_PER_PKT_STATS_INC_PKT(_handle, rx.bcast, _count, _bytes); \
} }
#elif defined(QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT) #elif defined(QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT)

View File

@@ -4945,7 +4945,7 @@ void dp_tx_update_peer_basic_stats(struct dp_txrx_peer *txrx_peer,
uint32_t length, uint8_t tx_status, uint32_t length, uint8_t tx_status,
bool update) 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); DP_PEER_STATS_FLAT_INC_PKT(txrx_peer, comp_pkt, 1, length);
if (tx_status != HAL_TX_TQM_RR_FRAME_ACKED) if (tx_status != HAL_TX_TQM_RR_FRAME_ACKED)