Commit 4cafe373 authored by Flavio Leitner's avatar Flavio Leitner Committed by David S. Miller
Browse files

team: implement carrier change



The user space teamd daemon may need to control the
master's carrier state depending on the selected mode.
Signed-off-by: default avatarFlavio Leitner <fbl@redhat.com>
Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 576eb625
...@@ -1707,6 +1707,15 @@ static netdev_features_t team_fix_features(struct net_device *dev, ...@@ -1707,6 +1707,15 @@ static netdev_features_t team_fix_features(struct net_device *dev,
return features; 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 = { static const struct net_device_ops team_netdev_ops = {
.ndo_init = team_init, .ndo_init = team_init,
.ndo_uninit = team_uninit, .ndo_uninit = team_uninit,
...@@ -1729,6 +1738,7 @@ static const struct net_device_ops team_netdev_ops = { ...@@ -1729,6 +1738,7 @@ static const struct net_device_ops team_netdev_ops = {
.ndo_add_slave = team_add_slave, .ndo_add_slave = team_add_slave,
.ndo_del_slave = team_del_slave, .ndo_del_slave = team_del_slave,
.ndo_fix_features = team_fix_features, .ndo_fix_features = team_fix_features,
.ndo_change_carrier = team_change_carrier,
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment