mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
6ab33d5171
commit
008298231a
36 changed files with 183 additions and 93 deletions
|
|
@ -163,10 +163,11 @@ static const struct ethtool_ops br_ethtool_ops = {
|
|||
static const struct net_device_ops br_netdev_ops = {
|
||||
.ndo_open = br_dev_open,
|
||||
.ndo_stop = br_dev_stop,
|
||||
.ndo_set_mac_address = br_set_mac_address,
|
||||
.ndo_set_multicast_list = br_dev_set_multicast_list,
|
||||
.ndo_change_mtu = br_change_mtu,
|
||||
.ndo_do_ioctl = br_dev_ioctl,
|
||||
.ndo_start_xmit = br_dev_xmit,
|
||||
.ndo_set_mac_address = br_set_mac_address,
|
||||
.ndo_set_multicast_list = br_dev_set_multicast_list,
|
||||
.ndo_change_mtu = br_change_mtu,
|
||||
.ndo_do_ioctl = br_dev_ioctl,
|
||||
};
|
||||
|
||||
void br_dev_setup(struct net_device *dev)
|
||||
|
|
@ -175,7 +176,6 @@ void br_dev_setup(struct net_device *dev)
|
|||
ether_setup(dev);
|
||||
|
||||
dev->netdev_ops = &br_netdev_ops;
|
||||
dev->hard_start_xmit = br_dev_xmit;
|
||||
dev->destructor = free_netdev;
|
||||
SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
|
||||
dev->tx_queue_len = 0;
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
|
|||
if (dev->flags & IFF_LOOPBACK || dev->type != ARPHRD_ETHER)
|
||||
return -EINVAL;
|
||||
|
||||
if (dev->hard_start_xmit == br_dev_xmit)
|
||||
if (dev->netdev_ops->ndo_start_xmit == br_dev_xmit)
|
||||
return -ELOOP;
|
||||
|
||||
if (dev->br_port != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue