diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 01:24:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:56 -0500 |
commit | 0edc352743156a39dfc3f21206b2bf7b9f371832 (patch) | |
tree | e8afd7f033154b149b921f50515035e933e562f0 /drivers/net/ixgbe/ixgbe_main.c | |
parent | afe29f7a61b7b9b9dae9f443c34733c2b4f461ba (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/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index d1f80dd88bc9..6fb873889e74 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3727,6 +3727,23 @@ static int ixgbe_link_config(struct ixgbe_hw *hw) | |||
3727 | return hw->mac.ops.setup_link_speed(hw, autoneg, true, true); | 3727 | return hw->mac.ops.setup_link_speed(hw, autoneg, true, true); |
3728 | } | 3728 | } |
3729 | 3729 | ||
3730 | static const struct net_device_ops ixgbe_netdev_ops = { | ||
3731 | .ndo_open = ixgbe_open, | ||
3732 | .ndo_stop = ixgbe_close, | ||
3733 | .ndo_get_stats = ixgbe_get_stats, | ||
3734 | .ndo_set_multicast_list = ixgbe_set_rx_mode, | ||
3735 | .ndo_validate_addr = eth_validate_addr, | ||
3736 | .ndo_set_mac_address = ixgbe_set_mac, | ||
3737 | .ndo_change_mtu = ixgbe_change_mtu, | ||
3738 | .ndo_tx_timeout = ixgbe_tx_timeout, | ||
3739 | .ndo_vlan_rx_register = ixgbe_vlan_rx_register, | ||
3740 | .ndo_vlan_rx_add_vid = ixgbe_vlan_rx_add_vid, | ||
3741 | .ndo_vlan_rx_kill_vid = ixgbe_vlan_rx_kill_vid, | ||
3742 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
3743 | .ndo_poll_controller = ixgbe_netpoll, | ||
3744 | #endif | ||
3745 | }; | ||
3746 | |||
3730 | /** | 3747 | /** |
3731 | * ixgbe_probe - Device Initialization Routine | 3748 | * ixgbe_probe - Device Initialization Routine |
3732 | * @pdev: PCI device information struct | 3749 | * @pdev: PCI device information struct |
@@ -3808,23 +3825,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
3808 | continue; | 3825 | continue; |
3809 | } | 3826 | } |
3810 | 3827 | ||
3811 | netdev->open = &ixgbe_open; | 3828 | netdev->netdev_ops = &ixgbe_netdev_ops; |
3812 | netdev->stop = &ixgbe_close; | ||
3813 | netdev->hard_start_xmit = &ixgbe_xmit_frame; | 3829 | netdev->hard_start_xmit = &ixgbe_xmit_frame; |
3814 | netdev->get_stats = &ixgbe_get_stats; | ||
3815 | netdev->set_rx_mode = &ixgbe_set_rx_mode; | ||
3816 | netdev->set_multicast_list = &ixgbe_set_rx_mode; | ||
3817 | netdev->set_mac_address = &ixgbe_set_mac; | ||
3818 | netdev->change_mtu = &ixgbe_change_mtu; | ||
3819 | ixgbe_set_ethtool_ops(netdev); | 3830 | ixgbe_set_ethtool_ops(netdev); |
3820 | netdev->tx_timeout = &ixgbe_tx_timeout; | ||
3821 | netdev->watchdog_timeo = 5 * HZ; | 3831 | netdev->watchdog_timeo = 5 * HZ; |
3822 | netdev->vlan_rx_register = ixgbe_vlan_rx_register; | ||
3823 | netdev->vlan_rx_add_vid = ixgbe_vlan_rx_add_vid; | ||
3824 | netdev->vlan_rx_kill_vid = ixgbe_vlan_rx_kill_vid; | ||
3825 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
3826 | netdev->poll_controller = ixgbe_netpoll; | ||
3827 | #endif | ||
3828 | strcpy(netdev->name, pci_name(pdev)); | 3832 | strcpy(netdev->name, pci_name(pdev)); |
3829 | 3833 | ||
3830 | adapter->bd_number = cards_found; | 3834 | adapter->bd_number = cards_found; |