diff options
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 9de2c5284e27..11b76b352415 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -456,17 +456,11 @@ static ssize_t bonding_show_xmit_hash(struct device *d, | |||
456 | struct device_attribute *attr, | 456 | struct device_attribute *attr, |
457 | char *buf) | 457 | char *buf) |
458 | { | 458 | { |
459 | int count = 0; | ||
460 | struct bonding *bond = to_bond(d); | 459 | struct bonding *bond = to_bond(d); |
461 | 460 | ||
462 | if ((bond->params.mode == BOND_MODE_XOR) || | 461 | return sprintf(buf, "%s %d\n", |
463 | (bond->params.mode == BOND_MODE_8023AD)) { | 462 | xmit_hashtype_tbl[bond->params.xmit_policy].modename, |
464 | count = sprintf(buf, "%s %d\n", | 463 | bond->params.xmit_policy); |
465 | xmit_hashtype_tbl[bond->params.xmit_policy].modename, | ||
466 | bond->params.xmit_policy); | ||
467 | } | ||
468 | |||
469 | return count; | ||
470 | } | 464 | } |
471 | 465 | ||
472 | static ssize_t bonding_store_xmit_hash(struct device *d, | 466 | static ssize_t bonding_store_xmit_hash(struct device *d, |
@@ -484,15 +478,6 @@ static ssize_t bonding_store_xmit_hash(struct device *d, | |||
484 | goto out; | 478 | goto out; |
485 | } | 479 | } |
486 | 480 | ||
487 | if ((bond->params.mode != BOND_MODE_XOR) && | ||
488 | (bond->params.mode != BOND_MODE_8023AD)) { | ||
489 | printk(KERN_ERR DRV_NAME | ||
490 | "%s: Transmit hash policy is irrelevant in this mode.\n", | ||
491 | bond->dev->name); | ||
492 | ret = -EPERM; | ||
493 | goto out; | ||
494 | } | ||
495 | |||
496 | new_value = bond_parse_parm((char *)buf, xmit_hashtype_tbl); | 481 | new_value = bond_parse_parm((char *)buf, xmit_hashtype_tbl); |
497 | if (new_value < 0) { | 482 | if (new_value < 0) { |
498 | printk(KERN_ERR DRV_NAME | 483 | printk(KERN_ERR DRV_NAME |