diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-03-06 01:31:12 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-06 19:55:20 (GMT) |
commit | acbba0d0f88e2577b9d92b61b136d13f65831a52 (patch) | |
tree | 0ca36c3c25ea9bb8e73fd64e37972adf4bffbf60 /drivers/net/team/team.c | |
parent | 6fac41157252220678b210fcb13e2c3dad7a912a (diff) | |
download | linux-acbba0d0f88e2577b9d92b61b136d13f65831a52.tar.xz |
team: introduce two default team_modeop functions and use them in modes
No need to duplicate code for this.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r-- | drivers/net/team/team.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 05c5efe..ece70a4 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -73,11 +73,24 @@ static int team_port_set_orig_dev_addr(struct team_port *port) return __set_port_dev_addr(port->dev, port->orig.dev_addr); } -int team_port_set_team_dev_addr(struct team_port *port) +static int team_port_set_team_dev_addr(struct team *team, + struct team_port *port) +{ + return __set_port_dev_addr(port->dev, team->dev->dev_addr); +} + +int team_modeop_port_enter(struct team *team, struct team_port *port) +{ + return team_port_set_team_dev_addr(team, port); +} +EXPORT_SYMBOL(team_modeop_port_enter); + +void team_modeop_port_change_dev_addr(struct team *team, + struct team_port *port) { - return __set_port_dev_addr(port->dev, port->team->dev->dev_addr); + team_port_set_team_dev_addr(team, port); } -EXPORT_SYMBOL(team_port_set_team_dev_addr); +EXPORT_SYMBOL(team_modeop_port_change_dev_addr); static void team_refresh_port_linkup(struct team_port *port) { |