From 498242733360bd732895262b671a11d3c25b1b73 Mon Sep 17 00:00:00 2001 From: Amit Mehta Date: Tue, 27 Apr 2021 16:23:58 +0530 Subject: [PATCH] qcacmn: Rate limit excessive logging in case of HW enqueue failure Currently, excess logging is causing a crash when enqueuing of Tx MSDU descriptor to HW failed. Rate limiting the log messages to avoid the crash. Change-Id: Ibb230ce03c23518b6f7feda61a49bf155c7ddc69 CRs-Fixed: 2933002 --- dp/wifi3.0/dp_tx.c | 4 ++-- dp/wifi3.0/dp_tx.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 19cd33647b..fde4ba8f08 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -2090,8 +2090,8 @@ dp_tx_send_msdu_single(struct dp_vdev *vdev, qdf_nbuf_t nbuf, tx_exc_metadata, msdu_info); if (status != QDF_STATUS_SUCCESS) { - dp_tx_err("Tx_hw_enqueue Fail tx_desc %pK queue %d", - tx_desc, tx_q->ring_id); + dp_tx_err_rl("Tx_hw_enqueue Fail tx_desc %pK queue %d", + tx_desc, tx_q->ring_id); qdf_nbuf_unmap_nbytes_single(vdev->osdev, nbuf, QDF_DMA_TO_DEVICE, nbuf->len); diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index 81a7af7084..64f62eb0b2 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -77,6 +77,7 @@ do { \ #define dp_tx_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_DP_TX, params) #define dp_tx_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_DP_TX, params) +#define dp_tx_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_DP_TX, params) #define dp_tx_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_DP_TX, params) #define dp_tx_info(params...) \ __QDF_TRACE_FL(QDF_TRACE_LEVEL_INFO_HIGH, QDF_MODULE_ID_DP_TX, ## params)