summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_options.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@redhat.com>2014-01-22 14:53:28 +0100
committerDavid S. Miller <davem@davemloft.net>2014-01-22 15:38:43 -0800
commit633ddc9e9bafd168861dee1000b2c6ff725e85c5 (patch)
tree39cbf28f3a4ead04ce544e94c9e24ab7668aafdb /drivers/net/bonding/bond_options.c
parentd3131de76b1b1a4d95f145846bd61f96e72f0411 (diff)
bonding: convert min_links to use the new option API
This patch adds the necessary changes so min_links 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_options.c')
-rw-r--r--drivers/net/bonding/bond_options.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 680296c279dc..f8821696f823 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -164,6 +164,13 @@ static struct bond_option bond_opts[] = {
.values = bond_lacp_rate_tbl,
.set = bond_option_lacp_rate_set
},
+ [BOND_OPT_MINLINKS] = {
+ .id = BOND_OPT_MINLINKS,
+ .name = "min_links",
+ .desc = "Minimum number of available links before turning on carrier",
+ .values = bond_intmax_tbl,
+ .set = bond_option_min_links_set
+ },
{ }
};
@@ -990,11 +997,12 @@ int bond_option_all_slaves_active_set(struct bonding *bond,
return 0;
}
-int bond_option_min_links_set(struct bonding *bond, int min_links)
+int bond_option_min_links_set(struct bonding *bond,
+ struct bond_opt_value *newval)
{
- pr_info("%s: Setting min links value to %u\n",
- bond->dev->name, min_links);
- bond->params.min_links = min_links;
+ pr_info("%s: Setting min links value to %llu\n",
+ bond->dev->name, newval->value);
+ bond->params.min_links = newval->value;
return 0;
}