diff options
author | Nikolay Aleksandrov | 2014-01-22 14:53:18 +0100 |
---|---|---|
committer | David S. Miller | 2014-01-23 00:38:41 +0100 |
commit | aa59d8517d1017e571b803ba6302c4b693b324ab (patch) | |
tree | 7746e9fb5e2d8204fa2777534cf14dfbf265a2a7 /drivers/net/bonding/bond_main.c | |
parent | bonding: convert mode setting to use the new option API (diff) | |
download | kernel-qcow2-linux-aa59d8517d1017e571b803ba6302c4b693b324ab.tar.gz kernel-qcow2-linux-aa59d8517d1017e571b803ba6302c4b693b324ab.tar.xz kernel-qcow2-linux-aa59d8517d1017e571b803ba6302c4b693b324ab.zip |
bonding: convert packets_per_slave to use the new option API
This patch adds the necessary changes so packets_per_slave would use the
new bonding option API.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 7a04f0f8449e..a50577bc8bc1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4145,7 +4145,8 @@ static int bond_check_params(struct bond_params *params) resend_igmp = BOND_DEFAULT_RESEND_IGMP; } - if (packets_per_slave < 0 || packets_per_slave > USHRT_MAX) { + bond_opt_initval(&newval, packets_per_slave); + if (!bond_opt_parse(bond_opt_get(BOND_OPT_PACKETS_PER_SLAVE), &newval)) { pr_warn("Warning: packets_per_slave (%d) should be between 0 and %u resetting to 1\n", packets_per_slave, USHRT_MAX); packets_per_slave = 1; |