aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 20:59:15 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 20:59:15 -0500
commitf4266cf34d7b903e2e11b317f2e548a2acc4cd4e (patch)
tree83b1cd22dbab5cb44e6cecebbf3b5e1eae17c2f1 /drivers/net/tulip
parent633a277e2a06b4cc10b1373380b09613c702523c (diff)
tulip: convert devices to new API
Convert to net_device_ops and internal net_device_stats Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/tulip_core.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index ff84babb3ff3..bee75fa87a9c 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1225,6 +1225,22 @@ static int tulip_uli_dm_quirk(struct pci_dev *pdev)
1225 return 0; 1225 return 0;
1226} 1226}
1227 1227
1228static const struct net_device_ops tulip_netdev_ops = {
1229 .ndo_open = tulip_open,
1230 .ndo_start_xmit = tulip_start_xmit,
1231 .ndo_tx_timeout = tulip_tx_timeout,
1232 .ndo_stop = tulip_close,
1233 .ndo_get_stats = tulip_get_stats,
1234 .ndo_do_ioctl = private_ioctl,
1235 .ndo_set_multicast_list = set_rx_mode,
1236 .ndo_change_mtu = eth_change_mtu,
1237 .ndo_set_mac_address = eth_mac_addr,
1238 .ndo_validate_addr = eth_validate_addr,
1239#ifdef CONFIG_NET_POLL_CONTROLLER
1240 .ndo_poll_controller = poll_tulip,
1241#endif
1242};
1243
1228static int __devinit tulip_init_one (struct pci_dev *pdev, 1244static int __devinit tulip_init_one (struct pci_dev *pdev,
1229 const struct pci_device_id *ent) 1245 const struct pci_device_id *ent)
1230{ 1246{
@@ -1601,20 +1617,11 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1601 } 1617 }
1602 1618
1603 /* The Tulip-specific entries in the device structure. */ 1619 /* The Tulip-specific entries in the device structure. */
1604 dev->open = tulip_open; 1620 dev->netdev_ops = &tulip_netdev_ops;
1605 dev->hard_start_xmit = tulip_start_xmit;
1606 dev->tx_timeout = tulip_tx_timeout;
1607 dev->watchdog_timeo = TX_TIMEOUT; 1621 dev->watchdog_timeo = TX_TIMEOUT;
1608#ifdef CONFIG_TULIP_NAPI 1622#ifdef CONFIG_TULIP_NAPI
1609 netif_napi_add(dev, &tp->napi, tulip_poll, 16); 1623 netif_napi_add(dev, &tp->napi, tulip_poll, 16);
1610#endif 1624#endif
1611 dev->stop = tulip_close;
1612 dev->get_stats = tulip_get_stats;
1613 dev->do_ioctl = private_ioctl;
1614 dev->set_multicast_list = set_rx_mode;
1615#ifdef CONFIG_NET_POLL_CONTROLLER
1616 dev->poll_controller = &poll_tulip;
1617#endif
1618 SET_ETHTOOL_OPS(dev, &ops); 1625 SET_ETHTOOL_OPS(dev, &ops);
1619 1626
1620 if (register_netdev(dev)) 1627 if (register_netdev(dev))