qcacld-3.0: Ratelimit per packet log in case of disconnect
Ratelimit per packet error log in case of disconnect.
Change-Id: I39af6361f1ae1a1c571e3885f2024efbd9b4c651
CRs-Fixed: 2482120
diff --git a/core/dp/txrx/ol_tx_classify.c b/core/dp/txrx/ol_tx_classify.c
index bcff5b1..f67a233 100644
--- a/core/dp/txrx/ol_tx_classify.c
+++ b/core/dp/txrx/ol_tx_classify.c
@@ -517,11 +517,9 @@
* associated peer. It is illegitimate to send unicast
* data if there is no peer to send it to.
*/
- QDF_TRACE(QDF_MODULE_ID_TXRX,
- QDF_TRACE_LEVEL_ERROR,
- "Error: vdev %pK ("QDF_MAC_ADDR_STR") trying to send unicast tx data frame to an unknown peer\n",
- vdev,
- QDF_MAC_ADDR_ARRAY(vdev->mac_addr.raw));
+ ol_txrx_err_rl("Error: vdev %pK (" QDF_MAC_ADDR_STR ") trying to send unicast tx data frame to an unknown peer",
+ vdev,
+ QDF_MAC_ADDR_ARRAY(vdev->mac_addr.raw));
return NULL; /* error */
}
TX_SCHED_DEBUG_PRINT("Peer found\n");
diff --git a/core/dp/txrx/ol_txrx_internal.h b/core/dp/txrx/ol_txrx_internal.h
index 677cbb9..f663fff 100644
--- a/core/dp/txrx/ol_txrx_internal.h
+++ b/core/dp/txrx/ol_txrx_internal.h
@@ -94,6 +94,9 @@
#define txrx_nofl_dbg(params...) \
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_TXRX, params)
+#define ol_txrx_err_rl(params...) \
+ QDF_TRACE_ERROR_RL(QDF_MODULE_ID_TXRX, params)
+
/*
* define PN check failure message print rate
* as 1 second
@@ -115,6 +118,8 @@
#define txrx_nofl_info(params...)
#define txrx_nofl_dbg(params...)
+#define ol_txrx_err_rl(params...)
+
#endif /* TXRX_PRINT_ENABLE */
/*--- tx credit debug printouts ---*/