]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/team/team.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux.git] / drivers / net / team / team.c
index 9ce61b019aadb55df9177301e0752295d61ba096..699a8870e92817f04b7865e56e804287ea4dcb24 100644 (file)
  * Helpers
  **********/
 
-#define team_port_exists(dev) (dev->priv_flags & IFF_TEAM_PORT)
-
 static struct team_port *team_port_get_rtnl(const struct net_device *dev)
 {
        struct team_port *port = rtnl_dereference(dev->rx_handler_data);
 
-       return team_port_exists(dev) ? port : NULL;
+       return netif_is_team_port(dev) ? port : NULL;
 }
 
 /*
@@ -1143,7 +1141,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev,
                return -EINVAL;
        }
 
-       if (team_port_exists(port_dev)) {
+       if (netif_is_team_port(port_dev)) {
                NL_SET_ERR_MSG(extack, "Device is already a port of a team device");
                netdev_err(dev, "Device %s is already a port "
                                "of a team device\n", portname);
@@ -1717,8 +1715,7 @@ static netdev_tx_t team_xmit(struct sk_buff *skb, struct net_device *dev)
 }
 
 static u16 team_select_queue(struct net_device *dev, struct sk_buff *skb,
-                            struct net_device *sb_dev,
-                            select_queue_fallback_t fallback)
+                            struct net_device *sb_dev)
 {
        /*
         * This helper function exists to help dev_pick_tx get the correct
@@ -2752,24 +2749,20 @@ static const struct genl_ops team_nl_ops[] = {
        {
                .cmd = TEAM_CMD_NOOP,
                .doit = team_nl_cmd_noop,
-               .policy = team_nl_policy,
        },
        {
                .cmd = TEAM_CMD_OPTIONS_SET,
                .doit = team_nl_cmd_options_set,
-               .policy = team_nl_policy,
                .flags = GENL_ADMIN_PERM,
        },
        {
                .cmd = TEAM_CMD_OPTIONS_GET,
                .doit = team_nl_cmd_options_get,
-               .policy = team_nl_policy,
                .flags = GENL_ADMIN_PERM,
        },
        {
                .cmd = TEAM_CMD_PORT_LIST_GET,
                .doit = team_nl_cmd_port_list_get,
-               .policy = team_nl_policy,
                .flags = GENL_ADMIN_PERM,
        },
 };
@@ -2782,6 +2775,7 @@ static struct genl_family team_nl_family __ro_after_init = {
        .name           = TEAM_GENL_NAME,
        .version        = TEAM_GENL_VERSION,
        .maxattr        = TEAM_ATTR_MAX,
+       .policy = team_nl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
        .ops            = team_nl_ops,