Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

3c59x: convert to net_device_ops

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

authored by

Stephen Hemminger and committed by
David S. Miller
48b47a5e 4394e653

+40 -15
+40 -15
drivers/net/3c59x.c
··· 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. ··· 1402 1366 } 1403 1367 1404 1368 /* The 3c59x-specific entries in the device structure. */ 1405 - dev->open = vortex_open; 1406 1369 if (vp->full_bus_master_tx) { 1407 - dev->hard_start_xmit = boomerang_start_xmit; 1370 + dev->netdev_ops = &boomrang_netdev_ops; 1408 1371 /* Actually, it still should work with iommu. */ 1409 1372 if (card_idx < MAX_UNITS && 1410 1373 ((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) || 1411 1374 hw_checksums[card_idx] == 1)) { 1412 1375 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; 1413 1376 } 1414 - } else { 1415 - dev->hard_start_xmit = vortex_start_xmit; 1416 - } 1377 + } else 1378 + dev->netdev_ops = &vortex_netdev_ops; 1417 1379 1418 1380 if (print_info) { 1419 1381 printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", ··· 1420 1386 (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); 1421 1387 } 1422 1388 1423 - dev->stop = vortex_close; 1424 - dev->get_stats = vortex_get_stats; 1425 - #ifdef CONFIG_PCI 1426 - dev->do_ioctl = vortex_ioctl; 1427 - #endif 1428 1389 dev->ethtool_ops = &vortex_ethtool_ops; 1429 - dev->set_multicast_list = set_rx_mode; 1430 - dev->tx_timeout = vortex_tx_timeout; 1431 1390 dev->watchdog_timeo = (watchdog * HZ) / 1000; 1432 - #ifdef CONFIG_NET_POLL_CONTROLLER 1433 - dev->poll_controller = poll_vortex; 1434 - #endif 1391 + 1435 1392 if (pdev) { 1436 1393 vp->pm_state_valid = 1; 1437 1394 pci_save_state(VORTEX_PCI(vp));