diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:24 -0500 |
commit | 90e64c6ad2a5dd3ecad1b59e466d42945fe22eb2 (patch) | |
tree | fbb1c4b87448585b077bb6946da247b6278d7d4c /drivers/net | |
parent | f3701c2f0e2ede7ae265fcf627f01f2a795ac41b (diff) |
3c523: convert 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/3c523.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index ff41e1ff5603..8f734d74b513 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -403,6 +403,20 @@ static int elmc_getinfo(char *buf, int slot, void *d) | |||
403 | return len; | 403 | return len; |
404 | } /* elmc_getinfo() */ | 404 | } /* elmc_getinfo() */ |
405 | 405 | ||
406 | static const struct net_device_ops netdev_ops = { | ||
407 | .ndo_open = elmc_open, | ||
408 | .ndo_stop = elmc_close, | ||
409 | .ndo_get_stats = elmc_get_stats, | ||
410 | .ndo_start_xmit = elmc_send_packet, | ||
411 | .ndo_tx_timeout = elmc_timeout, | ||
412 | #ifdef ELMC_MULTICAST | ||
413 | .ndo_set_multicast_list = set_multicast_list, | ||
414 | #endif | ||
415 | .ndo_change_mtu = eth_change_mtu, | ||
416 | .ndo_set_mac_address = eth_mac_addr, | ||
417 | .ndo_validate_addr = eth_validate_addr, | ||
418 | }; | ||
419 | |||
406 | /*****************************************************************/ | 420 | /*****************************************************************/ |
407 | 421 | ||
408 | static int __init do_elmc_probe(struct net_device *dev) | 422 | static int __init do_elmc_probe(struct net_device *dev) |
@@ -544,17 +558,8 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
544 | printk(KERN_INFO "%s: hardware address %pM\n", | 558 | printk(KERN_INFO "%s: hardware address %pM\n", |
545 | dev->name, dev->dev_addr); | 559 | dev->name, dev->dev_addr); |
546 | 560 | ||
547 | dev->open = &elmc_open; | 561 | dev->netdev_ops = &netdev_ops; |
548 | dev->stop = &elmc_close; | ||
549 | dev->get_stats = &elmc_get_stats; | ||
550 | dev->hard_start_xmit = &elmc_send_packet; | ||
551 | dev->tx_timeout = &elmc_timeout; | ||
552 | dev->watchdog_timeo = HZ; | 562 | dev->watchdog_timeo = HZ; |
553 | #ifdef ELMC_MULTICAST | ||
554 | dev->set_multicast_list = &set_multicast_list; | ||
555 | #else | ||
556 | dev->set_multicast_list = NULL; | ||
557 | #endif | ||
558 | dev->ethtool_ops = &netdev_ethtool_ops; | 563 | dev->ethtool_ops = &netdev_ethtool_ops; |
559 | 564 | ||
560 | /* note that we haven't actually requested the IRQ from the kernel. | 565 | /* note that we haven't actually requested the IRQ from the kernel. |