Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145136
b: refs/heads/master
c: 4cd6fe1
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed May 18, 2009
1 parent 79cc3d3 commit bf9a963
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ffc7a8649426f666818b63915b0f43fdf1757242
refs/heads/master: 4cd6fe1c6483cde93e2ec91f58b7af9c9eea51ad
11 changes: 8 additions & 3 deletions trunk/drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,12 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best,
return best;
}

static int agg_device_up(const struct aggregator *agg)
{
return (netif_running(agg->slave->dev) &&
netif_carrier_ok(agg->slave->dev));
}

/**
* ad_agg_selection_logic - select an aggregation group for a team
* @aggregator: the aggregator we're looking at
Expand Down Expand Up @@ -1496,14 +1502,13 @@ static void ad_agg_selection_logic(struct aggregator *agg)
struct port *port;

origin = agg;

active = __get_active_agg(agg);
best = active;
best = (active && agg_device_up(active)) ? active : NULL;

do {
agg->is_active = 0;

if (agg->num_of_ports)
if (agg->num_of_ports && agg_device_up(agg))
best = ad_agg_selection_test(best, agg);

} while ((agg = __get_next_agg(agg)));
Expand Down

0 comments on commit bf9a963

Please sign in to comment.