lkml.org 
[lkml]   [2010]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] drivers/net/wireless/b43: Use local ratelimit_state
Date
Avoid limiting the logging output of other networking devices

Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/b43/main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 7965b70..8031f24 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -311,13 +311,15 @@ static int b43_wireless_core_start(struct b43_wldev *dev);

static int b43_ratelimit(struct b43_wl *wl)
{
+ static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 10);
+
if (!wl || !wl->current_dev)
return 1;
if (b43_status(wl->current_dev) < B43_STAT_STARTED)
return 1;
/* We are up and running.
* Ratelimit the messages to avoid DoS over the net. */
- return net_ratelimit();
+ return __ratelimit(&ratelimit);
}

void b43info(struct b43_wl *wl, const char *fmt, ...)
--
1.7.1.337.g6068.dirty


\
 
 \ /
  Last update: 2010-06-20 01:33    [W:0.086 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site