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