aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c16
-rw-r--r--drivers/net/bonding/bonding.h2
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6287ffbda7f7..cb9cb3013f42 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -187,7 +187,7 @@ static void bond_send_gratuitous_arp(struct bonding *bond);
187 187
188/*---------------------------- General routines -----------------------------*/ 188/*---------------------------- General routines -----------------------------*/
189 189
190const char *bond_mode_name(int mode) 190static const char *bond_mode_name(int mode)
191{ 191{
192 switch (mode) { 192 switch (mode) {
193 case BOND_MODE_ROUNDROBIN : 193 case BOND_MODE_ROUNDROBIN :
@@ -1224,7 +1224,8 @@ static void bond_detach_slave(struct bonding *bond, struct slave *slave)
1224 1224
1225/*---------------------------------- IOCTL ----------------------------------*/ 1225/*---------------------------------- IOCTL ----------------------------------*/
1226 1226
1227int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev) 1227static int bond_sethwaddr(struct net_device *bond_dev,
1228 struct net_device *slave_dev)
1228{ 1229{
1229 dprintk("bond_dev=%p\n", bond_dev); 1230 dprintk("bond_dev=%p\n", bond_dev);
1230 dprintk("slave_dev=%p\n", slave_dev); 1231 dprintk("slave_dev=%p\n", slave_dev);
@@ -1390,6 +1391,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1390 goto err_free; 1391 goto err_free;
1391 } 1392 }
1392 1393
1394 res = netdev_set_master(slave_dev, bond_dev);
1395 if (res) {
1396 dprintk("Error %d calling netdev_set_master\n", res);
1397 goto err_close;
1398 }
1393 /* open the slave since the application closed it */ 1399 /* open the slave since the application closed it */
1394 res = dev_open(slave_dev); 1400 res = dev_open(slave_dev);
1395 if (res) { 1401 if (res) {
@@ -1397,12 +1403,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1397 goto err_restore_mac; 1403 goto err_restore_mac;
1398 } 1404 }
1399 1405
1400 res = netdev_set_master(slave_dev, bond_dev);
1401 if (res) {
1402 dprintk("Error %d calling netdev_set_master\n", res);
1403 goto err_close;
1404 }
1405
1406 new_slave->dev = slave_dev; 1406 new_slave->dev = slave_dev;
1407 slave_dev->priv_flags |= IFF_BONDING; 1407 slave_dev->priv_flags |= IFF_BONDING;
1408 1408
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index a89102116ccb..6dcbd25e3ef0 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -301,13 +301,11 @@ int bond_create_slave_symlinks(struct net_device *master, struct net_device *sla
301void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave); 301void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave);
302int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); 302int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
303int bond_release(struct net_device *bond_dev, struct net_device *slave_dev); 303int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
304int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev);
305void bond_mii_monitor(struct net_device *bond_dev); 304void bond_mii_monitor(struct net_device *bond_dev);
306void bond_loadbalance_arp_mon(struct net_device *bond_dev); 305void bond_loadbalance_arp_mon(struct net_device *bond_dev);
307void bond_activebackup_arp_mon(struct net_device *bond_dev); 306void bond_activebackup_arp_mon(struct net_device *bond_dev);
308void bond_set_mode_ops(struct bonding *bond, int mode); 307void bond_set_mode_ops(struct bonding *bond, int mode);
309int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl); 308int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl);
310const char *bond_mode_name(int mode);
311void bond_select_active_slave(struct bonding *bond); 309void bond_select_active_slave(struct bonding *bond);
312void bond_change_active_slave(struct bonding *bond, struct slave *new_active); 310void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
313void bond_register_arp(struct bonding *); 311void bond_register_arp(struct bonding *);