summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2004-09-12 02:24:10 -0700
committerDavid S. Miller <davem@nuts.davemloft.net>2004-09-12 02:24:10 -0700
commitef9a2917cdb8b28eb36ea88bb7f09cc54f105fe6 (patch)
tree41cf1097e02204e0beb27979044b35c4e7742f80
parent4faebe25007b8dc58b05b61d3aa1d704200b036e (diff)
[NET]: Kill netdev->last_stats
Old debugging code we no longer need. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/sk98lin/skge.c1
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--net/core/dev.c28
-rw-r--r--net/core/net-sysfs.c1
4 files changed, 0 insertions, 31 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index 6b452e57e986..74a1aa3ad61d 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -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;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a8a542ca89bf..9784aca0bc31 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -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;
};
diff --git a/net/core/dev.c b/net/core/dev.c
index 4829caa535ed..169ced758702 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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
@@ -897,14 +885,6 @@ int dev_open(struct net_device *dev)
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?
*/
if (!netif_device_present(dev))
@@ -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:
*/
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 46d26fc928f2..6cf0afc7b1c4 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -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)))