Commit afe29f7a authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

enic: convert to net_device_ops

Convert this driver to network device ops. Compile tested only.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 52256cfc
...@@ -1590,6 +1590,22 @@ static void enic_iounmap(struct enic *enic) ...@@ -1590,6 +1590,22 @@ static void enic_iounmap(struct enic *enic)
iounmap(enic->bar0.vaddr); iounmap(enic->bar0.vaddr);
} }
static const struct net_device_ops enic_netdev_ops = {
.ndo_open = enic_open,
.ndo_stop = enic_stop,
.ndo_get_stats = enic_get_stats,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_multicast_list = enic_set_multicast_list,
.ndo_change_mtu = enic_change_mtu,
.ndo_vlan_rx_register = enic_vlan_rx_register,
.ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid,
.ndo_tx_timeout = enic_tx_timeout,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = enic_poll_controller,
#endif
};
static int __devinit enic_probe(struct pci_dev *pdev, static int __devinit enic_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
...@@ -1813,21 +1829,10 @@ static int __devinit enic_probe(struct pci_dev *pdev, ...@@ -1813,21 +1829,10 @@ static int __devinit enic_probe(struct pci_dev *pdev,
goto err_out_free_vnic_resources; goto err_out_free_vnic_resources;
} }
netdev->open = enic_open; netdev->netdev_ops = &enic_netdev_ops;
netdev->stop = enic_stop;
netdev->hard_start_xmit = enic_hard_start_xmit; netdev->hard_start_xmit = enic_hard_start_xmit;
netdev->get_stats = enic_get_stats;
netdev->set_multicast_list = enic_set_multicast_list;
netdev->change_mtu = enic_change_mtu;
netdev->vlan_rx_register = enic_vlan_rx_register;
netdev->vlan_rx_add_vid = enic_vlan_rx_add_vid;
netdev->vlan_rx_kill_vid = enic_vlan_rx_kill_vid;
netdev->tx_timeout = enic_tx_timeout;
netdev->watchdog_timeo = 2 * HZ; netdev->watchdog_timeo = 2 * HZ;
netdev->ethtool_ops = &enic_ethtool_ops; netdev->ethtool_ops = &enic_ethtool_ops;
#ifdef CONFIG_NET_POLL_CONTROLLER
netdev->poll_controller = enic_poll_controller;
#endif
switch (vnic_dev_get_intr_mode(enic->vdev)) { switch (vnic_dev_get_intr_mode(enic->vdev)) {
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment