Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bec3d27 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "nl80211: Define policy for packet pattern attributes"

parents da39951a 4ec90fdc
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -560,6 +560,14 @@ nl80211_nan_srf_policy[NL80211_NAN_SRF_ATTR_MAX + 1] = {
	[NL80211_NAN_SRF_MAC_ADDRS] = { .type = NLA_NESTED },
};

/* policy for packet pattern attributes */
static const struct nla_policy
nl80211_packet_pattern_policy[MAX_NL80211_PKTPAT + 1] = {
	[NL80211_PKTPAT_MASK] = { .type = NLA_BINARY, },
	[NL80211_PKTPAT_PATTERN] = { .type = NLA_BINARY, },
	[NL80211_PKTPAT_OFFSET] = { .type = NLA_U32 },
};

static int nl80211_prepare_wdev_dump(struct sk_buff *skb,
				     struct netlink_callback *cb,
				     struct cfg80211_registered_device **rdev,
@@ -10233,7 +10241,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
			u8 *mask_pat;

			nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat),
				  nla_len(pat), NULL);
				  nla_len(pat), nl80211_packet_pattern_policy);
			err = -EINVAL;
			if (!pat_tb[NL80211_PKTPAT_MASK] ||
			    !pat_tb[NL80211_PKTPAT_PATTERN])
@@ -10483,7 +10491,7 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev,
		u8 *mask_pat;

		nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat),
			  nla_len(pat), NULL);
			  nla_len(pat), nl80211_packet_pattern_policy);
		if (!pat_tb[NL80211_PKTPAT_MASK] ||
		    !pat_tb[NL80211_PKTPAT_PATTERN])
			return -EINVAL;