From 75bd4b33106f46f1eb9cddf1e9c4fed601d621e7 Mon Sep 17 00:00:00 2001 From: Kabilan Kannan Date: Wed, 20 Dec 2017 11:49:35 -0800 Subject: [PATCH] qcacld-3.0: Rate limit TX data transmit error in HDD TX data transmit error is flooding out the logging system. Rate limit the TX transmit error to avoid log buffer overrun. Change-Id: Ie6f857378f1d8d2ee07ba0d6e10639f6f5dcbd1c CRs-Fixed: 2160835 --- core/hdd/src/wlan_hdd_tx_rx.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 264eb56713fa..dedad19dc8dc 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -65,6 +65,11 @@ #include "wlan_hdd_power.h" #include +/* + * Count to ratelimit the HDD logs during TX failures + */ +#define HDD_TX_BLOCKED_RATE 256 + #ifdef QCA_LL_TX_FLOW_CONTROL_V2 /* * Mapping Linux AC interpretation to SME AC. @@ -534,9 +539,9 @@ static inline bool hdd_is_tx_allowed(struct sk_buff *skb, uint8_t peer_id) peer = cdp_peer_find_by_local_id(soc, pdev, peer_id); if (peer == NULL) { - QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_WARN, - FL("Unable to find peer entry for staid: %d"), - peer_id); + hdd_err_ratelimited(HDD_TX_BLOCKED_RATE, + "Unable to find peer entry for staid: %d", + peer_id); return false; }