diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:36:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:36:36 -0500 |
commit | a8652d237b599a03d7d982fcfdab276706babfa5 (patch) | |
tree | bf122eed1fc780189e3ebf17067ab220565f6daf /drivers | |
parent | c64213cd138cf9815839f7278b5eee89d31fbacb (diff) |
hamachi: convert to net_device_ops
Convert driver to new net_device_ops. Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/hamachi.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 77f2b2934e67..32200227c923 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -568,6 +568,19 @@ static void set_rx_mode(struct net_device *dev); | |||
568 | static const struct ethtool_ops ethtool_ops; | 568 | static const struct ethtool_ops ethtool_ops; |
569 | static const struct ethtool_ops ethtool_ops_no_mii; | 569 | static const struct ethtool_ops ethtool_ops_no_mii; |
570 | 570 | ||
571 | static const struct net_device_ops hamachi_netdev_ops = { | ||
572 | .ndo_open = hamachi_open, | ||
573 | .ndo_stop = hamachi_close, | ||
574 | .ndo_start_xmit = hamachi_start_xmit, | ||
575 | .ndo_get_stats = hamachi_get_stats, | ||
576 | .ndo_set_multicast_list = set_rx_mode, | ||
577 | .ndo_change_mtu = eth_change_mtu, | ||
578 | .ndo_validate_addr = eth_validate_addr, | ||
579 | .ndo_tx_timeout = hamachi_tx_timeout, | ||
580 | .ndo_do_ioctl = netdev_ioctl, | ||
581 | }; | ||
582 | |||
583 | |||
571 | static int __devinit hamachi_init_one (struct pci_dev *pdev, | 584 | static int __devinit hamachi_init_one (struct pci_dev *pdev, |
572 | const struct pci_device_id *ent) | 585 | const struct pci_device_id *ent) |
573 | { | 586 | { |
@@ -722,17 +735,11 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev, | |||
722 | 735 | ||
723 | 736 | ||
724 | /* The Hamachi-specific entries in the device structure. */ | 737 | /* The Hamachi-specific entries in the device structure. */ |
725 | dev->open = &hamachi_open; | 738 | dev->netdev_ops = &hamachi_netdev_ops; |
726 | dev->hard_start_xmit = &hamachi_start_xmit; | ||
727 | dev->stop = &hamachi_close; | ||
728 | dev->get_stats = &hamachi_get_stats; | ||
729 | dev->set_multicast_list = &set_rx_mode; | ||
730 | dev->do_ioctl = &netdev_ioctl; | ||
731 | if (chip_tbl[hmp->chip_id].flags & CanHaveMII) | 739 | if (chip_tbl[hmp->chip_id].flags & CanHaveMII) |
732 | SET_ETHTOOL_OPS(dev, ðtool_ops); | 740 | SET_ETHTOOL_OPS(dev, ðtool_ops); |
733 | else | 741 | else |
734 | SET_ETHTOOL_OPS(dev, ðtool_ops_no_mii); | 742 | SET_ETHTOOL_OPS(dev, ðtool_ops_no_mii); |
735 | dev->tx_timeout = &hamachi_tx_timeout; | ||
736 | dev->watchdog_timeo = TX_TIMEOUT; | 743 | dev->watchdog_timeo = TX_TIMEOUT; |
737 | if (mtu) | 744 | if (mtu) |
738 | dev->mtu = mtu; | 745 | dev->mtu = mtu; |