diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 01:23:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:55 -0500 |
commit | afe29f7a61b7b9b9dae9f443c34733c2b4f461ba (patch) | |
tree | e79f482bcd1faff5ea477a6f81e98193be17fb49 /drivers/net/enic | |
parent | 52256cfc9f81cd8713e00a0713e68347bbffba5a (diff) |
enic: 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/enic')
-rw-r--r-- | drivers/net/enic/enic_main.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 8594d7f8fe6..40f8c88b166 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 | ||
1593 | static 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 | |||
1593 | static int __devinit enic_probe(struct pci_dev *pdev, | 1609 | static 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: |