diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e0578fe8c0db..3d76686dceca 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3537,11 +3537,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave | |||
3537 | } | 3537 | } |
3538 | break; | 3538 | break; |
3539 | case NETDEV_CHANGE: | 3539 | case NETDEV_CHANGE: |
3540 | /* | 3540 | if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) { |
3541 | * TODO: is this what we get if somebody | 3541 | struct slave *slave; |
3542 | * sets up a hierarchical bond, then rmmod's | 3542 | |
3543 | * one of the slave bonding devices? | 3543 | slave = bond_get_slave_by_dev(bond, slave_dev); |
3544 | */ | 3544 | if (slave) { |
3545 | u16 old_speed = slave->speed; | ||
3546 | u16 old_duplex = slave->duplex; | ||
3547 | |||
3548 | bond_update_speed_duplex(slave); | ||
3549 | |||
3550 | if (bond_is_lb(bond)) | ||
3551 | break; | ||
3552 | |||
3553 | if (old_speed != slave->speed) | ||
3554 | bond_3ad_adapter_speed_changed(slave); | ||
3555 | if (old_duplex != slave->duplex) | ||
3556 | bond_3ad_adapter_duplex_changed(slave); | ||
3557 | } | ||
3558 | } | ||
3559 | |||
3545 | break; | 3560 | break; |
3546 | case NETDEV_DOWN: | 3561 | case NETDEV_DOWN: |
3547 | /* | 3562 | /* |