Commit b8aa76a2bd9782e1a45e96602812910d5cfe7b52

Authored by Stephen Hemminger
Committed by David S. Miller
1 parent 1f5ec79b8e

de600: update to net_device_ops

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 2 changed files with 23 additions and 8 deletions Side-by-side Diff

... ... @@ -378,6 +378,16 @@
378 378 */
379 379 }
380 380  
  381 +static const struct net_device_ops de600_netdev_ops = {
  382 + .ndo_open = de600_open,
  383 + .ndo_stop = de600_close,
  384 + .ndo_start_xmit = de600_start_xmit,
  385 + .ndo_change_mtu = eth_change_mtu,
  386 + .ndo_set_mac_address = eth_mac_addr,
  387 + .ndo_validate_addr = eth_validate_addr,
  388 +};
  389 +
  390 +
381 391 static struct net_device * __init de600_probe(void)
382 392 {
383 393 int i;
... ... @@ -439,9 +449,7 @@
439 449  
440 450 printk(", Ethernet Address: %pM\n", dev->dev_addr);
441 451  
442   - dev->open = de600_open;
443   - dev->stop = de600_close;
444   - dev->hard_start_xmit = &de600_start_xmit;
  452 + dev->netdev_ops = &de600_netdev_ops;
445 453  
446 454 dev->flags&=~IFF_MULTICAST;
447 455  
... ... @@ -784,6 +784,17 @@
784 784 return 0; /* all ok */
785 785 }
786 786  
  787 +static const struct net_device_ops de620_netdev_ops = {
  788 + .ndo_open = de620_open,
  789 + .ndo_stop = de620_close,
  790 + .ndo_start_xmit = de620_start_xmit,
  791 + .ndo_tx_timeout = de620_timeout,
  792 + .ndo_set_multicast_list = de620_set_multicast_list,
  793 + .ndo_change_mtu = eth_change_mtu,
  794 + .ndo_set_mac_address = eth_mac_addr,
  795 + .ndo_validate_addr = eth_validate_addr,
  796 +};
  797 +
787 798 /******************************************************************************
788 799 *
789 800 * Only start-up code below
790 801  
... ... @@ -861,12 +872,8 @@
861 872 else
862 873 printk(" UTP)\n");
863 874  
864   - dev->open = de620_open;
865   - dev->stop = de620_close;
866   - dev->hard_start_xmit = de620_start_xmit;
867   - dev->tx_timeout = de620_timeout;
  875 + dev->netdev_ops = &de620_netdev_ops;
868 876 dev->watchdog_timeo = HZ*2;
869   - dev->set_multicast_list = de620_set_multicast_list;
870 877  
871 878 /* base_addr and irq are already set, see above! */
872 879