blob: 0dfddd0e9fb947a866be7f387d2869cc79230222 [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;
455 tANI_U8 probeRspIe[1];
456}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
457
458typedef struct sSirRegisterMgmtFrame
459{
460 tANI_U16 messageType;
461 tANI_U16 length;
462 tANI_U8 sessionId;
463 tANI_BOOLEAN registerFrame;
464 tANI_U16 frameType;
465 tANI_U16 matchLen;
466 tANI_U8 matchData[1];
467}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700468
469//
Jeff Johnson295189b2012-06-20 16:38:30 -0700470// Identifies the neighbor BSS' that was(were) detected
471// by an STA and reported to the AP
472//
473typedef struct sAniTitanCBNeighborInfo
474{
475 // A BSS was found on the Primary
476 tANI_U8 cbBssFoundPri;
477
478 // A BSS was found on the adjacent Upper Secondary
479 tANI_U8 cbBssFoundSecUp;
480
481 // A BSS was found on the adjacent Lower Secondary
482 tANI_U8 cbBssFoundSecDown;
483
484} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
485
Jeff Johnson295189b2012-06-20 16:38:30 -0700486/// Generic type for sending a response message
487/// with result code to host software
488typedef struct sSirSmeRsp
489{
490 tANI_U16 messageType; // eWNI_SME_*_RSP
491 tANI_U16 length;
492 tANI_U8 sessionId; // To support BT-AMP
493 tANI_U16 transactionId; // To support BT-AMP
494 tSirResultCodes statusCode;
495} tSirSmeRsp, *tpSirSmeRsp;
496
497/// Definition for kick starting Firmware on STA
498typedef struct sSirSmeStartReq
499{
500 tANI_U16 messageType; // eWNI_SME_START_REQ
501 tANI_U16 length;
502 tANI_U8 sessionId; //Added for BT-AMP Support
503 tANI_U16 transcationId; //Added for BT-AMP Support
504 tSirMacAddr bssId; //Added For BT-AMP Support
505 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700506 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700507} tSirSmeStartReq, *tpSirSmeStartReq;
508
509/// Definition for indicating all modules ready on STA
510typedef struct sSirSmeReadyReq
511{
512 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
513 tANI_U16 length;
514 tANI_U16 transactionId;
515} tSirSmeReadyReq, *tpSirSmeReadyReq;
516
517/// Definition for response message to previously issued start request
518typedef struct sSirSmeStartRsp
519{
520 tANI_U16 messageType; // eWNI_SME_START_RSP
521 tANI_U16 length;
522 tSirResultCodes statusCode;
523 tANI_U16 transactionId;
524} tSirSmeStartRsp, *tpSirSmeStartRsp;
525
Jeff Johnson295189b2012-06-20 16:38:30 -0700526
527/// Definition for Load structure
528typedef struct sSirLoad
529{
530 tANI_U16 numStas;
531 tANI_U16 channelUtilization;
532} tSirLoad, *tpSirLoad;
533
534/// BSS type enum used in while scanning/joining etc
535typedef enum eSirBssType
536{
537 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700538 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700539 eSIR_IBSS_MODE,
540 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
541 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
542 eSIR_AUTO_MODE,
543 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
544} tSirBssType;
545
546/// Definition for WDS Information
547typedef struct sSirWdsInfo
548{
549 tANI_U16 wdsLength;
550 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
551} tSirWdsInfo, *tpSirWdsInfo;
552
553/// Power Capability info used in 11H
554typedef struct sSirMacPowerCapInfo
555{
556 tANI_U8 minTxPower;
557 tANI_U8 maxTxPower;
558} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
559
560/// Supported Channel info used in 11H
561typedef struct sSirSupChnl
562{
563 tANI_U8 numChnl;
564 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
565} tSirSupChnl, *tpSirSupChnl;
566
567typedef enum eSirNwType
568{
569 eSIR_11A_NW_TYPE,
570 eSIR_11B_NW_TYPE,
571 eSIR_11G_NW_TYPE,
572 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700573#ifdef WLAN_FEATURE_11AC
574 eSIR_11AC_NW_TYPE,
575#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700576 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
577} tSirNwType;
578
579/// Definition for new iBss peer info
580typedef struct sSirNewIbssPeerInfo
581{
582 tSirMacAddr peerAddr;
583 tANI_U16 aid;
584} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
585
586/// Definition for Alternate BSS info
587typedef struct sSirAlternateRadioInfo
588{
589 tSirMacAddr bssId;
590 tANI_U8 channelId;
591} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
592
593/// Definition for Alternate BSS list
594typedef struct sSirAlternateRadioList
595{
596 tANI_U8 numBss;
597 tSirAlternateRadioInfo alternateRadio[1];
598} tSirAlternateRadioList, *tpSirAlternateRadioList;
599
600/// Definition for kick starting BSS
601/// ---> MAC
602/**
603 * Usage of ssId, numSSID & ssIdList:
604 * ---------------------------------
605 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
606 * feature is enabled.
607 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
608 * and interpret the SSID list from numSSID & ssIdList.
609 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
610 * specified in the ssId field and it is expected that
611 * application will set numSSID to one (only one SSID present
612 * in the list) and SSID in the list is same as ssId field.
613 * 4. Application will always set numSSID >= 1.
614 */
615//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
616typedef struct sSirSmeStartBssReq
617{
618 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
619 tANI_U16 length;
620 tANI_U8 sessionId; //Added for BT-AMP Support
621 tANI_U16 transactionId; //Added for BT-AMP Support
622 tSirMacAddr bssId; //Added for BT-AMP Support
623 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
624 tANI_U16 beaconInterval; //Added for BT-AMP Support
625 tANI_U8 dot11mode;
626 tSirBssType bssType;
627 tSirMacSSid ssId;
628 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700629 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700630
Jeff Johnson295189b2012-06-20 16:38:30 -0700631 tANI_U8 privacy;
632 tANI_U8 apUapsdEnable;
633 tANI_U8 ssidHidden;
634 tANI_BOOLEAN fwdWPSPBCProbeReq;
635 tANI_BOOLEAN protEnabled;
636 tANI_BOOLEAN obssProtEnabled;
637 tANI_U16 ht_capab;
638 tAniAuthType authType;
639 tANI_U32 dtimPeriod;
640 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700641 tVOS_CON_MODE bssPersona;
642
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800643 tANI_U8 txLdpcIniFeatureEnabled;
644
Jeff Johnson295189b2012-06-20 16:38:30 -0700645 tSirRSNie rsnIE; // RSN IE to be sent in
646 // Beacon and Probe
647 // Response frames
648 tSirNwType nwType; // Indicates 11a/b/g
649 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
650 tSirMacRateSet extendedRateSet; // Has 11g rates
651
Jeff Johnson295189b2012-06-20 16:38:30 -0700652} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
653
654#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
655 ((int) OFFSET_OF( tSirBssDescription, ieFields)))
656
657#define WSCIE_PROBE_RSP_LEN (317 + 2)
658
659typedef struct sSirBssDescription
660{
661 //offset of the ieFields from bssId.
662 tANI_U16 length;
663 tSirMacAddr bssId;
664 v_TIME_t scanSysTimeMsec;
665 tANI_U32 timeStamp[2];
666 tANI_U16 beaconInterval;
667 tANI_U16 capabilityInfo;
668 tSirNwType nwType; // Indicates 11a/b/g
669 tANI_U8 aniIndicator;
670 tANI_S8 rssi;
671 tANI_S8 sinr;
672 //channelId what peer sent in beacon/probersp.
673 tANI_U8 channelId;
674 //channelId on which we are parked at.
675 //used only in scan case.
676 tANI_U8 channelIdSelf;
677 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700678 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
679#if defined WLAN_FEATURE_VOWIFI
680 tANI_U32 parentTSF;
681 tANI_U32 startTSF[2];
682#endif
683#ifdef WLAN_FEATURE_VOWIFI_11R
684 tANI_U8 mdiePresent;
685 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
686#endif
687#ifdef FEATURE_WLAN_CCX
688 tANI_U16 QBSSLoad_present;
689 tANI_U16 QBSSLoad_avail;
690#endif
691 // Please keep the structure 4 bytes aligned above the ieFields
692
693 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700694 tANI_U8 reservedPadding1;
695 tANI_U8 reservedPadding2;
696 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700697 tANI_U32 WscIeLen;
698 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700699 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800700
Jeff Johnson295189b2012-06-20 16:38:30 -0700701 tANI_U32 ieFields[1];
702} tSirBssDescription, *tpSirBssDescription;
703
704/// Definition for response message to previously
705/// issued start BSS request
706/// MAC --->
707typedef struct sSirSmeStartBssRsp
708{
709 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
710 tANI_U16 length;
711 tANI_U8 sessionId;
712 tANI_U16 transactionId;//transaction ID for cmd
713 tSirResultCodes statusCode;
714 tSirBssType bssType;//Add new type for WDS mode
715 tANI_U16 beaconInterval;//Beacon Interval for both type
716 tANI_U32 staId;//Staion ID for Self
717 tSirBssDescription bssDescription;//Peer BSS description
718} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
719
Jeff Johnson295189b2012-06-20 16:38:30 -0700720
721typedef struct sSirChannelList
722{
723 tANI_U8 numChannels;
724 tANI_U8 channelNumber[1];
725} tSirChannelList, *tpSirChannelList;
726
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530727typedef struct sSirDFSChannelList
728{
729 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
730
731} tSirDFSChannelList, *tpSirDFSChannelList;
732
Jeff Johnson295189b2012-06-20 16:38:30 -0700733#ifdef FEATURE_WLAN_CCX
734typedef struct sTspecInfo {
735 tANI_U8 valid;
736 tSirMacTspecIE tspec;
737} tTspecInfo;
738
739#define SIR_CCX_MAX_TSPEC_IES 4
740typedef struct sCCXTspecTspecInfo {
741 tANI_U8 numTspecs;
742 tTspecInfo tspec[SIR_CCX_MAX_TSPEC_IES];
743} tCCXTspecInfo;
744#endif
745
Jeff Johnson295189b2012-06-20 16:38:30 -0700746
747/// Definition for Radar Info
748typedef struct sSirRadarInfo
749{
750 tANI_U8 channelNumber;
751 tANI_U16 radarPulseWidth; // in usecond
752 tANI_U16 numRadarPulse;
753} tSirRadarInfo, *tpSirRadarInfo;
754
755#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
756
757/// Two Background Scan mode
758typedef enum eSirBackgroundScanMode
759{
760 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700761 eSIR_NORMAL_BACKGROUND_SCAN = 1,
762 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700763} tSirBackgroundScanMode;
764
765/// Two types of traffic check
766typedef enum eSirLinkTrafficCheck
767{
768 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700769 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
770 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700771} tSirLinkTrafficCheck;
772
773#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
774#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
775#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
776#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700777#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
778#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700779
780/// Definition for scan request
781typedef struct sSirSmeScanReq
782{
783 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
784 tANI_U16 length;
785 tANI_U8 sessionId; // Session ID
786 tANI_U16 transactionId; // Transaction ID for cmd
787 tSirMacAddr bssId;
788 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
789 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
790 tSirBssType bssType;
791 tANI_U8 dot11mode;
792 tSirScanType scanType;
793 /**
794 * minChannelTime. Not used if scanType is passive.
795 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
796 * 11k measurements set this to zero to user only single duration for scan.
797 * <valid timeout> - Timeout value used for min channel timeout.
798 */
799 tANI_U32 minChannelTime;
800 /**
801 * maxChannelTime.
802 * 0x0 - Invalid. In case of active scan.
803 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
804 *
805 */
806 tANI_U32 maxChannelTime;
807 /**
808 * returnAfterFirstMatch can take following values:
809 * 0x00 - Return SCAN_RSP message after complete channel scan
810 * 0x01 - Return SCAN_RSP message after collecting BSS description
811 * that matches scan criteria.
812 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
813 * 5 GHz band channels
814 * 0x80 - Return after collecting first 11d IE from 5 GHz band
815 * channels
816 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
817 * band channels
818 *
819 * Values of 0xC0, 0x80 & 0x40 are to be used by
820 * Roaming/application when 11d is enabled.
821 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800822 tANI_U32 minChannelTimeBtc; //in units of milliseconds
823 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700824 tANI_U8 returnAfterFirstMatch;
825
826 /**
827 * returnUniqueResults can take following values:
828 * 0 - Collect & report all received BSS descriptions from same BSS.
829 * 1 - Collect & report unique BSS description from same BSS.
830 */
831 tANI_U8 returnUniqueResults;
832
833 /**
834 * returnFreshResults can take following values:
835 * 0x00 - Return background scan results.
836 * 0x80 - Return & purge background scan results
837 * 0x01 - Trigger fresh scan instead of returning background scan
838 * results.
839 * 0x81 - Trigger fresh scan instead of returning background scan
840 * results and purge background scan results.
841 */
842 tANI_U8 returnFreshResults;
843
844 /* backgroundScanMode can take following values:
845 * 0x0 - agressive scan
846 * 0x1 - normal scan where HAL will check for link traffic
847 * prior to proceeding with the scan
848 */
849 tSirBackgroundScanMode backgroundScanMode;
850
851 tANI_U8 hiddenSsid;
852
853 /* Number of SSIDs to scan */
854 tANI_U8 numSsid;
855
856 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
857 /* This MUST be the last field of the structure */
858
859
Jeff Johnson295189b2012-06-20 16:38:30 -0700860 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700861 tANI_U16 uIEFieldLen;
862 tANI_U16 uIEFieldOffset;
863
864 //channelList MUST be the last field of this structure
865 tSirChannelList channelList;
866 /*-----------------------------
867 tSirSmeScanReq....
868 -----------------------------
869 uIEFiledLen
870 -----------------------------
871 uIEFiledOffset ----+
872 ----------------------------- |
873 channelList.numChannels |
874 ----------------------------- |
875 ... variable size up to |
876 channelNumber[numChannels-1] |
877 This can be zero, if |
878 numChannel is zero. |
879 ----------------------------- <--+
880 ... variable size uIEFiled
881 up to uIEFieldLen (can be 0)
882 -----------------------------*/
883} tSirSmeScanReq, *tpSirSmeScanReq;
884
Jeff Johnsone7245742012-09-05 17:12:55 -0700885#ifdef FEATURE_OEM_DATA_SUPPORT
886
887#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800888#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700889#endif
890#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800891#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700892#endif
893
894typedef struct sSirOemDataReq
895{
896 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
897 tSirMacAddr selfMacAddr;
898 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
899} tSirOemDataReq, *tpSirOemDataReq;
900
901typedef struct sSirOemDataRsp
902{
903 tANI_U16 messageType;
904 tANI_U16 length;
905 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
906} tSirOemDataRsp, *tpSirOemDataRsp;
907
908#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700909
910/// Definition for response message to previously issued scan request
911typedef struct sSirSmeScanRsp
912{
913 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
914 tANI_U16 length;
915 tANI_U8 sessionId;
916 tSirResultCodes statusCode;
917 tANI_U16 transcationId;
918 tSirBssDescription bssDescription[1];
919} tSirSmeScanRsp, *tpSirSmeScanRsp;
920
921/// Sme Req message to set the Background Scan mode
922typedef struct sSirSmeBackgroundScanModeReq
923{
924 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
925 tANI_U16 length;
926 tSirBackgroundScanMode mode;
927} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
928
929/// Background Scan Statisics
930typedef struct sSirBackgroundScanInfo {
931 tANI_U32 numOfScanSuccess;
932 tANI_U32 numOfScanFailure;
933 tANI_U32 reserved;
934} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
935
936#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
937
938/// Definition for Authentication request
939typedef struct sSirSmeAuthReq
940{
941 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
942 tANI_U16 length;
943 tANI_U8 sessionId; // Session ID
944 tANI_U16 transactionId; // Transaction ID for cmd
945 tSirMacAddr bssId; // Self BSSID
946 tSirMacAddr peerMacAddr;
947 tAniAuthType authType;
948 tANI_U8 channelNumber;
949} tSirSmeAuthReq, *tpSirSmeAuthReq;
950
951/// Definition for reponse message to previously issued Auth request
952typedef struct sSirSmeAuthRsp
953{
954 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
955 tANI_U16 length;
956 tANI_U8 sessionId; // Session ID
957 tANI_U16 transactionId; // Transaction ID for cmd
958 tSirMacAddr peerMacAddr;
959 tAniAuthType authType;
960 tSirResultCodes statusCode;
961 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
962 //Otherwise it holds status code.
963} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
964
Jeff Johnson295189b2012-06-20 16:38:30 -0700965
Jeff Johnson295189b2012-06-20 16:38:30 -0700966
Jeff Johnson295189b2012-06-20 16:38:30 -0700967/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
968typedef struct sJoinReassocInfo
969{
970 tAniTitanCBNeighborInfo cbNeighbors;
971 tAniBool spectrumMgtIndicator;
972 tSirMacPowerCapInfo powerCap;
973 tSirSupChnl supportedChannels;
974} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700975
976/// Definition for join request
977/// ---> MAC
978/// WARNING! If you add a field in JOIN REQ.
979/// Make sure to add it in REASSOC REQ
980/// The Serdes function is the same and its
981/// shared with REASSOC. So if we add a field
982// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
983typedef struct sSirSmeJoinReq
984{
985 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
986 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -0700987 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700988 tANI_U16 transactionId;
989 tSirMacSSid ssId;
990 tSirMacAddr selfMacAddr; // self Mac address
991 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
992 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -0700993 tVOS_CON_MODE staPersona; //Persona
994 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -0700995
996 /*This contains the UAPSD Flag for all 4 AC
997 * B0: AC_VO UAPSD FLAG
998 * B1: AC_VI UAPSD FLAG
999 * B2: AC_BK UAPSD FLAG
1000 * B3: AC_BE UASPD FLAG
1001 */
1002 tANI_U8 uapsdPerAcBitmask;
1003
Jeff Johnson295189b2012-06-20 16:38:30 -07001004 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1005 tSirMacRateSet extendedRateSet; // Has 11g rates
1006 tSirRSNie rsnIE; // RSN IE to be sent in
1007 // (Re) Association Request
1008#ifdef FEATURE_WLAN_CCX
1009 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1010 // the same. The join will never carry cckm, but will be set to
1011 // 0.
1012#endif
1013
1014 tSirAddie addIEScan; // Additional IE to be sent in
1015 // (unicast) Probe Request at the time of join
1016
1017 tSirAddie addIEAssoc; // Additional IE to be sent in
1018 // (Re) Association Request
1019
1020 tAniEdType UCEncryptionType;
1021
1022 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001023
1024#ifdef WLAN_FEATURE_11W
1025 tAniEdType MgmtEncryptionType;
1026#endif
1027
Jeff Johnson295189b2012-06-20 16:38:30 -07001028#ifdef WLAN_FEATURE_VOWIFI_11R
1029 tAniBool is11Rconnection;
1030#endif
1031#ifdef FEATURE_WLAN_CCX
1032 tAniBool isCCXconnection;
1033 tCCXTspecInfo ccxTspecInfo;
1034#endif
1035
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001036#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001037 tAniBool isFastTransitionEnabled;
1038#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001039#ifdef FEATURE_WLAN_LFR
1040 tAniBool isFastRoamIniFeatureEnabled;
1041#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001042
1043 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001044#ifdef WLAN_FEATURE_11AC
1045 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001046 tANI_U8 txBFCsnValue;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001047#endif
1048
Jeff Johnson295189b2012-06-20 16:38:30 -07001049 tAniTitanCBNeighborInfo cbNeighbors;
1050 tAniBool spectrumMgtIndicator;
1051 tSirMacPowerCapInfo powerCap;
1052 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001053 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001054
1055} tSirSmeJoinReq, *tpSirSmeJoinReq;
1056
1057/// Definition for reponse message to previously issued join request
1058/// MAC --->
1059typedef struct sSirSmeJoinRsp
1060{
1061 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1062 tANI_U16 length;
1063 tANI_U8 sessionId; // Session ID
1064 tANI_U16 transactionId; // Transaction ID for cmd
1065 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001066 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001067 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1068 //Otherwise it holds status code.
1069 tANI_U16 aid;
1070 tANI_U32 beaconLength;
1071 tANI_U32 assocReqLength;
1072 tANI_U32 assocRspLength;
1073#ifdef WLAN_FEATURE_VOWIFI_11R
1074 tANI_U32 parsedRicRspLen;
1075#endif
1076#ifdef FEATURE_WLAN_CCX
1077 tANI_U32 tspecIeLen;
1078#endif
1079 tANI_U32 staId;//Station ID for peer
1080
1081 /*The DPU signatures will be sent eventually to TL to help it determine the
1082 association to which a packet belongs to*/
1083 /*Unicast DPU signature*/
1084 tANI_U8 ucastSig;
1085
1086 /*Broadcast DPU signature*/
1087 tANI_U8 bcastSig;
1088
1089 tANI_U8 frames[ 1 ];
1090} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1091
1092/// Definition for Authentication indication from peer
1093typedef struct sSirSmeAuthInd
1094{
1095 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1096 tANI_U16 length;
1097 tANI_U8 sessionId;
1098 tSirMacAddr bssId; // Self BSSID
1099 tSirMacAddr peerMacAddr;
1100 tAniAuthType authType;
1101} tSirSmeAuthInd, *tpSirSmeAuthInd;
1102
1103/// probereq from peer, when wsc is enabled
1104typedef struct sSirSmeProbereq
1105{
1106 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1107 tANI_U16 length;
1108 tANI_U8 sessionId;
1109 tSirMacAddr peerMacAddr;
1110 tANI_U16 devicePasswdId;
1111} tSirSmeProbeReq, *tpSirSmeProbeReq;
1112
1113/// Definition for Association indication from peer
1114/// MAC --->
1115typedef struct sSirSmeAssocInd
1116{
1117 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1118 tANI_U16 length;
1119 tANI_U8 sessionId;
1120 tSirMacAddr peerMacAddr;
1121 tANI_U16 aid;
1122 tSirMacAddr bssId; // Self BSSID
1123 tANI_U16 staId; // Station ID for peer
1124 tANI_U8 uniSig; // DPU signature for unicast packets
1125 tANI_U8 bcastSig; // DPU signature for broadcast packets
1126 tAniAuthType authType;
1127 tAniSSID ssId; // SSID used by STA to associate
1128 tSirRSNie rsnIE;// RSN IE received from peer
1129 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1130
Jeff Johnson295189b2012-06-20 16:38:30 -07001131 // powerCap & supportedChannels are present only when
1132 // spectrumMgtIndicator flag is set
1133 tAniBool spectrumMgtIndicator;
1134 tSirMacPowerCapInfo powerCap;
1135 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001136 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1137 tAniBool reassocReq;
1138 // Required for indicating the frames to upper layer
1139 tANI_U32 beaconLength;
1140 tANI_U8* beaconPtr;
1141 tANI_U32 assocReqLength;
1142 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001143} tSirSmeAssocInd, *tpSirSmeAssocInd;
1144
1145
1146/// Definition for Association confirm
1147/// ---> MAC
1148typedef struct sSirSmeAssocCnf
1149{
1150 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1151 tANI_U16 length;
1152 tSirResultCodes statusCode;
1153 tSirMacAddr bssId; // Self BSSID
1154 tSirMacAddr peerMacAddr;
1155 tANI_U16 aid;
1156 tSirMacAddr alternateBssId;
1157 tANI_U8 alternateChannelId;
1158} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1159
Jeff Johnson295189b2012-06-20 16:38:30 -07001160/// Definition for Reassociation indication from peer
1161typedef struct sSirSmeReassocInd
1162{
1163 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1164 tANI_U16 length;
1165 tANI_U8 sessionId; // Session ID
1166 tSirMacAddr peerMacAddr;
1167 tSirMacAddr oldMacAddr;
1168 tANI_U16 aid;
1169 tSirMacAddr bssId; // Self BSSID
1170 tANI_U16 staId; // Station ID for peer
1171 tAniAuthType authType;
1172 tAniSSID ssId; // SSID used by STA to reassociate
1173 tSirRSNie rsnIE; // RSN IE received from peer
1174
1175 tSirAddie addIE; // Additional IE received from peer
1176
Jeff Johnson295189b2012-06-20 16:38:30 -07001177 // powerCap & supportedChannels are present only when
1178 // spectrumMgtIndicator flag is set
1179 tAniBool spectrumMgtIndicator;
1180 tSirMacPowerCapInfo powerCap;
1181 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001182 // Required for indicating the frames to upper layer
1183 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1184 tANI_U32 beaconLength;
1185 tANI_U8* beaconPtr;
1186 tANI_U32 assocReqLength;
1187 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001188} tSirSmeReassocInd, *tpSirSmeReassocInd;
1189
1190/// Definition for Reassociation confirm
1191/// ---> MAC
1192typedef struct sSirSmeReassocCnf
1193{
1194 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1195 tANI_U16 length;
1196 tSirResultCodes statusCode;
1197 tSirMacAddr bssId; // Self BSSID
1198 tSirMacAddr peerMacAddr;
1199 tANI_U16 aid;
1200 tSirMacAddr alternateBssId;
1201 tANI_U8 alternateChannelId;
1202} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1203
Jeff Johnson295189b2012-06-20 16:38:30 -07001204
1205/// Enum definition for Wireless medium status change codes
1206typedef enum eSirSmeStatusChangeCode
1207{
1208 eSIR_SME_DEAUTH_FROM_PEER,
1209 eSIR_SME_DISASSOC_FROM_PEER,
1210 eSIR_SME_LOST_LINK_WITH_PEER,
1211 eSIR_SME_CHANNEL_SWITCH,
1212 eSIR_SME_JOINED_NEW_BSS,
1213 eSIR_SME_LEAVING_BSS,
1214 eSIR_SME_IBSS_ACTIVE,
1215 eSIR_SME_IBSS_INACTIVE,
1216 eSIR_SME_IBSS_PEER_DEPARTED,
1217 eSIR_SME_RADAR_DETECTED,
1218 eSIR_SME_IBSS_NEW_PEER,
1219 eSIR_SME_AP_CAPS_CHANGED,
1220 eSIR_SME_BACKGROUND_SCAN_FAIL,
1221 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1222 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1223} tSirSmeStatusChangeCode;
1224
1225typedef struct sSirSmeNewBssInfo
1226{
1227 tSirMacAddr bssId;
1228 tANI_U8 channelNumber;
1229 tANI_U8 reserved;
1230 tSirMacSSid ssId;
1231} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1232
1233typedef struct sSirSmeApNewCaps
1234{
1235 tANI_U16 capabilityInfo;
1236 tSirMacAddr bssId;
1237 tANI_U8 channelId;
1238 tANI_U8 reserved[3];
1239 tSirMacSSid ssId;
1240} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1241
1242/**
1243 * Table below indicates what information is passed for each of
1244 * the Wireless Media status change notifications:
1245 *
1246 * Status Change code Status change info
1247 * ----------------------------------------------------------------------
1248 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1249 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1250 * eSIR_SME_LOST_LINK_WITH_PEER None
1251 * eSIR_SME_CHANNEL_SWITCH New channel number
1252 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1253 * eSIR_SME_LEAVING_BSS None
1254 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1255 * IBSS apart from this STA that
1256 * started IBSS
1257 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1258 * in IBSS
1259 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1260 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1261 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1262 * that STA is currently associated with
1263 * have changed.
1264 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1265 */
1266
1267/// Definition for Wireless medium status change notification
1268typedef struct sSirSmeWmStatusChangeNtf
1269{
1270 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1271 tANI_U16 length;
1272 tANI_U8 sessionId; // Session ID
1273 tSirSmeStatusChangeCode statusChangeCode;
1274 tSirMacAddr bssId; // Self BSSID
1275 union
1276 {
1277 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1278 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1279 // none for eSIR_SME_LOST_LINK_WITH_PEER
1280 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1281 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1282 // none for eSIR_SME_LEAVING_BSS
1283 // none for eSIR_SME_IBSS_ACTIVE
1284 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001285 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1286 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1287 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1288 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001289 } statusChangeInfo;
1290} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1291
1292/// Definition for Disassociation request
1293typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001294__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001295struct sSirSmeDisassocReq
1296{
1297 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1298 tANI_U16 length;
1299 tANI_U8 sessionId; // Session ID
1300 tANI_U16 transactionId; // Transaction ID for cmd
1301 tSirMacAddr bssId; // Peer BSSID
1302 tSirMacAddr peerMacAddr;
1303 tANI_U16 reasonCode;
1304 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1305 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001306}
Jeff Johnson295189b2012-06-20 16:38:30 -07001307__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001308tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1309
1310/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001311typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1312{
1313 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1314 tANI_U16 length;
1315 tANI_U8 sessionId; // Session ID
1316 tANI_U16 transactionId; // Transaction ID for cmd
1317 tSirMacAddr bssId; // Peer BSSID
1318 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1319} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001320
1321typedef struct sAni64BitCounters
1322{
1323 tANI_U32 Hi;
1324 tANI_U32 Lo;
1325}tAni64BitCounters, *tpAni64BitCounters;
1326
1327typedef struct sAniSecurityStat
1328{
1329 tAni64BitCounters txBlks;
1330 tAni64BitCounters rxBlks;
1331 tAni64BitCounters formatErrorCnt;
1332 tAni64BitCounters decryptErr;
1333 tAni64BitCounters protExclCnt;
1334 tAni64BitCounters unDecryptableCnt;
1335 tAni64BitCounters decryptOkCnt;
1336
1337}tAniSecurityStat, *tpAniSecurityStat;
1338
1339typedef struct sAniTxRxCounters
1340{
1341 tANI_U32 txFrames; // Incremented for every packet tx
1342 tANI_U32 rxFrames;
1343 tANI_U32 nRcvBytes;
1344 tANI_U32 nXmitBytes;
1345}tAniTxRxCounters, *tpAniTxRxCounters;
1346
1347typedef struct sAniTxRxStats
1348{
1349 tAni64BitCounters txFrames;
1350 tAni64BitCounters rxFrames;
1351 tAni64BitCounters nRcvBytes;
1352 tAni64BitCounters nXmitBytes;
1353
1354}tAniTxRxStats,*tpAniTxRxStats;
1355
1356typedef struct sAniSecStats
1357{
1358 tAniSecurityStat aes;
1359 tAni64BitCounters aesReplays;
1360 tAniSecurityStat tkip;
1361 tAni64BitCounters tkipReplays;
1362 tAni64BitCounters tkipMicError;
1363
1364 tAniSecurityStat wep;
1365#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1366 tAniSecurityStat wpi;
1367 tAni64BitCounters wpiReplays;
1368 tAni64BitCounters wpiMicError;
1369#endif
1370}tAniSecStats, *tpAniSecStats;
1371
1372#define SIR_MAX_RX_CHAINS 3
1373
1374typedef struct sAniStaStatStruct
1375{
1376 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1377 * These are kept as it is, since WSM is using this structure.
1378 * These elements can be removed whenever WSM is updated.
1379 * Phystats is used to hold phystats from BD.
1380 */
1381 tANI_U32 sentAesBlksUcastHi;
1382 tANI_U32 sentAesBlksUcastLo;
1383 tANI_U32 recvAesBlksUcastHi;
1384 tANI_U32 recvAesBlksUcastLo;
1385 tANI_U32 aesFormatErrorUcastCnts;
1386 tANI_U32 aesReplaysUcast;
1387 tANI_U32 aesDecryptErrUcast;
1388 tANI_U32 singleRetryPkts;
1389 tANI_U32 failedTxPkts;
1390 tANI_U32 ackTimeouts;
1391 tANI_U32 multiRetryPkts;
1392 tANI_U32 fragTxCntsHi;
1393 tANI_U32 fragTxCntsLo;
1394 tANI_U32 transmittedPktsHi;
1395 tANI_U32 transmittedPktsLo;
1396 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1397 tANI_U32 phyStatLo; //This is only for private use.
1398
1399 tANI_U32 uplinkRssi;
1400 tANI_U32 uplinkSinr;
1401 tANI_U32 uplinkRate;
1402 tANI_U32 downlinkRssi;
1403 tANI_U32 downlinkSinr;
1404 tANI_U32 downlinkRate;
1405 tANI_U32 nRcvBytes;
1406 tANI_U32 nXmitBytes;
1407
1408 // titan 3c stats
1409 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1410 tANI_U32 chunksTxCntLo;
1411 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1412 tANI_U32 compPktRxCntLo;
1413 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1414 tANI_U32 expanPktRxCntLo;
1415
1416
1417 /* Following elements are valid and filled in correctly. They have valid values.
1418 */
1419
1420 //Unicast frames and bytes.
1421 tAniTxRxStats ucStats;
1422
1423 //Broadcast frames and bytes.
1424 tAniTxRxStats bcStats;
1425
1426 //Multicast frames and bytes.
1427 tAniTxRxStats mcStats;
1428
1429 tANI_U32 currentTxRate;
1430 tANI_U32 currentRxRate; //Rate in 100Kbps
1431
1432 tANI_U32 maxTxRate;
1433 tANI_U32 maxRxRate;
1434
1435 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1436
1437
1438 tAniSecStats securityStats;
1439
1440 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1441 tANI_U8 currentTxRateIdx;
1442
1443} tAniStaStatStruct, *tpAniStaStatStruct;
1444
1445//Statistics that are not maintained per stations.
1446typedef struct sAniGlobalStatStruct
1447{
1448 tAni64BitCounters txError;
1449 tAni64BitCounters rxError;
1450 tAni64BitCounters rxDropNoBuffer;
1451 tAni64BitCounters rxDropDup;
1452 tAni64BitCounters rxCRCError;
1453
1454 tAni64BitCounters singleRetryPkts;
1455 tAni64BitCounters failedTxPkts;
1456 tAni64BitCounters ackTimeouts;
1457 tAni64BitCounters multiRetryPkts;
1458 tAni64BitCounters fragTxCnts;
1459 tAni64BitCounters fragRxCnts;
1460
1461 tAni64BitCounters txRTSSuccess;
1462 tAni64BitCounters txCTSSuccess;
1463 tAni64BitCounters rxRTSSuccess;
1464 tAni64BitCounters rxCTSSuccess;
1465
1466 tAniSecStats securityStats;
1467
1468 tAniTxRxStats mcStats;
1469 tAniTxRxStats bcStats;
1470
1471}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1472
1473typedef enum sPacketType
1474{
1475 ePACKET_TYPE_UNKNOWN,
1476 ePACKET_TYPE_11A,
1477 ePACKET_TYPE_11G,
1478 ePACKET_TYPE_11B,
1479 ePACKET_TYPE_11N
1480
1481}tPacketType, *tpPacketType;
1482
1483typedef struct sAniStatSummaryStruct
1484{
1485 tAniTxRxStats uc; //Unicast counters.
1486 tAniTxRxStats bc; //Broadcast counters.
1487 tAniTxRxStats mc; //Multicast counters.
1488 tAni64BitCounters txError;
1489 tAni64BitCounters rxError;
1490 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1491 tANI_U32 rxRate; // Rx rate of the last received packet.
1492 tANI_U32 txRate;
1493 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1494 tANI_U16 txMCSId;
1495 tPacketType rxPacketType;
1496 tPacketType txPacketType;
1497 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1498}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1499
Jeff Johnson295189b2012-06-20 16:38:30 -07001500//structure for stats that may be reset, like the ones in sta descriptor
1501//The stats are saved into here before reset. It should be tANI_U32 aligned.
1502typedef struct _sPermStaStats
1503{
1504 //tANI_U32 sentAesBlksUcastHi;
1505 //tANI_U32 sentAesBlksUcastLo;
1506 //tANI_U32 recvAesBlksUcastHi;
1507 //tANI_U32 recvAesBlksUcastLo;
1508 tANI_U32 aesFormatErrorUcastCnts;
1509 tANI_U32 aesReplaysUcast;
1510 tANI_U32 aesDecryptErrUcast;
1511 tANI_U32 singleRetryPkts;
1512 tANI_U32 failedTxPkts;
1513 tANI_U32 ackTimeouts;
1514 tANI_U32 multiRetryPkts;
1515 tANI_U32 fragTxCntsHi;
1516 tANI_U32 fragTxCntsLo;
1517 tANI_U32 transmittedPktsHi;
1518 tANI_U32 transmittedPktsLo;
1519
1520 // titan 3c stats
1521 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1522 tANI_U32 chunksTxCntLo;
1523 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1524 tANI_U32 compPktRxCntLo;
1525 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1526 tANI_U32 expanPktRxCntLo;
1527}tPermanentStaStats;
1528
Jeff Johnson295189b2012-06-20 16:38:30 -07001529
1530
1531
1532/// Definition for Disassociation response
1533typedef struct sSirSmeDisassocRsp
1534{
1535 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1536 tANI_U16 length;
1537 tANI_U8 sessionId; // Session ID
1538 tANI_U16 transactionId; // Transaction ID for cmd
1539 tSirResultCodes statusCode;
1540 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001541 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001542 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001543}
Jeff Johnson295189b2012-06-20 16:38:30 -07001544__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001545 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1546
1547/// Definition for Disassociation indication from peer
1548typedef struct sSirSmeDisassocInd
1549{
1550 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1551 tANI_U16 length;
1552 tANI_U8 sessionId; // Session Identifier
1553 tANI_U16 transactionId; // Transaction Identifier with PE
1554 tSirResultCodes statusCode;
1555 tSirMacAddr bssId;
1556 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001557 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001558 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001559 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001560} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1561
1562/// Definition for Disassociation confirm
1563/// MAC --->
1564typedef struct sSirSmeDisassocCnf
1565{
1566 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1567 tANI_U16 length;
1568 tSirResultCodes statusCode;
1569 tSirMacAddr bssId;
1570 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001571} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1572
1573/// Definition for Deauthetication request
1574typedef struct sSirSmeDeauthReq
1575{
1576 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1577 tANI_U16 length;
1578 tANI_U8 sessionId; // Session ID
1579 tANI_U16 transactionId; // Transaction ID for cmd
1580 tSirMacAddr bssId; // AP BSSID
1581 tSirMacAddr peerMacAddr;
1582 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001583} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1584
1585/// Definition for Deauthetication response
1586typedef struct sSirSmeDeauthRsp
1587{
1588 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1589 tANI_U16 length;
1590 tANI_U8 sessionId; // Session ID
1591 tANI_U16 transactionId; // Transaction ID for cmd
1592 tSirResultCodes statusCode;
1593 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001594} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1595
1596/// Definition for Deauthetication indication from peer
1597typedef struct sSirSmeDeauthInd
1598{
1599 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1600 tANI_U16 length;
1601 tANI_U8 sessionId; //Added for BT-AMP
1602 tANI_U16 transactionId; //Added for BT-AMP
1603 tSirResultCodes statusCode;
1604 tSirMacAddr bssId;// AP BSSID
1605 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001606
Jeff Johnson295189b2012-06-20 16:38:30 -07001607 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001608 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001609} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1610
1611/// Definition for Deauthentication confirm
1612/// MAC --->
1613typedef struct sSirSmeDeauthCnf
1614{
1615 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1616 tANI_U16 length;
1617 tSirResultCodes statusCode;
1618 tSirMacAddr bssId; // AP BSSID
1619 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001620} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1621
1622/// Definition for stop BSS request message
1623typedef struct sSirSmeStopBssReq
1624{
1625 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1626 tANI_U16 length;
1627 tANI_U8 sessionId; //Session ID
1628 tANI_U16 transactionId; //tranSaction ID for cmd
1629 tSirResultCodes reasonCode;
1630 tSirMacAddr bssId; //Self BSSID
1631} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1632
1633/// Definition for stop BSS response message
1634typedef struct sSirSmeStopBssRsp
1635{
1636 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1637 tANI_U16 length;
1638 tSirResultCodes statusCode;
1639 tANI_U8 sessionId; // Session ID
1640 tANI_U16 transactionId; // Transaction ID for cmd
1641} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1642
Jeff Johnson295189b2012-06-20 16:38:30 -07001643
1644
1645/// Definition for Channel Switch indication for station
1646/// MAC --->
1647typedef struct sSirSmeSwitchChannelInd
1648{
1649 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1650 tANI_U16 length;
1651 tANI_U8 sessionId;
1652 tANI_U16 newChannelId;
1653 tSirMacAddr bssId; // BSSID
1654} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1655
1656/// Definition for ULA complete indication message
1657typedef struct sirUlaCompleteInd
1658{
1659 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1660 tANI_U16 length;
1661 tSirResultCodes statusCode;
1662 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001663} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1664
1665/// Definition for ULA complete confirmation message
1666typedef struct sirUlaCompleteCnf
1667{
1668 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1669 tANI_U16 length;
1670 tSirResultCodes statusCode;
1671 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001672} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1673
1674/// Definition for Neighbor BSS indication
1675/// MAC --->
1676/// MAC reports this each time a new I/BSS is detected
1677typedef struct sSirSmeNeighborBssInd
1678{
1679 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1680 tANI_U16 length;
1681 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001682 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001683} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1684
1685/// Definition for MIC failure indication
1686/// MAC --->
1687/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1688typedef struct sSirSmeMicFailureInd
1689{
1690 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1691 tANI_U16 length;
1692 tANI_U8 sessionId;
1693 tSirMacAddr bssId; // BSSID
1694 tSirMicFailureInfo info;
1695} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1696
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001697typedef struct sSirSmeMissedBeaconInd
1698{
1699 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1700 tANI_U16 length;
1701 tANI_U8 bssIdx;
1702} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001703
1704/// Definition for Set Context request
1705/// ---> MAC
1706typedef struct sSirSmeSetContextReq
1707{
1708 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1709 tANI_U16 length;
1710 tANI_U8 sessionId; //Session ID
1711 tANI_U16 transactionId; //Transaction ID for cmd
1712 tSirMacAddr peerMacAddr;
1713 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001714 // TBD Following QOS fields to be uncommented
1715 //tAniBool qosInfoPresent;
1716 //tSirQos qos;
1717 tSirKeyMaterial keyMaterial;
1718} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1719
1720/// Definition for Set Context response
1721/// MAC --->
1722typedef struct sSirSmeSetContextRsp
1723{
1724 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1725 tANI_U16 length;
1726 tANI_U8 sessionId; // Session ID
1727 tANI_U16 transactionId; // Transaction ID for cmd
1728 tSirResultCodes statusCode;
1729 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001730} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1731
1732/// Definition for Remove Key Context request
1733/// ---> MAC
1734typedef struct sSirSmeRemoveKeyReq
1735{
1736 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1737 tANI_U16 length;
1738 tANI_U8 sessionId; // Session ID
1739 tANI_U16 transactionId; // Transaction ID for cmd
1740 tSirMacAddr bssId; // BSSID
1741 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001742 tANI_U8 edType;
1743 tANI_U8 wepType;
1744 tANI_U8 keyId;
1745 tANI_BOOLEAN unicast;
1746} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1747
1748/// Definition for Remove Key Context response
1749/// MAC --->
1750typedef struct sSirSmeRemoveKeyRsp
1751{
1752 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1753 tANI_U16 length;
1754 tANI_U8 sessionId; // Session ID
1755 tANI_U16 transactionId; // Transaction ID for cmd
1756 tSirResultCodes statusCode;
1757 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001758} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1759
1760/// Definition for Set Power request
1761/// ---> MAC
1762typedef struct sSirSmeSetPowerReq
1763{
1764 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1765 tANI_U16 length;
1766 tANI_U16 transactionId; // Transaction ID for cmd
1767 tANI_S8 powerLevel;
1768} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1769
1770/// Definition for Set Power response
1771/// MAC --->
1772typedef struct sSirSmeSetPowerRsp
1773{
1774 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1775 tANI_U16 length;
1776 tSirResultCodes statusCode;
1777 tANI_U16 transactionId; // Transaction ID for cmd
1778} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1779
Jeff Johnson295189b2012-06-20 16:38:30 -07001780
1781/// Definition for Link Test Start response
1782/// MAC --->
1783typedef struct sSirSmeLinkTestStartRsp
1784{
1785 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1786 tANI_U16 length;
1787 tSirMacAddr peerMacAddr;
1788 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001789} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1790
1791/// Definition for Link Test Stop response
1792/// WSM ---> MAC
1793typedef struct sSirSmeLinkTestStopRsp
1794{
1795 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1796 tANI_U16 length;
1797 tSirMacAddr peerMacAddr;
1798 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001799} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1800
1801/// Definition for kick starting DFS measurements
1802typedef struct sSirSmeDFSreq
1803{
1804 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1805 tANI_U16 length;
1806 tANI_U16 transactionId; // Transaction ID for cmd
1807} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1808
1809/// Definition for response message to previously
1810/// issued DFS request
1811typedef struct sSirSmeDFSrsp
1812{
1813 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1814 tANI_U16 length;
1815 tSirResultCodes statusCode;
1816 tANI_U16 transactionId; // Transaction ID for cmd
1817 tANI_U32 dfsReport[1];
1818} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1819
1820/// Statistic definitions
1821//=============================================================
1822// Per STA statistic structure; This same struct will be used for Aggregate
1823// STA stats as well.
1824
1825// Clear radio stats and clear per sta stats
1826typedef enum
1827{
1828 eANI_CLEAR_ALL_STATS, // Clears all stats
1829 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1830 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1831 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1832 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1833 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1834
1835 // Used to distinguish between per sta to security stats.
1836 // Used only by AP, FW just returns the same parameter as it received.
1837 eANI_LINK_STATS, // Get Per STA stats
1838 eANI_SECURITY_STATS, // Get Per STA security stats
1839
1840 eANI_CLEAR_STAT_TYPES_END
1841} tAniStatSubTypes;
1842
1843typedef struct sAniTxCtrs
1844{
1845 // add the rate counters here
1846 tANI_U32 tx1Mbps;
1847 tANI_U32 tx2Mbps;
1848 tANI_U32 tx5_5Mbps;
1849 tANI_U32 tx6Mbps;
1850 tANI_U32 tx9Mbps;
1851 tANI_U32 tx11Mbps;
1852 tANI_U32 tx12Mbps;
1853 tANI_U32 tx18Mbps;
1854 tANI_U32 tx24Mbps;
1855 tANI_U32 tx36Mbps;
1856 tANI_U32 tx48Mbps;
1857 tANI_U32 tx54Mbps;
1858 tANI_U32 tx72Mbps;
1859 tANI_U32 tx96Mbps;
1860 tANI_U32 tx108Mbps;
1861
1862 // tx path radio counts
1863 tANI_U32 txFragHi;
1864 tANI_U32 txFragLo;
1865 tANI_U32 txFrameHi;
1866 tANI_U32 txFrameLo;
1867 tANI_U32 txMulticastFrameHi;
1868 tANI_U32 txMulticastFrameLo;
1869 tANI_U32 txFailedHi;
1870 tANI_U32 txFailedLo;
1871 tANI_U32 multipleRetryHi;
1872 tANI_U32 multipleRetryLo;
1873 tANI_U32 singleRetryHi;
1874 tANI_U32 singleRetryLo;
1875 tANI_U32 ackFailureHi;
1876 tANI_U32 ackFailureLo;
1877 tANI_U32 xmitBeacons;
1878
1879 // titan 3c stats
1880 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1881 tANI_U32 txCbEscPktCntLo;
1882 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1883 tANI_U32 txChunksCntLo;
1884 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1885 tANI_U32 txCompPktCntLo;
1886 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1887 tANI_U32 tx50PerCompPktCntLo;
1888 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1889 tANI_U32 txExpanPktCntLo;
1890} tAniTxCtrs, *tpAniTxCtrs;
1891
1892typedef struct sAniRxCtrs
1893{
1894 // receive frame rate counters
1895 tANI_U32 rx1Mbps;
1896 tANI_U32 rx2Mbps;
1897 tANI_U32 rx5_5Mbps;
1898 tANI_U32 rx6Mbps;
1899 tANI_U32 rx9Mbps;
1900 tANI_U32 rx11Mbps;
1901 tANI_U32 rx12Mbps;
1902 tANI_U32 rx18Mbps;
1903 tANI_U32 rx24Mbps;
1904 tANI_U32 rx36Mbps;
1905 tANI_U32 rx48Mbps;
1906 tANI_U32 rx54Mbps;
1907 tANI_U32 rx72Mbps;
1908 tANI_U32 rx96Mbps;
1909 tANI_U32 rx108Mbps;
1910
1911 // receive size counters; 'Lte' = Less than or equal to
1912 tANI_U32 rxLte64;
1913 tANI_U32 rxLte128Gt64;
1914 tANI_U32 rxLte256Gt128;
1915 tANI_U32 rxLte512Gt256;
1916 tANI_U32 rxLte1kGt512;
1917 tANI_U32 rxLte1518Gt1k;
1918 tANI_U32 rxLte2kGt1518;
1919 tANI_U32 rxLte4kGt2k;
1920
1921 // rx radio stats
1922 tANI_U32 rxFrag;
1923 tANI_U32 rxFrame;
1924 tANI_U32 fcsError;
1925 tANI_U32 rxMulticast;
1926 tANI_U32 duplicate;
1927 tANI_U32 rtsSuccess;
1928 tANI_U32 rtsFailed;
1929 tANI_U32 wepUndecryptables;
1930 tANI_U32 drops;
1931 tANI_U32 aesFormatErrorUcastCnts;
1932 tANI_U32 aesReplaysUcast;
1933 tANI_U32 aesDecryptErrUcast;
1934
1935 // titan 3c stats
1936 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
1937 tANI_U32 rxDecompPktCntLo;
1938 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
1939 tANI_U32 rxCompPktCntLo;
1940 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
1941 tANI_U32 rxExpanPktCntLo;
1942} tAniRxCtrs, *tpAniRxCtrs;
1943
1944// Radio stats
1945typedef struct sAniRadioStats
1946{
1947 tAniTxCtrs tx;
1948 tAniRxCtrs rx;
1949} tAniRadioStats, *tpAniRadioStats;
1950
1951// Get Radio Stats request structure
1952// This structure shall be used for both Radio stats and Aggregate stats
1953// A valid request must contain entire structure with/without valid fields.
1954// Based on the request type, the valid fields will be checked.
1955typedef struct sAniGetStatsReq
1956{
1957 // Common for all types are requests
1958 tANI_U16 msgType; // message type is same as the request type
1959 tANI_U16 msgLen; // length of the entire request
1960 tANI_U8 sessionId; //Session ID
1961 tANI_U16 transactionId;
1962 tSirMacAddr bssId; //BSSID
1963 // only used for clear stats and per sta stats clear
1964 tAniStatSubTypes stat; // Clears the stats of the described types.
1965 tANI_U32 staId; // Per STA stats request must contain valid
1966 // values
1967 tANI_U8 macAddr[6];
1968} tAniGetStatsReq, *tpAniGetStatsReq;
1969
1970// Get Radio Stats response struct
1971typedef struct sAniGetRadioStatsRsp
1972{
1973 tANI_U16 type; // message type is same as the request type
1974 tANI_U16 msgLen; // length of the entire request
1975 tANI_U32 rc;
1976 tANI_U16 transactionId;
1977 tAniRadioStats radio;
1978} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
1979
1980// Per Sta stats response struct
1981typedef struct sAniGetPerStaStatsRsp
1982{
1983 tANI_U16 type; // message type is same as the request type
1984 tANI_U16 msgLen; // length of the entire request
1985 tANI_U32 rc;
1986 tANI_U16 transactionId;
1987 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
1988 tAniStaStatStruct sta;
1989 tANI_U32 staId;
1990 tANI_U8 macAddr[6];
1991} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
1992
1993// Get Aggregate stats
1994typedef struct sAniGetAggrStaStatsRsp
1995{
1996 tANI_U16 type; // message type is same as the request type
1997 tANI_U16 msgLen; // length of the entire request
1998 tANI_U32 rc;
1999 tANI_U16 transactionId;
2000 tAniStaStatStruct sta;
2001} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2002
2003// Clear stats request and response structure. 'rc' field is unused in
2004// request and this field is used in response field.
2005typedef struct sAniClearStatsRsp
2006{
2007 tANI_U16 type; // message type is same as the request type
2008 tANI_U16 msgLen; // length of the entire request
2009 tANI_U32 rc; // return code - will be filled by FW on
2010 // response.
2011 // Same transaction ID will be returned by the FW
2012 tANI_U16 transactionId;
2013 tAniStatSubTypes stat; // Clears the stats of the described types.
2014 tANI_U32 staId; // Applicable only to PER STA stats clearing
2015 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2016} tAniClearStatsRsp, *tpAniClearStatsRsp;
2017
2018typedef struct sAniGetGlobalStatsRsp
2019{
2020 tANI_U16 type; // message type is same as the request type
2021 tANI_U16 msgLen; // length of the entire request
2022 tANI_U32 rc;
2023 tANI_U16 transactionId;
2024 tAniGlobalStatStruct global;
2025} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2026
2027typedef struct sAniGetStatSummaryRsp
2028{
2029 tANI_U16 type; // message type is same as the request type
2030 tANI_U16 msgLen; // length of the entire request --Why?
2031 tANI_U32 rc;
2032 tANI_U16 transactionId;
2033 tAniStatSummaryStruct stat;
2034} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2035
2036//***************************************************************
2037
2038
2039/*******************PE Statistics*************************/
2040typedef enum
2041{
2042 PE_SUMMARY_STATS_INFO = 0x00000001,
2043 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2044 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2045 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2046 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
2047 PE_PER_STA_STATS_INFO = 0x00000020
2048}ePEStatsMask;
2049
2050/*
2051 * tpAniGetPEStatsReq is tied to
2052 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2053 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2054 */
2055typedef struct sAniGetPEStatsReq
2056{
2057 // Common for all types are requests
2058 tANI_U16 msgType; // message type is same as the request type
2059 tANI_U16 msgLen; // length of the entire request
2060 tANI_U32 staId; // Per STA stats request must contain valid
2061 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2062} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2063
2064/*
2065 * tpAniGetPEStatsRsp is tied to
2066 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2067 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2068 */
2069typedef struct sAniGetPEStatsRsp
2070{
2071 // Common for all types are responses
2072 tANI_U16 msgType; // message type is same as the request type
2073 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2074 tANI_U8 sessionId;
2075 tANI_U32 rc; //success/failure
2076 tANI_U32 staId; // Per STA stats request must contain valid
2077 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2078/**********************************************************************************************
2079 //void *pStatsBuf;
2080 The Stats buffer starts here and can be an aggregate of more than one statistics
2081 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2082 intentionally and the src code that uses this structure should take that into account.
2083**********************************************************************************************/
2084} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2085
2086typedef struct sAniGetRssiReq
2087{
2088 // Common for all types are requests
2089 tANI_U16 msgType; // message type is same as the request type
2090 tANI_U16 msgLen; // length of the entire request
2091 tANI_U8 sessionId;
2092 tANI_U8 staId;
2093 void *rssiCallback;
2094 void *pDevContext; //device context
2095 void *pVosContext; //voss context
2096
2097} tAniGetRssiReq, *tpAniGetRssiReq;
2098
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002099#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
2100typedef struct sAniGetRoamRssiRsp
2101{
2102 // Common for all types are responses
2103 tANI_U16 msgType; // message type is same as the request type
2104 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2105 tANI_U8 sessionId;
2106 tANI_U32 rc; //success/failure
2107 tANI_U32 staId; // Per STA stats request must contain valid
2108 tANI_S8 rssi;
2109 void *rssiReq; //rssi request backup
2110
2111} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2112
2113#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002114/* Change country code request MSG structure */
2115typedef struct sAniChangeCountryCodeReq
2116{
2117 // Common for all types are requests
2118 tANI_U16 msgType; // message type is same as the request type
2119 tANI_U16 msgLen; // length of the entire request
2120 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302121 tAniBool countryFromUserSpace;
Jeff Johnson295189b2012-06-20 16:38:30 -07002122 void *changeCCCallback;
2123 void *pDevContext; //device context
2124 void *pVosContext; //voss context
2125
2126} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2127
2128typedef struct sAniSummaryStatsInfo
2129{
2130 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2131 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2132 // station successfully transmitted after more than one retransmission attempt
2133
2134 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2135 //(with and without retries, including multi-cast, broadcast)
2136 //tANI_U32 tx_fail_cnt;
2137 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2138 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2139 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2140 //(after appropriate filter rules including multi-cast, broadcast)
2141 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2142 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2143 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2144 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2145 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2146 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2147 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2148 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2149 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2150 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2151 //to provide this.
2152#if 0
2153 //providing the following stats, in case of wrap around for tx_byte_cnt
2154 tANI_U32 tx_unicast_lower_byte_cnt;
2155 tANI_U32 tx_unicast_upper_byte_cnt;
2156 tANI_U32 tx_multicast_lower_byte_cnt;
2157 tANI_U32 tx_multicast_upper_byte_cnt;
2158 tANI_U32 tx_broadcast_lower_byte_cnt;
2159 tANI_U32 tx_broadcast_upper_byte_cnt;
2160#endif
2161
2162}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2163
2164typedef enum eTxRateInfo
2165{
2166 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2167 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2168 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2169 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002170 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2171 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2172 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2173 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002174} tTxrateinfoflags;
2175
2176typedef struct sAniGlobalClassAStatsInfo
2177{
2178 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2179 //or MMPDU frames
2180 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2181 //or MMPDU frames when a promiscuous packet filter was enabled
2182 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2183 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2184 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2185 //to a supported rate and the order shall be the same as the supporteRates parameter.
2186 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2187 //for eg: if it is 10.5dBm, the value would be 105
2188 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2189 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2190 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2191 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2192 //500 kbit/sec, for the most
2193 //recently transmitted frame
2194 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2195 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2196 //HT40 rates; short and long guard interval
2197
2198}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2199
2200
2201typedef struct sAniGlobalSecurityStats
2202{
2203 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2204 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2205 //is enabled
2206 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2207 //because of MIC failures
2208 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2209 //because of a TKIP ICV error
2210 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2211 //invalid AES-CCMP format
2212 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2213 //the AES-CCMP replay protection procedure
2214 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2215 //errors detected by the AES-CCMP decryption algorithm
2216 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2217 //not available on the 802.11 station
2218 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2219 //because of a WEP ICV error
2220 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2221 //decrypted
2222 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2223
2224}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2225
2226typedef struct sAniGlobalClassBStatsInfo
2227{
2228 tAniGlobalSecurityStats ucStats;
2229 tAniGlobalSecurityStats mcbcStats;
2230}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2231
2232typedef struct sAniGlobalClassCStatsInfo
2233{
2234 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2235 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2236 //address 1 field
2237 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2238 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2239 //primary channel
2240 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2241 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2242 //when an A-MPDU is received
2243 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2244 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2245 //decoded correctly
2246
2247}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2248
2249typedef struct sAniPerStaStatsInfo
2250{
2251 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2252 //through a received 802.11 ACK frame
2253 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2254 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2255 //is transmitted
2256
2257}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2258
2259/**********************PE Statistics end*************************/
2260
2261
2262
2263typedef struct sSirRSSIThresholds
2264{
2265#ifdef ANI_BIG_BYTE_ENDIAN
2266 tANI_S8 ucRssiThreshold1 : 8;
2267 tANI_S8 ucRssiThreshold2 : 8;
2268 tANI_S8 ucRssiThreshold3 : 8;
2269 tANI_U8 bRssiThres1PosNotify : 1;
2270 tANI_U8 bRssiThres1NegNotify : 1;
2271 tANI_U8 bRssiThres2PosNotify : 1;
2272 tANI_U8 bRssiThres2NegNotify : 1;
2273 tANI_U8 bRssiThres3PosNotify : 1;
2274 tANI_U8 bRssiThres3NegNotify : 1;
2275 tANI_U8 bReserved10 : 2;
2276#else
2277 tANI_U8 bReserved10 : 2;
2278 tANI_U8 bRssiThres3NegNotify : 1;
2279 tANI_U8 bRssiThres3PosNotify : 1;
2280 tANI_U8 bRssiThres2NegNotify : 1;
2281 tANI_U8 bRssiThres2PosNotify : 1;
2282 tANI_U8 bRssiThres1NegNotify : 1;
2283 tANI_U8 bRssiThres1PosNotify : 1;
2284 tANI_S8 ucRssiThreshold3 : 8;
2285 tANI_S8 ucRssiThreshold2 : 8;
2286 tANI_S8 ucRssiThreshold1 : 8;
2287#endif
2288
2289}tSirRSSIThresholds, *tpSirRSSIThresholds;
2290
2291typedef struct sSirRSSINotification
2292{
2293#ifdef ANI_BIG_BYTE_ENDIAN
2294 tANI_U32 bRssiThres1PosCross : 1;
2295 tANI_U32 bRssiThres1NegCross : 1;
2296 tANI_U32 bRssiThres2PosCross : 1;
2297 tANI_U32 bRssiThres2NegCross : 1;
2298 tANI_U32 bRssiThres3PosCross : 1;
2299 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002300 v_S7_t avgRssi : 8;
2301 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002302#else
Srinivasdaaec712012-12-12 15:59:44 -08002303 tANI_U32 bReserved : 18;
2304 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002305 tANI_U32 bRssiThres3NegCross : 1;
2306 tANI_U32 bRssiThres3PosCross : 1;
2307 tANI_U32 bRssiThres2NegCross : 1;
2308 tANI_U32 bRssiThres2PosCross : 1;
2309 tANI_U32 bRssiThres1NegCross : 1;
2310 tANI_U32 bRssiThres1PosCross : 1;
2311#endif
2312
2313}tSirRSSINotification, *tpSirRSSINotification;
2314
Viral Modid86bde22012-12-10 13:09:21 -08002315
2316typedef struct sSirP2PNoaStart
2317{
2318 tANI_U32 status;
2319 tANI_U32 bssIdx;
2320} tSirP2PNoaStart, *tpSirP2PNoaStart;
2321
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302322typedef struct sSirTdlsInd
2323{
2324 tANI_U16 status;
2325 tANI_U16 assocId;
2326 tANI_U16 staIdx;
2327 tANI_U16 reasonCode;
2328} tSirTdlsInd, *tpSirTdlsInd;
2329
Jeff Johnson295189b2012-06-20 16:38:30 -07002330typedef struct sSirP2PNoaAttr
2331{
2332#ifdef ANI_BIG_BYTE_ENDIAN
2333 tANI_U32 index :8;
2334 tANI_U32 oppPsFlag :1;
2335 tANI_U32 ctWin :7;
2336 tANI_U32 rsvd1: 16;
2337#else
2338 tANI_U32 rsvd1: 16;
2339 tANI_U32 ctWin :7;
2340 tANI_U32 oppPsFlag :1;
2341 tANI_U32 index :8;
2342#endif
2343
2344#ifdef ANI_BIG_BYTE_ENDIAN
2345 tANI_U32 uNoa1IntervalCnt:8;
2346 tANI_U32 rsvd2:24;
2347#else
2348 tANI_U32 rsvd2:24;
2349 tANI_U32 uNoa1IntervalCnt:8;
2350#endif
2351 tANI_U32 uNoa1Duration;
2352 tANI_U32 uNoa1Interval;
2353 tANI_U32 uNoa1StartTime;
2354
2355#ifdef ANI_BIG_BYTE_ENDIAN
2356 tANI_U32 uNoa2IntervalCnt:8;
2357 tANI_U32 rsvd3:24;
2358#else
2359 tANI_U32 rsvd3:24;
2360 tANI_U32 uNoa2IntervalCnt:8;
2361#endif
2362 tANI_U32 uNoa2Duration;
2363 tANI_U32 uNoa2Interval;
2364 tANI_U32 uNoa2StartTime;
2365} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002366
2367typedef __ani_attr_pre_packed struct sSirTclasInfo
2368{
2369 tSirMacTclasIE tclas;
2370 tANI_U8 version; // applies only for classifier type ip
2371 __ani_attr_pre_packed union {
2372 tSirMacTclasParamEthernet eth;
2373 tSirMacTclasParamIPv4 ipv4;
2374 tSirMacTclasParamIPv6 ipv6;
2375 tSirMacTclasParam8021dq t8021dq;
2376 }__ani_attr_packed tclasParams;
2377} __ani_attr_packed tSirTclasInfo;
2378
2379typedef struct sSirAddtsReqInfo
2380{
2381 tANI_U8 dialogToken;
2382 tSirMacTspecIE tspec;
2383
2384 tANI_U8 numTclas; // number of Tclas elements
2385 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2386 tANI_U8 tclasProc;
2387#ifdef FEATURE_WLAN_CCX
2388 tSirMacCCXTSRSIE tsrsIE;
2389 tANI_U8 tsrsPresent:1;
2390#endif
2391 tANI_U8 wmeTspecPresent:1;
2392 tANI_U8 wsmTspecPresent:1;
2393 tANI_U8 lleTspecPresent:1;
2394 tANI_U8 tclasProcPresent:1;
2395} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2396
2397typedef struct sSirAddtsRspInfo
2398{
2399 tANI_U8 dialogToken;
2400 tSirMacStatusCodes status;
2401 tSirMacTsDelayIE delay;
2402
2403 tSirMacTspecIE tspec;
2404 tANI_U8 numTclas; // number of Tclas elements
2405 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2406 tANI_U8 tclasProc;
2407 tSirMacScheduleIE schedule;
2408#ifdef FEATURE_WLAN_CCX
2409 tSirMacCCXTSMIE tsmIE;
2410 tANI_U8 tsmPresent:1;
2411#endif
2412 tANI_U8 wmeTspecPresent:1;
2413 tANI_U8 wsmTspecPresent:1;
2414 tANI_U8 lleTspecPresent:1;
2415 tANI_U8 tclasProcPresent:1;
2416 tANI_U8 schedulePresent:1;
2417} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2418
2419typedef struct sSirDeltsReqInfo
2420{
2421 tSirMacTSInfo tsinfo;
2422 tSirMacTspecIE tspec;
2423 tANI_U8 wmeTspecPresent:1;
2424 tANI_U8 wsmTspecPresent:1;
2425 tANI_U8 lleTspecPresent:1;
2426} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2427
2428/// Add a tspec as defined
2429typedef struct sSirAddtsReq
2430{
2431 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2432 tANI_U16 length;
2433 tANI_U8 sessionId; //Session ID
2434 tANI_U16 transactionId;
2435 tSirMacAddr bssId; //BSSID
2436 tANI_U32 timeout; // in ms
2437 tANI_U8 rspReqd;
2438 tSirAddtsReqInfo req;
2439} tSirAddtsReq, *tpSirAddtsReq;
2440
2441typedef struct sSirAddtsRsp
2442{
2443 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2444 tANI_U16 length;
2445 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2446 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2447 tANI_U32 rc; // return code
2448 tSirAddtsRspInfo rsp;
2449} tSirAddtsRsp, *tpSirAddtsRsp;
2450
2451typedef struct sSirDeltsReq
2452{
2453 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2454 tANI_U16 length;
2455 tANI_U8 sessionId;//Session ID
2456 tANI_U16 transactionId;
2457 tSirMacAddr bssId; //BSSID
2458 tANI_U16 aid; // use 0 if macAddr is being specified
2459 tANI_U8 macAddr[6]; // only on AP to specify the STA
2460 tANI_U8 rspReqd;
2461 tSirDeltsReqInfo req;
2462} tSirDeltsReq, *tpSirDeltsReq;
2463
2464typedef struct sSirDeltsRsp
2465{
2466 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2467 tANI_U16 length;
2468 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2469 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2470 tANI_U32 rc;
2471 tANI_U16 aid; // use 0 if macAddr is being specified
2472 tANI_U8 macAddr[6]; // only on AP to specify the STA
2473 tSirDeltsReqInfo rsp;
2474} tSirDeltsRsp, *tpSirDeltsRsp;
2475
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002476#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002477
2478#define SIR_QOS_NUM_TSPEC_MAX 2
2479#define SIR_QOS_NUM_AC_MAX 4
2480
2481typedef struct sSirAggrQosReqInfo
2482{
2483 tANI_U16 tspecIdx;
2484 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2485}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2486
2487typedef struct sSirAggrQosReq
2488{
2489 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2490 tANI_U16 length;
2491 tANI_U8 sessionId; //Session ID
2492 tANI_U16 transactionId;
2493 tSirMacAddr bssId; //BSSID
2494 tANI_U32 timeout; // in ms
2495 tANI_U8 rspReqd;
2496 tSirAggrQosReqInfo aggrInfo;
2497}tSirAggrQosReq, *tpSirAggrQosReq;
2498
2499typedef struct sSirAggrQosRspInfo
2500{
2501 tANI_U16 tspecIdx;
2502 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2503} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2504
2505typedef struct sSirAggrQosRsp
2506{
2507 tANI_U16 messageType;
2508 tANI_U16 length;
2509 tANI_U8 sessionId;
2510 tSirAggrQosRspInfo aggrInfo;
2511} tSirAggrQosRsp, *tpSirAggrQosRsp;
2512
2513#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_CCX*/
2514
2515typedef struct sSirSetTxPowerReq
2516{
schang86c22c42013-03-13 18:41:24 -07002517 tANI_U16 messageType;
2518 tANI_U16 length;
2519 tSirMacAddr bssId;
2520 tANI_U8 mwPower;
2521 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002522} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2523
2524typedef struct sSirSetTxPowerRsp
2525{
2526 tANI_U16 messageType;
2527 tANI_U16 length;
2528 tANI_U32 status;
2529} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2530
2531typedef struct sSirGetTxPowerReq
2532{
2533 tANI_U16 messageType;
2534 tANI_U16 length;
2535 tANI_U16 staid;
2536} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2537
2538typedef struct sSirGetTxPowerRsp
2539{
2540 tANI_U16 messageType;
2541 tANI_U16 length; // length of the entire request
2542 tANI_U32 power; // units of milliwatts
2543 tANI_U32 status;
2544} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2545
2546
2547typedef tANI_U32 tSirMacNoise[3];
2548
2549typedef struct sSirGetNoiseRsp
2550{
2551 tANI_U16 messageType;
2552 tANI_U16 length;
2553 tSirMacNoise noise;
2554} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2555
2556
2557//
2558// PMC --> PE --> HAL
2559// Power save configuration parameters
2560//
2561typedef struct sSirPowerSaveCfg
2562{
2563 tANI_U16 listenInterval;
2564
2565 /* Number of consecutive missed beacons before
2566 * hardware generates an interrupt to wake up
2567 * the host. In units of listen interval.
2568 */
2569 tANI_U32 HeartBeatCount;
2570
2571 /* specifies which beacons are to be forwarded
2572 * to host when beacon filtering is enabled.
2573 * In units of listen interval.
2574 */
2575 tANI_U32 nthBeaconFilter;
2576
2577 /* Maximum number of PS-Poll send before
2578 * firmware sends data null with PM set to 0.
2579 */
2580 tANI_U32 maxPsPoll;
2581
2582 /* If the average RSSI value falls below the
2583 * minRssiThreshold, then FW will send an
2584 * interrupt to wake up the host.
2585 */
2586 tANI_U32 minRssiThreshold;
2587
2588 /* Number of beacons for which firmware will
2589 * collect the RSSI values and compute the average.
2590 */
2591 tANI_U8 numBeaconPerRssiAverage;
2592
2593 /* FW collects the RSSI stats for this period
2594 * in BMPS mode.
2595 */
2596 tANI_U8 rssiFilterPeriod;
2597
2598 // Enabling/disabling broadcast frame filter feature
2599 tANI_U8 broadcastFrameFilter;
2600
2601 // Enabling/disabling the ignore DTIM feature
2602 tANI_U8 ignoreDtim;
2603
2604 /* The following configuration parameters are kept
2605 * in order to be backward compatible for Gen5.
2606 * These will NOT be used for Gen6 Libra chip
2607 */
2608 tBeaconForwarding beaconFwd;
2609 tANI_U16 nthBeaconFwd;
2610 tANI_U8 fEnablePwrSaveImmediately;
2611 tANI_U8 fPSPoll;
2612
2613 // Enabling/disabling Beacon Early Termination feature
2614 tANI_U8 fEnableBeaconEarlyTermination;
2615 tANI_U8 bcnEarlyTermWakeInterval;
2616
2617}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2618
2619/* Reason code for requesting Full Power. This reason code is used by
2620 any module requesting full power from PMC and also by PE when it
2621 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2622typedef enum eRequestFullPowerReason
2623{
2624 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2625 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2626 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2627 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2628 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2629 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2630 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2631 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2632 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2633 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002634#ifdef FEATURE_WLAN_TDLS
2635 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2636#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002637 eSME_REASON_OTHER /* No specific reason. General reason code */
2638} tRequestFullPowerReason, tExitBmpsReason;
2639
2640
2641
2642//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2643typedef struct sExitBmpsInfo
2644{
2645 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2646}tExitBmpsInfo, *tpExitBmpsInfo;
2647
2648
2649// MAC SW --> SME
2650// Message indicating to SME to exit BMPS sleep mode
2651typedef struct sSirSmeExitBmpsInd
2652{
2653 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2654 tANI_U16 mesgLen;
2655 tSirResultCodes statusCode;
2656 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2657
2658} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2659
2660
2661//
2662// HDD -> LIM
2663// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2664// tSirMsgQ.reserved = 0
2665// tSirMsgQ.body = instance of tDelBAParams
2666//
2667typedef struct sSmeDelBAPeerInd
2668{
2669 // Message Type
2670 tANI_U16 mesgType;
2671
2672 tSirMacAddr bssId;//BSSID
2673
2674 // Message Length
2675 tANI_U16 mesgLen;
2676
2677 // Station Index
2678 tANI_U16 staIdx;
2679
2680 // TID for which the BA session is being deleted
2681 tANI_U8 baTID;
2682
2683 // DELBA direction
2684 // eBA_INITIATOR - Originator
2685 // eBA_RECEIPIENT - Recipient
2686 tANI_U8 baDirection;
2687} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2688
2689typedef struct sSmeIbssPeerInd
2690{
2691 tANI_U16 mesgType;
2692 tANI_U16 mesgLen;
2693 tANI_U8 sessionId;
2694
2695 tSirMacAddr peerAddr;
2696 tANI_U16 staId;
2697
2698 /*The DPU signatures will be sent eventually to TL to help it determine the
2699 association to which a packet belongs to*/
2700 /*Unicast DPU signature*/
2701 tANI_U8 ucastSig;
2702
2703 /*Broadcast DPU signature*/
2704 tANI_U8 bcastSig;
2705
2706 //Beacon will be appended for new Peer indication.
2707}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2708
2709typedef struct sLimScanChn
2710{
2711 tANI_U16 numTimeScan; //how many time this channel is scan
2712 tANI_U8 channelId;
2713}tLimScanChn;
2714
2715typedef struct sSmeGetScanChnRsp
2716{
2717 // Message Type
2718 tANI_U16 mesgType;
2719 // Message Length
2720 tANI_U16 mesgLen;
2721 tANI_U8 sessionId;
2722 tANI_U8 numChn;
2723 tLimScanChn scanChn[1];
2724} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2725
2726typedef struct sLimScanChnInfo
2727{
2728 tANI_U8 numChnInfo; //number of channels in scanChn
2729 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2730}tLimScanChnInfo;
2731
Jeff Johnson295189b2012-06-20 16:38:30 -07002732typedef struct sSirSmeGetAssocSTAsReq
2733{
2734 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2735 tANI_U16 length;
2736 tSirMacAddr bssId; // BSSID
2737 tANI_U16 modId;
2738 void *pUsrContext;
2739 void *pSapEventCallback;
2740 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2741} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002742
2743typedef struct sSmeMaxAssocInd
2744{
2745 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2746 tANI_U16 mesgLen;
2747 tANI_U8 sessionId;
2748 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2749} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2750
2751/*--------------------------------------------------------------------*/
2752/* BootLoader message definition */
2753/*--------------------------------------------------------------------*/
2754
2755/*--------------------------------------------------------------------*/
2756/* FW image size */
2757/*--------------------------------------------------------------------*/
2758#define SIR_FW_IMAGE_SIZE 146332
2759
2760
2761#define SIR_BOOT_MODULE_ID 1
2762
2763#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2764#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2765#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2766#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2767#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2768#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2769#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2770
2771/*--------------------------------------------------------------------*/
2772/* Bootloader message syntax */
2773/*--------------------------------------------------------------------*/
2774
2775// Message header
2776#define SIR_BOOT_MB_HEADER 0
2777#define SIR_BOOT_MB_HEADER2 1
2778
2779#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2780#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2781
2782// BOOT_SETUP_IND parameter indices
2783#define SIR_BOOT_SETUP_IND_MBADDR 2
2784#define SIR_BOOT_SETUP_IND_MBSIZE 3
2785#define SIR_BOOT_SETUP_IND_MEMOPT 4
2786#define SIR_BOOT_SETUP_IND_LEN \
2787 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2788
2789// BOOT_POST_RESULT_IND parameter indices
2790#define SIR_BOOT_POST_RESULT_IND_RES 2
2791#define SIR_BOOT_POST_RESULT_IND_LEN \
2792 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
2793
2794#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
2795#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
2796#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
2797#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
2798
2799
2800// BOOT_DNLD_RESULT_IND parameter indices
2801#define SIR_BOOT_DNLD_RESULT_IND_RES 2
2802#define SIR_BOOT_DNLD_RESULT_IND_LEN \
2803 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
2804
2805#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
2806#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
2807#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
2808
2809// BOOT_DNLD_DEV_REQ
2810#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
2811#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
2812#define SIR_BOOT_DNLD_DEV_REQ_LEN \
2813 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
2814
2815// BOOT_DNLD_DEV_RSP
2816#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
2817#define SIR_BOOT_DNLD_DEV_RSP_LEN \
2818 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
2819
2820#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
2821#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
2822
2823// BOOT_DNLD_REQ
2824#define SIR_BOOT_DNLD_REQ_OFFSET 2
2825#define SIR_BOOT_DNLD_REQ_WRADDR 3
2826#define SIR_BOOT_DNLD_REQ_SIZE 4
2827#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
2828
2829// BOOT_DNLD_RSP
2830#define SIR_BOOT_DNLD_RSP_SIZE 2
2831#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
2832
Jeff Johnson295189b2012-06-20 16:38:30 -07002833
2834// board capabilities fields are defined here.
2835typedef __ani_attr_pre_packed struct sSirBoardCapabilities
2836{
2837#ifndef ANI_LITTLE_BIT_ENDIAN
2838 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
2839 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
2840 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
2841 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
2842 tANI_U32 rsvd1:2;
2843 // (productId derives sub-category in the following three families)
2844 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
2845 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
2846 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
2847 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
2848 tANI_U32 bbChipVer:4; // Baseband chip version
2849 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
2850 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
2851 tANI_U32 nReceivers:2; // 0 based.
2852 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
2853 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
2854 tANI_U32 rsvd:1;
2855 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
2856#else
2857
2858 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
2859 tANI_U32 rsvd:1;
2860 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
2861 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
2862 tANI_U32 nReceivers:2; // 0 based.
2863 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
2864 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
2865 tANI_U32 bbChipVer:4; // Baseband chip version
2866 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
2867 // (productId derives sub-category in the following three families)
2868 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
2869 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
2870 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
2871 tANI_U32 rsvd1:2;
2872 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
2873 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
2874 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
2875 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
2876#endif
2877} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
2878
2879# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
2880# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
2881
2882# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
2883# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
2884
2885# define ANI_BCAP_SDRAM_MASK 0x4
2886# define ANI_BCAP_SDRAM_OFFSET 2
2887
2888# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
2889# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
2890
2891# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
2892# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
2893
2894# define ANI_BCAP_RADIO_ON_MASK 0xC0
2895# define ANI_BCAP_RADIO_ON_OFFSET 6
2896
2897# define ANI_BCAP_LO_TYPE_MASK 0x300
2898# define ANI_BCAP_LO_TYPE_OFFSET 8
2899
2900# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
2901# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
2902
2903# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
2904# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
2905
2906# define ANI_BCAP_RADIO_OFF 0
2907# define ANI_BCAP_RADIO_ON 1
2908# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
2909
2910
2911/// WOW related structures
2912// SME -> PE <-> HAL
2913#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
2914#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
2915
2916// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
2917// SME/HDD maintains the list of the BCAST wake-up patterns.
2918// This is a pass through message for PE
2919typedef struct sSirWowlAddBcastPtrn
2920{
2921 tANI_U8 ucPatternId; // Pattern ID
2922 // Pattern byte offset from beginning of the 802.11 packet to start of the
2923 // wake-up pattern
2924 tANI_U8 ucPatternByteOffset;
2925 tANI_U8 ucPatternSize; // Non-Zero Pattern size
2926 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
2927 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
2928 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
2929 // Extra pattern data beyond 128 bytes
2930 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
2931 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002932 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07002933} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
2934
2935
2936// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
2937// SME/HDD maintains the list of the BCAST wake-up patterns.
2938// This is a pass through message for PE
2939typedef struct sSirWowlDelBcastPtrn
2940{
2941 /* Pattern ID of the wakeup pattern to be deleted */
2942 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002943 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07002944}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
2945
2946
2947// SME->PE: Enter WOWLAN parameters
2948typedef struct sSirSmeWowlEnterParams
2949{
2950 /* Enables/disables magic packet filtering */
2951 tANI_U8 ucMagicPktEnable;
2952
2953 /* Magic pattern */
2954 tSirMacAddr magicPtrn;
2955
2956 /* Enables/disables packet pattern filtering */
2957 tANI_U8 ucPatternFilteringEnable;
2958
2959#ifdef WLAN_WAKEUP_EVENTS
2960 /* This configuration directs the WoW packet filtering to look for EAP-ID
2961 * requests embedded in EAPOL frames and use this as a wake source.
2962 */
2963 tANI_U8 ucWoWEAPIDRequestEnable;
2964
2965 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
2966 * requests and use this as a wake source.
2967 */
2968 tANI_U8 ucWoWEAPOL4WayEnable;
2969
2970 /* This configuration allows a host wakeup on an network scan offload match.
2971 */
2972 tANI_U8 ucWowNetScanOffloadMatch;
2973
2974 /* This configuration allows a host wakeup on any GTK rekeying error.
2975 */
2976 tANI_U8 ucWowGTKRekeyError;
2977
2978 /* This configuration allows a host wakeup on BSS connection loss.
2979 */
2980 tANI_U8 ucWoWBSSConnLoss;
2981#endif // WLAN_WAKEUP_EVENTS
2982
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002983 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07002984} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
2985
2986
2987// PE<->HAL: Enter WOWLAN parameters
2988typedef struct sSirHalWowlEnterParams
2989{
2990 /* Enables/disables magic packet filtering */
2991 tANI_U8 ucMagicPktEnable;
2992
2993 /* Magic pattern */
2994 tSirMacAddr magicPtrn;
2995
2996 /* Enables/disables packet pattern filtering in firmware.
2997 Enabling this flag enables broadcast pattern matching
2998 in Firmware. If unicast pattern matching is also desired,
2999 ucUcastPatternFilteringEnable flag must be set tot true
3000 as well
3001 */
3002 tANI_U8 ucPatternFilteringEnable;
3003
3004 /* Enables/disables unicast packet pattern filtering.
3005 This flag specifies whether we want to do pattern match
3006 on unicast packets as well and not just broadcast packets.
3007 This flag has no effect if the ucPatternFilteringEnable
3008 (main controlling flag) is set to false
3009 */
3010 tANI_U8 ucUcastPatternFilteringEnable;
3011
3012 /* This configuration is valid only when magicPktEnable=1.
3013 * It requests hardware to wake up when it receives the
3014 * Channel Switch Action Frame.
3015 */
3016 tANI_U8 ucWowChnlSwitchRcv;
3017
3018 /* This configuration is valid only when magicPktEnable=1.
3019 * It requests hardware to wake up when it receives the
3020 * Deauthentication Frame.
3021 */
3022 tANI_U8 ucWowDeauthRcv;
3023
3024 /* This configuration is valid only when magicPktEnable=1.
3025 * It requests hardware to wake up when it receives the
3026 * Disassociation Frame.
3027 */
3028 tANI_U8 ucWowDisassocRcv;
3029
3030 /* This configuration is valid only when magicPktEnable=1.
3031 * It requests hardware to wake up when it has missed
3032 * consecutive beacons. This is a hardware register
3033 * configuration (NOT a firmware configuration).
3034 */
3035 tANI_U8 ucWowMaxMissedBeacons;
3036
3037 /* This configuration is valid only when magicPktEnable=1.
3038 * This is a timeout value in units of microsec. It requests
3039 * hardware to unconditionally wake up after it has stayed
3040 * in WoWLAN mode for some time. Set 0 to disable this feature.
3041 */
3042 tANI_U8 ucWowMaxSleepUsec;
3043
3044#ifdef WLAN_WAKEUP_EVENTS
3045 /* This configuration directs the WoW packet filtering to look for EAP-ID
3046 * requests embedded in EAPOL frames and use this as a wake source.
3047 */
3048 tANI_U8 ucWoWEAPIDRequestEnable;
3049
3050 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3051 * requests and use this as a wake source.
3052 */
3053 tANI_U8 ucWoWEAPOL4WayEnable;
3054
3055 /* This configuration allows a host wakeup on an network scan offload match.
3056 */
3057 tANI_U8 ucWowNetScanOffloadMatch;
3058
3059 /* This configuration allows a host wakeup on any GTK rekeying error.
3060 */
3061 tANI_U8 ucWowGTKRekeyError;
3062
3063 /* This configuration allows a host wakeup on BSS connection loss.
3064 */
3065 tANI_U8 ucWoWBSSConnLoss;
3066#endif // WLAN_WAKEUP_EVENTS
3067
3068 /* Status code to be filled by HAL when it sends
3069 * SIR_HAL_WOWL_ENTER_RSP to PE.
3070 */
3071 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003072
3073 /*BSSID to find the current session
3074 */
3075 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003076} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3077
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003078// PE<->HAL: Exit WOWLAN parameters
3079typedef struct sSirHalWowlExitParams
3080{
3081 /* Status code to be filled by HAL when it sends
3082 * SIR_HAL_WOWL_EXIT_RSP to PE.
3083 */
3084 eHalStatus status;
3085
3086 /*BSSIDX to find the current session
3087 */
3088 tANI_U8 bssIdx;
3089} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3090
Jeff Johnson295189b2012-06-20 16:38:30 -07003091
3092#define SIR_MAX_NAME_SIZE 64
3093#define SIR_MAX_TEXT_SIZE 32
3094
3095typedef struct sSirName {
3096 v_U8_t num_name;
3097 v_U8_t name[SIR_MAX_NAME_SIZE];
3098} tSirName;
3099
3100typedef struct sSirText {
3101 v_U8_t num_text;
3102 v_U8_t text[SIR_MAX_TEXT_SIZE];
3103} tSirText;
3104
3105
3106#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3107#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3108#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3109#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3110#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3111#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3112#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3113#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3114#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3115#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3116#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3117#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3118#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3119#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3120#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3121#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3122
3123
3124typedef struct sSirWPSProbeRspIE {
3125 v_U32_t FieldPresent;
3126 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3127 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3128 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3129 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3130 v_U16_t DevicePasswordID; // Device Password ID
3131 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3132 v_U8_t ResponseType; // Response type
3133 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3134 tSirName Manufacture;
3135 tSirText ModelName;
3136 tSirText ModelNumber;
3137 tSirText SerialNumber;
3138 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3139 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3140 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3141 tSirText DeviceName;
3142 v_U16_t ConfigMethod; // Configuaration method
3143 v_U8_t RFBand; // RF bands available on the AP
3144} tSirWPSProbeRspIE;
3145
3146#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3147#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3148#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3149#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3150#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3151#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3152#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3153#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3154
3155typedef struct sSirWPSBeaconIE {
3156 v_U32_t FieldPresent;
3157 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3158 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3159 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3160 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3161 v_U16_t DevicePasswordID; // Device Password ID
3162 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3163 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3164 v_U8_t RFBand; // RF bands available on the AP
3165} tSirWPSBeaconIE;
3166
3167#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3168#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3169
3170typedef struct sSirWPSAssocRspIE {
3171 v_U32_t FieldPresent;
3172 v_U32_t Version;
3173 v_U8_t ResposeType;
3174} tSirWPSAssocRspIE;
3175
3176typedef struct sSirAPWPSIEs {
3177 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3178 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3179 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3180} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3181
3182typedef struct sSirUpdateAPWPSIEsReq
3183{
3184 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3185 tANI_U16 length;
3186 tANI_U16 transactionId; //Transaction ID for cmd
3187 tSirMacAddr bssId; // BSSID
3188 tANI_U8 sessionId; //Session ID
3189 tSirAPWPSIEs APWPSIEs;
3190} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3191
3192typedef struct sSirUpdateParams
3193{
3194 tANI_U16 messageType;
3195 tANI_U16 length;
3196 tANI_U8 sessionId; // Session ID
3197 tANI_U8 ssidHidden; // Hide SSID
3198} tSirUpdateParams, *tpSirUpdateParams;
3199
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003200//Beacon Interval
3201typedef struct sSirChangeBIParams
3202{
3203 tANI_U16 messageType;
3204 tANI_U16 length;
3205 tANI_U16 beaconInterval; // Beacon Interval
3206 tSirMacAddr bssId;
3207 tANI_U8 sessionId; // Session ID
3208} tSirChangeBIParams, *tpSirChangeBIParams;
3209
Jeff Johnson295189b2012-06-20 16:38:30 -07003210#define SIR_WPS_UUID_LEN 16
3211#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3212
3213typedef struct sSirWPSPBCSession {
3214 struct sSirWPSPBCSession *next;
3215 tSirMacAddr addr;
3216 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3217 tANI_TIMESTAMP timestamp;
3218} tSirWPSPBCSession;
3219
3220typedef struct sSirSmeGetWPSPBCSessionsReq
3221{
3222 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3223 tANI_U16 length;
3224 void *pUsrContext;
3225 void *pSapEventCallback;
3226 tSirMacAddr bssId; // BSSID
3227 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3228} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3229
3230typedef struct sSirWPSPBCProbeReq
3231{
3232 tSirMacAddr peerMacAddr;
3233 tANI_U16 probeReqIELen;
3234 tANI_U8 probeReqIE[512];
3235} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3236
3237// probereq from peer, when wsc is enabled
3238typedef struct sSirSmeProbeReqInd
3239{
3240 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3241 tANI_U16 length;
3242 tANI_U8 sessionId;
3243 tSirMacAddr bssId;
3244 tSirWPSPBCProbeReq WPSPBCProbeReq;
3245} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3246
3247typedef struct sSirUpdateAPWPARSNIEsReq
3248{
3249 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3250 tANI_U16 length;
3251 tANI_U16 transactionId; //Transaction ID for cmd
3252 tSirMacAddr bssId; // BSSID
3253 tANI_U8 sessionId; //Session ID
3254 tSirRSNie APWPARSNIEs;
3255} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3256
Jeff Johnson295189b2012-06-20 16:38:30 -07003257
3258// SME -> HAL - This is the host offload request.
3259#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3260#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3261#define SIR_IPV6_NS_OFFLOAD 2
3262#define SIR_OFFLOAD_DISABLE 0
3263#define SIR_OFFLOAD_ENABLE 1
3264#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
3265#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
3266
3267#ifdef WLAN_NS_OFFLOAD
3268typedef struct sSirNsOffloadReq
3269{
3270 tANI_U8 srcIPv6Addr[16];
3271 tANI_U8 selfIPv6Addr[16];
3272 //Only support 2 possible Network Advertisement IPv6 address
3273 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3274 tANI_U8 selfMacAddr[6];
3275 tANI_U8 srcIPv6AddrValid;
3276 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
3277} tSirNsOffloadReq, *tpSirNsOffloadReq;
3278#endif //WLAN_NS_OFFLOAD
3279
3280typedef struct sSirHostOffloadReq
3281{
3282 tANI_U8 offloadType;
3283 tANI_U8 enableOrDisable;
3284 union
3285 {
3286 tANI_U8 hostIpv4Addr [4];
3287 tANI_U8 hostIpv6Addr [16];
3288 } params;
3289#ifdef WLAN_NS_OFFLOAD
3290 tSirNsOffloadReq nsOffloadInfo;
3291#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003292 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003293} tSirHostOffloadReq, *tpSirHostOffloadReq;
3294
3295/* Packet Types. */
3296#define SIR_KEEP_ALIVE_NULL_PKT 1
3297#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3298
3299/* Enable or disable offload. */
3300#define SIR_KEEP_ALIVE_DISABLE 0
3301#define SIR_KEEP_ALIVE_ENABLE 1
3302
3303/* Keep Alive request. */
3304typedef struct sSirKeepAliveReq
3305{
3306 v_U8_t packetType;
3307 v_U32_t timePeriod;
3308 tSirIpv4Addr hostIpv4Addr;
3309 tSirIpv4Addr destIpv4Addr;
3310 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003311 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003312} tSirKeepAliveReq, *tpSirKeepAliveReq;
3313
3314typedef struct sSirSmeAddStaSelfReq
3315{
3316 tANI_U16 mesgType;
3317 tANI_U16 mesgLen;
3318 tSirMacAddr selfMacAddr;
3319}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3320
3321typedef struct sSirSmeDelStaSelfReq
3322{
3323 tANI_U16 mesgType;
3324 tANI_U16 mesgLen;
3325 tSirMacAddr selfMacAddr;
3326}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3327
3328typedef struct sSirSmeAddStaSelfRsp
3329{
3330 tANI_U16 mesgType;
3331 tANI_U16 mesgLen;
3332 tANI_U16 status;
3333 tSirMacAddr selfMacAddr;
3334}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3335
3336typedef struct sSirSmeDelStaSelfRsp
3337{
3338 tANI_U16 mesgType;
3339 tANI_U16 mesgLen;
3340 tANI_U16 status;
3341 tSirMacAddr selfMacAddr;
3342}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3343
3344/* Coex Indication defines -
3345 should match WLAN_COEX_IND_DATA_SIZE
3346 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3347 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3348#define SIR_COEX_IND_DATA_SIZE (4)
3349#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3350#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003351#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3352#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003353#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3354#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003355
3356typedef struct sSirSmeCoexInd
3357{
3358 tANI_U16 mesgType;
3359 tANI_U16 mesgLen;
3360 tANI_U32 coexIndType;
3361 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3362}tSirSmeCoexInd, *tpSirSmeCoexInd;
3363
Jeff Johnson295189b2012-06-20 16:38:30 -07003364typedef struct sSirSmeMgmtFrameInd
3365{
3366 tANI_U16 mesgType;
3367 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303368 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003369 tANI_U8 sessionId;
3370 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303371 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003372 tANI_U8 frameBuf[1]; //variable
3373}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003374
Chet Lanctot186b5732013-03-18 10:26:30 -07003375#ifdef WLAN_FEATURE_11W
3376typedef struct sSirSmeUnprotMgmtFrameInd
3377{
3378 tANI_U8 sessionId;
3379 tANI_U8 frameType;
3380 tANI_U8 frameLen;
3381 tANI_U8 frameBuf[1]; //variable
3382}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3383#endif
3384
Jeff Johnson295189b2012-06-20 16:38:30 -07003385#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3386 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3387 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3388 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3389#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3390 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3391
3392/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003393typedef struct sSirNoAParam
3394{
3395 tANI_U8 ctWindow:7;
3396 tANI_U8 OppPS:1;
3397 tANI_U8 count;
3398 tANI_U32 duration;
3399 tANI_U32 interval;
3400 tANI_U32 singleNoADuration;
3401 tANI_U8 psSelection;
3402}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003403
Jeff Johnson295189b2012-06-20 16:38:30 -07003404typedef struct sSirWlanSuspendParam
3405{
3406 tANI_U8 configuredMcstBcstFilterSetting;
3407}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3408
3409typedef struct sSirWlanResumeParam
3410{
3411 tANI_U8 configuredMcstBcstFilterSetting;
3412}tSirWlanResumeParam,*tpSirWlanResumeParam;
3413
3414typedef struct sSirWlanSetRxpFilters
3415{
3416 tANI_U8 configuredMcstBcstFilterSetting;
3417 tANI_U8 setMcstBcstFilter;
3418}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003419
3420
3421#ifdef FEATURE_WLAN_SCAN_PNO
3422//
3423// PNO Messages
3424//
3425
3426// Set PNO
3427#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303428#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003429#define SIR_PNO_MAX_SUPP_NETWORKS 16
3430#define SIR_PNO_MAX_SCAN_TIMERS 10
3431
3432/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3433#define SIR_PNO_MAX_PB_REQ_SIZE 450
3434
3435#define SIR_PNO_24G_DEFAULT_CH 1
3436#define SIR_PNO_5G_DEFAULT_CH 36
3437
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003438#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3439#define SIR_ROAM_MAX_CHANNELS NUM_RF_CHANNELS
3440#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3441#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3442#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3443#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3444#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3445#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3446#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003447#define SIR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
3448#define SIR_ROAM_SCAN_RESERVED_BYTES 61
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003449#endif
3450
Jeff Johnson295189b2012-06-20 16:38:30 -07003451typedef enum
3452{
3453 SIR_PNO_MODE_IMMEDIATE,
3454 SIR_PNO_MODE_ON_SUSPEND,
3455 SIR_PNO_MODE_ON_RESUME,
3456 SIR_PNO_MODE_MAX
3457} eSirPNOMode;
3458
3459typedef struct
3460{
3461 tSirMacSSid ssId;
3462 tANI_U32 authentication;
3463 tANI_U32 encryption;
3464 tANI_U32 bcastNetwType;
3465 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303466 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003467 tANI_U8 rssiThreshold;
3468} tSirNetworkType;
3469
3470typedef struct
3471{
3472 tANI_U32 uTimerValue;
3473 tANI_U32 uTimerRepeat;
3474}tSirScanTimer;
3475
3476typedef struct
3477{
3478 tANI_U8 ucScanTimersCount;
3479 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3480} tSirScanTimersType;
3481
3482typedef struct sSirPNOScanReq
3483{
3484 tANI_U8 enable;
3485 eSirPNOMode modePNO;
3486 tANI_U8 ucNetworksCount;
3487 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3488 tSirScanTimersType scanTimers;
3489
3490 /*added by SME*/
3491 tANI_U16 us24GProbeTemplateLen;
3492 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3493 tANI_U16 us5GProbeTemplateLen;
3494 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3495} tSirPNOScanReq, *tpSirPNOScanReq;
3496
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003497#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3498typedef struct
3499{
3500 tSirMacSSid ssId;
3501 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3502 tANI_U32 authentication;
3503 tANI_U8 encryption;
3504 tANI_U8 mcencryption;
3505 tANI_U8 ChannelCount;
3506 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3507
3508} tSirRoamNetworkType;
3509
3510typedef struct SirMobilityDomainInfo
3511{
3512 tANI_U8 mdiePresent;
3513 tANI_U16 mobilityDomain;
3514} tSirMobilityDomainInfo;
3515
3516typedef struct sSirRoamOffloadScanReq
3517{
3518 eAniBoolean RoamScanOffloadEnabled;
3519 tANI_S8 LookupThreshold;
3520 tANI_U8 RoamRssiDiff;
3521 tANI_U8 ChannelCacheType;
3522 tANI_U8 Command;
3523 tANI_U8 StartScanReason;
3524 tANI_U16 NeighborScanTimerPeriod;
3525 tANI_U16 NeighborRoamScanRefreshPeriod;
3526 tANI_U16 NeighborScanChannelMinTime;
3527 tANI_U16 NeighborScanChannelMaxTime;
3528 tANI_U16 EmptyRefreshScanPeriod;
3529 tANI_U8 ValidChannelCount;
3530 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
3531 eAniBoolean IsCCXEnabled;
3532 tANI_U16 us24GProbeTemplateLen;
3533 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3534 tANI_U16 us5GProbeTemplateLen;
3535 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003536 tANI_U8 ReservedBytes[SIR_ROAM_SCAN_RESERVED_BYTES];
3537 /*ReservedBytes is to add any further params in future
3538 without changing the interface params on Host
3539 and firmware.The firmware right now checks
3540 if the size of this structure matches and then
3541 proceeds with the processing of the command.
3542 So, in future, if there is any need to add
3543 more params, pick the memory from reserved
3544 bytes and keep deducting the reserved bytes
3545 by the amount of bytes picked.*/
3546 tANI_U8 nProbes;
3547 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003548 tSirRoamNetworkType ConnectedNetwork;
3549 tSirMobilityDomainInfo MDID;
3550} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
3551#endif
3552
Jeff Johnson295189b2012-06-20 16:38:30 -07003553typedef struct sSirSetRSSIFilterReq
3554{
3555 tANI_U8 rssiThreshold;
3556} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3557
3558
3559// Update Scan Params
3560typedef struct {
3561 tANI_U8 b11dEnabled;
3562 tANI_U8 b11dResolved;
3563 tANI_U8 ucChannelCount;
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303564 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003565 tANI_U16 usPassiveMinChTime;
3566 tANI_U16 usPassiveMaxChTime;
3567 tANI_U16 usActiveMinChTime;
3568 tANI_U16 usActiveMaxChTime;
3569 tANI_U8 ucCBState;
3570} tSirUpdateScanParams, * tpSirUpdateScanParams;
3571
3572// Preferred Network Found Indication
3573typedef struct
3574{
Srikant Kuppa066904f2013-05-07 13:56:02 -07003575 tANI_U16 mesgType;
3576 tANI_U16 mesgLen;
Jeff Johnson295189b2012-06-20 16:38:30 -07003577 /* Network that was found with the highest RSSI*/
Srikant Kuppa066904f2013-05-07 13:56:02 -07003578 tSirMacSSid ssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003579 /* Indicates the RSSI */
Srikant Kuppa066904f2013-05-07 13:56:02 -07003580 tANI_U8 rssi;
3581 /* Length of the beacon or probe response
3582 * corresponding to the candidate found by PNO */
3583 tANI_U32 frameLength;
3584 /* Index to memory location where the contents of
3585 * beacon or probe response frame will be copied */
3586 tANI_U8 data[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07003587} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3588#endif // FEATURE_WLAN_SCAN_PNO
3589
3590#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3591
3592//Power Parameters Type
3593typedef enum
3594{
3595 eSIR_IGNORE_DTIM = 1,
3596 eSIR_LISTEN_INTERVAL = 2,
3597 eSIR_MCAST_BCAST_FILTER = 3,
3598 eSIR_ENABLE_BET = 4,
3599 eSIR_BET_INTERVAL = 5
3600}tPowerParamType;
3601
3602//Power Parameters Value s
3603typedef struct
3604{
3605 /* Ignore DTIM */
3606 tANI_U32 uIgnoreDTIM;
3607
3608 /* DTIM Period */
3609 tANI_U32 uDTIMPeriod;
3610
3611 /* Listen Interval */
3612 tANI_U32 uListenInterval;
3613
3614 /* Broadcast Multicas Filter */
3615 tANI_U32 uBcastMcastFilter;
3616
3617 /* Beacon Early Termination */
3618 tANI_U32 uEnableBET;
3619
3620 /* Beacon Early Termination Interval */
3621 tANI_U32 uBETInterval;
3622
Yue Mac24062f2013-05-13 17:01:29 -07003623 /* MAX LI for modulated DTIM */
3624 tANI_U32 uMaxLIModulatedDTIM;
3625
Jeff Johnson295189b2012-06-20 16:38:30 -07003626}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3627
3628typedef struct sSirTxPerTrackingParam
3629{
3630 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3631 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3632 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 */
3633 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3634}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3635
3636#ifdef WLAN_FEATURE_PACKET_FILTERING
3637/*---------------------------------------------------------------------------
3638 Packet Filtering Parameters
3639---------------------------------------------------------------------------*/
3640#define SIR_IPV4_ADDR_LEN 4
3641#define SIR_MAC_ADDR_LEN 6
3642#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3643#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3644#define SIR_MAX_NUM_FILTERS 20
3645#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3646
3647//
3648// Receive Filter Parameters
3649//
3650typedef enum
3651{
3652 SIR_RCV_FILTER_TYPE_INVALID,
3653 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3654 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3655 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3656}eSirReceivePacketFilterType;
3657
3658typedef enum
3659{
3660 SIR_FILTER_HDR_TYPE_INVALID,
3661 SIR_FILTER_HDR_TYPE_MAC,
3662 SIR_FILTER_HDR_TYPE_ARP,
3663 SIR_FILTER_HDR_TYPE_IPV4,
3664 SIR_FILTER_HDR_TYPE_IPV6,
3665 SIR_FILTER_HDR_TYPE_UDP,
3666 SIR_FILTER_HDR_TYPE_MAX
3667}eSirRcvPktFltProtocolType;
3668
3669typedef enum
3670{
3671 SIR_FILTER_CMP_TYPE_INVALID,
3672 SIR_FILTER_CMP_TYPE_EQUAL,
3673 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3674 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3675 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3676 SIR_FILTER_CMP_TYPE_MAX
3677}eSirRcvPktFltCmpFlagType;
3678
3679typedef struct sSirRcvPktFilterFieldParams
3680{
3681 eSirRcvPktFltProtocolType protocolLayer;
3682 eSirRcvPktFltCmpFlagType cmpFlag;
3683 /* Length of the data to compare */
3684 tANI_U16 dataLength;
3685 /* from start of the respective frame header */
3686 tANI_U8 dataOffset;
3687 /* Reserved field */
3688 tANI_U8 reserved;
3689 /* Data to compare */
3690 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3691 /* Mask to be applied on the received packet data before compare */
3692 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3693}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3694
3695typedef struct sSirRcvPktFilterCfg
3696{
3697 tANI_U8 filterId;
3698 eSirReceivePacketFilterType filterType;
3699 tANI_U32 numFieldParams;
3700 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003701 tSirMacAddr selfMacAddr;
3702 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003703 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003704}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3705
3706//
3707// Filter Packet Match Count Parameters
3708//
3709typedef struct sSirRcvFltPktMatchCnt
3710{
3711 tANI_U8 filterId;
3712 tANI_U32 matchCnt;
3713} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3714
3715typedef struct sSirRcvFltPktMatchRsp
3716{
3717 tANI_U16 mesgType;
3718 tANI_U16 mesgLen;
3719
3720 /* Success or Failure */
3721 tANI_U32 status;
3722 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003723 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003724} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3725
3726//
3727// Receive Filter Clear Parameters
3728//
3729typedef struct sSirRcvFltPktClearParam
3730{
3731 tANI_U32 status; /* only valid for response message */
3732 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003733 tSirMacAddr selfMacAddr;
3734 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003735}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3736
3737//
3738// Multicast Address List Parameters
3739//
3740typedef struct sSirRcvFltMcAddrList
3741{
3742 tANI_U32 ulMulticastAddrCnt;
3743 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003744 tSirMacAddr selfMacAddr;
3745 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003746} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3747#endif // WLAN_FEATURE_PACKET_FILTERING
3748
3749//
3750// Generic version information
3751//
3752typedef struct
3753{
3754 tANI_U8 revision;
3755 tANI_U8 version;
3756 tANI_U8 minor;
3757 tANI_U8 major;
3758} tSirVersionType;
3759
3760typedef struct sAniBtAmpLogLinkReq
3761{
3762 // Common for all types are requests
3763 tANI_U16 msgType; // message type is same as the request type
3764 tANI_U16 msgLen; // length of the entire request
3765 tANI_U8 sessionId; //sme Session Id
3766 void *btampHandle; //AMP context
3767
3768} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
3769
3770#ifdef WLAN_FEATURE_GTK_OFFLOAD
3771/*---------------------------------------------------------------------------
3772* WDA_GTK_OFFLOAD_REQ
3773*--------------------------------------------------------------------------*/
3774typedef struct
3775{
3776 tANI_U32 ulFlags; /* optional flags */
3777 tANI_U8 aKCK[16]; /* Key confirmation key */
3778 tANI_U8 aKEK[16]; /* key encryption key */
3779 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003780 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003781} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3782
3783/*---------------------------------------------------------------------------
3784* WDA_GTK_OFFLOAD_GETINFO_REQ
3785*--------------------------------------------------------------------------*/
3786typedef struct
3787{
3788 tANI_U16 mesgType;
3789 tANI_U16 mesgLen;
3790
3791 tANI_U32 ulStatus; /* success or failure */
3792 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
3793 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
3794 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
3795 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003796 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003797} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
3798#endif // WLAN_FEATURE_GTK_OFFLOAD
3799
3800#ifdef WLAN_WAKEUP_EVENTS
3801/*---------------------------------------------------------------------------
3802 tSirWakeReasonInd
3803---------------------------------------------------------------------------*/
3804typedef struct
3805{
3806 tANI_U16 mesgType;
3807 tANI_U16 mesgLen;
3808 tANI_U32 ulReason; /* see tWakeReasonType */
3809 tANI_U32 ulReasonArg; /* argument specific to the reason type */
3810 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
3811 HAL truncates the data (i.e. data packets) this length
3812 will be less than the actual length */
3813 tANI_U32 ulActualDataLen; /* actual length of data */
3814 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
3815 see specific wake type */
3816} tSirWakeReasonInd, *tpSirWakeReasonInd;
3817#endif // WLAN_WAKEUP_EVENTS
3818
3819/*---------------------------------------------------------------------------
3820 sAniSetTmLevelReq
3821---------------------------------------------------------------------------*/
3822typedef struct sAniSetTmLevelReq
3823{
3824 tANI_U16 tmMode;
3825 tANI_U16 newTmLevel;
3826} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
3827
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003828#ifdef FEATURE_WLAN_TDLS
3829/* TDLS Request struct SME-->PE */
3830typedef struct sSirTdlsSendMgmtReq
3831{
3832 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3833 tANI_U16 length;
3834 tANI_U8 sessionId; // Session ID
3835 tANI_U16 transactionId; // Transaction ID for cmd
3836 tANI_U8 reqType;
3837 tANI_U8 dialog;
3838 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08003839 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003840 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
3841 tSirMacAddr peerMac;
3842 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
3843} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003844
3845typedef enum TdlsAddOper
3846{
3847 TDLS_OPER_NONE,
3848 TDLS_OPER_ADD,
3849 TDLS_OPER_UPDATE
3850} eTdlsAddOper;
3851
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003852/* TDLS Request struct SME-->PE */
3853typedef struct sSirTdlsAddStaReq
3854{
3855 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3856 tANI_U16 length;
3857 tANI_U8 sessionId; // Session ID
3858 tANI_U16 transactionId; // Transaction ID for cmd
3859 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003860 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003861 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003862 tANI_U16 capability;
3863 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
3864 tANI_U8 supported_rates_length;
3865 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07003866 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003867 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07003868 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003869 tSirVHTCap vhtCap;
3870 tANI_U8 uapsd_queues;
3871 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003872} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003873
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003874/* TDLS Response struct PE-->SME */
3875typedef struct sSirTdlsAddStaRsp
3876{
3877 tANI_U16 messageType;
3878 tANI_U16 length;
3879 tSirResultCodes statusCode;
3880 tSirMacAddr peerMac;
3881 tANI_U8 sessionId; // Session ID
3882 tANI_U16 staId ;
3883 tANI_U16 staType ;
3884 tANI_U8 ucastSig;
3885 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003886 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003887} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303888
3889/* TDLS Request struct SME-->PE */
3890typedef struct
3891{
3892 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
3893 tANI_U16 length;
3894 tANI_U8 sessionId; // Session ID
3895 tANI_U16 transactionId; // Transaction ID for cmd
3896 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
3897 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
3898 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
3899 tANI_U8 isResponder; // Is Peer a responder.
3900 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
3901 tSirMacAddr peerMac;
3902}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
3903
3904/* TDLS Request struct SME-->PE */
3905typedef struct
3906{
3907 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
3908 tANI_U16 length;
3909 tANI_U8 sessionId; // Session ID
3910 tANI_U16 transactionId; // Transaction ID for cmd
3911 tSirResultCodes statusCode;
3912 tSirMacAddr peerMac;
3913}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
3914
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003915/* TDLS Request struct SME-->PE */
3916typedef struct sSirTdlsDelStaReq
3917{
3918 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3919 tANI_U16 length;
3920 tANI_U8 sessionId; // Session ID
3921 tANI_U16 transactionId; // Transaction ID for cmd
3922 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
3923 tSirMacAddr peerMac;
3924} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
3925/* TDLS Response struct PE-->SME */
3926typedef struct sSirTdlsDelStaRsp
3927{
3928 tANI_U16 messageType;
3929 tANI_U16 length;
3930 tANI_U8 sessionId; // Session ID
3931 tSirResultCodes statusCode;
3932 tSirMacAddr peerMac;
3933 tANI_U16 staId;
3934} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08003935/* TDLS Delete Indication struct PE-->SME */
3936typedef struct sSirTdlsDelStaInd
3937{
3938 tANI_U16 messageType;
3939 tANI_U16 length;
3940 tANI_U8 sessionId; // Session ID
3941 tSirMacAddr peerMac;
3942 tANI_U16 staId;
3943 tANI_U16 reasonCode;
3944} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08003945typedef struct sSirTdlsDelAllPeerInd
3946{
3947 tANI_U16 messageType;
3948 tANI_U16 length;
3949 tANI_U8 sessionId; // Session ID
3950} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkala78a6c812013-05-13 16:39:49 +05303951#ifdef FEATURE_WLAN_TDLS_OXYGEN_DISAPPEAR_AP
3952typedef struct sSirTdlsDisappearAPInd
3953{
3954 tANI_U16 messageType;
3955 tANI_U16 length;
3956 tANI_U8 sessionId; // Session ID
3957 tANI_U16 staId;
3958 tSirMacAddr staAddr;
3959} tSirTdlsDisappearAPInd, *tpSirTdlsDisappearAPInd;
3960#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -08003961typedef struct sSirMgmtTxCompletionInd
3962{
3963 tANI_U16 messageType;
3964 tANI_U16 length;
3965 tANI_U8 sessionId; // Session ID
3966 tANI_U32 txCompleteStatus;
3967} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003968#endif /* FEATURE_WLAN_TDLS */
3969
3970#ifdef FEATURE_WLAN_TDLS_INTERNAL
3971typedef enum tdlsListType
3972{
3973 TDLS_DIS_LIST,
3974 TDLS_SETUP_LIST
3975}eTdlsListType ;
3976
3977typedef enum tdlsStates
3978{
3979 TDLS_LINK_IDLE_STATE,
3980 TDLS_LINK_DIS_INIT_STATE,
3981 TDLS_LINK_DIS_RSP_WAIT_STATE,
3982 TDLS_DIS_REQ_PROCESS_STATE,
3983 TDLS_DIS_RSP_SENT_WAIT_STATE,
3984 TDLS_DIS_RSP_SENT_DONE_STATE,
3985 TDLS_LINK_DIS_DONE_STATE,
3986 TDLS_LINK_SETUP_START_STATE,
3987 TDLS_LINK_SETUP_WAIT_STATE,
3988 TDLS_LINK_SETUP_RSP_WAIT_STATE,
3989 TDLS_LINK_SETUP_DONE_STATE,
3990 TDLS_LINK_TEARDOWN_START_STATE,
3991 TDLS_LINK_TEARDOWN_DONE_STATE,
3992 TDLS_LINK_SETUP_STATE
3993}eSirTdlsStates ;
3994
3995typedef struct sSirTdlsPeerInfo
3996{
3997 tSirMacAddr peerMac;
3998 tANI_U8 sessionId;
3999 tANI_U8 dialog ;
4000 tSirMacCapabilityInfo capabilityInfo ;
4001 tSirMacRateSet tdlsPeerSuppRates ;
4002 tSirMacRateSet tdlsPeerExtRates ;
4003 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4004 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4005 tSirMacHTParametersInfo tdlsPeerHtParams ;
4006 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4007 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4008
4009 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4010 tSirMacRsnInfo tdlsPeerRsn ;
4011 tANI_U16 tdlsPeerFtIe ;
4012 tANI_U16 tdlsPeerTimeoutIntvl ;
4013 tANI_U16 tdlsPeerSuppChan ;
4014 tANI_U16 tdlsPeerSuppReguClass ;
4015 tANI_S8 tdlsPeerRssi ;
4016 tANI_U16 tdlsPeerState ;
4017 /* flags to indicate optional IE's are in */
4018 tANI_U8 ExtRatesPresent ;
4019 tANI_U8 rsnIePresent ;
4020 tANI_U8 htCapPresent ;
4021 tANI_U8 delStaNeeded ;
4022
4023} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4024
4025/* TDLS Request struct SME-->PE */
4026typedef struct sSirTdlsDiscoveryReq
4027{
4028 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4029 tANI_U16 length;
4030 tANI_U8 sessionId; // Session ID
4031 tANI_U16 transactionId; // Transaction ID for cmd
4032 tANI_U8 reqType;
4033 tANI_U8 dialog;
4034 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4035 tSirMacAddr peerMac;
4036} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4037
4038typedef struct sSirTdlsLinkSetupReq
4039{
4040 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4041 tANI_U16 length;
4042 tANI_U8 sessionId; // Session ID
4043 tANI_U16 transactionId; // Transaction ID for cmd
4044 tANI_U8 dialog;
4045 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4046 tSirMacAddr peerMac;
4047} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4048
4049typedef struct sSirTdlsTeardownReq
4050{
4051 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4052 tANI_U16 length;
4053 tANI_U8 sessionId; // Session ID
4054 tANI_U16 transactionId; // Transaction ID for cmd
4055 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4056 tSirMacAddr peerMac;
4057} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4058
4059
4060/* TDLS response struct PE-->SME */
4061typedef struct sSirTdlsDiscoveryRsp
4062{
4063 tANI_U16 messageType;
4064 tANI_U16 length;
4065 tSirResultCodes statusCode;
4066 tANI_U16 numDisSta ;
4067 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4068} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4069
4070typedef struct sSirTdlsLinkSetupRsp
4071{
4072 tANI_U16 messageType;
4073 tANI_U16 length;
4074 tSirResultCodes statusCode;
4075 tSirMacAddr peerMac;
4076} tSirTdlsLinksetupRsp ;
4077
4078typedef struct sSirTdlsLinkSetupInd
4079{
4080 tANI_U16 messageType;
4081 tANI_U16 length;
4082 tSirResultCodes statusCode;
4083 tSirMacAddr peerMac;
4084} tSirTdlsLinkSetupInd ;
4085
4086
4087typedef struct sSirTdlsTeardownRsp
4088{
4089 tANI_U16 messageType;
4090 tANI_U16 length;
4091 tSirResultCodes statusCode;
4092 tSirMacAddr peerMac;
4093} tSirTdlsTeardownRsp ;
4094
4095typedef struct sSirTdlsPeerInd
4096{
4097 tANI_U16 messageType;
4098 tANI_U16 length;
4099 tSirMacAddr peerMac;
4100 tANI_U8 sessionId; // Session ID
4101 tANI_U16 staId ;
4102 tANI_U16 staType ;
4103 tANI_U8 ucastSig;
4104 tANI_U8 bcastSig;
4105} tSirTdlsPeerInd ;
4106
4107typedef struct sSirTdlsLinkEstablishInd
4108{
4109 tANI_U16 messageType;
4110 tANI_U16 length;
4111 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4112 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4113 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4114 tANI_U8 ptiTemplateLen;
4115 tANI_U8 ptiTemplateBuf[64];
4116 tANI_U8 extCapability[8];
4117/* This will be part of PTI template when sent by PE
4118 tANI_U8 linkIdentifier[20];
4119*/
4120} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4121
4122typedef struct sSirTdlsLinkTeardownInd
4123{
4124 tANI_U16 messageType;
4125 tANI_U16 length;
4126 tANI_U16 staId;
4127} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4128
4129#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4130
Yathish9f22e662012-12-10 14:21:35 -08004131typedef struct sSirActiveModeSetBcnFilterReq
4132{
4133 tANI_U16 messageType;
4134 tANI_U16 length;
4135 tANI_U8 seesionId;
4136} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4137
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304138//Reset AP Caps Changed
4139typedef struct sSirResetAPCapsChange
4140{
4141 tANI_U16 messageType;
4142 tANI_U16 length;
4143 tSirMacAddr bssId;
4144} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004145/// Definition for Candidate found indication from FW
4146typedef struct sSirSmeCandidateFoundInd
4147{
4148 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4149 tANI_U16 length;
4150 tANI_U8 sessionId; // Session Identifier
4151} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004152
Chet Lanctot186b5732013-03-18 10:26:30 -07004153#ifdef WLAN_FEATURE_11W
4154typedef struct sSirWlanExcludeUnencryptParam
4155{
4156 tANI_BOOLEAN excludeUnencrypt;
4157 tSirMacAddr bssId;
4158}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4159#endif
4160
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004161typedef struct sAniHandoffReq
4162{
4163 // Common for all types are requests
4164 tANI_U16 msgType; // message type is same as the request type
4165 tANI_U16 msgLen; // length of the entire request
4166 tANI_U8 sessionId;
4167 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4168 tANI_U8 channel;
4169} tAniHandoffReq, *tpAniHandoffReq;
4170
Jeff Johnson295189b2012-06-20 16:38:30 -07004171#endif /* __SIR_API_H */