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
This commit is contained in:
Ankit Kumar 2019-05-02 15:01:00 +05:30 • committed by nshrivas
commit b374429155

View file

@ -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)