diff options
author | sfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com> | 2013-12-17 21:30:30 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-19 18:32:09 -0500 |
commit | 8d836d092ed7b77d13ac1108399165ee7de7463f (patch) | |
tree | 9e770f00a9bd16ad7b092977928890e6ed7586c2 /drivers/net/bonding/bond_options.c | |
parent | 7d1010082785b2020b1e2e1211b76209976a33df (diff) |
bonding: add lp_interval attribute netlink support
Add IFLA_BOND_LP_INTERVAL to allow get/set of bonding parameter
lp_interval via netlink.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
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.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index da49ac4a8d8e..e313a8f8fae0 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -620,3 +620,16 @@ int bond_option_min_links_set(struct bonding *bond, int min_links) return 0; } + +int bond_option_lp_interval_set(struct bonding *bond, int lp_interval) +{ + if (lp_interval <= 0) { + pr_err("%s: lp_interval must be between 1 and %d\n", + bond->dev->name, INT_MAX); + return -EINVAL; + } + + bond->params.lp_interval = lp_interval; + + return 0; +} |