Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121918
b: refs/heads/master
c: 0edc352
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 20, 2008
1 parent 9da997c commit 4ee0521
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afe29f7a61b7b9b9dae9f443c34733c2b4f461ba
refs/heads/master: 0edc352743156a39dfc3f21206b2bf7b9f371832
31 changes: 18 additions & 13 deletions trunk/drivers/net/ixgb/ixgb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,23 @@ ixgb_reset(struct ixgb_adapter *adapter)
}
}

static const struct net_device_ops ixgb_netdev_ops = {
.ndo_open = ixgb_open,
.ndo_stop = ixgb_close,
.ndo_get_stats = ixgb_get_stats,
.ndo_set_multicast_list = ixgb_set_multi,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = ixgb_set_mac,
.ndo_change_mtu = ixgb_change_mtu,
.ndo_tx_timeout = ixgb_tx_timeout,
.ndo_vlan_rx_register = ixgb_vlan_rx_register,
.ndo_vlan_rx_add_vid = ixgb_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = ixgb_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ixgb_netpoll,
#endif
};

/**
* ixgb_probe - Device Initialization Routine
* @pdev: PCI device information struct
Expand Down Expand Up @@ -396,23 +413,11 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
}

netdev->open = &ixgb_open;
netdev->stop = &ixgb_close;
netdev->netdev_ops = &ixgb_netdev_ops;
netdev->hard_start_xmit = &ixgb_xmit_frame;
netdev->get_stats = &ixgb_get_stats;
netdev->set_multicast_list = &ixgb_set_multi;
netdev->set_mac_address = &ixgb_set_mac;
netdev->change_mtu = &ixgb_change_mtu;
ixgb_set_ethtool_ops(netdev);
netdev->tx_timeout = &ixgb_tx_timeout;
netdev->watchdog_timeo = 5 * HZ;
netif_napi_add(netdev, &adapter->napi, ixgb_clean, 64);
netdev->vlan_rx_register = ixgb_vlan_rx_register;
netdev->vlan_rx_add_vid = ixgb_vlan_rx_add_vid;
netdev->vlan_rx_kill_vid = ixgb_vlan_rx_kill_vid;
#ifdef CONFIG_NET_POLL_CONTROLLER
netdev->poll_controller = ixgb_netpoll;
#endif

strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);

Expand Down
32 changes: 18 additions & 14 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3727,6 +3727,23 @@ static int ixgbe_link_config(struct ixgbe_hw *hw)
return hw->mac.ops.setup_link_speed(hw, autoneg, true, true);
}

static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_open = ixgbe_open,
.ndo_stop = ixgbe_close,
.ndo_get_stats = ixgbe_get_stats,
.ndo_set_multicast_list = ixgbe_set_rx_mode,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = ixgbe_set_mac,
.ndo_change_mtu = ixgbe_change_mtu,
.ndo_tx_timeout = ixgbe_tx_timeout,
.ndo_vlan_rx_register = ixgbe_vlan_rx_register,
.ndo_vlan_rx_add_vid = ixgbe_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = ixgbe_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ixgbe_netpoll,
#endif
};

/**
* ixgbe_probe - Device Initialization Routine
* @pdev: PCI device information struct
Expand Down Expand Up @@ -3808,23 +3825,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
continue;
}

netdev->open = &ixgbe_open;
netdev->stop = &ixgbe_close;
netdev->netdev_ops = &ixgbe_netdev_ops;
netdev->hard_start_xmit = &ixgbe_xmit_frame;
netdev->get_stats = &ixgbe_get_stats;
netdev->set_rx_mode = &ixgbe_set_rx_mode;
netdev->set_multicast_list = &ixgbe_set_rx_mode;
netdev->set_mac_address = &ixgbe_set_mac;
netdev->change_mtu = &ixgbe_change_mtu;
ixgbe_set_ethtool_ops(netdev);
netdev->tx_timeout = &ixgbe_tx_timeout;
netdev->watchdog_timeo = 5 * HZ;
netdev->vlan_rx_register = ixgbe_vlan_rx_register;
netdev->vlan_rx_add_vid = ixgbe_vlan_rx_add_vid;
netdev->vlan_rx_kill_vid = ixgbe_vlan_rx_kill_vid;
#ifdef CONFIG_NET_POLL_CONTROLLER
netdev->poll_controller = ixgbe_netpoll;
#endif
strcpy(netdev->name, pci_name(pdev));

adapter->bd_number = cards_found;
Expand Down

0 comments on commit 4ee0521

Please sign in to comment.