Skip to content

Commit

Permalink
[PATCH] kill massive wireless-related log spam
Browse files Browse the repository at this point in the history
Although this message is having the intended effect of causing wireless
driver maintainers to upgrade their code, I never should have merged this
patch in its present form.  Leading to tons of bug reports and unhappy
users.

Some wireless apps poll for statistics regularly, which leads to a printk()
every single time they ask for stats.  That's a little bit _too_ much of a
reminder that the driver is using an old API.

Change this to printing out the message once, per kernel boot.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Oct 26, 2005
1 parent bb32051 commit 35848e0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions net/core/wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,15 @@ static inline struct iw_statistics *get_wireless_stats(struct net_device *dev)

/* Old location, field to be removed in next WE */
if(dev->get_wireless_stats) {
printk(KERN_DEBUG "%s (WE) : Driver using old /proc/net/wireless support, please fix driver !\n",
dev->name);
static int printed_message;

if (!printed_message++)
printk(KERN_DEBUG "%s (WE) : Driver using old /proc/net/wireless support, please fix driver !\n",
dev->name);

return dev->get_wireless_stats(dev);
}

/* Not found */
return (struct iw_statistics *) NULL;
}
Expand Down

0 comments on commit 35848e0

Please sign in to comment.