summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov2014-01-22 14:53:35 +0100
committerDavid S. Miller2014-01-23 00:38:44 +0100
commitd1fbd3ed9366904b58b1c0c30b22d51dc793de99 (patch)
treea49cee5fd1ba6b4d063a4c63b34a95ecabf851be /drivers/net/bonding/bond_main.c
parentbonding: convert use_carrier to use the new option API (diff)
downloadkernel-qcow2-linux-d1fbd3ed9366904b58b1c0c30b22d51dc793de99.tar.gz
kernel-qcow2-linux-d1fbd3ed9366904b58b1c0c30b22d51dc793de99.tar.xz
kernel-qcow2-linux-d1fbd3ed9366904b58b1c0c30b22d51dc793de99.zip
bonding: convert active_slave to use the new option API
This patch adds the necessary changes so active_slave would use the new bonding option API. Also some trivial/style fixes. 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 59edf18602d9..2ca949f6e995 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3123,6 +3123,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
struct ifslave k_sinfo;
struct ifslave __user *u_sinfo = NULL;
struct mii_ioctl_data *mii = NULL;
+ struct bond_opt_value newval;
struct net *net;
int res = 0;
@@ -3218,7 +3219,8 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
break;
case BOND_CHANGE_ACTIVE_OLD:
case SIOCBONDCHANGEACTIVE:
- res = bond_option_active_slave_set(bond, slave_dev);
+ bond_opt_initstr(&newval, slave_dev->name);
+ res = __bond_opt_set(bond, BOND_OPT_ACTIVE_SLAVE, &newval);
break;
default:
res = -EOPNOTSUPP;