Commit 234a8fd4 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

team: add fix_features

do fix features in similar way as bonding code does
Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bdb6e697
...@@ -953,6 +953,27 @@ static int team_del_slave(struct net_device *dev, struct net_device *port_dev) ...@@ -953,6 +953,27 @@ static int team_del_slave(struct net_device *dev, struct net_device *port_dev)
return err; return err;
} }
static netdev_features_t team_fix_features(struct net_device *dev,
netdev_features_t features)
{
struct team_port *port;
struct team *team = netdev_priv(dev);
netdev_features_t mask;
mask = features;
features &= ~NETIF_F_ONE_FOR_ALL;
features |= NETIF_F_ALL_FOR_ALL;
rcu_read_lock();
list_for_each_entry_rcu(port, &team->port_list, list) {
features = netdev_increment_features(features,
port->dev->features,
mask);
}
rcu_read_unlock();
return features;
}
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,
...@@ -968,6 +989,7 @@ static const struct net_device_ops team_netdev_ops = { ...@@ -968,6 +989,7 @@ static const struct net_device_ops team_netdev_ops = {
.ndo_vlan_rx_kill_vid = team_vlan_rx_kill_vid, .ndo_vlan_rx_kill_vid = team_vlan_rx_kill_vid,
.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,
}; };
......
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