From 7d38880a19c93d6b2d42f33f4808e30acd858e5c Mon Sep 17 00:00:00 2001 From: Vivek Date: Thu, 21 Jan 2021 23:30:01 +0530 Subject: [PATCH] qcacmn: Enable rate limiting on for prints in interrupt context The current print rate limiting for prints to console is for all contexts. There are some debug prints which come to console via work queues which we don't want to rate limit and only rate limit coming via interrupt context or bottom halves which causes FW backpressure due to excessive prints. So rate limit prints coming to console if in interrupt context or bottom halves CRs-Fixed: 2853590 Change-Id: I867b2c0d17b54037ee45eb6b7871a16c2668d7ba --- qdf/linux/src/qdf_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index 0acc4a5a8a..0ea4bf4cae 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -26,6 +26,7 @@ #include "qdf_str.h" #include #include +#include /* macro to map qdf trace levels into the bitmask */ #define QDF_TRACE_LEVEL_TO_MODULE_BITMASK(_level) ((1 << (_level))) @@ -3305,7 +3306,7 @@ void qdf_rl_print_supressed_inc(void) #ifdef QDF_TRACE_PRINT_ENABLE static inline void print_to_console(char *str_buffer) { - if (qdf_detected_excessive_logging()) { + if (qdf_in_interrupt() && qdf_detected_excessive_logging()) { qdf_rl_print_supressed_inc(); return; }