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