diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 395f3b160a75..55bf34f59bbf 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/ctype.h> | 33 | #include <linux/ctype.h> |
34 | #include <linux/inet.h> | 34 | #include <linux/inet.h> |
35 | #include <linux/rtnetlink.h> | 35 | #include <linux/rtnetlink.h> |
36 | #include <linux/etherdevice.h> | ||
36 | #include <net/net_namespace.h> | 37 | #include <net/net_namespace.h> |
37 | 38 | ||
38 | #include "bonding.h" | 39 | #include "bonding.h" |
@@ -275,10 +276,9 @@ static ssize_t bonding_store_slaves(struct device *d, | |||
275 | /* If this is the first slave, then we need to set | 276 | /* If this is the first slave, then we need to set |
276 | the master's hardware address to be the same as the | 277 | the master's hardware address to be the same as the |
277 | slave's. */ | 278 | slave's. */ |
278 | if (!(*((u32 *) & (bond->dev->dev_addr[0])))) { | 279 | if (is_zero_ether_addr(bond->dev->dev_addr)) |
279 | memcpy(bond->dev->dev_addr, dev->dev_addr, | 280 | memcpy(bond->dev->dev_addr, dev->dev_addr, |
280 | dev->addr_len); | 281 | dev->addr_len); |
281 | } | ||
282 | 282 | ||
283 | /* Set the slave's MTU to match the bond */ | 283 | /* Set the slave's MTU to match the bond */ |
284 | original_mtu = dev->mtu; | 284 | original_mtu = dev->mtu; |