diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 15:11:17 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 00:46:40 -0700 |
commit | 8bb95b39a16ed55226810596f92216c53329d2fe (patch) | |
tree | 830bd1ed0ae08360a86d986597d1b7367dad27ce | |
parent | cfa8707aa65f7ec8ed2130937810b4fb05b40cfa (diff) | |
download | linux-3.10-8bb95b39a16ed55226810596f92216c53329d2fe.tar.gz linux-3.10-8bb95b39a16ed55226810596f92216c53329d2fe.tar.bz2 linux-3.10-8bb95b39a16ed55226810596f92216c53329d2fe.zip |
uml: convert network device to netdevice ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/um/drivers/net_kern.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 6d2b1004d1e..434224e2229 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -371,6 +371,18 @@ static void net_device_release(struct device *dev) free_netdev(netdev); } +static const struct net_device_ops uml_netdev_ops = { + .ndo_open = uml_net_open, + .ndo_stop = uml_net_close, + .ndo_start_xmit = uml_net_start_xmit, + .ndo_set_multicast_list = uml_net_set_multicast_list, + .ndo_tx_timeout = uml_net_tx_timeout, + .ndo_set_mac_address = uml_net_set_mac, + .ndo_change_mtu = uml_net_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + /* * Ensures that platform_driver_register is called only once by * eth_configure. Will be set in an initcall. @@ -467,13 +479,7 @@ static void eth_configure(int n, void *init, char *mac, set_ether_mac(dev, device->mac); dev->mtu = transport->user->mtu; - dev->open = uml_net_open; - dev->hard_start_xmit = uml_net_start_xmit; - dev->stop = uml_net_close; - dev->set_multicast_list = uml_net_set_multicast_list; - dev->tx_timeout = uml_net_tx_timeout; - dev->set_mac_address = uml_net_set_mac; - dev->change_mtu = uml_net_change_mtu; + dev->netdev_ops = ¨_netdev_ops; dev->ethtool_ops = ¨_net_ethtool_ops; dev->watchdog_timeo = (HZ >> 1); dev->irq = UM_ETH_IRQ; |