aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-28 08:05:13 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-29 02:01:15 -0400
commit89c76c62f191daa7ede3d1d0c510a5ccfbcae571 (patch)
tree2cabba3044f77c344acceae032aeeb6ebe44ab8a /drivers/net/bonding
parent278339a42a1bcef1fb448d275056d519307e6025 (diff)
bonding: use compare_ether_addr
Bonding can use compare_ether_addr() in bond_release. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 1aeb36c51478..ed00ba919d91 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1796,7 +1796,6 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1796 struct bonding *bond = netdev_priv(bond_dev); 1796 struct bonding *bond = netdev_priv(bond_dev);
1797 struct slave *slave, *oldcurrent; 1797 struct slave *slave, *oldcurrent;
1798 struct sockaddr addr; 1798 struct sockaddr addr;
1799 int mac_addr_differ;
1800 1799
1801 /* slave is not a slave or master is not master of this slave */ 1800 /* slave is not a slave or master is not master of this slave */
1802 if (!(slave_dev->flags & IFF_SLAVE) || 1801 if (!(slave_dev->flags & IFF_SLAVE) ||
@@ -1820,9 +1819,8 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1820 } 1819 }
1821 1820
1822 if (!bond->params.fail_over_mac) { 1821 if (!bond->params.fail_over_mac) {
1823 mac_addr_differ = memcmp(bond_dev->dev_addr, slave->perm_hwaddr, 1822 if (!compare_ether_addr(bond_dev->dev_addr, slave->perm_hwaddr)
1824 ETH_ALEN); 1823 && bond->slave_cnt > 1)
1825 if (!mac_addr_differ && (bond->slave_cnt > 1))
1826 pr_warning(DRV_NAME 1824 pr_warning(DRV_NAME
1827 ": %s: Warning: the permanent HWaddr of %s - " 1825 ": %s: Warning: the permanent HWaddr of %s - "
1828 "%pM - is still in use by %s. " 1826 "%pM - is still in use by %s. "