Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  * Rx path frame handler
  ************************/
 
-static bool team_port_enabled(struct team_port *port);
-
 /* note: already called with rcu_read_lock */
 static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
 {
        return false;
 }
 
-static bool team_port_enabled(struct team_port *port)
+bool team_port_enabled(struct team_port *port)
 {
        return port->index != -1;
 }
+EXPORT_SYMBOL(team_port_enabled);
 
 /*
  * Enable/disable port by adding to enabled port hashlist and setting
 
        unsigned char hash = ctx->info->array_index;
 
        list_for_each_entry(port, &team->port_list, list) {
-               if (ctx->data.u32_val == port->dev->ifindex) {
+               if (ctx->data.u32_val == port->dev->ifindex &&
+                   team_port_enabled(port)) {
                        rcu_assign_pointer(LB_HTPM_PORT_BY_HASH(lb_priv, hash),
                                           port);
                        return 0;
 
        long mode_priv[0];
 };
 
+extern bool team_port_enabled(struct team_port *port);
+
 struct team_mode_ops {
        int (*init)(struct team *team);
        void (*exit)(struct team *team);