diff options
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 77da2e849623..a047eb973e3b 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -2342,8 +2342,17 @@ void bond_3ad_handle_link_change(struct slave *slave, char link) | |||
2342 | */ | 2342 | */ |
2343 | int bond_3ad_set_carrier(struct bonding *bond) | 2343 | int bond_3ad_set_carrier(struct bonding *bond) |
2344 | { | 2344 | { |
2345 | if (__get_active_agg(&(SLAVE_AD_INFO(bond->first_slave).aggregator))) { | 2345 | struct aggregator *active; |
2346 | if (!netif_carrier_ok(bond->dev)) { | 2346 | |
2347 | active = __get_active_agg(&(SLAVE_AD_INFO(bond->first_slave).aggregator)); | ||
2348 | if (active) { | ||
2349 | /* are enough slaves available to consider link up? */ | ||
2350 | if (active->num_of_ports < bond->params.min_links) { | ||
2351 | if (netif_carrier_ok(bond->dev)) { | ||
2352 | netif_carrier_off(bond->dev); | ||
2353 | return 1; | ||
2354 | } | ||
2355 | } else if (!netif_carrier_ok(bond->dev)) { | ||
2347 | netif_carrier_on(bond->dev); | 2356 | netif_carrier_on(bond->dev); |
2348 | return 1; | 2357 | return 1; |
2349 | } | 2358 | } |