]> err.no Git - linux-2.6/blobdiff - net/core/wireless.c
[PATCH] inotify: fix one-shot support
[linux-2.6] / net / core / wireless.c
index d17f1583ea3e00150424839b4254b709cf48ac8f..2add7ed609e9ab78e02d70793470f8321a6e3313 100644 (file)
@@ -78,6 +78,7 @@
 #include <linux/seq_file.h>
 #include <linux/init.h>                        /* for __init */
 #include <linux/if_arp.h>              /* ARPHRD_ETHER */
+#include <linux/etherdevice.h>         /* compare_ether_addr */
 
 #include <linux/wireless.h>            /* Pretty obvious */
 #include <net/iw_handler.h>            /* New driver API */
@@ -455,10 +456,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;
 }
@@ -1501,7 +1507,7 @@ void wireless_spy_update(struct net_device *      dev,
 
        /* Update all records that match */
        for(i = 0; i < spydata->spy_number; i++)
-               if(!memcmp(address, spydata->spy_address[i], ETH_ALEN)) {
+               if(!compare_ether_addr(address, spydata->spy_address[i])) {
                        memcpy(&(spydata->spy_stat[i]), wstats,
                               sizeof(struct iw_quality));
                        match = i;