diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:30:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:30:11 -0500 |
commit | 5d1d07d8b0bbed82546b89e3222ec98567c1652b (patch) | |
tree | 709ca9b110c33f161218b7e8432ddf0d7aaf0281 | |
parent | 8668ae9241de085f046aa14fa3a97654a31a06e3 (diff) |
via-rhine: 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>
-rw-r--r-- | drivers/net/via-rhine.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 9a650d0a6795..93b74b7b7077 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -614,6 +614,20 @@ static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr) | |||
614 | rhine_reload_eeprom(pioaddr, dev); | 614 | rhine_reload_eeprom(pioaddr, dev); |
615 | } | 615 | } |
616 | 616 | ||
617 | static const struct net_device_ops rhine_netdev_ops = { | ||
618 | .ndo_open = rhine_open, | ||
619 | .ndo_stop = rhine_close, | ||
620 | .ndo_start_xmit = rhine_start_tx, | ||
621 | .ndo_get_stats = rhine_get_stats, | ||
622 | .ndo_set_multicast_list = rhine_set_rx_mode, | ||
623 | .ndo_validate_addr = eth_validate_addr, | ||
624 | .ndo_do_ioctl = netdev_ioctl, | ||
625 | .ndo_tx_timeout = rhine_tx_timeout, | ||
626 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
627 | .ndo_poll_controller = rhine_poll, | ||
628 | #endif | ||
629 | }; | ||
630 | |||
617 | static int __devinit rhine_init_one(struct pci_dev *pdev, | 631 | static int __devinit rhine_init_one(struct pci_dev *pdev, |
618 | const struct pci_device_id *ent) | 632 | const struct pci_device_id *ent) |
619 | { | 633 | { |
@@ -764,18 +778,10 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, | |||
764 | rp->mii_if.reg_num_mask = 0x1f; | 778 | rp->mii_if.reg_num_mask = 0x1f; |
765 | 779 | ||
766 | /* The chip-specific entries in the device structure. */ | 780 | /* The chip-specific entries in the device structure. */ |
767 | dev->open = rhine_open; | 781 | dev->netdev_ops = &rhine_netdev_ops; |
768 | dev->hard_start_xmit = rhine_start_tx; | 782 | dev->ethtool_ops = &netdev_ethtool_ops, |
769 | dev->stop = rhine_close; | ||
770 | dev->get_stats = rhine_get_stats; | ||
771 | dev->set_multicast_list = rhine_set_rx_mode; | ||
772 | dev->do_ioctl = netdev_ioctl; | ||
773 | dev->ethtool_ops = &netdev_ethtool_ops; | ||
774 | dev->tx_timeout = rhine_tx_timeout; | ||
775 | dev->watchdog_timeo = TX_TIMEOUT; | 783 | dev->watchdog_timeo = TX_TIMEOUT; |
776 | #ifdef CONFIG_NET_POLL_CONTROLLER | 784 | |
777 | dev->poll_controller = rhine_poll; | ||
778 | #endif | ||
779 | netif_napi_add(dev, &rp->napi, rhine_napipoll, 64); | 785 | netif_napi_add(dev, &rp->napi, rhine_napipoll, 64); |
780 | 786 | ||
781 | if (rp->quirks & rqRhineI) | 787 | if (rp->quirks & rqRhineI) |