aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c7
-rw-r--r--drivers/net/bonding/bond_sysfs.c8
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2c3f9db91b50..4e7473e557ff 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1522,6 +1522,13 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1522 } 1522 }
1523 } 1523 }
1524 1524
1525 /* If this is the first slave, then we need to set the master's hardware
1526 * address to be the same as the slave's. */
1527 if (bond->slave_cnt == 0)
1528 memcpy(bond->dev->dev_addr, slave_dev->dev_addr,
1529 slave_dev->addr_len);
1530
1531
1525 new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL); 1532 new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL);
1526 if (!new_slave) { 1533 if (!new_slave) {
1527 res = -ENOMEM; 1534 res = -ENOMEM;
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index a4cbaf78ad1c..496ac1ec614d 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -250,14 +250,6 @@ static ssize_t bonding_store_slaves(struct device *d,
250 switch (command[0]) { 250 switch (command[0]) {
251 case '+': 251 case '+':
252 pr_info("%s: Adding slave %s.\n", bond->dev->name, dev->name); 252 pr_info("%s: Adding slave %s.\n", bond->dev->name, dev->name);
253
254 /* If this is the first slave, then we need to set
255 the master's hardware address to be the same as the
256 slave's. */
257 if (is_zero_ether_addr(bond->dev->dev_addr))
258 memcpy(bond->dev->dev_addr, dev->dev_addr,
259 dev->addr_len);
260
261 res = bond_enslave(bond->dev, dev); 253 res = bond_enslave(bond->dev, dev);
262 break; 254 break;
263 255