Skip to content

Commit

Permalink
team: fix master carrier set when user linkup is enabled
Browse files Browse the repository at this point in the history
When user linkup is enabled and user sets linkup of individual port,
we need to recompute linkup (carrier) of master interface so the change
is reflected. Fix this by calling __team_carrier_check() which does the
needed work.

Please apply to all stable kernels as well. Thanks.

Reported-by: Jan Tluka <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jpirko authored and davem330 committed Nov 29, 2013
1 parent d3f7d56 commit f5e0d34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -1366,13 +1366,16 @@ static int team_user_linkup_option_get(struct team *team,
return 0;
}

static void __team_carrier_check(struct team *team);

static int team_user_linkup_option_set(struct team *team,
struct team_gsetter_ctx *ctx)
{
struct team_port *port = ctx->info->port;

port->user.linkup = ctx->data.bool_val;
team_refresh_port_linkup(port);
__team_carrier_check(port->team);
return 0;
}

Expand All @@ -1392,6 +1395,7 @@ static int team_user_linkup_en_option_set(struct team *team,

port->user.linkup_enabled = ctx->data.bool_val;
team_refresh_port_linkup(port);
__team_carrier_check(port->team);
return 0;
}

Expand Down

0 comments on commit f5e0d34

Please sign in to comment.