summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_options.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_options.c')
-rw-r--r--drivers/net/bonding/bond_options.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 2914d649ee34..6fc7bbf0b85f 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -245,3 +245,17 @@ int bond_option_downdelay_set(struct bonding *bond, int downdelay)
return 0;
}
+
+int bond_option_use_carrier_set(struct bonding *bond, int use_carrier)
+{
+ if ((use_carrier == 0) || (use_carrier == 1)) {
+ bond->params.use_carrier = use_carrier;
+ pr_info("%s: Setting use_carrier to %d.\n",
+ bond->dev->name, use_carrier);
+ } else {
+ pr_info("%s: Ignoring invalid use_carrier value %d.\n",
+ bond->dev->name, use_carrier);
+ }
+
+ return 0;
+}