aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 01:14:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 01:42:48 -0500
commit825a84d1d3d612c2b8db77dd4719882690d01bae (patch)
tree88f90161c7101610b44dc4d40e0ab29455245203 /drivers/net/atlx
parent1e058ab58f03fedbd2aa202c3a81c777d623be3a (diff)
atlx: convert to net_device_ops
Convert this driver to network device ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atlx')
-rw-r--r--drivers/net/atlx/atl1.c28
-rw-r--r--drivers/net/atlx/atl2.c33
2 files changed, 33 insertions, 28 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 611a86ebe16..7a0fb04e348 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2880,6 +2880,21 @@ static void atl1_poll_controller(struct net_device *netdev)
2880} 2880}
2881#endif 2881#endif
2882 2882
2883static const struct net_device_ops atl1_netdev_ops = {
2884 .ndo_open = atl1_open,
2885 .ndo_stop = atl1_close,
2886 .ndo_set_multicast_list = atlx_set_multi,
2887 .ndo_validate_addr = eth_validate_addr,
2888 .ndo_set_mac_address = atl1_set_mac,
2889 .ndo_change_mtu = atl1_change_mtu,
2890 .ndo_do_ioctl = atlx_ioctl,
2891 .ndo_tx_timeout = atlx_tx_timeout,
2892 .ndo_vlan_rx_register = atlx_vlan_rx_register,
2893#ifdef CONFIG_NET_POLL_CONTROLLER
2894 .ndo_poll_controller = atl1_poll_controller,
2895#endif
2896};
2897
2883/* 2898/*
2884 * atl1_probe - Device Initialization Routine 2899 * atl1_probe - Device Initialization Routine
2885 * @pdev: PCI device information struct 2900 * @pdev: PCI device information struct
@@ -2967,20 +2982,9 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2967 adapter->mii.phy_id_mask = 0x1f; 2982 adapter->mii.phy_id_mask = 0x1f;
2968 adapter->mii.reg_num_mask = 0x1f; 2983 adapter->mii.reg_num_mask = 0x1f;
2969 2984
2970 netdev->open = &atl1_open; 2985 netdev->netdev_ops = &atl1_netdev_ops;
2971 netdev->stop = &atl1_close;
2972 netdev->hard_start_xmit = &atl1_xmit_frame; 2986 netdev->hard_start_xmit = &atl1_xmit_frame;
2973
2974 netdev->set_multicast_list = &atlx_set_multi;
2975 netdev->set_mac_address = &atl1_set_mac;
2976 netdev->change_mtu = &atl1_change_mtu;
2977 netdev->do_ioctl = &atlx_ioctl;
2978 netdev->tx_timeout = &atlx_tx_timeout;
2979 netdev->watchdog_timeo = 5 * HZ; 2987 netdev->watchdog_timeo = 5 * HZ;
2980#ifdef CONFIG_NET_POLL_CONTROLLER
2981 netdev->poll_controller = atl1_poll_controller;
2982#endif
2983 netdev->vlan_rx_register = atlx_vlan_rx_register;
2984 2988
2985 netdev->ethtool_ops = &atl1_ethtool_ops; 2989 netdev->ethtool_ops = &atl1_ethtool_ops;
2986 adapter->bd_number = cards_found; 2990 adapter->bd_number = cards_found;
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 60c9e5375ee..688c21e81a8 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -1311,6 +1311,22 @@ static void atl2_poll_controller(struct net_device *netdev)
1311} 1311}
1312#endif 1312#endif
1313 1313
1314
1315static const struct net_device_ops atl2_netdev_ops = {
1316 .ndo_open = atl2_open,
1317 .ndo_stop = atl2_close,
1318 .ndo_set_multicast_list = atl2_set_multi,
1319 .ndo_validate_addr = eth_validate_addr,
1320 .ndo_set_mac_address = atl2_set_mac,
1321 .ndo_change_mtu = atl2_change_mtu,
1322 .ndo_do_ioctl = atl2_ioctl,
1323 .ndo_tx_timeout = atl2_tx_timeout,
1324 .ndo_vlan_rx_register = atl2_vlan_rx_register,
1325#ifdef CONFIG_NET_POLL_CONTROLLER
1326 .ndo_poll_controller = atl2_poll_controller,
1327#endif
1328};
1329
1314/* 1330/*
1315 * atl2_probe - Device Initialization Routine 1331 * atl2_probe - Device Initialization Routine
1316 * @pdev: PCI device information struct 1332 * @pdev: PCI device information struct
@@ -1384,25 +1400,10 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
1384 1400
1385 atl2_setup_pcicmd(pdev); 1401 atl2_setup_pcicmd(pdev);
1386 1402
1387 netdev->open = &atl2_open;
1388 netdev->stop = &atl2_close;
1389 netdev->hard_start_xmit = &atl2_xmit_frame; 1403 netdev->hard_start_xmit = &atl2_xmit_frame;
1390 netdev->set_multicast_list = &atl2_set_multi; 1404 netdev->netdev_ops = &atl2_netdev_ops;
1391 netdev->set_mac_address = &atl2_set_mac;
1392 netdev->change_mtu = &atl2_change_mtu;
1393 netdev->do_ioctl = &atl2_ioctl;
1394 atl2_set_ethtool_ops(netdev); 1405 atl2_set_ethtool_ops(netdev);
1395
1396#ifdef CONFIG_NET_POLL_CONTROLLER
1397 netdev->poll_controller = atl2_poll_controller;
1398#endif
1399#ifdef HAVE_TX_TIMEOUT
1400 netdev->tx_timeout = &atl2_tx_timeout;
1401 netdev->watchdog_timeo = 5 * HZ; 1406 netdev->watchdog_timeo = 5 * HZ;
1402#endif
1403#ifdef NETIF_F_HW_VLAN_TX
1404 netdev->vlan_rx_register = atl2_vlan_rx_register;
1405#endif
1406 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); 1407 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
1407 1408
1408 netdev->mem_start = mmio_start; 1409 netdev->mem_start = mmio_start;