[PATCH] orinoco: limit message rate
authorAndrew Morton <akpm@osdl.org>
Thu, 20 Oct 2005 04:23:44 +0000 (21:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 20 Oct 2005 06:04:30 +0000 (23:04 -0700)
Brice Goglin <Brice.Goglin@ens-lyon.org> reports a printk storm from this
driver.  Fix.

Acked-by: David Gibson <hermes@gibson.dropbear.id.au>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/net/wireless/orinoco.c

index cf3daaa..15ceaf6 100644 (file)
@@ -578,8 +578,9 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
                                txfid, NULL);
        if (err) {
                netif_start_queue(dev);
-               printk(KERN_ERR "%s: Error %d transmitting packet\n",
-                      dev->name, err);
+               if (net_ratelimit())
+                       printk(KERN_ERR "%s: Error %d transmitting packet\n",
+                               dev->name, err);
                stats->tx_errors++;
                goto fail;
        }