aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-19 21:50:10 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-19 22:42:39 -0800
commit4456e7bdf74c9f27e2312a6f197b2da467541433 (patch)
tree1b06ab44cb2002b6eb5ded43d857ebf3d3f188e1 /drivers/net/veth.c
parenta2dbb88210b9877f1c53d3798fd5d717a4d45256 (diff)
veth: convert to net_device_ops
Convert to net_device_ops function table. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 75b40fefc4e..4f93a55aaaa 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -262,16 +262,20 @@ static void veth_dev_free(struct net_device *dev)
free_netdev(dev);
}
+static const struct net_device_ops veth_netdev_ops = {
+ .ndo_init = veth_dev_init,
+ .ndo_open = veth_open,
+ .ndo_get_stats = veth_get_stats,
+};
+
static void veth_setup(struct net_device *dev)
{
ether_setup(dev);
+ dev->netdev_ops = &veth_netdev_ops;
dev->hard_start_xmit = veth_xmit;
- dev->get_stats = veth_get_stats;
- dev->open = veth_open;
dev->ethtool_ops = &veth_ethtool_ops;
dev->features |= NETIF_F_LLTX;
- dev->init = veth_dev_init;
dev->destructor = veth_dev_free;
}
@@ -297,7 +301,7 @@ static int veth_device_event(struct notifier_block *unused,
{
struct net_device *dev = ptr;
- if (dev->open != veth_open)
+ if (dev->netdev_ops->ndo_open != veth_open)
goto out;
switch (event) {