mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-23 20:31:59 +00:00
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From ae444bf877fd94256a110d03582ddb045c541525 Mon Sep 17 00:00:00 2001
|
|
From: Aloka Dixit <quic_alokad@quicinc.com>
|
|
Date: Fri, 25 Feb 2022 09:25:31 -0800
|
|
Subject: [PATCH 1/2] nl80211: fix attribute definition for older kernels
|
|
|
|
Add compile time flags around the definition of
|
|
NL80211_ATTR_EHT_CAPABILITY to support kernels older than 5.10.0.
|
|
|
|
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
|
|
---
|
|
net/wireless/nl80211.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- a/net/wireless/nl80211.c
|
|
+++ b/net/wireless/nl80211.c
|
|
@@ -812,10 +812,16 @@ static const struct nla_policy nl80211_p
|
|
[NL80211_ATTR_AWGN_INTERFERENCE_BITMAP] = { .type = NLA_U32 },
|
|
[NL80211_ATTR_6G_REG_POWER_MODE] = NLA_POLICY_RANGE(NLA_U8, 0, 2),
|
|
[NL80211_ATTR_EMA_RNR_ELEMS] = { .type = NLA_NESTED },
|
|
+#if LINUX_VERSION_IS_GEQ(5,10,0)
|
|
[NL80211_ATTR_EHT_CAPABILITY] =
|
|
NLA_POLICY_RANGE(NLA_BINARY,
|
|
NL80211_EHT_MIN_CAPABILITY_LEN,
|
|
NL80211_EHT_MAX_CAPABILITY_LEN),
|
|
+#else
|
|
+ [NL80211_ATTR_EHT_CAPABILITY] =
|
|
+ { .type = NLA_BINARY,
|
|
+ .len = NL80211_EHT_MAX_CAPABILITY_LEN },
|
|
+#endif
|
|
};
|
|
|
|
/* policy for the key attributes */
|