aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index fd521b05db8..0fb5f653d3c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1513,29 +1513,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1513 1513
1514 switch (bond->params.mode) { 1514 switch (bond->params.mode) {
1515 case BOND_MODE_ACTIVEBACKUP: 1515 case BOND_MODE_ACTIVEBACKUP:
1516 /* if we're in active-backup mode, we need one and 1516 bond_set_slave_inactive_flags(new_slave);
1517 * only one active interface. The backup interfaces 1517 bond_select_active_slave(bond);
1518 * will have their SLAVE_INACTIVE flag set because we
1519 * need them to be drop all packets. Thus, since we
1520 * guarantee that curr_active_slave always point to
1521 * the last usable interface, we just have to verify
1522 * this interface's flag.
1523 */
1524 if (((!bond->curr_active_slave) ||
1525 (bond->curr_active_slave->dev->priv_flags & IFF_SLAVE_INACTIVE)) &&
1526 (new_slave->link != BOND_LINK_DOWN)) {
1527 /* first slave or no active slave yet, and this link
1528 is OK, so make this interface the active one */
1529 bond_change_active_slave(bond, new_slave);
1530 printk(KERN_INFO DRV_NAME
1531 ": %s: first active interface up!\n",
1532 bond->dev->name);
1533 netif_carrier_on(bond->dev);
1534
1535 } else {
1536 dprintk("This is just a backup slave\n");
1537 bond_set_slave_inactive_flags(new_slave);
1538 }
1539 break; 1518 break;
1540 case BOND_MODE_8023AD: 1519 case BOND_MODE_8023AD:
1541 /* in 802.3ad mode, the internal mechanism 1520 /* in 802.3ad mode, the internal mechanism