mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
net: make dev->master general
dev->master is now tightly connected to bonding driver. This patch makes this pointer more general and ready to be used by others. - netdev_set_master() - bond specifics moved to new function netdev_set_bond_master() - introduced netif_is_bond_slave() to check if device is a bonding slave Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d59cfde2fb
commit
1765a57533
6 changed files with 54 additions and 20 deletions
|
|
@ -153,7 +153,8 @@ static int nes_inetaddr_event(struct notifier_block *notifier,
|
|||
nesdev, nesdev->netdev[0]->name);
|
||||
netdev = nesdev->netdev[0];
|
||||
nesvnic = netdev_priv(netdev);
|
||||
is_bonded = (netdev->master == event_netdev);
|
||||
is_bonded = netif_is_bond_slave(netdev) &&
|
||||
(netdev->master == event_netdev);
|
||||
if ((netdev == event_netdev) || is_bonded) {
|
||||
if (nesvnic->rdma_enabled == 0) {
|
||||
nes_debug(NES_DBG_NETDEV, "Returning without processing event for %s since"
|
||||
|
|
|
|||
|
|
@ -1118,7 +1118,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (nesvnic->netdev->master)
|
||||
if (netif_is_bond_slave(netdev))
|
||||
netdev = nesvnic->netdev->master;
|
||||
else
|
||||
netdev = nesvnic->netdev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue