aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 23:14:53 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 23:14:53 -0500
commit008298231abbeb91bc7be9e8b078607b816d1a4a (patch)
tree8cb0c17720086ef97c614b96241f06aa63ce8511 /drivers/net/forcedeth.c
parent6ab33d51713d6d60c7677c0d020910a8cb37e513 (diff)
netdev: add more functions to netdevice ops
This patch moves neigh_setup and hard_start_xmit into the network device ops structure. For bisection, fix all the previously converted drivers as well. Bonding driver took the biggest hit on this. Added a prefetch of the hard_start_xmit in the fast path to try and reduce any impact this would have. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index dd2e1f670b0d..0d7e5750245a 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5412,6 +5412,23 @@ static const struct net_device_ops nv_netdev_ops = {
5412 .ndo_open = nv_open, 5412 .ndo_open = nv_open,
5413 .ndo_stop = nv_close, 5413 .ndo_stop = nv_close,
5414 .ndo_get_stats = nv_get_stats, 5414 .ndo_get_stats = nv_get_stats,
5415 .ndo_start_xmit = nv_start_xmit,
5416 .ndo_tx_timeout = nv_tx_timeout,
5417 .ndo_change_mtu = nv_change_mtu,
5418 .ndo_validate_addr = eth_validate_addr,
5419 .ndo_set_mac_address = nv_set_mac_address,
5420 .ndo_set_multicast_list = nv_set_multicast,
5421 .ndo_vlan_rx_register = nv_vlan_rx_register,
5422#ifdef CONFIG_NET_POLL_CONTROLLER
5423 .ndo_poll_controller = nv_poll_controller,
5424#endif
5425};
5426
5427static const struct net_device_ops nv_netdev_ops_optimized = {
5428 .ndo_open = nv_open,
5429 .ndo_stop = nv_close,
5430 .ndo_get_stats = nv_get_stats,
5431 .ndo_start_xmit = nv_start_xmit_optimized,
5415 .ndo_tx_timeout = nv_tx_timeout, 5432 .ndo_tx_timeout = nv_tx_timeout,
5416 .ndo_change_mtu = nv_change_mtu, 5433 .ndo_change_mtu = nv_change_mtu,
5417 .ndo_validate_addr = eth_validate_addr, 5434 .ndo_validate_addr = eth_validate_addr,
@@ -5592,11 +5609,10 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5592 goto out_freering; 5609 goto out_freering;
5593 5610
5594 if (!nv_optimized(np)) 5611 if (!nv_optimized(np))
5595 dev->hard_start_xmit = nv_start_xmit; 5612 dev->netdev_ops = &nv_netdev_ops;
5596 else 5613 else
5597 dev->hard_start_xmit = nv_start_xmit_optimized; 5614 dev->netdev_ops = &nv_netdev_ops_optimized;
5598 5615
5599 dev->netdev_ops = &nv_netdev_ops;
5600#ifdef CONFIG_FORCEDETH_NAPI 5616#ifdef CONFIG_FORCEDETH_NAPI
5601 netif_napi_add(dev, &np->napi, nv_napi_poll, RX_WORK_PER_LOOP); 5617 netif_napi_add(dev, &np->napi, nv_napi_poll, RX_WORK_PER_LOOP);
5602#endif 5618#endif