From b37442915595a299127a9ac0f6eaf75facac6b68 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Thu, 2 May 2019 15:01:00 +0530 Subject: [PATCH] qcacmn: Use ENABLE_DP_HIST_STATS to enable histogram functions At present, DP_STATS_XXX and DP_HIST_XXX can be disabled or enabled at the same time using macro DISABLE_DP_STATS. Make DP_STATS_XXX and DP_HIST_XXX under different macro so that both can be enabled/disabled separately. HIST_STATS are by default disabled and can be enabled by enabling ENABLE_DP_HIST_STATS macro. Change-Id: I4e7b817afef040407a496e268f2fd680791fc47b CRs-fixed: 2449710 --- dp/wifi3.0/dp_internal.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/dp/wifi3.0/dp_internal.h b/dp/wifi3.0/dp_internal.h index 3996073d1ec9..5290299483a0 100644 --- a/dp/wifi3.0/dp_internal.h +++ b/dp/wifi3.0/dp_internal.h @@ -204,6 +204,18 @@ while (0) _handle_a->stats._field = _handle_b->stats._field; \ } +#else +#define DP_STATS_INC(_handle, _field, _delta) +#define DP_STATS_INCC(_handle, _field, _delta, _cond) +#define DP_STATS_DEC(_handle, _field, _delta) +#define DP_STATS_UPD(_handle, _field, _delta) +#define DP_STATS_INC_PKT(_handle, _field, _count, _bytes) +#define DP_STATS_INCC_PKT(_handle, _field, _count, _bytes, _cond) +#define DP_STATS_AGGR(_handle_a, _handle_b, _field) +#define DP_STATS_AGGR_PKT(_handle_a, _handle_b, _field) +#endif + +#ifdef ENABLE_DP_HIST_STATS #define DP_HIST_INIT() \ uint32_t num_of_packets[MAX_PDEV_CNT] = {0}; @@ -293,14 +305,6 @@ while (0) #else -#define DP_STATS_INC(_handle, _field, _delta) -#define DP_STATS_INCC(_handle, _field, _delta, _cond) -#define DP_STATS_DEC(_handle, _field, _delta) -#define DP_STATS_UPD(_handle, _field, _delta) -#define DP_STATS_INC_PKT(_handle, _field, _count, _bytes) -#define DP_STATS_INCC_PKT(_handle, _field, _count, _bytes, _cond) -#define DP_STATS_AGGR(_handle_a, _handle_b, _field) -#define DP_STATS_AGGR_PKT(_handle_a, _handle_b, _field) #define DP_HIST_INIT() #define DP_HIST_PACKET_COUNT_INC(_pdev_id) #define DP_TX_HISTOGRAM_UPDATE(_pdev, _p_cntrs)