mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
36530ba72a
Imported from patchwork, patches marked with '=' have already been in our tree: [v3,1/4] cfg80211: add ratelimited variants of err and warn [v3,2/4] rt2x00: use ratelimited variants dev_warn/dev_err [v3,3/4] rt2x00: check number of EPROTO errors =[v3,4/4] rt2x00: do not print error when queue is full Signed-off-by: Daniel Golle <daniel@makrotopia.org>
43 lines
1.8 KiB
Diff
43 lines
1.8 KiB
Diff
From patchwork Tue Mar 12 09:51:41 2019
|
|
Content-Type: text/plain; charset="utf-8"
|
|
MIME-Version: 1.0
|
|
Content-Transfer-Encoding: 7bit
|
|
X-Patchwork-Submitter: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
X-Patchwork-Id: 10848959
|
|
X-Patchwork-Delegate: kvalo@adurom.com
|
|
From: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
To: linux-wireless@vger.kernel.org
|
|
Cc: =?utf-8?q?Tomislav_Po=C5=BEega?= <pozega.tomislav@gmail.com>,
|
|
Daniel Golle <daniel@makrotopia.org>, Felix Fietkau <nbd@nbd.name>,
|
|
Mathias Kresin <dev@kresin.me>
|
|
Subject: [PATCH v3 2/4] rt2x00: use ratelimited variants dev_warn/dev_err
|
|
Date: Tue, 12 Mar 2019 10:51:41 +0100
|
|
Message-Id: <1552384303-29529-3-git-send-email-sgruszka@redhat.com>
|
|
In-Reply-To: <1552384303-29529-1-git-send-email-sgruszka@redhat.com>
|
|
References: <1552384303-29529-1-git-send-email-sgruszka@redhat.com>
|
|
|
|
As reported by Randy we can overwhelm logs on some USB error conditions.
|
|
To avoid that use dev_warn_ratelimited() and dev_err_ratelimitd().
|
|
|
|
Reported-and-tested-by: Randy Oostdyk <linux-kernel@oostdyk.com>
|
|
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
---
|
|
drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
|
@@ -69,10 +69,10 @@
|
|
printk(KERN_ERR KBUILD_MODNAME ": %s: Error - " fmt, \
|
|
__func__, ##__VA_ARGS__)
|
|
#define rt2x00_err(dev, fmt, ...) \
|
|
- wiphy_err((dev)->hw->wiphy, "%s: Error - " fmt, \
|
|
+ wiphy_err_ratelimited((dev)->hw->wiphy, "%s: Error - " fmt, \
|
|
__func__, ##__VA_ARGS__)
|
|
#define rt2x00_warn(dev, fmt, ...) \
|
|
- wiphy_warn((dev)->hw->wiphy, "%s: Warning - " fmt, \
|
|
+ wiphy_warn_ratelimited((dev)->hw->wiphy, "%s: Warning - " fmt, \
|
|
__func__, ##__VA_ARGS__)
|
|
#define rt2x00_info(dev, fmt, ...) \
|
|
wiphy_info((dev)->hw->wiphy, "%s: Info - " fmt, \
|