netlink: rename nl80211_validate_nested() to nla_validate_nested()
Function nl80211_validate_nested() is not specific to nl80211, it's a counterpart to nla_validate_nested_deprecated() with strict validation. For consistency with other validation and parse functions, rename it to nla_validate_nested(). Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>
This commit is contained in:
parent
e8aa12ed17
commit
124e8de362
|
@ -1735,7 +1735,7 @@ static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nla_validate_nested - Validate a stream of nested attributes
|
* __nla_validate_nested - Validate a stream of nested attributes
|
||||||
* @start: container attribute
|
* @start: container attribute
|
||||||
* @maxtype: maximum attribute type to be expected
|
* @maxtype: maximum attribute type to be expected
|
||||||
* @policy: validation policy
|
* @policy: validation policy
|
||||||
|
@ -1758,9 +1758,9 @@ static inline int __nla_validate_nested(const struct nlattr *start, int maxtype,
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
nl80211_validate_nested(const struct nlattr *start, int maxtype,
|
nla_validate_nested(const struct nlattr *start, int maxtype,
|
||||||
const struct nla_policy *policy,
|
const struct nla_policy *policy,
|
||||||
struct netlink_ext_ack *extack)
|
struct netlink_ext_ack *extack)
|
||||||
{
|
{
|
||||||
return __nla_validate_nested(start, maxtype, policy,
|
return __nla_validate_nested(start, maxtype, policy,
|
||||||
NL_VALIDATE_STRICT, extack);
|
NL_VALIDATE_STRICT, extack);
|
||||||
|
|
|
@ -12916,8 +12916,7 @@ static int nl80211_vendor_check_policy(const struct wiphy_vendor_command *vcmd,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nl80211_validate_nested(attr, vcmd->maxattr, vcmd->policy,
|
return nla_validate_nested(attr, vcmd->maxattr, vcmd->policy, extack);
|
||||||
extack);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info)
|
static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info)
|
||||||
|
|
Loading…
Reference in New Issue