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
This commit is contained in:
Kabilan Kannan 2017-12-20 11:49:35 -08:00 • committed by snandini
commit 75bd4b3310

View file

@ -65,6 +65,11 @@
#include "wlan_hdd_power.h"
#include <wlan_hdd_tsf.h>
/*
* 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;
}