Skip to content

Commit

Permalink
team: implement carrier change
Browse files Browse the repository at this point in the history
The user space teamd daemon may need to control the
master's carrier state depending on the selected mode.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Flavio Leitner authored and David S. Miller committed Dec 30, 2012
1 parent 576eb62 commit 4cafe37
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,15 @@ static netdev_features_t team_fix_features(struct net_device *dev,
return features;
}

static int team_change_carrier(struct net_device *dev, bool new_carrier)
{
if (new_carrier)
netif_carrier_on(dev);
else
netif_carrier_off(dev);
return 0;
}

static const struct net_device_ops team_netdev_ops = {
.ndo_init = team_init,
.ndo_uninit = team_uninit,
Expand All @@ -1729,6 +1738,7 @@ static const struct net_device_ops team_netdev_ops = {
.ndo_add_slave = team_add_slave,
.ndo_del_slave = team_del_slave,
.ndo_fix_features = team_fix_features,
.ndo_change_carrier = team_change_carrier,
};


Expand Down

0 comments on commit 4cafe37

Please sign in to comment.