]> git.hungrycats.org Git - linux/commitdiff
[NET]: Kill netdev->last_stats
authorDavid S. Miller <davem@nuts.davemloft.net>
Sun, 12 Sep 2004 09:24:10 +0000 (02:24 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Sun, 12 Sep 2004 09:24:10 +0000 (02:24 -0700)
Old debugging code we no longer need.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sk98lin/skge.c
include/linux/netdevice.h
net/core/dev.c
net/core/net-sysfs.c

index 6b452e57e9860b440ed7bcc0f0254dbea2c8d46f..74a1aa3ad61d03bbb7e0bbf3ced5b8160d499b02 100644 (file)
@@ -4956,7 +4956,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
        dev->stop =             &SkGeClose;
        dev->hard_start_xmit =  &SkGeXmit;
        dev->get_stats =        &SkGeStats;
-       dev->last_stats =       &SkGeStats;
        dev->set_multicast_list = &SkGeSetRxMode;
        dev->set_mac_address =  &SkGeSetMacAddr;
        dev->do_ioctl =         &SkGeIoctl;
index a8a542ca89bff5f29c4e19620f1d2c10815d4d2d..9784aca0bc31daa6cb19acc9436f5d3e1feec329 100644 (file)
@@ -479,7 +479,6 @@ struct net_device
 
        /* class/net/name entry */
        struct class_device     class_dev;
-       struct net_device_stats* (*last_stats)(struct net_device *);
        /* how much padding had been added by alloc_netdev() */
        int padded;
 };
index 4829caa535ed20d0ccea06fe4d9dd9d06cbef358..169ced75870234b903368e6a1a55418ef783fc5c 100644 (file)
@@ -861,18 +861,6 @@ static int default_rebuild_header(struct sk_buff *skb)
 }
 
 
-/*
- * Some old buggy device drivers change get_stats after registering
- * the device.  Try and trap them here.
- * This can be elimnated when all devices are known fixed.
- */
-static inline int get_stats_changed(struct net_device *dev)
-{
-       int changed = dev->last_stats != dev->get_stats;
-       dev->last_stats = dev->get_stats;
-       return changed;
-}
-
 /**
  *     dev_open        - prepare an interface for use.
  *     @dev:   device to open
@@ -896,14 +884,6 @@ int dev_open(struct net_device *dev)
        if (dev->flags & IFF_UP)
                return 0;
 
-       /*
-        *       Check for broken device drivers.
-        */
-       if (get_stats_changed(dev) && net_ratelimit()) {
-               printk(KERN_ERR "%s: driver changed get_stats after register\n",
-                      dev->name);
-       }
-
        /*
         *      Is it even present?
         */
@@ -920,14 +900,6 @@ int dev_open(struct net_device *dev)
                        clear_bit(__LINK_STATE_START, &dev->state);
        }
 
-       /*
-        *      Check for more broken device drivers.
-        */
-       if (get_stats_changed(dev) && net_ratelimit()) {
-               printk(KERN_ERR "%s: driver changed get_stats in open\n",
-                      dev->name);
-       }
-
        /*
         *      If it went open OK then:
         */
index 46d26fc928f2f9ccffb61e9c3c9959cb5f53c8c1..6cf0afc7b1c454708418bade5f9af9b1012e5cba 100644 (file)
@@ -408,7 +408,6 @@ int netdev_register_sysfs(struct net_device *net)
 
        class_dev->class = &net_class;
        class_dev->class_data = net;
-       net->last_stats = net->get_stats;
 
        strlcpy(class_dev->class_id, net->name, BUS_ID_SIZE);
        if ((ret = class_device_register(class_dev)))