summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@codeaurora.org>2017-09-19 19:46:15 -0700
committersnandini <snandini@codeaurora.org>2017-09-20 18:37:23 -0700
commit2f7daa5c9ce163ec28818b39d70e47228e3bfd7e (patch)
tree57b0ef89aeadc1ee0e8be31eefc0ec619f840cd8
parent9e677ab0212d5aa0559b4861cad75bd8e7d7210e (diff)
qcacld-3.0: Limit the DFS phy error processing log rate
Limit the DFS phy error event processing error logs by 16 to avoid watchdog timeout due to excessive logging Change-Id: If1fceccce23dfbe9a91202f83c66826d38b6bf29 CRs-Fixed: 2112866
-rw-r--r--core/wma/inc/wma.h3
-rw-r--r--core/wma/src/wma_features.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index fcdf8cac7dc9..7e772340b0d1 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -119,6 +119,9 @@
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, ## args)
#define WMA_LOGP(args ...) \
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_FATAL, ## args)
+#define wma_log_rate_limit_err(rate, args...) \
+ QDF_TRACE_RATE_LIMITED(rate, QDF_MODULE_ID_WMA,\
+ QDF_TRACE_LEVEL_ERROR, ## args)
#define WMA_DEBUG_ALWAYS
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 342b4763d30c..9e8a4cf6de4b 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -2337,8 +2337,9 @@ static QDF_STATUS dfs_phyerr_no_offload_event_handler(void *handle,
max_dfs_buf_length = DFS_MAX_BUF_LENGTH;
if (pe_hdr->buf_len > max_dfs_buf_length) {
- WMA_LOGE("%s: Received Invalid Phyerror event buffer length = %d Maximum allowed buf length = %d",
- __func__, pe_hdr->buf_len, max_dfs_buf_length);
+ wma_log_rate_limit_err(
+ 16, "%s: Invalid Phyerr evt buf len %d Max allowed buf len %d",
+ __func__, pe_hdr->buf_len, max_dfs_buf_length);
return QDF_STATUS_E_FAILURE;
}