diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:53 -0400 |
commit | 2c7669e3a9f748dd35743f06cbdaf4340263c3bf (patch) | |
tree | d09763c8aee84081f5841885264e6c92896243ad /drivers/net | |
parent | 968804d9705a014f231eedf82ba9e33810898b68 (diff) |
netdev: convert ni52 to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ni52.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index a8bcc00c3302..77d44a061703 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c | |||
@@ -441,6 +441,18 @@ out: | |||
441 | return ERR_PTR(err); | 441 | return ERR_PTR(err); |
442 | } | 442 | } |
443 | 443 | ||
444 | static const struct net_device_ops ni52_netdev_ops = { | ||
445 | .ndo_open = ni52_open, | ||
446 | .ndo_stop = ni52_close, | ||
447 | .ndo_get_stats = ni52_get_stats, | ||
448 | .ndo_tx_timeout = ni52_timeout, | ||
449 | .ndo_start_xmit = ni52_send_packet, | ||
450 | .ndo_set_multicast_list = set_multicast_list, | ||
451 | .ndo_change_mtu = eth_change_mtu, | ||
452 | .ndo_set_mac_address = eth_mac_addr, | ||
453 | .ndo_validate_addr = eth_validate_addr, | ||
454 | }; | ||
455 | |||
444 | static int __init ni52_probe1(struct net_device *dev, int ioaddr) | 456 | static int __init ni52_probe1(struct net_device *dev, int ioaddr) |
445 | { | 457 | { |
446 | int i, size, retval; | 458 | int i, size, retval; |
@@ -561,15 +573,8 @@ static int __init ni52_probe1(struct net_device *dev, int ioaddr) | |||
561 | printk("IRQ %d (assigned and not checked!).\n", dev->irq); | 573 | printk("IRQ %d (assigned and not checked!).\n", dev->irq); |
562 | } | 574 | } |
563 | 575 | ||
564 | dev->open = ni52_open; | 576 | dev->netdev_ops = &ni52_netdev_ops; |
565 | dev->stop = ni52_close; | ||
566 | dev->get_stats = ni52_get_stats; | ||
567 | dev->tx_timeout = ni52_timeout; | ||
568 | dev->watchdog_timeo = HZ/20; | 577 | dev->watchdog_timeo = HZ/20; |
569 | dev->hard_start_xmit = ni52_send_packet; | ||
570 | dev->set_multicast_list = set_multicast_list; | ||
571 | |||
572 | dev->if_port = 0; | ||
573 | 578 | ||
574 | return 0; | 579 | return 0; |
575 | out: | 580 | out: |