aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r--drivers/net/team/team.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index b4f67b55ef79..266af7b38ebc 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1886,7 +1886,7 @@ static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
1886 if (!msg) 1886 if (!msg)
1887 return -ENOMEM; 1887 return -ENOMEM;
1888 1888
1889 hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, 1889 hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq,
1890 &team_nl_family, 0, TEAM_CMD_NOOP); 1890 &team_nl_family, 0, TEAM_CMD_NOOP);
1891 if (IS_ERR(hdr)) { 1891 if (IS_ERR(hdr)) {
1892 err = PTR_ERR(hdr); 1892 err = PTR_ERR(hdr);
@@ -1895,7 +1895,7 @@ static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
1895 1895
1896 genlmsg_end(msg, hdr); 1896 genlmsg_end(msg, hdr);
1897 1897
1898 return genlmsg_unicast(genl_info_net(info), msg, info->snd_pid); 1898 return genlmsg_unicast(genl_info_net(info), msg, info->snd_portid);
1899 1899
1900err_msg_put: 1900err_msg_put:
1901 nlmsg_free(msg); 1901 nlmsg_free(msg);
@@ -1952,7 +1952,7 @@ static int team_nl_send_generic(struct genl_info *info, struct team *team,
1952 if (err < 0) 1952 if (err < 0)
1953 goto err_fill; 1953 goto err_fill;
1954 1954
1955 err = genlmsg_unicast(genl_info_net(info), skb, info->snd_pid); 1955 err = genlmsg_unicast(genl_info_net(info), skb, info->snd_portid);
1956 return err; 1956 return err;
1957 1957
1958err_fill: 1958err_fill:
@@ -1961,11 +1961,11 @@ err_fill:
1961} 1961}
1962 1962
1963typedef int team_nl_send_func_t(struct sk_buff *skb, 1963typedef int team_nl_send_func_t(struct sk_buff *skb,
1964 struct team *team, u32 pid); 1964 struct team *team, u32 portid);
1965 1965
1966static int team_nl_send_unicast(struct sk_buff *skb, struct team *team, u32 pid) 1966static int team_nl_send_unicast(struct sk_buff *skb, struct team *team, u32 portid)
1967{ 1967{
1968 return genlmsg_unicast(dev_net(team->dev), skb, pid); 1968 return genlmsg_unicast(dev_net(team->dev), skb, portid);
1969} 1969}
1970 1970
1971static int team_nl_fill_one_option_get(struct sk_buff *skb, struct team *team, 1971static int team_nl_fill_one_option_get(struct sk_buff *skb, struct team *team,
@@ -2050,13 +2050,13 @@ nest_cancel:
2050} 2050}
2051 2051
2052static int __send_and_alloc_skb(struct sk_buff **pskb, 2052static int __send_and_alloc_skb(struct sk_buff **pskb,
2053 struct team *team, u32 pid, 2053 struct team *team, u32 portid,
2054 team_nl_send_func_t *send_func) 2054 team_nl_send_func_t *send_func)
2055{ 2055{
2056 int err; 2056 int err;
2057 2057
2058 if (*pskb) { 2058 if (*pskb) {
2059 err = send_func(*pskb, team, pid); 2059 err = send_func(*pskb, team, portid);
2060 if (err) 2060 if (err)
2061 return err; 2061 return err;
2062 } 2062 }
@@ -2066,7 +2066,7 @@ static int __send_and_alloc_skb(struct sk_buff **pskb,
2066 return 0; 2066 return 0;
2067} 2067}
2068 2068
2069static int team_nl_send_options_get(struct team *team, u32 pid, u32 seq, 2069static int team_nl_send_options_get(struct team *team, u32 portid, u32 seq,
2070 int flags, team_nl_send_func_t *send_func, 2070 int flags, team_nl_send_func_t *send_func,
2071 struct list_head *sel_opt_inst_list) 2071 struct list_head *sel_opt_inst_list)
2072{ 2072{
@@ -2083,11 +2083,11 @@ static int team_nl_send_options_get(struct team *team, u32 pid, u32 seq,
2083 struct team_option_inst, tmp_list); 2083 struct team_option_inst, tmp_list);
2084 2084
2085start_again: 2085start_again:
2086 err = __send_and_alloc_skb(&skb, team, pid, send_func); 2086 err = __send_and_alloc_skb(&skb, team, portid, send_func);
2087 if (err) 2087 if (err)
2088 return err; 2088 return err;
2089 2089
2090 hdr = genlmsg_put(skb, pid, seq, &team_nl_family, flags | NLM_F_MULTI, 2090 hdr = genlmsg_put(skb, portid, seq, &team_nl_family, flags | NLM_F_MULTI,
2091 TEAM_CMD_OPTIONS_GET); 2091 TEAM_CMD_OPTIONS_GET);
2092 if (IS_ERR(hdr)) 2092 if (IS_ERR(hdr))
2093 return PTR_ERR(hdr); 2093 return PTR_ERR(hdr);
@@ -2120,15 +2120,15 @@ start_again:
2120 goto start_again; 2120 goto start_again;
2121 2121
2122send_done: 2122send_done:
2123 nlh = nlmsg_put(skb, pid, seq, NLMSG_DONE, 0, flags | NLM_F_MULTI); 2123 nlh = nlmsg_put(skb, portid, seq, NLMSG_DONE, 0, flags | NLM_F_MULTI);
2124 if (!nlh) { 2124 if (!nlh) {
2125 err = __send_and_alloc_skb(&skb, team, pid, send_func); 2125 err = __send_and_alloc_skb(&skb, team, portid, send_func);
2126 if (err) 2126 if (err)
2127 goto errout; 2127 goto errout;
2128 goto send_done; 2128 goto send_done;
2129 } 2129 }
2130 2130
2131 return send_func(skb, team, pid); 2131 return send_func(skb, team, portid);
2132 2132
2133nla_put_failure: 2133nla_put_failure:
2134 err = -EMSGSIZE; 2134 err = -EMSGSIZE;
@@ -2151,7 +2151,7 @@ static int team_nl_cmd_options_get(struct sk_buff *skb, struct genl_info *info)
2151 2151
2152 list_for_each_entry(opt_inst, &team->option_inst_list, list) 2152 list_for_each_entry(opt_inst, &team->option_inst_list, list)
2153 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); 2153 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list);
2154 err = team_nl_send_options_get(team, info->snd_pid, info->snd_seq, 2154 err = team_nl_send_options_get(team, info->snd_portid, info->snd_seq,
2155 NLM_F_ACK, team_nl_send_unicast, 2155 NLM_F_ACK, team_nl_send_unicast,
2156 &sel_opt_inst_list); 2156 &sel_opt_inst_list);
2157 2157
@@ -2305,7 +2305,7 @@ team_put:
2305} 2305}
2306 2306
2307static int team_nl_fill_port_list_get(struct sk_buff *skb, 2307static int team_nl_fill_port_list_get(struct sk_buff *skb,
2308 u32 pid, u32 seq, int flags, 2308 u32 portid, u32 seq, int flags,
2309 struct team *team, 2309 struct team *team,
2310 bool fillall) 2310 bool fillall)
2311{ 2311{
@@ -2313,7 +2313,7 @@ static int team_nl_fill_port_list_get(struct sk_buff *skb,
2313 void *hdr; 2313 void *hdr;
2314 struct team_port *port; 2314 struct team_port *port;
2315 2315
2316 hdr = genlmsg_put(skb, pid, seq, &team_nl_family, flags, 2316 hdr = genlmsg_put(skb, portid, seq, &team_nl_family, flags,
2317 TEAM_CMD_PORT_LIST_GET); 2317 TEAM_CMD_PORT_LIST_GET);
2318 if (IS_ERR(hdr)) 2318 if (IS_ERR(hdr))
2319 return PTR_ERR(hdr); 2319 return PTR_ERR(hdr);
@@ -2362,7 +2362,7 @@ static int team_nl_fill_port_list_get_all(struct sk_buff *skb,
2362 struct genl_info *info, int flags, 2362 struct genl_info *info, int flags,
2363 struct team *team) 2363 struct team *team)
2364{ 2364{
2365 return team_nl_fill_port_list_get(skb, info->snd_pid, 2365 return team_nl_fill_port_list_get(skb, info->snd_portid,
2366 info->snd_seq, NLM_F_ACK, 2366 info->snd_seq, NLM_F_ACK,
2367 team, true); 2367 team, true);
2368} 2368}
@@ -2415,7 +2415,7 @@ static struct genl_multicast_group team_change_event_mcgrp = {
2415}; 2415};
2416 2416
2417static int team_nl_send_multicast(struct sk_buff *skb, 2417static int team_nl_send_multicast(struct sk_buff *skb,
2418 struct team *team, u32 pid) 2418 struct team *team, u32 portid)
2419{ 2419{
2420 return genlmsg_multicast_netns(dev_net(team->dev), skb, 0, 2420 return genlmsg_multicast_netns(dev_net(team->dev), skb, 0,
2421 team_change_event_mcgrp.id, GFP_KERNEL); 2421 team_change_event_mcgrp.id, GFP_KERNEL);