aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 01:12:06 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 01:42:47 -0500
commit1e058ab58f03fedbd2aa202c3a81c777d623be3a (patch)
tree715fe20509169071b571ae8b6a347de186e7848c /drivers/net
parent758e43b74c903ad368ceced31601ba5d96f31238 (diff)
atl1e: 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')
-rw-r--r--drivers/net/atl1e/atl1e_main.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index c8b7cea4b14e..a815fffc2a5b 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -2253,26 +2253,32 @@ static void atl1e_shutdown(struct pci_dev *pdev)
2253 atl1e_suspend(pdev, PMSG_SUSPEND); 2253 atl1e_suspend(pdev, PMSG_SUSPEND);
2254} 2254}
2255 2255
2256static const struct net_device_ops atl1e_netdev_ops = {
2257 .ndo_open = atl1e_open,
2258 .ndo_stop = atl1e_close,
2259 .ndo_get_stats = atl1e_get_stats,
2260 .ndo_set_multicast_list = atl1e_set_multi,
2261 .ndo_validate_addr = eth_validate_addr,
2262 .ndo_set_mac_address = atl1e_set_mac_addr,
2263 .ndo_change_mtu = atl1e_change_mtu,
2264 .ndo_do_ioctl = atl1e_ioctl,
2265 .ndo_tx_timeout = atl1e_tx_timeout,
2266 .ndo_vlan_rx_register = atl1e_vlan_rx_register,
2267#ifdef CONFIG_NET_POLL_CONTROLLER
2268 .ndo_poll_controller = atl1e_netpoll,
2269#endif
2270
2271};
2272
2256static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev) 2273static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
2257{ 2274{
2258 SET_NETDEV_DEV(netdev, &pdev->dev); 2275 SET_NETDEV_DEV(netdev, &pdev->dev);
2259 pci_set_drvdata(pdev, netdev); 2276 pci_set_drvdata(pdev, netdev);
2260 2277
2261 netdev->irq = pdev->irq; 2278 netdev->irq = pdev->irq;
2262 netdev->open = &atl1e_open; 2279 netdev->netdev_ops = &atl1e_netdev_ops;
2263 netdev->stop = &atl1e_close; 2280 netdev->hard_start_xmit = atl1e_xmit_frame,
2264 netdev->hard_start_xmit = &atl1e_xmit_frame;
2265 netdev->get_stats = &atl1e_get_stats;
2266 netdev->set_multicast_list = &atl1e_set_multi;
2267 netdev->set_mac_address = &atl1e_set_mac_addr;
2268 netdev->change_mtu = &atl1e_change_mtu;
2269 netdev->do_ioctl = &atl1e_ioctl;
2270 netdev->tx_timeout = &atl1e_tx_timeout;
2271 netdev->watchdog_timeo = AT_TX_WATCHDOG; 2281 netdev->watchdog_timeo = AT_TX_WATCHDOG;
2272 netdev->vlan_rx_register = atl1e_vlan_rx_register;
2273#ifdef CONFIG_NET_POLL_CONTROLLER
2274 netdev->poll_controller = atl1e_netpoll;
2275#endif
2276 atl1e_set_ethtool_ops(netdev); 2282 atl1e_set_ethtool_ops(netdev);
2277 2283
2278 netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM | 2284 netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM |