aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-03-05 20:31:12 -0500
committerDavid S. Miller <davem@davemloft.net>2013-03-06 14:55:20 -0500
commitacbba0d0f88e2577b9d92b61b136d13f65831a52 (patch)
tree0ca36c3c25ea9bb8e73fd64e37972adf4bffbf60 /drivers/net/team/team.c
parent6fac41157252220678b210fcb13e2c3dad7a912a (diff)
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.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 05c5efe84591..ece70a4abbb1 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)
73 return __set_port_dev_addr(port->dev, port->orig.dev_addr); 73 return __set_port_dev_addr(port->dev, port->orig.dev_addr);
74} 74}
75 75
76int team_port_set_team_dev_addr(struct team_port *port) 76static int team_port_set_team_dev_addr(struct team *team,
77 struct team_port *port)
78{
79 return __set_port_dev_addr(port->dev, team->dev->dev_addr);
80}
81
82int team_modeop_port_enter(struct team *team, struct team_port *port)
83{
84 return team_port_set_team_dev_addr(team, port);
85}
86EXPORT_SYMBOL(team_modeop_port_enter);
87
88void team_modeop_port_change_dev_addr(struct team *team,
89 struct team_port *port)
77{ 90{
78 return __set_port_dev_addr(port->dev, port->team->dev->dev_addr); 91 team_port_set_team_dev_addr(team, port);
79} 92}
80EXPORT_SYMBOL(team_port_set_team_dev_addr); 93EXPORT_SYMBOL(team_modeop_port_change_dev_addr);
81 94
82static void team_refresh_port_linkup(struct team_port *port) 95static void team_refresh_port_linkup(struct team_port *port)
83{ 96{