diff options
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r-- | drivers/net/team/team.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 4a24b5d15f5a..f8c81f12d988 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -990,7 +990,7 @@ static void team_port_disable(struct team *team, | |||
990 | #define TEAM_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ | 990 | #define TEAM_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ |
991 | NETIF_F_RXCSUM | NETIF_F_ALL_TSO) | 991 | NETIF_F_RXCSUM | NETIF_F_ALL_TSO) |
992 | 992 | ||
993 | static void ___team_compute_features(struct team *team) | 993 | static void __team_compute_features(struct team *team) |
994 | { | 994 | { |
995 | struct team_port *port; | 995 | struct team_port *port; |
996 | u32 vlan_features = TEAM_VLAN_FEATURES & NETIF_F_ALL_FOR_ALL; | 996 | u32 vlan_features = TEAM_VLAN_FEATURES & NETIF_F_ALL_FOR_ALL; |
@@ -1023,16 +1023,10 @@ static void ___team_compute_features(struct team *team) | |||
1023 | team->dev->priv_flags |= IFF_XMIT_DST_RELEASE; | 1023 | team->dev->priv_flags |= IFF_XMIT_DST_RELEASE; |
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | static void __team_compute_features(struct team *team) | ||
1027 | { | ||
1028 | ___team_compute_features(team); | ||
1029 | netdev_change_features(team->dev); | ||
1030 | } | ||
1031 | |||
1032 | static void team_compute_features(struct team *team) | 1026 | static void team_compute_features(struct team *team) |
1033 | { | 1027 | { |
1034 | mutex_lock(&team->lock); | 1028 | mutex_lock(&team->lock); |
1035 | ___team_compute_features(team); | 1029 | __team_compute_features(team); |
1036 | mutex_unlock(&team->lock); | 1030 | mutex_unlock(&team->lock); |
1037 | netdev_change_features(team->dev); | 1031 | netdev_change_features(team->dev); |
1038 | } | 1032 | } |
@@ -1641,6 +1635,7 @@ static void team_uninit(struct net_device *dev) | |||
1641 | team_notify_peers_fini(team); | 1635 | team_notify_peers_fini(team); |
1642 | team_queue_override_fini(team); | 1636 | team_queue_override_fini(team); |
1643 | mutex_unlock(&team->lock); | 1637 | mutex_unlock(&team->lock); |
1638 | netdev_change_features(dev); | ||
1644 | } | 1639 | } |
1645 | 1640 | ||
1646 | static void team_destructor(struct net_device *dev) | 1641 | static void team_destructor(struct net_device *dev) |
@@ -1928,6 +1923,10 @@ static int team_add_slave(struct net_device *dev, struct net_device *port_dev) | |||
1928 | mutex_lock(&team->lock); | 1923 | mutex_lock(&team->lock); |
1929 | err = team_port_add(team, port_dev); | 1924 | err = team_port_add(team, port_dev); |
1930 | mutex_unlock(&team->lock); | 1925 | mutex_unlock(&team->lock); |
1926 | |||
1927 | if (!err) | ||
1928 | netdev_change_features(dev); | ||
1929 | |||
1931 | return err; | 1930 | return err; |
1932 | } | 1931 | } |
1933 | 1932 | ||
@@ -1939,6 +1938,10 @@ static int team_del_slave(struct net_device *dev, struct net_device *port_dev) | |||
1939 | mutex_lock(&team->lock); | 1938 | mutex_lock(&team->lock); |
1940 | err = team_port_del(team, port_dev); | 1939 | err = team_port_del(team, port_dev); |
1941 | mutex_unlock(&team->lock); | 1940 | mutex_unlock(&team->lock); |
1941 | |||
1942 | if (!err) | ||
1943 | netdev_change_features(dev); | ||
1944 | |||
1942 | return err; | 1945 | return err; |
1943 | } | 1946 | } |
1944 | 1947 | ||
@@ -2072,6 +2075,7 @@ static int team_dev_type_check_change(struct net_device *dev, | |||
2072 | static void team_setup(struct net_device *dev) | 2075 | static void team_setup(struct net_device *dev) |
2073 | { | 2076 | { |
2074 | ether_setup(dev); | 2077 | ether_setup(dev); |
2078 | dev->max_mtu = ETH_MAX_MTU; | ||
2075 | 2079 | ||
2076 | dev->netdev_ops = &team_netdev_ops; | 2080 | dev->netdev_ops = &team_netdev_ops; |
2077 | dev->ethtool_ops = &team_ethtool_ops; | 2081 | dev->ethtool_ops = &team_ethtool_ops; |