xref: /wlan-dirver/qca-wifi-host-cmn/umac/cmn_services/inc/wlan_cmn.h (revision dd4dc88b837a295134aa9869114a2efee0f4894b)
1 /*
2  * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18  /**
19   * DOC: This file provides the common definitions for object manager
20   */
21 
22 #ifndef _WLAN_CMN_H_
23 #define _WLAN_CMN_H_
24 
25 #include <qdf_types.h>
26 
27 /* Max no of UMAC components */
28 #define WLAN_UMAC_MAX_COMPONENTS WLAN_UMAC_COMP_ID_MAX
29 
30 /* Max no. of radios, a pSoc/Device can support */
31 #ifdef WLAN_MAX_PDEVS
32 #define WLAN_UMAC_MAX_PDEVS WLAN_MAX_PDEVS
33 #else
34 #define WLAN_UMAC_MAX_PDEVS 3
35 #endif
36 
37 /* Max no. of VDEV per PSOC */
38 #ifdef WLAN_PSOC_MAX_VDEVS
39 #define WLAN_UMAC_PSOC_MAX_VDEVS WLAN_PSOC_MAX_VDEVS
40 #else
41 #define WLAN_UMAC_PSOC_MAX_VDEVS 51
42 #endif
43 
44 /* Max no. of VDEVs, a PDEV can support */
45 #ifdef WLAN_PDEV_MAX_VDEVS
46 #define WLAN_UMAC_PDEV_MAX_VDEVS WLAN_PDEV_MAX_VDEVS
47 #else
48 #define WLAN_UMAC_PDEV_MAX_VDEVS 17
49 #endif
50 
51 /* Max no. of Peers, a device can support */
52 #define WLAN_UMAC_PSOC_MAX_PEERS (1536 + WLAN_UMAC_PSOC_MAX_VDEVS)
53 
54 /* Max no. of Temporary Peers, a pdev can support */
55 #define WLAN_MAX_PDEV_TEMP_PEERS 128
56 
57 /* Max no. of Temporary Peers, a psoc can support */
58 #define WLAN_MAX_PSOC_TEMP_PEERS \
59 		(WLAN_MAX_PDEV_TEMP_PEERS * WLAN_UMAC_MAX_PDEVS)
60 
61 /* Max length of a SSID */
62 #define WLAN_SSID_MAX_LEN 32
63 
64 /* Max sequence number */
65 #define WLAN_MAX_SEQ_NUM 4096
66 
67 /* Max no. of peers for STA vap */
68 #define WLAN_UMAC_MAX_STA_PEERS 2
69 
70 /* Max vdev_id */
71 #define WLAN_UMAC_VDEV_ID_MAX 0xFF
72 
73 /* Invalid pdev_id */
74 #define WLAN_INVALID_PDEV_ID 0xFFFFFFFF
75 
76 /* Invalid free descriptor count */
77 #define WLAN_INVALID_MGMT_DESC_COUNT 0xFFFFFFFF
78 
79 /* 802.11 cap info */
80 #define WLAN_CAPINFO_ESS               0x0001
81 #define WLAN_CAPINFO_IBSS              0x0002
82 #define WLAN_CAPINFO_CF_POLLABLE       0x0004
83 #define WLAN_CAPINFO_CF_POLLREQ        0x0008
84 #define WLAN_CAPINFO_PRIVACY           0x0010
85 #define WLAN_CAPINFO_SHORT_PREAMBLE    0x0020
86 #define WLAN_CAPINFO_PBCC              0x0040
87 #define WLAN_CAPINFO_CHNL_AGILITY      0x0080
88 #define WLAN_CAPINFO_SPECTRUM_MGMT     0x0100
89 #define WLAN_CAPINFO_QOS               0x0200
90 #define WLAN_CAPINFO_SHORT_SLOTTIME    0x0400
91 #define WLAN_CAPINFO_APSD              0x0800
92 #define WLAN_CAPINFO_RADIOMEAS         0x1000
93 #define WLAN_CAPINFO_DSSSOFDM          0x2000
94 
95 /* Allowed time to wait for Object creation  */
96 #define WLAN_VDEV_CREATE_TIMEOUT_CNT 300
97 /* 25 msec */
98 #define WLAN_VDEV_CREATE_TIMEOUT 25
99 
100 #define WLAN_PDEV_CREATE_TIMEOUT_CNT 300
101 /* 25 msec */
102 #define WLAN_PDEV_CREATE_TIMEOUT 25
103 
104 #define WLAN_PSOC_CREATE_TIMEOUT_CNT 300
105 /* 25 msec */
106 #define WLAN_PSOC_CREATE_TIMEOUT 25
107 #define WLAN_24_GHZ_BASE_FREQ   (2407)
108 #define WLAN_5_GHZ_BASE_FREQ    (5000)
109 #define WLAN_24_GHZ_CHANNEL_6   (6)
110 #define WLAN_24_GHZ_CHANNEL_14  (14)
111 #define WLAN_24_GHZ_CHANNEL_15  (15)
112 #define WLAN_24_GHZ_CHANNEL_27  (27)
113 #define WLAN_5_GHZ_CHANNEL_170  (170)
114 #define WLAN_CHAN_SPACING_5MHZ  (5)
115 #define WLAN_CHAN_SPACING_20MHZ (20)
116 #define WLAN_CHAN_14_FREQ       (2484)
117 #define WLAN_CHAN_15_FREQ       (2512)
118 #define WLAN_CHAN_170_FREQ      (5852)
119 
120 #define WLAN_MAC_EID_VENDOR     221
121 #define WLAN_MAC_EID_EXT        255
122 
123 /* VHT capability flags */
124 /* B0-B1 Maximum MPDU Length */
125 /* A-MSDU Length 3839 octets */
126 #define WLAN_VHTCAP_MAX_MPDU_LEN_3839     0x00000000
127  /* A-MSDU Length 7991 octets */
128 #define WLAN_VHTCAP_MAX_MPDU_LEN_7935     0x00000001
129 /* A-MSDU Length 11454 octets */
130 #define WLAN_VHTCAP_MAX_MPDU_LEN_11454    0x00000002
131 
132 /* B2-B3 Supported Channel Width */
133 /* Does not support 160 or 80+80 */
134 #define WLAN_VHTCAP_SUP_CHAN_WIDTH_80     0x00000000
135 /* Supports 160 */
136 #define WLAN_VHTCAP_SUP_CHAN_WIDTH_160    0x00000004
137 /* Support both 160 or 80+80 */
138 #define WLAN_VHTCAP_SUP_CHAN_WIDTH_80_160 0x00000008
139 /* B2-B3 */
140 #define WLAN_VHTCAP_SUP_CHAN_WIDTH_S      2
141 #define WLAN_VHTCAP_SUP_CHAN_WIDTH_MASK   0x0000000C
142 /* B4 RX LDPC */
143 #define WLAN_VHTCAP_RX_LDPC             0x00000010
144 /* B5 Short GI for 80MHz */
145 #define WLAN_VHTCAP_SHORTGI_80          0x00000020
146 /* B6 Short GI for 160 and 80+80 MHz */
147 #define WLAN_VHTCAP_SHORTGI_160         0x00000040
148 /* B7 Tx STBC */
149 #define WLAN_VHTCAP_TX_STBC             0x00000080
150 #define WLAN_VHTCAP_TX_STBC_S           7
151 /* B8-B10 Rx STBC */
152 #define WLAN_VHTCAP_RX_STBC             0x00000700
153 #define WLAN_VHTCAP_RX_STBC_S           8
154 /* B11 SU Beam former capable */
155 #define WLAN_VHTCAP_SU_BFORMER          0x00000800
156 #define WLAN_VHTCAP_SU_BFORMER_S        11
157 /* B12 SU Beam formee capable */
158 #define WLAN_VHTCAP_SU_BFORMEE          0x00001000
159 #define WLAN_VHTCAP_SU_BFORMEE_S        12
160 
161 /* B13-B15 Compressed steering number of beacomformer Antennas supported */
162 #define WLAN_VHTCAP_BF_MAX_ANT          0x0000E000
163 #define WLAN_VHTCAP_BF_MAX_ANT_S        13
164 /* B13-B15 Beamformee STS Capability */
165 #define WLAN_VHTCAP_STS_CAP_S           13
166 #define WLAN_VHTCAP_STS_CAP_M           0x7
167 
168 /* B16-B18 Sounding Dimensions */
169 #define WLAN_VHTCAP_SOUND_DIM           0x00070000
170 #define WLAN_VHTCAP_SOUND_DIM_S         16
171 /* B19 MU Beam Former */
172 #define WLAN_VHTCAP_MU_BFORMER          0x00080000
173 #define WLAN_VHTCAP_MU_BFORMER_S        19
174 /* B20 MU Beam Formee */
175 #define WLAN_VHTCAP_MU_BFORMEE          0x00100000
176 #define WLAN_VHTCAP_MU_BFORMEE_S        20
177 /* B21 VHT TXOP PS */
178 #define WLAN_VHTCAP_TXOP_PS             0x00200000
179 /* B22 +HTC-VHT capable */
180 #define WLAN_VHTCAP_PLUS_HTC_VHT        0x00400000
181 
182 #define WLAN_VHTCAP_MAX_AMPDU_LEN_FACTOR  13
183 /* B23-B25 maximum AMPDU Length Exponent */
184 #define WLAN_VHTCAP_MAX_AMPDU_LEN_EXP   0x03800000
185 #define WLAN_VHTCAP_MAX_AMPDU_LEN_EXP_S 23
186 /* B26-B27 VHT Link Adaptation capable */
187 #define WLAN_VHTCAP_LINK_ADAPT          0x0C000000
188 /* Rx Antenna Pattern Consistency Supported */
189 #define WLAN_VHTCAP_RX_ANTENNA_PATTERN  0x10000000
190 /* Tx Antenna Pattern Consistency Supported */
191 #define WLAN_VHTCAP_TX_ANTENNA_PATTERN  0x20000000
192 /* B30-B31 Extended NSS Bandwidth Support */
193 #define WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT  0x00000000
194 /* B30-B31 Extended NSS Bandwidth Support */
195 #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_1   0x40000000
196 /* B30-B31 Extended NSS Bandwidth Support */
197 #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_2   0x80000000
198 /* B30-B31 Extended NSS Bandwidth Support */
199 #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3   0xC0000000
200 #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_S   30
201 #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_MASK   0xC0000000
202 
203 #define WLAN_VHTCAP_EXT_NSS_MASK   (WLAN_VHTCAP_SUP_CHAN_WIDTH_MASK |\
204 					 WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_MASK)
205 /* VHTCAP combinations of "supported channel width" and "ext nss support"
206  * which determine the NSS value supported by STA for <=80 MHz, 160 MHz
207  * and 80+80 MHz. The macros to be read as combination of
208  * "supported channel width" and "ext nss support" followed by NSS for 80MHz,
209  * 160MHz and 80+80MHz defined as a function of Max VHT NSS supported.
210  * Ex: WLAN_EXTNSS_MAP_01_80F1_160FDOT5_80P80NONE - To be reas as
211  * supported channel width = 0
212  * ext nss support = 1
213  * NSS value for <=80MHz = max_vht_nss * 1
214  * NSS value for 160MHz = max_vht_nss * (.5)
215  * NSS value for 80+80MHz = not supported
216  */
217 #define WLAN_EXTNSS_MAP_00_80F1_160NONE_80P80NONE \
218 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT)
219 #define WLAN_EXTNSS_MAP_01_80F1_160FDOT5_80P80NONE \
220 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_1)
221 #define WLAN_EXTNSS_MAP_02_80F1_160FDOT5_80P80FDOT5 \
222 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_2)
223 #define WLAN_EXTNSS_MAP_03_80F1_160FDOT75_80P80FDOT75 \
224 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3)
225 #define WLAN_EXTNSS_MAP_10_80F1_160F1_80P80NONE \
226 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT)
227 #define WLAN_EXTNSS_MAP_11_80F1_160F1_80P80FDOT5 \
228 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_1)
229 #define WLAN_EXTNSS_MAP_12_80F1_160F1_80P80FDOT75 \
230 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_2)
231 #define WLAN_EXTNSS_MAP_13_80F2_160F2_80P80F1 \
232 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3)
233 #define WLAN_EXTNSS_MAP_20_80F1_160F1_80P80F1 \
234 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_80_160 | WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT)
235 #define WLAN_EXTNSS_MAP_23_80F2_160F1_80P80F1 \
236 	(WLAN_VHTCAP_SUP_CHAN_WIDTH_80_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3)
237 
238 
239 /**
240  * enum wlan_umac_comp_id - UMAC component id
241  * @WLAN_UMAC_COMP_MLME:          MLME
242  * @WLAN_UMAC_COMP_MGMT_TXRX:     MGMT Tx/Rx
243  * @WLAN_UMAC_COMP_SERIALIZATION: Serialization
244  * @WLAN_UMAC_COMP_SCAN: SCAN -   as scan module uses services provided by
245  *                                MLME, MGMT_TXRX and SERIALIZATION, SCAN module
246  *                                must be initializes after above modules.
247  * @WLAN_UMAC_COMP_PMO:           PMO component
248  * @WLAN_UMAC_COMP_P2P:           P2P
249  * @WLAN_UMAC_COMP_POLICY_MGR:    Policy Manager
250  * @WLAN_UMAC_COMP_CONFIG:        Configuration
251  * @WLAN_UMAC_COMP_WIFI_POS:      WIFI Positioning
252  * @WLAN_UMAC_COMP_TDLS:          TDLS
253  * @WLAN_UMAC_COMP_ATF:           Airtime Fairness
254  * @WLAN_UMAC_COMP_SA_API:        Smart Antenna API
255  * @WLAN_UMAC_COMP_REGULATORY:    REGULATORY
256  * @WLAN_UMAC_COMP_CRYPTO:        CRYPTO
257  * @WLAN_UMAC_COMP_NAN:           Neighbor Aware Networking
258  * @WLAN_UMAC_COMP_DFS:           DFS
259  * @WLAN_UMAC_COMP_SPECTRAL:      Spectral
260  * @WLAN_UMAC_COMP_OFFCHAN_TXRX:  Offchan TxRx
261  * @WLAN_UMAC_COMP_SON:           SON
262  * @WLAN_UMAC_COMP_SPECTRAL:      Spectral
263  * @WLAN_UMAC_COMP_SPLITMAC:      SplitMAC
264  * @WLAN_UMAC_COMP_DISA:          DISA encryption test
265  * @WLAN_UMAC_COMP_GREEN_AP:      Green AP
266  * @WLAN_UMAC_COMP_FTM:           FTM component
267  * @WLAN_UMAC_COMP_FD:            FILS Discovery
268  * @WLAN_UMAC_COMP_OCB:           OCB
269  * @WLAN_UMAC_COMP_IPA:           IPA
270  * @WLAN_UMAC_COMP_CP_STATS:      Control Plane Statistics
271  * @WLAN_UMAC_COMP_ACTION_OUI:    ACTION OUI
272  * @WLAN_UMAC_COMP_FWOL           FW Offload
273  * @WLAN_UMAC_COMP_INTEROP_ISSUES_AP       interop issues ap component
274  * @WLAN_UMAC_COMP_ID_MAX:        Maximum components in UMAC
275  *
276  * This id is static.
277  * On Adding new component, new id has to be assigned
278  */
279 enum wlan_umac_comp_id {
280 	WLAN_UMAC_COMP_MLME               = 0,
281 	WLAN_UMAC_COMP_MGMT_TXRX          = 1,
282 	WLAN_UMAC_COMP_SERIALIZATION      = 2,
283 	WLAN_UMAC_COMP_SCAN               = 3,
284 	WLAN_UMAC_COMP_PMO                = 4,
285 	WLAN_UMAC_COMP_P2P                = 5,
286 	WLAN_UMAC_COMP_POLICY_MGR         = 6,
287 	WLAN_UMAC_COMP_CONFIG             = 7,
288 	WLAN_TARGET_IF_COMP_DIRECT_BUF_RX = 8,
289 	WLAN_UMAC_COMP_WIFI_POS           = 9,
290 	WLAN_UMAC_COMP_TDLS               = 10,
291 	WLAN_UMAC_COMP_ATF                = 11,
292 	WLAN_UMAC_COMP_SA_API             = 12,
293 	WLAN_UMAC_COMP_REGULATORY         = 13,
294 	WLAN_UMAC_COMP_CRYPTO             = 14,
295 	WLAN_UMAC_COMP_NAN                = 15,
296 	WLAN_UMAC_COMP_DFS                = 16,
297 	WLAN_UMAC_COMP_OFFCHAN_TXRX       = 17,
298 	WLAN_UMAC_COMP_SON                = 18,
299 	WLAN_UMAC_COMP_SPECTRAL           = 19,
300 	WLAN_UMAC_COMP_SPLITMAC           = 20,
301 	WLAN_UMAC_COMP_DISA               = 21,
302 	WLAN_UMAC_COMP_GREEN_AP           = 22,
303 	WLAN_UMAC_COMP_FTM                = 23,
304 	WLAN_UMAC_COMP_FD                 = 24,
305 	WLAN_UMAC_COMP_OCB                = 25,
306 	WLAN_UMAC_COMP_IPA                = 26,
307 	WLAN_UMAC_COMP_CP_STATS           = 27,
308 	WLAN_UMAC_COMP_ACTION_OUI         = 28,
309 	WLAN_UMAC_COMP_FWOL               = 29,
310 	WLAN_UMAC_COMP_CFR                = 30,
311 	WLAN_UMAC_COMP_INTEROP_ISSUES_AP           = 31,
312 	WLAN_UMAC_COMP_ID_MAX,
313 };
314 
315 /**
316  *  enum WLAN_DEV_TYPE  - for DA or OL architecture types
317  *  @WLAN_DEV_DA:       Direct attach
318  *  @WLAN_DEV_OL:       Partial offload
319  *  @WLAN_DEV_INVALID:  Invalid dev type
320  */
321 typedef enum {
322 	WLAN_DEV_DA       = 0,
323 	WLAN_DEV_OL       = 1,
324 	WLAN_DEV_INVALID  = 3,
325 } WLAN_DEV_TYPE;
326 
327 /**
328  *  enum wlan_phymode - phy mode
329  *  @WLAN_PHYMODE_AUTO:           autoselect
330  *  @WLAN_PHYMODE_11A:            5GHz, OFDM
331  *  @WLAN_PHYMODE_11B:            2GHz, CCK
332  *  @WLAN_PHYMODE_11G:            2GHz, OFDM
333  *  @WLAN_PHYMODE_11NA_HT20:      5Ghz, HT20
334  *  @WLAN_PHYMODE_11NG_HT20:      2Ghz, HT20
335  *  @WLAN_PHYMODE_11NA_HT40PLUS:  5Ghz, HT40 (ext ch +1)
336  *  @WLAN_PHYMODE_11NA_HT40MINUS: 5Ghz, HT40 (ext ch -1)
337  *  @WLAN_PHYMODE_11NG_HT40PLUS:  2Ghz, HT40 (ext ch +1)
338  *  @WLAN_PHYMODE_11NG_HT40MINUS: 2Ghz, HT40 (ext ch -1)
339  *  @WLAN_PHYMODE_11NG_HT40:      2Ghz, Auto HT40
340  *  @WLAN_PHYMODE_11NA_HT40:      5Ghz, Auto HT40
341  *  @WLAN_PHYMODE_11AC_VHT20:     5Ghz, VHT20
342  *  @WLAN_PHYMODE_11AC_VHT40PLUS: 5Ghz, VHT40 (Ext ch +1)
343  *  @WLAN_PHYMODE_11AC_VHT40MINUS:5Ghz  VHT40 (Ext ch -1)
344  *  @WLAN_PHYMODE_11AC_VHT40:     5Ghz, VHT40
345  *  @WLAN_PHYMODE_11AC_VHT80:     5Ghz, VHT80
346  *  @WLAN_PHYMODE_11AC_VHT160:    5Ghz, VHT160
347  *  @WLAN_PHYMODE_11AC_VHT80_80:  5Ghz, VHT80_80
348  *  @WLAN_PHYMODE_11AXA_HE20:     5GHz, HE20
349  *  @WLAN_PHYMODE_11AXG_HE20:     2GHz, HE20
350  *  @WLAN_PHYMODE_11AXA_HE40PLUS: 5GHz, HE40 (ext ch +1)
351  *  @WLAN_PHYMODE_11AXA_HE40MINUS:5GHz, HE40 (ext ch -1)
352  *  @WLAN_PHYMODE_11AXG_HE40PLUS: 2GHz, HE40 (ext ch +1)
353  *  @WLAN_PHYMODE_11AXG_HE40MINUS:2GHz, HE40 (ext ch -1)
354  *  @WLAN_PHYMODE_11AXA_HE40:     5GHz, HE40
355  *  @WLAN_PHYMODE_11AXG_HE40:     2GHz, HE40
356  *  @WLAN_PHYMODE_11AXA_HE80:     5GHz, HE80
357  *  @WLAN_PHYMODE_11AXA_HE160:    5GHz, HE160
358  *  @WLAN_PHYMODE_11AXA_HE80_80:  5GHz, HE80_80
359  */
360 enum wlan_phymode {
361 	WLAN_PHYMODE_AUTO             = 0,
362 	WLAN_PHYMODE_11A              = 1,
363 	WLAN_PHYMODE_11B              = 2,
364 	WLAN_PHYMODE_11G              = 3,
365 	WLAN_PHYMODE_11NA_HT20        = 4,
366 	WLAN_PHYMODE_11NG_HT20        = 5,
367 	WLAN_PHYMODE_11NA_HT40PLUS    = 6,
368 	WLAN_PHYMODE_11NA_HT40MINUS   = 7,
369 	WLAN_PHYMODE_11NG_HT40PLUS    = 8,
370 	WLAN_PHYMODE_11NG_HT40MINUS   = 9,
371 	WLAN_PHYMODE_11NG_HT40        = 10,
372 	WLAN_PHYMODE_11NA_HT40        = 11,
373 	WLAN_PHYMODE_11AC_VHT20       = 12,
374 	WLAN_PHYMODE_11AC_VHT40PLUS   = 13,
375 	WLAN_PHYMODE_11AC_VHT40MINUS  = 14,
376 	WLAN_PHYMODE_11AC_VHT40       = 15,
377 	WLAN_PHYMODE_11AC_VHT80       = 16,
378 	WLAN_PHYMODE_11AC_VHT160      = 17,
379 	WLAN_PHYMODE_11AC_VHT80_80    = 18,
380 	WLAN_PHYMODE_11AXA_HE20       = 19,
381 	WLAN_PHYMODE_11AXG_HE20       = 20,
382 	WLAN_PHYMODE_11AXA_HE40PLUS   = 21,
383 	WLAN_PHYMODE_11AXA_HE40MINUS  = 22,
384 	WLAN_PHYMODE_11AXG_HE40PLUS   = 23,
385 	WLAN_PHYMODE_11AXG_HE40MINUS  = 24,
386 	WLAN_PHYMODE_11AXA_HE40       = 25,
387 	WLAN_PHYMODE_11AXG_HE40       = 26,
388 	WLAN_PHYMODE_11AXA_HE80       = 27,
389 	WLAN_PHYMODE_11AXA_HE160      = 28,
390 	WLAN_PHYMODE_11AXA_HE80_80    = 29,
391 };
392 
393 #define WLAN_PHYMODE_MAX      (WLAN_PHYMODE_11AXA_HE80_80 + 1)
394 
395 /**
396  * enum phy_ch_width - channel width
397  * @CH_WIDTH_20MHZ: 20 mhz width
398  * @CH_WIDTH_40MHZ: 40 mhz width
399  * @CH_WIDTH_80MHZ: 80 mhz width
400  * @CH_WIDTH_160MHZ: 160 mhz width
401  * @CH_WIDTH_80P80HZ: 80+80 mhz width
402  * @CH_WIDTH_5MHZ: 5 mhz width
403  * @CH_WIDTH_10MHZ: 10 mhz width
404  * @CH_WIDTH_INVALID: invalid width
405  * @CH_WIDTH_MAX: max possible width
406  */
407 enum phy_ch_width {
408 	CH_WIDTH_20MHZ = 0,
409 	CH_WIDTH_40MHZ,
410 	CH_WIDTH_80MHZ,
411 	CH_WIDTH_160MHZ,
412 	CH_WIDTH_80P80MHZ,
413 	CH_WIDTH_5MHZ,
414 	CH_WIDTH_10MHZ,
415 	CH_WIDTH_INVALID,
416 	CH_WIDTH_MAX
417 };
418 
419 /**
420  * enum wifi_traffic_ac - access category type
421  * @WIFI_AC_VO: Voice AC
422  * @WIFI_AC_VI: Video AC
423  * @WIFI_AC_BE: Best effort AC
424  * @WIFI_AC_BK: Background AC
425  * @WIFI_AC_MAX: MAX access category
426  */
427 enum wifi_traffic_ac {
428 	WIFI_AC_VO = 0,
429 	WIFI_AC_VI = 1,
430 	WIFI_AC_BE = 2,
431 	WIFI_AC_BK = 3,
432 	WIFI_AC_MAX = 4,
433 };
434 
435 /**
436  * enum wlan_peer_type  - peer type
437  * @WLAN_PEER_SELF:     for AP mode, SELF PEER or AP PEER are same
438  * @WLAN_PEER_AP:       BSS peer for STA mode, Self peer for AP mode
439  * @WLAN_PEER_P2P_GO:   BSS peer for P2P CLI mode, Self peer for P2P GO mode
440  * @WLAN_PEER_STA:      Self Peer for STA mode, STA peer for AP mode
441  * @WLAN_PEER_P2P_CLI:  Self peer for P2P CLI mode, P2P CLI peer for P2P GO mode
442  * @WLAN_PEER_TDLS:     TDLS Peer
443  * @WLAN_PEER_NAWDS:    NAWDS Peer
444  * @WLAN_PEER_STA_TEMP: STA Peer Temp (its host only node)
445  * @WLAN_PEER_IBSS:     IBSS Peer
446  * @WLAN_PEER_NDP:      NDP Peer
447  */
448 enum wlan_peer_type {
449 	WLAN_PEER_SELF     = 1,
450 	WLAN_PEER_AP       = 2,
451 	WLAN_PEER_P2P_GO   = 3,
452 	WLAN_PEER_STA      = 4,
453 	WLAN_PEER_P2P_CLI  = 5,
454 	WLAN_PEER_TDLS     = 6,
455 	WLAN_PEER_NAWDS    = 7,
456 	WLAN_PEER_STA_TEMP = 8,
457 	WLAN_PEER_IBSS     = 9,
458 	WLAN_PEER_NDP      = 10,
459 };
460 
461 /**
462  * enum wlan_band - specifies operating channel band
463  * @WLAN_BAND_ALL: Any band
464  * @WLAN_BAND_2_4_GHZ: 2.4 GHz band
465  * @WLAN_BAND_5_GHZ: 5 GHz band
466  * @WLAN_BAND_4_9_GHZ: 4.9 GHz band
467  * @WLAN_BAND_NUM_MAX: Max num band
468  */
469 enum wlan_band {
470 	WLAN_BAND_ALL,
471 	WLAN_BAND_2_4_GHZ,
472 	WLAN_BAND_5_GHZ,
473 	WLAN_BAND_4_9_GHZ,
474 	WLAN_BAND_NUM_MAX,
475 };
476 
477 /**
478  * enum wlan_bss_type - type of network
479  * @WLAN_TYPE_ANY: Default value
480  * @WLAN_TYPE_BSS: Type BSS
481  * @WLAN_TYPE_IBSS: Type IBSS
482  */
483 enum wlan_bss_type {
484 	WLAN_TYPE_ANY,
485 	WLAN_TYPE_BSS,
486 	WLAN_TYPE_IBSS,
487 };
488 
489 /**
490  * enum wlan_pmf_cap: pmf capability
491  * @PMF_DISABLED: PMF is disabled
492  * @PMF_CAPABLE: PMF is supported
493  * @PMF_REQUIRED: PMF is mandatory
494  */
495 enum wlan_pmf_cap {
496 	WLAN_PMF_DISABLED,
497 	WLAN_PMF_CAPABLE,
498 	WLAN_PMF_REQUIRED,
499 };
500 
501 /**
502  * enum wlan_auth_type - Enumeration of the various Auth types
503  * @WLAN_AUTH_TYPE_OPEN_SYSTEM: Open auth type
504  * @WLAN_AUTH_TYPE_SHARED_KEY: Shared Key Auth type
505  * @WLAN_AUTH_TYPE_AUTOSWITCH: Auto switch Open/Shared
506  * @WLAN_AUTH_TYPE_SAE: SAE auth type
507  * @WLAN_AUTH_TYPE_WPA: WPA Enterprise
508  * @WLAN_AUTH_TYPE_WPA_PSK: WPA PSK
509  * @WLAN_AUTH_TYPE_WPA_NONE: WPA None
510  * @WLAN_AUTH_TYPE_RSN: RSN Enterprise
511  * @WLAN_AUTH_TYPE_RSN_PSK: RSN PSK
512  * @WLAN_AUTH_TYPE_FT_RSN: FT RSN Enterprise
513  * @WLAN_AUTH_TYPE_FT_RSN_PSK: FT RSN PSK
514  * @WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE: WAPI certificate
515  * @WLAN_AUTH_TYPE_WAPI_WAI_PSK: WAPI PSK
516  * @WLAN_AUTH_TYPE_CCKM_WPA: CCKM WPA
517  * @WLAN_AUTH_TYPE_CCKM_RSN: CCKM RSN
518  * @WLAN_AUTH_TYPE_RSN_PSK_SHA256: SHA256 PSK
519  * @WLAN_AUTH_TYPE_RSN_8021X_SHA256: SHA256 Enterprise
520  * @WLAN_AUTH_TYPE_FILS_SHA256: FILS SHA256
521  * @WLAN_AUTH_TYPE_FILS_SHA384: FILS SHA384
522  * @WLAN_AUTH_TYPE_FT_FILS_SHA256: FILS SHA256 for 11r
523  * @WLAN_AUTH_TYPE_FT_FILS_SHA384: FILS SHA384 for 11r
524  * @WLAN_AUTH_TYPE_DPP_RSN: DPP RSN
525  * @WLAN_AUTH_TYPE_OWE: OWE
526  * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA256: EAP SHA256
527  * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA384: EAP SHA384
528  * @WLAN_AUTH_TYPE_FT_SAE: FT SAE
529  * @WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384: FT suiteb SHA384
530  * @WLAN_AUTH_TYPE_ANY: To match any auth type
531  * @WLAN_NUM_OF_SUPPORT_AUTH_TYPE: Max no of Auth type
532  */
533 enum wlan_auth_type {
534 	WLAN_AUTH_TYPE_OPEN_SYSTEM,
535 	WLAN_AUTH_TYPE_SHARED_KEY,
536 	WLAN_AUTH_TYPE_AUTOSWITCH,
537 	WLAN_AUTH_TYPE_SAE,
538 	WLAN_AUTH_TYPE_WPA,
539 	WLAN_AUTH_TYPE_WPA_PSK,
540 	WLAN_AUTH_TYPE_WPA_NONE,
541 	WLAN_AUTH_TYPE_RSN,
542 	WLAN_AUTH_TYPE_RSN_PSK,
543 	WLAN_AUTH_TYPE_FT_RSN,
544 	WLAN_AUTH_TYPE_FT_RSN_PSK,
545 	WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
546 	WLAN_AUTH_TYPE_WAPI_WAI_PSK,
547 	WLAN_AUTH_TYPE_CCKM_WPA,
548 	WLAN_AUTH_TYPE_CCKM_RSN,
549 	WLAN_AUTH_TYPE_RSN_PSK_SHA256,
550 	WLAN_AUTH_TYPE_RSN_8021X_SHA256,
551 	WLAN_AUTH_TYPE_FILS_SHA256,
552 	WLAN_AUTH_TYPE_FILS_SHA384,
553 	WLAN_AUTH_TYPE_FT_FILS_SHA256,
554 	WLAN_AUTH_TYPE_FT_FILS_SHA384,
555 	WLAN_AUTH_TYPE_DPP_RSN,
556 	WLAN_AUTH_TYPE_OWE,
557 	WLAN_AUTH_TYPE_SUITEB_EAP_SHA256,
558 	WLAN_AUTH_TYPE_SUITEB_EAP_SHA384,
559 	WLAN_AUTH_TYPE_OSEN,
560 	WLAN_AUTH_TYPE_FT_SAE,
561 	WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384,
562 	WLAN_AUTH_TYPE_ANY,
563 	WLAN_NUM_OF_SUPPORT_AUTH_TYPE = WLAN_AUTH_TYPE_ANY,
564 };
565 
566 /**
567  * enum wlan_enc_type - Enumeration of the various Enc types
568  * @WLAN_ENCRYPT_TYPE_NONE: No encryption
569  * @WLAN_ENCRYPT_TYPE_WEP40_STATICKEY: WEP 40 Static key
570  * @WLAN_ENCRYPT_TYPE_WEP104_STATICKEY: WEP 104 Static key
571  * @WLAN_ENCRYPT_TYPE_WEP40: WEP 40
572  * @WLAN_ENCRYPT_TYPE_WEP104: WEP 104
573  * @WLAN_ENCRYPT_TYPE_TKIP: TKIP
574  * @WLAN_ENCRYPT_TYPE_AES: AES
575  * @WLAN_ENCRYPT_TYPE_WPI: WAPI
576  * @WLAN_ENCRYPT_TYPE_KRK: KRK
577  * @WLAN_ENCRYPT_TYPE_BTK: BTK
578  * @WLAN_ENCRYPT_TYPE_AES_CMAC: 11W BIP
579  * @WLAN_ENCRYPT_TYPE_ANY: Any
580  * @WLAN_NUM_OF_ENCRYPT_TYPE: Max value
581  */
582 enum wlan_enc_type {
583 	WLAN_ENCRYPT_TYPE_NONE,
584 	WLAN_ENCRYPT_TYPE_WEP40_STATICKEY,
585 	WLAN_ENCRYPT_TYPE_WEP104_STATICKEY,
586 	WLAN_ENCRYPT_TYPE_WEP40,
587 	WLAN_ENCRYPT_TYPE_WEP104,
588 	WLAN_ENCRYPT_TYPE_TKIP,
589 	WLAN_ENCRYPT_TYPE_AES,
590 	WLAN_ENCRYPT_TYPE_WPI,
591 	WLAN_ENCRYPT_TYPE_KRK,
592 	WLAN_ENCRYPT_TYPE_BTK,
593 	WLAN_ENCRYPT_TYPE_AES_CMAC,
594 	WLAN_ENCRYPT_TYPE_AES_GCMP,
595 	WLAN_ENCRYPT_TYPE_AES_GCMP_256,
596 	WLAN_ENCRYPT_TYPE_ANY,
597 	WLAN_NUM_OF_ENCRYPT_TYPE = WLAN_ENCRYPT_TYPE_ANY,
598 };
599 
600 /**
601  * struct wlan_ssid - SSID info
602  * @length: ssid length of bss excluding null
603  * @ssid: ssid character array potentially non null terminated
604  */
605 struct wlan_ssid {
606 	uint8_t length;
607 	uint8_t ssid[WLAN_SSID_MAX_LEN];
608 };
609 
610 /* Util API to copy the MAC address */
611 #define WLAN_ADDR_COPY(dst, src)    qdf_mem_copy(dst, src, QDF_MAC_ADDR_SIZE)
612 /* Util API to compare the MAC address */
613 #define WLAN_ADDR_EQ(a1, a2)   qdf_mem_cmp(a1, a2, QDF_MAC_ADDR_SIZE)
614 
615 #define PSOC_SERVICE_BM_SIZE ((128 + sizeof(uint32_t) - 1) / sizeof(uint32_t))
616 #define PSOC_HOST_MAX_NUM_SS (8)
617 #define PSOC_HOST_MAX_PHY_SIZE (3)
618 #define PSOC_HOST_MAX_MAC_SIZE (2)
619 #define PSOC_MAX_HW_MODE (3)
620 #define PSOC_MAX_MAC_PHY_CAP (5)
621 #define PSOC_MAX_PHY_REG_CAP (3)
622 #define PSOC_MAX_CHAINMASK_TABLES (5)
623 
624 
625 #endif /* _WLAN_OBJMGR_CMN_H_*/
626