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