projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25f929f
)
bonding: remove the redundant judgements for bond_set_mac_address()
author
dingtianhong
<
[email protected]
>
Wed, 12 Feb 2014 06:58:49 +0000
(14:58 +0800)
committer
David S. Miller
<
[email protected]
>
Thu, 13 Feb 2014 22:49:12 +0000
(17:49 -0500)
The dev_set_mac_address() will check the dev->netdev_ops->ndo_set_mac_address,
so no need to check it in bond_set_mac_address().
Cc: Jay Vosburgh <
[email protected]
>
Cc: Veaceslav Falico <
[email protected]
>
Cc: Andy Gospodarek <
[email protected]
>
Signed-off-by: Ding Tianhong <
[email protected]
>
Reviewed-by: Jiri Pirko <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/bonding/bond_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/bonding/bond_main.c
b/drivers/net/bonding/bond_main.c
index 71ba18efa15b545f029655003388ab1da8c19017..58aa531d7850c99a20f23b740202418e2b426bc9 100644
(file)
--- a/
drivers/net/bonding/bond_main.c
+++ b/
drivers/net/bonding/bond_main.c
@@
-3461,15
+3461,7
@@
static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
*/
bond_for_each_slave(bond, slave, iter) {
- const struct net_device_ops *slave_ops = slave->dev->netdev_ops;
pr_debug("slave %p %s\n", slave, slave->dev->name);
-
- if (slave_ops->ndo_set_mac_address == NULL) {
- res = -EOPNOTSUPP;
- pr_debug("EOPNOTSUPP %s\n", slave->dev->name);
- goto unwind;
- }
-
res = dev_set_mac_address(slave->dev, addr);
if (res) {
/* TODO: consider downing the slave