blob: 95b17016712258014061eb214d9b729bed28fd97 [file] [log] [blame]
Soumya Bhatbe6cc172016-12-30 14:42:58 +05301/*
Dustin Brown17f1e262019-02-04 16:48:14 -08002 * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
Soumya Bhatbe6cc172016-12-30 14:42:58 +05303 *
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
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +053025#include <qdf_types.h>
26
Soumya Bhatbe6cc172016-12-30 14:42:58 +053027/* Max no of UMAC components */
Sravan Kumar Kairam376e5f12018-03-07 15:56:21 +053028#define WLAN_UMAC_MAX_COMPONENTS WLAN_UMAC_COMP_ID_MAX
Dustin Brown17f1e262019-02-04 16:48:14 -080029
Soumya Bhatbe6cc172016-12-30 14:42:58 +053030/* Max no. of radios, a pSoc/Device can support */
Dustin Brown17f1e262019-02-04 16:48:14 -080031#ifdef WLAN_MAX_PDEVS
32#define WLAN_UMAC_MAX_PDEVS WLAN_MAX_PDEVS
33#else
Soumya Bhatbe6cc172016-12-30 14:42:58 +053034#define WLAN_UMAC_MAX_PDEVS 3
Dustin Brown17f1e262019-02-04 16:48:14 -080035#endif
36
Soumya Bhatbe6cc172016-12-30 14:42:58 +053037/* Max no. of VDEV per PSOC */
Dustin Brown17f1e262019-02-04 16:48:14 -080038#ifdef WLAN_PSOC_MAX_VDEVS
39#define WLAN_UMAC_PSOC_MAX_VDEVS WLAN_PSOC_MAX_VDEVS
40#else
Soumya Bhatbe6cc172016-12-30 14:42:58 +053041#define WLAN_UMAC_PSOC_MAX_VDEVS 51
Dustin Brown17f1e262019-02-04 16:48:14 -080042#endif
43
Soumya Bhatbe6cc172016-12-30 14:42:58 +053044/* Max no. of VDEVs, a PDEV can support */
Dustin Brown17f1e262019-02-04 16:48:14 -080045#ifdef WLAN_PDEV_MAX_VDEVS
46#define WLAN_UMAC_PDEV_MAX_VDEVS WLAN_PDEV_MAX_VDEVS
47#else
Soumya Bhatbe6cc172016-12-30 14:42:58 +053048#define WLAN_UMAC_PDEV_MAX_VDEVS 17
Dustin Brown17f1e262019-02-04 16:48:14 -080049#endif
50
Soumya Bhatbe6cc172016-12-30 14:42:58 +053051/* Max no. of Peers, a device can support */
Kiran Venkatappa7095e2e2018-05-01 20:53:43 +053052#define WLAN_UMAC_PSOC_MAX_PEERS (1024 + WLAN_UMAC_PSOC_MAX_VDEVS)
Dustin Brown17f1e262019-02-04 16:48:14 -080053
Vivekadbfaa72018-05-11 13:02:00 +053054/* Max no. of Temporary Peers, a pdev can support */
55#define WLAN_MAX_PDEV_TEMP_PEERS 128
Dustin Brown17f1e262019-02-04 16:48:14 -080056
Vivekadbfaa72018-05-11 13:02:00 +053057/* 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)
Soumya Bhatbe6cc172016-12-30 14:42:58 +053060
61/* Max length of a SSID */
62#define WLAN_SSID_MAX_LEN 32
63
Vivek979a3f32017-03-17 09:42:20 +053064/* Max sequence number */
Dustin Brown17f1e262019-02-04 16:48:14 -080065#define WLAN_MAX_SEQ_NUM 4096
Vivek979a3f32017-03-17 09:42:20 +053066
Soumya Bhatbe6cc172016-12-30 14:42:58 +053067/* Max no. of peers for STA vap */
68#define WLAN_UMAC_MAX_STA_PEERS 2
Dustin Brown17f1e262019-02-04 16:48:14 -080069
Selvaraj, Sridharafd3a5b2017-01-04 11:00:10 +053070/* Max vdev_id */
71#define WLAN_UMAC_VDEV_ID_MAX 0xFF
Soumya Bhatbe6cc172016-12-30 14:42:58 +053072
Sathish Kumar64cdfa82017-05-08 12:35:55 +053073/* Invalid pdev_id */
74#define WLAN_INVALID_PDEV_ID 0xFFFFFFFF
75
Vivek5747b782018-01-04 17:26:58 +053076/* Invalid free descriptor count */
77#define WLAN_INVALID_MGMT_DESC_COUNT 0xFFFFFFFF
78
79/* 802.11 cap info */
Soumya Bhatbe6cc172016-12-30 14:42:58 +053080#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
Srinivas Pitlac7f4e032018-01-08 16:59:16 +053097/* 25 msec */
Selvaraj, Sridharafd3a5b2017-01-04 11:00:10 +053098#define WLAN_VDEV_CREATE_TIMEOUT 25
Soumya Bhatbe6cc172016-12-30 14:42:58 +053099
100#define WLAN_PDEV_CREATE_TIMEOUT_CNT 300
Srinivas Pitlac7f4e032018-01-08 16:59:16 +0530101/* 25 msec */
Selvaraj, Sridharafd3a5b2017-01-04 11:00:10 +0530102#define WLAN_PDEV_CREATE_TIMEOUT 25
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530103
104#define WLAN_PSOC_CREATE_TIMEOUT_CNT 300
105/* 25 msec */
Selvaraj, Sridharafd3a5b2017-01-04 11:00:10 +0530106#define WLAN_PSOC_CREATE_TIMEOUT 25
Sandeep Puligilla7acd31f2017-02-25 16:35:35 -0800107#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)
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530119
Wu Gaodfc571c2017-03-22 13:18:15 +0800120#define WLAN_MAC_EID_VENDOR 221
Naveen Rawat8b1ec562017-09-01 17:01:01 -0700121#define WLAN_MAC_EID_EXT 255
Wu Gaodfc571c2017-03-22 13:18:15 +0800122
Srinivas Pitlac7f4e032018-01-08 16:59:16 +0530123/* 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
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530239/**
240 * enum wlan_umac_comp_id - UMAC component id
Abhijit Pradhan5ae2b3a2017-03-31 08:52:58 +0530241 * @WLAN_UMAC_COMP_MLME: MLME
242 * @WLAN_UMAC_COMP_MGMT_TXRX: MGMT Tx/Rx
Krunal Sonic4e35922017-02-01 14:59:01 -0800243 * @WLAN_UMAC_COMP_SERIALIZATION: Serialization
Abhijit Pradhan5ae2b3a2017-03-31 08:52:58 +0530244 * @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
Venkateswara Swamy Bandaru0b9f5ec2017-05-11 10:45:35 +0530254 * @WLAN_UMAC_COMP_SA_API: Smart Antenna API
Abhijit Pradhan5ae2b3a2017-03-31 08:52:58 +0530255 * @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
Edayilliam Jayadev642201f2017-04-05 14:29:18 +0530259 * @WLAN_UMAC_COMP_SPECTRAL: Spectral
Kiran Venkatappa34536742017-04-04 00:09:10 +0530260 * @WLAN_UMAC_COMP_OFFCHAN_TXRX: Offchan TxRx
Zhang Qian82377ce2018-01-04 12:15:29 +0800261 * @WLAN_UMAC_COMP_SON: SON
262 * @WLAN_UMAC_COMP_SPECTRAL: Spectral
Author: Neil Zhao5ad91c12017-05-15 14:25:05 -0700263 * @WLAN_UMAC_COMP_SPLITMAC: SplitMAC
Nachiket Kukade88ae8532017-12-15 12:36:58 +0530264 * @WLAN_UMAC_COMP_DISA: DISA encryption test
Himanshu Agarwalb3c81ac2018-01-10 14:21:53 +0530265 * @WLAN_UMAC_COMP_GREEN_AP: Green AP
akosigifffcebf2017-11-15 18:29:32 +0530266 * @WLAN_UMAC_COMP_FTM: FTM component
Subrat Mishrabf125872017-09-27 14:41:20 +0530267 * @WLAN_UMAC_COMP_FD: FILS Discovery
Zhang Qian82377ce2018-01-04 12:15:29 +0800268 * @WLAN_UMAC_COMP_OCB: OCB
Sravan Kumar Kairam376e5f12018-03-07 15:56:21 +0530269 * @WLAN_UMAC_COMP_IPA: IPA
Naga6d06baa2018-02-21 15:17:55 +0530270 * @WLAN_UMAC_COMP_CP_STATS: Control Plane Statistics
Rajeev Kumar Sirasanagandla66970852017-09-18 16:47:52 +0530271 * @WLAN_UMAC_COMP_ACTION_OUI: ACTION OUI
Sourav Mohapatra474c6142018-08-29 15:23:26 +0530272 * @WLAN_UMAC_COMP_FWOL FW Offload
akosigifffcebf2017-11-15 18:29:32 +0530273 * @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530274 *
275 * This id is static.
276 * On Adding new component, new id has to be assigned
277 */
278enum wlan_umac_comp_id {
Rajeev Kumar12395662018-05-31 16:49:00 -0700279 WLAN_UMAC_COMP_MLME = 0,
280 WLAN_UMAC_COMP_MGMT_TXRX = 1,
281 WLAN_UMAC_COMP_SERIALIZATION = 2,
282 WLAN_UMAC_COMP_SCAN = 3,
283 WLAN_UMAC_COMP_PMO = 4,
284 WLAN_UMAC_COMP_P2P = 5,
285 WLAN_UMAC_COMP_POLICY_MGR = 6,
286 WLAN_UMAC_COMP_CONFIG = 7,
287 WLAN_TARGET_IF_COMP_DIRECT_BUF_RX = 8,
288 WLAN_UMAC_COMP_WIFI_POS = 9,
289 WLAN_UMAC_COMP_TDLS = 10,
290 WLAN_UMAC_COMP_ATF = 11,
291 WLAN_UMAC_COMP_SA_API = 12,
292 WLAN_UMAC_COMP_REGULATORY = 13,
293 WLAN_UMAC_COMP_CRYPTO = 14,
294 WLAN_UMAC_COMP_NAN = 15,
295 WLAN_UMAC_COMP_DFS = 16,
296 WLAN_UMAC_COMP_OFFCHAN_TXRX = 17,
297 WLAN_UMAC_COMP_SON = 18,
298 WLAN_UMAC_COMP_SPECTRAL = 19,
299 WLAN_UMAC_COMP_SPLITMAC = 20,
300 WLAN_UMAC_COMP_DISA = 21,
301 WLAN_UMAC_COMP_GREEN_AP = 22,
302 WLAN_UMAC_COMP_FTM = 23,
303 WLAN_UMAC_COMP_FD = 24,
304 WLAN_UMAC_COMP_OCB = 25,
305 WLAN_UMAC_COMP_IPA = 26,
306 WLAN_UMAC_COMP_CP_STATS = 27,
Rajeev Kumar Sirasanagandla66970852017-09-18 16:47:52 +0530307 WLAN_UMAC_COMP_ACTION_OUI = 28,
Sourav Mohapatra474c6142018-08-29 15:23:26 +0530308 WLAN_UMAC_COMP_FWOL = 29,
Abhiram Jogadenub6923392019-02-12 13:54:42 +0530309 WLAN_UMAC_COMP_CFR = 30,
Krunal Sonic4e35922017-02-01 14:59:01 -0800310 WLAN_UMAC_COMP_ID_MAX,
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530311};
312
313/**
314 * enum WLAN_DEV_TYPE - for DA or OL architecture types
315 * @WLAN_DEV_DA: Direct attach
316 * @WLAN_DEV_OL: Partial offload
317 * @WLAN_DEV_INVALID: Invalid dev type
318 */
319typedef enum {
320 WLAN_DEV_DA = 0,
321 WLAN_DEV_OL = 1,
322 WLAN_DEV_INVALID = 3,
323} WLAN_DEV_TYPE;
324
325/**
326 * enum wlan_phymode - phy mode
327 * @WLAN_PHYMODE_AUTO: autoselect
328 * @WLAN_PHYMODE_11A: 5GHz, OFDM
329 * @WLAN_PHYMODE_11B: 2GHz, CCK
330 * @WLAN_PHYMODE_11G: 2GHz, OFDM
331 * @WLAN_PHYMODE_11NA_HT20: 5Ghz, HT20
332 * @WLAN_PHYMODE_11NG_HT20: 2Ghz, HT20
333 * @WLAN_PHYMODE_11NA_HT40PLUS: 5Ghz, HT40 (ext ch +1)
334 * @WLAN_PHYMODE_11NA_HT40MINUS: 5Ghz, HT40 (ext ch -1)
335 * @WLAN_PHYMODE_11NG_HT40PLUS: 2Ghz, HT40 (ext ch +1)
336 * @WLAN_PHYMODE_11NG_HT40MINUS: 2Ghz, HT40 (ext ch -1)
337 * @WLAN_PHYMODE_11NG_HT40: 2Ghz, Auto HT40
338 * @WLAN_PHYMODE_11NA_HT40: 5Ghz, Auto HT40
339 * @WLAN_PHYMODE_11AC_VHT20: 5Ghz, VHT20
340 * @WLAN_PHYMODE_11AC_VHT40PLUS: 5Ghz, VHT40 (Ext ch +1)
341 * @WLAN_PHYMODE_11AC_VHT40MINUS:5Ghz VHT40 (Ext ch -1)
342 * @WLAN_PHYMODE_11AC_VHT40: 5Ghz, VHT40
343 * @WLAN_PHYMODE_11AC_VHT80: 5Ghz, VHT80
344 * @WLAN_PHYMODE_11AC_VHT160: 5Ghz, VHT160
345 * @WLAN_PHYMODE_11AC_VHT80_80: 5Ghz, VHT80_80
Abhijit Pradhan33731942018-02-02 20:35:34 +0530346 * @WLAN_PHYMODE_11AXA_HE20: 5GHz, HE20
347 * @WLAN_PHYMODE_11AXG_HE20: 2GHz, HE20
348 * @WLAN_PHYMODE_11AXA_HE40PLUS: 5GHz, HE40 (ext ch +1)
349 * @WLAN_PHYMODE_11AXA_HE40MINUS:5GHz, HE40 (ext ch -1)
350 * @WLAN_PHYMODE_11AXG_HE40PLUS: 2GHz, HE40 (ext ch +1)
351 * @WLAN_PHYMODE_11AXG_HE40MINUS:2GHz, HE40 (ext ch -1)
352 * @WLAN_PHYMODE_11AXA_HE40: 5GHz, HE40
353 * @WLAN_PHYMODE_11AXG_HE40: 2GHz, HE40
354 * @WLAN_PHYMODE_11AXA_HE80: 5GHz, HE80
355 * @WLAN_PHYMODE_11AXA_HE160: 5GHz, HE160
356 * @WLAN_PHYMODE_11AXA_HE80_80: 5GHz, HE80_80
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530357 */
358enum wlan_phymode {
359 WLAN_PHYMODE_AUTO = 0,
360 WLAN_PHYMODE_11A = 1,
361 WLAN_PHYMODE_11B = 2,
362 WLAN_PHYMODE_11G = 3,
363 WLAN_PHYMODE_11NA_HT20 = 4,
364 WLAN_PHYMODE_11NG_HT20 = 5,
365 WLAN_PHYMODE_11NA_HT40PLUS = 6,
366 WLAN_PHYMODE_11NA_HT40MINUS = 7,
367 WLAN_PHYMODE_11NG_HT40PLUS = 8,
368 WLAN_PHYMODE_11NG_HT40MINUS = 9,
369 WLAN_PHYMODE_11NG_HT40 = 10,
370 WLAN_PHYMODE_11NA_HT40 = 11,
371 WLAN_PHYMODE_11AC_VHT20 = 12,
372 WLAN_PHYMODE_11AC_VHT40PLUS = 13,
373 WLAN_PHYMODE_11AC_VHT40MINUS = 14,
374 WLAN_PHYMODE_11AC_VHT40 = 15,
375 WLAN_PHYMODE_11AC_VHT80 = 16,
376 WLAN_PHYMODE_11AC_VHT160 = 17,
377 WLAN_PHYMODE_11AC_VHT80_80 = 18,
Abhijit Pradhan33731942018-02-02 20:35:34 +0530378 WLAN_PHYMODE_11AXA_HE20 = 19,
379 WLAN_PHYMODE_11AXG_HE20 = 20,
380 WLAN_PHYMODE_11AXA_HE40PLUS = 21,
381 WLAN_PHYMODE_11AXA_HE40MINUS = 22,
382 WLAN_PHYMODE_11AXG_HE40PLUS = 23,
383 WLAN_PHYMODE_11AXG_HE40MINUS = 24,
384 WLAN_PHYMODE_11AXA_HE40 = 25,
385 WLAN_PHYMODE_11AXG_HE40 = 26,
386 WLAN_PHYMODE_11AXA_HE80 = 27,
387 WLAN_PHYMODE_11AXA_HE160 = 28,
388 WLAN_PHYMODE_11AXA_HE80_80 = 29,
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530389};
390
Abhijit Pradhan33731942018-02-02 20:35:34 +0530391#define WLAN_PHYMODE_MAX (WLAN_PHYMODE_11AXA_HE80_80 + 1)
392
393/**
bings747b1762018-09-21 10:48:26 +0800394 * enum phy_ch_width - channel width
395 * @CH_WIDTH_20MHZ: 20 mhz width
396 * @CH_WIDTH_40MHZ: 40 mhz width
397 * @CH_WIDTH_80MHZ: 80 mhz width
398 * @CH_WIDTH_160MHZ: 160 mhz width
399 * @CH_WIDTH_80P80HZ: 80+80 mhz width
400 * @CH_WIDTH_5MHZ: 5 mhz width
401 * @CH_WIDTH_10MHZ: 10 mhz width
402 * @CH_WIDTH_INVALID: invalid width
403 * @CH_WIDTH_MAX: max possible width
Abhijit Pradhan33731942018-02-02 20:35:34 +0530404 */
bings747b1762018-09-21 10:48:26 +0800405enum phy_ch_width {
406 CH_WIDTH_20MHZ = 0,
407 CH_WIDTH_40MHZ,
408 CH_WIDTH_80MHZ,
409 CH_WIDTH_160MHZ,
410 CH_WIDTH_80P80MHZ,
411 CH_WIDTH_5MHZ,
412 CH_WIDTH_10MHZ,
413 CH_WIDTH_INVALID,
414 CH_WIDTH_MAX
Abhijit Pradhan33731942018-02-02 20:35:34 +0530415};
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530416
417/**
Frank Liuf54299e2017-05-17 14:03:37 +0800418 * enum wifi_traffic_ac - access category type
419 * @WIFI_AC_VO: Voice AC
420 * @WIFI_AC_VI: Video AC
421 * @WIFI_AC_BE: Best effort AC
422 * @WIFI_AC_BK: Background AC
423 * @WIFI_AC_MAX: MAX access category
424 */
425enum wifi_traffic_ac {
426 WIFI_AC_VO = 0,
427 WIFI_AC_VI = 1,
428 WIFI_AC_BE = 2,
429 WIFI_AC_BK = 3,
430 WIFI_AC_MAX = 4,
431};
432
433/**
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530434 * enum wlan_peer_type - peer type
435 * @WLAN_PEER_SELF: for AP mode, SELF PEER or AP PEER are same
436 * @WLAN_PEER_AP: BSS peer for STA mode, Self peer for AP mode
Rachit Kankane4475ff22017-04-19 11:49:18 +0530437 * @WLAN_PEER_P2P_GO: BSS peer for P2P CLI mode, Self peer for P2P GO mode
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530438 * @WLAN_PEER_STA: Self Peer for STA mode, STA peer for AP mode
Rachit Kankane4475ff22017-04-19 11:49:18 +0530439 * @WLAN_PEER_P2P_CLI: Self peer for P2P CLI mode, P2P CLI peer for P2P GO mode
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530440 * @WLAN_PEER_TDLS: TDLS Peer
441 * @WLAN_PEER_NAWDS: NAWDS Peer
442 * @WLAN_PEER_STA_TEMP: STA Peer Temp (its host only node)
Selvaraj, Sridharafd3a5b2017-01-04 11:00:10 +0530443 * @WLAN_PEER_IBSS: IBSS Peer
Naveen Rawat8aaf6f22017-11-02 17:04:46 -0700444 * @WLAN_PEER_NDP: NDP Peer
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530445 */
446enum wlan_peer_type {
447 WLAN_PEER_SELF = 1,
448 WLAN_PEER_AP = 2,
Rachit Kankane4475ff22017-04-19 11:49:18 +0530449 WLAN_PEER_P2P_GO = 3,
450 WLAN_PEER_STA = 4,
451 WLAN_PEER_P2P_CLI = 5,
452 WLAN_PEER_TDLS = 6,
453 WLAN_PEER_NAWDS = 7,
454 WLAN_PEER_STA_TEMP = 8,
455 WLAN_PEER_IBSS = 9,
Naveen Rawat8aaf6f22017-11-02 17:04:46 -0700456 WLAN_PEER_NDP = 10,
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530457};
458
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530459/**
460 * enum wlan_band - specifies operating channel band
461 * @WLAN_BAND_ALL: Any band
462 * @WLAN_BAND_2_4_GHZ: 2.4 GHz band
463 * @WLAN_BAND_5_GHZ: 5 GHz band
464 * @WLAN_BAND_4_9_GHZ: 4.9 GHz band
Srinivas Pitlabe8dac42018-06-14 16:05:03 +0530465 * @WLAN_BAND_NUM_MAX: Max num band
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530466 */
467enum wlan_band {
468 WLAN_BAND_ALL,
469 WLAN_BAND_2_4_GHZ,
470 WLAN_BAND_5_GHZ,
471 WLAN_BAND_4_9_GHZ,
Srinivas Pitlabe8dac42018-06-14 16:05:03 +0530472 WLAN_BAND_NUM_MAX,
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530473};
474
475/**
476 * enum wlan_bss_type - type of network
477 * @WLAN_TYPE_ANY: Default value
478 * @WLAN_TYPE_BSS: Type BSS
479 * @WLAN_TYPE_IBSS: Type IBSS
480 */
481enum wlan_bss_type {
482 WLAN_TYPE_ANY,
483 WLAN_TYPE_BSS,
484 WLAN_TYPE_IBSS,
485};
486
487/**
488 * enum wlan_pmf_cap: pmf capability
489 * @PMF_DISABLED: PMF is disabled
490 * @PMF_CAPABLE: PMF is supported
491 * @PMF_REQUIRED: PMF is mandatory
492 */
493enum wlan_pmf_cap {
494 WLAN_PMF_DISABLED,
495 WLAN_PMF_CAPABLE,
496 WLAN_PMF_REQUIRED,
497};
498
499/**
500 * enum wlan_auth_type - Enumeration of the various Auth types
501 * @WLAN_AUTH_TYPE_OPEN_SYSTEM: Open auth type
502 * @WLAN_AUTH_TYPE_SHARED_KEY: Shared Key Auth type
503 * @WLAN_AUTH_TYPE_AUTOSWITCH: Auto switch Open/Shared
Padma, Santhosh Kumar6f3e4a82017-09-21 19:14:42 +0530504 * @WLAN_AUTH_TYPE_SAE: SAE auth type
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530505 * @WLAN_AUTH_TYPE_WPA: WPA Enterprise
506 * @WLAN_AUTH_TYPE_WPA_PSK: WPA PSK
507 * @WLAN_AUTH_TYPE_WPA_NONE: WPA None
508 * @WLAN_AUTH_TYPE_RSN: RSN Enterprise
509 * @WLAN_AUTH_TYPE_RSN_PSK: RSN PSK
510 * @WLAN_AUTH_TYPE_FT_RSN: FT RSN Enterprise
511 * @WLAN_AUTH_TYPE_FT_RSN_PSK: FT RSN PSK
512 * @WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE: WAPI certificate
513 * @WLAN_AUTH_TYPE_WAPI_WAI_PSK: WAPI PSK
514 * @WLAN_AUTH_TYPE_CCKM_WPA: CCKM WPA
515 * @WLAN_AUTH_TYPE_CCKM_RSN: CCKM RSN
516 * @WLAN_AUTH_TYPE_RSN_PSK_SHA256: SHA256 PSK
517 * @WLAN_AUTH_TYPE_RSN_8021X_SHA256: SHA256 Enterprise
Vishwajith Upendrae098ebd2017-08-11 13:29:07 +0530518 * @WLAN_AUTH_TYPE_FILS_SHA256: FILS SHA256
519 * @WLAN_AUTH_TYPE_FILS_SHA384: FILS SHA384
520 * @WLAN_AUTH_TYPE_FT_FILS_SHA256: FILS SHA256 for 11r
521 * @WLAN_AUTH_TYPE_FT_FILS_SHA384: FILS SHA384 for 11r
Abhishek Singhdeeaf6e2018-02-26 15:18:16 +0530522 * @WLAN_AUTH_TYPE_DPP_RSN: DPP RSN
523 * @WLAN_AUTH_TYPE_OWE: OWE
524 * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA256: EAP SHA256
525 * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA384: EAP SHA384
Pragaspathi Thilagaraj17810df2019-02-18 17:42:21 +0530526 * @WLAN_AUTH_TYPE_FT_SAE: FT SAE
527 * @WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384: FT suiteb SHA384
Abhishek Singhdeeaf6e2018-02-26 15:18:16 +0530528 * @WLAN_AUTH_TYPE_ANY: To match any auth type
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530529 * @WLAN_NUM_OF_SUPPORT_AUTH_TYPE: Max no of Auth type
530 */
531enum wlan_auth_type {
532 WLAN_AUTH_TYPE_OPEN_SYSTEM,
533 WLAN_AUTH_TYPE_SHARED_KEY,
534 WLAN_AUTH_TYPE_AUTOSWITCH,
Padma, Santhosh Kumar6f3e4a82017-09-21 19:14:42 +0530535 WLAN_AUTH_TYPE_SAE,
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530536 WLAN_AUTH_TYPE_WPA,
537 WLAN_AUTH_TYPE_WPA_PSK,
538 WLAN_AUTH_TYPE_WPA_NONE,
539 WLAN_AUTH_TYPE_RSN,
540 WLAN_AUTH_TYPE_RSN_PSK,
541 WLAN_AUTH_TYPE_FT_RSN,
542 WLAN_AUTH_TYPE_FT_RSN_PSK,
543 WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
544 WLAN_AUTH_TYPE_WAPI_WAI_PSK,
545 WLAN_AUTH_TYPE_CCKM_WPA,
546 WLAN_AUTH_TYPE_CCKM_RSN,
547 WLAN_AUTH_TYPE_RSN_PSK_SHA256,
548 WLAN_AUTH_TYPE_RSN_8021X_SHA256,
Vishwajith Upendrae098ebd2017-08-11 13:29:07 +0530549 WLAN_AUTH_TYPE_FILS_SHA256,
550 WLAN_AUTH_TYPE_FILS_SHA384,
551 WLAN_AUTH_TYPE_FT_FILS_SHA256,
552 WLAN_AUTH_TYPE_FT_FILS_SHA384,
Abhishek Singha0f24212017-11-03 14:47:59 +0530553 WLAN_AUTH_TYPE_DPP_RSN,
Padma, Santhosh Kumarb5088bf2017-11-10 15:14:22 +0530554 WLAN_AUTH_TYPE_OWE,
Padma, Santhosh Kumarf379e372017-12-21 12:47:52 +0530555 WLAN_AUTH_TYPE_SUITEB_EAP_SHA256,
556 WLAN_AUTH_TYPE_SUITEB_EAP_SHA384,
Srinivas Dasari2f6d3682018-11-29 20:39:20 +0530557 WLAN_AUTH_TYPE_OSEN,
Pragaspathi Thilagaraj17810df2019-02-18 17:42:21 +0530558 WLAN_AUTH_TYPE_FT_SAE,
559 WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384,
Abhishek Singhdeeaf6e2018-02-26 15:18:16 +0530560 WLAN_AUTH_TYPE_ANY,
561 WLAN_NUM_OF_SUPPORT_AUTH_TYPE = WLAN_AUTH_TYPE_ANY,
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530562};
563
564/**
565 * enum wlan_enc_type - Enumeration of the various Enc types
566 * @WLAN_ENCRYPT_TYPE_NONE: No encryption
567 * @WLAN_ENCRYPT_TYPE_WEP40_STATICKEY: WEP 40 Static key
568 * @WLAN_ENCRYPT_TYPE_WEP104_STATICKEY: WEP 104 Static key
569 * @WLAN_ENCRYPT_TYPE_WEP40: WEP 40
570 * @WLAN_ENCRYPT_TYPE_WEP104: WEP 104
571 * @WLAN_ENCRYPT_TYPE_TKIP: TKIP
572 * @WLAN_ENCRYPT_TYPE_AES: AES
573 * @WLAN_ENCRYPT_TYPE_WPI: WAPI
574 * @WLAN_ENCRYPT_TYPE_KRK: KRK
575 * @WLAN_ENCRYPT_TYPE_BTK: BTK
576 * @WLAN_ENCRYPT_TYPE_AES_CMAC: 11W BIP
577 * @WLAN_ENCRYPT_TYPE_ANY: Any
578 * @WLAN_NUM_OF_ENCRYPT_TYPE: Max value
579 */
580enum wlan_enc_type {
581 WLAN_ENCRYPT_TYPE_NONE,
582 WLAN_ENCRYPT_TYPE_WEP40_STATICKEY,
583 WLAN_ENCRYPT_TYPE_WEP104_STATICKEY,
584 WLAN_ENCRYPT_TYPE_WEP40,
585 WLAN_ENCRYPT_TYPE_WEP104,
586 WLAN_ENCRYPT_TYPE_TKIP,
587 WLAN_ENCRYPT_TYPE_AES,
588 WLAN_ENCRYPT_TYPE_WPI,
589 WLAN_ENCRYPT_TYPE_KRK,
590 WLAN_ENCRYPT_TYPE_BTK,
591 WLAN_ENCRYPT_TYPE_AES_CMAC,
Mukul Sharmaa17d5ec2017-07-04 12:39:17 +0530592 WLAN_ENCRYPT_TYPE_AES_GCMP,
593 WLAN_ENCRYPT_TYPE_AES_GCMP_256,
Om Prakash Tripathi7e3f45d2016-12-28 16:58:54 +0530594 WLAN_ENCRYPT_TYPE_ANY,
595 WLAN_NUM_OF_ENCRYPT_TYPE = WLAN_ENCRYPT_TYPE_ANY,
596};
597
598/**
599 * struct wlan_ssid - SSID info
600 * @length: ssid length of bss excluding null
601 * @ssid: ssid character array potentially non null terminated
602 */
603struct wlan_ssid {
604 uint8_t length;
605 uint8_t ssid[WLAN_SSID_MAX_LEN];
606};
607
Dustin Brownfb652762018-01-26 17:21:57 -0800608/* depreciated; use QDF_MAC_ADDR_SIZE instead */
609#define WLAN_MACADDR_LEN QDF_MAC_ADDR_SIZE
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530610/* Util API to copy the MAC address */
Dustin Brownfb652762018-01-26 17:21:57 -0800611#define WLAN_ADDR_COPY(dst, src) qdf_mem_copy(dst, src, QDF_MAC_ADDR_SIZE)
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530612/* Util API to compare the MAC address */
Dustin Brownfb652762018-01-26 17:21:57 -0800613#define WLAN_ADDR_EQ(a1, a2) qdf_mem_cmp(a1, a2, QDF_MAC_ADDR_SIZE)
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530614
Srinivas Pitlac7f4e032018-01-08 16:59:16 +0530615#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)
Gyanranjan Hazarika3dff2952018-08-17 01:54:48 -0700618#define PSOC_HOST_MAX_MAC_SIZE (2)
Liangwei Donga903e932018-06-19 22:37:36 -0400619#define PSOC_MAX_HW_MODE (3)
Srinivas Pitlac7f4e032018-01-08 16:59:16 +0530620#define PSOC_MAX_MAC_PHY_CAP (5)
621#define PSOC_MAX_PHY_REG_CAP (3)
622#define PSOC_MAX_CHAINMASK_TABLES (5)
623
624
Soumya Bhatbe6cc172016-12-30 14:42:58 +0530625#endif /* _WLAN_OBJMGR_CMN_H_*/