diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:40 -0400 |
commit | 8bb95b39a16ed55226810596f92216c53329d2fe (patch) | |
tree | 830bd1ed0ae08360a86d986597d1b7367dad27ce /arch/um/drivers/net_kern.c | |
parent | cfa8707aa65f7ec8ed2130937810b4fb05b40cfa (diff) |
uml: convert network device to netdevice ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/um/drivers/net_kern.c')
-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 6d2b1004d1e1..434224e2229f 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) | |||
371 | free_netdev(netdev); | 371 | free_netdev(netdev); |
372 | } | 372 | } |
373 | 373 | ||
374 | static const struct net_device_ops uml_netdev_ops = { | ||
375 | .ndo_open = uml_net_open, | ||
376 | .ndo_stop = uml_net_close, | ||
377 | .ndo_start_xmit = uml_net_start_xmit, | ||
378 | .ndo_set_multicast_list = uml_net_set_multicast_list, | ||
379 | .ndo_tx_timeout = uml_net_tx_timeout, | ||
380 | .ndo_set_mac_address = uml_net_set_mac, | ||
381 | .ndo_change_mtu = uml_net_change_mtu, | ||
382 | .ndo_set_mac_address = eth_mac_addr, | ||
383 | .ndo_validate_addr = eth_validate_addr, | ||
384 | }; | ||
385 | |||
374 | /* | 386 | /* |
375 | * Ensures that platform_driver_register is called only once by | 387 | * Ensures that platform_driver_register is called only once by |
376 | * eth_configure. Will be set in an initcall. | 388 | * eth_configure. Will be set in an initcall. |
@@ -467,13 +479,7 @@ static void eth_configure(int n, void *init, char *mac, | |||
467 | 479 | ||
468 | set_ether_mac(dev, device->mac); | 480 | set_ether_mac(dev, device->mac); |
469 | dev->mtu = transport->user->mtu; | 481 | dev->mtu = transport->user->mtu; |
470 | dev->open = uml_net_open; | 482 | dev->netdev_ops = ¨_netdev_ops; |
471 | dev->hard_start_xmit = uml_net_start_xmit; | ||
472 | dev->stop = uml_net_close; | ||
473 | dev->set_multicast_list = uml_net_set_multicast_list; | ||
474 | dev->tx_timeout = uml_net_tx_timeout; | ||
475 | dev->set_mac_address = uml_net_set_mac; | ||
476 | dev->change_mtu = uml_net_change_mtu; | ||
477 | dev->ethtool_ops = ¨_net_ethtool_ops; | 483 | dev->ethtool_ops = ¨_net_ethtool_ops; |
478 | dev->watchdog_timeo = (HZ >> 1); | 484 | dev->watchdog_timeo = (HZ >> 1); |
479 | dev->irq = UM_ETH_IRQ; | 485 | dev->irq = UM_ETH_IRQ; |