aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic_main.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 8594d7f8fe66..40f8c88b166d 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1590,6 +1590,22 @@ static void enic_iounmap(struct enic *enic)
1590 iounmap(enic->bar0.vaddr); 1590 iounmap(enic->bar0.vaddr);
1591} 1591}
1592 1592
1593static const struct net_device_ops enic_netdev_ops = {
1594 .ndo_open = enic_open,
1595 .ndo_stop = enic_stop,
1596 .ndo_get_stats = enic_get_stats,
1597 .ndo_validate_addr = eth_validate_addr,
1598 .ndo_set_multicast_list = enic_set_multicast_list,
1599 .ndo_change_mtu = enic_change_mtu,
1600 .ndo_vlan_rx_register = enic_vlan_rx_register,
1601 .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid,
1602 .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid,
1603 .ndo_tx_timeout = enic_tx_timeout,
1604#ifdef CONFIG_NET_POLL_CONTROLLER
1605 .ndo_poll_controller = enic_poll_controller,
1606#endif
1607};
1608
1593static int __devinit enic_probe(struct pci_dev *pdev, 1609static int __devinit enic_probe(struct pci_dev *pdev,
1594 const struct pci_device_id *ent) 1610 const struct pci_device_id *ent)
1595{ 1611{
@@ -1813,21 +1829,10 @@ static int __devinit enic_probe(struct pci_dev *pdev,
1813 goto err_out_free_vnic_resources; 1829 goto err_out_free_vnic_resources;
1814 } 1830 }
1815 1831
1816 netdev->open = enic_open; 1832 netdev->netdev_ops = &enic_netdev_ops;
1817 netdev->stop = enic_stop;
1818 netdev->hard_start_xmit = enic_hard_start_xmit; 1833 netdev->hard_start_xmit = enic_hard_start_xmit;
1819 netdev->get_stats = enic_get_stats;
1820 netdev->set_multicast_list = enic_set_multicast_list;
1821 netdev->change_mtu = enic_change_mtu;
1822 netdev->vlan_rx_register = enic_vlan_rx_register;
1823 netdev->vlan_rx_add_vid = enic_vlan_rx_add_vid;
1824 netdev->vlan_rx_kill_vid = enic_vlan_rx_kill_vid;
1825 netdev->tx_timeout = enic_tx_timeout;
1826 netdev->watchdog_timeo = 2 * HZ; 1834 netdev->watchdog_timeo = 2 * HZ;
1827 netdev->ethtool_ops = &enic_ethtool_ops; 1835 netdev->ethtool_ops = &enic_ethtool_ops;
1828#ifdef CONFIG_NET_POLL_CONTROLLER
1829 netdev->poll_controller = enic_poll_controller;
1830#endif
1831 1836
1832 switch (vnic_dev_get_intr_mode(enic->vdev)) { 1837 switch (vnic_dev_get_intr_mode(enic->vdev)) {
1833 default: 1838 default: