Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- net/wireless/nl80211.c | 38 ++++++++++++++++++++++++++++++++++++++
- 1 file changed, 38 insertions(+)
+ net/wireless/nl80211.c | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -213,6 +213,38 @@ cfg80211_get_dev_from_info(struct net *n
+@@ -213,6 +213,36 @@ cfg80211_get_dev_from_info(struct net *n
return __cfg80211_rdev_from_attrs(netns, info->attrs);
}
-+static int validate_beacon_head(const struct nlattr *attr,
-+ struct netlink_ext_ack *extack)
++static int validate_beacon_head(const struct nlattr *attr)
+{
+ const u8 *data = nla_data(attr);
+ unsigned int len = nla_len(attr);
+ return 0;
+
+err:
-+ NL_SET_ERR_MSG_ATTR(extack, attr, "malformed beacon head");
+ return -EINVAL;
+}
+
/* policy for the attributes */
static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
-@@ -3680,6 +3712,12 @@ static int nl80211_parse_beacon(struct n
+@@ -3680,6 +3710,11 @@ static int nl80211_parse_beacon(struct n
memset(bcn, 0, sizeof(*bcn));
if (attrs[NL80211_ATTR_BEACON_HEAD]) {
-+ int ret = validate_beacon_head(attrs[NL80211_ATTR_BEACON_HEAD],
-+ NULL);
++ int ret = validate_beacon_head(attrs[NL80211_ATTR_BEACON_HEAD]);
+
+ if (ret)
+ return ret;