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