netdev
[Top] [All Lists]

[PATCH wireless-2.6 7/10] hostap: Rate limiting for debug messages

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: [PATCH wireless-2.6 7/10] hostap: Rate limiting for debug messages
From: Jouni Malinen <jkmaline@xxxxxxxxx>
Date: Sat, 12 Mar 2005 16:34:12 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20050313001706.GA8253@jm.kir.nu>
References: <20050313001706.GA8253@jm.kir.nu>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
Limit rate of debug messages for interrupts before card is ready. This
could happen when multiple devices are sharing the same interrupt.

Signed-off-by: Jouni Malinen <jkmaline@xxxxxxxxx>

Index: jm-wireless-2.6/drivers/net/wireless/hostap/hostap_hw.c
===================================================================
--- jm-wireless-2.6.orig/drivers/net/wireless/hostap/hostap_hw.c        
2005-03-12 16:10:40.000000000 -0800
+++ jm-wireless-2.6/drivers/net/wireless/hostap/hostap_hw.c     2005-03-12 
16:10:58.000000000 -0800
@@ -2790,8 +2790,10 @@
        prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
 
        if (local->func->card_present && !local->func->card_present(local)) {
-               printk(KERN_DEBUG "%s: Interrupt, but dev not OK\n",
-                      dev->name);
+               if (net_ratelimit()) {
+                       printk(KERN_DEBUG "%s: Interrupt, but dev not OK\n",
+                              dev->name);
+               }
                return IRQ_HANDLED;
        }
 

-- 
Jouni Malinen                                            PGP id EFC895FA

<Prev in Thread] Current Thread [Next in Thread>