aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/net_kern.c20
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)
371 free_netdev(netdev); 371 free_netdev(netdev);
372} 372}
373 373
374static 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 = &uml_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 = &uml_net_ethtool_ops; 483 dev->ethtool_ops = &uml_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;