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>
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index da49ac4..e313a8f 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -620,3 +620,16 @@
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;
+}