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