summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik2005-10-26 10:59:01 +0200
committerLinus Torvalds2005-10-26 19:39:43 +0200
commit35848e048f55368f132e28e7f3278ce2d2347f6c (patch)
treed7214bac83bce465818583b5e600fc114a49a361
parent[PATCH] export cpu_online_map (diff)
downloadkernel-qcow2-linux-35848e048f55368f132e28e7f3278ce2d2347f6c.tar.gz
kernel-qcow2-linux-35848e048f55368f132e28e7f3278ce2d2347f6c.tar.xz
kernel-qcow2-linux-35848e048f55368f132e28e7f3278ce2d2347f6c.zip
[PATCH] kill massive wireless-related log spam
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>
-rw-r--r--net/core/wireless.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/core/wireless.c b/net/core/wireless.c
index d17f1583ea3e..271ddb35b0b2 100644
--- a/net/core/wireless.c
+++ b/net/core/wireless.c
@@ -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;
}