mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacmn: Add QDF rate limit logging API
Add QDF rate limit logging API such that logs are rate limited on need basis. Change-Id: I40949155a1938998bc73830929db5c2a07bc380d CRs-Fixed: 2083921
This commit is contained in:
parent
22046183ed
commit
7f679457e1
1 changed files with 10 additions and 0 deletions
|
|
@ -57,9 +57,19 @@
|
|||
#if defined(WLAN_DEBUG) || defined(DEBUG)
|
||||
#define QDF_TRACE qdf_trace_msg
|
||||
#define QDF_TRACE_HEX_DUMP qdf_trace_hex_dump
|
||||
#define QDF_TRACE_RATE_LIMITED(rate, module, level, format, ...)\
|
||||
do {\
|
||||
static int rate_limit;\
|
||||
rate_limit++;\
|
||||
if (rate)\
|
||||
if (0 == (rate_limit % rate))\
|
||||
qdf_trace_msg(module, level, format,\
|
||||
##__VA_ARGS__);\
|
||||
} while (0)
|
||||
#else
|
||||
#define QDF_TRACE(arg ...)
|
||||
#define QDF_TRACE_HEX_DUMP(arg ...)
|
||||
#define QDF_TRACE_RATE_LIMITED(arg ...)
|
||||
#endif
|
||||
#else /* CONFIG_MCL */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue