aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 5f954b01e21a..1026ef402d47 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -950,6 +950,24 @@ static int igb_is_need_ioport(struct pci_dev *pdev)
950 } 950 }
951} 951}
952 952
953static const struct net_device_ops igb_netdev_ops = {
954 .ndo_open = igb_open,
955 .ndo_stop = igb_close,
956 .ndo_get_stats = igb_get_stats,
957 .ndo_set_multicast_list = igb_set_multi,
958 .ndo_set_mac_address = igb_set_mac,
959 .ndo_change_mtu = igb_change_mtu,
960 .ndo_do_ioctl = igb_ioctl,
961 .ndo_tx_timeout = igb_tx_timeout,
962 .ndo_validate_addr = eth_validate_addr,
963 .ndo_vlan_rx_register = igb_vlan_rx_register,
964 .ndo_vlan_rx_add_vid = igb_vlan_rx_add_vid,
965 .ndo_vlan_rx_kill_vid = igb_vlan_rx_kill_vid,
966#ifdef CONFIG_NET_POLL_CONTROLLER
967 .ndo_poll_controller = igb_netpoll,
968#endif
969};
970
953/** 971/**
954 * igb_probe - Device Initialization Routine 972 * igb_probe - Device Initialization Routine
955 * @pdev: PCI device information struct 973 * @pdev: PCI device information struct
@@ -1059,22 +1077,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1059 if (!adapter->hw.hw_addr) 1077 if (!adapter->hw.hw_addr)
1060 goto err_ioremap; 1078 goto err_ioremap;
1061 1079
1062 netdev->open = &igb_open; 1080 netdev->netdev_ops = &igb_netdev_ops;
1063 netdev->stop = &igb_close;
1064 netdev->get_stats = &igb_get_stats;
1065 netdev->set_multicast_list = &igb_set_multi;
1066 netdev->set_mac_address = &igb_set_mac;
1067 netdev->change_mtu = &igb_change_mtu;
1068 netdev->do_ioctl = &igb_ioctl;
1069 igb_set_ethtool_ops(netdev); 1081 igb_set_ethtool_ops(netdev);
1070 netdev->tx_timeout = &igb_tx_timeout;
1071 netdev->watchdog_timeo = 5 * HZ; 1082 netdev->watchdog_timeo = 5 * HZ;
1072 netdev->vlan_rx_register = igb_vlan_rx_register;
1073 netdev->vlan_rx_add_vid = igb_vlan_rx_add_vid;
1074 netdev->vlan_rx_kill_vid = igb_vlan_rx_kill_vid;
1075#ifdef CONFIG_NET_POLL_CONTROLLER
1076 netdev->poll_controller = igb_netpoll;
1077#endif
1078 netdev->hard_start_xmit = &igb_xmit_frame_adv; 1083 netdev->hard_start_xmit = &igb_xmit_frame_adv;
1079 1084
1080 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); 1085 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);