aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 01:24:29 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 01:42:56 -0500
commit0edc352743156a39dfc3f21206b2bf7b9f371832 (patch)
treee8afd7f033154b149b921f50515035e933e562f0 /drivers/net/ixgb
parentafe29f7a61b7b9b9dae9f443c34733c2b4f461ba (diff)
ixgb: 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/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_main.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index cb7d1a6d343..3ca9daa70b3 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -321,6 +321,23 @@ ixgb_reset(struct ixgb_adapter *adapter)
321 } 321 }
322} 322}
323 323
324static const struct net_device_ops ixgb_netdev_ops = {
325 .ndo_open = ixgb_open,
326 .ndo_stop = ixgb_close,
327 .ndo_get_stats = ixgb_get_stats,
328 .ndo_set_multicast_list = ixgb_set_multi,
329 .ndo_validate_addr = eth_validate_addr,
330 .ndo_set_mac_address = ixgb_set_mac,
331 .ndo_change_mtu = ixgb_change_mtu,
332 .ndo_tx_timeout = ixgb_tx_timeout,
333 .ndo_vlan_rx_register = ixgb_vlan_rx_register,
334 .ndo_vlan_rx_add_vid = ixgb_vlan_rx_add_vid,
335 .ndo_vlan_rx_kill_vid = ixgb_vlan_rx_kill_vid,
336#ifdef CONFIG_NET_POLL_CONTROLLER
337 .ndo_poll_controller = ixgb_netpoll,
338#endif
339};
340
324/** 341/**
325 * ixgb_probe - Device Initialization Routine 342 * ixgb_probe - Device Initialization Routine
326 * @pdev: PCI device information struct 343 * @pdev: PCI device information struct
@@ -396,23 +413,11 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
396 } 413 }
397 } 414 }
398 415
399 netdev->open = &ixgb_open; 416 netdev->netdev_ops = &ixgb_netdev_ops;
400 netdev->stop = &ixgb_close;
401 netdev->hard_start_xmit = &ixgb_xmit_frame; 417 netdev->hard_start_xmit = &ixgb_xmit_frame;
402 netdev->get_stats = &ixgb_get_stats;
403 netdev->set_multicast_list = &ixgb_set_multi;
404 netdev->set_mac_address = &ixgb_set_mac;
405 netdev->change_mtu = &ixgb_change_mtu;
406 ixgb_set_ethtool_ops(netdev); 418 ixgb_set_ethtool_ops(netdev);
407 netdev->tx_timeout = &ixgb_tx_timeout;
408 netdev->watchdog_timeo = 5 * HZ; 419 netdev->watchdog_timeo = 5 * HZ;
409 netif_napi_add(netdev, &adapter->napi, ixgb_clean, 64); 420 netif_napi_add(netdev, &adapter->napi, ixgb_clean, 64);
410 netdev->vlan_rx_register = ixgb_vlan_rx_register;
411 netdev->vlan_rx_add_vid = ixgb_vlan_rx_add_vid;
412 netdev->vlan_rx_kill_vid = ixgb_vlan_rx_kill_vid;
413#ifdef CONFIG_NET_POLL_CONTROLLER
414 netdev->poll_controller = ixgb_netpoll;
415#endif
416 421
417 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); 422 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
418 423