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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a7e731f8a0da..6419cf9a4fa6 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1211,7 +1211,7 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
1211 write_unlock_bh(&bond->curr_slave_lock); 1211 write_unlock_bh(&bond->curr_slave_lock);
1212 read_unlock(&bond->lock); 1212 read_unlock(&bond->lock);
1213 1213
1214 netdev_bonding_change(bond->dev); 1214 netdev_bonding_change(bond->dev, NETDEV_BONDING_FAILOVER);
1215 1215
1216 read_lock(&bond->lock); 1216 read_lock(&bond->lock);
1217 write_lock_bh(&bond->curr_slave_lock); 1217 write_lock_bh(&bond->curr_slave_lock);
@@ -1469,14 +1469,17 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1469 */ 1469 */
1470 if (bond->slave_cnt == 0) { 1470 if (bond->slave_cnt == 0) {
1471 if (bond_dev->type != slave_dev->type) { 1471 if (bond_dev->type != slave_dev->type) {
1472 dev_close(bond_dev);
1473 pr_debug("%s: change device type from %d to %d\n", 1472 pr_debug("%s: change device type from %d to %d\n",
1474 bond_dev->name, bond_dev->type, slave_dev->type); 1473 bond_dev->name, bond_dev->type, slave_dev->type);
1474
1475 netdev_bonding_change(bond_dev, NETDEV_BONDING_OLDTYPE);
1476
1475 if (slave_dev->type != ARPHRD_ETHER) 1477 if (slave_dev->type != ARPHRD_ETHER)
1476 bond_setup_by_slave(bond_dev, slave_dev); 1478 bond_setup_by_slave(bond_dev, slave_dev);
1477 else 1479 else
1478 ether_setup(bond_dev); 1480 ether_setup(bond_dev);
1479 dev_open(bond_dev); 1481
1482 netdev_bonding_change(bond_dev, NETDEV_BONDING_NEWTYPE);
1480 } 1483 }
1481 } else if (bond_dev->type != slave_dev->type) { 1484 } else if (bond_dev->type != slave_dev->type) {
1482 pr_err(DRV_NAME ": %s ether type (%d) is different " 1485 pr_err(DRV_NAME ": %s ether type (%d) is different "