diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-11 03:38:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 18:16:23 -0400 |
commit | 5a1c28b3e4aa0ac755d73363fd1c84c0063c06be (patch) | |
tree | 9b7a72f00983b8bb39bed7a0ea2fe5afc4aedbc4 /drivers/net | |
parent | 80ef1fc82e3feb541f9645322eab7afa778cce98 (diff) |
tc35815: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tc35815.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index d91e95b237b7..0ce2db6ce2bf 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -862,6 +862,22 @@ static int __devinit tc35815_init_dev_addr(struct net_device *dev) | |||
862 | return 0; | 862 | return 0; |
863 | } | 863 | } |
864 | 864 | ||
865 | static const struct net_device_ops tc35815_netdev_ops = { | ||
866 | .ndo_open = tc35815_open, | ||
867 | .ndo_stop = tc35815_close, | ||
868 | .ndo_start_xmit = tc35815_send_packet, | ||
869 | .ndo_get_stats = tc35815_get_stats, | ||
870 | .ndo_set_multicast_list = tc35815_set_multicast_list, | ||
871 | .ndo_tx_timeout = tc35815_tx_timeout, | ||
872 | .ndo_do_ioctl = tc35815_ioctl, | ||
873 | .ndo_validate_addr = eth_validate_addr, | ||
874 | .ndo_change_mtu = eth_change_mtu, | ||
875 | .ndo_set_mac_address = eth_mac_addr, | ||
876 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
877 | .ndo_poll_controller = tc35815_poll_controller, | ||
878 | #endif | ||
879 | }; | ||
880 | |||
865 | static int __devinit tc35815_init_one(struct pci_dev *pdev, | 881 | static int __devinit tc35815_init_one(struct pci_dev *pdev, |
866 | const struct pci_device_id *ent) | 882 | const struct pci_device_id *ent) |
867 | { | 883 | { |
@@ -904,21 +920,12 @@ static int __devinit tc35815_init_one(struct pci_dev *pdev, | |||
904 | ioaddr = pcim_iomap_table(pdev)[1]; | 920 | ioaddr = pcim_iomap_table(pdev)[1]; |
905 | 921 | ||
906 | /* Initialize the device structure. */ | 922 | /* Initialize the device structure. */ |
907 | dev->open = tc35815_open; | 923 | dev->netdev_ops = &tc35815_netdev_ops; |
908 | dev->hard_start_xmit = tc35815_send_packet; | ||
909 | dev->stop = tc35815_close; | ||
910 | dev->get_stats = tc35815_get_stats; | ||
911 | dev->set_multicast_list = tc35815_set_multicast_list; | ||
912 | dev->do_ioctl = tc35815_ioctl; | ||
913 | dev->ethtool_ops = &tc35815_ethtool_ops; | 924 | dev->ethtool_ops = &tc35815_ethtool_ops; |
914 | dev->tx_timeout = tc35815_tx_timeout; | ||
915 | dev->watchdog_timeo = TC35815_TX_TIMEOUT; | 925 | dev->watchdog_timeo = TC35815_TX_TIMEOUT; |
916 | #ifdef TC35815_NAPI | 926 | #ifdef TC35815_NAPI |
917 | netif_napi_add(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT); | 927 | netif_napi_add(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT); |
918 | #endif | 928 | #endif |
919 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
920 | dev->poll_controller = tc35815_poll_controller; | ||
921 | #endif | ||
922 | 929 | ||
923 | dev->irq = pdev->irq; | 930 | dev->irq = pdev->irq; |
924 | dev->base_addr = (unsigned long)ioaddr; | 931 | dev->base_addr = (unsigned long)ioaddr; |