Commit 48b47a5e306c1c119ee81ccd24d487c2df656410

Authored by Stephen Hemminger
Committed by David S. Miller
1 parent 4394e6533d

3c59x: convert to net_device_ops

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 40 additions and 15 deletions Side-by-side Diff

... ... @@ -992,6 +992,42 @@
992 992 return rc;
993 993 }
994 994  
  995 +static 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 +
  1013 +static 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 1032 * Start up the PCI/EISA device which is described by *gendev.
997 1033 * Return 0 on success.
998 1034  
999 1035  
... ... @@ -1366,18 +1402,16 @@
1366 1402 }
1367 1403  
1368 1404 /* The 3c59x-specific entries in the device structure. */
1369   - dev->open = vortex_open;
1370 1405 if (vp->full_bus_master_tx) {
1371   - dev->hard_start_xmit = boomerang_start_xmit;
  1406 + dev->netdev_ops = &boomrang_netdev_ops;
1372 1407 /* Actually, it still should work with iommu. */
1373 1408 if (card_idx < MAX_UNITS &&
1374 1409 ((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) ||
1375 1410 hw_checksums[card_idx] == 1)) {
1376 1411 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
1377 1412 }
1378   - } else {
1379   - dev->hard_start_xmit = vortex_start_xmit;
1380   - }
  1413 + } else
  1414 + dev->netdev_ops = &vortex_netdev_ops;
1381 1415  
1382 1416 if (print_info) {
1383 1417 printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n",
1384 1418  
1385 1419  
... ... @@ -1386,18 +1420,9 @@
1386 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 1423 dev->ethtool_ops = &vortex_ethtool_ops;
1395   - dev->set_multicast_list = set_rx_mode;
1396   - dev->tx_timeout = vortex_tx_timeout;
1397 1424 dev->watchdog_timeo = (watchdog * HZ) / 1000;
1398   -#ifdef CONFIG_NET_POLL_CONTROLLER
1399   - dev->poll_controller = poll_vortex;
1400   -#endif
  1425 +
1401 1426 if (pdev) {
1402 1427 vp->pm_state_valid = 1;
1403 1428 pci_save_state(VORTEX_PCI(vp));