xref: /wlan-driver/qca-wifi-host-cmn/os_if/linux/wlan_osif_features.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name 
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: wlan_osif_features.h
21*5113495bSYour Name  *
22*5113495bSYour Name  * Define feature flags to cleanly describe when features
23*5113495bSYour Name  * are present in a given version of the kernel
24*5113495bSYour Name  */
25*5113495bSYour Name 
26*5113495bSYour Name #ifndef _WLAN_OSIF_FEATURES_H_
27*5113495bSYour Name #define _WLAN_OSIF_FEATURES_H_
28*5113495bSYour Name 
29*5113495bSYour Name #include <linux/version.h>
30*5113495bSYour Name 
31*5113495bSYour Name /*
32*5113495bSYour Name  * CFG80211_11BE_BASIC
33*5113495bSYour Name  * Used to indicate the Linux Kernel contains support for basic 802.11be
34*5113495bSYour Name  * definitions.
35*5113495bSYour Name  *
36*5113495bSYour Name  * These definitions were introduced in Linux Kernel 5.18 via:
37*5113495bSYour Name  * cbc1ca0a9d0a ieee80211: Add EHT (802.11be) definitions
38*5113495bSYour Name  * 2a2c86f15e17 ieee80211: add EHT 1K aggregation definitions
39*5113495bSYour Name  * 5cd5a8a3e2fb cfg80211: Add data structures to capture EHT capabilities
40*5113495bSYour Name  * 3743bec6120a cfg80211: Add support for EHT 320 MHz channel width
41*5113495bSYour Name  * cfb14110acf8 nl80211: add EHT MCS support
42*5113495bSYour Name  * c2b3d7699fb0 nl80211: add support for 320MHz channel limitation
43*5113495bSYour Name  * 31846b657857 cfg80211: add NO-EHT flag to regulatory
44*5113495bSYour Name  * ea05fd3581d3 cfg80211: Support configuration of station EHT capabilities
45*5113495bSYour Name  *
46*5113495bSYour Name  * These definitions were backported to Android Common Kernel 5.15 via:
47*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996261
48*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996262
49*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996263
50*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996264
51*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996265
52*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996266
53*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996267
54*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996268
55*5113495bSYour Name  */
56*5113495bSYour Name 
57*5113495bSYour Name #if (defined(__ANDROID_COMMON_KERNEL__) && \
58*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
59*5113495bSYour Name 	(LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))) || \
60*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0))
61*5113495bSYour Name #define CFG80211_11BE_BASIC 1
62*5113495bSYour Name #endif
63*5113495bSYour Name 
64*5113495bSYour Name /*
65*5113495bSYour Name  * CFG80211_SA_QUERY_OFFLOAD_SUPPORT
66*5113495bSYour Name  * Used to indicate the Linux Kernel contains support to offload SA Query
67*5113495bSYour Name  * procedures for AP SME device
68*5113495bSYour Name  *
69*5113495bSYour Name  * This feature was introduced in Linux Kernel 5.17 via:
70*5113495bSYour Name  * 47301a74bbfa ("nl80211: Add support to set AP settings flags with single attribute")
71*5113495bSYour Name  * 87c1aec15dee ("nl80211: Add support to offload SA Query procedures for AP SME device")
72*5113495bSYour Name  *
73*5113495bSYour Name  * This feature was backported to Android Common Kernel 5.15 via:
74*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1958439
75*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1958440
76*5113495bSYour Name  */
77*5113495bSYour Name 
78*5113495bSYour Name #if (defined(__ANDROID_COMMON_KERNEL__) && \
79*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
80*5113495bSYour Name 	(LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))) || \
81*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
82*5113495bSYour Name #define CFG80211_SA_QUERY_OFFLOAD_SUPPORT 1
83*5113495bSYour Name #endif
84*5113495bSYour Name 
85*5113495bSYour Name /*
86*5113495bSYour Name  * CFG80211_SINGLE_NETDEV_MULTI_LINK_SUPPORT
87*5113495bSYour Name  * Used to indicate the Linux Kernel contains support for single netdevice multi
88*5113495bSYour Name  * link support.
89*5113495bSYour Name  *
90*5113495bSYour Name  * This feature was merged into wireless-next via below commits:
91*5113495bSYour Name  * 7b0a0e3c3 wifi: cfg80211: do some rework towards MLO link APIs
92*5113495bSYour Name  * 0f7594489 wifi: cfg80211: mlme: get BSS entry outside cfg80211_mlme_assoc()
93*5113495bSYour Name  * 9ecff10e8 wifi: nl80211: refactor BSS lookup in nl80211_associate()
94*5113495bSYour Name  * 0f48b8b88 wifi: ieee80211: add definitions for multi-link element
95*5113495bSYour Name  * 325839da9 wifi: cfg80211: simplify cfg80211_mlme_auth() prototype
96*5113495bSYour Name  * d648c2302 wifi: nl80211: support MLO in auth/assoc
97*5113495bSYour Name  *
98*5113495bSYour Name  * This feature was backported to Android Common Kernel 5.15 via:
99*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2123895
100*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2115618
101*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2115620
102*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2121347
103*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2121348
104*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2121349
105*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2121350
106*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2121351
107*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2123452
108*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2123454
109*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2115621
110*5113495bSYour Name  *
111*5113495bSYour Name  */
112*5113495bSYour Name #if ((defined(__ANDROID_COMMON_KERNEL__) && \
113*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
114*5113495bSYour Name 	(defined  IEEE80211_MLD_MAX_NUM_LINKS)) || \
115*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)))
116*5113495bSYour Name #define CFG80211_SINGLE_NETDEV_MULTI_LINK_SUPPORT 1
117*5113495bSYour Name #endif
118*5113495bSYour Name 
119*5113495bSYour Name /**
120*5113495bSYour Name  * CFG80211_SAE_AUTH_TA_ADDR_SUPPORT
121*5113495bSYour Name  * Used to indicate the Linux Kernel contains support for ML SAE auth with link
122*5113495bSYour Name  * address as the transmitter address
123*5113495bSYour Name  *
124*5113495bSYour Name  * TODO: These changes are currently in internal review once upstreamed and
125*5113495bSYour Name  * backported to 5.15 need to add the respective commit-ids
126*5113495bSYour Name  */
127*5113495bSYour Name #if (defined(__ANDROID_COMMON_KERNEL__) && \
128*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
129*5113495bSYour Name 	(defined  CFG80211_EXTERNAL_AUTH_TA_SUPPORT))
130*5113495bSYour Name #define CFG80211_SAE_AUTH_TA_ADDR_SUPPORT 1
131*5113495bSYour Name #endif
132*5113495bSYour Name 
133*5113495bSYour Name /*
134*5113495bSYour Name  * CFG80211_MULTI_AKM_CONNECT_SUPPORT
135*5113495bSYour Name  * used to indicate the Linux kernel contains support for multi AKM connect
136*5113495bSYour Name  * support
137*5113495bSYour Name  *
138*5113495bSYour Name  * This feature was introduced in Linux Kernel 6.0 via:
139*5113495bSYour Name  * ecad3b0b99bf wifi: cfg80211: Increase akm_suites array size in
140*5113495bSYour Name  * cfg80211_crypto_settings.
141*5113495bSYour Name  */
142*5113495bSYour Name #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || \
143*5113495bSYour Name 	(defined CFG80211_MAX_NUM_AKM_SUITES))
144*5113495bSYour Name #define CFG80211_MULTI_AKM_CONNECT_SUPPORT 1
145*5113495bSYour Name #endif
146*5113495bSYour Name 
147*5113495bSYour Name /*
148*5113495bSYour Name  * WLAN_MLD_AP_STA_CONNECT_SUPPORT
149*5113495bSYour Name  * Used to indicate Linux Kernel supports ML connection on SAP.
150*5113495bSYour Name  */
151*5113495bSYour Name #if (defined(__ANDROID_COMMON_KERNEL__) && \
152*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
153*5113495bSYour Name 	(defined CFG80211_MLD_AP_STA_CONNECT_SUPPORT))
154*5113495bSYour Name #define WLAN_MLD_AP_STA_CONNECT_SUPPORT 1
155*5113495bSYour Name #endif
156*5113495bSYour Name 
157*5113495bSYour Name /*
158*5113495bSYour Name  * WLAN_MLD_AP_OWE_INFO_SUPPORT
159*5113495bSYour Name  * Used to indicate Linux Kernel supports ML OWE connection
160*5113495bSYour Name  * on SAP
161*5113495bSYour Name  */
162*5113495bSYour Name #if (defined(__ANDROID_COMMON_KERNEL__) && \
163*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
164*5113495bSYour Name 	(defined CFG80211_MLD_AP_OWE_INFO_SUPPORT))
165*5113495bSYour Name #define WLAN_MLD_AP_OWE_INFO_SUPPORT 1
166*5113495bSYour Name #endif
167*5113495bSYour Name 
168*5113495bSYour Name /*
169*5113495bSYour Name  * CFG80211_TX_CONTROL_PORT_LINK_SUPPORT
170*5113495bSYour Name  * Used to indicate Linux kernel contains support for TX control port from
171*5113495bSYour Name  * specific link ID
172*5113495bSYour Name  *
173*5113495bSYour Name  * This feature was introduced in Linux Kernel 6.0 via:
174*5113495bSYour Name  * 9b6bf4d6120a wifi: nl80211: set BSS to NULL if IS_ERR()
175*5113495bSYour Name  * 45aaf17c0c34 wifi: nl80211: check MLO support in authenticate
176*5113495bSYour Name  * d2bc52498b6b wifi: nl80211: Support MLD parameters in nl80211_set_station()
177*5113495bSYour Name  * 67207bab9341 wifi: cfg80211/mac80211: Support control port TX from specific link
178*5113495bSYour Name  * 69c3f2d30c35 wifi: nl80211: allow link ID in set_wiphy with frequency
179*5113495bSYour Name  * fa2ca639c4e6 wifi: nl80211: advertise MLO support
180*5113495bSYour Name  * e3d331c9b620 wifi: cfg80211: set country_elem to NULL
181*5113495bSYour Name  * 34d76a14f8f7 wifi: nl80211: reject link specific elements on assoc link
182*5113495bSYour Name  * df35f3164ec1 wifi: nl80211: reject fragmented and non-inheritance elements
183*5113495bSYour Name  * ff5c4dc4cd78 wifi: nl80211: fix some attribute policy entries
184*5113495bSYour Name  * 7464f665158e wifi: cfg80211: add cfg80211_get_iftype_ext_capa()
185*5113495bSYour Name  * 8876c67e6296 wifi: nl80211: require MLD address on link STA add/modify
186*5113495bSYour Name  * 9dd1953846c7 wifi: nl80211/mac80211: clarify link ID in control port TX
187*5113495bSYour Name  * 00b3d8401019 wifi: cfg80211/nl80211: move rx management data into a struct
188*5113495bSYour Name  * 6074c9e57471 wifi: cfg80211: report link ID in NL80211_CMD_FRAME
189*5113495bSYour Name  * 95f498bb49f7 wifi: nl80211: add MLO link ID to the NL80211_CMD_FRAME TX API
190*5113495bSYour Name  * 1e0b3b0b6cb5 wifi: mac80211: Align with Draft P802.11be_D1.5
191*5113495bSYour Name  * 062e8e02dfd4 wifi: mac80211: Align with Draft P802.11be_D2.0
192*5113495bSYour Name  * d776763f4808 wifi: cfg80211: debugfs: fix return type in ht40allow_map_read()
193*5113495bSYour Name  * 64e966d1e84b wifi: cfg80211: fix MCS divisor value
194*5113495bSYour Name  * 4e9c3af39820 wifi: nl80211: add EML/MLD capabilities to per-iftype capabilities
195*5113495bSYour Name  * 80b0ed70a271 wifi: nl80211: add RX and TX timestamp attributes
196*5113495bSYour Name  * ea7d50c925ce wifi: cfg80211: add a function for reporting TX status with hardware timestamps
197*5113495bSYour Name  * 1ff715ffa0ec wifi: cfg80211: add hardware timestamps to frame RX info
198*5113495bSYour Name  *
199*5113495bSYour Name  * This feature was backported to Android Common Kernel 5.15.74 via:
200*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253173
201*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253174
202*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253175
203*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253176
204*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253177
205*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253178
206*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253179
207*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253180
208*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253181
209*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253182
210*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253183
211*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253184
212*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253185
213*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253186
214*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253187
215*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253188
216*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253189
217*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253190
218*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253191
219*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253192
220*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253193
221*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2253194
222*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2267469
223*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2267204
224*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2267210
225*5113495bSYour Name  */
226*5113495bSYour Name 
227*5113495bSYour Name #if (defined(__ANDROID_COMMON_KERNEL__) && \
228*5113495bSYour Name 	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 74)) || \
229*5113495bSYour Name 	(defined IEEE80211_EHT_OPER_INFO_PRESENT))
230*5113495bSYour Name #define CFG80211_TX_CONTROL_PORT_LINK_SUPPORT 1
231*5113495bSYour Name #endif
232*5113495bSYour Name 
233*5113495bSYour Name /*
234*5113495bSYour Name  * CFG80211_EXTERNAL_AUTH_MLO_SUPPORT
235*5113495bSYour Name  * Used to indicate Linux kernel contains support for ML external auth
236*5113495bSYour Name  *
237*5113495bSYour Name  * TODO: Corresponding Linux kernel changes are still under wirless-next
238*5113495bSYour Name  * will add the commit-ID when available.
239*5113495bSYour Name  */
240*5113495bSYour Name /*
241*5113495bSYour Name  * TODO: will add this check when available.
242*5113495bSYour Name  * #if (defined(__ANDROID_COMMON_KERNEL__) && \
243*5113495bSYour Name  *	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \
244*5113495bSYour Name  *	(defined CFG80211_EXTERNAL_AUTH_MLO_SUPPORT))
245*5113495bSYour Name  */
246*5113495bSYour Name #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) || \
247*5113495bSYour Name 	(defined CFG80211_EXTERNAL_AUTH_MLO_SUPPORT))
248*5113495bSYour Name #define WLAN_EXTERNAL_AUTH_MLO_SUPPORT
249*5113495bSYour Name #endif
250*5113495bSYour Name 
251*5113495bSYour Name /*
252*5113495bSYour Name  * CFG80211_TID_LINK_MAP_SUPPORT
253*5113495bSYour Name  * Used to indicate Linux kernel contains support to get the TID to link map
254*5113495bSYour Name  * status and response event.
255*5113495bSYour Name  *
256*5113495bSYour Name  * TODO: Corresponding Linux kernel support check changes are still under review
257*5113495bSYour Name  * will add the commit-ID when available
258*5113495bSYour Name  */
259*5113495bSYour Name #if (defined CFG80211_TID_LINK_MAP_SUPPORT)
260*5113495bSYour Name #define WLAN_TID_LINK_MAP_SUPPORT
261*5113495bSYour Name #endif
262*5113495bSYour Name 
263*5113495bSYour Name /*
264*5113495bSYour Name  * CFG80211_EXT_FEATURE_SECURE_NAN
265*5113495bSYour Name  * Used to indicate Linux kernel contains support to secure NAN feature
266*5113495bSYour Name  *
267*5113495bSYour Name  * This feature was introduced in Linux Kernel 6.4 via:
268*5113495bSYour Name  * 9b89495e479c wifi: nl80211: Allow authentication frames and set keys on NAN
269*5113495bSYour Name  *                             interface
270*5113495bSYour Name  */
271*5113495bSYour Name #if ((LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)) || \
272*5113495bSYour Name 	(defined CFG80211_EXT_FEATURE_SECURE_NAN))
273*5113495bSYour Name #define WLAN_EXT_FEATURE_SECURE_NAN
274*5113495bSYour Name #endif
275*5113495bSYour Name 
276*5113495bSYour Name /*
277*5113495bSYour Name  * CFG80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA
278*5113495bSYour Name  * Used to indicate Linux kernel contains support to auth and deauth random TA
279*5113495bSYour Name  *
280*5113495bSYour Name  * This feature was introduced in Linux Kernel 6.4 via:
281*5113495bSYour Name  * 6933486133ec wifi: nl80211: Add support for randomizing TA of auth and deauth
282*5113495bSYour Name  *                             frames
283*5113495bSYour Name  */
284*5113495bSYour Name #if ((LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)) || \
285*5113495bSYour Name 	(defined CFG80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA))
286*5113495bSYour Name #define WLAN_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA
287*5113495bSYour Name #endif
288*5113495bSYour Name 
289*5113495bSYour Name /*
290*5113495bSYour Name  * WLAN_MLD_AP_STA_CONNECT_SUPPORT
291*5113495bSYour Name  * Used to indicate Linux Upstream Kernel supports ML connection on SAP.
292*5113495bSYour Name  *
293*5113495bSYour Name  * This feature was introduced in Linux Kernel 6.3 via:
294*5113495bSYour Name  * a42e59e: wifi: cfg80211: Extend cfg80211_new_sta() for MLD AP
295*5113495bSYour Name  * 8bb588d: wifi: cfg80211: Extend cfg80211_update_owe_info_event() for MLD AP
296*5113495bSYour Name  *
297*5113495bSYour Name  * This feature was backported to Android Common Kernel 5.15.74 via:
298*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2450265
299*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2450266
300*5113495bSYour Name  *
301*5113495bSYour Name  * This feature was backported to Android Common Kernel 6.1 via:
302*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2470890
303*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2470891
304*5113495bSYour Name  */
305*5113495bSYour Name #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || \
306*5113495bSYour Name 	(defined CFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT))
307*5113495bSYour Name #define WLAN_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT 1
308*5113495bSYour Name #endif
309*5113495bSYour Name 
310*5113495bSYour Name /*
311*5113495bSYour Name  * WLAN_LINK_STA_PARAMS_PRESENT
312*5113495bSYour Name  * WLAN_EHT_CAPABILITY_PRESENT
313*5113495bSYour Name  *
314*5113495bSYour Name  * To deterministically identify where EHT fields are present (whether in
315*5113495bSYour Name  * link_sta_params or station_parameters), enable either
316*5113495bSYour Name  * WLAN_LINK_STA_PARAMS_PRESENT or WLAN_EHT_CAPABILITY_PRESENT but not both.
317*5113495bSYour Name  *
318*5113495bSYour Name  * Incase EHT fields are present in link_sta_parameters only define
319*5113495bSYour Name  * WLAN_LINK_STA_PARAMS_PRESENT flag.
320*5113495bSYour Name  *
321*5113495bSYour Name  * If WLAN_LINK_STA_PARAMS_PRESENT is not defined, then EHT cap can be present
322*5113495bSYour Name  * in station_parameters structure, in such case WLAN_EHT_CAPABILITY_PRESENT
323*5113495bSYour Name  * flag will be defined.
324*5113495bSYour Name  *
325*5113495bSYour Name  * If both flags are not enabled then kernel is not EHT capable.
326*5113495bSYour Name  *
327*5113495bSYour Name  * WLAN_LINK_STA_PARAMS_PRESENT
328*5113495bSYour Name  * 577e5b8 wifi: cfg80211: add API to add/modify/remove a link station
329*5113495bSYour Name  * b95eb7f wifi: cfg80211/mac80211: separate link params from station params
330*5113495bSYour Name  *
331*5113495bSYour Name  * The changes are backported to ACK from below commits.
332*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2227406
333*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/2227407
334*5113495bSYour Name  *
335*5113495bSYour Name  * WLAN_EHT_CAPABILITY_PRESENT
336*5113495bSYour Name  * ea05fd3 cfg80211: Support configuration of station EHT capabilities
337*5113495bSYour Name  *
338*5113495bSYour Name  * The changes are backported to ACK from below commit.
339*5113495bSYour Name  * https://android-review.googlesource.com/c/kernel/common/+/1996268
340*5113495bSYour Name  *
341*5113495bSYour Name  */
342*5113495bSYour Name #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || \
343*5113495bSYour Name 	(defined CFG80211_LINK_STA_PARAMS_PRESENT))
344*5113495bSYour Name #define WLAN_LINK_STA_PARAMS_PRESENT 1
345*5113495bSYour Name #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || \
346*5113495bSYour Name 	(defined NL80211_EHT_MIN_CAPABILITY_LEN))
347*5113495bSYour Name #define WLAN_EHT_CAPABILITY_PRESENT 1
348*5113495bSYour Name #endif
349*5113495bSYour Name 
350*5113495bSYour Name #endif
351