diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:24 -0500 |
commit | f3701c2f0e2ede7ae265fcf627f01f2a795ac41b (patch) | |
tree | e867f10c1fd780d143ec8d2e8154e8d93e7096d7 /drivers/net/3c515.c | |
parent | 3186ae8f3f5a30ecfed9faa76ce113830da39fbd (diff) |
3c515: 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/3c515.c')
-rw-r--r-- | drivers/net/3c515.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 39ac12233aa7..167bf23066ea 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -563,6 +563,20 @@ no_pnp: | |||
563 | return NULL; | 563 | return NULL; |
564 | } | 564 | } |
565 | 565 | ||
566 | |||
567 | static const struct net_device_ops netdev_ops = { | ||
568 | .ndo_open = corkscrew_open, | ||
569 | .ndo_stop = corkscrew_close, | ||
570 | .ndo_start_xmit = corkscrew_start_xmit, | ||
571 | .ndo_tx_timeout = corkscrew_timeout, | ||
572 | .ndo_get_stats = corkscrew_get_stats, | ||
573 | .ndo_set_multicast_list = set_rx_mode, | ||
574 | .ndo_change_mtu = eth_change_mtu, | ||
575 | .ndo_set_mac_address = eth_mac_addr, | ||
576 | .ndo_validate_addr = eth_validate_addr, | ||
577 | }; | ||
578 | |||
579 | |||
566 | static int corkscrew_setup(struct net_device *dev, int ioaddr, | 580 | static int corkscrew_setup(struct net_device *dev, int ioaddr, |
567 | struct pnp_dev *idev, int card_number) | 581 | struct pnp_dev *idev, int card_number) |
568 | { | 582 | { |
@@ -681,13 +695,8 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, | |||
681 | vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; | 695 | vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; |
682 | 696 | ||
683 | /* The 3c51x-specific entries in the device structure. */ | 697 | /* The 3c51x-specific entries in the device structure. */ |
684 | dev->open = &corkscrew_open; | 698 | dev->netdev_ops = &netdev_ops; |
685 | dev->hard_start_xmit = &corkscrew_start_xmit; | ||
686 | dev->tx_timeout = &corkscrew_timeout; | ||
687 | dev->watchdog_timeo = (400 * HZ) / 1000; | 699 | dev->watchdog_timeo = (400 * HZ) / 1000; |
688 | dev->stop = &corkscrew_close; | ||
689 | dev->get_stats = &corkscrew_get_stats; | ||
690 | dev->set_multicast_list = &set_rx_mode; | ||
691 | dev->ethtool_ops = &netdev_ethtool_ops; | 700 | dev->ethtool_ops = &netdev_ethtool_ops; |
692 | 701 | ||
693 | return register_netdev(dev); | 702 | return register_netdev(dev); |