Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121897
b: refs/heads/master
c: 4456e7b
h: refs/heads/master
i:
  121895: 4e3c3ab
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 20, 2008
1 parent 8826211 commit 5bf25ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2dbb88210b9877f1c53d3798fd5d717a4d45256
refs/heads/master: 4456e7bdf74c9f27e2312a6f197b2da467541433
12 changes: 8 additions & 4 deletions trunk/drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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) {
Expand Down

0 comments on commit 5bf25ab

Please sign in to comment.