diff options
author | Jiri Pirko | 2012-07-27 06:28:53 +0000 |
---|---|---|
committer | David S. Miller | 2012-08-03 20:40:11 -0700 |
commit | 69821638b27407d8648cb04de01b06b30a291bde (patch) | |
tree | 114b3613dd57146fe4da2b55947649c29c8b14da /drivers | |
parent | 4778e0be16c291ba6d9d55eeff3a6764fc84a071 (diff) |
team: add signed 32-bit team option type
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/team/team.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 87707ab39430..70752e631a12 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1787,6 +1787,12 @@ static int team_nl_fill_one_option_get(struct sk_buff *skb, struct team *team, nla_put_flag(skb, TEAM_ATTR_OPTION_DATA)) goto nest_cancel; break; + case TEAM_OPTION_TYPE_S32: + if (nla_put_u8(skb, TEAM_ATTR_OPTION_TYPE, NLA_S32)) + goto nest_cancel; + if (nla_put_s32(skb, TEAM_ATTR_OPTION_DATA, ctx.data.s32_val)) + goto nest_cancel; + break; default: BUG(); } @@ -1975,6 +1981,9 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info) case NLA_FLAG: opt_type = TEAM_OPTION_TYPE_BOOL; break; + case NLA_S32: + opt_type = TEAM_OPTION_TYPE_S32; + break; default: goto team_put; } @@ -2031,6 +2040,9 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info) case TEAM_OPTION_TYPE_BOOL: ctx.data.bool_val = attr_data ? true : false; break; + case TEAM_OPTION_TYPE_S32: + ctx.data.s32_val = nla_get_s32(attr_data); + break; default: BUG(); } |