diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-10 12:04:41 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 12:04:41 +0100 |
commit | b17304245f0db0ac69b795c411407808f3f2796d (patch) | |
tree | 63ed3915d9295bd08f640bf25c322064ba787fad /drivers/net/virtio_net.c | |
parent | 889c92d21db40be0b7d22a59395060237895bb85 (diff) | |
parent | 9a100a4464917b5ffff3a8ce1c2758088fd9bb32 (diff) | |
download | linux-b17304245f0db0ac69b795c411407808f3f2796d.tar.gz linux-b17304245f0db0ac69b795c411407808f3f2796d.tar.bz2 linux-b17304245f0db0ac69b795c411407808f3f2796d.zip |
Merge branch 'linus' into x86/setup-lzma
Conflicts:
init/do_mounts_rd.c
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b7004ff36451..43f6523c40be 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -624,6 +624,18 @@ static int virtnet_change_mtu(struct net_device *dev, int new_mtu) return 0; } +static const struct net_device_ops virtnet_netdev = { + .ndo_open = virtnet_open, + .ndo_stop = virtnet_close, + .ndo_start_xmit = start_xmit, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, + .ndo_change_mtu = virtnet_change_mtu, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = virtnet_netpoll, +#endif +}; + static int virtnet_probe(struct virtio_device *vdev) { int err; @@ -636,14 +648,8 @@ static int virtnet_probe(struct virtio_device *vdev) return -ENOMEM; /* Set up network device as normal. */ - dev->open = virtnet_open; - dev->stop = virtnet_close; - dev->hard_start_xmit = start_xmit; - dev->change_mtu = virtnet_change_mtu; + dev->netdev_ops = &virtnet_netdev; dev->features = NETIF_F_HIGHDMA; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = virtnet_netpoll; -#endif SET_ETHTOOL_OPS(dev, &virtnet_ethtool_ops); SET_NETDEV_DEV(dev, &vdev->dev); |