aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunvnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sunvnet.c')
-rw-r--r--drivers/net/sunvnet.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
index 611230fef2b6..a82fb2aca4cb 100644
--- a/drivers/net/sunvnet.c
+++ b/drivers/net/sunvnet.c
@@ -1012,6 +1012,16 @@ err_out:
1012static LIST_HEAD(vnet_list); 1012static LIST_HEAD(vnet_list);
1013static DEFINE_MUTEX(vnet_list_mutex); 1013static DEFINE_MUTEX(vnet_list_mutex);
1014 1014
1015static const struct net_device_ops vnet_ops = {
1016 .ndo_open = vnet_open,
1017 .ndo_stop = vnet_close,
1018 .ndo_set_multicast_list = vnet_set_rx_mode,
1019 .ndo_set_mac_address = vnet_set_mac_addr,
1020 .ndo_tx_timeout = vnet_tx_timeout,
1021 .ndo_change_mtu = vnet_change_mtu,
1022 .ndo_start_xmit = vnet_start_xmit,
1023};
1024
1015static struct vnet * __devinit vnet_new(const u64 *local_mac) 1025static struct vnet * __devinit vnet_new(const u64 *local_mac)
1016{ 1026{
1017 struct net_device *dev; 1027 struct net_device *dev;
@@ -1040,15 +1050,9 @@ static struct vnet * __devinit vnet_new(const u64 *local_mac)
1040 INIT_LIST_HEAD(&vp->list); 1050 INIT_LIST_HEAD(&vp->list);
1041 vp->local_mac = *local_mac; 1051 vp->local_mac = *local_mac;
1042 1052
1043 dev->open = vnet_open; 1053 dev->netdev_ops = &vnet_ops;
1044 dev->stop = vnet_close;
1045 dev->set_multicast_list = vnet_set_rx_mode;
1046 dev->set_mac_address = vnet_set_mac_addr;
1047 dev->tx_timeout = vnet_tx_timeout;
1048 dev->ethtool_ops = &vnet_ethtool_ops; 1054 dev->ethtool_ops = &vnet_ethtool_ops;
1049 dev->watchdog_timeo = VNET_TX_TIMEOUT; 1055 dev->watchdog_timeo = VNET_TX_TIMEOUT;
1050 dev->change_mtu = vnet_change_mtu;
1051 dev->hard_start_xmit = vnet_start_xmit;
1052 1056
1053 err = register_netdev(dev); 1057 err = register_netdev(dev);
1054 if (err) { 1058 if (err) {