aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:01:18 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:02:25 -0500
commit48b47a5e306c1c119ee81ccd24d487c2df656410 (patch)
tree1db39a33843e4c09c557360c60aa4a5e53327a72 /drivers/net
parent4394e6533da7f652a19e08009fff713f4168915e (diff)
3c59x: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c59x.c55
1 files changed, 40 insertions, 15 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index cdbbb6226fc5..b2563d384cf2 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -992,6 +992,42 @@ out:
992 return rc; 992 return rc;
993} 993}
994 994
995static const struct net_device_ops boomrang_netdev_ops = {
996 .ndo_open = vortex_open,
997 .ndo_stop = vortex_close,
998 .ndo_start_xmit = boomerang_start_xmit,
999 .ndo_tx_timeout = vortex_tx_timeout,
1000 .ndo_get_stats = vortex_get_stats,
1001#ifdef CONFIG_PCI
1002 .ndo_do_ioctl = vortex_ioctl,
1003#endif
1004 .ndo_set_multicast_list = set_rx_mode,
1005 .ndo_change_mtu = eth_change_mtu,
1006 .ndo_set_mac_address = eth_mac_addr,
1007 .ndo_validate_addr = eth_validate_addr,
1008#ifdef CONFIG_NET_POLL_CONTROLLER
1009 .ndo_poll_controller = poll_vortex,
1010#endif
1011};
1012
1013static const struct net_device_ops vortex_netdev_ops = {
1014 .ndo_open = vortex_open,
1015 .ndo_stop = vortex_close,
1016 .ndo_start_xmit = vortex_start_xmit,
1017 .ndo_tx_timeout = vortex_tx_timeout,
1018 .ndo_get_stats = vortex_get_stats,
1019#ifdef CONFIG_PCI
1020 .ndo_do_ioctl = vortex_ioctl,
1021#endif
1022 .ndo_set_multicast_list = set_rx_mode,
1023 .ndo_change_mtu = eth_change_mtu,
1024 .ndo_set_mac_address = eth_mac_addr,
1025 .ndo_validate_addr = eth_validate_addr,
1026#ifdef CONFIG_NET_POLL_CONTROLLER
1027 .ndo_poll_controller = poll_vortex,
1028#endif
1029};
1030
995/* 1031/*
996 * Start up the PCI/EISA device which is described by *gendev. 1032 * Start up the PCI/EISA device which is described by *gendev.
997 * Return 0 on success. 1033 * Return 0 on success.
@@ -1366,18 +1402,16 @@ static int __devinit vortex_probe1(struct device *gendev,
1366 } 1402 }
1367 1403
1368 /* The 3c59x-specific entries in the device structure. */ 1404 /* The 3c59x-specific entries in the device structure. */
1369 dev->open = vortex_open;
1370 if (vp->full_bus_master_tx) { 1405 if (vp->full_bus_master_tx) {
1371 dev->hard_start_xmit = boomerang_start_xmit; 1406 dev->netdev_ops = &boomrang_netdev_ops;
1372 /* Actually, it still should work with iommu. */ 1407 /* Actually, it still should work with iommu. */
1373 if (card_idx < MAX_UNITS && 1408 if (card_idx < MAX_UNITS &&
1374 ((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) || 1409 ((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) ||
1375 hw_checksums[card_idx] == 1)) { 1410 hw_checksums[card_idx] == 1)) {
1376 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; 1411 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
1377 } 1412 }
1378 } else { 1413 } else
1379 dev->hard_start_xmit = vortex_start_xmit; 1414 dev->netdev_ops = &vortex_netdev_ops;
1380 }
1381 1415
1382 if (print_info) { 1416 if (print_info) {
1383 printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", 1417 printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n",
@@ -1386,18 +1420,9 @@ static int __devinit vortex_probe1(struct device *gendev,
1386 (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); 1420 (dev->features & NETIF_F_IP_CSUM) ? "en":"dis");
1387 } 1421 }
1388 1422
1389 dev->stop = vortex_close;
1390 dev->get_stats = vortex_get_stats;
1391#ifdef CONFIG_PCI
1392 dev->do_ioctl = vortex_ioctl;
1393#endif
1394 dev->ethtool_ops = &vortex_ethtool_ops; 1423 dev->ethtool_ops = &vortex_ethtool_ops;
1395 dev->set_multicast_list = set_rx_mode;
1396 dev->tx_timeout = vortex_tx_timeout;
1397 dev->watchdog_timeo = (watchdog * HZ) / 1000; 1424 dev->watchdog_timeo = (watchdog * HZ) / 1000;
1398#ifdef CONFIG_NET_POLL_CONTROLLER 1425
1399 dev->poll_controller = poll_vortex;
1400#endif
1401 if (pdev) { 1426 if (pdev) {
1402 vp->pm_state_valid = 1; 1427 vp->pm_state_valid = 1;
1403 pci_save_state(VORTEX_PCI(vp)); 1428 pci_save_state(VORTEX_PCI(vp));