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