@@ -1,6 +1,8 @@
+diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
+index 578bff9c378b..18145767193a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -412,10 +412,12 @@ static const struct nla_policy
+@@ -412,10 +412,15 @@ static const struct nla_policy
nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = {
[NL80211_FILS_DISCOVERY_ATTR_INT_MIN] = NLA_POLICY_MAX(NLA_U32, 10000),
[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000),
@@ -9,11 +11,14 @@
NLA_POLICY_RANGE(NLA_BINARY,
NL80211_FILS_DISCOVERY_TMPL_MIN_LEN,
IEEE80211_MAX_DATA_LEN),
++#else
++ [NL80211_FILS_DISCOVERY_ATTR_TMPL] = { .type = NLA_BINARY,
++ .len = IEEE80211_MAX_DATA_LEN },
+#endif
};
static const struct nla_policy
-@@ -655,16 +657,26 @@ static const struct nla_policy nl80211_p
+@@ -665,16 +670,26 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
* The value of the Length field of the Supported Operating
* Classes element is between 2 and 253.
*/
@@ -40,7 +45,7 @@
[NL80211_ATTR_MAC_HINT] = NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN),
[NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 },
[NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 },
-@@ -719,10 +731,15 @@ static const struct nla_policy nl80211_p
+@@ -729,10 +744,15 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 },
[NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 },
[NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 },
Add definition for the attribute NL80211_FILS_DISCOVERY_ATTR_TMPL which is missing for kernels older than 5.10.0. Fixes: 51258137c228 ("patches: Avoid using NLA_POLICY_RANGE(...)") Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> --- patches/0099-netlink-range/mac80211.patch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)