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