blob: 9cb86c7f32d1411089243e716dd44fccf9d7d03d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42/*
43 * Airgo Networks, Inc proprietary. All rights reserved.
44 * This file sirApi.h contains definitions exported by
45 * Sirius software.
46 * Author: Chandra Modumudi
47 * Date: 04/16/2002
48 * History:-
49 * Date Modified by Modification Information
50 * --------------------------------------------------------------------
51 */
52
53#ifndef __SIR_API_H
54#define __SIR_API_H
55
56#include "sirTypes.h"
57#include "sirMacProtDef.h"
58#include "aniSystemDefs.h"
Jeff Johnsone7245742012-09-05 17:12:55 -070059#include "sirParams.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070060
61#ifdef FEATURE_WLAN_CCX
62#include "ccxGlobal.h"
63#endif
64
65/// Maximum number of STAs allowed in the BSS
66#define SIR_MAX_NUM_STA 256
67
68/// Maximum number of Neighbors reported by STA for LB feature
69#define SIR_MAX_NUM_NEIGHBOR_BSS 3
70
71/// Maximum number of Neighbors reported by STA for LB feature
72#define SIR_MAX_NUM_ALTERNATE_RADIOS 5
73
74/// Maximum size of SCAN_RSP message
75#define SIR_MAX_SCAN_RSP_MSG_LENGTH 2600
76
77/// Start of Sirius software/Host driver message types
78#define SIR_HAL_HOST_MSG_START 0x1000
79
80/// Power save level definitions
81#define SIR_MAX_POWER_SAVE 3
82#define SIR_INTERMEDIATE_POWER_SAVE 4
83#define SIR_NO_POWER_SAVE 5
84
85/// Max supported channel list
86#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
87
88/// Maximum DTIM Factor
89#define SIR_MAX_DTIM_FACTOR 32
90
91#define SIR_MDIE_SIZE 3
92
Gopichand Nakkalad492d202013-05-10 02:50:47 +053093/* Max number of channels are 165, but to access 165th element of array,
94 *array of 166 is required.
95 */
96#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
97
Jeff Johnson295189b2012-06-20 16:38:30 -070098
99
100#define SIR_NUM_11B_RATES 4 //1,2,5.5,11
101#define SIR_NUM_11A_RATES 8 //6,9,12,18,24,36,48,54
102#define SIR_NUM_POLARIS_RATES 3 //72,96,108
103#define SIR_NUM_TITAN_RATES 26
104#define SIR_NUM_TAURUS_RATES 4 //136.5, 151.7,283.5,315
105#define SIR_NUM_PROP_RATES (SIR_NUM_TITAN_RATES + SIR_NUM_TAURUS_RATES)
106
107#define SIR_11N_PROP_RATE_136_5 (1<<28)
108#define SIR_11N_PROP_RATE_151_7 (1<<29)
109#define SIR_11N_PROP_RATE_283_5 (1<<30)
110#define SIR_11N_PROP_RATE_315 (1<<31)
111#define SIR_11N_PROP_RATE_BITMAP 0x80000000 //only 315MBPS rate is supported today
112//Taurus is going to support 26 Titan Rates(no ESF/concat Rates will be supported)
113//First 26 bits are reserved for Titan and last 4 bits for Taurus, 2(27 and 28) bits are reserved.
114//#define SIR_TITAN_PROP_RATE_BITMAP 0x03FFFFFF
115//Disable all Titan rates
116#define SIR_TITAN_PROP_RATE_BITMAP 0
117#define SIR_CONVERT_2_U32_BITMAP(nRates) ((nRates + 31)/32)
118
119/* #tANI_U32's needed for a bitmap representation for all prop rates */
120#define SIR_NUM_U32_MAP_RATES SIR_CONVERT_2_U32_BITMAP(SIR_NUM_PROP_RATES)
121
122
123#define SIR_PM_SLEEP_MODE 0
124#define SIR_PM_ACTIVE_MODE 1
125
126// Used by various modules to load ALL CFG's
127#define ANI_IGNORE_CFG_ID 0xFFFF
128
129//hidden SSID options
130#define SIR_SCAN_NO_HIDDEN_SSID 0
131#define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1
132#define SIR_SCAN_HIDDEN_SSID 2
133
134#define SIR_MAC_ADDR_LEN 6
135#define SIR_IPV4_ADDR_LEN 4
136
137typedef tANI_U8 tSirIpv4Addr[SIR_IPV4_ADDR_LEN];
138
139#define SIR_VERSION_STRING_LEN 64
140typedef tANI_U8 tSirVersionString[SIR_VERSION_STRING_LEN];
141
142enum eSirHostMsgTypes
143{
144 SIR_HAL_APP_SETUP_NTF = SIR_HAL_HOST_MSG_START,
145 SIR_HAL_INITIAL_CAL_FAILED_NTF,
146 SIR_HAL_NIC_OPER_NTF,
147 SIR_HAL_INIT_START_REQ,
148 SIR_HAL_SHUTDOWN_REQ,
149 SIR_HAL_SHUTDOWN_CNF,
150 SIR_HAL_RESET_REQ,
151 SIR_HAL_RADIO_ON_OFF_IND,
152 SIR_HAL_RESET_CNF,
153 SIR_WRITE_TO_TD,
154 SIR_HAL_HDD_ADDBA_REQ, // MAC -> HDD
155 SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
156 SIR_HAL_DELETEBA_IND, // MAC -> HDD
157 SIR_HAL_BA_FAIL_IND, // HDD -> MAC
158 SIR_TL_HAL_FLUSH_AC_REQ,
159 SIR_HAL_TL_FLUSH_AC_RSP
160};
161
162
163
164/**
165 * Module ID definitions.
166 */
167enum {
168 SIR_BOOT_MODULE_ID = 1,
169 SIR_HAL_MODULE_ID = 0x10,
170 SIR_CFG_MODULE_ID,
171 SIR_LIM_MODULE_ID,
172 SIR_ARQ_MODULE_ID,
173 SIR_SCH_MODULE_ID,
174 SIR_PMM_MODULE_ID,
175 SIR_MNT_MODULE_ID,
176 SIR_DBG_MODULE_ID,
177 SIR_DPH_MODULE_ID,
178 SIR_SYS_MODULE_ID,
179 SIR_SMS_MODULE_ID,
180
181 SIR_PHY_MODULE_ID = 0x20,
182
183
184 // Add any modules above this line
185 SIR_DVT_MODULE_ID
186};
187
188#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
189
190/**
191 * First and last module definition for logging utility
192 *
193 * NOTE: The following definitions need to be updated if
194 * the above list is changed.
195 */
196#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
197#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
198
199
200// Type declarations used by Firmware and Host software
201
202// Scan type enum used in scan request
203typedef enum eSirScanType
204{
205 eSIR_PASSIVE_SCAN,
206 eSIR_ACTIVE_SCAN,
207} tSirScanType;
208
209/// Result codes Firmware return to Host SW
210typedef enum eSirResultCodes
211{
212 eSIR_SME_SUCCESS,
213
214 eSIR_EOF_SOF_EXCEPTION,
215 eSIR_BMU_EXCEPTION,
216 eSIR_LOW_PDU_EXCEPTION,
217 eSIR_USER_TRIG_RESET,
218 eSIR_LOGP_EXCEPTION,
219 eSIR_CP_EXCEPTION,
220 eSIR_STOP_BSS,
221 eSIR_AHB_HANG_EXCEPTION,
222 eSIR_DPU_EXCEPTION,
223 eSIR_RPE_EXCEPTION,
224 eSIR_TPE_EXCEPTION,
225 eSIR_DXE_EXCEPTION,
226 eSIR_RXP_EXCEPTION,
227 eSIR_MCPU_EXCEPTION,
228 eSIR_MCU_EXCEPTION,
229 eSIR_MTU_EXCEPTION,
230 eSIR_MIF_EXCEPTION,
231 eSIR_FW_EXCEPTION,
232 eSIR_PS_MUTEX_READ_EXCEPTION,
233 eSIR_PHY_HANG_EXCEPTION,
234 eSIR_MAILBOX_SANITY_CHK_FAILED,
235 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
236 eSIR_CFB_FLAG_STUCK_EXCEPTION,
237
238 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
239
240 eSIR_SME_INVALID_PARAMETERS=500,
241 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
242 eSIR_SME_RESOURCES_UNAVAILABLE,
243 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
244 // matching requested scan criteria
245 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
246 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
247 eSIR_SME_REFUSED,
248 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
249 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
250 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
251 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
252 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
253 eSIR_SME_AUTH_REFUSED,
254 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
255 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
256 eSIR_SME_ASSOC_REFUSED,
257 eSIR_SME_REASSOC_REFUSED,
258 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
259 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
260 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
261 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
262 eSIR_SME_STA_NOT_AUTHENTICATED,
263 eSIR_SME_STA_NOT_ASSOCIATED,
264 eSIR_SME_STA_DISASSOCIATED,
265 eSIR_SME_ALREADY_JOINED_A_BSS,
266 eSIR_ULA_COMPLETED,
267 eSIR_ULA_FAILURE,
268 eSIR_SME_LINK_ESTABLISHED,
269 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
270 eSIR_SME_UNABLE_TO_PERFORM_DFS,
271 eSIR_SME_DFS_FAILED,
272 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
273 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
274 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
275 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
276 // support requested rate in
277 // LINK_TEST_REQ
278 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
279 // not respond before next test packet
280 // is sent
281 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
282 // of link test
283 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
284 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
285 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
286 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
287 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
288 // unable to plumb down keys
289 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
290
291 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
292 // that more SME_SCAN_RSP
293 // messages are following.
294 // SME_SCAN_RSP message with
295 // eSIR_SME_SUCCESS status
296 // code is the last one.
297 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
298 // messages upon receiving
299 // invalid Re/Assoc Rsp frame.
300 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
301 // with MIC_FAILURE reason code and perform the stop bss operation
302 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
303 // timeout interval
304 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
305 eSIR_SME_RECEIVED,
306 // TBA - TSPEC related Result Codes
307
308 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
309 eSIR_SME_INVALID_STA_ROLE,
310 eSIR_SME_INVALID_STATE,
311#ifdef GEN4_SCAN
312 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
313 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
314 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
315 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
316 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
317 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
318#else // GEN4_SCAN
319 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
320 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
321#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700322#ifdef FEATURE_OEM_DATA_SUPPORT
323 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
324#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700325 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
326 eSIR_SME_STA_ASSOCIATED,
327 eSIR_SME_INVALID_PMM_STATE,
328 eSIR_SME_CANNOT_ENTER_IMPS,
329 eSIR_SME_IMPS_REQ_FAILED,
330 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700331 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700332 eSIR_SME_UAPSD_REQ_FAILED,
333 eSIR_SME_WOWL_ENTER_REQ_FAILED,
334 eSIR_SME_WOWL_EXIT_REQ_FAILED,
335#if defined WLAN_FEATURE_VOWIFI_11R
336 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
337 eSIR_SME_FT_REASSOC_FAILURE,
338#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700339 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700340#ifdef WLAN_FEATURE_PACKET_FILTERING
341 eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
342#endif // WLAN_FEATURE_PACKET_FILTERING
343
344#ifdef WLAN_FEATURE_GTK_OFFLOAD
345 eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
346#endif // WLAN_FEATURE_GTK_OFFLOAD
347 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
348} tSirResultCodes;
349
Jeff Johnson295189b2012-06-20 16:38:30 -0700350/* each station added has a rate mode which specifies the sta attributes */
351typedef enum eStaRateMode {
352 eSTA_TAURUS = 0,
353 eSTA_TITAN,
354 eSTA_POLARIS,
355 eSTA_11b,
356 eSTA_11bg,
357 eSTA_11a,
358 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700359#ifdef WLAN_FEATURE_11AC
360 eSTA_11ac,
361#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700362 eSTA_INVALID_RATE_MODE
363} tStaRateMode, *tpStaRateMode;
364
365//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
366//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
367#define IERATE_BASICRATE_MASK 0x80
368#define IERATE_RATE_MASK 0x7f
369#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
370#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
371
372typedef struct sSirSupportedRates {
373 /*
374 * For Self STA Entry: this represents Self Mode.
375 * For Peer Stations, this represents the mode of the peer.
376 * On Station:
377 * --this mode is updated when PE adds the Self Entry.
378 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
379 * ON AP:
380 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
381 * to indicate the self mode of the AP.
382 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
383 */
384
385 tStaRateMode opRateMode;
386 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
387 tANI_U16 llbRates[SIR_NUM_11B_RATES];
388 tANI_U16 llaRates[SIR_NUM_11A_RATES];
389 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
390
391 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
392 //First 26 bits are reserved for those Titan rates and
393 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
394 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
395
396 /*
397 * 0-76 bits used, remaining reserved
398 * bits 0-15 and 32 should be set.
399 */
400 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
401
402 /*
403 * RX Highest Supported Data Rate defines the highest data
404 * rate that the STA is able to receive, in unites of 1Mbps.
405 * This value is derived from "Supported MCS Set field" inside
406 * the HT capability element.
407 */
408 tANI_U16 rxHighestDataRate;
409
Jeff Johnsone7245742012-09-05 17:12:55 -0700410#ifdef WLAN_FEATURE_11AC
411 /*Indicates the Maximum MCS that can be received for each number
412 of spacial streams */
413 tANI_U16 vhtRxMCSMap;
414 /*Indicate the highest VHT data rate that the STA is able to receive*/
415 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700416 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700417 of spacial streams */
418 tANI_U16 vhtTxMCSMap;
419 /*Indicate the highest VHT data rate that the STA is able to transmit*/
420 tANI_U16 vhtTxHighestDataRate;
421#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700422} tSirSupportedRates, *tpSirSupportedRates;
423
424
425typedef enum eSirRFBand
426{
427 SIR_BAND_UNKNOWN,
428 SIR_BAND_2_4_GHZ,
429 SIR_BAND_5_GHZ,
430} tSirRFBand;
431
432
433/*
434* Specifies which beacons are to be indicated upto the host driver when
435* Station is in power save mode.
436*/
437typedef enum eBeaconForwarding
438{
439 ePM_BEACON_FWD_NTH,
440 ePM_BEACON_FWD_TIM,
441 ePM_BEACON_FWD_DTIM,
442 ePM_BEACON_FWD_NONE
443} tBeaconForwarding;
444
445
Jeff Johnson295189b2012-06-20 16:38:30 -0700446typedef struct sSirRemainOnChnReq
447{
448 tANI_U16 messageType;
449 tANI_U16 length;
450 tANI_U8 sessionId;
451 tSirMacAddr selfMacAddr;
452 tANI_U8 chnNum;
453 tANI_U8 phyMode;
454 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530455 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700456 tANI_U8 probeRspIe[1];
457}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
458
459typedef struct sSirRegisterMgmtFrame
460{
461 tANI_U16 messageType;
462 tANI_U16 length;
463 tANI_U8 sessionId;
464 tANI_BOOLEAN registerFrame;
465 tANI_U16 frameType;
466 tANI_U16 matchLen;
467 tANI_U8 matchData[1];
468}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700469
470//
Jeff Johnson295189b2012-06-20 16:38:30 -0700471// Identifies the neighbor BSS' that was(were) detected
472// by an STA and reported to the AP
473//
474typedef struct sAniTitanCBNeighborInfo
475{
476 // A BSS was found on the Primary
477 tANI_U8 cbBssFoundPri;
478
479 // A BSS was found on the adjacent Upper Secondary
480 tANI_U8 cbBssFoundSecUp;
481
482 // A BSS was found on the adjacent Lower Secondary
483 tANI_U8 cbBssFoundSecDown;
484
485} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
486
Jeff Johnson295189b2012-06-20 16:38:30 -0700487/// Generic type for sending a response message
488/// with result code to host software
489typedef struct sSirSmeRsp
490{
491 tANI_U16 messageType; // eWNI_SME_*_RSP
492 tANI_U16 length;
493 tANI_U8 sessionId; // To support BT-AMP
494 tANI_U16 transactionId; // To support BT-AMP
495 tSirResultCodes statusCode;
496} tSirSmeRsp, *tpSirSmeRsp;
497
498/// Definition for kick starting Firmware on STA
499typedef struct sSirSmeStartReq
500{
501 tANI_U16 messageType; // eWNI_SME_START_REQ
502 tANI_U16 length;
503 tANI_U8 sessionId; //Added for BT-AMP Support
504 tANI_U16 transcationId; //Added for BT-AMP Support
505 tSirMacAddr bssId; //Added For BT-AMP Support
506 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700507 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700508} tSirSmeStartReq, *tpSirSmeStartReq;
509
510/// Definition for indicating all modules ready on STA
511typedef struct sSirSmeReadyReq
512{
513 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
514 tANI_U16 length;
515 tANI_U16 transactionId;
516} tSirSmeReadyReq, *tpSirSmeReadyReq;
517
518/// Definition for response message to previously issued start request
519typedef struct sSirSmeStartRsp
520{
521 tANI_U16 messageType; // eWNI_SME_START_RSP
522 tANI_U16 length;
523 tSirResultCodes statusCode;
524 tANI_U16 transactionId;
525} tSirSmeStartRsp, *tpSirSmeStartRsp;
526
Jeff Johnson295189b2012-06-20 16:38:30 -0700527
528/// Definition for Load structure
529typedef struct sSirLoad
530{
531 tANI_U16 numStas;
532 tANI_U16 channelUtilization;
533} tSirLoad, *tpSirLoad;
534
535/// BSS type enum used in while scanning/joining etc
536typedef enum eSirBssType
537{
538 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700539 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700540 eSIR_IBSS_MODE,
541 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
542 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
543 eSIR_AUTO_MODE,
544 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
545} tSirBssType;
546
547/// Definition for WDS Information
548typedef struct sSirWdsInfo
549{
550 tANI_U16 wdsLength;
551 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
552} tSirWdsInfo, *tpSirWdsInfo;
553
554/// Power Capability info used in 11H
555typedef struct sSirMacPowerCapInfo
556{
557 tANI_U8 minTxPower;
558 tANI_U8 maxTxPower;
559} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
560
561/// Supported Channel info used in 11H
562typedef struct sSirSupChnl
563{
564 tANI_U8 numChnl;
565 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
566} tSirSupChnl, *tpSirSupChnl;
567
568typedef enum eSirNwType
569{
570 eSIR_11A_NW_TYPE,
571 eSIR_11B_NW_TYPE,
572 eSIR_11G_NW_TYPE,
573 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700574#ifdef WLAN_FEATURE_11AC
575 eSIR_11AC_NW_TYPE,
576#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700577 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
578} tSirNwType;
579
580/// Definition for new iBss peer info
581typedef struct sSirNewIbssPeerInfo
582{
583 tSirMacAddr peerAddr;
584 tANI_U16 aid;
585} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
586
587/// Definition for Alternate BSS info
588typedef struct sSirAlternateRadioInfo
589{
590 tSirMacAddr bssId;
591 tANI_U8 channelId;
592} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
593
594/// Definition for Alternate BSS list
595typedef struct sSirAlternateRadioList
596{
597 tANI_U8 numBss;
598 tSirAlternateRadioInfo alternateRadio[1];
599} tSirAlternateRadioList, *tpSirAlternateRadioList;
600
601/// Definition for kick starting BSS
602/// ---> MAC
603/**
604 * Usage of ssId, numSSID & ssIdList:
605 * ---------------------------------
606 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
607 * feature is enabled.
608 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
609 * and interpret the SSID list from numSSID & ssIdList.
610 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
611 * specified in the ssId field and it is expected that
612 * application will set numSSID to one (only one SSID present
613 * in the list) and SSID in the list is same as ssId field.
614 * 4. Application will always set numSSID >= 1.
615 */
616//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
617typedef struct sSirSmeStartBssReq
618{
619 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
620 tANI_U16 length;
621 tANI_U8 sessionId; //Added for BT-AMP Support
622 tANI_U16 transactionId; //Added for BT-AMP Support
623 tSirMacAddr bssId; //Added for BT-AMP Support
624 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
625 tANI_U16 beaconInterval; //Added for BT-AMP Support
626 tANI_U8 dot11mode;
627 tSirBssType bssType;
628 tSirMacSSid ssId;
629 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700630 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700631
Jeff Johnson295189b2012-06-20 16:38:30 -0700632 tANI_U8 privacy;
633 tANI_U8 apUapsdEnable;
634 tANI_U8 ssidHidden;
635 tANI_BOOLEAN fwdWPSPBCProbeReq;
636 tANI_BOOLEAN protEnabled;
637 tANI_BOOLEAN obssProtEnabled;
638 tANI_U16 ht_capab;
639 tAniAuthType authType;
640 tANI_U32 dtimPeriod;
641 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700642 tVOS_CON_MODE bssPersona;
643
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800644 tANI_U8 txLdpcIniFeatureEnabled;
645
Jeff Johnson295189b2012-06-20 16:38:30 -0700646 tSirRSNie rsnIE; // RSN IE to be sent in
647 // Beacon and Probe
648 // Response frames
649 tSirNwType nwType; // Indicates 11a/b/g
650 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
651 tSirMacRateSet extendedRateSet; // Has 11g rates
652
Jeff Johnson295189b2012-06-20 16:38:30 -0700653} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
654
655#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
656 ((int) OFFSET_OF( tSirBssDescription, ieFields)))
657
658#define WSCIE_PROBE_RSP_LEN (317 + 2)
659
660typedef struct sSirBssDescription
661{
662 //offset of the ieFields from bssId.
663 tANI_U16 length;
664 tSirMacAddr bssId;
665 v_TIME_t scanSysTimeMsec;
666 tANI_U32 timeStamp[2];
667 tANI_U16 beaconInterval;
668 tANI_U16 capabilityInfo;
669 tSirNwType nwType; // Indicates 11a/b/g
670 tANI_U8 aniIndicator;
671 tANI_S8 rssi;
672 tANI_S8 sinr;
673 //channelId what peer sent in beacon/probersp.
674 tANI_U8 channelId;
675 //channelId on which we are parked at.
676 //used only in scan case.
677 tANI_U8 channelIdSelf;
678 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700679 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
680#if defined WLAN_FEATURE_VOWIFI
681 tANI_U32 parentTSF;
682 tANI_U32 startTSF[2];
683#endif
684#ifdef WLAN_FEATURE_VOWIFI_11R
685 tANI_U8 mdiePresent;
686 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
687#endif
688#ifdef FEATURE_WLAN_CCX
689 tANI_U16 QBSSLoad_present;
690 tANI_U16 QBSSLoad_avail;
691#endif
692 // Please keep the structure 4 bytes aligned above the ieFields
693
694 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700695 tANI_U8 reservedPadding1;
696 tANI_U8 reservedPadding2;
697 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700698 tANI_U32 WscIeLen;
699 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700700 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800701
Jeff Johnson295189b2012-06-20 16:38:30 -0700702 tANI_U32 ieFields[1];
703} tSirBssDescription, *tpSirBssDescription;
704
705/// Definition for response message to previously
706/// issued start BSS request
707/// MAC --->
708typedef struct sSirSmeStartBssRsp
709{
710 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
711 tANI_U16 length;
712 tANI_U8 sessionId;
713 tANI_U16 transactionId;//transaction ID for cmd
714 tSirResultCodes statusCode;
715 tSirBssType bssType;//Add new type for WDS mode
716 tANI_U16 beaconInterval;//Beacon Interval for both type
717 tANI_U32 staId;//Staion ID for Self
718 tSirBssDescription bssDescription;//Peer BSS description
719} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
720
Jeff Johnson295189b2012-06-20 16:38:30 -0700721
722typedef struct sSirChannelList
723{
724 tANI_U8 numChannels;
725 tANI_U8 channelNumber[1];
726} tSirChannelList, *tpSirChannelList;
727
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530728typedef struct sSirDFSChannelList
729{
730 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
731
732} tSirDFSChannelList, *tpSirDFSChannelList;
733
Jeff Johnson295189b2012-06-20 16:38:30 -0700734#ifdef FEATURE_WLAN_CCX
735typedef struct sTspecInfo {
736 tANI_U8 valid;
737 tSirMacTspecIE tspec;
738} tTspecInfo;
739
740#define SIR_CCX_MAX_TSPEC_IES 4
741typedef struct sCCXTspecTspecInfo {
742 tANI_U8 numTspecs;
743 tTspecInfo tspec[SIR_CCX_MAX_TSPEC_IES];
744} tCCXTspecInfo;
745#endif
746
Jeff Johnson295189b2012-06-20 16:38:30 -0700747
748/// Definition for Radar Info
749typedef struct sSirRadarInfo
750{
751 tANI_U8 channelNumber;
752 tANI_U16 radarPulseWidth; // in usecond
753 tANI_U16 numRadarPulse;
754} tSirRadarInfo, *tpSirRadarInfo;
755
756#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
757
758/// Two Background Scan mode
759typedef enum eSirBackgroundScanMode
760{
761 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700762 eSIR_NORMAL_BACKGROUND_SCAN = 1,
763 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700764} tSirBackgroundScanMode;
765
766/// Two types of traffic check
767typedef enum eSirLinkTrafficCheck
768{
769 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700770 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
771 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700772} tSirLinkTrafficCheck;
773
774#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
775#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
776#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
777#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700778#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
779#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700780
781/// Definition for scan request
782typedef struct sSirSmeScanReq
783{
784 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
785 tANI_U16 length;
786 tANI_U8 sessionId; // Session ID
787 tANI_U16 transactionId; // Transaction ID for cmd
788 tSirMacAddr bssId;
789 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
790 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
791 tSirBssType bssType;
792 tANI_U8 dot11mode;
793 tSirScanType scanType;
794 /**
795 * minChannelTime. Not used if scanType is passive.
796 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
797 * 11k measurements set this to zero to user only single duration for scan.
798 * <valid timeout> - Timeout value used for min channel timeout.
799 */
800 tANI_U32 minChannelTime;
801 /**
802 * maxChannelTime.
803 * 0x0 - Invalid. In case of active scan.
804 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
805 *
806 */
807 tANI_U32 maxChannelTime;
808 /**
809 * returnAfterFirstMatch can take following values:
810 * 0x00 - Return SCAN_RSP message after complete channel scan
811 * 0x01 - Return SCAN_RSP message after collecting BSS description
812 * that matches scan criteria.
813 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
814 * 5 GHz band channels
815 * 0x80 - Return after collecting first 11d IE from 5 GHz band
816 * channels
817 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
818 * band channels
819 *
820 * Values of 0xC0, 0x80 & 0x40 are to be used by
821 * Roaming/application when 11d is enabled.
822 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800823 tANI_U32 minChannelTimeBtc; //in units of milliseconds
824 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700825 tANI_U8 returnAfterFirstMatch;
826
827 /**
828 * returnUniqueResults can take following values:
829 * 0 - Collect & report all received BSS descriptions from same BSS.
830 * 1 - Collect & report unique BSS description from same BSS.
831 */
832 tANI_U8 returnUniqueResults;
833
834 /**
835 * returnFreshResults can take following values:
836 * 0x00 - Return background scan results.
837 * 0x80 - Return & purge background scan results
838 * 0x01 - Trigger fresh scan instead of returning background scan
839 * results.
840 * 0x81 - Trigger fresh scan instead of returning background scan
841 * results and purge background scan results.
842 */
843 tANI_U8 returnFreshResults;
844
845 /* backgroundScanMode can take following values:
846 * 0x0 - agressive scan
847 * 0x1 - normal scan where HAL will check for link traffic
848 * prior to proceeding with the scan
849 */
850 tSirBackgroundScanMode backgroundScanMode;
851
852 tANI_U8 hiddenSsid;
853
854 /* Number of SSIDs to scan */
855 tANI_U8 numSsid;
856
857 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
858 /* This MUST be the last field of the structure */
859
860
Jeff Johnson295189b2012-06-20 16:38:30 -0700861 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700862 tANI_U16 uIEFieldLen;
863 tANI_U16 uIEFieldOffset;
864
865 //channelList MUST be the last field of this structure
866 tSirChannelList channelList;
867 /*-----------------------------
868 tSirSmeScanReq....
869 -----------------------------
870 uIEFiledLen
871 -----------------------------
872 uIEFiledOffset ----+
873 ----------------------------- |
874 channelList.numChannels |
875 ----------------------------- |
876 ... variable size up to |
877 channelNumber[numChannels-1] |
878 This can be zero, if |
879 numChannel is zero. |
880 ----------------------------- <--+
881 ... variable size uIEFiled
882 up to uIEFieldLen (can be 0)
883 -----------------------------*/
884} tSirSmeScanReq, *tpSirSmeScanReq;
885
Jeff Johnsone7245742012-09-05 17:12:55 -0700886#ifdef FEATURE_OEM_DATA_SUPPORT
887
888#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800889#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700890#endif
891#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800892#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700893#endif
894
895typedef struct sSirOemDataReq
896{
897 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
898 tSirMacAddr selfMacAddr;
899 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
900} tSirOemDataReq, *tpSirOemDataReq;
901
902typedef struct sSirOemDataRsp
903{
904 tANI_U16 messageType;
905 tANI_U16 length;
906 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
907} tSirOemDataRsp, *tpSirOemDataRsp;
908
909#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700910
911/// Definition for response message to previously issued scan request
912typedef struct sSirSmeScanRsp
913{
914 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
915 tANI_U16 length;
916 tANI_U8 sessionId;
917 tSirResultCodes statusCode;
918 tANI_U16 transcationId;
919 tSirBssDescription bssDescription[1];
920} tSirSmeScanRsp, *tpSirSmeScanRsp;
921
922/// Sme Req message to set the Background Scan mode
923typedef struct sSirSmeBackgroundScanModeReq
924{
925 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
926 tANI_U16 length;
927 tSirBackgroundScanMode mode;
928} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
929
930/// Background Scan Statisics
931typedef struct sSirBackgroundScanInfo {
932 tANI_U32 numOfScanSuccess;
933 tANI_U32 numOfScanFailure;
934 tANI_U32 reserved;
935} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
936
937#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
938
939/// Definition for Authentication request
940typedef struct sSirSmeAuthReq
941{
942 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
943 tANI_U16 length;
944 tANI_U8 sessionId; // Session ID
945 tANI_U16 transactionId; // Transaction ID for cmd
946 tSirMacAddr bssId; // Self BSSID
947 tSirMacAddr peerMacAddr;
948 tAniAuthType authType;
949 tANI_U8 channelNumber;
950} tSirSmeAuthReq, *tpSirSmeAuthReq;
951
952/// Definition for reponse message to previously issued Auth request
953typedef struct sSirSmeAuthRsp
954{
955 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
956 tANI_U16 length;
957 tANI_U8 sessionId; // Session ID
958 tANI_U16 transactionId; // Transaction ID for cmd
959 tSirMacAddr peerMacAddr;
960 tAniAuthType authType;
961 tSirResultCodes statusCode;
962 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
963 //Otherwise it holds status code.
964} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
965
Jeff Johnson295189b2012-06-20 16:38:30 -0700966
Jeff Johnson295189b2012-06-20 16:38:30 -0700967
Jeff Johnson295189b2012-06-20 16:38:30 -0700968/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
969typedef struct sJoinReassocInfo
970{
971 tAniTitanCBNeighborInfo cbNeighbors;
972 tAniBool spectrumMgtIndicator;
973 tSirMacPowerCapInfo powerCap;
974 tSirSupChnl supportedChannels;
975} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700976
977/// Definition for join request
978/// ---> MAC
979/// WARNING! If you add a field in JOIN REQ.
980/// Make sure to add it in REASSOC REQ
981/// The Serdes function is the same and its
982/// shared with REASSOC. So if we add a field
983// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
984typedef struct sSirSmeJoinReq
985{
986 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
987 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -0700988 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700989 tANI_U16 transactionId;
990 tSirMacSSid ssId;
991 tSirMacAddr selfMacAddr; // self Mac address
992 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
993 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -0700994 tVOS_CON_MODE staPersona; //Persona
995 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -0700996
997 /*This contains the UAPSD Flag for all 4 AC
998 * B0: AC_VO UAPSD FLAG
999 * B1: AC_VI UAPSD FLAG
1000 * B2: AC_BK UAPSD FLAG
1001 * B3: AC_BE UASPD FLAG
1002 */
1003 tANI_U8 uapsdPerAcBitmask;
1004
Jeff Johnson295189b2012-06-20 16:38:30 -07001005 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1006 tSirMacRateSet extendedRateSet; // Has 11g rates
1007 tSirRSNie rsnIE; // RSN IE to be sent in
1008 // (Re) Association Request
1009#ifdef FEATURE_WLAN_CCX
1010 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1011 // the same. The join will never carry cckm, but will be set to
1012 // 0.
1013#endif
1014
1015 tSirAddie addIEScan; // Additional IE to be sent in
1016 // (unicast) Probe Request at the time of join
1017
1018 tSirAddie addIEAssoc; // Additional IE to be sent in
1019 // (Re) Association Request
1020
1021 tAniEdType UCEncryptionType;
1022
1023 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001024
1025#ifdef WLAN_FEATURE_11W
1026 tAniEdType MgmtEncryptionType;
1027#endif
1028
Jeff Johnson295189b2012-06-20 16:38:30 -07001029#ifdef WLAN_FEATURE_VOWIFI_11R
1030 tAniBool is11Rconnection;
1031#endif
1032#ifdef FEATURE_WLAN_CCX
Gopichand Nakkala0ae39db2013-06-10 20:35:49 +05301033 tAniBool isCCXFeatureIniEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001034 tAniBool isCCXconnection;
1035 tCCXTspecInfo ccxTspecInfo;
1036#endif
1037
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001038#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001039 tAniBool isFastTransitionEnabled;
1040#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001041#ifdef FEATURE_WLAN_LFR
1042 tAniBool isFastRoamIniFeatureEnabled;
1043#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001044
1045 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001046#ifdef WLAN_FEATURE_11AC
1047 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001048 tANI_U8 txBFCsnValue;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001049#endif
1050
Jeff Johnson295189b2012-06-20 16:38:30 -07001051 tAniTitanCBNeighborInfo cbNeighbors;
1052 tAniBool spectrumMgtIndicator;
1053 tSirMacPowerCapInfo powerCap;
1054 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001055 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001056
1057} tSirSmeJoinReq, *tpSirSmeJoinReq;
1058
1059/// Definition for reponse message to previously issued join request
1060/// MAC --->
1061typedef struct sSirSmeJoinRsp
1062{
1063 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1064 tANI_U16 length;
1065 tANI_U8 sessionId; // Session ID
1066 tANI_U16 transactionId; // Transaction ID for cmd
1067 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001068 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001069 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1070 //Otherwise it holds status code.
1071 tANI_U16 aid;
1072 tANI_U32 beaconLength;
1073 tANI_U32 assocReqLength;
1074 tANI_U32 assocRspLength;
1075#ifdef WLAN_FEATURE_VOWIFI_11R
1076 tANI_U32 parsedRicRspLen;
1077#endif
1078#ifdef FEATURE_WLAN_CCX
1079 tANI_U32 tspecIeLen;
1080#endif
1081 tANI_U32 staId;//Station ID for peer
1082
1083 /*The DPU signatures will be sent eventually to TL to help it determine the
1084 association to which a packet belongs to*/
1085 /*Unicast DPU signature*/
1086 tANI_U8 ucastSig;
1087
1088 /*Broadcast DPU signature*/
1089 tANI_U8 bcastSig;
1090
1091 tANI_U8 frames[ 1 ];
1092} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1093
1094/// Definition for Authentication indication from peer
1095typedef struct sSirSmeAuthInd
1096{
1097 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1098 tANI_U16 length;
1099 tANI_U8 sessionId;
1100 tSirMacAddr bssId; // Self BSSID
1101 tSirMacAddr peerMacAddr;
1102 tAniAuthType authType;
1103} tSirSmeAuthInd, *tpSirSmeAuthInd;
1104
1105/// probereq from peer, when wsc is enabled
1106typedef struct sSirSmeProbereq
1107{
1108 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1109 tANI_U16 length;
1110 tANI_U8 sessionId;
1111 tSirMacAddr peerMacAddr;
1112 tANI_U16 devicePasswdId;
1113} tSirSmeProbeReq, *tpSirSmeProbeReq;
1114
1115/// Definition for Association indication from peer
1116/// MAC --->
1117typedef struct sSirSmeAssocInd
1118{
1119 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1120 tANI_U16 length;
1121 tANI_U8 sessionId;
1122 tSirMacAddr peerMacAddr;
1123 tANI_U16 aid;
1124 tSirMacAddr bssId; // Self BSSID
1125 tANI_U16 staId; // Station ID for peer
1126 tANI_U8 uniSig; // DPU signature for unicast packets
1127 tANI_U8 bcastSig; // DPU signature for broadcast packets
1128 tAniAuthType authType;
1129 tAniSSID ssId; // SSID used by STA to associate
1130 tSirRSNie rsnIE;// RSN IE received from peer
1131 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1132
Jeff Johnson295189b2012-06-20 16:38:30 -07001133 // powerCap & supportedChannels are present only when
1134 // spectrumMgtIndicator flag is set
1135 tAniBool spectrumMgtIndicator;
1136 tSirMacPowerCapInfo powerCap;
1137 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001138 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1139 tAniBool reassocReq;
1140 // Required for indicating the frames to upper layer
1141 tANI_U32 beaconLength;
1142 tANI_U8* beaconPtr;
1143 tANI_U32 assocReqLength;
1144 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001145} tSirSmeAssocInd, *tpSirSmeAssocInd;
1146
1147
1148/// Definition for Association confirm
1149/// ---> MAC
1150typedef struct sSirSmeAssocCnf
1151{
1152 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1153 tANI_U16 length;
1154 tSirResultCodes statusCode;
1155 tSirMacAddr bssId; // Self BSSID
1156 tSirMacAddr peerMacAddr;
1157 tANI_U16 aid;
1158 tSirMacAddr alternateBssId;
1159 tANI_U8 alternateChannelId;
1160} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1161
Jeff Johnson295189b2012-06-20 16:38:30 -07001162/// Definition for Reassociation indication from peer
1163typedef struct sSirSmeReassocInd
1164{
1165 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1166 tANI_U16 length;
1167 tANI_U8 sessionId; // Session ID
1168 tSirMacAddr peerMacAddr;
1169 tSirMacAddr oldMacAddr;
1170 tANI_U16 aid;
1171 tSirMacAddr bssId; // Self BSSID
1172 tANI_U16 staId; // Station ID for peer
1173 tAniAuthType authType;
1174 tAniSSID ssId; // SSID used by STA to reassociate
1175 tSirRSNie rsnIE; // RSN IE received from peer
1176
1177 tSirAddie addIE; // Additional IE received from peer
1178
Jeff Johnson295189b2012-06-20 16:38:30 -07001179 // powerCap & supportedChannels are present only when
1180 // spectrumMgtIndicator flag is set
1181 tAniBool spectrumMgtIndicator;
1182 tSirMacPowerCapInfo powerCap;
1183 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001184 // Required for indicating the frames to upper layer
1185 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1186 tANI_U32 beaconLength;
1187 tANI_U8* beaconPtr;
1188 tANI_U32 assocReqLength;
1189 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001190} tSirSmeReassocInd, *tpSirSmeReassocInd;
1191
1192/// Definition for Reassociation confirm
1193/// ---> MAC
1194typedef struct sSirSmeReassocCnf
1195{
1196 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1197 tANI_U16 length;
1198 tSirResultCodes statusCode;
1199 tSirMacAddr bssId; // Self BSSID
1200 tSirMacAddr peerMacAddr;
1201 tANI_U16 aid;
1202 tSirMacAddr alternateBssId;
1203 tANI_U8 alternateChannelId;
1204} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1205
Jeff Johnson295189b2012-06-20 16:38:30 -07001206
1207/// Enum definition for Wireless medium status change codes
1208typedef enum eSirSmeStatusChangeCode
1209{
1210 eSIR_SME_DEAUTH_FROM_PEER,
1211 eSIR_SME_DISASSOC_FROM_PEER,
1212 eSIR_SME_LOST_LINK_WITH_PEER,
1213 eSIR_SME_CHANNEL_SWITCH,
1214 eSIR_SME_JOINED_NEW_BSS,
1215 eSIR_SME_LEAVING_BSS,
1216 eSIR_SME_IBSS_ACTIVE,
1217 eSIR_SME_IBSS_INACTIVE,
1218 eSIR_SME_IBSS_PEER_DEPARTED,
1219 eSIR_SME_RADAR_DETECTED,
1220 eSIR_SME_IBSS_NEW_PEER,
1221 eSIR_SME_AP_CAPS_CHANGED,
1222 eSIR_SME_BACKGROUND_SCAN_FAIL,
1223 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1224 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1225} tSirSmeStatusChangeCode;
1226
1227typedef struct sSirSmeNewBssInfo
1228{
1229 tSirMacAddr bssId;
1230 tANI_U8 channelNumber;
1231 tANI_U8 reserved;
1232 tSirMacSSid ssId;
1233} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1234
1235typedef struct sSirSmeApNewCaps
1236{
1237 tANI_U16 capabilityInfo;
1238 tSirMacAddr bssId;
1239 tANI_U8 channelId;
1240 tANI_U8 reserved[3];
1241 tSirMacSSid ssId;
1242} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1243
1244/**
1245 * Table below indicates what information is passed for each of
1246 * the Wireless Media status change notifications:
1247 *
1248 * Status Change code Status change info
1249 * ----------------------------------------------------------------------
1250 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1251 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1252 * eSIR_SME_LOST_LINK_WITH_PEER None
1253 * eSIR_SME_CHANNEL_SWITCH New channel number
1254 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1255 * eSIR_SME_LEAVING_BSS None
1256 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1257 * IBSS apart from this STA that
1258 * started IBSS
1259 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1260 * in IBSS
1261 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1262 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1263 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1264 * that STA is currently associated with
1265 * have changed.
1266 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1267 */
1268
1269/// Definition for Wireless medium status change notification
1270typedef struct sSirSmeWmStatusChangeNtf
1271{
1272 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1273 tANI_U16 length;
1274 tANI_U8 sessionId; // Session ID
1275 tSirSmeStatusChangeCode statusChangeCode;
1276 tSirMacAddr bssId; // Self BSSID
1277 union
1278 {
1279 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1280 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1281 // none for eSIR_SME_LOST_LINK_WITH_PEER
1282 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1283 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1284 // none for eSIR_SME_LEAVING_BSS
1285 // none for eSIR_SME_IBSS_ACTIVE
1286 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001287 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1288 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1289 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1290 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001291 } statusChangeInfo;
1292} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1293
1294/// Definition for Disassociation request
1295typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001296__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001297struct sSirSmeDisassocReq
1298{
1299 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1300 tANI_U16 length;
1301 tANI_U8 sessionId; // Session ID
1302 tANI_U16 transactionId; // Transaction ID for cmd
1303 tSirMacAddr bssId; // Peer BSSID
1304 tSirMacAddr peerMacAddr;
1305 tANI_U16 reasonCode;
1306 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1307 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001308}
Jeff Johnson295189b2012-06-20 16:38:30 -07001309__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001310tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1311
1312/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001313typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1314{
1315 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1316 tANI_U16 length;
1317 tANI_U8 sessionId; // Session ID
1318 tANI_U16 transactionId; // Transaction ID for cmd
1319 tSirMacAddr bssId; // Peer BSSID
1320 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1321} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001322
1323typedef struct sAni64BitCounters
1324{
1325 tANI_U32 Hi;
1326 tANI_U32 Lo;
1327}tAni64BitCounters, *tpAni64BitCounters;
1328
1329typedef struct sAniSecurityStat
1330{
1331 tAni64BitCounters txBlks;
1332 tAni64BitCounters rxBlks;
1333 tAni64BitCounters formatErrorCnt;
1334 tAni64BitCounters decryptErr;
1335 tAni64BitCounters protExclCnt;
1336 tAni64BitCounters unDecryptableCnt;
1337 tAni64BitCounters decryptOkCnt;
1338
1339}tAniSecurityStat, *tpAniSecurityStat;
1340
1341typedef struct sAniTxRxCounters
1342{
1343 tANI_U32 txFrames; // Incremented for every packet tx
1344 tANI_U32 rxFrames;
1345 tANI_U32 nRcvBytes;
1346 tANI_U32 nXmitBytes;
1347}tAniTxRxCounters, *tpAniTxRxCounters;
1348
1349typedef struct sAniTxRxStats
1350{
1351 tAni64BitCounters txFrames;
1352 tAni64BitCounters rxFrames;
1353 tAni64BitCounters nRcvBytes;
1354 tAni64BitCounters nXmitBytes;
1355
1356}tAniTxRxStats,*tpAniTxRxStats;
1357
1358typedef struct sAniSecStats
1359{
1360 tAniSecurityStat aes;
1361 tAni64BitCounters aesReplays;
1362 tAniSecurityStat tkip;
1363 tAni64BitCounters tkipReplays;
1364 tAni64BitCounters tkipMicError;
1365
1366 tAniSecurityStat wep;
1367#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1368 tAniSecurityStat wpi;
1369 tAni64BitCounters wpiReplays;
1370 tAni64BitCounters wpiMicError;
1371#endif
1372}tAniSecStats, *tpAniSecStats;
1373
1374#define SIR_MAX_RX_CHAINS 3
1375
1376typedef struct sAniStaStatStruct
1377{
1378 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1379 * These are kept as it is, since WSM is using this structure.
1380 * These elements can be removed whenever WSM is updated.
1381 * Phystats is used to hold phystats from BD.
1382 */
1383 tANI_U32 sentAesBlksUcastHi;
1384 tANI_U32 sentAesBlksUcastLo;
1385 tANI_U32 recvAesBlksUcastHi;
1386 tANI_U32 recvAesBlksUcastLo;
1387 tANI_U32 aesFormatErrorUcastCnts;
1388 tANI_U32 aesReplaysUcast;
1389 tANI_U32 aesDecryptErrUcast;
1390 tANI_U32 singleRetryPkts;
1391 tANI_U32 failedTxPkts;
1392 tANI_U32 ackTimeouts;
1393 tANI_U32 multiRetryPkts;
1394 tANI_U32 fragTxCntsHi;
1395 tANI_U32 fragTxCntsLo;
1396 tANI_U32 transmittedPktsHi;
1397 tANI_U32 transmittedPktsLo;
1398 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1399 tANI_U32 phyStatLo; //This is only for private use.
1400
1401 tANI_U32 uplinkRssi;
1402 tANI_U32 uplinkSinr;
1403 tANI_U32 uplinkRate;
1404 tANI_U32 downlinkRssi;
1405 tANI_U32 downlinkSinr;
1406 tANI_U32 downlinkRate;
1407 tANI_U32 nRcvBytes;
1408 tANI_U32 nXmitBytes;
1409
1410 // titan 3c stats
1411 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1412 tANI_U32 chunksTxCntLo;
1413 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1414 tANI_U32 compPktRxCntLo;
1415 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1416 tANI_U32 expanPktRxCntLo;
1417
1418
1419 /* Following elements are valid and filled in correctly. They have valid values.
1420 */
1421
1422 //Unicast frames and bytes.
1423 tAniTxRxStats ucStats;
1424
1425 //Broadcast frames and bytes.
1426 tAniTxRxStats bcStats;
1427
1428 //Multicast frames and bytes.
1429 tAniTxRxStats mcStats;
1430
1431 tANI_U32 currentTxRate;
1432 tANI_U32 currentRxRate; //Rate in 100Kbps
1433
1434 tANI_U32 maxTxRate;
1435 tANI_U32 maxRxRate;
1436
1437 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1438
1439
1440 tAniSecStats securityStats;
1441
1442 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1443 tANI_U8 currentTxRateIdx;
1444
1445} tAniStaStatStruct, *tpAniStaStatStruct;
1446
1447//Statistics that are not maintained per stations.
1448typedef struct sAniGlobalStatStruct
1449{
1450 tAni64BitCounters txError;
1451 tAni64BitCounters rxError;
1452 tAni64BitCounters rxDropNoBuffer;
1453 tAni64BitCounters rxDropDup;
1454 tAni64BitCounters rxCRCError;
1455
1456 tAni64BitCounters singleRetryPkts;
1457 tAni64BitCounters failedTxPkts;
1458 tAni64BitCounters ackTimeouts;
1459 tAni64BitCounters multiRetryPkts;
1460 tAni64BitCounters fragTxCnts;
1461 tAni64BitCounters fragRxCnts;
1462
1463 tAni64BitCounters txRTSSuccess;
1464 tAni64BitCounters txCTSSuccess;
1465 tAni64BitCounters rxRTSSuccess;
1466 tAni64BitCounters rxCTSSuccess;
1467
1468 tAniSecStats securityStats;
1469
1470 tAniTxRxStats mcStats;
1471 tAniTxRxStats bcStats;
1472
1473}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1474
1475typedef enum sPacketType
1476{
1477 ePACKET_TYPE_UNKNOWN,
1478 ePACKET_TYPE_11A,
1479 ePACKET_TYPE_11G,
1480 ePACKET_TYPE_11B,
1481 ePACKET_TYPE_11N
1482
1483}tPacketType, *tpPacketType;
1484
1485typedef struct sAniStatSummaryStruct
1486{
1487 tAniTxRxStats uc; //Unicast counters.
1488 tAniTxRxStats bc; //Broadcast counters.
1489 tAniTxRxStats mc; //Multicast counters.
1490 tAni64BitCounters txError;
1491 tAni64BitCounters rxError;
1492 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1493 tANI_U32 rxRate; // Rx rate of the last received packet.
1494 tANI_U32 txRate;
1495 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1496 tANI_U16 txMCSId;
1497 tPacketType rxPacketType;
1498 tPacketType txPacketType;
1499 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1500}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1501
Jeff Johnson295189b2012-06-20 16:38:30 -07001502//structure for stats that may be reset, like the ones in sta descriptor
1503//The stats are saved into here before reset. It should be tANI_U32 aligned.
1504typedef struct _sPermStaStats
1505{
1506 //tANI_U32 sentAesBlksUcastHi;
1507 //tANI_U32 sentAesBlksUcastLo;
1508 //tANI_U32 recvAesBlksUcastHi;
1509 //tANI_U32 recvAesBlksUcastLo;
1510 tANI_U32 aesFormatErrorUcastCnts;
1511 tANI_U32 aesReplaysUcast;
1512 tANI_U32 aesDecryptErrUcast;
1513 tANI_U32 singleRetryPkts;
1514 tANI_U32 failedTxPkts;
1515 tANI_U32 ackTimeouts;
1516 tANI_U32 multiRetryPkts;
1517 tANI_U32 fragTxCntsHi;
1518 tANI_U32 fragTxCntsLo;
1519 tANI_U32 transmittedPktsHi;
1520 tANI_U32 transmittedPktsLo;
1521
1522 // titan 3c stats
1523 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1524 tANI_U32 chunksTxCntLo;
1525 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1526 tANI_U32 compPktRxCntLo;
1527 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1528 tANI_U32 expanPktRxCntLo;
1529}tPermanentStaStats;
1530
Jeff Johnson295189b2012-06-20 16:38:30 -07001531
1532
1533
1534/// Definition for Disassociation response
1535typedef struct sSirSmeDisassocRsp
1536{
1537 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1538 tANI_U16 length;
1539 tANI_U8 sessionId; // Session ID
1540 tANI_U16 transactionId; // Transaction ID for cmd
1541 tSirResultCodes statusCode;
1542 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001543 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001544 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001545}
Jeff Johnson295189b2012-06-20 16:38:30 -07001546__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001547 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1548
1549/// Definition for Disassociation indication from peer
1550typedef struct sSirSmeDisassocInd
1551{
1552 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1553 tANI_U16 length;
1554 tANI_U8 sessionId; // Session Identifier
1555 tANI_U16 transactionId; // Transaction Identifier with PE
1556 tSirResultCodes statusCode;
1557 tSirMacAddr bssId;
1558 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001559 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001560 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001561 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001562} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1563
1564/// Definition for Disassociation confirm
1565/// MAC --->
1566typedef struct sSirSmeDisassocCnf
1567{
1568 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1569 tANI_U16 length;
1570 tSirResultCodes statusCode;
1571 tSirMacAddr bssId;
1572 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001573} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1574
1575/// Definition for Deauthetication request
1576typedef struct sSirSmeDeauthReq
1577{
1578 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1579 tANI_U16 length;
1580 tANI_U8 sessionId; // Session ID
1581 tANI_U16 transactionId; // Transaction ID for cmd
1582 tSirMacAddr bssId; // AP BSSID
1583 tSirMacAddr peerMacAddr;
1584 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001585} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1586
1587/// Definition for Deauthetication response
1588typedef struct sSirSmeDeauthRsp
1589{
1590 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1591 tANI_U16 length;
1592 tANI_U8 sessionId; // Session ID
1593 tANI_U16 transactionId; // Transaction ID for cmd
1594 tSirResultCodes statusCode;
1595 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001596} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1597
1598/// Definition for Deauthetication indication from peer
1599typedef struct sSirSmeDeauthInd
1600{
1601 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1602 tANI_U16 length;
1603 tANI_U8 sessionId; //Added for BT-AMP
1604 tANI_U16 transactionId; //Added for BT-AMP
1605 tSirResultCodes statusCode;
1606 tSirMacAddr bssId;// AP BSSID
1607 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001608
Jeff Johnson295189b2012-06-20 16:38:30 -07001609 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001610 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001611} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1612
1613/// Definition for Deauthentication confirm
1614/// MAC --->
1615typedef struct sSirSmeDeauthCnf
1616{
1617 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1618 tANI_U16 length;
1619 tSirResultCodes statusCode;
1620 tSirMacAddr bssId; // AP BSSID
1621 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001622} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1623
1624/// Definition for stop BSS request message
1625typedef struct sSirSmeStopBssReq
1626{
1627 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1628 tANI_U16 length;
1629 tANI_U8 sessionId; //Session ID
1630 tANI_U16 transactionId; //tranSaction ID for cmd
1631 tSirResultCodes reasonCode;
1632 tSirMacAddr bssId; //Self BSSID
1633} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1634
1635/// Definition for stop BSS response message
1636typedef struct sSirSmeStopBssRsp
1637{
1638 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1639 tANI_U16 length;
1640 tSirResultCodes statusCode;
1641 tANI_U8 sessionId; // Session ID
1642 tANI_U16 transactionId; // Transaction ID for cmd
1643} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1644
Jeff Johnson295189b2012-06-20 16:38:30 -07001645
1646
1647/// Definition for Channel Switch indication for station
1648/// MAC --->
1649typedef struct sSirSmeSwitchChannelInd
1650{
1651 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1652 tANI_U16 length;
1653 tANI_U8 sessionId;
1654 tANI_U16 newChannelId;
1655 tSirMacAddr bssId; // BSSID
1656} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1657
1658/// Definition for ULA complete indication message
1659typedef struct sirUlaCompleteInd
1660{
1661 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1662 tANI_U16 length;
1663 tSirResultCodes statusCode;
1664 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001665} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1666
1667/// Definition for ULA complete confirmation message
1668typedef struct sirUlaCompleteCnf
1669{
1670 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1671 tANI_U16 length;
1672 tSirResultCodes statusCode;
1673 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001674} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1675
1676/// Definition for Neighbor BSS indication
1677/// MAC --->
1678/// MAC reports this each time a new I/BSS is detected
1679typedef struct sSirSmeNeighborBssInd
1680{
1681 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1682 tANI_U16 length;
1683 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001684 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001685} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1686
1687/// Definition for MIC failure indication
1688/// MAC --->
1689/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1690typedef struct sSirSmeMicFailureInd
1691{
1692 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1693 tANI_U16 length;
1694 tANI_U8 sessionId;
1695 tSirMacAddr bssId; // BSSID
1696 tSirMicFailureInfo info;
1697} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1698
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001699typedef struct sSirSmeMissedBeaconInd
1700{
1701 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1702 tANI_U16 length;
1703 tANI_U8 bssIdx;
1704} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001705
1706/// Definition for Set Context request
1707/// ---> MAC
1708typedef struct sSirSmeSetContextReq
1709{
1710 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1711 tANI_U16 length;
1712 tANI_U8 sessionId; //Session ID
1713 tANI_U16 transactionId; //Transaction ID for cmd
1714 tSirMacAddr peerMacAddr;
1715 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001716 // TBD Following QOS fields to be uncommented
1717 //tAniBool qosInfoPresent;
1718 //tSirQos qos;
1719 tSirKeyMaterial keyMaterial;
1720} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1721
1722/// Definition for Set Context response
1723/// MAC --->
1724typedef struct sSirSmeSetContextRsp
1725{
1726 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1727 tANI_U16 length;
1728 tANI_U8 sessionId; // Session ID
1729 tANI_U16 transactionId; // Transaction ID for cmd
1730 tSirResultCodes statusCode;
1731 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001732} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1733
1734/// Definition for Remove Key Context request
1735/// ---> MAC
1736typedef struct sSirSmeRemoveKeyReq
1737{
1738 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1739 tANI_U16 length;
1740 tANI_U8 sessionId; // Session ID
1741 tANI_U16 transactionId; // Transaction ID for cmd
1742 tSirMacAddr bssId; // BSSID
1743 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001744 tANI_U8 edType;
1745 tANI_U8 wepType;
1746 tANI_U8 keyId;
1747 tANI_BOOLEAN unicast;
1748} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1749
1750/// Definition for Remove Key Context response
1751/// MAC --->
1752typedef struct sSirSmeRemoveKeyRsp
1753{
1754 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1755 tANI_U16 length;
1756 tANI_U8 sessionId; // Session ID
1757 tANI_U16 transactionId; // Transaction ID for cmd
1758 tSirResultCodes statusCode;
1759 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001760} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1761
1762/// Definition for Set Power request
1763/// ---> MAC
1764typedef struct sSirSmeSetPowerReq
1765{
1766 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1767 tANI_U16 length;
1768 tANI_U16 transactionId; // Transaction ID for cmd
1769 tANI_S8 powerLevel;
1770} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1771
1772/// Definition for Set Power response
1773/// MAC --->
1774typedef struct sSirSmeSetPowerRsp
1775{
1776 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1777 tANI_U16 length;
1778 tSirResultCodes statusCode;
1779 tANI_U16 transactionId; // Transaction ID for cmd
1780} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1781
Jeff Johnson295189b2012-06-20 16:38:30 -07001782
1783/// Definition for Link Test Start response
1784/// MAC --->
1785typedef struct sSirSmeLinkTestStartRsp
1786{
1787 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1788 tANI_U16 length;
1789 tSirMacAddr peerMacAddr;
1790 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001791} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1792
1793/// Definition for Link Test Stop response
1794/// WSM ---> MAC
1795typedef struct sSirSmeLinkTestStopRsp
1796{
1797 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1798 tANI_U16 length;
1799 tSirMacAddr peerMacAddr;
1800 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001801} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1802
1803/// Definition for kick starting DFS measurements
1804typedef struct sSirSmeDFSreq
1805{
1806 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1807 tANI_U16 length;
1808 tANI_U16 transactionId; // Transaction ID for cmd
1809} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1810
1811/// Definition for response message to previously
1812/// issued DFS request
1813typedef struct sSirSmeDFSrsp
1814{
1815 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1816 tANI_U16 length;
1817 tSirResultCodes statusCode;
1818 tANI_U16 transactionId; // Transaction ID for cmd
1819 tANI_U32 dfsReport[1];
1820} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1821
1822/// Statistic definitions
1823//=============================================================
1824// Per STA statistic structure; This same struct will be used for Aggregate
1825// STA stats as well.
1826
1827// Clear radio stats and clear per sta stats
1828typedef enum
1829{
1830 eANI_CLEAR_ALL_STATS, // Clears all stats
1831 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1832 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1833 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1834 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1835 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1836
1837 // Used to distinguish between per sta to security stats.
1838 // Used only by AP, FW just returns the same parameter as it received.
1839 eANI_LINK_STATS, // Get Per STA stats
1840 eANI_SECURITY_STATS, // Get Per STA security stats
1841
1842 eANI_CLEAR_STAT_TYPES_END
1843} tAniStatSubTypes;
1844
1845typedef struct sAniTxCtrs
1846{
1847 // add the rate counters here
1848 tANI_U32 tx1Mbps;
1849 tANI_U32 tx2Mbps;
1850 tANI_U32 tx5_5Mbps;
1851 tANI_U32 tx6Mbps;
1852 tANI_U32 tx9Mbps;
1853 tANI_U32 tx11Mbps;
1854 tANI_U32 tx12Mbps;
1855 tANI_U32 tx18Mbps;
1856 tANI_U32 tx24Mbps;
1857 tANI_U32 tx36Mbps;
1858 tANI_U32 tx48Mbps;
1859 tANI_U32 tx54Mbps;
1860 tANI_U32 tx72Mbps;
1861 tANI_U32 tx96Mbps;
1862 tANI_U32 tx108Mbps;
1863
1864 // tx path radio counts
1865 tANI_U32 txFragHi;
1866 tANI_U32 txFragLo;
1867 tANI_U32 txFrameHi;
1868 tANI_U32 txFrameLo;
1869 tANI_U32 txMulticastFrameHi;
1870 tANI_U32 txMulticastFrameLo;
1871 tANI_U32 txFailedHi;
1872 tANI_U32 txFailedLo;
1873 tANI_U32 multipleRetryHi;
1874 tANI_U32 multipleRetryLo;
1875 tANI_U32 singleRetryHi;
1876 tANI_U32 singleRetryLo;
1877 tANI_U32 ackFailureHi;
1878 tANI_U32 ackFailureLo;
1879 tANI_U32 xmitBeacons;
1880
1881 // titan 3c stats
1882 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1883 tANI_U32 txCbEscPktCntLo;
1884 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1885 tANI_U32 txChunksCntLo;
1886 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1887 tANI_U32 txCompPktCntLo;
1888 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1889 tANI_U32 tx50PerCompPktCntLo;
1890 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1891 tANI_U32 txExpanPktCntLo;
1892} tAniTxCtrs, *tpAniTxCtrs;
1893
1894typedef struct sAniRxCtrs
1895{
1896 // receive frame rate counters
1897 tANI_U32 rx1Mbps;
1898 tANI_U32 rx2Mbps;
1899 tANI_U32 rx5_5Mbps;
1900 tANI_U32 rx6Mbps;
1901 tANI_U32 rx9Mbps;
1902 tANI_U32 rx11Mbps;
1903 tANI_U32 rx12Mbps;
1904 tANI_U32 rx18Mbps;
1905 tANI_U32 rx24Mbps;
1906 tANI_U32 rx36Mbps;
1907 tANI_U32 rx48Mbps;
1908 tANI_U32 rx54Mbps;
1909 tANI_U32 rx72Mbps;
1910 tANI_U32 rx96Mbps;
1911 tANI_U32 rx108Mbps;
1912
1913 // receive size counters; 'Lte' = Less than or equal to
1914 tANI_U32 rxLte64;
1915 tANI_U32 rxLte128Gt64;
1916 tANI_U32 rxLte256Gt128;
1917 tANI_U32 rxLte512Gt256;
1918 tANI_U32 rxLte1kGt512;
1919 tANI_U32 rxLte1518Gt1k;
1920 tANI_U32 rxLte2kGt1518;
1921 tANI_U32 rxLte4kGt2k;
1922
1923 // rx radio stats
1924 tANI_U32 rxFrag;
1925 tANI_U32 rxFrame;
1926 tANI_U32 fcsError;
1927 tANI_U32 rxMulticast;
1928 tANI_U32 duplicate;
1929 tANI_U32 rtsSuccess;
1930 tANI_U32 rtsFailed;
1931 tANI_U32 wepUndecryptables;
1932 tANI_U32 drops;
1933 tANI_U32 aesFormatErrorUcastCnts;
1934 tANI_U32 aesReplaysUcast;
1935 tANI_U32 aesDecryptErrUcast;
1936
1937 // titan 3c stats
1938 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
1939 tANI_U32 rxDecompPktCntLo;
1940 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
1941 tANI_U32 rxCompPktCntLo;
1942 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
1943 tANI_U32 rxExpanPktCntLo;
1944} tAniRxCtrs, *tpAniRxCtrs;
1945
1946// Radio stats
1947typedef struct sAniRadioStats
1948{
1949 tAniTxCtrs tx;
1950 tAniRxCtrs rx;
1951} tAniRadioStats, *tpAniRadioStats;
1952
1953// Get Radio Stats request structure
1954// This structure shall be used for both Radio stats and Aggregate stats
1955// A valid request must contain entire structure with/without valid fields.
1956// Based on the request type, the valid fields will be checked.
1957typedef struct sAniGetStatsReq
1958{
1959 // Common for all types are requests
1960 tANI_U16 msgType; // message type is same as the request type
1961 tANI_U16 msgLen; // length of the entire request
1962 tANI_U8 sessionId; //Session ID
1963 tANI_U16 transactionId;
1964 tSirMacAddr bssId; //BSSID
1965 // only used for clear stats and per sta stats clear
1966 tAniStatSubTypes stat; // Clears the stats of the described types.
1967 tANI_U32 staId; // Per STA stats request must contain valid
1968 // values
1969 tANI_U8 macAddr[6];
1970} tAniGetStatsReq, *tpAniGetStatsReq;
1971
1972// Get Radio Stats response struct
1973typedef struct sAniGetRadioStatsRsp
1974{
1975 tANI_U16 type; // message type is same as the request type
1976 tANI_U16 msgLen; // length of the entire request
1977 tANI_U32 rc;
1978 tANI_U16 transactionId;
1979 tAniRadioStats radio;
1980} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
1981
1982// Per Sta stats response struct
1983typedef struct sAniGetPerStaStatsRsp
1984{
1985 tANI_U16 type; // message type is same as the request type
1986 tANI_U16 msgLen; // length of the entire request
1987 tANI_U32 rc;
1988 tANI_U16 transactionId;
1989 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
1990 tAniStaStatStruct sta;
1991 tANI_U32 staId;
1992 tANI_U8 macAddr[6];
1993} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
1994
1995// Get Aggregate stats
1996typedef struct sAniGetAggrStaStatsRsp
1997{
1998 tANI_U16 type; // message type is same as the request type
1999 tANI_U16 msgLen; // length of the entire request
2000 tANI_U32 rc;
2001 tANI_U16 transactionId;
2002 tAniStaStatStruct sta;
2003} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2004
2005// Clear stats request and response structure. 'rc' field is unused in
2006// request and this field is used in response field.
2007typedef struct sAniClearStatsRsp
2008{
2009 tANI_U16 type; // message type is same as the request type
2010 tANI_U16 msgLen; // length of the entire request
2011 tANI_U32 rc; // return code - will be filled by FW on
2012 // response.
2013 // Same transaction ID will be returned by the FW
2014 tANI_U16 transactionId;
2015 tAniStatSubTypes stat; // Clears the stats of the described types.
2016 tANI_U32 staId; // Applicable only to PER STA stats clearing
2017 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2018} tAniClearStatsRsp, *tpAniClearStatsRsp;
2019
2020typedef struct sAniGetGlobalStatsRsp
2021{
2022 tANI_U16 type; // message type is same as the request type
2023 tANI_U16 msgLen; // length of the entire request
2024 tANI_U32 rc;
2025 tANI_U16 transactionId;
2026 tAniGlobalStatStruct global;
2027} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2028
2029typedef struct sAniGetStatSummaryRsp
2030{
2031 tANI_U16 type; // message type is same as the request type
2032 tANI_U16 msgLen; // length of the entire request --Why?
2033 tANI_U32 rc;
2034 tANI_U16 transactionId;
2035 tAniStatSummaryStruct stat;
2036} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2037
2038//***************************************************************
2039
2040
2041/*******************PE Statistics*************************/
2042typedef enum
2043{
2044 PE_SUMMARY_STATS_INFO = 0x00000001,
2045 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2046 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2047 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2048 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
2049 PE_PER_STA_STATS_INFO = 0x00000020
2050}ePEStatsMask;
2051
2052/*
2053 * tpAniGetPEStatsReq is tied to
2054 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2055 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2056 */
2057typedef struct sAniGetPEStatsReq
2058{
2059 // Common for all types are requests
2060 tANI_U16 msgType; // message type is same as the request type
2061 tANI_U16 msgLen; // length of the entire request
2062 tANI_U32 staId; // Per STA stats request must contain valid
2063 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2064} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2065
2066/*
2067 * tpAniGetPEStatsRsp is tied to
2068 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2069 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2070 */
2071typedef struct sAniGetPEStatsRsp
2072{
2073 // Common for all types are responses
2074 tANI_U16 msgType; // message type is same as the request type
2075 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2076 tANI_U8 sessionId;
2077 tANI_U32 rc; //success/failure
2078 tANI_U32 staId; // Per STA stats request must contain valid
2079 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2080/**********************************************************************************************
2081 //void *pStatsBuf;
2082 The Stats buffer starts here and can be an aggregate of more than one statistics
2083 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2084 intentionally and the src code that uses this structure should take that into account.
2085**********************************************************************************************/
2086} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2087
2088typedef struct sAniGetRssiReq
2089{
2090 // Common for all types are requests
2091 tANI_U16 msgType; // message type is same as the request type
2092 tANI_U16 msgLen; // length of the entire request
2093 tANI_U8 sessionId;
2094 tANI_U8 staId;
2095 void *rssiCallback;
2096 void *pDevContext; //device context
2097 void *pVosContext; //voss context
2098
2099} tAniGetRssiReq, *tpAniGetRssiReq;
2100
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002101#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
2102typedef struct sAniGetRoamRssiRsp
2103{
2104 // Common for all types are responses
2105 tANI_U16 msgType; // message type is same as the request type
2106 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2107 tANI_U8 sessionId;
2108 tANI_U32 rc; //success/failure
2109 tANI_U32 staId; // Per STA stats request must contain valid
2110 tANI_S8 rssi;
2111 void *rssiReq; //rssi request backup
2112
2113} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2114
2115#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002116/* Change country code request MSG structure */
2117typedef struct sAniChangeCountryCodeReq
2118{
2119 // Common for all types are requests
2120 tANI_U16 msgType; // message type is same as the request type
2121 tANI_U16 msgLen; // length of the entire request
2122 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302123 tAniBool countryFromUserSpace;
Jeff Johnson295189b2012-06-20 16:38:30 -07002124 void *changeCCCallback;
2125 void *pDevContext; //device context
2126 void *pVosContext; //voss context
2127
2128} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2129
2130typedef struct sAniSummaryStatsInfo
2131{
2132 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2133 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2134 // station successfully transmitted after more than one retransmission attempt
2135
2136 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2137 //(with and without retries, including multi-cast, broadcast)
2138 //tANI_U32 tx_fail_cnt;
2139 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2140 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2141 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2142 //(after appropriate filter rules including multi-cast, broadcast)
2143 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2144 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2145 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2146 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2147 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2148 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2149 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2150 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2151 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2152 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2153 //to provide this.
2154#if 0
2155 //providing the following stats, in case of wrap around for tx_byte_cnt
2156 tANI_U32 tx_unicast_lower_byte_cnt;
2157 tANI_U32 tx_unicast_upper_byte_cnt;
2158 tANI_U32 tx_multicast_lower_byte_cnt;
2159 tANI_U32 tx_multicast_upper_byte_cnt;
2160 tANI_U32 tx_broadcast_lower_byte_cnt;
2161 tANI_U32 tx_broadcast_upper_byte_cnt;
2162#endif
2163
2164}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2165
2166typedef enum eTxRateInfo
2167{
2168 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2169 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2170 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2171 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002172 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2173 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2174 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2175 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002176} tTxrateinfoflags;
2177
2178typedef struct sAniGlobalClassAStatsInfo
2179{
2180 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2181 //or MMPDU frames
2182 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2183 //or MMPDU frames when a promiscuous packet filter was enabled
2184 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2185 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2186 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2187 //to a supported rate and the order shall be the same as the supporteRates parameter.
2188 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2189 //for eg: if it is 10.5dBm, the value would be 105
2190 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2191 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2192 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2193 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2194 //500 kbit/sec, for the most
2195 //recently transmitted frame
2196 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2197 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2198 //HT40 rates; short and long guard interval
2199
2200}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2201
2202
2203typedef struct sAniGlobalSecurityStats
2204{
2205 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2206 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2207 //is enabled
2208 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2209 //because of MIC failures
2210 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2211 //because of a TKIP ICV error
2212 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2213 //invalid AES-CCMP format
2214 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2215 //the AES-CCMP replay protection procedure
2216 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2217 //errors detected by the AES-CCMP decryption algorithm
2218 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2219 //not available on the 802.11 station
2220 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2221 //because of a WEP ICV error
2222 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2223 //decrypted
2224 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2225
2226}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2227
2228typedef struct sAniGlobalClassBStatsInfo
2229{
2230 tAniGlobalSecurityStats ucStats;
2231 tAniGlobalSecurityStats mcbcStats;
2232}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2233
2234typedef struct sAniGlobalClassCStatsInfo
2235{
2236 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2237 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2238 //address 1 field
2239 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2240 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2241 //primary channel
2242 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2243 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2244 //when an A-MPDU is received
2245 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2246 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2247 //decoded correctly
2248
2249}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2250
2251typedef struct sAniPerStaStatsInfo
2252{
2253 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2254 //through a received 802.11 ACK frame
2255 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2256 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2257 //is transmitted
2258
2259}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2260
2261/**********************PE Statistics end*************************/
2262
2263
2264
2265typedef struct sSirRSSIThresholds
2266{
2267#ifdef ANI_BIG_BYTE_ENDIAN
2268 tANI_S8 ucRssiThreshold1 : 8;
2269 tANI_S8 ucRssiThreshold2 : 8;
2270 tANI_S8 ucRssiThreshold3 : 8;
2271 tANI_U8 bRssiThres1PosNotify : 1;
2272 tANI_U8 bRssiThres1NegNotify : 1;
2273 tANI_U8 bRssiThres2PosNotify : 1;
2274 tANI_U8 bRssiThres2NegNotify : 1;
2275 tANI_U8 bRssiThres3PosNotify : 1;
2276 tANI_U8 bRssiThres3NegNotify : 1;
2277 tANI_U8 bReserved10 : 2;
2278#else
2279 tANI_U8 bReserved10 : 2;
2280 tANI_U8 bRssiThres3NegNotify : 1;
2281 tANI_U8 bRssiThres3PosNotify : 1;
2282 tANI_U8 bRssiThres2NegNotify : 1;
2283 tANI_U8 bRssiThres2PosNotify : 1;
2284 tANI_U8 bRssiThres1NegNotify : 1;
2285 tANI_U8 bRssiThres1PosNotify : 1;
2286 tANI_S8 ucRssiThreshold3 : 8;
2287 tANI_S8 ucRssiThreshold2 : 8;
2288 tANI_S8 ucRssiThreshold1 : 8;
2289#endif
2290
2291}tSirRSSIThresholds, *tpSirRSSIThresholds;
2292
2293typedef struct sSirRSSINotification
2294{
2295#ifdef ANI_BIG_BYTE_ENDIAN
2296 tANI_U32 bRssiThres1PosCross : 1;
2297 tANI_U32 bRssiThres1NegCross : 1;
2298 tANI_U32 bRssiThres2PosCross : 1;
2299 tANI_U32 bRssiThres2NegCross : 1;
2300 tANI_U32 bRssiThres3PosCross : 1;
2301 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002302 v_S7_t avgRssi : 8;
2303 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002304#else
Srinivasdaaec712012-12-12 15:59:44 -08002305 tANI_U32 bReserved : 18;
2306 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002307 tANI_U32 bRssiThres3NegCross : 1;
2308 tANI_U32 bRssiThres3PosCross : 1;
2309 tANI_U32 bRssiThres2NegCross : 1;
2310 tANI_U32 bRssiThres2PosCross : 1;
2311 tANI_U32 bRssiThres1NegCross : 1;
2312 tANI_U32 bRssiThres1PosCross : 1;
2313#endif
2314
2315}tSirRSSINotification, *tpSirRSSINotification;
2316
Viral Modid86bde22012-12-10 13:09:21 -08002317
2318typedef struct sSirP2PNoaStart
2319{
2320 tANI_U32 status;
2321 tANI_U32 bssIdx;
2322} tSirP2PNoaStart, *tpSirP2PNoaStart;
2323
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302324typedef struct sSirTdlsInd
2325{
2326 tANI_U16 status;
2327 tANI_U16 assocId;
2328 tANI_U16 staIdx;
2329 tANI_U16 reasonCode;
2330} tSirTdlsInd, *tpSirTdlsInd;
2331
Jeff Johnson295189b2012-06-20 16:38:30 -07002332typedef struct sSirP2PNoaAttr
2333{
2334#ifdef ANI_BIG_BYTE_ENDIAN
2335 tANI_U32 index :8;
2336 tANI_U32 oppPsFlag :1;
2337 tANI_U32 ctWin :7;
2338 tANI_U32 rsvd1: 16;
2339#else
2340 tANI_U32 rsvd1: 16;
2341 tANI_U32 ctWin :7;
2342 tANI_U32 oppPsFlag :1;
2343 tANI_U32 index :8;
2344#endif
2345
2346#ifdef ANI_BIG_BYTE_ENDIAN
2347 tANI_U32 uNoa1IntervalCnt:8;
2348 tANI_U32 rsvd2:24;
2349#else
2350 tANI_U32 rsvd2:24;
2351 tANI_U32 uNoa1IntervalCnt:8;
2352#endif
2353 tANI_U32 uNoa1Duration;
2354 tANI_U32 uNoa1Interval;
2355 tANI_U32 uNoa1StartTime;
2356
2357#ifdef ANI_BIG_BYTE_ENDIAN
2358 tANI_U32 uNoa2IntervalCnt:8;
2359 tANI_U32 rsvd3:24;
2360#else
2361 tANI_U32 rsvd3:24;
2362 tANI_U32 uNoa2IntervalCnt:8;
2363#endif
2364 tANI_U32 uNoa2Duration;
2365 tANI_U32 uNoa2Interval;
2366 tANI_U32 uNoa2StartTime;
2367} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002368
2369typedef __ani_attr_pre_packed struct sSirTclasInfo
2370{
2371 tSirMacTclasIE tclas;
2372 tANI_U8 version; // applies only for classifier type ip
2373 __ani_attr_pre_packed union {
2374 tSirMacTclasParamEthernet eth;
2375 tSirMacTclasParamIPv4 ipv4;
2376 tSirMacTclasParamIPv6 ipv6;
2377 tSirMacTclasParam8021dq t8021dq;
2378 }__ani_attr_packed tclasParams;
2379} __ani_attr_packed tSirTclasInfo;
2380
2381typedef struct sSirAddtsReqInfo
2382{
2383 tANI_U8 dialogToken;
2384 tSirMacTspecIE tspec;
2385
2386 tANI_U8 numTclas; // number of Tclas elements
2387 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2388 tANI_U8 tclasProc;
2389#ifdef FEATURE_WLAN_CCX
2390 tSirMacCCXTSRSIE tsrsIE;
2391 tANI_U8 tsrsPresent:1;
2392#endif
2393 tANI_U8 wmeTspecPresent:1;
2394 tANI_U8 wsmTspecPresent:1;
2395 tANI_U8 lleTspecPresent:1;
2396 tANI_U8 tclasProcPresent:1;
2397} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2398
2399typedef struct sSirAddtsRspInfo
2400{
2401 tANI_U8 dialogToken;
2402 tSirMacStatusCodes status;
2403 tSirMacTsDelayIE delay;
2404
2405 tSirMacTspecIE tspec;
2406 tANI_U8 numTclas; // number of Tclas elements
2407 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2408 tANI_U8 tclasProc;
2409 tSirMacScheduleIE schedule;
2410#ifdef FEATURE_WLAN_CCX
2411 tSirMacCCXTSMIE tsmIE;
2412 tANI_U8 tsmPresent:1;
2413#endif
2414 tANI_U8 wmeTspecPresent:1;
2415 tANI_U8 wsmTspecPresent:1;
2416 tANI_U8 lleTspecPresent:1;
2417 tANI_U8 tclasProcPresent:1;
2418 tANI_U8 schedulePresent:1;
2419} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2420
2421typedef struct sSirDeltsReqInfo
2422{
2423 tSirMacTSInfo tsinfo;
2424 tSirMacTspecIE tspec;
2425 tANI_U8 wmeTspecPresent:1;
2426 tANI_U8 wsmTspecPresent:1;
2427 tANI_U8 lleTspecPresent:1;
2428} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2429
2430/// Add a tspec as defined
2431typedef struct sSirAddtsReq
2432{
2433 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2434 tANI_U16 length;
2435 tANI_U8 sessionId; //Session ID
2436 tANI_U16 transactionId;
2437 tSirMacAddr bssId; //BSSID
2438 tANI_U32 timeout; // in ms
2439 tANI_U8 rspReqd;
2440 tSirAddtsReqInfo req;
2441} tSirAddtsReq, *tpSirAddtsReq;
2442
2443typedef struct sSirAddtsRsp
2444{
2445 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2446 tANI_U16 length;
2447 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2448 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2449 tANI_U32 rc; // return code
2450 tSirAddtsRspInfo rsp;
2451} tSirAddtsRsp, *tpSirAddtsRsp;
2452
2453typedef struct sSirDeltsReq
2454{
2455 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2456 tANI_U16 length;
2457 tANI_U8 sessionId;//Session ID
2458 tANI_U16 transactionId;
2459 tSirMacAddr bssId; //BSSID
2460 tANI_U16 aid; // use 0 if macAddr is being specified
2461 tANI_U8 macAddr[6]; // only on AP to specify the STA
2462 tANI_U8 rspReqd;
2463 tSirDeltsReqInfo req;
2464} tSirDeltsReq, *tpSirDeltsReq;
2465
2466typedef struct sSirDeltsRsp
2467{
2468 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2469 tANI_U16 length;
2470 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2471 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2472 tANI_U32 rc;
2473 tANI_U16 aid; // use 0 if macAddr is being specified
2474 tANI_U8 macAddr[6]; // only on AP to specify the STA
2475 tSirDeltsReqInfo rsp;
2476} tSirDeltsRsp, *tpSirDeltsRsp;
2477
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002478#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002479
2480#define SIR_QOS_NUM_TSPEC_MAX 2
2481#define SIR_QOS_NUM_AC_MAX 4
2482
2483typedef struct sSirAggrQosReqInfo
2484{
2485 tANI_U16 tspecIdx;
2486 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2487}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2488
2489typedef struct sSirAggrQosReq
2490{
2491 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2492 tANI_U16 length;
2493 tANI_U8 sessionId; //Session ID
2494 tANI_U16 transactionId;
2495 tSirMacAddr bssId; //BSSID
2496 tANI_U32 timeout; // in ms
2497 tANI_U8 rspReqd;
2498 tSirAggrQosReqInfo aggrInfo;
2499}tSirAggrQosReq, *tpSirAggrQosReq;
2500
2501typedef struct sSirAggrQosRspInfo
2502{
2503 tANI_U16 tspecIdx;
2504 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2505} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2506
2507typedef struct sSirAggrQosRsp
2508{
2509 tANI_U16 messageType;
2510 tANI_U16 length;
2511 tANI_U8 sessionId;
2512 tSirAggrQosRspInfo aggrInfo;
2513} tSirAggrQosRsp, *tpSirAggrQosRsp;
2514
2515#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_CCX*/
2516
2517typedef struct sSirSetTxPowerReq
2518{
schang86c22c42013-03-13 18:41:24 -07002519 tANI_U16 messageType;
2520 tANI_U16 length;
2521 tSirMacAddr bssId;
2522 tANI_U8 mwPower;
2523 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002524} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2525
2526typedef struct sSirSetTxPowerRsp
2527{
2528 tANI_U16 messageType;
2529 tANI_U16 length;
2530 tANI_U32 status;
2531} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2532
2533typedef struct sSirGetTxPowerReq
2534{
2535 tANI_U16 messageType;
2536 tANI_U16 length;
2537 tANI_U16 staid;
2538} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2539
2540typedef struct sSirGetTxPowerRsp
2541{
2542 tANI_U16 messageType;
2543 tANI_U16 length; // length of the entire request
2544 tANI_U32 power; // units of milliwatts
2545 tANI_U32 status;
2546} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2547
2548
2549typedef tANI_U32 tSirMacNoise[3];
2550
2551typedef struct sSirGetNoiseRsp
2552{
2553 tANI_U16 messageType;
2554 tANI_U16 length;
2555 tSirMacNoise noise;
2556} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2557
2558
2559//
2560// PMC --> PE --> HAL
2561// Power save configuration parameters
2562//
2563typedef struct sSirPowerSaveCfg
2564{
2565 tANI_U16 listenInterval;
2566
2567 /* Number of consecutive missed beacons before
2568 * hardware generates an interrupt to wake up
2569 * the host. In units of listen interval.
2570 */
2571 tANI_U32 HeartBeatCount;
2572
2573 /* specifies which beacons are to be forwarded
2574 * to host when beacon filtering is enabled.
2575 * In units of listen interval.
2576 */
2577 tANI_U32 nthBeaconFilter;
2578
2579 /* Maximum number of PS-Poll send before
2580 * firmware sends data null with PM set to 0.
2581 */
2582 tANI_U32 maxPsPoll;
2583
2584 /* If the average RSSI value falls below the
2585 * minRssiThreshold, then FW will send an
2586 * interrupt to wake up the host.
2587 */
2588 tANI_U32 minRssiThreshold;
2589
2590 /* Number of beacons for which firmware will
2591 * collect the RSSI values and compute the average.
2592 */
2593 tANI_U8 numBeaconPerRssiAverage;
2594
2595 /* FW collects the RSSI stats for this period
2596 * in BMPS mode.
2597 */
2598 tANI_U8 rssiFilterPeriod;
2599
2600 // Enabling/disabling broadcast frame filter feature
2601 tANI_U8 broadcastFrameFilter;
2602
2603 // Enabling/disabling the ignore DTIM feature
2604 tANI_U8 ignoreDtim;
2605
2606 /* The following configuration parameters are kept
2607 * in order to be backward compatible for Gen5.
2608 * These will NOT be used for Gen6 Libra chip
2609 */
2610 tBeaconForwarding beaconFwd;
2611 tANI_U16 nthBeaconFwd;
2612 tANI_U8 fEnablePwrSaveImmediately;
2613 tANI_U8 fPSPoll;
2614
2615 // Enabling/disabling Beacon Early Termination feature
2616 tANI_U8 fEnableBeaconEarlyTermination;
2617 tANI_U8 bcnEarlyTermWakeInterval;
2618
2619}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2620
2621/* Reason code for requesting Full Power. This reason code is used by
2622 any module requesting full power from PMC and also by PE when it
2623 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2624typedef enum eRequestFullPowerReason
2625{
2626 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2627 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2628 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2629 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2630 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2631 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2632 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2633 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2634 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2635 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002636#ifdef FEATURE_WLAN_TDLS
2637 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2638#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002639 eSME_REASON_OTHER /* No specific reason. General reason code */
2640} tRequestFullPowerReason, tExitBmpsReason;
2641
2642
2643
2644//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2645typedef struct sExitBmpsInfo
2646{
2647 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2648}tExitBmpsInfo, *tpExitBmpsInfo;
2649
2650
2651// MAC SW --> SME
2652// Message indicating to SME to exit BMPS sleep mode
2653typedef struct sSirSmeExitBmpsInd
2654{
2655 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2656 tANI_U16 mesgLen;
2657 tSirResultCodes statusCode;
2658 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2659
2660} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2661
2662
2663//
2664// HDD -> LIM
2665// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2666// tSirMsgQ.reserved = 0
2667// tSirMsgQ.body = instance of tDelBAParams
2668//
2669typedef struct sSmeDelBAPeerInd
2670{
2671 // Message Type
2672 tANI_U16 mesgType;
2673
2674 tSirMacAddr bssId;//BSSID
2675
2676 // Message Length
2677 tANI_U16 mesgLen;
2678
2679 // Station Index
2680 tANI_U16 staIdx;
2681
2682 // TID for which the BA session is being deleted
2683 tANI_U8 baTID;
2684
2685 // DELBA direction
2686 // eBA_INITIATOR - Originator
2687 // eBA_RECEIPIENT - Recipient
2688 tANI_U8 baDirection;
2689} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2690
2691typedef struct sSmeIbssPeerInd
2692{
2693 tANI_U16 mesgType;
2694 tANI_U16 mesgLen;
2695 tANI_U8 sessionId;
2696
2697 tSirMacAddr peerAddr;
2698 tANI_U16 staId;
2699
2700 /*The DPU signatures will be sent eventually to TL to help it determine the
2701 association to which a packet belongs to*/
2702 /*Unicast DPU signature*/
2703 tANI_U8 ucastSig;
2704
2705 /*Broadcast DPU signature*/
2706 tANI_U8 bcastSig;
2707
2708 //Beacon will be appended for new Peer indication.
2709}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2710
2711typedef struct sLimScanChn
2712{
2713 tANI_U16 numTimeScan; //how many time this channel is scan
2714 tANI_U8 channelId;
2715}tLimScanChn;
2716
2717typedef struct sSmeGetScanChnRsp
2718{
2719 // Message Type
2720 tANI_U16 mesgType;
2721 // Message Length
2722 tANI_U16 mesgLen;
2723 tANI_U8 sessionId;
2724 tANI_U8 numChn;
2725 tLimScanChn scanChn[1];
2726} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2727
2728typedef struct sLimScanChnInfo
2729{
2730 tANI_U8 numChnInfo; //number of channels in scanChn
2731 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2732}tLimScanChnInfo;
2733
Jeff Johnson295189b2012-06-20 16:38:30 -07002734typedef struct sSirSmeGetAssocSTAsReq
2735{
2736 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2737 tANI_U16 length;
2738 tSirMacAddr bssId; // BSSID
2739 tANI_U16 modId;
2740 void *pUsrContext;
2741 void *pSapEventCallback;
2742 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2743} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002744
2745typedef struct sSmeMaxAssocInd
2746{
2747 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2748 tANI_U16 mesgLen;
2749 tANI_U8 sessionId;
2750 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2751} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2752
2753/*--------------------------------------------------------------------*/
2754/* BootLoader message definition */
2755/*--------------------------------------------------------------------*/
2756
2757/*--------------------------------------------------------------------*/
2758/* FW image size */
2759/*--------------------------------------------------------------------*/
2760#define SIR_FW_IMAGE_SIZE 146332
2761
2762
2763#define SIR_BOOT_MODULE_ID 1
2764
2765#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2766#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2767#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2768#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2769#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2770#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2771#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2772
2773/*--------------------------------------------------------------------*/
2774/* Bootloader message syntax */
2775/*--------------------------------------------------------------------*/
2776
2777// Message header
2778#define SIR_BOOT_MB_HEADER 0
2779#define SIR_BOOT_MB_HEADER2 1
2780
2781#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2782#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2783
2784// BOOT_SETUP_IND parameter indices
2785#define SIR_BOOT_SETUP_IND_MBADDR 2
2786#define SIR_BOOT_SETUP_IND_MBSIZE 3
2787#define SIR_BOOT_SETUP_IND_MEMOPT 4
2788#define SIR_BOOT_SETUP_IND_LEN \
2789 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2790
2791// BOOT_POST_RESULT_IND parameter indices
2792#define SIR_BOOT_POST_RESULT_IND_RES 2
2793#define SIR_BOOT_POST_RESULT_IND_LEN \
2794 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
2795
2796#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
2797#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
2798#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
2799#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
2800
2801
2802// BOOT_DNLD_RESULT_IND parameter indices
2803#define SIR_BOOT_DNLD_RESULT_IND_RES 2
2804#define SIR_BOOT_DNLD_RESULT_IND_LEN \
2805 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
2806
2807#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
2808#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
2809#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
2810
2811// BOOT_DNLD_DEV_REQ
2812#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
2813#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
2814#define SIR_BOOT_DNLD_DEV_REQ_LEN \
2815 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
2816
2817// BOOT_DNLD_DEV_RSP
2818#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
2819#define SIR_BOOT_DNLD_DEV_RSP_LEN \
2820 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
2821
2822#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
2823#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
2824
2825// BOOT_DNLD_REQ
2826#define SIR_BOOT_DNLD_REQ_OFFSET 2
2827#define SIR_BOOT_DNLD_REQ_WRADDR 3
2828#define SIR_BOOT_DNLD_REQ_SIZE 4
2829#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
2830
2831// BOOT_DNLD_RSP
2832#define SIR_BOOT_DNLD_RSP_SIZE 2
2833#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
2834
Jeff Johnson295189b2012-06-20 16:38:30 -07002835
2836// board capabilities fields are defined here.
2837typedef __ani_attr_pre_packed struct sSirBoardCapabilities
2838{
2839#ifndef ANI_LITTLE_BIT_ENDIAN
2840 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
2841 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
2842 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
2843 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
2844 tANI_U32 rsvd1:2;
2845 // (productId derives sub-category in the following three families)
2846 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
2847 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
2848 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
2849 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
2850 tANI_U32 bbChipVer:4; // Baseband chip version
2851 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
2852 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
2853 tANI_U32 nReceivers:2; // 0 based.
2854 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
2855 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
2856 tANI_U32 rsvd:1;
2857 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
2858#else
2859
2860 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
2861 tANI_U32 rsvd:1;
2862 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
2863 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
2864 tANI_U32 nReceivers:2; // 0 based.
2865 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
2866 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
2867 tANI_U32 bbChipVer:4; // Baseband chip version
2868 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
2869 // (productId derives sub-category in the following three families)
2870 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
2871 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
2872 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
2873 tANI_U32 rsvd1:2;
2874 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
2875 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
2876 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
2877 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
2878#endif
2879} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
2880
2881# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
2882# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
2883
2884# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
2885# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
2886
2887# define ANI_BCAP_SDRAM_MASK 0x4
2888# define ANI_BCAP_SDRAM_OFFSET 2
2889
2890# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
2891# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
2892
2893# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
2894# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
2895
2896# define ANI_BCAP_RADIO_ON_MASK 0xC0
2897# define ANI_BCAP_RADIO_ON_OFFSET 6
2898
2899# define ANI_BCAP_LO_TYPE_MASK 0x300
2900# define ANI_BCAP_LO_TYPE_OFFSET 8
2901
2902# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
2903# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
2904
2905# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
2906# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
2907
2908# define ANI_BCAP_RADIO_OFF 0
2909# define ANI_BCAP_RADIO_ON 1
2910# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
2911
2912
2913/// WOW related structures
2914// SME -> PE <-> HAL
2915#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
2916#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
2917
2918// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
2919// SME/HDD maintains the list of the BCAST wake-up patterns.
2920// This is a pass through message for PE
2921typedef struct sSirWowlAddBcastPtrn
2922{
2923 tANI_U8 ucPatternId; // Pattern ID
2924 // Pattern byte offset from beginning of the 802.11 packet to start of the
2925 // wake-up pattern
2926 tANI_U8 ucPatternByteOffset;
2927 tANI_U8 ucPatternSize; // Non-Zero Pattern size
2928 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
2929 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
2930 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
2931 // Extra pattern data beyond 128 bytes
2932 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
2933 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002934 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07002935} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
2936
2937
2938// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
2939// SME/HDD maintains the list of the BCAST wake-up patterns.
2940// This is a pass through message for PE
2941typedef struct sSirWowlDelBcastPtrn
2942{
2943 /* Pattern ID of the wakeup pattern to be deleted */
2944 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002945 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07002946}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
2947
2948
2949// SME->PE: Enter WOWLAN parameters
2950typedef struct sSirSmeWowlEnterParams
2951{
2952 /* Enables/disables magic packet filtering */
2953 tANI_U8 ucMagicPktEnable;
2954
2955 /* Magic pattern */
2956 tSirMacAddr magicPtrn;
2957
2958 /* Enables/disables packet pattern filtering */
2959 tANI_U8 ucPatternFilteringEnable;
2960
2961#ifdef WLAN_WAKEUP_EVENTS
2962 /* This configuration directs the WoW packet filtering to look for EAP-ID
2963 * requests embedded in EAPOL frames and use this as a wake source.
2964 */
2965 tANI_U8 ucWoWEAPIDRequestEnable;
2966
2967 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
2968 * requests and use this as a wake source.
2969 */
2970 tANI_U8 ucWoWEAPOL4WayEnable;
2971
2972 /* This configuration allows a host wakeup on an network scan offload match.
2973 */
2974 tANI_U8 ucWowNetScanOffloadMatch;
2975
2976 /* This configuration allows a host wakeup on any GTK rekeying error.
2977 */
2978 tANI_U8 ucWowGTKRekeyError;
2979
2980 /* This configuration allows a host wakeup on BSS connection loss.
2981 */
2982 tANI_U8 ucWoWBSSConnLoss;
2983#endif // WLAN_WAKEUP_EVENTS
2984
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002985 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07002986} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
2987
2988
2989// PE<->HAL: Enter WOWLAN parameters
2990typedef struct sSirHalWowlEnterParams
2991{
2992 /* Enables/disables magic packet filtering */
2993 tANI_U8 ucMagicPktEnable;
2994
2995 /* Magic pattern */
2996 tSirMacAddr magicPtrn;
2997
2998 /* Enables/disables packet pattern filtering in firmware.
2999 Enabling this flag enables broadcast pattern matching
3000 in Firmware. If unicast pattern matching is also desired,
3001 ucUcastPatternFilteringEnable flag must be set tot true
3002 as well
3003 */
3004 tANI_U8 ucPatternFilteringEnable;
3005
3006 /* Enables/disables unicast packet pattern filtering.
3007 This flag specifies whether we want to do pattern match
3008 on unicast packets as well and not just broadcast packets.
3009 This flag has no effect if the ucPatternFilteringEnable
3010 (main controlling flag) is set to false
3011 */
3012 tANI_U8 ucUcastPatternFilteringEnable;
3013
3014 /* This configuration is valid only when magicPktEnable=1.
3015 * It requests hardware to wake up when it receives the
3016 * Channel Switch Action Frame.
3017 */
3018 tANI_U8 ucWowChnlSwitchRcv;
3019
3020 /* This configuration is valid only when magicPktEnable=1.
3021 * It requests hardware to wake up when it receives the
3022 * Deauthentication Frame.
3023 */
3024 tANI_U8 ucWowDeauthRcv;
3025
3026 /* This configuration is valid only when magicPktEnable=1.
3027 * It requests hardware to wake up when it receives the
3028 * Disassociation Frame.
3029 */
3030 tANI_U8 ucWowDisassocRcv;
3031
3032 /* This configuration is valid only when magicPktEnable=1.
3033 * It requests hardware to wake up when it has missed
3034 * consecutive beacons. This is a hardware register
3035 * configuration (NOT a firmware configuration).
3036 */
3037 tANI_U8 ucWowMaxMissedBeacons;
3038
3039 /* This configuration is valid only when magicPktEnable=1.
3040 * This is a timeout value in units of microsec. It requests
3041 * hardware to unconditionally wake up after it has stayed
3042 * in WoWLAN mode for some time. Set 0 to disable this feature.
3043 */
3044 tANI_U8 ucWowMaxSleepUsec;
3045
3046#ifdef WLAN_WAKEUP_EVENTS
3047 /* This configuration directs the WoW packet filtering to look for EAP-ID
3048 * requests embedded in EAPOL frames and use this as a wake source.
3049 */
3050 tANI_U8 ucWoWEAPIDRequestEnable;
3051
3052 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3053 * requests and use this as a wake source.
3054 */
3055 tANI_U8 ucWoWEAPOL4WayEnable;
3056
3057 /* This configuration allows a host wakeup on an network scan offload match.
3058 */
3059 tANI_U8 ucWowNetScanOffloadMatch;
3060
3061 /* This configuration allows a host wakeup on any GTK rekeying error.
3062 */
3063 tANI_U8 ucWowGTKRekeyError;
3064
3065 /* This configuration allows a host wakeup on BSS connection loss.
3066 */
3067 tANI_U8 ucWoWBSSConnLoss;
3068#endif // WLAN_WAKEUP_EVENTS
3069
3070 /* Status code to be filled by HAL when it sends
3071 * SIR_HAL_WOWL_ENTER_RSP to PE.
3072 */
3073 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003074
3075 /*BSSID to find the current session
3076 */
3077 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003078} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3079
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003080// PE<->HAL: Exit WOWLAN parameters
3081typedef struct sSirHalWowlExitParams
3082{
3083 /* Status code to be filled by HAL when it sends
3084 * SIR_HAL_WOWL_EXIT_RSP to PE.
3085 */
3086 eHalStatus status;
3087
3088 /*BSSIDX to find the current session
3089 */
3090 tANI_U8 bssIdx;
3091} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3092
Jeff Johnson295189b2012-06-20 16:38:30 -07003093
3094#define SIR_MAX_NAME_SIZE 64
3095#define SIR_MAX_TEXT_SIZE 32
3096
3097typedef struct sSirName {
3098 v_U8_t num_name;
3099 v_U8_t name[SIR_MAX_NAME_SIZE];
3100} tSirName;
3101
3102typedef struct sSirText {
3103 v_U8_t num_text;
3104 v_U8_t text[SIR_MAX_TEXT_SIZE];
3105} tSirText;
3106
3107
3108#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3109#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3110#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3111#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3112#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3113#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3114#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3115#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3116#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3117#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3118#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3119#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3120#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3121#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3122#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3123#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3124
3125
3126typedef struct sSirWPSProbeRspIE {
3127 v_U32_t FieldPresent;
3128 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3129 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3130 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3131 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3132 v_U16_t DevicePasswordID; // Device Password ID
3133 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3134 v_U8_t ResponseType; // Response type
3135 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3136 tSirName Manufacture;
3137 tSirText ModelName;
3138 tSirText ModelNumber;
3139 tSirText SerialNumber;
3140 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3141 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3142 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3143 tSirText DeviceName;
3144 v_U16_t ConfigMethod; // Configuaration method
3145 v_U8_t RFBand; // RF bands available on the AP
3146} tSirWPSProbeRspIE;
3147
3148#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3149#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3150#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3151#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3152#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3153#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3154#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3155#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3156
3157typedef struct sSirWPSBeaconIE {
3158 v_U32_t FieldPresent;
3159 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3160 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3161 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3162 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3163 v_U16_t DevicePasswordID; // Device Password ID
3164 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3165 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3166 v_U8_t RFBand; // RF bands available on the AP
3167} tSirWPSBeaconIE;
3168
3169#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3170#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3171
3172typedef struct sSirWPSAssocRspIE {
3173 v_U32_t FieldPresent;
3174 v_U32_t Version;
3175 v_U8_t ResposeType;
3176} tSirWPSAssocRspIE;
3177
3178typedef struct sSirAPWPSIEs {
3179 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3180 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3181 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3182} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3183
3184typedef struct sSirUpdateAPWPSIEsReq
3185{
3186 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3187 tANI_U16 length;
3188 tANI_U16 transactionId; //Transaction ID for cmd
3189 tSirMacAddr bssId; // BSSID
3190 tANI_U8 sessionId; //Session ID
3191 tSirAPWPSIEs APWPSIEs;
3192} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3193
3194typedef struct sSirUpdateParams
3195{
3196 tANI_U16 messageType;
3197 tANI_U16 length;
3198 tANI_U8 sessionId; // Session ID
3199 tANI_U8 ssidHidden; // Hide SSID
3200} tSirUpdateParams, *tpSirUpdateParams;
3201
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003202//Beacon Interval
3203typedef struct sSirChangeBIParams
3204{
3205 tANI_U16 messageType;
3206 tANI_U16 length;
3207 tANI_U16 beaconInterval; // Beacon Interval
3208 tSirMacAddr bssId;
3209 tANI_U8 sessionId; // Session ID
3210} tSirChangeBIParams, *tpSirChangeBIParams;
3211
Jeff Johnson295189b2012-06-20 16:38:30 -07003212#define SIR_WPS_UUID_LEN 16
3213#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3214
3215typedef struct sSirWPSPBCSession {
3216 struct sSirWPSPBCSession *next;
3217 tSirMacAddr addr;
3218 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3219 tANI_TIMESTAMP timestamp;
3220} tSirWPSPBCSession;
3221
3222typedef struct sSirSmeGetWPSPBCSessionsReq
3223{
3224 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3225 tANI_U16 length;
3226 void *pUsrContext;
3227 void *pSapEventCallback;
3228 tSirMacAddr bssId; // BSSID
3229 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3230} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3231
3232typedef struct sSirWPSPBCProbeReq
3233{
3234 tSirMacAddr peerMacAddr;
3235 tANI_U16 probeReqIELen;
3236 tANI_U8 probeReqIE[512];
3237} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3238
3239// probereq from peer, when wsc is enabled
3240typedef struct sSirSmeProbeReqInd
3241{
3242 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3243 tANI_U16 length;
3244 tANI_U8 sessionId;
3245 tSirMacAddr bssId;
3246 tSirWPSPBCProbeReq WPSPBCProbeReq;
3247} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3248
3249typedef struct sSirUpdateAPWPARSNIEsReq
3250{
3251 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3252 tANI_U16 length;
3253 tANI_U16 transactionId; //Transaction ID for cmd
3254 tSirMacAddr bssId; // BSSID
3255 tANI_U8 sessionId; //Session ID
3256 tSirRSNie APWPARSNIEs;
3257} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3258
Jeff Johnson295189b2012-06-20 16:38:30 -07003259
3260// SME -> HAL - This is the host offload request.
3261#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3262#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3263#define SIR_IPV6_NS_OFFLOAD 2
3264#define SIR_OFFLOAD_DISABLE 0
3265#define SIR_OFFLOAD_ENABLE 1
3266#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
3267#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
3268
3269#ifdef WLAN_NS_OFFLOAD
3270typedef struct sSirNsOffloadReq
3271{
3272 tANI_U8 srcIPv6Addr[16];
3273 tANI_U8 selfIPv6Addr[16];
3274 //Only support 2 possible Network Advertisement IPv6 address
3275 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3276 tANI_U8 selfMacAddr[6];
3277 tANI_U8 srcIPv6AddrValid;
3278 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
3279} tSirNsOffloadReq, *tpSirNsOffloadReq;
3280#endif //WLAN_NS_OFFLOAD
3281
3282typedef struct sSirHostOffloadReq
3283{
3284 tANI_U8 offloadType;
3285 tANI_U8 enableOrDisable;
3286 union
3287 {
3288 tANI_U8 hostIpv4Addr [4];
3289 tANI_U8 hostIpv6Addr [16];
3290 } params;
3291#ifdef WLAN_NS_OFFLOAD
3292 tSirNsOffloadReq nsOffloadInfo;
3293#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003294 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003295} tSirHostOffloadReq, *tpSirHostOffloadReq;
3296
3297/* Packet Types. */
3298#define SIR_KEEP_ALIVE_NULL_PKT 1
3299#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3300
3301/* Enable or disable offload. */
3302#define SIR_KEEP_ALIVE_DISABLE 0
3303#define SIR_KEEP_ALIVE_ENABLE 1
3304
3305/* Keep Alive request. */
3306typedef struct sSirKeepAliveReq
3307{
3308 v_U8_t packetType;
3309 v_U32_t timePeriod;
3310 tSirIpv4Addr hostIpv4Addr;
3311 tSirIpv4Addr destIpv4Addr;
3312 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003313 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003314} tSirKeepAliveReq, *tpSirKeepAliveReq;
3315
3316typedef struct sSirSmeAddStaSelfReq
3317{
3318 tANI_U16 mesgType;
3319 tANI_U16 mesgLen;
3320 tSirMacAddr selfMacAddr;
3321}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3322
3323typedef struct sSirSmeDelStaSelfReq
3324{
3325 tANI_U16 mesgType;
3326 tANI_U16 mesgLen;
3327 tSirMacAddr selfMacAddr;
3328}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3329
3330typedef struct sSirSmeAddStaSelfRsp
3331{
3332 tANI_U16 mesgType;
3333 tANI_U16 mesgLen;
3334 tANI_U16 status;
3335 tSirMacAddr selfMacAddr;
3336}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3337
3338typedef struct sSirSmeDelStaSelfRsp
3339{
3340 tANI_U16 mesgType;
3341 tANI_U16 mesgLen;
3342 tANI_U16 status;
3343 tSirMacAddr selfMacAddr;
3344}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3345
3346/* Coex Indication defines -
3347 should match WLAN_COEX_IND_DATA_SIZE
3348 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3349 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3350#define SIR_COEX_IND_DATA_SIZE (4)
3351#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3352#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003353#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3354#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003355#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3356#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003357
3358typedef struct sSirSmeCoexInd
3359{
3360 tANI_U16 mesgType;
3361 tANI_U16 mesgLen;
3362 tANI_U32 coexIndType;
3363 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3364}tSirSmeCoexInd, *tpSirSmeCoexInd;
3365
Jeff Johnson295189b2012-06-20 16:38:30 -07003366typedef struct sSirSmeMgmtFrameInd
3367{
3368 tANI_U16 mesgType;
3369 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303370 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003371 tANI_U8 sessionId;
3372 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303373 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003374 tANI_U8 frameBuf[1]; //variable
3375}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003376
Chet Lanctot186b5732013-03-18 10:26:30 -07003377#ifdef WLAN_FEATURE_11W
3378typedef struct sSirSmeUnprotMgmtFrameInd
3379{
3380 tANI_U8 sessionId;
3381 tANI_U8 frameType;
3382 tANI_U8 frameLen;
3383 tANI_U8 frameBuf[1]; //variable
3384}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3385#endif
3386
Jeff Johnson295189b2012-06-20 16:38:30 -07003387#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3388 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3389 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3390 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3391#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3392 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3393
3394/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003395typedef struct sSirNoAParam
3396{
3397 tANI_U8 ctWindow:7;
3398 tANI_U8 OppPS:1;
3399 tANI_U8 count;
3400 tANI_U32 duration;
3401 tANI_U32 interval;
3402 tANI_U32 singleNoADuration;
3403 tANI_U8 psSelection;
3404}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003405
Jeff Johnson295189b2012-06-20 16:38:30 -07003406typedef struct sSirWlanSuspendParam
3407{
3408 tANI_U8 configuredMcstBcstFilterSetting;
3409}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3410
3411typedef struct sSirWlanResumeParam
3412{
3413 tANI_U8 configuredMcstBcstFilterSetting;
3414}tSirWlanResumeParam,*tpSirWlanResumeParam;
3415
3416typedef struct sSirWlanSetRxpFilters
3417{
3418 tANI_U8 configuredMcstBcstFilterSetting;
3419 tANI_U8 setMcstBcstFilter;
3420}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003421
3422
3423#ifdef FEATURE_WLAN_SCAN_PNO
3424//
3425// PNO Messages
3426//
3427
3428// Set PNO
3429#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303430#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003431#define SIR_PNO_MAX_SUPP_NETWORKS 16
3432#define SIR_PNO_MAX_SCAN_TIMERS 10
3433
3434/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3435#define SIR_PNO_MAX_PB_REQ_SIZE 450
3436
3437#define SIR_PNO_24G_DEFAULT_CH 1
3438#define SIR_PNO_5G_DEFAULT_CH 36
3439
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003440#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3441#define SIR_ROAM_MAX_CHANNELS NUM_RF_CHANNELS
3442#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3443#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3444#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3445#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3446#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3447#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3448#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003449#define SIR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
3450#define SIR_ROAM_SCAN_RESERVED_BYTES 61
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003451#endif
3452
Jeff Johnson295189b2012-06-20 16:38:30 -07003453typedef enum
3454{
3455 SIR_PNO_MODE_IMMEDIATE,
3456 SIR_PNO_MODE_ON_SUSPEND,
3457 SIR_PNO_MODE_ON_RESUME,
3458 SIR_PNO_MODE_MAX
3459} eSirPNOMode;
3460
3461typedef struct
3462{
3463 tSirMacSSid ssId;
3464 tANI_U32 authentication;
3465 tANI_U32 encryption;
3466 tANI_U32 bcastNetwType;
3467 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303468 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003469 tANI_U8 rssiThreshold;
3470} tSirNetworkType;
3471
3472typedef struct
3473{
3474 tANI_U32 uTimerValue;
3475 tANI_U32 uTimerRepeat;
3476}tSirScanTimer;
3477
3478typedef struct
3479{
3480 tANI_U8 ucScanTimersCount;
3481 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3482} tSirScanTimersType;
3483
3484typedef struct sSirPNOScanReq
3485{
3486 tANI_U8 enable;
3487 eSirPNOMode modePNO;
3488 tANI_U8 ucNetworksCount;
3489 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3490 tSirScanTimersType scanTimers;
3491
3492 /*added by SME*/
3493 tANI_U16 us24GProbeTemplateLen;
3494 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3495 tANI_U16 us5GProbeTemplateLen;
3496 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3497} tSirPNOScanReq, *tpSirPNOScanReq;
3498
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003499#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3500typedef struct
3501{
3502 tSirMacSSid ssId;
3503 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3504 tANI_U32 authentication;
3505 tANI_U8 encryption;
3506 tANI_U8 mcencryption;
3507 tANI_U8 ChannelCount;
3508 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3509
3510} tSirRoamNetworkType;
3511
3512typedef struct SirMobilityDomainInfo
3513{
3514 tANI_U8 mdiePresent;
3515 tANI_U16 mobilityDomain;
3516} tSirMobilityDomainInfo;
3517
3518typedef struct sSirRoamOffloadScanReq
3519{
3520 eAniBoolean RoamScanOffloadEnabled;
3521 tANI_S8 LookupThreshold;
3522 tANI_U8 RoamRssiDiff;
3523 tANI_U8 ChannelCacheType;
3524 tANI_U8 Command;
3525 tANI_U8 StartScanReason;
3526 tANI_U16 NeighborScanTimerPeriod;
3527 tANI_U16 NeighborRoamScanRefreshPeriod;
3528 tANI_U16 NeighborScanChannelMinTime;
3529 tANI_U16 NeighborScanChannelMaxTime;
3530 tANI_U16 EmptyRefreshScanPeriod;
3531 tANI_U8 ValidChannelCount;
3532 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
3533 eAniBoolean IsCCXEnabled;
3534 tANI_U16 us24GProbeTemplateLen;
3535 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3536 tANI_U16 us5GProbeTemplateLen;
3537 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003538 tANI_U8 ReservedBytes[SIR_ROAM_SCAN_RESERVED_BYTES];
3539 /*ReservedBytes is to add any further params in future
3540 without changing the interface params on Host
3541 and firmware.The firmware right now checks
3542 if the size of this structure matches and then
3543 proceeds with the processing of the command.
3544 So, in future, if there is any need to add
3545 more params, pick the memory from reserved
3546 bytes and keep deducting the reserved bytes
3547 by the amount of bytes picked.*/
3548 tANI_U8 nProbes;
3549 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003550 tSirRoamNetworkType ConnectedNetwork;
3551 tSirMobilityDomainInfo MDID;
3552} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
3553#endif
3554
Jeff Johnson295189b2012-06-20 16:38:30 -07003555typedef struct sSirSetRSSIFilterReq
3556{
3557 tANI_U8 rssiThreshold;
3558} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3559
3560
3561// Update Scan Params
3562typedef struct {
3563 tANI_U8 b11dEnabled;
3564 tANI_U8 b11dResolved;
3565 tANI_U8 ucChannelCount;
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303566 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003567 tANI_U16 usPassiveMinChTime;
3568 tANI_U16 usPassiveMaxChTime;
3569 tANI_U16 usActiveMinChTime;
3570 tANI_U16 usActiveMaxChTime;
3571 tANI_U8 ucCBState;
3572} tSirUpdateScanParams, * tpSirUpdateScanParams;
3573
3574// Preferred Network Found Indication
3575typedef struct
3576{
Srikant Kuppa066904f2013-05-07 13:56:02 -07003577 tANI_U16 mesgType;
3578 tANI_U16 mesgLen;
Jeff Johnson295189b2012-06-20 16:38:30 -07003579 /* Network that was found with the highest RSSI*/
Srikant Kuppa066904f2013-05-07 13:56:02 -07003580 tSirMacSSid ssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003581 /* Indicates the RSSI */
Srikant Kuppa066904f2013-05-07 13:56:02 -07003582 tANI_U8 rssi;
3583 /* Length of the beacon or probe response
3584 * corresponding to the candidate found by PNO */
3585 tANI_U32 frameLength;
3586 /* Index to memory location where the contents of
3587 * beacon or probe response frame will be copied */
3588 tANI_U8 data[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07003589} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3590#endif // FEATURE_WLAN_SCAN_PNO
3591
3592#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3593
3594//Power Parameters Type
3595typedef enum
3596{
3597 eSIR_IGNORE_DTIM = 1,
3598 eSIR_LISTEN_INTERVAL = 2,
3599 eSIR_MCAST_BCAST_FILTER = 3,
3600 eSIR_ENABLE_BET = 4,
3601 eSIR_BET_INTERVAL = 5
3602}tPowerParamType;
3603
3604//Power Parameters Value s
3605typedef struct
3606{
3607 /* Ignore DTIM */
3608 tANI_U32 uIgnoreDTIM;
3609
3610 /* DTIM Period */
3611 tANI_U32 uDTIMPeriod;
3612
3613 /* Listen Interval */
3614 tANI_U32 uListenInterval;
3615
3616 /* Broadcast Multicas Filter */
3617 tANI_U32 uBcastMcastFilter;
3618
3619 /* Beacon Early Termination */
3620 tANI_U32 uEnableBET;
3621
3622 /* Beacon Early Termination Interval */
3623 tANI_U32 uBETInterval;
3624
Yue Mac24062f2013-05-13 17:01:29 -07003625 /* MAX LI for modulated DTIM */
3626 tANI_U32 uMaxLIModulatedDTIM;
3627
Jeff Johnson295189b2012-06-20 16:38:30 -07003628}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3629
3630typedef struct sSirTxPerTrackingParam
3631{
3632 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3633 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3634 tANI_U8 ucTxPerTrackingRatio; /* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. for example, 5 means 50% TX failed rate, default is 5. If current TX packet failed rate bigger than this ratio then firmware send WLC_E_TX_STAT_ERROR event to driver */
3635 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3636}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3637
3638#ifdef WLAN_FEATURE_PACKET_FILTERING
3639/*---------------------------------------------------------------------------
3640 Packet Filtering Parameters
3641---------------------------------------------------------------------------*/
3642#define SIR_IPV4_ADDR_LEN 4
3643#define SIR_MAC_ADDR_LEN 6
3644#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3645#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3646#define SIR_MAX_NUM_FILTERS 20
3647#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3648
3649//
3650// Receive Filter Parameters
3651//
3652typedef enum
3653{
3654 SIR_RCV_FILTER_TYPE_INVALID,
3655 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3656 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3657 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3658}eSirReceivePacketFilterType;
3659
3660typedef enum
3661{
3662 SIR_FILTER_HDR_TYPE_INVALID,
3663 SIR_FILTER_HDR_TYPE_MAC,
3664 SIR_FILTER_HDR_TYPE_ARP,
3665 SIR_FILTER_HDR_TYPE_IPV4,
3666 SIR_FILTER_HDR_TYPE_IPV6,
3667 SIR_FILTER_HDR_TYPE_UDP,
3668 SIR_FILTER_HDR_TYPE_MAX
3669}eSirRcvPktFltProtocolType;
3670
3671typedef enum
3672{
3673 SIR_FILTER_CMP_TYPE_INVALID,
3674 SIR_FILTER_CMP_TYPE_EQUAL,
3675 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3676 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3677 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3678 SIR_FILTER_CMP_TYPE_MAX
3679}eSirRcvPktFltCmpFlagType;
3680
3681typedef struct sSirRcvPktFilterFieldParams
3682{
3683 eSirRcvPktFltProtocolType protocolLayer;
3684 eSirRcvPktFltCmpFlagType cmpFlag;
3685 /* Length of the data to compare */
3686 tANI_U16 dataLength;
3687 /* from start of the respective frame header */
3688 tANI_U8 dataOffset;
3689 /* Reserved field */
3690 tANI_U8 reserved;
3691 /* Data to compare */
3692 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3693 /* Mask to be applied on the received packet data before compare */
3694 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3695}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3696
3697typedef struct sSirRcvPktFilterCfg
3698{
3699 tANI_U8 filterId;
3700 eSirReceivePacketFilterType filterType;
3701 tANI_U32 numFieldParams;
3702 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003703 tSirMacAddr selfMacAddr;
3704 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003705 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003706}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3707
3708//
3709// Filter Packet Match Count Parameters
3710//
3711typedef struct sSirRcvFltPktMatchCnt
3712{
3713 tANI_U8 filterId;
3714 tANI_U32 matchCnt;
3715} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3716
3717typedef struct sSirRcvFltPktMatchRsp
3718{
3719 tANI_U16 mesgType;
3720 tANI_U16 mesgLen;
3721
3722 /* Success or Failure */
3723 tANI_U32 status;
3724 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003725 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003726} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3727
3728//
3729// Receive Filter Clear Parameters
3730//
3731typedef struct sSirRcvFltPktClearParam
3732{
3733 tANI_U32 status; /* only valid for response message */
3734 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003735 tSirMacAddr selfMacAddr;
3736 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003737}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3738
3739//
3740// Multicast Address List Parameters
3741//
3742typedef struct sSirRcvFltMcAddrList
3743{
3744 tANI_U32 ulMulticastAddrCnt;
3745 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003746 tSirMacAddr selfMacAddr;
3747 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003748} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3749#endif // WLAN_FEATURE_PACKET_FILTERING
3750
3751//
3752// Generic version information
3753//
3754typedef struct
3755{
3756 tANI_U8 revision;
3757 tANI_U8 version;
3758 tANI_U8 minor;
3759 tANI_U8 major;
3760} tSirVersionType;
3761
3762typedef struct sAniBtAmpLogLinkReq
3763{
3764 // Common for all types are requests
3765 tANI_U16 msgType; // message type is same as the request type
3766 tANI_U16 msgLen; // length of the entire request
3767 tANI_U8 sessionId; //sme Session Id
3768 void *btampHandle; //AMP context
3769
3770} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
3771
3772#ifdef WLAN_FEATURE_GTK_OFFLOAD
3773/*---------------------------------------------------------------------------
3774* WDA_GTK_OFFLOAD_REQ
3775*--------------------------------------------------------------------------*/
3776typedef struct
3777{
3778 tANI_U32 ulFlags; /* optional flags */
3779 tANI_U8 aKCK[16]; /* Key confirmation key */
3780 tANI_U8 aKEK[16]; /* key encryption key */
3781 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003782 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003783} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3784
3785/*---------------------------------------------------------------------------
3786* WDA_GTK_OFFLOAD_GETINFO_REQ
3787*--------------------------------------------------------------------------*/
3788typedef struct
3789{
3790 tANI_U16 mesgType;
3791 tANI_U16 mesgLen;
3792
3793 tANI_U32 ulStatus; /* success or failure */
3794 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
3795 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
3796 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
3797 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003798 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003799} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
3800#endif // WLAN_FEATURE_GTK_OFFLOAD
3801
3802#ifdef WLAN_WAKEUP_EVENTS
3803/*---------------------------------------------------------------------------
3804 tSirWakeReasonInd
3805---------------------------------------------------------------------------*/
3806typedef struct
3807{
3808 tANI_U16 mesgType;
3809 tANI_U16 mesgLen;
3810 tANI_U32 ulReason; /* see tWakeReasonType */
3811 tANI_U32 ulReasonArg; /* argument specific to the reason type */
3812 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
3813 HAL truncates the data (i.e. data packets) this length
3814 will be less than the actual length */
3815 tANI_U32 ulActualDataLen; /* actual length of data */
3816 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
3817 see specific wake type */
3818} tSirWakeReasonInd, *tpSirWakeReasonInd;
3819#endif // WLAN_WAKEUP_EVENTS
3820
3821/*---------------------------------------------------------------------------
3822 sAniSetTmLevelReq
3823---------------------------------------------------------------------------*/
3824typedef struct sAniSetTmLevelReq
3825{
3826 tANI_U16 tmMode;
3827 tANI_U16 newTmLevel;
3828} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
3829
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003830#ifdef FEATURE_WLAN_TDLS
3831/* TDLS Request struct SME-->PE */
3832typedef struct sSirTdlsSendMgmtReq
3833{
3834 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3835 tANI_U16 length;
3836 tANI_U8 sessionId; // Session ID
3837 tANI_U16 transactionId; // Transaction ID for cmd
3838 tANI_U8 reqType;
3839 tANI_U8 dialog;
3840 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08003841 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003842 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
3843 tSirMacAddr peerMac;
3844 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
3845} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003846
3847typedef enum TdlsAddOper
3848{
3849 TDLS_OPER_NONE,
3850 TDLS_OPER_ADD,
3851 TDLS_OPER_UPDATE
3852} eTdlsAddOper;
3853
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003854/* TDLS Request struct SME-->PE */
3855typedef struct sSirTdlsAddStaReq
3856{
3857 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3858 tANI_U16 length;
3859 tANI_U8 sessionId; // Session ID
3860 tANI_U16 transactionId; // Transaction ID for cmd
3861 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003862 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003863 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003864 tANI_U16 capability;
3865 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
3866 tANI_U8 supported_rates_length;
3867 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07003868 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003869 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07003870 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003871 tSirVHTCap vhtCap;
3872 tANI_U8 uapsd_queues;
3873 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003874} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003875
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003876/* TDLS Response struct PE-->SME */
3877typedef struct sSirTdlsAddStaRsp
3878{
3879 tANI_U16 messageType;
3880 tANI_U16 length;
3881 tSirResultCodes statusCode;
3882 tSirMacAddr peerMac;
3883 tANI_U8 sessionId; // Session ID
3884 tANI_U16 staId ;
3885 tANI_U16 staType ;
3886 tANI_U8 ucastSig;
3887 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003888 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003889} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303890
3891/* TDLS Request struct SME-->PE */
3892typedef struct
3893{
3894 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
3895 tANI_U16 length;
3896 tANI_U8 sessionId; // Session ID
3897 tANI_U16 transactionId; // Transaction ID for cmd
3898 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
3899 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
3900 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
3901 tANI_U8 isResponder; // Is Peer a responder.
3902 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
3903 tSirMacAddr peerMac;
3904}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
3905
3906/* TDLS Request struct SME-->PE */
3907typedef struct
3908{
3909 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
3910 tANI_U16 length;
3911 tANI_U8 sessionId; // Session ID
3912 tANI_U16 transactionId; // Transaction ID for cmd
3913 tSirResultCodes statusCode;
3914 tSirMacAddr peerMac;
3915}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
3916
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003917/* TDLS Request struct SME-->PE */
3918typedef struct sSirTdlsDelStaReq
3919{
3920 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3921 tANI_U16 length;
3922 tANI_U8 sessionId; // Session ID
3923 tANI_U16 transactionId; // Transaction ID for cmd
3924 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
3925 tSirMacAddr peerMac;
3926} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
3927/* TDLS Response struct PE-->SME */
3928typedef struct sSirTdlsDelStaRsp
3929{
3930 tANI_U16 messageType;
3931 tANI_U16 length;
3932 tANI_U8 sessionId; // Session ID
3933 tSirResultCodes statusCode;
3934 tSirMacAddr peerMac;
3935 tANI_U16 staId;
3936} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08003937/* TDLS Delete Indication struct PE-->SME */
3938typedef struct sSirTdlsDelStaInd
3939{
3940 tANI_U16 messageType;
3941 tANI_U16 length;
3942 tANI_U8 sessionId; // Session ID
3943 tSirMacAddr peerMac;
3944 tANI_U16 staId;
3945 tANI_U16 reasonCode;
3946} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08003947typedef struct sSirTdlsDelAllPeerInd
3948{
3949 tANI_U16 messageType;
3950 tANI_U16 length;
3951 tANI_U8 sessionId; // Session ID
3952} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkala78a6c812013-05-13 16:39:49 +05303953#ifdef FEATURE_WLAN_TDLS_OXYGEN_DISAPPEAR_AP
3954typedef struct sSirTdlsDisappearAPInd
3955{
3956 tANI_U16 messageType;
3957 tANI_U16 length;
3958 tANI_U8 sessionId; // Session ID
3959 tANI_U16 staId;
3960 tSirMacAddr staAddr;
3961} tSirTdlsDisappearAPInd, *tpSirTdlsDisappearAPInd;
3962#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -08003963typedef struct sSirMgmtTxCompletionInd
3964{
3965 tANI_U16 messageType;
3966 tANI_U16 length;
3967 tANI_U8 sessionId; // Session ID
3968 tANI_U32 txCompleteStatus;
3969} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003970#endif /* FEATURE_WLAN_TDLS */
3971
3972#ifdef FEATURE_WLAN_TDLS_INTERNAL
3973typedef enum tdlsListType
3974{
3975 TDLS_DIS_LIST,
3976 TDLS_SETUP_LIST
3977}eTdlsListType ;
3978
3979typedef enum tdlsStates
3980{
3981 TDLS_LINK_IDLE_STATE,
3982 TDLS_LINK_DIS_INIT_STATE,
3983 TDLS_LINK_DIS_RSP_WAIT_STATE,
3984 TDLS_DIS_REQ_PROCESS_STATE,
3985 TDLS_DIS_RSP_SENT_WAIT_STATE,
3986 TDLS_DIS_RSP_SENT_DONE_STATE,
3987 TDLS_LINK_DIS_DONE_STATE,
3988 TDLS_LINK_SETUP_START_STATE,
3989 TDLS_LINK_SETUP_WAIT_STATE,
3990 TDLS_LINK_SETUP_RSP_WAIT_STATE,
3991 TDLS_LINK_SETUP_DONE_STATE,
3992 TDLS_LINK_TEARDOWN_START_STATE,
3993 TDLS_LINK_TEARDOWN_DONE_STATE,
3994 TDLS_LINK_SETUP_STATE
3995}eSirTdlsStates ;
3996
3997typedef struct sSirTdlsPeerInfo
3998{
3999 tSirMacAddr peerMac;
4000 tANI_U8 sessionId;
4001 tANI_U8 dialog ;
4002 tSirMacCapabilityInfo capabilityInfo ;
4003 tSirMacRateSet tdlsPeerSuppRates ;
4004 tSirMacRateSet tdlsPeerExtRates ;
4005 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4006 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4007 tSirMacHTParametersInfo tdlsPeerHtParams ;
4008 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4009 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4010
4011 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4012 tSirMacRsnInfo tdlsPeerRsn ;
4013 tANI_U16 tdlsPeerFtIe ;
4014 tANI_U16 tdlsPeerTimeoutIntvl ;
4015 tANI_U16 tdlsPeerSuppChan ;
4016 tANI_U16 tdlsPeerSuppReguClass ;
4017 tANI_S8 tdlsPeerRssi ;
4018 tANI_U16 tdlsPeerState ;
4019 /* flags to indicate optional IE's are in */
4020 tANI_U8 ExtRatesPresent ;
4021 tANI_U8 rsnIePresent ;
4022 tANI_U8 htCapPresent ;
4023 tANI_U8 delStaNeeded ;
4024
4025} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4026
4027/* TDLS Request struct SME-->PE */
4028typedef struct sSirTdlsDiscoveryReq
4029{
4030 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4031 tANI_U16 length;
4032 tANI_U8 sessionId; // Session ID
4033 tANI_U16 transactionId; // Transaction ID for cmd
4034 tANI_U8 reqType;
4035 tANI_U8 dialog;
4036 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4037 tSirMacAddr peerMac;
4038} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4039
4040typedef struct sSirTdlsLinkSetupReq
4041{
4042 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4043 tANI_U16 length;
4044 tANI_U8 sessionId; // Session ID
4045 tANI_U16 transactionId; // Transaction ID for cmd
4046 tANI_U8 dialog;
4047 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4048 tSirMacAddr peerMac;
4049} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4050
4051typedef struct sSirTdlsTeardownReq
4052{
4053 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4054 tANI_U16 length;
4055 tANI_U8 sessionId; // Session ID
4056 tANI_U16 transactionId; // Transaction ID for cmd
4057 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4058 tSirMacAddr peerMac;
4059} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4060
4061
4062/* TDLS response struct PE-->SME */
4063typedef struct sSirTdlsDiscoveryRsp
4064{
4065 tANI_U16 messageType;
4066 tANI_U16 length;
4067 tSirResultCodes statusCode;
4068 tANI_U16 numDisSta ;
4069 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4070} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4071
4072typedef struct sSirTdlsLinkSetupRsp
4073{
4074 tANI_U16 messageType;
4075 tANI_U16 length;
4076 tSirResultCodes statusCode;
4077 tSirMacAddr peerMac;
4078} tSirTdlsLinksetupRsp ;
4079
4080typedef struct sSirTdlsLinkSetupInd
4081{
4082 tANI_U16 messageType;
4083 tANI_U16 length;
4084 tSirResultCodes statusCode;
4085 tSirMacAddr peerMac;
4086} tSirTdlsLinkSetupInd ;
4087
4088
4089typedef struct sSirTdlsTeardownRsp
4090{
4091 tANI_U16 messageType;
4092 tANI_U16 length;
4093 tSirResultCodes statusCode;
4094 tSirMacAddr peerMac;
4095} tSirTdlsTeardownRsp ;
4096
4097typedef struct sSirTdlsPeerInd
4098{
4099 tANI_U16 messageType;
4100 tANI_U16 length;
4101 tSirMacAddr peerMac;
4102 tANI_U8 sessionId; // Session ID
4103 tANI_U16 staId ;
4104 tANI_U16 staType ;
4105 tANI_U8 ucastSig;
4106 tANI_U8 bcastSig;
4107} tSirTdlsPeerInd ;
4108
4109typedef struct sSirTdlsLinkEstablishInd
4110{
4111 tANI_U16 messageType;
4112 tANI_U16 length;
4113 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4114 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4115 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4116 tANI_U8 ptiTemplateLen;
4117 tANI_U8 ptiTemplateBuf[64];
4118 tANI_U8 extCapability[8];
4119/* This will be part of PTI template when sent by PE
4120 tANI_U8 linkIdentifier[20];
4121*/
4122} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4123
4124typedef struct sSirTdlsLinkTeardownInd
4125{
4126 tANI_U16 messageType;
4127 tANI_U16 length;
4128 tANI_U16 staId;
4129} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4130
4131#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4132
Yathish9f22e662012-12-10 14:21:35 -08004133typedef struct sSirActiveModeSetBcnFilterReq
4134{
4135 tANI_U16 messageType;
4136 tANI_U16 length;
4137 tANI_U8 seesionId;
4138} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4139
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304140//Reset AP Caps Changed
4141typedef struct sSirResetAPCapsChange
4142{
4143 tANI_U16 messageType;
4144 tANI_U16 length;
4145 tSirMacAddr bssId;
4146} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004147/// Definition for Candidate found indication from FW
4148typedef struct sSirSmeCandidateFoundInd
4149{
4150 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4151 tANI_U16 length;
4152 tANI_U8 sessionId; // Session Identifier
4153} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004154
Chet Lanctot186b5732013-03-18 10:26:30 -07004155#ifdef WLAN_FEATURE_11W
4156typedef struct sSirWlanExcludeUnencryptParam
4157{
4158 tANI_BOOLEAN excludeUnencrypt;
4159 tSirMacAddr bssId;
4160}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4161#endif
4162
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004163typedef struct sAniHandoffReq
4164{
4165 // Common for all types are requests
4166 tANI_U16 msgType; // message type is same as the request type
4167 tANI_U16 msgLen; // length of the entire request
4168 tANI_U8 sessionId;
4169 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4170 tANI_U8 channel;
4171} tAniHandoffReq, *tpAniHandoffReq;
4172
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304173typedef struct sSirScanOffloadReq {
4174 tANI_U8 sessionId;
4175 tSirMacAddr bssId;
4176 tANI_U8 numSsid;
4177 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4178 tANI_U8 hiddenSsid;
4179 tSirMacAddr selfMacAddr;
4180 tSirBssType bssType;
4181 tANI_U8 dot11mode;
4182 tSirScanType scanType;
4183 tANI_U32 minChannelTime;
4184 tANI_U32 maxChannelTime;
4185 tANI_BOOLEAN p2pSearch;
4186 tANI_U16 uIEFieldLen;
4187 tANI_U16 uIEFieldOffset;
4188 tSirChannelList channelList;
4189 /*-----------------------------
4190 sSirScanOffloadReq....
4191 -----------------------------
4192 uIEFieldLen
4193 -----------------------------
4194 uIEFieldOffset ----+
4195 ----------------------------- |
4196 channelList.numChannels |
4197 ----------------------------- |
4198 ... variable size up to |
4199 channelNumber[numChannels-1] |
4200 This can be zero, if |
4201 numChannel is zero. |
4202 ----------------------------- <--+
4203 ... variable size uIEField
4204 up to uIEFieldLen (can be 0)
4205 -----------------------------*/
4206} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304207
4208typedef enum sSirScanEventType {
4209 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4210 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4211 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4212 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4213 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4214 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4215 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4216 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4217 SCAN_EVENT_MAX=0x8000
4218} tSirScanEventType;
4219
4220typedef struct sSirScanOffloadEvent{
4221 tSirScanEventType event;
4222 tSirResultCodes reasonCode;
4223 tANI_U32 chanFreq;
4224 tANI_U32 requestor;
4225 tANI_U32 scanId;
4226} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4227
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304228typedef struct sSirUpdateChanParam
4229{
4230 tANI_U8 chanId;
4231 tANI_U8 pwr;
4232} tSirUpdateChanParam, *tpSirUpdateChanParam;
4233
4234typedef struct sSirUpdateChan
4235{
4236 tANI_U8 numChan;
4237 tSirUpdateChanParam chanParam[1];
4238} tSirUpdateChanList, *tpSirUpdateChanList;
4239
Jeff Johnson295189b2012-06-20 16:38:30 -07004240#endif /* __SIR_API_H */