aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
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 /net/bridge
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 'net/bridge')
-rw-r--r--net/bridge/br_device.c10
-rw-r--r--net/bridge/br_if.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 920ce3348398..18538d7460d7 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -163,10 +163,11 @@ static const struct ethtool_ops br_ethtool_ops = {
163static const struct net_device_ops br_netdev_ops = { 163static const struct net_device_ops br_netdev_ops = {
164 .ndo_open = br_dev_open, 164 .ndo_open = br_dev_open,
165 .ndo_stop = br_dev_stop, 165 .ndo_stop = br_dev_stop,
166 .ndo_set_mac_address = br_set_mac_address, 166 .ndo_start_xmit = br_dev_xmit,
167 .ndo_set_multicast_list = br_dev_set_multicast_list, 167 .ndo_set_mac_address = br_set_mac_address,
168 .ndo_change_mtu = br_change_mtu, 168 .ndo_set_multicast_list = br_dev_set_multicast_list,
169 .ndo_do_ioctl = br_dev_ioctl, 169 .ndo_change_mtu = br_change_mtu,
170 .ndo_do_ioctl = br_dev_ioctl,
170}; 171};
171 172
172void br_dev_setup(struct net_device *dev) 173void br_dev_setup(struct net_device *dev)
@@ -175,7 +176,6 @@ void br_dev_setup(struct net_device *dev)
175 ether_setup(dev); 176 ether_setup(dev);
176 177
177 dev->netdev_ops = &br_netdev_ops; 178 dev->netdev_ops = &br_netdev_ops;
178 dev->hard_start_xmit = br_dev_xmit;
179 dev->destructor = free_netdev; 179 dev->destructor = free_netdev;
180 SET_ETHTOOL_OPS(dev, &br_ethtool_ops); 180 SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
181 dev->tx_queue_len = 0; 181 dev->tx_queue_len = 0;
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index ee3a8dd13f55..727c5c510a60 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -373,7 +373,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
373 if (dev->flags & IFF_LOOPBACK || dev->type != ARPHRD_ETHER) 373 if (dev->flags & IFF_LOOPBACK || dev->type != ARPHRD_ETHER)
374 return -EINVAL; 374 return -EINVAL;
375 375
376 if (dev->hard_start_xmit == br_dev_xmit) 376 if (dev->netdev_ops->ndo_start_xmit == br_dev_xmit)
377 return -ELOOP; 377 return -ELOOP;
378 378
379 if (dev->br_port != NULL) 379 if (dev->br_port != NULL)