Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314510
b: refs/heads/master
c: 35b384b
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 19, 2012
1 parent 38c0dc5 commit fa33465
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b00cf2d1024d683cb2e206109e356dcac968568
refs/heads/master: 35b384bd14f91c74e358e02969ee7bb2542e6d78
25 changes: 5 additions & 20 deletions trunk/drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,24 +347,6 @@ void team_options_unregister(struct team *team,
}
EXPORT_SYMBOL(team_options_unregister);

static int team_option_port_add(struct team *team, struct team_port *port)
{
int err;

err = __team_option_inst_add_port(team, port);
if (err)
return err;
__team_options_change_check(team);
return 0;
}

static void team_option_port_del(struct team *team, struct team_port *port)
{
__team_option_inst_mark_removed_port(team, port);
__team_options_change_check(team);
__team_option_inst_del_port(team, port);
}

static int team_option_get(struct team *team,
struct team_option_inst *opt_inst,
struct team_gsetter_ctx *ctx)
Expand Down Expand Up @@ -891,7 +873,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
goto err_handler_register;
}

err = team_option_port_add(team, port);
err = __team_option_inst_add_port(team, port);
if (err) {
netdev_err(dev, "Device %s failed to add per-port options\n",
portname);
Expand All @@ -904,6 +886,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
team_adjust_ops(team);
__team_compute_features(team);
__team_port_change_check(port, !!netif_carrier_ok(port_dev));
__team_options_change_check(team);

netdev_info(dev, "Port device %s added\n", portname);

Expand Down Expand Up @@ -947,12 +930,14 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
return -ENOENT;
}

__team_option_inst_mark_removed_port(team, port);
__team_options_change_check(team);
__team_option_inst_del_port(team, port);
port->removed = true;
__team_port_change_check(port, false);
team_port_disable(team, port);
list_del_rcu(&port->list);
team_adjust_ops(team);
team_option_port_del(team, port);
netdev_rx_handler_unregister(port_dev);
netdev_set_master(port_dev, NULL);
vlan_vids_del_by_dev(port_dev, dev);
Expand Down

0 comments on commit fa33465

Please sign in to comment.