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