Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352071
b: refs/heads/master
c: 675b804
h: refs/heads/master
i:
  352069: 8816f15
  352067: 7f261c5
  352063: b5052ed
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Feb 4, 2013
1 parent 22d04e8 commit 6dc0219
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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: c3969d80a396bffd7f80ff57987b15793be67926
refs/heads/master: 675b8044e17cc6528363e8b0322be0243621cd9b
13 changes: 12 additions & 1 deletion trunk/drivers/net/team/team_mode_activebackup.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

struct ab_priv {
struct team_port __rcu *active_port;
struct team_option_inst_info *ap_opt_inst_info;
};

static struct ab_priv *ab_priv(struct team *team)
Expand Down Expand Up @@ -54,8 +55,17 @@ static bool ab_transmit(struct team *team, struct sk_buff *skb)

static void ab_port_leave(struct team *team, struct team_port *port)
{
if (ab_priv(team)->active_port == port)
if (ab_priv(team)->active_port == port) {
RCU_INIT_POINTER(ab_priv(team)->active_port, NULL);
team_option_inst_set_change(ab_priv(team)->ap_opt_inst_info);
}
}

static int ab_active_port_init(struct team *team,
struct team_option_inst_info *info)
{
ab_priv(team)->ap_opt_inst_info = info;
return 0;
}

static int ab_active_port_get(struct team *team, struct team_gsetter_ctx *ctx)
Expand Down Expand Up @@ -88,6 +98,7 @@ static const struct team_option ab_options[] = {
{
.name = "activeport",
.type = TEAM_OPTION_TYPE_U32,
.init = ab_active_port_init,
.getter = ab_active_port_get,
.setter = ab_active_port_set,
},
Expand Down

0 comments on commit 6dc0219

Please sign in to comment.