diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-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 bfe1ed8389ca..dce3cf92c613 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3545,11 +3545,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave | |||
3545 | } | 3545 | } |
3546 | break; | 3546 | break; |
3547 | case NETDEV_CHANGE: | 3547 | case NETDEV_CHANGE: |
3548 | /* | 3548 | if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) { |
3549 | * TODO: is this what we get if somebody | 3549 | struct slave *slave; |
3550 | * sets up a hierarchical bond, then rmmod's | 3550 | |
3551 | * one of the slave bonding devices? | 3551 | slave = bond_get_slave_by_dev(bond, slave_dev); |
3552 | */ | 3552 | if (slave) { |
3553 | u16 old_speed = slave->speed; | ||
3554 | u16 old_duplex = slave->duplex; | ||
3555 | |||
3556 | bond_update_speed_duplex(slave); | ||
3557 | |||
3558 | if (bond_is_lb(bond)) | ||
3559 | break; | ||
3560 | |||
3561 | if (old_speed != slave->speed) | ||
3562 | bond_3ad_adapter_speed_changed(slave); | ||
3563 | if (old_duplex != slave->duplex) | ||
3564 | bond_3ad_adapter_duplex_changed(slave); | ||
3565 | } | ||
3566 | } | ||
3567 | |||
3553 | break; | 3568 | break; |
3554 | case NETDEV_DOWN: | 3569 | case NETDEV_DOWN: |
3555 | /* | 3570 | /* |