aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/winbond-840.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 21:02:26 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 21:02:26 -0500
commit2a97e6b735416054dcc1b3cf7f4d358f43b45c6e (patch)
tree95a9f1b4b94d0adf06a7874c3f6b67f99fadd5af /drivers/net/tulip/winbond-840.c
parentdfefe02bfd865c18eeaebc07ff1cd50120c40c20 (diff)
windbond: convert devices to new API
Convert to net_device_ops and internal net_device_stats Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r--drivers/net/tulip/winbond-840.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 022d99af8646..f467bf87817d 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -343,7 +343,18 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
343static const struct ethtool_ops netdev_ethtool_ops; 343static const struct ethtool_ops netdev_ethtool_ops;
344static int netdev_close(struct net_device *dev); 344static int netdev_close(struct net_device *dev);
345 345
346 346static const struct net_device_ops netdev_ops = {
347 .ndo_open = netdev_open,
348 .ndo_stop = netdev_close,
349 .ndo_start_xmit = start_tx,
350 .ndo_get_stats = get_stats,
351 .ndo_set_multicast_list = set_rx_mode,
352 .ndo_do_ioctl = netdev_ioctl,
353 .ndo_tx_timeout = tx_timeout,
354 .ndo_change_mtu = eth_change_mtu,
355 .ndo_set_mac_address = eth_mac_addr,
356 .ndo_validate_addr = eth_validate_addr,
357};
347 358
348static int __devinit w840_probe1 (struct pci_dev *pdev, 359static int __devinit w840_probe1 (struct pci_dev *pdev,
349 const struct pci_device_id *ent) 360 const struct pci_device_id *ent)
@@ -420,14 +431,8 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
420 np->mii_if.force_media = 1; 431 np->mii_if.force_media = 1;
421 432
422 /* The chip-specific entries in the device structure. */ 433 /* The chip-specific entries in the device structure. */
423 dev->open = &netdev_open; 434 dev->netdev_ops = &netdev_ops;
424 dev->hard_start_xmit = &start_tx;
425 dev->stop = &netdev_close;
426 dev->get_stats = &get_stats;
427 dev->set_multicast_list = &set_rx_mode;
428 dev->do_ioctl = &netdev_ioctl;
429 dev->ethtool_ops = &netdev_ethtool_ops; 435 dev->ethtool_ops = &netdev_ethtool_ops;
430 dev->tx_timeout = &tx_timeout;
431 dev->watchdog_timeo = TX_TIMEOUT; 436 dev->watchdog_timeo = TX_TIMEOUT;
432 437
433 i = register_netdev(dev); 438 i = register_netdev(dev);
@@ -1555,7 +1560,7 @@ static void __devexit w840_remove1 (struct pci_dev *pdev)
1555 * rtnl_lock, & netif_device_detach after the rtnl_unlock. 1560 * rtnl_lock, & netif_device_detach after the rtnl_unlock.
1556 * - get_stats: 1561 * - get_stats:
1557 * spin_lock_irq(np->lock), doesn't touch hw if not present 1562 * spin_lock_irq(np->lock), doesn't touch hw if not present
1558 * - hard_start_xmit: 1563 * - start_xmit:
1559 * synchronize_irq + netif_tx_disable; 1564 * synchronize_irq + netif_tx_disable;
1560 * - tx_timeout: 1565 * - tx_timeout:
1561 * netif_device_detach + netif_tx_disable; 1566 * netif_device_detach + netif_tx_disable;