aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@redhat.com>2012-12-29 10:31:01 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-30 05:31:58 -0500
commit4cafe373d40dd9893a301fa83dc99abb80a2bd0b (patch)
treeafb1e82d88c73343bba3c02b8334a0cf4b7fda66 /drivers/net/team
parent576eb62598f10c8c7fd75703fe89010cdcfff596 (diff)
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: Flavio Leitner <fbl@redhat.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index ad86660fb8f9..27a6edeb376f 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1707,6 +1707,15 @@ static netdev_features_t team_fix_features(struct net_device *dev,
1707 return features; 1707 return features;
1708} 1708}
1709 1709
1710static int team_change_carrier(struct net_device *dev, bool new_carrier)
1711{
1712 if (new_carrier)
1713 netif_carrier_on(dev);
1714 else
1715 netif_carrier_off(dev);
1716 return 0;
1717}
1718
1710static const struct net_device_ops team_netdev_ops = { 1719static const struct net_device_ops team_netdev_ops = {
1711 .ndo_init = team_init, 1720 .ndo_init = team_init,
1712 .ndo_uninit = team_uninit, 1721 .ndo_uninit = team_uninit,
@@ -1729,6 +1738,7 @@ static const struct net_device_ops team_netdev_ops = {
1729 .ndo_add_slave = team_add_slave, 1738 .ndo_add_slave = team_add_slave,
1730 .ndo_del_slave = team_del_slave, 1739 .ndo_del_slave = team_del_slave,
1731 .ndo_fix_features = team_fix_features, 1740 .ndo_fix_features = team_fix_features,
1741 .ndo_change_carrier = team_change_carrier,
1732}; 1742};
1733 1743
1734 1744