aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_sysfs.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index d7434e0a610e..3d269a52789c 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -383,20 +383,12 @@ static ssize_t bonding_store_xmit_hash(struct device *d,
383 int new_value, ret = count; 383 int new_value, ret = count;
384 struct bonding *bond = to_bond(d); 384 struct bonding *bond = to_bond(d);
385 385
386 if (bond->dev->flags & IFF_UP) {
387 pr_err("%s: Interface is up. Unable to update xmit policy.\n",
388 bond->dev->name);
389 ret = -EPERM;
390 goto out;
391 }
392
393 new_value = bond_parse_parm(buf, xmit_hashtype_tbl); 386 new_value = bond_parse_parm(buf, xmit_hashtype_tbl);
394 if (new_value < 0) { 387 if (new_value < 0) {
395 pr_err("%s: Ignoring invalid xmit hash policy value %.*s.\n", 388 pr_err("%s: Ignoring invalid xmit hash policy value %.*s.\n",
396 bond->dev->name, 389 bond->dev->name,
397 (int)strlen(buf) - 1, buf); 390 (int)strlen(buf) - 1, buf);
398 ret = -EINVAL; 391 ret = -EINVAL;
399 goto out;
400 } else { 392 } else {
401 bond->params.xmit_policy = new_value; 393 bond->params.xmit_policy = new_value;
402 bond_set_mode_ops(bond, bond->params.mode); 394 bond_set_mode_ops(bond, bond->params.mode);
@@ -404,7 +396,7 @@ static ssize_t bonding_store_xmit_hash(struct device *d,
404 bond->dev->name, 396 bond->dev->name,
405 xmit_hashtype_tbl[new_value].modename, new_value); 397 xmit_hashtype_tbl[new_value].modename, new_value);
406 } 398 }
407out: 399
408 return ret; 400 return ret;
409} 401}
410static DEVICE_ATTR(xmit_hash_policy, S_IRUGO | S_IWUSR, 402static DEVICE_ATTR(xmit_hash_policy, S_IRUGO | S_IWUSR,