blob: 02c94d23ec483039e171f01db834d30bbf38e331 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhinav Kumar487e49e2019-07-22 14:46:18 +05302 * Copyright (c) 2011-2016, 2017, 2019 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam842dad02014-02-18 18:44:02 -080026 */
27
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031/*
Jeff Johnson295189b2012-06-20 16:38:30 -070032 * This file sirMacProtDef.h contains the MAC/PHY protocol
33 * definitions used across various projects.
34 * Author: Chandra Modumudi
35 * Date: 02/27/02
36 * History:-
37 * Date Modified by Modification Information
38 * --------------------------------------------------------------------
39 *
40 */
41#ifndef __MAC_PROT_DEFS_H
42#define __MAC_PROT_DEFS_H
43
44#include "palTypes.h"
45#include "sirTypes.h"
Satyanarayana Dash6f438272015-03-03 18:01:06 +053046#include "wniCfg.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070047#include "aniCompiler.h"
48
49
50///Capability information related
51#define CAPABILITY_INFO_DELAYED_BA_BIT 14
52#define CAPABILITY_INFO_IMMEDIATE_BA_BIT 15
53
54/// 11d MAC defaults
55#define SIR_11B_CHANNEL_ID_BEGIN 1
56#define SIR_TOTAL_NUM_11B_CHANNELS 14
57#define SIR_11B_DEFAULT_MAX_TRANSMIT_POWER 20
58#define SIR_11A_CHANNEL_ID_BEGIN 240
59#define SIR_TOTAL_NUM_11A_CHANNELS 34
60#define SIR_11A_DEFAULT_MAX_TRANSMIT_POWER 16
61
62/// 11h MAC defaults
63#define SIR_11A_CHANNEL_BEGIN 34
64#define SIR_11A_CHANNEL_END 165
65#define SIR_11B_CHANNEL_BEGIN 1
66#define SIR_11B_CHANNEL_END 14
67#define SIR_11A_FREQUENCY_OFFSET 4
68#define SIR_11B_FREQUENCY_OFFSET 1
69
70
71#define PRIM_DEVICE_LEN (8)
72
73/// Maximum fragment size
74#define SIR_MAC_MAX_FRAG_SIZE 2398
75
76// maximum 802.11 PDU size
77#define SIR_MAC_MAX_PDU_SIZE 2346
78
79/// Length of the Frame Check Sum field at the end of every MAC frame
80#define SIR_MAC_FCS_LENGTH 4
81
82// Sizes of control frames
83#define SIR_MAC_ACK_SIZE 14
84#define SIR_MAC_CTS_SIZE 14
85#define SIR_MAC_RTS_SIZE 20
86#define SIR_MAC_BRQ_SIZE 24
87#define SIR_MAC_BACK_SIZE 26
88
89/// Current version of 802.11
90#define SIR_MAC_PROTOCOL_VERSION 0
91
92// Frame Type definitions
93
94#define SIR_MAC_MGMT_FRAME 0x0
95#define SIR_MAC_CTRL_FRAME 0x1
96#define SIR_MAC_DATA_FRAME 0x2
97
98#define SIR_MAC_FRAME_TYPE_START 0x0
99#define SIR_MAC_FRAME_TYPE_END 0x3
100
101// Control frame subtype definitions
102
103#define SIR_MAC_CTRL_RR 4
104#define SIR_MAC_CTRL_BAR 8
105#define SIR_MAC_CTRL_BA 9
106#define SIR_MAC_CTRL_PS_POLL 10
107#define SIR_MAC_CTRL_RTS 11
108#define SIR_MAC_CTRL_CTS 12
109#define SIR_MAC_CTRL_ACK 13
110#define SIR_MAC_CTRL_CF_END 14
111#define SIR_MAC_CTRL_CF_END_ACK 15
112
113#define GEN4_SCAN 1
114#ifdef GEN4_SCAN
115#define SIR_MAC_MAX_DURATION_MICRO_SECONDS 32767
116#endif // GEN4_SCAN
117
118// Data frame subtype definitions
119#define SIR_MAC_DATA_DATA 0
120#define SIR_MAC_DATA_DATA_ACK 1
121#define SIR_MAC_DATA_DATA_POLL 2
122#define SIR_MAC_DATA_DATA_ACK_POLL 3
123#define SIR_MAC_DATA_NULL 4
124#define SIR_MAC_DATA_NULL_ACK 5
125#define SIR_MAC_DATA_NULL_POLL 6
126#define SIR_MAC_DATA_NULL_ACK_POLL 7
127#define SIR_MAC_DATA_QOS_DATA 8
128#define SIR_MAC_DATA_QOS_DATA_ACK 9
129#define SIR_MAC_DATA_QOS_DATA_POLL 10
130#define SIR_MAC_DATA_QOS_DATA_ACK_POLL 11
131#define SIR_MAC_DATA_QOS_NULL 12
132#define SIR_MAC_DATA_QOS_NULL_ACK 13
133#define SIR_MAC_DATA_QOS_NULL_POLL 14
134#define SIR_MAC_DATA_QOS_NULL_ACK_POLL 15
135
136#define SIR_MAC_FRAME_SUBTYPE_START 0
137#define SIR_MAC_FRAME_SUBTYPE_END 16
138
139#define SIR_MAC_DATA_QOS_MASK 8
140#define SIR_MAC_DATA_NULL_MASK 4
141#define SIR_MAC_DATA_POLL_MASK 2
142#define SIR_MAC_DATA_ACK_MASK 1
143
144// Management frame subtype definitions
145
146#define SIR_MAC_MGMT_ASSOC_REQ 0x0
147#define SIR_MAC_MGMT_ASSOC_RSP 0x1
148#define SIR_MAC_MGMT_REASSOC_REQ 0x2
149#define SIR_MAC_MGMT_REASSOC_RSP 0x3
150#define SIR_MAC_MGMT_PROBE_REQ 0x4
151#define SIR_MAC_MGMT_PROBE_RSP 0x5
152#define SIR_MAC_MGMT_BEACON 0x8
153#define SIR_MAC_MGMT_ATIM 0x9
154#define SIR_MAC_MGMT_DISASSOC 0xA
155#define SIR_MAC_MGMT_AUTH 0xB
156#define SIR_MAC_MGMT_DEAUTH 0xC
157#define SIR_MAC_MGMT_ACTION 0xD
158#define SIR_MAC_MGMT_RESERVED15 0xF
159
160// Action frame categories
161
162#define SIR_MAC_ACTION_SPECTRUM_MGMT 0
163#define SIR_MAC_ACTION_QOS_MGMT 1
164#define SIR_MAC_ACTION_DLP 2
165#define SIR_MAC_ACTION_BLKACK 3
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800166#define SIR_MAC_ACTION_PUBLIC_USAGE 4
Jeff Johnson295189b2012-06-20 16:38:30 -0700167#define SIR_MAC_ACTION_RRM 5
Daram Sudha1f7e0e92013-12-17 07:52:31 +0530168#define SIR_MAC_ACTION_FAST_BSS_TRNST 6
Jeff Johnson295189b2012-06-20 16:38:30 -0700169#define SIR_MAC_ACTION_HT 7
Daram Sudha1f7e0e92013-12-17 07:52:31 +0530170#define SIR_MAC_ACTION_SA_QUERY 8
171#define SIR_MAC_ACTION_PROT_DUAL_PUB 9
172#define SIR_MAC_ACTION_WNM 10
173#define SIR_MAC_ACTION_UNPROT_WNM 11
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800174#define SIR_MAC_ACTION_TDLS 12
Daram Sudha1f7e0e92013-12-17 07:52:31 +0530175#define SIR_MAC_ACITON_MESH 13
Abhishek Singh09d4e4a2016-01-12 11:20:22 +0530176#define SIR_MAC_ACTION_MHF 14
Daram Sudha1f7e0e92013-12-17 07:52:31 +0530177#define SIR_MAC_SELF_PROTECTED 15
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800178#define SIR_MAC_ACTION_WME 17
Abhishek Singh09d4e4a2016-01-12 11:20:22 +0530179#define SIR_MAC_ACTION_FST 18
Mohit Khanna4a70d262012-09-11 16:30:12 -0700180#define SIR_MAC_ACTION_VHT 21
Daram Sudha1f7e0e92013-12-17 07:52:31 +0530181
Abhishek Singh888420b2016-01-06 12:28:03 +0530182#define SIR_MAC_ACTION_TX 1
183#define SIR_MAC_ACTION_RX 2
Jeff Johnson295189b2012-06-20 16:38:30 -0700184// QoS management action codes
185
186#define SIR_MAC_QOS_ADD_TS_REQ 0
187#define SIR_MAC_QOS_ADD_TS_RSP 1
188#define SIR_MAC_QOS_DEL_TS_REQ 2
189#define SIR_MAC_QOS_SCHEDULE 3
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -0700190#define SIR_MAC_QOS_MAP_CONFIGURE 4
Jeff Johnson295189b2012-06-20 16:38:30 -0700191// and these are proprietary
192#define SIR_MAC_QOS_DEF_BA_REQ 4
193#define SIR_MAC_QOS_DEF_BA_RSP 5
194#define SIR_MAC_QOS_DEL_BA_REQ 6
195#define SIR_MAC_QOS_DEL_BA_RSP 7
196
197#ifdef ANI_SUPPORT_11H
198// Spectrum management action codes
199#define SIR_MAC_ACTION_MEASURE_REQUEST_ID 0
200#define SIR_MAC_ACTION_MEASURE_REPORT_ID 1
201#define SIR_MAC_ACTION_TPC_REQUEST_ID 2
202#define SIR_MAC_ACTION_TPC_REPORT_ID 3
203#endif //ANI_SUPPORT_11H
204#define SIR_MAC_ACTION_CHANNEL_SWITCH_ID 4
205
206
207#ifdef ANI_SUPPORT_11H
208// Measurement Request/Report Type
209#define SIR_MAC_BASIC_MEASUREMENT_TYPE 0
210#define SIR_MAC_CCA_MEASUREMENT_TYPE 1
211#define SIR_MAC_RPI_MEASUREMENT_TYPE 2
212#endif //ANI_SUPPORT_11H
213
214//RRM related.
215//Refer IEEE Std 802.11k-2008, Section 7.3.2.21, table 7.29
216#if defined WLAN_FEATURE_VOWIFI
217
218#define SIR_MAC_RRM_CHANNEL_LOAD_TYPE 3
219#define SIR_MAC_RRM_NOISE_HISTOGRAM_BEACON 4
220#define SIR_MAC_RRM_BEACON_TYPE 5
221#define SIR_MAC_RRM_FRAME_TYPE 6
222#define SIR_MAC_RRM_STA_STATISTICS_TYPE 7
223#define SIR_MAC_RRM_LCI_TYPE 8
224#define SIR_MAC_RRM_TSM_TYPE 9
225
226//RRM action codes
227#define SIR_MAC_RRM_RADIO_MEASURE_REQ 0
228#define SIR_MAC_RRM_RADIO_MEASURE_RPT 1
229#define SIR_MAC_RRM_LINK_MEASUREMENT_REQ 2
230#define SIR_MAC_RRM_LINK_MEASUREMENT_RPT 3
231#define SIR_MAC_RRM_NEIGHBOR_REQ 4
232#define SIR_MAC_RRM_NEIGHBOR_RPT 5
233
234#endif
235
Mohit Khanna4a70d262012-09-11 16:30:12 -0700236//VHT Action Field
237#ifdef WLAN_FEATURE_11AC
238#define SIR_MAC_VHT_OPMODE_NOTIFICATION 2
239#endif
240
Jeff Johnson295189b2012-06-20 16:38:30 -0700241// HT Action Field Codes
242#define SIR_MAC_SM_POWER_SAVE 1
243
244// DLP action frame types
245#define SIR_MAC_DLP_REQ 0
246#define SIR_MAC_DLP_RSP 1
247#define SIR_MAC_DLP_TEARDOWN 2
248
249// block acknowledgement action frame types
250#define SIR_MAC_BLKACK_ADD_REQ 0
251#define SIR_MAC_BLKACK_ADD_RSP 1
252#define SIR_MAC_BLKACK_DEL 2
Jeff Johnson295189b2012-06-20 16:38:30 -0700253#define SIR_MAC_ACTION_VENDOR_SPECIFIC 9
254#define SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY 0x7F
255#define SIR_MAC_ACTION_P2P_SUBTYPE_PRESENCE_RSP 2
Jeff Johnson295189b2012-06-20 16:38:30 -0700256
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -0800257// Public Action for 20/40 BSS Coexistence
258#ifdef WLAN_FEATURE_AP_HT40_24G
259#define SIR_MAC_ACTION_2040_BSS_COEXISTENCE 0
260#endif
Abhishek Singh2b0cf1c2017-10-30 17:36:38 +0530261#define SIR_MAC_ACTION_EXT_CHANNEL_SWITCH_ID 4
262
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -0800263
264
Jeff Johnson295189b2012-06-20 16:38:30 -0700265#ifdef WLAN_FEATURE_11W
266//11w SA query request/response action frame category code
Chet Lanctot186b5732013-03-18 10:26:30 -0700267#define SIR_MAC_SA_QUERY_REQ 0
268#define SIR_MAC_SA_QUERY_RSP 1
Jeff Johnson295189b2012-06-20 16:38:30 -0700269#endif
270
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800271#ifdef FEATURE_WLAN_TDLS
272#define SIR_MAC_TDLS_SETUP_REQ 0
273#define SIR_MAC_TDLS_SETUP_RSP 1
274#define SIR_MAC_TDLS_SETUP_CNF 2
275#define SIR_MAC_TDLS_TEARDOWN 3
276#define SIR_MAC_TDLS_PEER_TRAFFIC_IND 4
277#define SIR_MAC_TDLS_CH_SWITCH_REQ 5
278#define SIR_MAC_TDLS_CH_SWITCH_RSP 6
279#define SIR_MAC_TDLS_PEER_TRAFFIC_RSP 9
280#define SIR_MAC_TDLS_DIS_REQ 10
281#define SIR_MAC_TDLS_DIS_RSP 14
282#endif
283
Leela Venkata Kiran Kumar Reddy Chiralae8e62c82013-10-29 18:23:26 -0700284/* WNM Action field values; IEEE Std 802.11-2012, 8.5.14.1, Table 8-250 */
285#define SIR_MAC_WNM_BSS_TM_QUERY 6
286#define SIR_MAC_WNM_BSS_TM_REQUEST 7
287#define SIR_MAC_WNM_BSS_TM_RESPONSE 8
288#define SIR_MAC_WNM_NOTIF_REQUEST 26
289#define SIR_MAC_WNM_NOTIF_RESPONSE 27
290
Jeff Johnson295189b2012-06-20 16:38:30 -0700291#define SIR_MAC_MAX_RANDOM_LENGTH 2306
292
293//-----------------------------------------------------------------------------
294// EID (Element ID) definitions
295// and their min/max lengths
296//-----------------------------------------------------------------------------
297
298#define SIR_MAC_SSID_EID 0
299#define SIR_MAC_SSID_EID_MIN 0
300#define SIR_MAC_SSID_EID_MAX 32
301#define SIR_MAC_RATESET_EID 1
302#define SIR_MAC_RATESET_EID_MIN 1
303#define SIR_MAC_RATESET_EID_MAX 12
304#define SIR_MAC_FH_PARAM_SET_EID 2
305#define SIR_MAC_FH_PARAM_SET_EID_MIN 5
306#define SIR_MAC_FH_PARAM_SET_EID_MAX 5
307#define SIR_MAC_DS_PARAM_SET_EID 3
308#define SIR_MAC_DS_PARAM_SET_EID_MIN 1
309#define SIR_MAC_DS_PARAM_SET_EID_MAX 1
310#define SIR_MAC_CF_PARAM_SET_EID 4
311#define SIR_MAC_CF_PARAM_SET_EID_MIN 6
312#define SIR_MAC_CF_PARAM_SET_EID_MAX 6
313#define SIR_MAC_TIM_EID 5
314#define SIR_MAC_TIM_EID_MIN 3
315#define SIR_MAC_TIM_EID_MAX 254
316#define SIR_MAC_IBSS_PARAM_SET_EID 6
317#define SIR_MAC_IBSS_PARAM_SET_EID_MIN 2
318#define SIR_MAC_IBSS_PARAM_SET_EID_MAX 2
319#define SIR_MAC_COUNTRY_EID 7
320#define SIR_MAC_COUNTRY_EID_MIN 6
321#define SIR_MAC_COUNTRY_EID_MAX 254
322#define SIR_MAC_FH_PARAMS_EID 8
323#define SIR_MAC_FH_PARAMS_EID_MIN 4
324#define SIR_MAC_FH_PARAMS_EID_MAX 4
325#define SIR_MAC_FH_PATTERN_EID 9
326#define SIR_MAC_FH_PATTERN_EID_MIN 4
327#define SIR_MAC_FH_PATTERN_EID_MAX 254
328#define SIR_MAC_REQUEST_EID 10
329#define SIR_MAC_REQUEST_EID_MIN 1
330#define SIR_MAC_REQUEST_EID_MAX 255
331#define SIR_MAC_QBSS_LOAD_EID 11
332#define SIR_MAC_QBSS_LOAD_EID_MIN 5
333#define SIR_MAC_QBSS_LOAD_EID_MAX 5
334#define SIR_MAC_EDCA_PARAM_SET_EID 12 // EDCA parameter set
335#define SIR_MAC_EDCA_PARAM_SET_EID_MIN 18
336#define SIR_MAC_EDCA_PARAM_SET_EID_MAX 20 // TBD temp - change backto 18
337#define SIR_MAC_TSPEC_EID 13
338#define SIR_MAC_TSPEC_EID_MIN 55
339#define SIR_MAC_TSPEC_EID_MAX 55
340#define SIR_MAC_TCLAS_EID 14
341#define SIR_MAC_TCLAS_EID_MIN 4
342#define SIR_MAC_TCLAS_EID_MAX 255
343#define SIR_MAC_QOS_SCHEDULE_EID 15
344#define SIR_MAC_QOS_SCHEDULE_EID_MIN 14
345#define SIR_MAC_QOS_SCHEDULE_EID_MAX 14
346#define SIR_MAC_CHALLENGE_TEXT_EID 16
347#define SIR_MAC_CHALLENGE_TEXT_EID_MIN 1
348#define SIR_MAC_CHALLENGE_TEXT_EID_MAX 253
349// reserved 17-31
350#define SIR_MAC_PWR_CONSTRAINT_EID 32
351#define SIR_MAC_PWR_CONSTRAINT_EID_MIN 1
352#define SIR_MAC_PWR_CONSTRAINT_EID_MAX 1
353#define SIR_MAC_PWR_CAPABILITY_EID 33
354#define SIR_MAC_PWR_CAPABILITY_EID_MIN 2
355#define SIR_MAC_PWR_CAPABILITY_EID_MAX 2
356#define SIR_MAC_TPC_REQ_EID 34
357#define SIR_MAC_TPC_REQ_EID_MIN 0
358#define SIR_MAC_TPC_REQ_EID_MAX 255
359// SIR_MAC_EXTENDED_CAP_EID 35
360#define SIR_MAC_TPC_RPT_EID 35
361#define SIR_MAC_TPC_RPT_EID_MIN 2
362#define SIR_MAC_TPC_RPT_EID_MAX 2
363#define SIR_MAC_SPRTD_CHNLS_EID 36
364#define SIR_MAC_SPRTD_CHNLS_EID_MIN 2
365#define SIR_MAC_SPRTD_CHNLS_EID_MAX 254
366#define SIR_MAC_CHNL_SWITCH_ANN_EID 37
367#define SIR_MAC_CHNL_SWITCH_ANN_EID_MIN 3
368#define SIR_MAC_CHNL_SWITCH_ANN_EID_MAX 3
369#define SIR_MAC_MEAS_REQ_EID 38
370#define SIR_MAC_MEAS_REQ_EID_MIN 3
371#define SIR_MAC_MEAS_REQ_EID_MAX 255
372#define SIR_MAC_MEAS_RPT_EID 39
373#define SIR_MAC_MEAS_RPT_EID_MIN 3
374#define SIR_MAC_MEAS_RPT_EID_MAX 255
375#define SIR_MAC_QUIET_EID 40
376#define SIR_MAC_QUIET_EID_MIN 6
377#define SIR_MAC_QUIET_EID_MAX 6
378#define SIR_MAC_IBSS_DFS_EID 41
379#define SIR_MAC_IBSS_DFS_EID_MIN 7
380#define SIR_MAC_IBSS_DFS_EID_MAX 255
381#define SIR_MAC_ERP_INFO_EID 42
382#define SIR_MAC_ERP_INFO_EID_MIN 0
383#define SIR_MAC_ERP_INFO_EID_MAX 255
384#define SIR_MAC_TS_DELAY_EID 43
385#define SIR_MAC_TS_DELAY_EID_MIN 4
386#define SIR_MAC_TS_DELAY_EID_MAX 4
387#define SIR_MAC_TCLAS_PROC_EID 44
388#define SIR_MAC_TCLAS_PROC_EID_MIN 1
389#define SIR_MAC_TCLAS_PROC_EID_MAX 1
390#define SIR_MAC_QOS_CAPABILITY_EID 46
391#define SIR_MAC_QOS_CAPABILITY_EID_MIN 1
392#define SIR_MAC_QOS_CAPABILITY_EID_MAX 1
393#define SIR_MAC_RSN_EID 48
394#define SIR_MAC_RSN_EID_MIN 4
395#define SIR_MAC_RSN_EID_MAX 254
396
Abhishek Singh02605092017-10-25 14:06:12 +0530397#define SIR_MAC_EXT_CHNL_SWITCH_ANN_EID 60
398#define SIR_MAC_WIDER_BW_CHANNEL_SWITCH_ANN 194
399
400
Jeff Johnson295189b2012-06-20 16:38:30 -0700401//using reserved EID for Qos Action IE for now,
402//need to check 11e spec for the actual EID
403#define SIR_MAC_QOS_ACTION_EID 49
404#define SIR_MAC_QOS_ACTION_EID_MIN 4
405#define SIR_MAC_QOS_ACTION_EID_MAX 255
406#define SIR_MAC_EXTENDED_RATE_EID 50
407#define SIR_MAC_EXTENDED_RATE_EID_MIN 0
408#define SIR_MAC_EXTENDED_RATE_EID_MAX 255
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800409// reserved 51-69
410#define SIR_MAC_RM_ENABLED_CAPABILITY_EID 70
411#define SIR_MAC_RM_ENABLED_CAPABILITY_EID_MIN 5
412#define SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX 5
413// reserved 71-220
Jeff Johnson295189b2012-06-20 16:38:30 -0700414#define SIR_MAC_WPA_EID 221
415#define SIR_MAC_WPA_EID_MIN 0
416#define SIR_MAC_WPA_EID_MAX 255
417
418#define SIR_MAC_EID_VENDOR 221
419
420// reserved 222-254
421#define SIR_MAC_HT_CAPABILITIES_EID 45
422#define SIR_MAC_HT_CAPABILITIES_EID_MIN 0
423#define SIR_MAC_HT_CAPABILITIES_EID_MAX 255
424#define SIR_MAC_HT_INFO_EID 61
425#define SIR_MAC_HT_INFO_EID_MIN 0
426#define SIR_MAC_HT_INFO_EID_MAX 255
Sandeep Puligilla11d49a62014-01-30 12:05:16 +0530427#define SIR_MAC_OBSS_SCAN_PARAMETERS_EID 74
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +0530428#define SIR_MAC_EXTENDED_CAPABILITIES_EID 127
Jeff Johnson295189b2012-06-20 16:38:30 -0700429
Jeff Johnsone7245742012-09-05 17:12:55 -0700430#ifdef WLAN_FEATURE_11AC
431#define SIR_MAC_VHT_CAPABILITIES_EID 191
432#define SIR_MAC_VHT_OPERATION_EID 192
433#define SIR_MAC_VHT_EXT_BSS_LOAD_EID 193
Mohit Khanna4a70d262012-09-11 16:30:12 -0700434#define SIR_MAC_VHT_OPMODE_EID 199
Jeff Johnsone7245742012-09-05 17:12:55 -0700435#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700436#define SIR_MAC_MAX_SUPPORTED_MCS_SET 16
437
438/// Workaround IE to change beacon length when it is 4*n+1
439#define SIR_MAC_ANI_WORKAROUND_EID 255
440#define SIR_MAC_ANI_WORKAROUND_EID_MIN 0
441#define SIR_MAC_ANI_WORKAROUND_EID_MAX 255
442
Ganesh Kondabattini7500fb32015-04-10 14:50:32 +0530443#define SIR_MAC_MAX_ADD_IE_LENGTH 500
Jeff Johnson295189b2012-06-20 16:38:30 -0700444/// Maximum length of each IE
445#define SIR_MAC_MAX_IE_LENGTH 255
446
447/// Maximum length of each IE
448#define SIR_MAC_RSN_IE_MAX_LENGTH 255
449#define SIR_MAC_WPA_IE_MAX_LENGTH 255
450/// Minimum length of each IE
451#define SIR_MAC_RSN_IE_MIN_LENGTH 2
452#define SIR_MAC_WPA_IE_MIN_LENGTH 6
453
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800454#ifdef FEATURE_WLAN_ESE
455#define ESE_VERSION_4 4
456#define ESE_VERSION_SUPPORTED ESE_VERSION_4
Jeff Johnson295189b2012-06-20 16:38:30 -0700457
458// When station sends Radio Management Cap.
459// State should be normal=1
460// Mbssid Mask should be 0
461#define RM_STATE_NORMAL 1
462#endif
463
464#define SIR_MAC_OUI_VERSION_1 1
465
Abhinav Kumar487e49e2019-07-22 14:46:18 +0530466/* OWE DH Parameter element https://tools.ietf.org/html/rfc8110 */
467#define SIR_DH_PARAMETER_ELEMENT_EXT_EID 32
468
Jeff Johnson295189b2012-06-20 16:38:30 -0700469// OUI and type definition for WPA IE in network byte order
470#define SIR_MAC_WPA_OUI 0x01F25000
Rashmi Ramanna3ec0dee2014-06-27 21:21:41 +0530471#define SIR_MAC_WME_OUI 0x02F25000
472#define SIR_MAC_WSM_OUI SIR_MAC_WME_OUI
Jeff Johnson295189b2012-06-20 16:38:30 -0700473#define SIR_MAC_WSC_OUI "\x00\x50\xf2\x04"
474#define SIR_MAC_WSC_OUI_SIZE 4
Jeff Johnson295189b2012-06-20 16:38:30 -0700475#define SIR_MAC_P2P_OUI "\x50\x6f\x9a\x09"
476#define SIR_MAC_P2P_OUI_SIZE 4
477#define SIR_P2P_NOA_ATTR 12
478#define SIR_MAX_NOA_ATTR_LEN 31
479#define SIR_MAX_NOA_DESCR 2
480#define SIR_P2P_IE_HEADER_LEN 6
Jeff Johnson295189b2012-06-20 16:38:30 -0700481
Agarwal Ashish87039eb2014-01-15 14:13:15 +0530482#define SIR_MAC_CISCO_OUI "\x00\x40\x96"
483#define SIR_MAC_CISCO_OUI_SIZE 3
484
Jeff Johnson295189b2012-06-20 16:38:30 -0700485// min size of wme oui header: oui(3) + type + subtype + version
486#define SIR_MAC_OUI_WME_HDR_MIN 6
487
488// OUI subtype and their lengths
489#define SIR_MAC_OUI_SUBTYPE_WME_INFO 0
490#define SIR_MAC_OUI_WME_INFO_MIN 7
491#define SIR_MAC_OUI_WME_INFO_MAX 7
492
493#define SIR_MAC_OUI_SUBTYPE_WME_PARAM 1
494#define SIR_MAC_OUI_WME_PARAM_MIN 24
495#define SIR_MAC_OUI_WME_PARAM_MAX 24
496
497#define SIR_MAC_OUI_SUBTYPE_WME_TSPEC 2
498#define SIR_MAC_OUI_WME_TSPEC_MIN 61
499#define SIR_MAC_OUI_WME_TSPEC_MAX 61
500
501#define SIR_MAC_OUI_SUBTYPE_WSM_TSPEC 2 // same as WME TSPEC
502#define SIR_MAC_OUI_WSM_TSPEC_MIN 61
503#define SIR_MAC_OUI_WSM_TSPEC_MAX 61
504
505// reserved subtypes 3-4
506// WSM capability
507#define SIR_MAC_OUI_SUBTYPE_WSM_CAPABLE 5
508#define SIR_MAC_OUI_WSM_CAPABLE_MIN 7
509#define SIR_MAC_OUI_WSM_CAPABLE_MAX 7
510// WSM classifier
511#define SIR_MAC_OUI_SUBTYPE_WSM_TCLAS 6
512#define SIR_MAC_OUI_WSM_TCLAS_MIN 10
513#define SIR_MAC_OUI_WSM_TCLAS_MAX 255
514// classifier processing element
515#define SIR_MAC_OUI_SUBTYPE_WSM_TCLASPROC 7
516#define SIR_MAC_OUI_WSM_TCLASPROC_MIN 7
517#define SIR_MAC_OUI_WSM_TCLASPROC_MAX 7
518// tspec delay element
519#define SIR_MAC_OUI_SUBTYPE_WSM_TSDELAY 8
520#define SIR_MAC_OUI_WSM_TSDELAY_MIN 10
521#define SIR_MAC_OUI_WSM_TSDELAY_MAX 10
522// schedule element
523#define SIR_MAC_OUI_SUBTYPE_WSM_SCHEDULE 9
524#define SIR_MAC_OUI_WSM_SCHEDULE_MIN 20
525#define SIR_MAC_OUI_WSM_SCHEDULE_MAX 20
526
527#ifdef WLAN_NS_OFFLOAD
Gopichand Nakkala746a9452013-06-11 12:45:54 +0530528#define SIR_MAC_NS_OFFLOAD_SIZE 1 //support only one IPv6 offload
Jeff Johnson295189b2012-06-20 16:38:30 -0700529#define SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 2 //Number of target IP in NA frames. It must be at least 2
Gopichand Nakkala746a9452013-06-11 12:45:54 +0530530#define SIR_MAC_IPV6_ADDR_LEN 16
531#define SIR_IPV6_ADDR_VALID 1
Jeff Johnson295189b2012-06-20 16:38:30 -0700532#endif //WLAN_NS_OFFLOAD
533#define SIR_MAC_ARP_OFFLOAD_SIZE 1
534
535// total length of an Info element including T/L fields
536#define EID_LEN(eid) (2 + (eid))
537
538// support for radar Detect, Channel Switch
539#define CHANNEL_SWITCH_MAX_FRAME_SIZE 256
540
541
542// Length of Channel Switch related message
Jeff Johnsone7245742012-09-05 17:12:55 -0700543#define SIR_SME_CHANNEL_SWITCH_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16) + sizeof(tANI_U32) + sizeof(ePhyChanBondState))
Jeff Johnson295189b2012-06-20 16:38:30 -0700544#define SIR_CHANNEL_SWITCH_IE_SIZE EID_LEN(SIR_MAC_CHNL_SWITCH_ANN_EID_MIN)
545
546//Measurement Request/Report messages
547#define SIR_MEAS_REQ_FIELD_SIZE 11
548#define SIR_MEAS_REQ_IE_SIZE (5 + SIR_MEAS_REQ_FIELD_SIZE)
549#define SIR_MEAS_REQ_ACTION_FRAME_SIZE (3 + SIR_MEAS_REQ_IE_SIZE)
550#define SIR_MEAS_MAX_FRAME_SIZE 256
551#define SIR_MEAS_REPORT_MIN_FRAME_SIZE (3 + EID_LEN(SIR_MAC_MEAS_RPT_EID_MIN))
552
553#define SIR_MAC_SET_MEAS_REQ_ENABLE(x) (((tANI_U8) x) | 2)
554#define SIR_MAC_SET_MEAS_REQ_REQUEST(x) (((tANI_U8) x) | 4)
555#define SIR_MAC_SET_MEAS_REQ_REPORT(x) (((tANI_U8) x) | 8)
556
557#define SIR_MAC_SET_MEAS_REPORT_LATE(x) (((tANI_U8) x) | 1)
558#define SIR_MAC_SET_MEAS_REPORT_INCAPABLE(x) (((tANI_U8) x) | 2)
559#define SIR_MAC_SET_MEAS_REPORT_REFUSE(x) (((tANI_U8) x) | 4)
560
561// Length of TPC Request Action Frame
562#define SIR_TPC_REQ_ACTION_FRAME_SIZE (3 + EID_LEN(SIR_MAC_TPC_REQ_EID_MIN))
563#define SIR_TPC_REPORT_ACTION_FRAME_SIZE (3 + EID_LEN(SIR_MAC_TPC_RPT_EID_MIN))
564#define SIR_TPC_MAX_FRAME_SIZE 256
565//-----------------------------------------------------------------------------
566
567// OFFSET definitions for fixed fields in Management frames
568
569// Beacon/Probe Response offsets
570#define SIR_MAC_TS_OFFSET 0
571#define SIR_MAC_BEACON_INT_OFFSET 8 // Beacon Interval offset
572#define SIR_MAC_B_PR_CAPAB_OFFSET 10
573#define SIR_MAC_B_PR_SSID_OFFSET 12
574
575// Association/Reassociation offsets
576#define SIR_MAC_ASSOC_CAPAB_OFFSET 0
577#define SIR_MAC_LISTEN_INT_OFFSET 2 // Listen Interval offset
578#define SIR_MAC_ASSOC_SSID_OFFSET 4
579#define SIR_MAC_CURRENT_AP_OFFSET 4
580#define SIR_MAC_REASSOC_SSID_OFFSET 10
581#define SIR_MAC_ASSOC_STATUS_CODE_OFFSET 2
582#define SIR_MAC_ASSOC_AID_OFFSET 4
583#define SIR_MAC_ASSOC_RSP_RATE_OFFSET 6
584
585// Disassociation/Deauthentication offsets
586#define SIR_MAC_REASON_CODE_OFFSET 0
587
588// Probe Request offset
589#define SIR_MAC_PROBE_REQ_SSID_OFFSET 0
590
591// Authentication offsets
592#define SIR_MAC_AUTH_ALGO_OFFSET 0
593#define SIR_MAC_AUTH_XACT_SEQNUM_OFFSET 2
594#define SIR_MAC_AUTH_STATUS_CODE_OFFSET 4
595#define SIR_MAC_AUTH_CHALLENGE_OFFSET 6
596
597/// Transaction sequence number definitions (used in Authentication frames)
598#define SIR_MAC_AUTH_FRAME_1 1
599#define SIR_MAC_AUTH_FRAME_2 2
600#define SIR_MAC_AUTH_FRAME_3 3
601#define SIR_MAC_AUTH_FRAME_4 4
602
603/// Protocol defined MAX definitions
604#define SIR_MAC_ADDR_LENGTH 6
605#define SIR_MAC_MAX_SSID_LENGTH 32
606#define SIR_MAC_MAX_NUMBER_OF_RATES 12
607#define SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
608#define SIR_MAC_KEY_LENGTH 13 // WEP Maximum key length size
Sridhar Selvaraj87c8c022017-07-18 11:44:20 +0530609#define SIR_MAC_AUTH_CHALLENGE_LENGTH 253
yeshwanth sriram guntuka97711052017-09-08 12:16:08 +0530610#define SIR_MAC_SAP_AUTH_CHALLENGE_LENGTH 128
Jeff Johnson295189b2012-06-20 16:38:30 -0700611#define SIR_MAC_WEP_IV_LENGTH 4
612#define SIR_MAC_WEP_ICV_LENGTH 4
yeshwanth sriram guntukaccf694b2017-08-14 13:30:56 +0530613#define SIR_MAC_CHALLENGE_ID_LEN 2
614
615/* 2 bytes each for auth algo number, transaction number and status code */
616#define SIR_MAC_AUTH_FRAME_INFO_LEN 6
Jeff Johnson295189b2012-06-20 16:38:30 -0700617
618/// MAX key length when ULA is used
619#define SIR_MAC_MAX_KEY_LENGTH 32
620
621/// Macro definitions for get/set on FC fields
622#define SIR_MAC_GET_PROT_VERSION(x) ((((tANI_U16) x) & 0x0300) >> 8)
623#define SIR_MAC_GET_FRAME_TYPE(x) ((((tANI_U16) x) & 0x0C00) >> 8)
624#define SIR_MAC_GET_FRAME_SUB_TYPE(x) ((((tANI_U16) x) & 0xF000) >> 12)
625#define SIR_MAC_GET_WEP_BIT_IN_FC(x) (((tANI_U16) x) & 0x0040)
626#define SIR_MAC_SET_PROT_VERSION(x) ((tANI_U16) x)
627#define SIR_MAC_SET_FRAME_TYPE(x) (((tANI_U16) x) << 2)
628#define SIR_MAC_SET_FRAME_SUB_TYPE(x) (((tANI_U16) x) << 4)
629#define SIR_MAC_SET_WEP_BIT_IN_FC(x) (((tANI_U16) x) << 14)
630
631/// Macro definitions for get/set on capabilityInfo bits
632#define SIR_MAC_GET_ESS(x) (((tANI_U16) x) & 0x0001)
633#define SIR_MAC_GET_IBSS(x) ((((tANI_U16) x) & 0x0002) >> 1)
634#define SIR_MAC_GET_CF_POLLABLE(x) ((((tANI_U16) x) & 0x0004) >> 2)
635#define SIR_MAC_GET_CF_POLL_REQ(x) ((((tANI_U16) x) & 0x0008) >> 3)
636#define SIR_MAC_GET_PRIVACY(x) ((((tANI_U16) x) & 0x0010) >> 4)
637#define SIR_MAC_GET_SHORT_PREAMBLE(x) ((((tANI_U16) x) & 0x0020) >> 5)
638#define SIR_MAC_GET_SPECTRUM_MGMT(x) ((((tANI_U16) x) & 0x0100) >> 8)
639#define SIR_MAC_GET_QOS(x) ((((tANI_U16) x) & 0x0200) >> 9)
640#define SIR_MAC_GET_SHORT_SLOT_TIME(x) ((((tANI_U16) x) & 0x0400) >> 10)
641#define SIR_MAC_GET_APSD(x) ((((tANI_U16) x) & 0x0800) >> 11)
642#if defined WLAN_FEATURE_VOWIFI
643#define SIR_MAC_GET_RRM(x) ((((tANI_U16) x) & 0x1000) >> 12)
644#endif
645#define SIR_MAC_GET_BLOCK_ACK(x) ((((tANI_U16) x) & 0xc000) >> CAPABILITY_INFO_DELAYED_BA_BIT)
646#define SIR_MAC_SET_ESS(x) (((tANI_U16) x) | 0x0001)
647#define SIR_MAC_SET_IBSS(x) (((tANI_U16) x) | 0x0002)
648#define SIR_MAC_SET_CF_POLLABLE(x) (((tANI_U16) x) | 0x0004)
649#define SIR_MAC_SET_CF_POLL_REQ(x) (((tANI_U16) x) | 0x0008)
650#define SIR_MAC_SET_PRIVACY(x) (((tANI_U16) x) | 0x0010)
651#define SIR_MAC_SET_SHORT_PREAMBLE(x) (((tANI_U16) x) | 0x0020)
652#define SIR_MAC_SET_SPECTRUM_MGMT(x) (((tANI_U16) x) | 0x0100)
653#define SIR_MAC_SET_QOS(x) (((tANI_U16) x) | 0x0200)
654#define SIR_MAC_SET_SHORT_SLOT_TIME(x) (((tANI_U16) x) | 0x0400)
655#define SIR_MAC_SET_APSD(x) (((tANI_U16) x) | 0x0800)
656#if defined WLAN_FEATURE_VOWIFI
657#define SIR_MAC_SET_RRM(x) (((tANI_U16) x) | 0x1000)
658#endif
659#define SIR_MAC_SET_GROUP_ACK(x) (((tANI_U16) x) | 0x4000)
660
661// bitname must be one of the above, eg ESS, CF_POLLABLE, etc.
662#define SIR_MAC_CLEAR_CAPABILITY(u16value, bitname) \
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800663 ((u16value) &= (~(SIR_MAC_SET_##bitname(0))))
Jeff Johnson295189b2012-06-20 16:38:30 -0700664
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700665#define IS_WES_MODE_ENABLED(x) \
666 ((x)->roam.configParam.isWESModeEnabled)
667
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700668#define BA_RECIPIENT 1
669#define BA_INITIATOR 2
670#define BA_BOTH_DIRECTIONS 3
671
Jeff Johnson295189b2012-06-20 16:38:30 -0700672/// Status Code (present in Management response frames) enum
673
674typedef enum eSirMacStatusCodes
675{
676 eSIR_MAC_SUCCESS_STATUS = 0, //Reserved
677 eSIR_MAC_UNSPEC_FAILURE_STATUS = 1, //Unspecified reason
678 // 802.11 reserved 2-9
679 /*
680 WMM status codes(standard 1.1 table 9)
681 Table 9 ADDTS Response Status Codes
682 Value Operation
683 0 Admission accepted
684 1 Invalid parameters
685 2 Reserved
686 3 Refused
687 4-255 Reserved
688 */
689 eSIR_MAC_WME_INVALID_PARAMS_STATUS = 1, // ??
690 eSIR_MAC_WME_REFUSED_STATUS = 3, // ??
691 eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS = 10, //Cannot support all requested capabilities in the Capability Information field
692 eSIR_MAC_INABLITY_TO_CONFIRM_ASSOC_STATUS = 11, //Reassociation denied due to inability to confirm that association exists
693 eSIR_MAC_OUTSIDE_SCOPE_OF_SPEC_STATUS = 12, //Association denied due to reason outside the scope of this standard
694 eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS = 13, //Responding station does not support the specified authentication algorithm
695 eSIR_MAC_AUTH_FRAME_OUT_OF_SEQ_STATUS = 14, //Received an Authentication frame with authentication transaction sequence number
696 //out of expected sequence
697 eSIR_MAC_CHALLENGE_FAILURE_STATUS = 15, //Authentication rejected because of challenge failure
698 eSIR_MAC_AUTH_RSP_TIMEOUT_STATUS = 16, //Authentication rejected due to timeout waiting for next frame in sequence
699 eSIR_MAC_MAX_ASSOC_STA_REACHED_STATUS = 17, //Association denied because AP is unable to handle additional associated stations
700 eSIR_MAC_BASIC_RATES_NOT_SUPPORTED_STATUS = 18, //Association denied due to requesting station not supporting all of the data rates in the
701 //BSSBasicRateSet parameter
702 eSIR_MAC_SHORT_PREAMBLE_NOT_SUPPORTED_STATUS = 19, //Association denied due to requesting station not supporting the short preamble
703 //option
704 eSIR_MAC_PBCC_NOT_SUPPORTED_STATUS = 20, //Association denied due to requesting station not supporting the PBCC modulation
705 //option
706 eSIR_MAC_CHANNEL_AGILITY_NOT_SUPPORTED_STATUS = 21, //Association denied due to requesting station not supporting the Channel Agility
707 //option
708 eSIR_MAC_SPECTRUM_MGMT_REQD_STATUS = 22, //Association request rejected because Spectrum Management capability is required
709 eSIR_MAC_PWR_CAPABILITY_BAD_STATUS = 23, //Association request rejected because the information in the Power Capability
710 //element is unacceptable
711 eSIR_MAC_SPRTD_CHANNELS_BAD_STATUS = 24, //Association request rejected because the information in the Supported Channels
712 //element is unacceptable
713 eSIR_MAC_SHORT_SLOT_NOT_SUPORTED_STATUS = 25, //Association denied due to requesting station not supporting the Short Slot Time
714 //option
715 eSIR_MAC_DSSS_OFDM_NOT_SUPPORTED_STATUS = 26, //Association denied due to requesting station not supporting the DSSS-OFDM option
Chet Lanctot8cecea22014-02-11 19:09:36 -0800716 // reserved 27-29
717 eSIR_MAC_TRY_AGAIN_LATER = 30, //Association request rejected temporarily, try again later
718 // reserved 31
Jeff Johnson295189b2012-06-20 16:38:30 -0700719 eSIR_MAC_QOS_UNSPECIFIED_FAILURE_STATUS = 32, //Unspecified, QoS-related failure
720 eSIR_MAC_QAP_NO_BANDWIDTH_STATUS = 33, //Association denied because QoS AP has insufficient bandwidth to handle another
721 //QoS STA
722 eSIR_MAC_XS_FRAME_LOSS_STATUS = 34, //Association denied due to excessive frame loss rates and/or poor conditions on cur-
723 //rent operating channel
724 eSIR_MAC_STA_QOS_NOT_SUPPORTED_STATUS = 35, //Association (with QoS BSS) denied because the requesting STA does not support the
725 //QoS facility
726 eSIR_MAC_STA_BLK_ACK_NOT_SUPPORTED_STATUS = 36, //Reserved
727 eSIR_MAC_REQ_DECLINED_STATUS = 37, //The request has been declined
728 eSIR_MAC_INVALID_PARAM_STATUS = 38, //The request has not been successful as one or more parameters have invalid values
729 eSIR_MAC_TS_NOT_HONOURED_STATUS = 39, //The TS has not been created because the request cannot be honored; however, a suggested
730 //TSPEC is provided so that the initiating STA may attempt to set another TS
731 //with the suggested changes to the TSPEC
732 eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS = 40, //Invalid information element, i.e., an information element defined in this standard for
733 //which the content does not meet the specifications in Clause 7
734 eSIR_MAC_INVALID_GROUP_CIPHER_STATUS = 41, //Invalid group cipher
735 eSIR_MAC_INVALID_PAIRWISE_CIPHER_STATUS = 42, //Invalid pairwise cipher
736 eSIR_MAC_INVALID_AKMP_STATUS = 43, //Invalid AKMP
737 eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS = 44, //Unsupported RSN information element version
738 eSIR_MAC_INVALID_RSN_IE_CAPABILITIES_STATUS = 45, //Invalid RSN information element capabilities
739 eSIR_MAC_CIPHER_SUITE_REJECTED_STATUS = 46, //Cipher suite rejected because of security policy
740 eSIR_MAC_TS_NOT_CREATED_STATUS = 47, //The TS has not been created; however, the HC may be capable of creating a TS, in
741 //response to a request, after the time indicated in the TS Delay element
742 eSIR_MAC_DL_NOT_ALLOWED_STATUS = 48, //Direct link is not allowed in the BSS by policy
743 eSIR_MAC_DEST_STA_NOT_KNOWN_STATUS = 49, //The Destination STA is not present within this BSS
744 eSIR_MAC_DEST_STA_NOT_QSTA_STATUS = 50, //The Destination STA is not a QoS STA
745 eSIR_MAC_INVALID_LISTEN_INTERVAL_STATUS = 51, //Association denied because the ListenInterval is too large
746
747 eSIR_MAC_DSSS_CCK_RATE_MUST_SUPPORT_STATUS = 52, //FIXME:
748 eSIR_MAC_DSSS_CCK_RATE_NOT_SUPPORT_STATUS = 53,
749 eSIR_MAC_PSMP_CONTROLLED_ACCESS_ONLY_STATUS = 54,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800750#ifdef FEATURE_WLAN_ESE
751 eSIR_MAC_ESE_UNSPECIFIED_QOS_FAILURE_STATUS = 200, //ESE-Unspecified, QoS related failure in (Re)Assoc response frames
752 eSIR_MAC_ESE_TSPEC_REQ_REFUSED_STATUS = 201, //ESE-TSPEC request refused due to AP's policy configuration in AddTs Rsp, (Re)Assoc Rsp.
753 eSIR_MAC_ESE_ASSOC_DENIED_INSUFF_BW_STATUS = 202, //ESE-Assoc denied due to insufficient bandwidth to handle new TS in (Re)Assoc Rsp.
754 eSIR_MAC_ESE_INVALID_PARAMETERS_STATUS = 203, //ESE-Invalid parameters. (Re)Assoc request had one or more TSPEC parameters with
Jeff Johnson295189b2012-06-20 16:38:30 -0700755 //invalid values.
756#endif
757
758} tSirMacStatusCodes;
759
760/**
761 * Reason Code (present in Deauthentication/Disassociation
762 * Management frames) enum
763 */
764typedef enum eSirMacReasonCodes
765{
766 eSIR_MAC_UNSPEC_FAILURE_REASON = 1, //Unspecified reason
767 eSIR_MAC_PREV_AUTH_NOT_VALID_REASON = 2, //Previous authentication no longer valid
768 eSIR_MAC_DEAUTH_LEAVING_BSS_REASON = 3, //Deauthenticated because sending station is leaving (or has left) IBSS or ESS
769 eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON = 4, //Disassociated due to inactivity
770 eSIR_MAC_DISASSOC_DUE_TO_DISABILITY_REASON = 5, //Disassociated because AP is unable to handle all currently associated stations
771 eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON = 6, //Class 2 frame received from nonauthenticated station
772 eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON = 7, //Class 3 frame received from nonassociated station
773 eSIR_MAC_DISASSOC_LEAVING_BSS_REASON = 8, //Disassociated because sending station is leaving (or has left) BSS
774 eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON = 9, //Station requesting (re)association is not authenticated with responding station
775 eSIR_MAC_PWR_CAPABILITY_BAD_REASON = 10, //Disassociated because the information in the Power Capability element is unacceptable
776 eSIR_MAC_SPRTD_CHANNELS_BAD_REASON = 11, //Disassociated because the information in the Supported Channels element is unacceptable
777 // reserved 12
778 eSIR_MAC_INVALID_IE_REASON = 13, //Invalid information element, i.e., an information element defined in this standard for
779 //which the content does not meet the specifications in Clause 7
780 eSIR_MAC_MIC_FAILURE_REASON = 14, //Message integrity code (MIC) failure
781 eSIR_MAC_4WAY_HANDSHAKE_TIMEOUT_REASON = 15, //4-Way Handshake timeout
782 eSIR_MAC_GR_KEY_UPDATE_TIMEOUT_REASON = 16, //Group Key Handshake timeout
783 eSIR_MAC_RSN_IE_MISMATCH_REASON = 17, //Information element in 4-Way Handshake different from (Re)Association Request/Probe
784 //Response/Beacon frame
785 eSIR_MAC_INVALID_MC_CIPHER_REASON = 18, //Invalid group cipher
786 eSIR_MAC_INVALID_UC_CIPHER_REASON = 19, //Invalid pairwise cipher
787 eSIR_MAC_INVALID_AKMP_REASON = 20, //Invalid AKMP
788 eSIR_MAC_UNSUPPORTED_RSN_IE_VER_REASON = 21, //Unsupported RSN information element version
789 eSIR_MAC_INVALID_RSN_CAPABILITIES_REASON = 22, //Invalid RSN information element capabilities
790 eSIR_MAC_1X_AUTH_FAILURE_REASON = 23, //IEEE 802.1X authentication failed
791 eSIR_MAC_CIPHER_SUITE_REJECTED_REASON = 24, //Cipher suite rejected because of the security policy
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800792#ifdef FEATURE_WLAN_TDLS
793 eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE = 25, //TDLS direct link teardown due to TDLS peer STA unreachable via the TDLS direct link
794 eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON = 26, //TDLS direct link teardown for unspecified reason
795#endif
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700796 // reserved 27 - 30
797#ifdef WLAN_FEATURE_11W
798 eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION = 31, //Robust management frames policy violation
799#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700800 eSIR_MAC_QOS_UNSPECIFIED_REASON = 32, //Disassociated for unspecified, QoS-related reason
801 eSIR_MAC_QAP_NO_BANDWIDTH_REASON = 33, //Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA
802 eSIR_MAC_XS_UNACKED_FRAMES_REASON = 34, //Disassociated because excessive number of frames need to be acknowledged, but are not
803 //acknowledged due to AP transmissions and/or poor channel conditions
804 eSIR_MAC_BAD_TXOP_USE_REASON = 35, //Disassociated because STA is transmitting outside the limits of its TXOPs
805 eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON = 36, //Requested from peer STA as the STA is leaving the BSS (or resetting)
806 eSIR_MAC_PEER_REJECT_MECHANISIM_REASON = 37, //Requested from peer STA as it does not want to use the mechanism
807 eSIR_MAC_MECHANISM_NOT_SETUP_REASON = 38, //Requested from peer STA as the STA received frames using the mechanism for which a
808 //setup is required
809 eSIR_MAC_PEER_TIMEDOUT_REASON = 39, //Requested from peer STA due to timeout
810 eSIR_MAC_CIPHER_NOT_SUPPORTED_REASON = 45, //Peer STA does not support the requested cipher suite
811 eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON = 46, //FT reason
812 //reserved 47 - 65535.
813 eSIR_BEACON_MISSED = 65534, //We invented this to tell beacon missed case
814} tSirMacReasonCodes;
815
816
817typedef enum eSirMacChannelType
818{
819 eSIR_MAC_11A_BAND,
820 eSIR_MAC_11B_BAND,
821 eSIR_MAC_UNKNOWN_BAND
822} tSirMacChannelType;
823
824// BA Initiator v/s Recipient
825typedef enum eBADirection
826{
827 eBA_RECIPIENT,
828 eBA_INITIATOR
829} tBADirection;
830
831// A-MPDU/BA Enable/Disable in Tx/Rx direction
832typedef enum eBAEnable
833{
834 eBA_DISABLE,
835 eBA_ENABLE
836} tBAEnable;
837
838// A-MPDU/BA Policy
839typedef enum eBAPolicy
840{
841 eBA_UNCOMPRESSED,
842 eBA_COMPRESSED
843} tBAPolicy;
844
845// A-MPDU/BA Policy
846typedef enum eBAPolicyType
847{
848 eBA_POLICY_DELAYED,
849 eBA_POLICY_IMMEDIATE
850} tBAPolicyType;
851
852#ifdef WLAN_FEATURE_VOWIFI
853/* Based on table 7-43a from 802.11k Spec */
854typedef enum eRrmNeighborReachability
855{
856 eREACHABILITY_RESERVED,
857 eREACHABILITY_NOT_REACHABLE,
858 eREACHABILITY_UNKNOWN,
859 eREACHABILITY_REACHABLE,
860} tRrmNeighborReachability;
861#endif /* WLAN_FEATURE_VOWIFI */
862
863/// Frame control field format (2 bytes)
864typedef __ani_attr_pre_packed struct sSirMacFrameCtl
865{
866
867#ifndef ANI_LITTLE_BIT_ENDIAN
868
869 tANI_U8 subType :4;
870 tANI_U8 type :2;
871 tANI_U8 protVer :2;
872
873 tANI_U8 order :1;
874 tANI_U8 wep :1;
875 tANI_U8 moreData :1;
876 tANI_U8 powerMgmt :1;
877 tANI_U8 retry :1;
878 tANI_U8 moreFrag :1;
879 tANI_U8 fromDS :1;
880 tANI_U8 toDS :1;
881
882#else
883
884 tANI_U8 protVer :2;
885 tANI_U8 type :2;
886 tANI_U8 subType :4;
887
888 tANI_U8 toDS :1;
889 tANI_U8 fromDS :1;
890 tANI_U8 moreFrag :1;
891 tANI_U8 retry :1;
892 tANI_U8 powerMgmt :1;
893 tANI_U8 moreData :1;
894 tANI_U8 wep :1;
895 tANI_U8 order :1;
896
897#endif
898
899} __ani_attr_packed tSirMacFrameCtl, *tpSirMacFrameCtl;
900
901/// Sequence control field
902typedef __ani_attr_pre_packed struct sSirMacSeqCtl
903{
904
905#ifndef ANI_LITTLE_BIT_ENDIAN
906
907 tANI_U8 seqNumLo : 4;
908 tANI_U8 fragNum : 4;
909
910 tANI_U8 seqNumHi : 8;
911
912#else
913
914 tANI_U8 fragNum : 4;
915 tANI_U8 seqNumLo : 4;
916 tANI_U8 seqNumHi : 8;
917
918#endif
919} __ani_attr_packed tSirMacSeqCtl, *tpSirMacSeqCtl;
920
921// ACK policies
922
923typedef enum eSirMacAckPolicy
924{
925 eSIR_MAC_IMMEDIATE_ACK=0 ,
926 eSIR_MAC_NO_ACK,
927 eSIR_MAC_NO_EXPLICIT_ACK,
928 eSIR_MAC_BURST_ACK
929} tSirMacAckPolicy;
930
931/// QoS control field
932typedef __ani_attr_pre_packed struct sSirMacQosCtl
933{
934
935#ifndef ANI_LITTLE_BIT_ENDIAN
936
937 tANI_U8 rsvd : 1;
938 tANI_U8 ackPolicy : 2;
939 tANI_U8 esop_txopUnit : 1;
940 tANI_U8 tid : 4;
941
942 tANI_U8 txop : 8;
943
944#else
945
946 tANI_U8 tid : 4;
947 tANI_U8 esop_txopUnit : 1;
948 tANI_U8 ackPolicy : 2;
949 tANI_U8 rsvd : 1;
950
951 tANI_U8 txop : 8;
952
953#endif
954} __ani_attr_packed tSirMacQosCtl, *tpSirMacQosCtl;
955
956/// Length (in bytes) of MAC header in 3 address format
957#define SIR_MAC_HDR_LEN_3A 24
958
959/// Length (in bytes) of MAC header in 4 address format
960#define SIR_MAC_HDR_LEN_4A 30
961
962/// Length (in bytes) of the QoS control field in the MAC header
963#define SIR_MAC_QOS_CTL_LEN 2
964
965/// 3 address MAC data header format (24/26 bytes)
966typedef __ani_attr_pre_packed struct sSirMacDot3Hdr
967{
968 tANI_U8 da[6];
969 tANI_U8 sa[6];
970 tANI_U16 length;
971} __ani_attr_packed tSirMacDot3Hdr, *tpSirMacDot3Hdr;
972
973
974/// 3 address MAC data header format (24/26 bytes)
975typedef __ani_attr_pre_packed struct sSirMacDataHdr3a
976{
977 tSirMacFrameCtl fc;
978 tANI_U8 durationLo;
979 tANI_U8 durationHi;
980 tANI_U8 addr1[6];
981 tANI_U8 addr2[6];
982 tANI_U8 addr3[6];
983 tSirMacSeqCtl seqControl;
984 tSirMacQosCtl qosControl;
985} __ani_attr_packed tSirMacDataHdr3a, *tpSirMacDataHdr3a;
986
987/// 4 address MAC data header format (30/32 bytes)
988typedef __ani_attr_pre_packed struct sSirMacDataHdr4a
989{
990 tSirMacFrameCtl fc;
991 tANI_U8 durationLo;
992 tANI_U8 durationHi;
993 tANI_U8 addr1[6];
994 tANI_U8 addr2[6];
995 tANI_U8 addr3[6];
996 tSirMacSeqCtl seqControl;
997 tANI_U8 addr4[6];
998 tSirMacQosCtl qosControl;
999} __ani_attr_packed tSirMacDataHdr4a, *tpSirMacDataHdr4a;
1000
1001/// Management header format
1002typedef __ani_attr_pre_packed struct sSirMacMgmtHdr
1003{
1004 tSirMacFrameCtl fc;
1005 tANI_U8 durationLo;
1006 tANI_U8 durationHi;
1007 tANI_U8 da[6];
1008 tANI_U8 sa[6];
1009 tANI_U8 bssId[6];
1010 tSirMacSeqCtl seqControl;
1011} __ani_attr_packed tSirMacMgmtHdr, *tpSirMacMgmtHdr;
1012
1013/// PS-poll header format
1014typedef __ani_attr_pre_packed struct sSirMacPSpoll
1015{
1016 tSirMacFrameCtl fc;
1017 tANI_U8 aidLo;
1018 tANI_U8 aidHi;
1019 tANI_U8 bssId[6];
1020 tANI_U8 ta[6];
1021 tANI_U8 fcs[4];
1022} __ani_attr_packed tSirMacPSpoll, *tpSirMacPSpoll;
1023
1024/// ERP information field
1025typedef __ani_attr_pre_packed struct sSirMacErpInfo
1026{
1027#ifndef ANI_LITTLE_BIT_ENDIAN
1028 tANI_U8 reserved:5;
1029 tANI_U8 barkerPreambleMode:1;
1030 tANI_U8 useProtection:1;
1031 tANI_U8 nonErpPresent:1;
1032#else
1033 tANI_U8 nonErpPresent:1;
1034 tANI_U8 useProtection:1;
1035 tANI_U8 barkerPreambleMode:1;
1036 tANI_U8 reserved:5;
1037#endif
1038} __ani_attr_packed tSirMacErpInfo, *tpSirMacErpInfo;
1039
1040/// Capability information field
1041typedef __ani_attr_pre_packed struct sSirMacCapabilityInfo
1042{
1043#ifndef ANI_LITTLE_BIT_ENDIAN
1044 tANI_U16 immediateBA:1;
1045 tANI_U16 delayedBA:1;
1046 tANI_U16 dsssOfdm:1;
1047 tANI_U16 rrm:1;
1048 tANI_U16 apsd:1;
1049 tANI_U16 shortSlotTime:1;
1050 tANI_U16 qos:1;
1051 tANI_U16 spectrumMgt:1;
1052 tANI_U16 channelAgility:1;
1053 tANI_U16 pbcc:1;
1054 tANI_U16 shortPreamble:1;
1055 tANI_U16 privacy:1;
1056 tANI_U16 cfPollReq:1;
1057 tANI_U16 cfPollable:1;
1058 tANI_U16 ibss:1;
1059 tANI_U16 ess:1;
1060#else
1061 tANI_U16 ess:1;
1062 tANI_U16 ibss:1;
1063 tANI_U16 cfPollable:1;
1064 tANI_U16 cfPollReq:1;
1065 tANI_U16 privacy:1;
1066 tANI_U16 shortPreamble:1;
1067 tANI_U16 pbcc:1;
1068 tANI_U16 channelAgility:1;
1069 tANI_U16 spectrumMgt:1;
1070 tANI_U16 qos:1;
1071 tANI_U16 shortSlotTime:1;
1072 tANI_U16 apsd:1;
1073 tANI_U16 rrm:1;
1074 tANI_U16 dsssOfdm:1;
1075 tANI_U16 delayedBA:1;
1076 tANI_U16 immediateBA:1;
1077#endif
1078} __ani_attr_packed tSirMacCapabilityInfo, *tpSirMacCapabilityInfo;
1079
1080typedef __ani_attr_pre_packed struct sSirMacCfParamSet
1081{
1082 tANI_U8 cfpCount;
1083 tANI_U8 cfpPeriod;
1084 tANI_U16 cfpMaxDuration;
1085 tANI_U16 cfpDurRemaining;
1086} __ani_attr_packed tSirMacCfParamSet;
1087
1088typedef __ani_attr_pre_packed struct sSirMacTim
1089{
1090 tANI_U8 dtimCount;
1091 tANI_U8 dtimPeriod;
1092 tANI_U8 bitmapControl;
1093 tANI_U8 bitmapLength;
1094 tANI_U8 bitmap[251];
1095} __ani_attr_packed tSirMacTim;
1096
1097//12 Bytes long because this structure can be used to represent rate
1098//and extended rate set IEs
1099//The parser assume this to be at least 12
1100typedef __ani_attr_pre_packed struct sSirMacRateSet
1101{
1102 tANI_U8 numRates;
1103 tANI_U8 rate[SIR_MAC_RATESET_EID_MAX];
1104} __ani_attr_packed tSirMacRateSet;
1105
Abhishek Ambure6275acb2020-01-30 19:29:25 +05301106//Reserve 1 byte for NULL character in the SSID name field to print in %s
Jeff Johnson295189b2012-06-20 16:38:30 -07001107typedef __ani_attr_pre_packed struct sSirMacSSid
1108{
1109 tANI_U8 length;
Abhishek Ambure6275acb2020-01-30 19:29:25 +05301110 tANI_U8 ssId[SIR_MAC_MAX_SSID_LENGTH + 1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001111} __ani_attr_packed tSirMacSSid;
1112
1113typedef __ani_attr_pre_packed struct sSirMacWpaInfo
1114{
1115 tANI_U8 length;
1116 tANI_U8 info[SIR_MAC_MAX_IE_LENGTH];
1117} __ani_attr_packed tSirMacWpaInfo, *tpSirMacWpaInfo, tSirMacRsnInfo, *tpSirMacRsnInfo;
1118
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001119typedef __ani_attr_pre_packed struct sSirMacFHParamSet
1120{
1121 tANI_U16 dwellTime;
1122 tANI_U8 hopSet;
1123 tANI_U8 hopPattern;
1124 tANI_U8 hopIndex;
1125} tSirMacFHParamSet, *tpSirMacFHParamSet;
1126
1127typedef __ani_attr_pre_packed struct sSirMacIBSSParams
1128{
1129 tANI_U16 atim;
1130} tSirMacIBSSParams, *tpSirMacIBSSParams;
1131
1132typedef __ani_attr_pre_packed struct sSirMacRRMEnabledCap
1133{
1134#ifndef ANI_LITTLE_BIT_ENDIAN
1135 tANI_U8 reserved: 6;
1136 tANI_U8 AntennaInformation: 1;
1137 tANI_U8 BSSAvailAdmission: 1;
1138 tANI_U8 BssAvgAccessDelay: 1;
1139 tANI_U8 RSNIMeasurement: 1;
1140 tANI_U8 RCPIMeasurement: 1;
1141 tANI_U8 NeighborTSFOffset: 1;
1142 tANI_U8 MeasurementPilotEnabled: 1;
1143 tANI_U8 MeasurementPilot: 3;
1144 tANI_U8 nonOperatinChanMax: 3;
1145 tANI_U8 operatingChanMax: 3;
1146 tANI_U8 RRMMIBEnabled: 1;
1147 tANI_U8 APChanReport: 1;
1148 tANI_U8 triggeredTCM: 1;
1149 tANI_U8 TCMCapability: 1;
1150 tANI_U8 LCIAzimuth: 1;
1151 tANI_U8 LCIMeasurement: 1;
1152 tANI_U8 statistics: 1;
1153 tANI_U8 NoiseHistogram: 1;
1154 tANI_U8 ChannelLoad: 1;
1155 tANI_U8 FrameMeasurement: 1;
1156 tANI_U8 BeaconRepCond: 1;
1157 tANI_U8 BeaconTable: 1;
1158 tANI_U8 BeaconActive: 1;
1159 tANI_U8 BeaconPassive: 1;
1160 tANI_U8 repeated: 1;
1161 tANI_U8 parallel: 1;
1162 tANI_U8 NeighborRpt: 1;
1163 tANI_U8 LinkMeasurement: 1;
1164 tANI_U8 present;
1165#else
1166 tANI_U8 present;
1167 tANI_U8 LinkMeasurement: 1;
1168 tANI_U8 NeighborRpt: 1;
1169 tANI_U8 parallel: 1;
1170 tANI_U8 repeated: 1;
1171 tANI_U8 BeaconPassive: 1;
1172 tANI_U8 BeaconActive: 1;
1173 tANI_U8 BeaconTable: 1;
1174 tANI_U8 BeaconRepCond: 1;
1175 tANI_U8 FrameMeasurement: 1;
1176 tANI_U8 ChannelLoad: 1;
1177 tANI_U8 NoiseHistogram: 1;
1178 tANI_U8 statistics: 1;
1179 tANI_U8 LCIMeasurement: 1;
1180 tANI_U8 LCIAzimuth: 1;
1181 tANI_U8 TCMCapability: 1;
1182 tANI_U8 triggeredTCM: 1;
1183 tANI_U8 APChanReport: 1;
1184 tANI_U8 RRMMIBEnabled: 1;
1185 tANI_U8 operatingChanMax: 3;
1186 tANI_U8 nonOperatinChanMax: 3;
1187 tANI_U8 MeasurementPilot: 3;
1188 tANI_U8 MeasurementPilotEnabled: 1;
1189 tANI_U8 NeighborTSFOffset: 1;
1190 tANI_U8 RCPIMeasurement: 1;
1191 tANI_U8 RSNIMeasurement: 1;
1192 tANI_U8 BssAvgAccessDelay: 1;
1193 tANI_U8 BSSAvailAdmission: 1;
1194 tANI_U8 AntennaInformation: 1;
1195 tANI_U8 reserved: 6;
1196#endif
1197} tSirMacRRMEnabledCap, *tpSirMacRRMEnabledCap;
1198
Jeff Johnson295189b2012-06-20 16:38:30 -07001199
1200/* ----------------
1201 * EDCA Profiles
1202 * ---------------
1203 */
1204
1205#define EDCA_AC_BE 0
1206#define EDCA_AC_BK 1
1207#define EDCA_AC_VI 2
1208#define EDCA_AC_VO 3
1209#define AC_MGMT_LO 4
1210#define AC_MGMT_HI 5
1211#define MAX_NUM_AC 4
1212#define TOT_NUM_AC (MAX_NUM_AC + 2) /* +2 for AC_MGMT_xx */
1213
1214/*
1215#define EDCA_INDEX_0_RSVD 0
1216#define EDCA_INDEX_1_BEACON 1
1217#define EDCA_INDEX_2_MGMT_PROBERSP 2
1218#define EDCA_INDEX_3_MGMT_OTHER 3
1219#define EDCA_INDEX_4_AC_VO 4
1220#define EDCA_INDEX_5_AC_VI 5
1221#define EDCA_INDEX_6_AC_BE 6
1222#define EDCA_INDEX_7_AC_BK 7
1223*/
1224// access categories
1225#define SIR_MAC_EDCAACI_BESTEFFORT (EDCA_AC_BE)
1226#define SIR_MAC_EDCAACI_BACKGROUND (EDCA_AC_BK)
1227#define SIR_MAC_EDCAACI_VIDEO (EDCA_AC_VI)
1228#define SIR_MAC_EDCAACI_VOICE (EDCA_AC_VO)
1229
1230// access category record
1231typedef __ani_attr_pre_packed struct sSirMacAciAifsn
1232{
1233#ifndef ANI_LITTLE_BIT_ENDIAN
1234 tANI_U8 rsvd : 1;
1235 tANI_U8 aci : 2;
1236 tANI_U8 acm : 1;
1237 tANI_U8 aifsn : 4;
1238#else
1239 tANI_U8 aifsn : 4;
1240 tANI_U8 acm : 1;
1241 tANI_U8 aci : 2;
1242 tANI_U8 rsvd : 1;
1243#endif
1244} __ani_attr_packed tSirMacAciAifsn;
1245
1246// contention window size
1247typedef __ani_attr_pre_packed struct sSirMacCW
1248{
1249#ifndef ANI_LITTLE_BIT_ENDIAN
1250 tANI_U8 max : 4;
1251 tANI_U8 min : 4;
1252#else
1253 tANI_U8 min : 4;
1254 tANI_U8 max : 4;
1255#endif
1256} __ani_attr_packed tSirMacCW;
1257
1258typedef __ani_attr_pre_packed struct sSirMacEdcaParamRecord
1259{
1260 tSirMacAciAifsn aci;
1261 tSirMacCW cw;
1262 tANI_U16 txoplimit;
1263} __ani_attr_packed tSirMacEdcaParamRecord;
1264
1265typedef __ani_attr_pre_packed struct sSirMacQosInfo
1266{
1267#ifndef ANI_LITTLE_BIT_ENDIAN
1268 tANI_U8 uapsd : 1;
1269 tANI_U8 txopreq : 1;
1270 tANI_U8 qreq : 1;
1271 tANI_U8 qack : 1;
1272 tANI_U8 count : 4;
1273#else
1274 tANI_U8 count : 4;
1275 tANI_U8 qack : 1;
1276 tANI_U8 qreq : 1;
1277 tANI_U8 txopreq : 1;
1278 tANI_U8 uapsd : 1;
1279#endif
1280} __ani_attr_packed tSirMacQosInfo;
1281
1282
1283typedef __ani_attr_pre_packed struct sSirMacQosInfoStation
1284{
1285#ifdef ANI_LITTLE_BIT_ENDIAN
1286 tANI_U8 acvo_uapsd:1;
1287 tANI_U8 acvi_uapsd:1;
1288 tANI_U8 acbk_uapsd:1;
1289 tANI_U8 acbe_uapsd:1;
1290 tANI_U8 qack:1;
1291 tANI_U8 maxSpLen:2;
1292 tANI_U8 moreDataAck:1;
1293#else
1294 tANI_U8 moreDataAck:1;
1295 tANI_U8 maxSpLen:2;
1296 tANI_U8 qack:1;
1297 tANI_U8 acbe_uapsd:1;
1298 tANI_U8 acbk_uapsd:1;
1299 tANI_U8 acvi_uapsd:1;
1300 tANI_U8 acvo_uapsd:1;
1301#endif
1302} __ani_attr_packed tSirMacQosInfoStation, *tpSirMacQosInfoStation;
1303
1304
1305
1306typedef __ani_attr_pre_packed struct sSirMacEdcaParamSetIE
1307{
1308 tANI_U8 type;
1309 tANI_U8 length;
1310 tSirMacQosInfo qosInfo;
1311 tANI_U8 rsvd;
1312 tSirMacEdcaParamRecord acbe; // best effort
1313 tSirMacEdcaParamRecord acbk; // background
1314 tSirMacEdcaParamRecord acvi; // video
1315 tSirMacEdcaParamRecord acvo; // voice
1316} __ani_attr_packed tSirMacEdcaParamSetIE;
1317
Jeff Johnson295189b2012-06-20 16:38:30 -07001318typedef __ani_attr_pre_packed struct sSirMacQoSParams
1319{
1320 tANI_U8 count;
1321 tANI_U16 limit;
1322 tANI_U8 CWmin[8];
1323 tANI_U8 AIFS[8];
1324} __ani_attr_packed tSirMacQoSParams;
Jeff Johnson295189b2012-06-20 16:38:30 -07001325
1326typedef __ani_attr_pre_packed struct sSirMacQbssLoadIE
1327{
1328 tANI_U8 type;
1329 tANI_U8 length;
1330 tANI_U16 staCount;
1331 tANI_U8 chnlUtil;
1332 tANI_U16 admitCapacity;
1333} __ani_attr_packed tSirMacQbssLoadIE;
1334
1335// ts info direction field can take any of these values
1336#define SIR_MAC_DIRECTION_UPLINK 0
1337#define SIR_MAC_DIRECTION_DNLINK 1
1338#define SIR_MAC_DIRECTION_DIRECT 2
1339#define SIR_MAC_DIRECTION_BIDIR 3
1340
1341// access policy
1342// reserved 0
1343#define SIR_MAC_ACCESSPOLICY_EDCA 1
1344#define SIR_MAC_ACCESSPOLICY_HCCA 2
1345#define SIR_MAC_ACCESSPOLICY_BOTH 3
1346
1347#define SIR_MAC_HCCA_TSID_MIN 8 // valid HCCA tsid's are 8 or higher
1348#define SIR_MAC_TID_MAX 15
1349#define MAC_BA_TID_MAX 8
1350
1351typedef __ani_attr_pre_packed struct sSirMacTSInfoTfc
1352{
1353#ifndef ANI_LITTLE_BIT_ENDIAN
1354 tANI_U8 burstSizeDefn : 1;
1355 tANI_U8 reserved :7;
1356#else
1357 tANI_U8 reserved :7;
1358 tANI_U8 burstSizeDefn : 1;
1359#endif
1360
1361#ifndef ANI_LITTLE_BIT_ENDIAN
1362 tANI_U16 ackPolicy : 2;
1363 tANI_U16 userPrio : 3;
1364 tANI_U16 psb : 1;
1365 tANI_U16 aggregation : 1;
1366 tANI_U16 accessPolicy : 2;
1367 tANI_U16 direction : 2;
1368 tANI_U16 tsid : 4;
1369 tANI_U16 trafficType : 1;
1370#else
1371 tANI_U16 trafficType : 1;
1372 tANI_U16 tsid : 4;
1373 tANI_U16 direction : 2;
1374 tANI_U16 accessPolicy : 2;
1375 tANI_U16 aggregation : 1;
1376 tANI_U16 psb : 1;
1377 tANI_U16 userPrio : 3;
1378 tANI_U16 ackPolicy : 2;
1379#endif
1380} __ani_attr_packed tSirMacTSInfoTfc;
1381
1382typedef __ani_attr_pre_packed struct sSirMacTSInfoSch
1383{
1384#ifndef ANI_LITTLE_BIT_ENDIAN
1385 tANI_U8 rsvd : 7;
1386 tANI_U8 schedule : 1;
1387#else
1388 tANI_U8 schedule : 1;
1389 tANI_U8 rsvd : 7;
1390#endif
1391} __ani_attr_packed tSirMacTSInfoSch;
1392
1393typedef __ani_attr_pre_packed struct sSirMacTSInfo
1394{
1395 tSirMacTSInfoTfc traffic;
1396 tSirMacTSInfoSch schedule;
1397} __ani_attr_packed tSirMacTSInfo;
1398
1399typedef __ani_attr_pre_packed struct sSirMacTspecIE
1400{
1401 tANI_U8 type;
1402 tANI_U8 length;
1403 tSirMacTSInfo tsinfo;
1404 tANI_U16 nomMsduSz;
1405 tANI_U16 maxMsduSz;
1406 tANI_U32 minSvcInterval;
1407 tANI_U32 maxSvcInterval;
1408 tANI_U32 inactInterval;
1409 tANI_U32 suspendInterval;
1410 tANI_U32 svcStartTime;
1411 tANI_U32 minDataRate;
1412 tANI_U32 meanDataRate;
1413 tANI_U32 peakDataRate;
1414 tANI_U32 maxBurstSz;
1415 tANI_U32 delayBound;
1416 tANI_U32 minPhyRate;
1417 tANI_U16 surplusBw;
1418 tANI_U16 mediumTime;
1419}
Jeff Johnson3368d4a2013-02-13 12:23:50 -08001420__ani_attr_packed tSirMacTspecIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07001421
1422// max size of the classifier params in the tclas IE
1423#define SIR_MAC_CLSPARAM_LEN 253
1424
1425// frame classifier types
1426#define SIR_MAC_TCLASTYPE_ETHERNET 0
1427#define SIR_MAC_TCLASTYPE_TCPUDPIP 1
1428#define SIR_MAC_TCLASTYPE_8021DQ 2
1429// reserved 3-255
1430
1431#define SIR_MAC_TCLAS_PARAM_ETHERNET_MIN 14
1432typedef __ani_attr_pre_packed struct sSirMacTclasParamEthernet
1433{
1434 tANI_U8 srcAddr[6];
1435 tANI_U8 dstAddr[6];
1436 tANI_U16 type;
1437}__ani_attr_packed tSirMacTclasParamEthernet;
1438
1439#define SIR_MAC_TCLAS_PARAM_IPV4_MIN 16
1440typedef __ani_attr_pre_packed struct sSirMacTclasParamIPv4
1441{
1442 tANI_U8 version;
Arun Kumar Khandavalli95586012014-02-25 12:09:40 +05301443 tANI_U8 srcIpAddr[4];
1444 tANI_U8 dstIpAddr[4];
Jeff Johnson295189b2012-06-20 16:38:30 -07001445 tANI_U16 srcPort;
1446 tANI_U16 dstPort;
1447 tANI_U8 dscp;
1448 tANI_U8 protocol;
1449 tANI_U8 rsvd;
1450} __ani_attr_packed tSirMacTclasParamIPv4;
1451
1452#define SIR_MAC_TCLAS_IPV4 4
1453#define SIR_MAC_TCLAS_IPV6 6
1454
1455#define SIR_MAC_TCLAS_PARAM_IPV6_MIN 40
1456typedef __ani_attr_pre_packed struct sSirMacTclasParamIPv6
1457{
1458 tANI_U8 version;
1459 tANI_U8 srcIpAddr[16];
1460 tANI_U8 dstIpAddr[16];
1461 tANI_U16 srcPort;
1462 tANI_U16 dstPort;
1463 tANI_U8 flowLabel[3];
1464} __ani_attr_packed tSirMacTclasParamIPv6;
1465
1466#define SIR_MAC_TCLAS_PARAM_8021DQ_MIN 2
1467typedef __ani_attr_pre_packed struct sSirMacTclasParam8021dq
1468{
1469 tANI_U16 tag;
1470} __ani_attr_packed tSirMacTclasParam8021dq;
1471
1472typedef __ani_attr_pre_packed struct sSirMacTclasIE
1473{
1474 tANI_U8 type;
1475 tANI_U8 length;
1476 tANI_U8 userPrio;
1477 tANI_U8 classifierType;
1478 tANI_U8 classifierMask;
1479} __ani_attr_packed tSirMacTclasIE;
1480
1481typedef __ani_attr_pre_packed struct sSirMacTsDelayIE
1482{
1483 tANI_U8 type;
1484 tANI_U8 length;
1485 tANI_U32 delay;
1486} __ani_attr_packed tSirMacTsDelayIE;
1487
1488typedef __ani_attr_pre_packed struct sSirMacTclasProcIE
1489{
1490 tANI_U8 type;
1491 tANI_U8 length;
1492 tANI_U8 processing;
1493} __ani_attr_packed tSirMacTclasProcIE;
1494
1495typedef __ani_attr_pre_packed struct sSirMacScheduleInfo
1496{
1497#ifndef ANI_LITTLE_BIT_ENDIAN
1498 tANI_U16 rsvd : 9;
1499 tANI_U16 direction : 2;
1500 tANI_U16 tsid : 4;
1501 tANI_U16 aggregation : 1;
1502#else
1503 tANI_U16 aggregation : 1;
1504 tANI_U16 tsid : 4;
1505 tANI_U16 direction : 2;
1506 tANI_U16 rsvd : 9;
1507#endif
1508} __ani_attr_packed tSirMacScheduleInfo;
1509
1510typedef __ani_attr_pre_packed struct sSirMacScheduleIE
1511{
1512 tANI_U8 type;
1513 tANI_U8 length;
1514 tSirMacScheduleInfo info;
1515 tANI_U32 svcStartTime;
1516 tANI_U32 svcInterval;
1517 tANI_U16 maxSvcDuration;
1518 tANI_U16 specInterval;
1519} __ani_attr_packed tSirMacScheduleIE;
1520
1521typedef __ani_attr_pre_packed struct sSirMacQosCapabilityIE
1522{
1523 tANI_U8 type;
1524 tANI_U8 length;
1525 tSirMacQosInfo qosInfo;
1526} __ani_attr_packed tSirMacQosCapabilityIE;
1527
1528typedef __ani_attr_pre_packed struct sSirMacQosCapabilityStaIE
1529{
1530 tANI_U8 type;
1531 tANI_U8 length;
1532 tSirMacQosInfoStation qosInfo;
1533} __ani_attr_packed tSirMacQosCapabilityStaIE;
1534
1535
1536#define ADDTS
1537typedef __ani_attr_pre_packed struct sSirMacQosActionIE
1538{
1539 tANI_U8 type;
1540 tANI_U8 length;
1541 tANI_U8 qosAction;
1542 tANI_U8 qosBody[1];
1543} __ani_attr_packed tSirMacQosActionIE;
1544
1545typedef tANI_U32 tSirMacTimeStamp[2];
1546
1547typedef tANI_U16 tSirMacBeaconInterval;
1548
1549typedef tANI_U16 tSirMacListenInterval;
1550
1551typedef tANI_U8 tSirMacChanNum;
1552
1553typedef tANI_U8 tSirMacAddr[6];
1554
1555
1556// IE definitions
1557typedef __ani_attr_pre_packed struct sSirMacIE
1558{
1559 tANI_U8 elementID;
1560 tANI_U8 length;
1561 tANI_U8 info[1];
1562} __ani_attr_packed tSirMacIE;
1563
1564typedef __ani_attr_pre_packed struct sSirMacSSidIE
1565{
1566 tANI_U8 type;
1567 tSirMacSSid ssId;
1568} __ani_attr_packed tSirMacSSidIE;
1569
1570typedef __ani_attr_pre_packed struct sSirMacRateSetIE
1571{
1572 tANI_U8 type;
1573 tSirMacRateSet supportedRateSet;
1574} __ani_attr_packed tSirMacRateSetIE;
1575
1576typedef __ani_attr_pre_packed struct sSirMacDsParamSetIE
1577{
1578 tANI_U8 type;
1579 tANI_U8 length;
1580 tSirMacChanNum channelNumber;
1581} __ani_attr_packed tSirMacDsParamSetIE;
1582
1583typedef __ani_attr_pre_packed struct sSirMacCfParamSetIE
1584{
1585 tANI_U8 type;
1586 tANI_U8 length;
1587 tSirMacCfParamSet cfParams;
1588} __ani_attr_packed tSirMacCfParamSetIE;
1589
1590typedef __ani_attr_pre_packed struct sSirMacChanInfo
1591{
1592 tSirMacChanNum firstChanNum;
1593 tANI_U8 numChannels;
1594 tANI_S8 maxTxPower;
1595} __ani_attr_packed tSirMacChanInfo;
1596
1597typedef __ani_attr_pre_packed struct sSirMacCountry
1598{
1599 tANI_U8 countryString[3]; // This from CFG_COUNTRY_STRING
1600 tANI_U8 numChanInfo;
1601 tSirMacChanInfo chanInfo[1];
1602} __ani_attr_packed tSirMacCountry;
1603
1604typedef __ani_attr_pre_packed struct sSirMacCountryIE
1605{
1606 tANI_U8 type;
1607 tANI_U8 length;
1608 tSirMacCountry country;
1609} __ani_attr_packed tSirMacCountryIE;
1610
1611typedef __ani_attr_pre_packed struct sSirMacNonErpPresentIE
1612{
1613 tANI_U8 type;
1614 tANI_U8 length;
1615 tANI_U8 erp;
1616} __ani_attr_packed tSirMacNonErpPresentIE;
1617
1618typedef __ani_attr_pre_packed struct sSirMacWpaIE
1619{
1620 tANI_U8 type;
1621 tSirMacWpaInfo wpa;
1622} __ani_attr_packed tSirMacWpaIE;
1623
1624typedef struct sSirMacPowerCapabilityIE
1625{
1626 tANI_U8 type;
1627 tANI_U8 length;
1628 tANI_U8 minTxPower;
1629 tANI_U8 maxTxPower;
1630} tSirMacPowerCapabilityIE;
1631
1632typedef struct sSirMacSupportedChannelIE
1633{
1634 tANI_U8 type;
1635 tANI_U8 length;
1636 tANI_U8 supportedChannels[96];
1637} tSirMacSupportedChannelIE;
1638
1639typedef struct sSirMacMeasReqField
1640{
1641 tANI_U8 channelNumber;
1642 tANI_U8 measStartTime[8];
1643 tANI_U16 measDuration;
1644} tSirMacMeasReqField, *tpSirMacMeasReqField;
1645
1646typedef struct sSirMacMeasReqIE
1647{
1648 tANI_U8 type;
1649 tANI_U8 length;
1650 tANI_U8 measToken;
1651 tANI_U8 measReqMode;
1652 tANI_U8 measType;
1653 tSirMacMeasReqField measReqField;
1654} tSirMacMeasReqIE, *tpSirMacMeasReqIE;
1655
1656// Basic Measurement Report
1657typedef struct sSirMacBasicReport
1658{
1659 tANI_U8 channelNumber;
1660 tANI_U8 measStartTime[8];
1661 tANI_U16 measDuration;
1662 tANI_U8 mapField;
1663} tSirMacBasicReport, *tpSirMacBasicReport;
1664
1665typedef struct sSirMacBasicReportIE
1666{
1667 tANI_U8 type;
1668 tANI_U8 length;
1669 tANI_U8 measToken;
1670 tANI_U8 measReportMode;
1671 tANI_U8 measType;
1672 tSirMacBasicReport basicReport;
1673} tSirMacBasicReportIE, *tpSirMacBasicReportIE;
1674
1675// CCA Measurement Report
1676typedef struct sSirMacCcaReport
1677{
1678 tANI_U8 channelNumber;
1679 tANI_U8 measStartTime[8];
1680 tANI_U16 measDuration;
1681 tANI_U8 ccaBusyFraction;
1682} tSirMacCcaReport, *tpSirMacCcaReport;
1683
1684typedef struct sSirMacCcaReportIE
1685{
1686 tANI_U8 type;
1687 tANI_U8 length;
1688 tANI_U8 measToken;
1689 tANI_U8 measReportMode;
1690 tANI_U8 measType;
1691 tSirMacCcaReport ccaReport;
1692} tSirMacCcaReportIE, *tpSirMacCcaReportIE;
1693
1694// RPI Histogram Measurement Report
1695typedef struct sSirMacRpiReport
1696{
1697 tANI_U8 channelNumber;
1698 tANI_U8 measStartTime[8];
1699 tANI_U16 measDuration;
1700 tANI_U8 rpiDensity[8];
1701} tSirMacRpiReport, *tpSirMacRpiReport;
1702
1703typedef struct sSirMacRpiReportIE
1704{
1705 tANI_U8 type;
1706 tANI_U8 length;
1707 tANI_U8 measToken;
1708 tANI_U8 measReportMode;
1709 tANI_U8 measType;
1710 tSirMacRpiReport rpiReport;
1711} tSirMacRpiReportIE, *tpSirMacRpiReportIE;
1712
Gopichand Nakkala681989c2013-03-06 22:27:48 -08001713#define SIR_MAC_MAX_SUPP_RATES 32
1714
Naresh Jayarambc62ba42014-02-12 21:39:14 +05301715#define SIR_MAC_MAX_SUPP_CHANNELS 100
1716#define SIR_MAC_MAX_SUPP_OPER_CLASSES 32
1717
Gopichand Nakkala681989c2013-03-06 22:27:48 -08001718#define SIR_MAC_MAX_EXTN_CAP 8
1719
1720// VHT Capabilities Info
1721typedef __ani_attr_pre_packed struct sSirMacVHTCapabilityInfo
1722{
1723#ifndef ANI_LITTLE_BIT_ENDIAN
1724 tANI_U32 reserved1: 2;
1725 tANI_U32 txAntPattern: 1;
1726 tANI_U32 rxAntPattern: 1;
1727 tANI_U32 vhtLinkAdaptCap: 2;
1728 tANI_U32 maxAMPDULenExp: 3;
1729 tANI_U32 htcVHTCap: 1;
1730 tANI_U32 vhtTXOPPS: 1;
1731 tANI_U32 muBeamformeeCap: 1;
1732 tANI_U32 muBeamformerCap: 1;
1733 tANI_U32 numSoundingDim: 3;
1734 tANI_U32 csnofBeamformerAntSup: 3;
1735 tANI_U32 suBeamformeeCap: 1;
1736 tANI_U32 suBeamFormerCap: 1;
1737 tANI_U32 rxSTBC: 3;
1738 tANI_U32 txSTBC: 1;
1739 tANI_U32 shortGI160and80plus80MHz: 1;
1740 tANI_U32 shortGI80MHz: 1;
1741 tANI_U32 ldpcCodingCap: 1;
1742 tANI_U32 supportedChannelWidthSet: 2;
1743 tANI_U32 maxMPDULen: 2;
1744#else
1745 tANI_U32 maxMPDULen: 2;
1746 tANI_U32 supportedChannelWidthSet: 2;
1747 tANI_U32 ldpcCodingCap: 1;
1748 tANI_U32 shortGI80MHz: 1;
1749 tANI_U32 shortGI160and80plus80MHz: 1;
1750 tANI_U32 txSTBC: 1;
1751 tANI_U32 rxSTBC: 3;
1752 tANI_U32 suBeamFormerCap: 1;
1753 tANI_U32 suBeamformeeCap: 1;
1754 tANI_U32 csnofBeamformerAntSup: 3;
1755 tANI_U32 numSoundingDim: 3;
1756 tANI_U32 muBeamformerCap: 1;
1757 tANI_U32 muBeamformeeCap: 1;
1758 tANI_U32 vhtTXOPPS: 1;
1759 tANI_U32 htcVHTCap: 1;
1760 tANI_U32 maxAMPDULenExp: 3;
1761 tANI_U32 vhtLinkAdaptCap: 2;
1762 tANI_U32 rxAntPattern: 1;
1763 tANI_U32 txAntPattern: 1;
1764 tANI_U32 reserved1: 2;
1765#endif
1766} __ani_attr_packed tSirMacVHTCapabilityInfo;
1767
1768typedef __ani_attr_pre_packed struct sSirMacVHTTxSupDataRateInfo
1769{
1770#ifndef ANI_LITTLE_BIT_ENDIAN
1771 tANI_U16 reserved: 3;
1772 tANI_U16 txSupDataRate: 13;
1773#else
1774 tANI_U16 txSupDataRate: 13;
1775 tANI_U16 reserved: 3;
1776#endif
1777}__ani_attr_packed tSirMacVHTTxSupDataRateInfo;
1778
1779typedef __ani_attr_pre_packed struct sSirMacVHTRxSupDataRateInfo
1780{
1781#ifndef ANI_LITTLE_BIT_ENDIAN
1782 tANI_U16 reserved: 3;
1783 tANI_U16 rxSupDataRate: 13;
1784#else
1785 tANI_U16 rxSupDataRate: 13;
1786 tANI_U16 reserved: 3;
1787#endif
1788}__ani_attr_packed tSirMacVHTRxSupDataRateInfo;
1789
1790/**
1791 * struct sSirVhtMcsInfo - VHT MCS information
1792 * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams
1793 * @rx_highest: Indicates highest long GI VHT PPDU data rate
1794 * STA can receive. Rate expressed in units of 1 Mbps.
1795 * If this field is 0 this value should not be used to
1796 * consider the highest RX data rate supported.
1797 * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams
1798 * @tx_highest: Indicates highest long GI VHT PPDU data rate
1799 * STA can transmit. Rate expressed in units of 1 Mbps.
1800 * If this field is 0 this value should not be used to
1801 * consider the highest TX data rate supported.
1802 */
1803typedef struct sSirVhtMcsInfo {
1804 tANI_U16 rxMcsMap;
1805 tANI_U16 rxHighest;
1806 tANI_U16 txMcsMap;
1807 tANI_U16 txHighest;
1808}tSirVhtMcsInfo;
1809
1810/**
1811 * struct sSirVHtCap - VHT capabilities
1812 *
1813 * This structure is the "VHT capabilities element" as
1814 * described in 802.11ac D3.0 8.4.2.160
1815 * @vht_cap_info: VHT capability info
1816 * @supp_mcs: VHT MCS supported rates
1817 */
1818typedef struct sSirVHtCap {
1819 tANI_U32 vhtCapInfo;
1820 tSirVhtMcsInfo suppMcs;
1821}tSirVHTCap;
1822
1823/**
1824 * struct sSirHtCap - HT capabilities
1825 *
1826 * This structure refers to "HT capabilities element" as
1827 * described in 802.11n draft section 7.3.2.52
1828 */
1829
1830
1831typedef struct sSirHtCap {
1832 tANI_U16 capInfo;
1833 tANI_U8 ampduParamsInfo;
1834 tANI_U8 suppMcsSet[16];
1835 tANI_U16 extendedHtCapInfo;
1836 tANI_U32 txBFCapInfo;
1837 tANI_U8 antennaSelectionInfo;
1838}tSirHTCap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001839
1840// HT Cap and HT IE Size defines
1841#define HT_CAPABILITY_IE_SIZE 28
1842#define HT_INFO_IE_SIZE 24
1843
1844//
1845// Determines the current operating mode of the 802.11n STA
1846//
1847typedef enum eSirMacHTOperatingMode
1848{
1849 eSIR_HT_OP_MODE_PURE, // No Protection
1850 eSIR_HT_OP_MODE_OVERLAP_LEGACY, // Overlap Legacy device present, protection is optional
1851 eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT, // No legacy device, but 20 MHz HT present
1852 eSIR_HT_OP_MODE_MIXED // Protetion is required
1853} tSirMacHTOperatingMode;
1854
1855
1856// Spatial Multiplexing(SM) Power Save mode
1857typedef enum eSirMacHTMIMOPowerSaveState
1858{
1859 eSIR_HT_MIMO_PS_STATIC = 0, // Static SM Power Save mode
1860 eSIR_HT_MIMO_PS_DYNAMIC = 1, // Dynamic SM Power Save mode
1861 eSIR_HT_MIMO_PS_NA = 2, // reserved
1862 eSIR_HT_MIMO_PS_NO_LIMIT = 3 // SM Power Save disabled
1863} tSirMacHTMIMOPowerSaveState;
1864
1865
Jeff Johnson295189b2012-06-20 16:38:30 -07001866typedef enum eSirMacHTChannelWidth
1867{
1868 eHT_CHANNEL_WIDTH_20MHZ = 0,
Jeff Johnsone7245742012-09-05 17:12:55 -07001869 eHT_CHANNEL_WIDTH_40MHZ = 1,
1870#ifdef WLAN_FEATURE_11AC
1871 eHT_CHANNEL_WIDTH_80MHZ = 2,
1872#endif
1873 eHT_MAX_CHANNEL_WIDTH
Jeff Johnson295189b2012-06-20 16:38:30 -07001874} tSirMacHTChannelWidth;
1875
1876//Packet struct for HT capability
1877typedef __ani_attr_pre_packed struct sHtCaps {
1878 tANI_U16 advCodingCap: 1;
1879 tANI_U16 supportedChannelWidthSet: 1;
1880 tANI_U16 mimoPowerSave: 2;
1881 tANI_U16 greenField: 1;
1882 tANI_U16 shortGI20MHz: 1;
1883 tANI_U16 shortGI40MHz: 1;
1884 tANI_U16 txSTBC: 1;
1885 tANI_U16 rxSTBC: 2;
1886 tANI_U16 delayedBA: 1;
1887 tANI_U16 maximalAMSDUsize: 1;
1888 tANI_U16 dsssCckMode40MHz: 1;
1889 tANI_U16 psmp: 1;
1890 tANI_U16 stbcControlFrame: 1;
1891 tANI_U16 lsigTXOPProtection: 1;
1892 tANI_U8 maxRxAMPDUFactor: 2;
1893 tANI_U8 mpduDensity: 3;
1894 tANI_U8 reserved1: 3;
1895 tANI_U8 supportedMCSSet[16];
1896 tANI_U16 pco: 1;
1897 tANI_U16 transitionTime: 2;
1898 tANI_U16 reserved2: 5;
1899 tANI_U16 mcsFeedback: 2;
1900 tANI_U16 reserved3: 6;
1901 tANI_U32 txBF: 1;
1902 tANI_U32 rxStaggeredSounding: 1;
1903 tANI_U32 txStaggeredSounding: 1;
1904 tANI_U32 rxZLF: 1;
1905 tANI_U32 txZLF: 1;
1906 tANI_U32 implicitTxBF: 1;
1907 tANI_U32 calibration: 2;
1908 tANI_U32 explicitCSITxBF: 1;
1909 tANI_U32 explicitUncompressedSteeringMatrix: 1;
1910 tANI_U32 explicitBFCSIFeedback: 3;
1911 tANI_U32 explicitUncompressedSteeringMatrixFeedback: 3;
1912 tANI_U32 explicitCompressedSteeringMatrixFeedback: 3;
1913 tANI_U32 csiNumBFAntennae: 2;
1914 tANI_U32 uncompressedSteeringMatrixBFAntennae: 2;
1915 tANI_U32 compressedSteeringMatrixBFAntennae: 2;
1916 tANI_U32 reserved4: 7;
1917 tANI_U8 antennaSelection: 1;
1918 tANI_U8 explicitCSIFeedbackTx: 1;
1919 tANI_U8 antennaIndicesFeedbackTx: 1;
1920 tANI_U8 explicitCSIFeedback: 1;
1921 tANI_U8 antennaIndicesFeedback: 1;
1922 tANI_U8 rxAS: 1;
1923 tANI_U8 txSoundingPPDUs: 1;
1924 tANI_U8 reserved5: 1;
1925
1926} __ani_attr_packed tHtCaps;
1927
1928/* During 11h channel switch, the AP can indicate if the
1929 * STA needs to stop the transmission or continue until the
1930 * channel-switch.
1931 * eSIR_CHANSW_MODE_NORMAL - STA can continue transmission
1932 * eSIR_CHANSW_MODE_SILENT - STA should stop transmission
1933 */
1934typedef enum eSirMacChanSwMode
1935{
1936 eSIR_CHANSW_MODE_NORMAL = 0,
1937 eSIR_CHANSW_MODE_SILENT = 1
1938} tSirMacChanSwitchMode;
1939
1940
1941typedef __ani_attr_pre_packed struct _BarControl {
1942
1943#ifndef ANI_BIG_BYTE_ENDIAN
1944
1945 tANI_U16 barAckPolicy:1;
1946 tANI_U16 multiTID:1;
1947 tANI_U16 bitMap:1;
1948 tANI_U16 rsvd:9;
1949 tANI_U16 numTID:4;
1950
1951#else
1952 tANI_U16 numTID:4;
1953 tANI_U16 rsvd:9;
1954 tANI_U16 bitMap:1;
1955 tANI_U16 multiTID:1;
1956 tANI_U16 barAckPolicy:1;
1957
1958#endif
1959
1960}__ani_attr_packed barCtrlType;
1961
1962typedef __ani_attr_pre_packed struct _BARFrmStruct {
1963 tSirMacFrameCtl fc;
1964 tANI_U16 duration;
1965 tSirMacAddr rxAddr;
1966 tSirMacAddr txAddr;
1967 barCtrlType barControl;
1968 tSirMacSeqCtl ssnCtrl;
1969}__ani_attr_packed BARFrmType;
1970
1971
1972#if 0
1973// Typedef for HT Capability IE
1974// Typedef for HT Capability Info Field
1975#define SUPPORT_ADVANCE_CODING_1 1
1976#define NOT_SUPPORT_ADVANCE_CODING_0 0
1977#define SUPPORT_CHANNEL_WIDTH_SET_20_40_MHZ 1
1978#define NOT_SUPPORT_CHANNEL_WIDTH_SET_20_MHZ_ONLY 0
1979#define DO_NOT_SEND_MIMO_SEQ_STATIC_POWER_SAVE 0
1980#define RTS_PRECEDE_MIMO_SEQ_DYN_POWER_SAVE 1
1981#define MIMO_POWER_SAVE_NA 2
1982#define NO_LIMIT_ON_MIMO_SEQ 3
1983#define DEVICE_IS_ABLE_TO_RCVE_PPDU_WITH_GF_PREAMBLE 1
1984#define DEVICE_NOT_ABLE_TO_RCVE_PPDU_WITH_GF_PREAMBLE 0
1985#define SUPPORT_SHORT_GI_FOR_20_MHZ 1
1986#define NOT_SUPPORT_SHORT_GI_FOR_20_MHZ 0
1987#define SUPPORT_SHORT_GI_FOR_40_MHZ 1
1988#define NOT_SUPPORT_SHORT_GI_FOR_40_MHZ 0
1989#define TRANSMITTER_SUPPORT_STBC 1
1990#define TRANSMITTER_NOT_SUPPORT_STBC 0
1991#define RX_NOT_SUPPORT_STBC 0
1992#define RX_SUPPORT_STBC_ONE_SPATIAL_STREAM 1
1993#define RX_SUPPORT_STBC_ONE_AND_TWO_SPATIAL_STREAM 2
1994#define RX_SUPPORT_STBC_ONE_TWO_THREE_SPATIAL_STREAM 3
1995#define SUPPORT_DELAYED_BA 1
1996#define NOT_SUPPORT_DELAYED_BA 0
1997#define RECEIVER_MAX_A_MSDU_SIZE_7935 1
1998#define RECEIVER_MAX_A_MSDU_SIZE_3839 0
1999#define BSS_OR_DEVICE_ALLOW_USE_DSSS_CCK 1
2000#define BSS_OR_DEVICE_NOT_ALLOW_USE_DSSS_CCK 0
2001#define BSS_OR_DEVICE_SUPPORT_USE_PSMP 1
2002#define BSS_OR_DEVICE_NOT_SUPPORT_USE_PSMP 0
2003#define BSS_OR_DEVICE_SUPPORT_USE_STBC_CONTROL_FRAME 1
2004#define BSS_OR_DEVICE_NOT_SUPPORT_USE_STBC_CONTROL_FRAME 0
2005#define SUPPORT_L_SIG_TXOP_PROTECTION 1
2006#define NOT_SUPPORT_L_SIG_TXOP_PROTECTION 0
2007
2008// Typedef for HT Parameters Info Field
2009#define MAX_RX_AMPDU_FACTOR_0 0
2010#define MAX_RX_AMPDU_FACTOR_1 1
2011#define MAX_RX_AMPDU_FACTOR_2 2
2012#define MAX_RX_AMPDU_FACTOR_3 3
2013#define MPDU_DENSITY_NO_RESTRICTION 0
2014#define MPDU_DENSITY_ONE_EIGHTH_USECOND 1
2015#define MPDU_DENSITY_ONE_FOURTH_USECOND 2
2016#define MPDU_DENSITY_ONE_HALF_USECOND 3
2017#define MPDU_DENSITY_ONE_USECOND 4
2018#define MPDU_DENSITY_TWO_USECOND 5
2019#define MPDU_DENSITY_FOUR_USECOND 6
2020#define MPDU_DENSITY_EIGHT_USECOND 7
2021#endif
2022
2023// Supported MCS set
2024#define SIZE_OF_SUPPORTED_MCS_SET 16
2025#define SIZE_OF_BASIC_MCS_SET 16
2026#define VALID_MCS_SIZE 77 //0-76
2027#define MCS_RX_HIGHEST_SUPPORTED_RATE_BYTE_OFFSET 10
2028// This is not clear, Count 8 based from NV supported MCS count
2029#define VALID_MAX_MCS_INDEX 8
2030
2031#if 0
2032// Typedef Extended HT Capability Info Field
2033#define SUPPORT_PCO 1
2034#define NOT_SUPPORT_PCO 0
2035#define TRANSITION_TIME_0 0
2036#define STA_DOES_NOT_PROVIDE_MCS_FEEDBACK 0
2037#define RESERVE_VALUE_FOR_STA_MCS_FEEDBACK 1
2038#define STA_PROVIDE_UNSOLICITED_MCS_FEEDBACK 2
2039#define STA_PROVIDE_ON_MRQ_AND_UNSOLICITED_MCS_FEEDBACK 3
2040
2041// Typedef Transmit Beamforming Capability
2042#define TX_BEAMFORMING_CAPABLE 1
2043#define TX_BEAMFORMING_INCAPABLE 0
2044#define CAPABLE_RECEIVE_STAGGERED_SOUNDING 1
2045#define NOT_CAPABLE_RECEIVE_STAGGERED_SOUNDING 0
2046#define CAPABLE_TRANSMIT_STAGGERED_SOUNDING 1
2047#define NOT_CAPABLE_TRANSMIT_STAGGERED_SOUNDING 0
2048#define CAPABLE_RECEIVE_ZLF 1
2049#define NOT_CAPABLE_RECEIVE_ZLF 0
2050#define CAPABLE_TRANSMIT_ZLF 1
2051#define NOT_CAPABLE_TRANSMIT_ZLF 0
2052#define CAPABLE_IMPLICIT_TXBF 1
2053#define NOT_CAPABLE_IMPLICIT_TXBF 0
2054#define INCAPABLE_CALIBRATION 0
2055#define LIMITED_CALIBRATION_CANNOT_INITIATE 1
2056#define LIMITED_CALIBRATION_CAN_INITIATE 2
2057#define FULLT_CAPABLE_CALIBRATION 3
2058#define CAPABLE_EXPLICIT_CSI_TXBF 1
2059#define INCAPABLE_EXPLICIT_CSI_TXBF 0
2060#define CAPABLE_EXPLICIT_UNCOMPRESSED_STEERING_MATRIX 1
2061#define INCAPABLE_EXPLICIT_UNCOMPRESSED_STEERING_MATRIX 0
2062#define INCAPABLE_EXPLICIT_BFCI_FEEDBACK 0
2063#define CAPABLE_UNSOLICITED_BFCI_FEEDBACK 1
2064#define CAPABLE_IMMEDIATE_BFCI_FEEDBACK 2
2065#define CAPABLE_AGGREGATE_BFCI_FEEDBACK 4
2066#define INCAPABLE_EXPLICIT_UNCOMPRESSED_STEERING_MATRIX_FEEDBAC 0
2067#define CAPABLE_UNSOLICITED_UNCOMPRESSED_STEERING_MATRIX 1
2068#define CAPABLE_IMMEDIATE_UNCOMPRESSED_STEERING_MATRIX 2
2069#define CAPABLE_AGGREGATED_UNCOMPRESSED_STEERING_MATRIX 4
2070#define INCAPABLE_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBAC 0
2071#define CAPABLE_UNSOLICITED_COMPRESSED_STEERING_MATRIX 1
2072#define CAPABLE_IMMEDIATE_COMPRESSED_STEERING_MATRIX 2
2073#define CAPABLE_AGGREGATED_COMPRESSED_STEERING_MATRIX 4
2074#define SUPPORT_CSI_BEAMFORMING_SINGLE_TX_ANTENNA_SOUNDING 0
2075#define SUPPORT_CSI_BEAMFORMING_2_TX_ANTENNA_SOUNDING 1
2076#define SUPPORT_CSI_BEAMFORMING_3_TX_ANTENNA_SOUNDING 2
2077#define SUPPORT_CSI_BEAMFORMING_4_TX_ANTENNA_SOUNDING 3
2078#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_1_TX_ANTENNA_SOUNDING 0
2079#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_2_TX_ANTENNA_SOUNDING 1
2080#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_3_TX_ANTENNA_SOUNDING 2
2081#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_4_TX_ANTENNA_SOUNDING 3
2082#define SUPPORT_COMPRESSED_STEERING_MATRIX_1_TX_ANTENNA_SOUNDING 0
2083#define SUPPORT_COMPRESSED_STEERING_MATRIX_2_TX_ANTENNA_SOUNDING 1
2084#define SUPPORT_COMPRESSED_STEERING_MATRIX_3_TX_ANTENNA_SOUNDING 2
2085#define SUPPORT_COMPRESSED_STEERING_MATRIX_4_TX_ANTENNA_SOUNDING 3
2086
2087// Typedef Antenna Selection Capability
2088#define CAPABLE_ANTENNA_SELECTION 1
2089#define INCAPABLE_ANTENNA_SELECTION 0
2090#define CAPABLE_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS 1
2091#define INCAPABLE_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS 0
2092#define CAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 1
2093#define INCAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 0
2094#define CAPABLE_EXPLICIT_CSI_FEEDBACK 1
2095#define INCAPABLE_EXPLICIT_CSI_FEEDBACK 0
2096#define CAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 1
2097#define INCAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 0
2098#define CAPABLE_RX_AS 1
2099#define INCAPABLE_RX_AS 0
2100#define CAPABLE_TRANSMIT_SOUNDING_PPDU 1
2101#define INCAPABLE_TRANSMIT_SOUNDING_PPDU 0
2102
2103// Typedef Additional HT Infomation Elements
2104#define CONTROL_CHANNEL_1 1
2105
2106#define OFFSET_NO_EXTENSION_CHANNEL_IS_PRESENT 0
2107#define OFFSET_EXTENSION_CHANNEL_ABOVE_CONTROL_CHANNEL 1
2108#define OFFSET_EXTENSION_CHANNEL_BELOW_CONTROL_CHANNEL 3
2109#define USE_20_MHZ_CONTROL_CHANNEL 0
2110#define USE_ANY_SUPPORTED_CHANNEL_WIDTH 1
2111#define USE_RIFS_MODE_PROHIBITED 0
2112#define USE_RIFS_MODE_PERMITTED 1
2113#define CONTROLLED_ACCESS_NOT_ONLY_PSMP 0
2114#define CONTROLLED_ACCESS_ONLY_PSMP 1
2115#define SERVICE_INTERVAL_GRANULARITY_5MS 0
2116#define SERVICE_INTERVAL_GRANULARITY_10MS 1
2117#define SERVICE_INTERVAL_GRANULARITY_15MS 2
2118#define SERVICE_INTERVAL_GRANULARITY_20MS 3
2119#define SERVICE_INTERVAL_GRANULARITY_25MS 4
2120#define SERVICE_INTERVAL_GRANULARITY_30MS 5
2121#define SERVICE_INTERVAL_GRANULARITY_35MS 6
2122#define SERVICE_INTERVAL_GRANULARITY_40MS 7
2123
2124#define OPERATION_MODE_PURE_NO_PROTECTION 0
2125#define OPERATION_MODE_OPTIONAL_PROTECTION 1
2126#define OPERATION_MODE_NO_LEGACY_STA_40MHZ_PROTECTED 2
2127#define OPERATION_MODE_MIXED_PROTECTION 3
2128
2129#define DUAL_CTS_PROTECTION_IS_USED 1
2130#define REGULAR_RTS_CTS_IS_USED 0
2131#define SECONDARY_BEACON 1
2132#define PRIMARY_BEACON 0
2133#define LSIG_TXOP_PROTECTION_FULL_SUPPORT 1
2134#define LSIG_TXOP_PROTECTION_NOT_FULL_SUPPORT 0
2135#define PCO_IS_ACTIVATED_IN_BSS 1
2136#define PCO_IS_NOT_ACTIVATED_IN_BSS 0
2137#define PCO_PHASE_REQUEST_SWITCH_KEEP_TO_20MHZ 0
2138#define PCO_PHASE_REQUEST_SWITCH_KEEP_TO_40MHZ 1
2139#endif
2140
2141//
2142// The following enums will be used to get the "current" HT Capabilities of
2143// the local STA in a generic fashion. In other words, the following enums
2144// identify the HT capabilities that can be queried or set.
2145//
2146typedef enum eHTCapability
2147{
2148 eHT_LSIG_TXOP_PROTECTION,
2149 eHT_STBC_CONTROL_FRAME,
2150 eHT_PSMP,
2151 eHT_DSSS_CCK_MODE_40MHZ,
2152 eHT_MAX_AMSDU_LENGTH,
2153 eHT_DELAYED_BA,
2154 eHT_RX_STBC,
2155 eHT_TX_STBC,
2156 eHT_SHORT_GI_40MHZ,
2157 eHT_SHORT_GI_20MHZ,
2158 eHT_GREENFIELD,
2159 eHT_MIMO_POWER_SAVE,
2160 eHT_SUPPORTED_CHANNEL_WIDTH_SET,
2161 eHT_ADVANCED_CODING,
2162 eHT_MAX_RX_AMPDU_FACTOR,
2163 eHT_MPDU_DENSITY,
2164 eHT_PCO,
2165 eHT_TRANSITION_TIME,
2166 eHT_MCS_FEEDBACK,
2167 eHT_TX_BEAMFORMING,
2168 eHT_ANTENNA_SELECTION,
2169 // The following come under Additional HT Capabilities
2170 eHT_SI_GRANULARITY,
2171 eHT_CONTROLLED_ACCESS,
2172 eHT_RIFS_MODE,
2173 eHT_RECOMMENDED_TX_WIDTH_SET,
2174 eHT_EXTENSION_CHANNEL_OFFSET,
2175 eHT_OP_MODE,
2176 eHT_BASIC_STBC_MCS,
2177 eHT_DUAL_CTS_PROTECTION,
2178 eHT_LSIG_TXOP_PROTECTION_FULL_SUPPORT,
2179 eHT_PCO_ACTIVE,
2180 eHT_PCO_PHASE
2181} tHTCapability;
2182
2183// HT Capabilities Info
2184typedef __ani_attr_pre_packed struct sSirMacHTCapabilityInfo
2185{
2186#ifndef ANI_LITTLE_BIT_ENDIAN
2187 tANI_U16 lsigTXOPProtection:1; // Dynamic state
2188 tANI_U16 stbcControlFrame:1; // Static via CFG
2189 tANI_U16 psmp:1; // Static via CFG
2190 tANI_U16 dsssCckMode40MHz:1; // Static via CFG
2191 tANI_U16 maximalAMSDUsize:1; // Static via CFG
2192 tANI_U16 delayedBA:1; // Static via CFG
2193 tANI_U16 rxSTBC:2; // Static via CFG
2194 tANI_U16 txSTBC:1; // Static via CFG
2195 tANI_U16 shortGI40MHz:1; // Static via CFG
2196 tANI_U16 shortGI20MHz:1; // Static via CFG
2197 tANI_U16 greenField:1; // Static via CFG
2198 tANI_U16 mimoPowerSave:2; // Dynamic state
2199 tANI_U16 supportedChannelWidthSet:1; // Static via CFG
2200 tANI_U16 advCodingCap:1; // Static via CFG
2201#else
2202 tANI_U16 advCodingCap:1;
2203 tANI_U16 supportedChannelWidthSet:1;
2204 tANI_U16 mimoPowerSave:2;
2205 tANI_U16 greenField:1;
2206 tANI_U16 shortGI20MHz:1;
2207 tANI_U16 shortGI40MHz:1;
2208 tANI_U16 txSTBC:1;
2209 tANI_U16 rxSTBC:2;
2210 tANI_U16 delayedBA:1;
2211 tANI_U16 maximalAMSDUsize:1;
2212 tANI_U16 dsssCckMode40MHz:1;
2213 tANI_U16 psmp:1;
2214 tANI_U16 stbcControlFrame:1;
2215 tANI_U16 lsigTXOPProtection:1;
2216#endif
2217} __ani_attr_packed tSirMacHTCapabilityInfo;
2218
2219// HT Parameters Info
2220typedef __ani_attr_pre_packed struct sSirMacHTParametersInfo
2221{
2222#ifndef ANI_LITTLE_BIT_ENDIAN
2223 tANI_U8 reserved:3;
2224 tANI_U8 mpduDensity:3; // Dynamic state
2225 tANI_U8 maxRxAMPDUFactor:2; // Dynamic state
2226#else
2227 tANI_U8 maxRxAMPDUFactor:2;
2228 tANI_U8 mpduDensity:3;
2229 tANI_U8 reserved:3;
2230#endif
2231} __ani_attr_packed tSirMacHTParametersInfo;
2232
2233// Extended HT Capabilities Info
2234typedef __ani_attr_pre_packed struct sSirMacExtendedHTCapabilityInfo
2235{
2236#ifndef ANI_LITTLE_BIT_ENDIAN
2237 tANI_U16 reserved2:6;
2238 tANI_U16 mcsFeedback:2; // Static via CFG
2239 tANI_U16 reserved1:5;
2240 tANI_U16 transitionTime:2; // Static via CFG
2241 tANI_U16 pco:1; // Static via CFG
2242#else
2243 tANI_U16 pco:1;
2244 tANI_U16 transitionTime:2;
2245 tANI_U16 reserved1:5;
2246 tANI_U16 mcsFeedback:2;
2247 tANI_U16 reserved2:6;
2248#endif
2249} __ani_attr_packed tSirMacExtendedHTCapabilityInfo;
2250
2251//IEEE 802.11n/D7.0 - 7.3.2.57.4
2252//Part of the "supported MCS set field"
2253typedef __ani_attr_pre_packed struct sSirMacRxHighestSupportRate
2254{
2255#ifndef ANI_LITTLE_BIT_ENDIAN
2256 tANI_U16 reserved : 6;
2257 tANI_U16 rate : 10;
2258#else
2259 tANI_U16 rate : 10;
2260 tANI_U16 reserved : 6;
2261#endif
2262} __ani_attr_packed tSirMacRxHighestSupportRate, *tpSirMacRxHighestSupportRate;
2263
2264
2265// Transmit Beam Forming Capabilities Info
2266typedef __ani_attr_pre_packed struct sSirMacTxBFCapabilityInfo
2267{
2268#ifndef ANI_LITTLE_BIT_ENDIAN
2269 tANI_U32 reserved:7;
2270 tANI_U32 compressedSteeringMatrixBFAntennae:2; // Static via CFG
2271 tANI_U32 uncompressedSteeringMatrixBFAntennae:2; // Static via CFG
2272 tANI_U32 csiNumBFAntennae:2; // Static via CFG
2273 tANI_U32 explicitCompressedSteeringMatrixFeedback:3; // Static via CFG
2274 tANI_U32 explicitUncompressedSteeringMatrixFeedback:3; // Static via CFG
2275 tANI_U32 explicitBFCSIFeedback:3; // Static via CFG
2276 tANI_U32 explicitUncompressedSteeringMatrix:1; // Static via CFG
2277 tANI_U32 explicitCSITxBF:1; // Static via CFG
2278 tANI_U32 calibration:2; // Static via CFG
2279 tANI_U32 implicitTxBF:1; // Static via CFG
2280 tANI_U32 txZLF:1; // Static via CFG
2281 tANI_U32 rxZLF:1; // Static via CFG
2282 tANI_U32 txStaggeredSounding:1; // Static via CFG
2283 tANI_U32 rxStaggeredSounding:1; // Static via CFG
2284 tANI_U32 txBF:1; // Static via CFG
2285#else
2286 tANI_U32 txBF:1;
2287 tANI_U32 rxStaggeredSounding:1;
2288 tANI_U32 txStaggeredSounding:1;
2289 tANI_U32 rxZLF:1;
2290 tANI_U32 txZLF:1;
2291 tANI_U32 implicitTxBF:1;
2292 tANI_U32 calibration:2;
2293 tANI_U32 explicitCSITxBF:1;
2294 tANI_U32 explicitUncompressedSteeringMatrix:1;
2295 tANI_U32 explicitBFCSIFeedback:3;
2296 tANI_U32 explicitUncompressedSteeringMatrixFeedback:3;
2297 tANI_U32 explicitCompressedSteeringMatrixFeedback:3;
2298 tANI_U32 csiNumBFAntennae:2;
2299 tANI_U32 uncompressedSteeringMatrixBFAntennae:2;
2300 tANI_U32 compressedSteeringMatrixBFAntennae:2;
2301 tANI_U32 reserved:7;
2302#endif
2303} __ani_attr_packed tSirMacTxBFCapabilityInfo;
2304
2305// Antenna Selection Capability Info
2306typedef __ani_attr_pre_packed struct sSirMacASCapabilityInfo
2307{
2308#ifndef ANI_LITTLE_BIT_ENDIAN
2309 tANI_U8 reserved2:1;
2310 tANI_U8 txSoundingPPDUs:1; // Static via CFG
2311 tANI_U8 rxAS:1; // Static via CFG
2312 tANI_U8 antennaIndicesFeedback:1; // Static via CFG
2313 tANI_U8 explicitCSIFeedback:1; // Static via CFG
2314 tANI_U8 antennaIndicesFeedbackTx:1; // Static via CFG
2315 tANI_U8 explicitCSIFeedbackTx:1; // Static via CFG
2316 tANI_U8 antennaSelection:1; // Static via CFG
2317#else
2318 tANI_U8 antennaSelection:1;
2319 tANI_U8 explicitCSIFeedbackTx:1;
2320 tANI_U8 antennaIndicesFeedbackTx:1;
2321 tANI_U8 explicitCSIFeedback:1;
2322 tANI_U8 antennaIndicesFeedback:1;
2323 tANI_U8 rxAS:1;
2324 tANI_U8 txSoundingPPDUs:1;
2325 tANI_U8 reserved2:1;
2326#endif
2327} __ani_attr_packed tSirMacASCapabilityInfo;
2328
2329// Additional HT IE Field1
2330typedef __ani_attr_pre_packed struct sSirMacHTInfoField1
2331{
2332#ifndef ANI_LITTLE_BIT_ENDIAN
2333 tANI_U8 serviceIntervalGranularity:3; // Dynamic state
2334 tANI_U8 controlledAccessOnly:1; // Static via CFG
2335 tANI_U8 rifsMode:1; // Dynamic state
2336 tANI_U8 recommendedTxWidthSet:1; // Dynamic state
2337 tANI_U8 secondaryChannelOffset:2; // Dynamic state
2338#else
2339 tANI_U8 secondaryChannelOffset:2;
2340 tANI_U8 recommendedTxWidthSet:1;
2341 tANI_U8 rifsMode:1;
2342 tANI_U8 controlledAccessOnly:1;
2343 tANI_U8 serviceIntervalGranularity:3;
2344#endif
2345} __ani_attr_packed tSirMacHTInfoField1;
2346
2347// Additional HT IE Field2
2348typedef __ani_attr_pre_packed struct sSirMacHTInfoField2
2349{
2350#ifndef ANI_LITTLE_BIT_ENDIAN
2351 tANI_U16 reserved:11;
2352 tANI_U16 obssNonHTStaPresent:1; /*added for Obss */
2353 tANI_U16 transmitBurstLimit: 1;
2354 tANI_U16 nonGFDevicesPresent:1;
2355 tANI_U16 opMode:2; // Dynamic state
2356#else
2357 tANI_U16 opMode:2;
2358 tANI_U16 nonGFDevicesPresent:1;
2359 tANI_U16 transmitBurstLimit: 1;
2360 tANI_U16 obssNonHTStaPresent:1; /*added for Obss */
2361 tANI_U16 reserved:11;
2362#endif
2363} __ani_attr_packed tSirMacHTInfoField2;
2364
2365// Additional HT IE Field3
2366typedef __ani_attr_pre_packed struct sSirMacHTInfoField3
2367{
2368#ifndef ANI_LITTLE_BIT_ENDIAN
2369 tANI_U16 reserved:4;
2370 tANI_U16 pcoPhase:1; // Dynamic state
2371 tANI_U16 pcoActive:1; // Dynamic state
2372 tANI_U16 lsigTXOPProtectionFullSupport:1; // Dynamic state
2373 tANI_U16 secondaryBeacon:1; // Dynamic state
2374 tANI_U16 dualCTSProtection:1; // Dynamic state
2375 tANI_U16 basicSTBCMCS:7; // Dynamic state
2376#else
2377 tANI_U16 basicSTBCMCS:7;
2378 tANI_U16 dualCTSProtection:1;
2379 tANI_U16 secondaryBeacon:1;
2380 tANI_U16 lsigTXOPProtectionFullSupport:1;
2381 tANI_U16 pcoActive:1;
2382 tANI_U16 pcoPhase:1;
2383 tANI_U16 reserved:4;
2384#endif
2385} __ani_attr_packed tSirMacHTInfoField3;
2386
2387typedef __ani_attr_pre_packed struct sSirMacProbeReqFrame
2388{
2389 tSirMacSSidIE ssIdIE;
2390 tSirMacRateSetIE rateSetIE;
2391 tSirMacRateSetIE extendedRateSetIE;
2392} __ani_attr_packed tSirMacProbeReqFrame, *tpSirMacProbeReqFrame;
2393
2394typedef __ani_attr_pre_packed struct sSirMacProbeRspFrame
2395{
2396 tSirMacTimeStamp ts;
2397 tSirMacBeaconInterval beaconInterval;
2398 tSirMacCapabilityInfo capabilityInfo;
2399 tSirMacSSidIE ssIdIE;
2400 tSirMacRateSetIE rateSetIE;
2401 tSirMacRateSetIE extendedRateSetIE;
2402 tSirMacNonErpPresentIE nonErpPresent;
2403 tSirMacDsParamSetIE dsParamsIE;
2404 tSirMacCfParamSetIE cfParamsIE;
2405} __ani_attr_packed tSirMacProbeRspFrame, *tpSirMacProbeRspFrame;
2406
2407typedef __ani_attr_pre_packed struct sSirMacAuthFrameBody
2408{
2409 tANI_U16 authAlgoNumber;
2410 tANI_U16 authTransactionSeqNumber;
2411 tANI_U16 authStatusCode;
2412 tANI_U8 type; // = SIR_MAC_CHALLENGE_TEXT_EID
2413 tANI_U8 length; // = SIR_MAC_AUTH_CHALLENGE_LENGTH
2414 tANI_U8 challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH];
2415} __ani_attr_packed tSirMacAuthFrameBody, *tpSirMacAuthFrameBody;
2416
2417typedef __ani_attr_pre_packed struct sSirMacAuthenticationFrame
2418{
2419 tSirMacAuthFrameBody authFrameBody;
2420} __ani_attr_packed tSirMacAuthFrame, *tpSirMacAuthFrame;
2421
2422typedef __ani_attr_pre_packed struct sSirMacAssocReqFrame
2423{
2424 tSirMacCapabilityInfo capabilityInfo;
2425 tANI_U16 listenInterval;
2426 tSirMacSSidIE ssIdIE;
2427 tSirMacRateSetIE rateSetIE;
2428 tSirMacRateSetIE extendedRateSetIE;
2429} __ani_attr_packed tSirMacAssocReqFrame, *tpSirMacAssocReqFrame;
2430
2431typedef __ani_attr_pre_packed struct sSirMacAssocRspFrame
2432{
2433 tSirMacCapabilityInfo capabilityInfo;
2434 tANI_U16 statusCode;
2435 tANI_U16 aid;
2436 tSirMacRateSetIE supportedRates;
2437 tSirMacRateSetIE extendedRateSetIE;
2438} __ani_attr_packed tSirMacAssocRspFrame, *tpSirMacAssocRspFrame;
2439
2440typedef __ani_attr_pre_packed struct sSirMacDisassocFrame
2441{
2442 tANI_U16 reasonCode;
2443} __ani_attr_packed tSirMacDisassocFrame, *tpSirMacDisassocFrame;
2444
2445typedef __ani_attr_pre_packed struct sDSirMacDeauthFrame
2446{
2447 tANI_U16 reasonCode;
2448} __ani_attr_packed tSirMacDeauthFrame, *tpSirMacDeauthFrame;
2449
2450/// Common header for all action frames
2451typedef __ani_attr_pre_packed struct sSirMacActionFrameHdr
2452{
2453 tANI_U8 category;
2454 tANI_U8 actionID;
2455} __ani_attr_packed tSirMacActionFrameHdr, *tpSirMacActionFrameHdr;
2456
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002457#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002458typedef __ani_attr_pre_packed struct sSirMacVendorSpecificFrameHdr
2459{
2460 tANI_U8 category;
2461 tANI_U8 Oui[4];
2462} __ani_attr_packed tSirMacVendorSpecificFrameHdr, *tpSirMacVendorSpecificFrameHdr;
2463#endif
2464
Abhishek Singh00b71972016-01-07 10:51:04 +05302465#ifdef WLAN_FEATURE_RMC
2466typedef __ani_attr_pre_packed struct sSirMacIbssExtNetworkFrameHdr
2467{
2468 tANI_U8 category;
2469 tANI_U8 Oui[3];
2470 tANI_U8 MagicCode[6];
2471 tANI_U8 version;
2472 tANI_U8 actionID;
2473 tANI_U32 dialogToken;
2474} __ani_attr_packed tSirMacIbssExtNetworkFrameHdr, *tpSirMacIbssExtNetworkFrameHdr;
2475#endif /* WLAN_FEATURE_RMC */
2476
Jeff Johnson295189b2012-06-20 16:38:30 -07002477typedef __ani_attr_pre_packed struct sSirMacVendorSpecificPublicActionFrameHdr
2478{
2479 tANI_U8 category;
2480 tANI_U8 actionID;
2481 tANI_U8 Oui[4];
2482 tANI_U8 OuiSubType;
2483 tANI_U8 dialogToken;
2484} __ani_attr_packed tSirMacVendorSpecificPublicActionFrameHdr, *tpSirMacVendorSpecificPublicActionFrameHdr;
2485
2486typedef __ani_attr_pre_packed struct sSirMacP2PActionFrameHdr
2487{
2488 tANI_U8 category;
2489 tANI_U8 Oui[4];
2490 tANI_U8 OuiSubType;
2491 tANI_U8 dialogToken;
2492} __ani_attr_packed tSirMacP2PActionFrameHdr, *tpSirMacP2PActionFrameHdr;
2493
2494
Jeff Johnson295189b2012-06-20 16:38:30 -07002495
2496typedef struct sSirMacMeasActionFrameHdr
2497{
2498 tANI_U8 category;
2499 tANI_U8 actionID;
2500 tANI_U8 dialogToken;
2501} tSirMacMeasActionFrameHdr, *tpSirMacMeasActionFrameHdr;
2502
2503
2504#ifdef ANI_SUPPORT_11H
2505typedef struct sSirMacTpcReqActionFrame
2506{
2507 tSirMacMeasActionFrameHdr actionHeader;
2508 tANI_U8 type;
2509 tANI_U8 length;
2510} tSirMacTpcReqActionFrame, *tpSirMacTpcReqActionFrame;
2511
2512typedef struct sSirMacMeasReqActionFrame
2513{
2514 tSirMacMeasActionFrameHdr actionHeader;
2515 tSirMacMeasReqIE measReqIE;
2516} tSirMacMeasReqActionFrame, *tpSirMacMeasReqActionFrame;
2517#endif
2518
2519typedef struct sSirMacBasicMeasReportActionFrame
2520{
2521 tSirMacMeasActionFrameHdr actionHeader;
2522 tSirMacBasicReportIE measReportIE;
2523} tSirMacBasicMeasReportActionFrame, *tpSirMacBasicMeasReportActionFrame;
2524
2525typedef struct sSirMacCcaMeasReportActionFrame
2526{
2527 tSirMacMeasActionFrameHdr actionHeader;
2528 tSirMacCcaReportIE measReportIE;
2529} tSirMacCcaMeasReportActionFrame, *tpSirMacCcaMeasReportActionFrame;
2530
2531typedef struct sSirMacRpiMeasReportActionFrame
2532{
2533 tSirMacMeasActionFrameHdr actionHeader;
2534 tSirMacRpiReportIE measReportIE;
2535} tSirMacRpiMeasReportActionFrame, *tpSirMacRpiMeasReportActionFrame;
2536
2537#if defined WLAN_FEATURE_VOWIFI
2538
2539typedef struct sSirMacNeighborReportReq
2540{
2541 tANI_U8 dialogToken;
2542 tANI_U8 ssid_present;
2543 tSirMacSSid ssid;
2544} tSirMacNeighborReportReq, *tpSirMacNeighborReportReq;
2545
2546typedef struct sSirMacLinkReport
2547{
2548 tANI_U8 dialogToken;
2549 tANI_U8 txPower;
2550 tANI_U8 rxAntenna;
2551 tANI_U8 txAntenna;
2552 tANI_U8 rcpi;
2553 tANI_U8 rsni;
2554} tSirMacLinkReport, *tpSirMacLinkReport;
2555
2556#define BEACON_REPORT_MAX_IES 224 //Refer IEEE 802.11k-2008, Table 7-31d
2557typedef struct sSirMacBeaconReport
2558{
2559 tANI_U8 regClass;
2560 tANI_U8 channel;
2561 tANI_U8 measStartTime[8];
2562 tANI_U8 measDuration;
2563 tANI_U8 phyType;
2564 tANI_U8 bcnProbeRsp;
2565 tANI_U8 rsni;
2566 tANI_U8 rcpi;
2567 tSirMacAddr bssid;
2568 tANI_U8 antennaId;
2569 tANI_U32 parentTSF;
2570 tANI_U8 numIes;
2571 tANI_U8 Ies[BEACON_REPORT_MAX_IES];
2572
2573} tSirMacBeaconReport, *tpSirMacBeaconReport;
2574
2575#define RADIO_REPORTS_MAX_IN_A_FRAME 4
2576typedef struct sSirMacRadioMeasureReport
2577{
2578 tANI_U8 token;
2579 tANI_U8 refused;
2580 tANI_U8 incapable;
2581 tANI_U8 type;
2582 union
2583 {
2584 tSirMacBeaconReport beaconReport;
2585 }report;
2586
2587}tSirMacRadioMeasureReport, *tpSirMacRadioMeasureReport;
2588
2589#endif
2590
2591// QOS action frame definitions
2592
2593// max number of possible tclas elements in any frame
2594#define SIR_MAC_TCLASIE_MAXNUM 2
2595
2596// ADDTS request
2597typedef __ani_attr_pre_packed struct sSirMacQosAddtsReqAF
2598{
2599 tSirMacActionFrameHdr afHdr;
2600 tANI_U8 dlgToken;
2601 tSirMacTspecIE tspec;
2602 tANI_U8 tclas[1]; // variable length element
2603} __ani_attr_packed tSirMacQosAddtsReqAF;
2604
2605// ADDTS response
2606typedef __ani_attr_pre_packed struct sSirMacQosAddtsRspAF
2607{
2608 tSirMacActionFrameHdr afHdr;
2609 tANI_U8 dlgToken;
2610 tSirMacStatusCodes status;
2611 tSirMacTsDelayIE delay;
2612 tSirMacTspecIE tspec;
2613 tANI_U8 tclas[1];
2614} __ani_attr_packed tSirMacQosAddtsRspAF;
2615
2616// DELTS frame
2617typedef __ani_attr_pre_packed struct sSirMacQosDeltsAF
2618{
2619 tSirMacActionFrameHdr afHdr;
2620 tSirMacTSInfo tsinfo;
2621} __ani_attr_packed tSirMacQosDeltsAF;
2622
2623// Schedule frame
2624typedef __ani_attr_pre_packed struct sSirMacQosScheduleAF
2625{
2626 tSirMacActionFrameHdr afHdr;
2627 tSirMacScheduleIE schedule;
2628} __ani_attr_packed tSirMacQosScheduleAF;
2629
2630// DLP action frame definitions
2631
2632// DLP request
2633typedef __ani_attr_pre_packed struct sSirMacQosDlpReqAF
2634{
2635 tSirMacActionFrameHdr afHdr;
2636 tANI_U8 dstMAC[6];
2637 tANI_U8 srcMAC[6];
2638 tSirMacQosCapabilityIE qosCapability;
2639 tANI_U16 dlpTimeout;
2640 tSirMacRateSetIE supportedRates;
2641} __ani_attr_packed tSirMacQosDlpReqAF;
2642
2643// DLP response
2644typedef __ani_attr_pre_packed struct sSirMacQosDlpRspAF
2645{
2646 tSirMacActionFrameHdr afHdr;
2647 tANI_U8 dstMAC[6];
2648 tANI_U8 srcMAC[6];
2649 tSirMacStatusCodes status;
2650 tSirMacQosCapabilityIE qosCapability;
2651 tSirMacRateSetIE supportedRates;
2652} __ani_attr_packed tSirMacQosDlpRspAF;
2653
2654// DLP teardown
2655typedef __ani_attr_pre_packed struct sSirMacQosDlpTdnAF
2656{
2657 tSirMacActionFrameHdr afHdr;
2658 tANI_U8 dstMAC[6];
2659 tANI_U8 srcMAC[6];
2660} __ani_attr_packed tSirMacQosDlpTdnAF;
2661
2662
2663
2664
2665//
2666/// Common header for all ANI proprietary action frames
2667typedef __ani_attr_pre_packed struct sSirMacAniActionFrame
2668{
2669 tSirMacActionFrameHdr afHdr;
2670 tANI_U8 aniOui[3]; // 00 0A F5
2671 tANI_U8 type; // 0 - request; 1 - report; 2 - snr
2672} __ani_attr_packed tSirMacAniActionFrame, *tpSirMacAniActionFrame;
2673
2674
2675typedef __ani_attr_pre_packed struct sSirMacLinkTestReqData
2676{
2677 tSirMacAniActionFrame hdr;
2678 tANI_U8 frameStatus; // bit0 - first frame
2679 // bit1 - last frame;
2680 // if both bit0/1 are on,
2681 // intermediate frame
2682 // bit2-7 - reserved
2683 tANI_U8 rate;
2684 tANI_U8 randomData[SIR_MAC_MAX_RANDOM_LENGTH];
2685} __ani_attr_packed tSirMacLinkTestReqData, *tpSirMacLinkTestReqData;
2686
2687/// SNR report specific fields
2688typedef __ani_attr_pre_packed struct sSirMacSnrReport
2689{
2690 tSirMacAniActionFrame hdr;
2691 tANI_U32 numSamples;
2692 tANI_U32 snr;
2693 tANI_U32 snrComp;
2694 tANI_U32 sq;
2695 tANI_U32 rssi;
2696} __ani_attr_packed tSirMacSnrReport, *tpSirMacSnrReport;
2697
2698typedef __ani_attr_pre_packed struct sSirMacStaCbLegacyBssDetect
2699{
2700 tSirMacAniActionFrame hdr;
2701 tANI_U8 channelNum;
2702 tANI_U8 numLegacyBssid;
2703 /* Below is declared as a place holder. Don't add anything after it since LegacyBssidList will take up memory after it */
2704 tANI_U8 LegacyBssidList[1]; /* Need to declare size 1 cause win build doesn't like size 0 */
2705} __ani_attr_packed tSirMacStaCbLegacyBssDetect, *tpSirMacStaCbLegacyBssDetect;
2706
2707typedef __ani_attr_pre_packed struct sSirMacQoSDefBAReq
2708{
2709 tSirMacActionFrameHdr hdr;
2710
2711 tANI_U8 rsvd1;
2712
2713#ifdef ANI_LITTLE_BIT_ENDIAN
2714 tANI_U8 tid: 4;
2715 tANI_U8 rsvd2: 4;
2716#else
2717 tANI_U8 rsvd2: 4;
2718 tANI_U8 tid: 4;
2719#endif
2720} __ani_attr_packed tSirMacQoSDefBAReq, *tpSirMacQoSDefBAReq;
2721
2722typedef __ani_attr_pre_packed struct sSirMacQoSDefBARsp
2723{
2724 tSirMacActionFrameHdr hdr;
2725
2726#ifdef ANI_LITTLE_BIT_ENDIAN
2727 tANI_U8 tid: 4;
2728 tANI_U8 policy: 1;
2729 tANI_U8 reject: 1;
2730 tANI_U8 rsvd1: 2;
2731#else
2732 tANI_U8 rsvd1: 2;
2733 tANI_U8 reject: 1;
2734 tANI_U8 policy: 1;
2735 tANI_U8 tid: 4;
2736#endif
2737
2738 tANI_U8 bufferSize;
2739} __ani_attr_packed tSirMacQoSDefBARsp, *tpSirMacQoSDefBARsp;
2740
2741typedef __ani_attr_pre_packed struct sSirMacQoSDelBAReq
2742{
2743 tSirMacActionFrameHdr hdr;
2744 tANI_U8 rsvd1;
2745
2746#ifdef ANI_LITTLE_BIT_ENDIAN
2747 tANI_U8 rsvd2: 3;
2748 tANI_U8 direction: 1;
2749 tANI_U8 tid: 4;
2750#else
2751 tANI_U8 tid: 4;
2752 tANI_U8 direction: 1;
2753 tANI_U8 rsvd2: 3;
2754#endif
2755} __ani_attr_packed tSirMacQoSDelBAReq, *tpSirMacQoSDelBAReq;
2756
2757typedef __ani_attr_pre_packed struct sSirMacQoSDelBARsp
2758{
2759 tSirMacActionFrameHdr hdr;
2760
2761#ifdef ANI_LITTLE_BIT_ENDIAN
2762 tANI_U8 tid: 4;
2763 tANI_U8 policy: 1;
2764 tANI_U8 reject: 1;
2765 tANI_U8 rsvd1: 2;
2766#else
2767 tANI_U8 rsvd1: 2;
2768 tANI_U8 reject: 1;
2769 tANI_U8 policy: 1;
2770 tANI_U8 tid: 4;
2771#endif
2772
2773} __ani_attr_packed tSirMacQoSDelBARsp, *tpSirMacQoSDelBARsp;
2774
2775
2776
2777// 11b rate encoding in MAC format
2778
2779#define SIR_MAC_RATE_1 0x02
2780#define SIR_MAC_RATE_2 0x04
2781#define SIR_MAC_RATE_5_5 0x0B
2782#define SIR_MAC_RATE_11 0x16
2783
2784// 11a/g rate encoding in MAC format
2785
2786#define SIR_MAC_RATE_6 0x0C
2787#define SIR_MAC_RATE_9 0x12
2788#define SIR_MAC_RATE_12 0x18
2789#define SIR_MAC_RATE_18 0x24
2790#define SIR_MAC_RATE_24 0x30
2791#define SIR_MAC_RATE_36 0x48
2792#define SIR_MAC_RATE_48 0x60
2793#define SIR_MAC_RATE_54 0x6C
2794
2795// ANI legacy supported rates
2796#define SIR_MAC_RATE_72 0x01
2797#define SIR_MAC_RATE_96 0x03
2798#define SIR_MAC_RATE_108 0x05
2799
2800// ANI enhanced rates
2801#define SIR_MAC_RATE_42 1000
2802#define SIR_MAC_RATE_84 1001
2803#define SIR_MAC_RATE_126 1002
2804#define SIR_MAC_RATE_144 1003
2805#define SIR_MAC_RATE_168 1004
2806#define SIR_MAC_RATE_192 1005
2807#define SIR_MAC_RATE_216 1006
2808#define SIR_MAC_RATE_240 1007
2809
Masti, Narayanraddi3f5affe2015-01-08 12:10:08 +05302810#define SIR_MAC_RATE_1_BITMAP (1<<0)
2811#define SIR_MAC_RATE_2_BITMAP (1<<1)
2812#define SIR_MAC_RATE_5_5_BITMAP (1<<2)
2813#define SIR_MAC_RATE_11_BITMAP (1<<3)
2814#define SIR_MAC_RATE_6_BITMAP (1<<4)
2815#define SIR_MAC_RATE_9_BITMAP (1<<5)
2816#define SIR_MAC_RATE_12_BITMAP (1<<6)
2817#define SIR_MAC_RATE_18_BITMAP (1<<7)
2818#define SIR_MAC_RATE_24_BITMAP (1<<8)
2819#define SIR_MAC_RATE_36_BITMAP (1<<9)
2820#define SIR_MAC_RATE_48_BITMAP (1<<10)
2821#define SIR_MAC_RATE_54_BITMAP (1<<11)
Jeff Johnson295189b2012-06-20 16:38:30 -07002822
2823#define sirIsArate(x) ((((tANI_U8)x)==SIR_MAC_RATE_6) || \
2824 (((tANI_U8)x)==SIR_MAC_RATE_9) || \
2825 (((tANI_U8)x)==SIR_MAC_RATE_12)|| \
2826 (((tANI_U8)x)==SIR_MAC_RATE_18)|| \
2827 (((tANI_U8)x)==SIR_MAC_RATE_24)|| \
2828 (((tANI_U8)x)==SIR_MAC_RATE_36)|| \
2829 (((tANI_U8)x)==SIR_MAC_RATE_48)|| \
2830 (((tANI_U8)x)==SIR_MAC_RATE_54))
2831
2832#define sirIsBrate(x) ((((tANI_U8)x)==SIR_MAC_RATE_1) || \
2833 (((tANI_U8)x)==SIR_MAC_RATE_2) || \
2834 (((tANI_U8)x)==SIR_MAC_RATE_5_5)|| \
2835 (((tANI_U8)x)==SIR_MAC_RATE_11))
2836
2837#define sirIsGrate(x) ((((tANI_U8)x)==SIR_MAC_RATE_1) || \
2838 (((tANI_U8)x)==SIR_MAC_RATE_2) || \
2839 (((tANI_U8)x)==SIR_MAC_RATE_5_5)|| \
2840 (((tANI_U8)x)==SIR_MAC_RATE_11) || \
2841 (((tANI_U8)x)==SIR_MAC_RATE_6) || \
2842 (((tANI_U8)x)==SIR_MAC_RATE_9) || \
2843 (((tANI_U8)x)==SIR_MAC_RATE_12) || \
2844 (((tANI_U8)x)==SIR_MAC_RATE_18) || \
2845 (((tANI_U8)x)==SIR_MAC_RATE_24) || \
2846 (((tANI_U8)x)==SIR_MAC_RATE_36) || \
2847 (((tANI_U8)x)==SIR_MAC_RATE_48) || \
2848 (((tANI_U8)x)==SIR_MAC_RATE_54))
2849
2850#define sirIsProprate(x) ((((tANI_U8)x)==SIR_MAC_RATE_72) || \
2851 (((tANI_U8)x)==SIR_MAC_RATE_96) || \
2852 (((tANI_U8)x)==SIR_MAC_RATE_108))
2853
2854#define sirIsEnhancedRate(x) \
2855 (((x)==SIR_MAC_RATE_42) || \
2856 ((x)==SIR_MAC_RATE_84) || \
2857 ((x)==SIR_MAC_RATE_126) || \
2858 ((x)==SIR_MAC_RATE_144) || \
2859 ((x)==SIR_MAC_RATE_168) || \
2860 ((x)==SIR_MAC_RATE_192) || \
2861 ((x)==SIR_MAC_RATE_216) || \
2862 ((x)==SIR_MAC_RATE_240))
2863
2864/// Table that has MAC<-->PHY rate encodings
2865typedef __ani_attr_pre_packed struct sSirMacPhyRates
2866{
2867 tANI_U8 rateId;
2868 tANI_U8 phyRate; // Rate in PHY encoding format
2869 tANI_U16 macRate; // Rate in MAC encoding format
2870} __ani_attr_packed tSirMacPhyRates, *tpSirMacPhyRates;
2871
2872
2873typedef __ani_attr_pre_packed struct sSirPhy11aHdr
2874{
2875
2876#ifndef ANI_LITTLE_BIT_ENDIAN
2877
2878 tANI_U8 lengthLo : 3;
2879 tANI_U8 reserved : 1;
2880 tANI_U8 rate : 4;
2881
2882 tANI_U8 lengthMid : 8;
2883
2884 tANI_U8 tail: 6;
2885 tANI_U8 parity : 1;
2886 tANI_U8 lengthHi : 1;
2887
2888 tANI_U8 serviceLo;
2889 tANI_U8 serviceHi;
2890#else
2891 tANI_U8 rate : 4;
2892 tANI_U8 reserved : 1;
2893 tANI_U8 lengthLo : 3;
2894
2895 tANI_U8 lengthMid : 8;
2896
2897 tANI_U8 lengthHi : 1;
2898 tANI_U8 parity : 1;
2899 tANI_U8 tail: 6;
2900
2901 tANI_U8 serviceLo;
2902 tANI_U8 serviceHi;
2903#endif
2904} __ani_attr_packed tSirPhy11aHdr, *tpSirPhy11aHdr;
2905
Leela V Kiran Kumar Reddy Chirala6a458752013-02-16 15:41:27 -08002906#define SIR_MAC_MIN_IE_LEN 2 // Minimum IE length for IE validation
Chet Lanctot8cecea22014-02-11 19:09:36 -08002907
Abhishek Singh00b71972016-01-07 10:51:04 +05302908#ifdef WLAN_FEATURE_RMC
2909
2910// RMC action codes
2911#define SIR_MAC_RMC_ENABLE_REQ 0
2912#define SIR_MAC_RMC_DISABLE_REQ 1
2913#define SIR_MAC_RMC_RULER_INFORM_SELECTED 2
2914#define SIR_MAC_RMC_RULER_INFORM_CANCELLED 3
2915
2916// RMC protocol version
2917#define SIR_MAC_RMC_VER 0x01
2918
2919// Organization Identifier
2920#define SIR_MAC_RMC_OUI "\x00\x16\x32"
2921#define SIR_MAC_RMC_OUI_SIZE 3
2922
2923#define SIR_MAC_RMC_MCAST_ADDRESS "\x01\x00\x5E\x00\x02\x0A"
2924
2925#endif /* WLAN_FEATURE_RMC */
Chet Lanctot8cecea22014-02-11 19:09:36 -08002926
2927#define SIR_MAC_TI_TYPE_REASSOC_DEADLINE 1
2928#define SIR_MAC_TI_TYPE_KEY_LIFETIME 2
2929#define SIR_MAC_TI_TYPE_ASSOC_COMEBACK 3
2930
Jeff Johnson295189b2012-06-20 16:38:30 -07002931#endif /* __MAC_PROT_DEFS_H */