blob: f0b55d49fda44082a3a85c63d8313b76f527fcc8 [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;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002227} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2228
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302229typedef struct sAniDHCPStopInd
2230{
2231 tANI_U16 msgType; // message type is same as the request type
2232 tANI_U16 msgLen; // length of the entire request
2233 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2234 tSirMacAddr macAddr;
2235
2236} tAniDHCPInd, *tpAniDHCPInd;
2237
Jeff Johnson295189b2012-06-20 16:38:30 -07002238typedef struct sAniSummaryStatsInfo
2239{
2240 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2241 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2242 // station successfully transmitted after more than one retransmission attempt
2243
2244 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2245 //(with and without retries, including multi-cast, broadcast)
2246 //tANI_U32 tx_fail_cnt;
2247 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2248 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2249 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2250 //(after appropriate filter rules including multi-cast, broadcast)
2251 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2252 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2253 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2254 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2255 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2256 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2257 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2258 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2259 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2260 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2261 //to provide this.
2262#if 0
2263 //providing the following stats, in case of wrap around for tx_byte_cnt
2264 tANI_U32 tx_unicast_lower_byte_cnt;
2265 tANI_U32 tx_unicast_upper_byte_cnt;
2266 tANI_U32 tx_multicast_lower_byte_cnt;
2267 tANI_U32 tx_multicast_upper_byte_cnt;
2268 tANI_U32 tx_broadcast_lower_byte_cnt;
2269 tANI_U32 tx_broadcast_upper_byte_cnt;
2270#endif
2271
2272}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2273
2274typedef enum eTxRateInfo
2275{
2276 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2277 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2278 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2279 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002280 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2281 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2282 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2283 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002284} tTxrateinfoflags;
2285
2286typedef struct sAniGlobalClassAStatsInfo
2287{
2288 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2289 //or MMPDU frames
2290 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2291 //or MMPDU frames when a promiscuous packet filter was enabled
2292 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2293 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2294 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2295 //to a supported rate and the order shall be the same as the supporteRates parameter.
2296 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2297 //for eg: if it is 10.5dBm, the value would be 105
2298 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2299 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2300 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2301 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2302 //500 kbit/sec, for the most
2303 //recently transmitted frame
2304 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2305 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2306 //HT40 rates; short and long guard interval
2307
2308}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2309
2310
2311typedef struct sAniGlobalSecurityStats
2312{
2313 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2314 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2315 //is enabled
2316 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2317 //because of MIC failures
2318 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2319 //because of a TKIP ICV error
2320 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2321 //invalid AES-CCMP format
2322 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2323 //the AES-CCMP replay protection procedure
2324 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2325 //errors detected by the AES-CCMP decryption algorithm
2326 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2327 //not available on the 802.11 station
2328 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2329 //because of a WEP ICV error
2330 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2331 //decrypted
2332 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2333
2334}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2335
2336typedef struct sAniGlobalClassBStatsInfo
2337{
2338 tAniGlobalSecurityStats ucStats;
2339 tAniGlobalSecurityStats mcbcStats;
2340}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2341
2342typedef struct sAniGlobalClassCStatsInfo
2343{
2344 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2345 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2346 //address 1 field
2347 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2348 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2349 //primary channel
2350 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2351 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2352 //when an A-MPDU is received
2353 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2354 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2355 //decoded correctly
2356
2357}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2358
2359typedef struct sAniPerStaStatsInfo
2360{
2361 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2362 //through a received 802.11 ACK frame
2363 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2364 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2365 //is transmitted
2366
2367}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2368
2369/**********************PE Statistics end*************************/
2370
2371
2372
2373typedef struct sSirRSSIThresholds
2374{
2375#ifdef ANI_BIG_BYTE_ENDIAN
2376 tANI_S8 ucRssiThreshold1 : 8;
2377 tANI_S8 ucRssiThreshold2 : 8;
2378 tANI_S8 ucRssiThreshold3 : 8;
2379 tANI_U8 bRssiThres1PosNotify : 1;
2380 tANI_U8 bRssiThres1NegNotify : 1;
2381 tANI_U8 bRssiThres2PosNotify : 1;
2382 tANI_U8 bRssiThres2NegNotify : 1;
2383 tANI_U8 bRssiThres3PosNotify : 1;
2384 tANI_U8 bRssiThres3NegNotify : 1;
2385 tANI_U8 bReserved10 : 2;
2386#else
2387 tANI_U8 bReserved10 : 2;
2388 tANI_U8 bRssiThres3NegNotify : 1;
2389 tANI_U8 bRssiThres3PosNotify : 1;
2390 tANI_U8 bRssiThres2NegNotify : 1;
2391 tANI_U8 bRssiThres2PosNotify : 1;
2392 tANI_U8 bRssiThres1NegNotify : 1;
2393 tANI_U8 bRssiThres1PosNotify : 1;
2394 tANI_S8 ucRssiThreshold3 : 8;
2395 tANI_S8 ucRssiThreshold2 : 8;
2396 tANI_S8 ucRssiThreshold1 : 8;
2397#endif
2398
2399}tSirRSSIThresholds, *tpSirRSSIThresholds;
2400
2401typedef struct sSirRSSINotification
2402{
2403#ifdef ANI_BIG_BYTE_ENDIAN
2404 tANI_U32 bRssiThres1PosCross : 1;
2405 tANI_U32 bRssiThres1NegCross : 1;
2406 tANI_U32 bRssiThres2PosCross : 1;
2407 tANI_U32 bRssiThres2NegCross : 1;
2408 tANI_U32 bRssiThres3PosCross : 1;
2409 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002410 v_S7_t avgRssi : 8;
2411 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002412#else
Srinivasdaaec712012-12-12 15:59:44 -08002413 tANI_U32 bReserved : 18;
2414 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002415 tANI_U32 bRssiThres3NegCross : 1;
2416 tANI_U32 bRssiThres3PosCross : 1;
2417 tANI_U32 bRssiThres2NegCross : 1;
2418 tANI_U32 bRssiThres2PosCross : 1;
2419 tANI_U32 bRssiThres1NegCross : 1;
2420 tANI_U32 bRssiThres1PosCross : 1;
2421#endif
2422
2423}tSirRSSINotification, *tpSirRSSINotification;
2424
Viral Modid86bde22012-12-10 13:09:21 -08002425
2426typedef struct sSirP2PNoaStart
2427{
2428 tANI_U32 status;
2429 tANI_U32 bssIdx;
2430} tSirP2PNoaStart, *tpSirP2PNoaStart;
2431
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302432typedef struct sSirTdlsInd
2433{
2434 tANI_U16 status;
2435 tANI_U16 assocId;
2436 tANI_U16 staIdx;
2437 tANI_U16 reasonCode;
2438} tSirTdlsInd, *tpSirTdlsInd;
2439
Jeff Johnson295189b2012-06-20 16:38:30 -07002440typedef struct sSirP2PNoaAttr
2441{
2442#ifdef ANI_BIG_BYTE_ENDIAN
2443 tANI_U32 index :8;
2444 tANI_U32 oppPsFlag :1;
2445 tANI_U32 ctWin :7;
2446 tANI_U32 rsvd1: 16;
2447#else
2448 tANI_U32 rsvd1: 16;
2449 tANI_U32 ctWin :7;
2450 tANI_U32 oppPsFlag :1;
2451 tANI_U32 index :8;
2452#endif
2453
2454#ifdef ANI_BIG_BYTE_ENDIAN
2455 tANI_U32 uNoa1IntervalCnt:8;
2456 tANI_U32 rsvd2:24;
2457#else
2458 tANI_U32 rsvd2:24;
2459 tANI_U32 uNoa1IntervalCnt:8;
2460#endif
2461 tANI_U32 uNoa1Duration;
2462 tANI_U32 uNoa1Interval;
2463 tANI_U32 uNoa1StartTime;
2464
2465#ifdef ANI_BIG_BYTE_ENDIAN
2466 tANI_U32 uNoa2IntervalCnt:8;
2467 tANI_U32 rsvd3:24;
2468#else
2469 tANI_U32 rsvd3:24;
2470 tANI_U32 uNoa2IntervalCnt:8;
2471#endif
2472 tANI_U32 uNoa2Duration;
2473 tANI_U32 uNoa2Interval;
2474 tANI_U32 uNoa2StartTime;
2475} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002476
2477typedef __ani_attr_pre_packed struct sSirTclasInfo
2478{
2479 tSirMacTclasIE tclas;
2480 tANI_U8 version; // applies only for classifier type ip
2481 __ani_attr_pre_packed union {
2482 tSirMacTclasParamEthernet eth;
2483 tSirMacTclasParamIPv4 ipv4;
2484 tSirMacTclasParamIPv6 ipv6;
2485 tSirMacTclasParam8021dq t8021dq;
2486 }__ani_attr_packed tclasParams;
2487} __ani_attr_packed tSirTclasInfo;
2488
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002489
2490#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
2491#define TSRS_11AG_RATE_6MBPS 0xC
2492#define TSRS_11B_RATE_5_5MBPS 0xB
2493
2494typedef struct sSirMacCCXTSRSIE
2495{
2496 tANI_U8 tsid;
2497 tANI_U8 rates[8];
2498} tSirMacCCXTSRSIE;
2499
2500typedef struct sSirMacCCXTSMIE
2501{
2502 tANI_U8 tsid;
2503 tANI_U8 state;
2504 tANI_U16 msmt_interval;
2505} tSirMacCCXTSMIE;
2506
2507typedef struct sTSMStats
2508{
2509 tANI_U8 tid;
2510 tSirMacAddr bssId;
2511 tTrafStrmMetrics tsmMetrics;
2512} tTSMStats, *tpTSMStats;
2513
2514typedef struct sCcxTSMContext
2515{
2516 tANI_U8 tid;
2517 tSirMacCCXTSMIE tsmInfo;
2518 tTrafStrmMetrics tsmMetrics;
2519} tCcxTSMContext, *tpCcxTSMContext;
2520
2521typedef struct sCcxPEContext
2522{
2523#if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD)
2524 tCcxMeasReq curMeasReq;
2525#endif
2526 tCcxTSMContext tsm;
2527} tCcxPEContext, *tpCcxPEContext;
2528
2529
2530#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
2531
2532
Jeff Johnson295189b2012-06-20 16:38:30 -07002533typedef struct sSirAddtsReqInfo
2534{
2535 tANI_U8 dialogToken;
2536 tSirMacTspecIE tspec;
2537
2538 tANI_U8 numTclas; // number of Tclas elements
2539 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2540 tANI_U8 tclasProc;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002541#if defined(FEATURE_WLAN_CCX)
Jeff Johnson295189b2012-06-20 16:38:30 -07002542 tSirMacCCXTSRSIE tsrsIE;
2543 tANI_U8 tsrsPresent:1;
2544#endif
2545 tANI_U8 wmeTspecPresent:1;
2546 tANI_U8 wsmTspecPresent:1;
2547 tANI_U8 lleTspecPresent:1;
2548 tANI_U8 tclasProcPresent:1;
2549} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2550
2551typedef struct sSirAddtsRspInfo
2552{
2553 tANI_U8 dialogToken;
2554 tSirMacStatusCodes status;
2555 tSirMacTsDelayIE delay;
2556
2557 tSirMacTspecIE tspec;
2558 tANI_U8 numTclas; // number of Tclas elements
2559 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2560 tANI_U8 tclasProc;
2561 tSirMacScheduleIE schedule;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002562#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -07002563 tSirMacCCXTSMIE tsmIE;
2564 tANI_U8 tsmPresent:1;
2565#endif
2566 tANI_U8 wmeTspecPresent:1;
2567 tANI_U8 wsmTspecPresent:1;
2568 tANI_U8 lleTspecPresent:1;
2569 tANI_U8 tclasProcPresent:1;
2570 tANI_U8 schedulePresent:1;
2571} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2572
2573typedef struct sSirDeltsReqInfo
2574{
2575 tSirMacTSInfo tsinfo;
2576 tSirMacTspecIE tspec;
2577 tANI_U8 wmeTspecPresent:1;
2578 tANI_U8 wsmTspecPresent:1;
2579 tANI_U8 lleTspecPresent:1;
2580} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2581
2582/// Add a tspec as defined
2583typedef struct sSirAddtsReq
2584{
2585 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2586 tANI_U16 length;
2587 tANI_U8 sessionId; //Session ID
2588 tANI_U16 transactionId;
2589 tSirMacAddr bssId; //BSSID
2590 tANI_U32 timeout; // in ms
2591 tANI_U8 rspReqd;
2592 tSirAddtsReqInfo req;
2593} tSirAddtsReq, *tpSirAddtsReq;
2594
2595typedef struct sSirAddtsRsp
2596{
2597 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2598 tANI_U16 length;
2599 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2600 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2601 tANI_U32 rc; // return code
2602 tSirAddtsRspInfo rsp;
2603} tSirAddtsRsp, *tpSirAddtsRsp;
2604
2605typedef struct sSirDeltsReq
2606{
2607 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2608 tANI_U16 length;
2609 tANI_U8 sessionId;//Session ID
2610 tANI_U16 transactionId;
2611 tSirMacAddr bssId; //BSSID
2612 tANI_U16 aid; // use 0 if macAddr is being specified
2613 tANI_U8 macAddr[6]; // only on AP to specify the STA
2614 tANI_U8 rspReqd;
2615 tSirDeltsReqInfo req;
2616} tSirDeltsReq, *tpSirDeltsReq;
2617
2618typedef struct sSirDeltsRsp
2619{
2620 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2621 tANI_U16 length;
2622 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2623 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2624 tANI_U32 rc;
2625 tANI_U16 aid; // use 0 if macAddr is being specified
2626 tANI_U8 macAddr[6]; // only on AP to specify the STA
2627 tSirDeltsReqInfo rsp;
2628} tSirDeltsRsp, *tpSirDeltsRsp;
2629
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002630#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002631
2632#define SIR_QOS_NUM_TSPEC_MAX 2
2633#define SIR_QOS_NUM_AC_MAX 4
2634
2635typedef struct sSirAggrQosReqInfo
2636{
2637 tANI_U16 tspecIdx;
2638 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2639}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2640
2641typedef struct sSirAggrQosReq
2642{
2643 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2644 tANI_U16 length;
2645 tANI_U8 sessionId; //Session ID
2646 tANI_U16 transactionId;
2647 tSirMacAddr bssId; //BSSID
2648 tANI_U32 timeout; // in ms
2649 tANI_U8 rspReqd;
2650 tSirAggrQosReqInfo aggrInfo;
2651}tSirAggrQosReq, *tpSirAggrQosReq;
2652
2653typedef struct sSirAggrQosRspInfo
2654{
2655 tANI_U16 tspecIdx;
2656 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2657} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2658
2659typedef struct sSirAggrQosRsp
2660{
2661 tANI_U16 messageType;
2662 tANI_U16 length;
2663 tANI_U8 sessionId;
2664 tSirAggrQosRspInfo aggrInfo;
2665} tSirAggrQosRsp, *tpSirAggrQosRsp;
2666
2667#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_CCX*/
2668
2669typedef struct sSirSetTxPowerReq
2670{
schang86c22c42013-03-13 18:41:24 -07002671 tANI_U16 messageType;
2672 tANI_U16 length;
2673 tSirMacAddr bssId;
2674 tANI_U8 mwPower;
2675 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002676} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2677
2678typedef struct sSirSetTxPowerRsp
2679{
2680 tANI_U16 messageType;
2681 tANI_U16 length;
2682 tANI_U32 status;
2683} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2684
2685typedef struct sSirGetTxPowerReq
2686{
2687 tANI_U16 messageType;
2688 tANI_U16 length;
2689 tANI_U16 staid;
2690} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2691
2692typedef struct sSirGetTxPowerRsp
2693{
2694 tANI_U16 messageType;
2695 tANI_U16 length; // length of the entire request
2696 tANI_U32 power; // units of milliwatts
2697 tANI_U32 status;
2698} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2699
2700
2701typedef tANI_U32 tSirMacNoise[3];
2702
2703typedef struct sSirGetNoiseRsp
2704{
2705 tANI_U16 messageType;
2706 tANI_U16 length;
2707 tSirMacNoise noise;
2708} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2709
2710
2711//
2712// PMC --> PE --> HAL
2713// Power save configuration parameters
2714//
2715typedef struct sSirPowerSaveCfg
2716{
2717 tANI_U16 listenInterval;
2718
2719 /* Number of consecutive missed beacons before
2720 * hardware generates an interrupt to wake up
2721 * the host. In units of listen interval.
2722 */
2723 tANI_U32 HeartBeatCount;
2724
2725 /* specifies which beacons are to be forwarded
2726 * to host when beacon filtering is enabled.
2727 * In units of listen interval.
2728 */
2729 tANI_U32 nthBeaconFilter;
2730
2731 /* Maximum number of PS-Poll send before
2732 * firmware sends data null with PM set to 0.
2733 */
2734 tANI_U32 maxPsPoll;
2735
2736 /* If the average RSSI value falls below the
2737 * minRssiThreshold, then FW will send an
2738 * interrupt to wake up the host.
2739 */
2740 tANI_U32 minRssiThreshold;
2741
2742 /* Number of beacons for which firmware will
2743 * collect the RSSI values and compute the average.
2744 */
2745 tANI_U8 numBeaconPerRssiAverage;
2746
2747 /* FW collects the RSSI stats for this period
2748 * in BMPS mode.
2749 */
2750 tANI_U8 rssiFilterPeriod;
2751
2752 // Enabling/disabling broadcast frame filter feature
2753 tANI_U8 broadcastFrameFilter;
2754
2755 // Enabling/disabling the ignore DTIM feature
2756 tANI_U8 ignoreDtim;
2757
2758 /* The following configuration parameters are kept
2759 * in order to be backward compatible for Gen5.
2760 * These will NOT be used for Gen6 Libra chip
2761 */
2762 tBeaconForwarding beaconFwd;
2763 tANI_U16 nthBeaconFwd;
2764 tANI_U8 fEnablePwrSaveImmediately;
2765 tANI_U8 fPSPoll;
2766
2767 // Enabling/disabling Beacon Early Termination feature
2768 tANI_U8 fEnableBeaconEarlyTermination;
2769 tANI_U8 bcnEarlyTermWakeInterval;
2770
2771}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2772
2773/* Reason code for requesting Full Power. This reason code is used by
2774 any module requesting full power from PMC and also by PE when it
2775 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2776typedef enum eRequestFullPowerReason
2777{
2778 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2779 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2780 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2781 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2782 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2783 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2784 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2785 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2786 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2787 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002788#ifdef FEATURE_WLAN_TDLS
2789 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2790#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002791 eSME_REASON_OTHER /* No specific reason. General reason code */
2792} tRequestFullPowerReason, tExitBmpsReason;
2793
2794
2795
2796//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2797typedef struct sExitBmpsInfo
2798{
2799 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2800}tExitBmpsInfo, *tpExitBmpsInfo;
2801
2802
2803// MAC SW --> SME
2804// Message indicating to SME to exit BMPS sleep mode
2805typedef struct sSirSmeExitBmpsInd
2806{
2807 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2808 tANI_U16 mesgLen;
2809 tSirResultCodes statusCode;
2810 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2811
2812} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2813
2814
2815//
2816// HDD -> LIM
2817// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2818// tSirMsgQ.reserved = 0
2819// tSirMsgQ.body = instance of tDelBAParams
2820//
2821typedef struct sSmeDelBAPeerInd
2822{
2823 // Message Type
2824 tANI_U16 mesgType;
2825
2826 tSirMacAddr bssId;//BSSID
2827
2828 // Message Length
2829 tANI_U16 mesgLen;
2830
2831 // Station Index
2832 tANI_U16 staIdx;
2833
2834 // TID for which the BA session is being deleted
2835 tANI_U8 baTID;
2836
2837 // DELBA direction
2838 // eBA_INITIATOR - Originator
2839 // eBA_RECEIPIENT - Recipient
2840 tANI_U8 baDirection;
2841} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2842
2843typedef struct sSmeIbssPeerInd
2844{
2845 tANI_U16 mesgType;
2846 tANI_U16 mesgLen;
2847 tANI_U8 sessionId;
2848
2849 tSirMacAddr peerAddr;
2850 tANI_U16 staId;
2851
2852 /*The DPU signatures will be sent eventually to TL to help it determine the
2853 association to which a packet belongs to*/
2854 /*Unicast DPU signature*/
2855 tANI_U8 ucastSig;
2856
2857 /*Broadcast DPU signature*/
2858 tANI_U8 bcastSig;
2859
2860 //Beacon will be appended for new Peer indication.
2861}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2862
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002863typedef struct sSirIbssPeerInactivityInd
2864{
2865 tANI_U8 bssIdx;
2866 tANI_U8 staIdx;
2867 tSirMacAddr peerAddr;
2868}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2869
2870
Jeff Johnson295189b2012-06-20 16:38:30 -07002871typedef struct sLimScanChn
2872{
2873 tANI_U16 numTimeScan; //how many time this channel is scan
2874 tANI_U8 channelId;
2875}tLimScanChn;
2876
2877typedef struct sSmeGetScanChnRsp
2878{
2879 // Message Type
2880 tANI_U16 mesgType;
2881 // Message Length
2882 tANI_U16 mesgLen;
2883 tANI_U8 sessionId;
2884 tANI_U8 numChn;
2885 tLimScanChn scanChn[1];
2886} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2887
2888typedef struct sLimScanChnInfo
2889{
2890 tANI_U8 numChnInfo; //number of channels in scanChn
2891 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2892}tLimScanChnInfo;
2893
Jeff Johnson295189b2012-06-20 16:38:30 -07002894typedef struct sSirSmeGetAssocSTAsReq
2895{
2896 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2897 tANI_U16 length;
2898 tSirMacAddr bssId; // BSSID
2899 tANI_U16 modId;
2900 void *pUsrContext;
2901 void *pSapEventCallback;
2902 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2903} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002904
2905typedef struct sSmeMaxAssocInd
2906{
2907 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2908 tANI_U16 mesgLen;
2909 tANI_U8 sessionId;
2910 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2911} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2912
2913/*--------------------------------------------------------------------*/
2914/* BootLoader message definition */
2915/*--------------------------------------------------------------------*/
2916
2917/*--------------------------------------------------------------------*/
2918/* FW image size */
2919/*--------------------------------------------------------------------*/
2920#define SIR_FW_IMAGE_SIZE 146332
2921
2922
2923#define SIR_BOOT_MODULE_ID 1
2924
2925#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2926#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2927#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2928#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2929#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2930#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2931#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2932
2933/*--------------------------------------------------------------------*/
2934/* Bootloader message syntax */
2935/*--------------------------------------------------------------------*/
2936
2937// Message header
2938#define SIR_BOOT_MB_HEADER 0
2939#define SIR_BOOT_MB_HEADER2 1
2940
2941#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2942#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2943
2944// BOOT_SETUP_IND parameter indices
2945#define SIR_BOOT_SETUP_IND_MBADDR 2
2946#define SIR_BOOT_SETUP_IND_MBSIZE 3
2947#define SIR_BOOT_SETUP_IND_MEMOPT 4
2948#define SIR_BOOT_SETUP_IND_LEN \
2949 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2950
2951// BOOT_POST_RESULT_IND parameter indices
2952#define SIR_BOOT_POST_RESULT_IND_RES 2
2953#define SIR_BOOT_POST_RESULT_IND_LEN \
2954 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
2955
2956#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
2957#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
2958#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
2959#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
2960
2961
2962// BOOT_DNLD_RESULT_IND parameter indices
2963#define SIR_BOOT_DNLD_RESULT_IND_RES 2
2964#define SIR_BOOT_DNLD_RESULT_IND_LEN \
2965 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
2966
2967#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
2968#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
2969#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
2970
2971// BOOT_DNLD_DEV_REQ
2972#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
2973#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
2974#define SIR_BOOT_DNLD_DEV_REQ_LEN \
2975 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
2976
2977// BOOT_DNLD_DEV_RSP
2978#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
2979#define SIR_BOOT_DNLD_DEV_RSP_LEN \
2980 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
2981
2982#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
2983#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
2984
2985// BOOT_DNLD_REQ
2986#define SIR_BOOT_DNLD_REQ_OFFSET 2
2987#define SIR_BOOT_DNLD_REQ_WRADDR 3
2988#define SIR_BOOT_DNLD_REQ_SIZE 4
2989#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
2990
2991// BOOT_DNLD_RSP
2992#define SIR_BOOT_DNLD_RSP_SIZE 2
2993#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
2994
Jeff Johnson295189b2012-06-20 16:38:30 -07002995
2996// board capabilities fields are defined here.
2997typedef __ani_attr_pre_packed struct sSirBoardCapabilities
2998{
2999#ifndef ANI_LITTLE_BIT_ENDIAN
3000 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3001 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3002 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3003 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3004 tANI_U32 rsvd1:2;
3005 // (productId derives sub-category in the following three families)
3006 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3007 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3008 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3009 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3010 tANI_U32 bbChipVer:4; // Baseband chip version
3011 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3012 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3013 tANI_U32 nReceivers:2; // 0 based.
3014 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3015 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3016 tANI_U32 rsvd:1;
3017 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3018#else
3019
3020 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3021 tANI_U32 rsvd:1;
3022 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3023 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3024 tANI_U32 nReceivers:2; // 0 based.
3025 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3026 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3027 tANI_U32 bbChipVer:4; // Baseband chip version
3028 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3029 // (productId derives sub-category in the following three families)
3030 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3031 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3032 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3033 tANI_U32 rsvd1:2;
3034 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3035 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3036 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3037 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3038#endif
3039} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3040
3041# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3042# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3043
3044# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3045# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3046
3047# define ANI_BCAP_SDRAM_MASK 0x4
3048# define ANI_BCAP_SDRAM_OFFSET 2
3049
3050# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3051# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3052
3053# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3054# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3055
3056# define ANI_BCAP_RADIO_ON_MASK 0xC0
3057# define ANI_BCAP_RADIO_ON_OFFSET 6
3058
3059# define ANI_BCAP_LO_TYPE_MASK 0x300
3060# define ANI_BCAP_LO_TYPE_OFFSET 8
3061
3062# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3063# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3064
3065# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3066# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3067
3068# define ANI_BCAP_RADIO_OFF 0
3069# define ANI_BCAP_RADIO_ON 1
3070# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3071
3072
3073/// WOW related structures
3074// SME -> PE <-> HAL
3075#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3076#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3077
3078// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3079// SME/HDD maintains the list of the BCAST wake-up patterns.
3080// This is a pass through message for PE
3081typedef struct sSirWowlAddBcastPtrn
3082{
3083 tANI_U8 ucPatternId; // Pattern ID
3084 // Pattern byte offset from beginning of the 802.11 packet to start of the
3085 // wake-up pattern
3086 tANI_U8 ucPatternByteOffset;
3087 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3088 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3089 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3090 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3091 // Extra pattern data beyond 128 bytes
3092 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3093 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003094 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003095} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3096
3097
3098// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3099// SME/HDD maintains the list of the BCAST wake-up patterns.
3100// This is a pass through message for PE
3101typedef struct sSirWowlDelBcastPtrn
3102{
3103 /* Pattern ID of the wakeup pattern to be deleted */
3104 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003105 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003106}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3107
3108
3109// SME->PE: Enter WOWLAN parameters
3110typedef struct sSirSmeWowlEnterParams
3111{
3112 /* Enables/disables magic packet filtering */
3113 tANI_U8 ucMagicPktEnable;
3114
3115 /* Magic pattern */
3116 tSirMacAddr magicPtrn;
3117
3118 /* Enables/disables packet pattern filtering */
3119 tANI_U8 ucPatternFilteringEnable;
3120
3121#ifdef WLAN_WAKEUP_EVENTS
3122 /* This configuration directs the WoW packet filtering to look for EAP-ID
3123 * requests embedded in EAPOL frames and use this as a wake source.
3124 */
3125 tANI_U8 ucWoWEAPIDRequestEnable;
3126
3127 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3128 * requests and use this as a wake source.
3129 */
3130 tANI_U8 ucWoWEAPOL4WayEnable;
3131
3132 /* This configuration allows a host wakeup on an network scan offload match.
3133 */
3134 tANI_U8 ucWowNetScanOffloadMatch;
3135
3136 /* This configuration allows a host wakeup on any GTK rekeying error.
3137 */
3138 tANI_U8 ucWowGTKRekeyError;
3139
3140 /* This configuration allows a host wakeup on BSS connection loss.
3141 */
3142 tANI_U8 ucWoWBSSConnLoss;
3143#endif // WLAN_WAKEUP_EVENTS
3144
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003145 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003146} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3147
3148
3149// PE<->HAL: Enter WOWLAN parameters
3150typedef struct sSirHalWowlEnterParams
3151{
3152 /* Enables/disables magic packet filtering */
3153 tANI_U8 ucMagicPktEnable;
3154
3155 /* Magic pattern */
3156 tSirMacAddr magicPtrn;
3157
3158 /* Enables/disables packet pattern filtering in firmware.
3159 Enabling this flag enables broadcast pattern matching
3160 in Firmware. If unicast pattern matching is also desired,
3161 ucUcastPatternFilteringEnable flag must be set tot true
3162 as well
3163 */
3164 tANI_U8 ucPatternFilteringEnable;
3165
3166 /* Enables/disables unicast packet pattern filtering.
3167 This flag specifies whether we want to do pattern match
3168 on unicast packets as well and not just broadcast packets.
3169 This flag has no effect if the ucPatternFilteringEnable
3170 (main controlling flag) is set to false
3171 */
3172 tANI_U8 ucUcastPatternFilteringEnable;
3173
3174 /* This configuration is valid only when magicPktEnable=1.
3175 * It requests hardware to wake up when it receives the
3176 * Channel Switch Action Frame.
3177 */
3178 tANI_U8 ucWowChnlSwitchRcv;
3179
3180 /* This configuration is valid only when magicPktEnable=1.
3181 * It requests hardware to wake up when it receives the
3182 * Deauthentication Frame.
3183 */
3184 tANI_U8 ucWowDeauthRcv;
3185
3186 /* This configuration is valid only when magicPktEnable=1.
3187 * It requests hardware to wake up when it receives the
3188 * Disassociation Frame.
3189 */
3190 tANI_U8 ucWowDisassocRcv;
3191
3192 /* This configuration is valid only when magicPktEnable=1.
3193 * It requests hardware to wake up when it has missed
3194 * consecutive beacons. This is a hardware register
3195 * configuration (NOT a firmware configuration).
3196 */
3197 tANI_U8 ucWowMaxMissedBeacons;
3198
3199 /* This configuration is valid only when magicPktEnable=1.
3200 * This is a timeout value in units of microsec. It requests
3201 * hardware to unconditionally wake up after it has stayed
3202 * in WoWLAN mode for some time. Set 0 to disable this feature.
3203 */
3204 tANI_U8 ucWowMaxSleepUsec;
3205
3206#ifdef WLAN_WAKEUP_EVENTS
3207 /* This configuration directs the WoW packet filtering to look for EAP-ID
3208 * requests embedded in EAPOL frames and use this as a wake source.
3209 */
3210 tANI_U8 ucWoWEAPIDRequestEnable;
3211
3212 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3213 * requests and use this as a wake source.
3214 */
3215 tANI_U8 ucWoWEAPOL4WayEnable;
3216
3217 /* This configuration allows a host wakeup on an network scan offload match.
3218 */
3219 tANI_U8 ucWowNetScanOffloadMatch;
3220
3221 /* This configuration allows a host wakeup on any GTK rekeying error.
3222 */
3223 tANI_U8 ucWowGTKRekeyError;
3224
3225 /* This configuration allows a host wakeup on BSS connection loss.
3226 */
3227 tANI_U8 ucWoWBSSConnLoss;
3228#endif // WLAN_WAKEUP_EVENTS
3229
3230 /* Status code to be filled by HAL when it sends
3231 * SIR_HAL_WOWL_ENTER_RSP to PE.
3232 */
3233 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003234
3235 /*BSSID to find the current session
3236 */
3237 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003238} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3239
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003240// PE<->HAL: Exit WOWLAN parameters
3241typedef struct sSirHalWowlExitParams
3242{
3243 /* Status code to be filled by HAL when it sends
3244 * SIR_HAL_WOWL_EXIT_RSP to PE.
3245 */
3246 eHalStatus status;
3247
3248 /*BSSIDX to find the current session
3249 */
3250 tANI_U8 bssIdx;
3251} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3252
Jeff Johnson295189b2012-06-20 16:38:30 -07003253
3254#define SIR_MAX_NAME_SIZE 64
3255#define SIR_MAX_TEXT_SIZE 32
3256
3257typedef struct sSirName {
3258 v_U8_t num_name;
3259 v_U8_t name[SIR_MAX_NAME_SIZE];
3260} tSirName;
3261
3262typedef struct sSirText {
3263 v_U8_t num_text;
3264 v_U8_t text[SIR_MAX_TEXT_SIZE];
3265} tSirText;
3266
3267
3268#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3269#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3270#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3271#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3272#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3273#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3274#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3275#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3276#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3277#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3278#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3279#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3280#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3281#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3282#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3283#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3284
3285
3286typedef struct sSirWPSProbeRspIE {
3287 v_U32_t FieldPresent;
3288 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3289 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3290 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3291 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3292 v_U16_t DevicePasswordID; // Device Password ID
3293 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3294 v_U8_t ResponseType; // Response type
3295 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3296 tSirName Manufacture;
3297 tSirText ModelName;
3298 tSirText ModelNumber;
3299 tSirText SerialNumber;
3300 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3301 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3302 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3303 tSirText DeviceName;
3304 v_U16_t ConfigMethod; // Configuaration method
3305 v_U8_t RFBand; // RF bands available on the AP
3306} tSirWPSProbeRspIE;
3307
3308#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3309#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3310#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3311#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3312#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3313#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3314#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3315#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3316
3317typedef struct sSirWPSBeaconIE {
3318 v_U32_t FieldPresent;
3319 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3320 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3321 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3322 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3323 v_U16_t DevicePasswordID; // Device Password ID
3324 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3325 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3326 v_U8_t RFBand; // RF bands available on the AP
3327} tSirWPSBeaconIE;
3328
3329#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3330#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3331
3332typedef struct sSirWPSAssocRspIE {
3333 v_U32_t FieldPresent;
3334 v_U32_t Version;
3335 v_U8_t ResposeType;
3336} tSirWPSAssocRspIE;
3337
3338typedef struct sSirAPWPSIEs {
3339 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3340 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3341 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3342} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3343
3344typedef struct sSirUpdateAPWPSIEsReq
3345{
3346 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3347 tANI_U16 length;
3348 tANI_U16 transactionId; //Transaction ID for cmd
3349 tSirMacAddr bssId; // BSSID
3350 tANI_U8 sessionId; //Session ID
3351 tSirAPWPSIEs APWPSIEs;
3352} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3353
3354typedef struct sSirUpdateParams
3355{
3356 tANI_U16 messageType;
3357 tANI_U16 length;
3358 tANI_U8 sessionId; // Session ID
3359 tANI_U8 ssidHidden; // Hide SSID
3360} tSirUpdateParams, *tpSirUpdateParams;
3361
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003362//Beacon Interval
3363typedef struct sSirChangeBIParams
3364{
3365 tANI_U16 messageType;
3366 tANI_U16 length;
3367 tANI_U16 beaconInterval; // Beacon Interval
3368 tSirMacAddr bssId;
3369 tANI_U8 sessionId; // Session ID
3370} tSirChangeBIParams, *tpSirChangeBIParams;
3371
Jeff Johnson295189b2012-06-20 16:38:30 -07003372#define SIR_WPS_UUID_LEN 16
3373#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3374
3375typedef struct sSirWPSPBCSession {
3376 struct sSirWPSPBCSession *next;
3377 tSirMacAddr addr;
3378 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3379 tANI_TIMESTAMP timestamp;
3380} tSirWPSPBCSession;
3381
3382typedef struct sSirSmeGetWPSPBCSessionsReq
3383{
3384 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3385 tANI_U16 length;
3386 void *pUsrContext;
3387 void *pSapEventCallback;
3388 tSirMacAddr bssId; // BSSID
3389 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3390} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3391
3392typedef struct sSirWPSPBCProbeReq
3393{
3394 tSirMacAddr peerMacAddr;
3395 tANI_U16 probeReqIELen;
3396 tANI_U8 probeReqIE[512];
3397} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3398
3399// probereq from peer, when wsc is enabled
3400typedef struct sSirSmeProbeReqInd
3401{
3402 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3403 tANI_U16 length;
3404 tANI_U8 sessionId;
3405 tSirMacAddr bssId;
3406 tSirWPSPBCProbeReq WPSPBCProbeReq;
3407} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3408
3409typedef struct sSirUpdateAPWPARSNIEsReq
3410{
3411 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3412 tANI_U16 length;
3413 tANI_U16 transactionId; //Transaction ID for cmd
3414 tSirMacAddr bssId; // BSSID
3415 tANI_U8 sessionId; //Session ID
3416 tSirRSNie APWPARSNIEs;
3417} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3418
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003419#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3420#define SIR_ROAM_MAX_CHANNELS NUM_RF_CHANNELS
3421#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3422#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3423#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3424#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3425#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3426#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3427#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
3428#define SIR_ROAM_SCAN_RESERVED_BYTES 61
3429#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003430
3431// SME -> HAL - This is the host offload request.
3432#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3433#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3434#define SIR_IPV6_NS_OFFLOAD 2
3435#define SIR_OFFLOAD_DISABLE 0
3436#define SIR_OFFLOAD_ENABLE 1
3437#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303438#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003439#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303440#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003441
3442#ifdef WLAN_NS_OFFLOAD
3443typedef struct sSirNsOffloadReq
3444{
3445 tANI_U8 srcIPv6Addr[16];
3446 tANI_U8 selfIPv6Addr[16];
3447 //Only support 2 possible Network Advertisement IPv6 address
3448 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3449 tANI_U8 selfMacAddr[6];
3450 tANI_U8 srcIPv6AddrValid;
3451 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303452 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003453} tSirNsOffloadReq, *tpSirNsOffloadReq;
3454#endif //WLAN_NS_OFFLOAD
3455
3456typedef struct sSirHostOffloadReq
3457{
3458 tANI_U8 offloadType;
3459 tANI_U8 enableOrDisable;
3460 union
3461 {
3462 tANI_U8 hostIpv4Addr [4];
3463 tANI_U8 hostIpv6Addr [16];
3464 } params;
3465#ifdef WLAN_NS_OFFLOAD
3466 tSirNsOffloadReq nsOffloadInfo;
3467#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003468 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003469} tSirHostOffloadReq, *tpSirHostOffloadReq;
3470
3471/* Packet Types. */
3472#define SIR_KEEP_ALIVE_NULL_PKT 1
3473#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3474
3475/* Enable or disable offload. */
3476#define SIR_KEEP_ALIVE_DISABLE 0
3477#define SIR_KEEP_ALIVE_ENABLE 1
3478
3479/* Keep Alive request. */
3480typedef struct sSirKeepAliveReq
3481{
3482 v_U8_t packetType;
3483 v_U32_t timePeriod;
3484 tSirIpv4Addr hostIpv4Addr;
3485 tSirIpv4Addr destIpv4Addr;
3486 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003487 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003488} tSirKeepAliveReq, *tpSirKeepAliveReq;
3489
3490typedef struct sSirSmeAddStaSelfReq
3491{
3492 tANI_U16 mesgType;
3493 tANI_U16 mesgLen;
3494 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003495 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003496}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3497
3498typedef struct sSirSmeDelStaSelfReq
3499{
3500 tANI_U16 mesgType;
3501 tANI_U16 mesgLen;
3502 tSirMacAddr selfMacAddr;
3503}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3504
3505typedef struct sSirSmeAddStaSelfRsp
3506{
3507 tANI_U16 mesgType;
3508 tANI_U16 mesgLen;
3509 tANI_U16 status;
3510 tSirMacAddr selfMacAddr;
3511}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3512
3513typedef struct sSirSmeDelStaSelfRsp
3514{
3515 tANI_U16 mesgType;
3516 tANI_U16 mesgLen;
3517 tANI_U16 status;
3518 tSirMacAddr selfMacAddr;
3519}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3520
3521/* Coex Indication defines -
3522 should match WLAN_COEX_IND_DATA_SIZE
3523 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3524 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3525#define SIR_COEX_IND_DATA_SIZE (4)
3526#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3527#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003528#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3529#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003530#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3531#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003532
3533typedef struct sSirSmeCoexInd
3534{
3535 tANI_U16 mesgType;
3536 tANI_U16 mesgLen;
3537 tANI_U32 coexIndType;
3538 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3539}tSirSmeCoexInd, *tpSirSmeCoexInd;
3540
Jeff Johnson295189b2012-06-20 16:38:30 -07003541typedef struct sSirSmeMgmtFrameInd
3542{
3543 tANI_U16 mesgType;
3544 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303545 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003546 tANI_U8 sessionId;
3547 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303548 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003549 tANI_U8 frameBuf[1]; //variable
3550}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003551
Chet Lanctot186b5732013-03-18 10:26:30 -07003552#ifdef WLAN_FEATURE_11W
3553typedef struct sSirSmeUnprotMgmtFrameInd
3554{
3555 tANI_U8 sessionId;
3556 tANI_U8 frameType;
3557 tANI_U8 frameLen;
3558 tANI_U8 frameBuf[1]; //variable
3559}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3560#endif
3561
Jeff Johnson295189b2012-06-20 16:38:30 -07003562#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3563 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3564 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3565 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3566#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3567 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3568
3569/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003570typedef struct sSirNoAParam
3571{
3572 tANI_U8 ctWindow:7;
3573 tANI_U8 OppPS:1;
3574 tANI_U8 count;
3575 tANI_U32 duration;
3576 tANI_U32 interval;
3577 tANI_U32 singleNoADuration;
3578 tANI_U8 psSelection;
3579}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003580
Jeff Johnson295189b2012-06-20 16:38:30 -07003581typedef struct sSirWlanSuspendParam
3582{
3583 tANI_U8 configuredMcstBcstFilterSetting;
3584}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3585
3586typedef struct sSirWlanResumeParam
3587{
3588 tANI_U8 configuredMcstBcstFilterSetting;
3589}tSirWlanResumeParam,*tpSirWlanResumeParam;
3590
3591typedef struct sSirWlanSetRxpFilters
3592{
3593 tANI_U8 configuredMcstBcstFilterSetting;
3594 tANI_U8 setMcstBcstFilter;
3595}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003596
3597
3598#ifdef FEATURE_WLAN_SCAN_PNO
3599//
3600// PNO Messages
3601//
3602
3603// Set PNO
3604#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303605#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003606#define SIR_PNO_MAX_SUPP_NETWORKS 16
3607#define SIR_PNO_MAX_SCAN_TIMERS 10
3608
3609/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3610#define SIR_PNO_MAX_PB_REQ_SIZE 450
3611
3612#define SIR_PNO_24G_DEFAULT_CH 1
3613#define SIR_PNO_5G_DEFAULT_CH 36
3614
3615typedef enum
3616{
3617 SIR_PNO_MODE_IMMEDIATE,
3618 SIR_PNO_MODE_ON_SUSPEND,
3619 SIR_PNO_MODE_ON_RESUME,
3620 SIR_PNO_MODE_MAX
3621} eSirPNOMode;
3622
3623typedef struct
3624{
3625 tSirMacSSid ssId;
3626 tANI_U32 authentication;
3627 tANI_U32 encryption;
3628 tANI_U32 bcastNetwType;
3629 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303630 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003631 tANI_U8 rssiThreshold;
3632} tSirNetworkType;
3633
3634typedef struct
3635{
3636 tANI_U32 uTimerValue;
3637 tANI_U32 uTimerRepeat;
3638}tSirScanTimer;
3639
3640typedef struct
3641{
3642 tANI_U8 ucScanTimersCount;
3643 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3644} tSirScanTimersType;
3645
3646typedef struct sSirPNOScanReq
3647{
3648 tANI_U8 enable;
3649 eSirPNOMode modePNO;
3650 tANI_U8 ucNetworksCount;
3651 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3652 tSirScanTimersType scanTimers;
3653
3654 /*added by SME*/
3655 tANI_U16 us24GProbeTemplateLen;
3656 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3657 tANI_U16 us5GProbeTemplateLen;
3658 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3659} tSirPNOScanReq, *tpSirPNOScanReq;
3660
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003661typedef struct sSirSetRSSIFilterReq
3662{
3663 tANI_U8 rssiThreshold;
3664} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3665
3666
3667// Update Scan Params
3668typedef struct {
3669 tANI_U8 b11dEnabled;
3670 tANI_U8 b11dResolved;
3671 tANI_U8 ucChannelCount;
3672 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3673 tANI_U16 usPassiveMinChTime;
3674 tANI_U16 usPassiveMaxChTime;
3675 tANI_U16 usActiveMinChTime;
3676 tANI_U16 usActiveMaxChTime;
3677 tANI_U8 ucCBState;
3678} tSirUpdateScanParams, * tpSirUpdateScanParams;
3679
3680// Preferred Network Found Indication
3681typedef struct
3682{
3683 tANI_U16 mesgType;
3684 tANI_U16 mesgLen;
3685 /* Network that was found with the highest RSSI*/
3686 tSirMacSSid ssId;
3687 /* Indicates the RSSI */
3688 tANI_U8 rssi;
3689 /* Length of the beacon or probe response
3690 * corresponding to the candidate found by PNO */
3691 tANI_U32 frameLength;
3692 /* Index to memory location where the contents of
3693 * beacon or probe response frame will be copied */
3694 tANI_U8 data[1];
3695} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3696#endif //FEATURE_WLAN_SCAN_PNO
3697
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003698#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3699typedef struct
3700{
3701 tSirMacSSid ssId;
3702 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3703 tANI_U32 authentication;
3704 tANI_U8 encryption;
3705 tANI_U8 mcencryption;
3706 tANI_U8 ChannelCount;
3707 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3708
3709} tSirRoamNetworkType;
3710
3711typedef struct SirMobilityDomainInfo
3712{
3713 tANI_U8 mdiePresent;
3714 tANI_U16 mobilityDomain;
3715} tSirMobilityDomainInfo;
3716
3717typedef struct sSirRoamOffloadScanReq
3718{
3719 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003720 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003721 tANI_S8 LookupThreshold;
3722 tANI_U8 RoamRssiDiff;
3723 tANI_U8 ChannelCacheType;
3724 tANI_U8 Command;
3725 tANI_U8 StartScanReason;
3726 tANI_U16 NeighborScanTimerPeriod;
3727 tANI_U16 NeighborRoamScanRefreshPeriod;
3728 tANI_U16 NeighborScanChannelMinTime;
3729 tANI_U16 NeighborScanChannelMaxTime;
3730 tANI_U16 EmptyRefreshScanPeriod;
3731 tANI_U8 ValidChannelCount;
3732 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
3733 eAniBoolean IsCCXEnabled;
3734 tANI_U16 us24GProbeTemplateLen;
3735 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3736 tANI_U16 us5GProbeTemplateLen;
3737 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003738 tANI_U8 ReservedBytes[SIR_ROAM_SCAN_RESERVED_BYTES];
3739 /*ReservedBytes is to add any further params in future
3740 without changing the interface params on Host
3741 and firmware.The firmware right now checks
3742 if the size of this structure matches and then
3743 proceeds with the processing of the command.
3744 So, in future, if there is any need to add
3745 more params, pick the memory from reserved
3746 bytes and keep deducting the reserved bytes
3747 by the amount of bytes picked.*/
3748 tANI_U8 nProbes;
3749 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003750 tSirRoamNetworkType ConnectedNetwork;
3751 tSirMobilityDomainInfo MDID;
3752} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003753#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003754
3755#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3756
3757//Power Parameters Type
3758typedef enum
3759{
3760 eSIR_IGNORE_DTIM = 1,
3761 eSIR_LISTEN_INTERVAL = 2,
3762 eSIR_MCAST_BCAST_FILTER = 3,
3763 eSIR_ENABLE_BET = 4,
3764 eSIR_BET_INTERVAL = 5
3765}tPowerParamType;
3766
3767//Power Parameters Value s
3768typedef struct
3769{
3770 /* Ignore DTIM */
3771 tANI_U32 uIgnoreDTIM;
3772
3773 /* DTIM Period */
3774 tANI_U32 uDTIMPeriod;
3775
3776 /* Listen Interval */
3777 tANI_U32 uListenInterval;
3778
3779 /* Broadcast Multicas Filter */
3780 tANI_U32 uBcastMcastFilter;
3781
3782 /* Beacon Early Termination */
3783 tANI_U32 uEnableBET;
3784
3785 /* Beacon Early Termination Interval */
3786 tANI_U32 uBETInterval;
3787
Yue Mac24062f2013-05-13 17:01:29 -07003788 /* MAX LI for modulated DTIM */
3789 tANI_U32 uMaxLIModulatedDTIM;
3790
Jeff Johnson295189b2012-06-20 16:38:30 -07003791}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3792
3793typedef struct sSirTxPerTrackingParam
3794{
3795 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3796 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3797 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 */
3798 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3799}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3800
3801#ifdef WLAN_FEATURE_PACKET_FILTERING
3802/*---------------------------------------------------------------------------
3803 Packet Filtering Parameters
3804---------------------------------------------------------------------------*/
3805#define SIR_IPV4_ADDR_LEN 4
3806#define SIR_MAC_ADDR_LEN 6
3807#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3808#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3809#define SIR_MAX_NUM_FILTERS 20
3810#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3811
3812//
3813// Receive Filter Parameters
3814//
3815typedef enum
3816{
3817 SIR_RCV_FILTER_TYPE_INVALID,
3818 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3819 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3820 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3821}eSirReceivePacketFilterType;
3822
3823typedef enum
3824{
3825 SIR_FILTER_HDR_TYPE_INVALID,
3826 SIR_FILTER_HDR_TYPE_MAC,
3827 SIR_FILTER_HDR_TYPE_ARP,
3828 SIR_FILTER_HDR_TYPE_IPV4,
3829 SIR_FILTER_HDR_TYPE_IPV6,
3830 SIR_FILTER_HDR_TYPE_UDP,
3831 SIR_FILTER_HDR_TYPE_MAX
3832}eSirRcvPktFltProtocolType;
3833
3834typedef enum
3835{
3836 SIR_FILTER_CMP_TYPE_INVALID,
3837 SIR_FILTER_CMP_TYPE_EQUAL,
3838 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3839 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3840 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3841 SIR_FILTER_CMP_TYPE_MAX
3842}eSirRcvPktFltCmpFlagType;
3843
3844typedef struct sSirRcvPktFilterFieldParams
3845{
3846 eSirRcvPktFltProtocolType protocolLayer;
3847 eSirRcvPktFltCmpFlagType cmpFlag;
3848 /* Length of the data to compare */
3849 tANI_U16 dataLength;
3850 /* from start of the respective frame header */
3851 tANI_U8 dataOffset;
3852 /* Reserved field */
3853 tANI_U8 reserved;
3854 /* Data to compare */
3855 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3856 /* Mask to be applied on the received packet data before compare */
3857 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3858}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3859
3860typedef struct sSirRcvPktFilterCfg
3861{
3862 tANI_U8 filterId;
3863 eSirReceivePacketFilterType filterType;
3864 tANI_U32 numFieldParams;
3865 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003866 tSirMacAddr selfMacAddr;
3867 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003868 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003869}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3870
3871//
3872// Filter Packet Match Count Parameters
3873//
3874typedef struct sSirRcvFltPktMatchCnt
3875{
3876 tANI_U8 filterId;
3877 tANI_U32 matchCnt;
3878} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3879
3880typedef struct sSirRcvFltPktMatchRsp
3881{
3882 tANI_U16 mesgType;
3883 tANI_U16 mesgLen;
3884
3885 /* Success or Failure */
3886 tANI_U32 status;
3887 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003888 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003889} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3890
3891//
3892// Receive Filter Clear Parameters
3893//
3894typedef struct sSirRcvFltPktClearParam
3895{
3896 tANI_U32 status; /* only valid for response message */
3897 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003898 tSirMacAddr selfMacAddr;
3899 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003900}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3901
3902//
3903// Multicast Address List Parameters
3904//
3905typedef struct sSirRcvFltMcAddrList
3906{
3907 tANI_U32 ulMulticastAddrCnt;
3908 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003909 tSirMacAddr selfMacAddr;
3910 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003911} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3912#endif // WLAN_FEATURE_PACKET_FILTERING
3913
3914//
3915// Generic version information
3916//
3917typedef struct
3918{
3919 tANI_U8 revision;
3920 tANI_U8 version;
3921 tANI_U8 minor;
3922 tANI_U8 major;
3923} tSirVersionType;
3924
3925typedef struct sAniBtAmpLogLinkReq
3926{
3927 // Common for all types are requests
3928 tANI_U16 msgType; // message type is same as the request type
3929 tANI_U16 msgLen; // length of the entire request
3930 tANI_U8 sessionId; //sme Session Id
3931 void *btampHandle; //AMP context
3932
3933} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
3934
3935#ifdef WLAN_FEATURE_GTK_OFFLOAD
3936/*---------------------------------------------------------------------------
3937* WDA_GTK_OFFLOAD_REQ
3938*--------------------------------------------------------------------------*/
3939typedef struct
3940{
3941 tANI_U32 ulFlags; /* optional flags */
3942 tANI_U8 aKCK[16]; /* Key confirmation key */
3943 tANI_U8 aKEK[16]; /* key encryption key */
3944 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003945 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003946} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3947
3948/*---------------------------------------------------------------------------
3949* WDA_GTK_OFFLOAD_GETINFO_REQ
3950*--------------------------------------------------------------------------*/
3951typedef struct
3952{
3953 tANI_U16 mesgType;
3954 tANI_U16 mesgLen;
3955
3956 tANI_U32 ulStatus; /* success or failure */
3957 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
3958 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
3959 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
3960 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003961 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003962} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
3963#endif // WLAN_FEATURE_GTK_OFFLOAD
3964
3965#ifdef WLAN_WAKEUP_EVENTS
3966/*---------------------------------------------------------------------------
3967 tSirWakeReasonInd
3968---------------------------------------------------------------------------*/
3969typedef struct
3970{
3971 tANI_U16 mesgType;
3972 tANI_U16 mesgLen;
3973 tANI_U32 ulReason; /* see tWakeReasonType */
3974 tANI_U32 ulReasonArg; /* argument specific to the reason type */
3975 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
3976 HAL truncates the data (i.e. data packets) this length
3977 will be less than the actual length */
3978 tANI_U32 ulActualDataLen; /* actual length of data */
3979 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
3980 see specific wake type */
3981} tSirWakeReasonInd, *tpSirWakeReasonInd;
3982#endif // WLAN_WAKEUP_EVENTS
3983
3984/*---------------------------------------------------------------------------
3985 sAniSetTmLevelReq
3986---------------------------------------------------------------------------*/
3987typedef struct sAniSetTmLevelReq
3988{
3989 tANI_U16 tmMode;
3990 tANI_U16 newTmLevel;
3991} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
3992
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003993#ifdef FEATURE_WLAN_TDLS
3994/* TDLS Request struct SME-->PE */
3995typedef struct sSirTdlsSendMgmtReq
3996{
3997 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
3998 tANI_U16 length;
3999 tANI_U8 sessionId; // Session ID
4000 tANI_U16 transactionId; // Transaction ID for cmd
4001 tANI_U8 reqType;
4002 tANI_U8 dialog;
4003 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004004 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004005 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4006 tSirMacAddr peerMac;
4007 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4008} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004009
4010typedef enum TdlsAddOper
4011{
4012 TDLS_OPER_NONE,
4013 TDLS_OPER_ADD,
4014 TDLS_OPER_UPDATE
4015} eTdlsAddOper;
4016
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004017/* TDLS Request struct SME-->PE */
4018typedef struct sSirTdlsAddStaReq
4019{
4020 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4021 tANI_U16 length;
4022 tANI_U8 sessionId; // Session ID
4023 tANI_U16 transactionId; // Transaction ID for cmd
4024 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004025 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004026 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004027 tANI_U16 capability;
4028 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4029 tANI_U8 supported_rates_length;
4030 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004031 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004032 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004033 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004034 tSirVHTCap vhtCap;
4035 tANI_U8 uapsd_queues;
4036 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004037} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004038
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004039/* TDLS Response struct PE-->SME */
4040typedef struct sSirTdlsAddStaRsp
4041{
4042 tANI_U16 messageType;
4043 tANI_U16 length;
4044 tSirResultCodes statusCode;
4045 tSirMacAddr peerMac;
4046 tANI_U8 sessionId; // Session ID
4047 tANI_U16 staId ;
4048 tANI_U16 staType ;
4049 tANI_U8 ucastSig;
4050 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004051 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004052} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304053
4054/* TDLS Request struct SME-->PE */
4055typedef struct
4056{
4057 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4058 tANI_U16 length;
4059 tANI_U8 sessionId; // Session ID
4060 tANI_U16 transactionId; // Transaction ID for cmd
4061 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4062 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4063 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
4064 tANI_U8 isResponder; // Is Peer a responder.
4065 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4066 tSirMacAddr peerMac;
4067}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4068
4069/* TDLS Request struct SME-->PE */
4070typedef struct
4071{
4072 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4073 tANI_U16 length;
4074 tANI_U8 sessionId; // Session ID
4075 tANI_U16 transactionId; // Transaction ID for cmd
4076 tSirResultCodes statusCode;
4077 tSirMacAddr peerMac;
4078}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4079
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004080/* TDLS Request struct SME-->PE */
4081typedef struct sSirTdlsDelStaReq
4082{
4083 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4084 tANI_U16 length;
4085 tANI_U8 sessionId; // Session ID
4086 tANI_U16 transactionId; // Transaction ID for cmd
4087 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4088 tSirMacAddr peerMac;
4089} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4090/* TDLS Response struct PE-->SME */
4091typedef struct sSirTdlsDelStaRsp
4092{
4093 tANI_U16 messageType;
4094 tANI_U16 length;
4095 tANI_U8 sessionId; // Session ID
4096 tSirResultCodes statusCode;
4097 tSirMacAddr peerMac;
4098 tANI_U16 staId;
4099} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004100/* TDLS Delete Indication struct PE-->SME */
4101typedef struct sSirTdlsDelStaInd
4102{
4103 tANI_U16 messageType;
4104 tANI_U16 length;
4105 tANI_U8 sessionId; // Session ID
4106 tSirMacAddr peerMac;
4107 tANI_U16 staId;
4108 tANI_U16 reasonCode;
4109} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004110typedef struct sSirTdlsDelAllPeerInd
4111{
4112 tANI_U16 messageType;
4113 tANI_U16 length;
4114 tANI_U8 sessionId; // Session ID
4115} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004116typedef struct sSirMgmtTxCompletionInd
4117{
4118 tANI_U16 messageType;
4119 tANI_U16 length;
4120 tANI_U8 sessionId; // Session ID
4121 tANI_U32 txCompleteStatus;
4122} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004123#endif /* FEATURE_WLAN_TDLS */
4124
4125#ifdef FEATURE_WLAN_TDLS_INTERNAL
4126typedef enum tdlsListType
4127{
4128 TDLS_DIS_LIST,
4129 TDLS_SETUP_LIST
4130}eTdlsListType ;
4131
4132typedef enum tdlsStates
4133{
4134 TDLS_LINK_IDLE_STATE,
4135 TDLS_LINK_DIS_INIT_STATE,
4136 TDLS_LINK_DIS_RSP_WAIT_STATE,
4137 TDLS_DIS_REQ_PROCESS_STATE,
4138 TDLS_DIS_RSP_SENT_WAIT_STATE,
4139 TDLS_DIS_RSP_SENT_DONE_STATE,
4140 TDLS_LINK_DIS_DONE_STATE,
4141 TDLS_LINK_SETUP_START_STATE,
4142 TDLS_LINK_SETUP_WAIT_STATE,
4143 TDLS_LINK_SETUP_RSP_WAIT_STATE,
4144 TDLS_LINK_SETUP_DONE_STATE,
4145 TDLS_LINK_TEARDOWN_START_STATE,
4146 TDLS_LINK_TEARDOWN_DONE_STATE,
4147 TDLS_LINK_SETUP_STATE
4148}eSirTdlsStates ;
4149
4150typedef struct sSirTdlsPeerInfo
4151{
4152 tSirMacAddr peerMac;
4153 tANI_U8 sessionId;
4154 tANI_U8 dialog ;
4155 tSirMacCapabilityInfo capabilityInfo ;
4156 tSirMacRateSet tdlsPeerSuppRates ;
4157 tSirMacRateSet tdlsPeerExtRates ;
4158 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4159 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4160 tSirMacHTParametersInfo tdlsPeerHtParams ;
4161 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4162 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4163
4164 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4165 tSirMacRsnInfo tdlsPeerRsn ;
4166 tANI_U16 tdlsPeerFtIe ;
4167 tANI_U16 tdlsPeerTimeoutIntvl ;
4168 tANI_U16 tdlsPeerSuppChan ;
4169 tANI_U16 tdlsPeerSuppReguClass ;
4170 tANI_S8 tdlsPeerRssi ;
4171 tANI_U16 tdlsPeerState ;
4172 /* flags to indicate optional IE's are in */
4173 tANI_U8 ExtRatesPresent ;
4174 tANI_U8 rsnIePresent ;
4175 tANI_U8 htCapPresent ;
4176 tANI_U8 delStaNeeded ;
4177
4178} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4179
4180/* TDLS Request struct SME-->PE */
4181typedef struct sSirTdlsDiscoveryReq
4182{
4183 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4184 tANI_U16 length;
4185 tANI_U8 sessionId; // Session ID
4186 tANI_U16 transactionId; // Transaction ID for cmd
4187 tANI_U8 reqType;
4188 tANI_U8 dialog;
4189 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4190 tSirMacAddr peerMac;
4191} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4192
4193typedef struct sSirTdlsLinkSetupReq
4194{
4195 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4196 tANI_U16 length;
4197 tANI_U8 sessionId; // Session ID
4198 tANI_U16 transactionId; // Transaction ID for cmd
4199 tANI_U8 dialog;
4200 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4201 tSirMacAddr peerMac;
4202} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4203
4204typedef struct sSirTdlsTeardownReq
4205{
4206 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4207 tANI_U16 length;
4208 tANI_U8 sessionId; // Session ID
4209 tANI_U16 transactionId; // Transaction ID for cmd
4210 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4211 tSirMacAddr peerMac;
4212} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4213
4214
4215/* TDLS response struct PE-->SME */
4216typedef struct sSirTdlsDiscoveryRsp
4217{
4218 tANI_U16 messageType;
4219 tANI_U16 length;
4220 tSirResultCodes statusCode;
4221 tANI_U16 numDisSta ;
4222 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4223} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4224
4225typedef struct sSirTdlsLinkSetupRsp
4226{
4227 tANI_U16 messageType;
4228 tANI_U16 length;
4229 tSirResultCodes statusCode;
4230 tSirMacAddr peerMac;
4231} tSirTdlsLinksetupRsp ;
4232
4233typedef struct sSirTdlsLinkSetupInd
4234{
4235 tANI_U16 messageType;
4236 tANI_U16 length;
4237 tSirResultCodes statusCode;
4238 tSirMacAddr peerMac;
4239} tSirTdlsLinkSetupInd ;
4240
4241
4242typedef struct sSirTdlsTeardownRsp
4243{
4244 tANI_U16 messageType;
4245 tANI_U16 length;
4246 tSirResultCodes statusCode;
4247 tSirMacAddr peerMac;
4248} tSirTdlsTeardownRsp ;
4249
4250typedef struct sSirTdlsPeerInd
4251{
4252 tANI_U16 messageType;
4253 tANI_U16 length;
4254 tSirMacAddr peerMac;
4255 tANI_U8 sessionId; // Session ID
4256 tANI_U16 staId ;
4257 tANI_U16 staType ;
4258 tANI_U8 ucastSig;
4259 tANI_U8 bcastSig;
4260} tSirTdlsPeerInd ;
4261
4262typedef struct sSirTdlsLinkEstablishInd
4263{
4264 tANI_U16 messageType;
4265 tANI_U16 length;
4266 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4267 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4268 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4269 tANI_U8 ptiTemplateLen;
4270 tANI_U8 ptiTemplateBuf[64];
4271 tANI_U8 extCapability[8];
4272/* This will be part of PTI template when sent by PE
4273 tANI_U8 linkIdentifier[20];
4274*/
4275} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4276
4277typedef struct sSirTdlsLinkTeardownInd
4278{
4279 tANI_U16 messageType;
4280 tANI_U16 length;
4281 tANI_U16 staId;
4282} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4283
4284#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4285
Yathish9f22e662012-12-10 14:21:35 -08004286typedef struct sSirActiveModeSetBcnFilterReq
4287{
4288 tANI_U16 messageType;
4289 tANI_U16 length;
4290 tANI_U8 seesionId;
4291} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4292
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304293//Reset AP Caps Changed
4294typedef struct sSirResetAPCapsChange
4295{
4296 tANI_U16 messageType;
4297 tANI_U16 length;
4298 tSirMacAddr bssId;
4299} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004300/// Definition for Candidate found indication from FW
4301typedef struct sSirSmeCandidateFoundInd
4302{
4303 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4304 tANI_U16 length;
4305 tANI_U8 sessionId; // Session Identifier
4306} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004307
Chet Lanctot186b5732013-03-18 10:26:30 -07004308#ifdef WLAN_FEATURE_11W
4309typedef struct sSirWlanExcludeUnencryptParam
4310{
4311 tANI_BOOLEAN excludeUnencrypt;
4312 tSirMacAddr bssId;
4313}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4314#endif
4315
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004316typedef struct sAniHandoffReq
4317{
4318 // Common for all types are requests
4319 tANI_U16 msgType; // message type is same as the request type
4320 tANI_U16 msgLen; // length of the entire request
4321 tANI_U8 sessionId;
4322 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4323 tANI_U8 channel;
4324} tAniHandoffReq, *tpAniHandoffReq;
4325
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304326typedef struct sSirScanOffloadReq {
4327 tANI_U8 sessionId;
4328 tSirMacAddr bssId;
4329 tANI_U8 numSsid;
4330 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4331 tANI_U8 hiddenSsid;
4332 tSirMacAddr selfMacAddr;
4333 tSirBssType bssType;
4334 tANI_U8 dot11mode;
4335 tSirScanType scanType;
4336 tANI_U32 minChannelTime;
4337 tANI_U32 maxChannelTime;
4338 tANI_BOOLEAN p2pSearch;
4339 tANI_U16 uIEFieldLen;
4340 tANI_U16 uIEFieldOffset;
4341 tSirChannelList channelList;
4342 /*-----------------------------
4343 sSirScanOffloadReq....
4344 -----------------------------
4345 uIEFieldLen
4346 -----------------------------
4347 uIEFieldOffset ----+
4348 ----------------------------- |
4349 channelList.numChannels |
4350 ----------------------------- |
4351 ... variable size up to |
4352 channelNumber[numChannels-1] |
4353 This can be zero, if |
4354 numChannel is zero. |
4355 ----------------------------- <--+
4356 ... variable size uIEField
4357 up to uIEFieldLen (can be 0)
4358 -----------------------------*/
4359} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304360
4361typedef enum sSirScanEventType {
4362 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4363 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4364 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4365 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4366 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4367 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4368 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4369 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4370 SCAN_EVENT_MAX=0x8000
4371} tSirScanEventType;
4372
4373typedef struct sSirScanOffloadEvent{
4374 tSirScanEventType event;
4375 tSirResultCodes reasonCode;
4376 tANI_U32 chanFreq;
4377 tANI_U32 requestor;
4378 tANI_U32 scanId;
4379} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4380
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304381typedef struct sSirUpdateChanParam
4382{
4383 tANI_U8 chanId;
4384 tANI_U8 pwr;
4385} tSirUpdateChanParam, *tpSirUpdateChanParam;
4386
4387typedef struct sSirUpdateChan
4388{
4389 tANI_U8 numChan;
4390 tSirUpdateChanParam chanParam[1];
4391} tSirUpdateChanList, *tpSirUpdateChanList;
4392
Leo Chang9056f462013-08-01 19:21:11 -07004393#ifdef FEATURE_WLAN_LPHB
4394#define SIR_LPHB_FILTER_LEN 64
4395
4396typedef enum
4397{
4398 LPHB_SET_EN_PARAMS_INDID,
4399 LPHB_SET_TCP_PARAMS_INDID,
4400 LPHB_SET_TCP_PKT_FILTER_INDID,
4401 LPHB_SET_UDP_PARAMS_INDID,
4402 LPHB_SET_UDP_PKT_FILTER_INDID,
4403 LPHB_SET_NETWORK_INFO_INDID,
4404} LPHBIndType;
4405
4406typedef struct sSirLPHBEnableStruct
4407{
4408 v_U8_t enable;
4409 v_U8_t item;
4410 v_U8_t session;
4411} tSirLPHBEnableStruct;
4412
4413typedef struct sSirLPHBTcpParamStruct
4414{
4415 v_U32_t srv_ip;
4416 v_U32_t dev_ip;
4417 v_U16_t src_port;
4418 v_U16_t dst_port;
4419 v_U16_t timeout;
4420 v_U8_t session;
4421 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004422 uint16 timePeriodSec; // in seconds
4423 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004424} tSirLPHBTcpParamStruct;
4425
4426typedef struct sSirLPHBTcpFilterStruct
4427{
4428 v_U16_t length;
4429 v_U8_t offset;
4430 v_U8_t session;
4431 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4432} tSirLPHBTcpFilterStruct;
4433
4434typedef struct sSirLPHBUdpParamStruct
4435{
4436 v_U32_t srv_ip;
4437 v_U32_t dev_ip;
4438 v_U16_t src_port;
4439 v_U16_t dst_port;
4440 v_U16_t interval;
4441 v_U16_t timeout;
4442 v_U8_t session;
4443 tSirMacAddr gateway_mac;
4444} tSirLPHBUdpParamStruct;
4445
4446typedef struct sSirLPHBUdpFilterStruct
4447{
4448 v_U16_t length;
4449 v_U8_t offset;
4450 v_U8_t session;
4451 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4452} tSirLPHBUdpFilterStruct;
4453
4454typedef struct sSirLPHBReq
4455{
4456 v_U16_t cmd;
4457 v_U16_t dummy;
4458 union
4459 {
4460 tSirLPHBEnableStruct lphbEnableReq;
4461 tSirLPHBTcpParamStruct lphbTcpParamReq;
4462 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4463 tSirLPHBUdpParamStruct lphbUdpParamReq;
4464 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4465 } params;
4466} tSirLPHBReq;
4467
Leo Changd9df8aa2013-09-26 13:32:26 -07004468typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004469{
4470 v_U8_t sessionIdx;
4471 v_U8_t protocolType; /*TCP or UDP*/
4472 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004473} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004474#endif /* FEATURE_WLAN_LPHB */
4475
Yue Mab9c86f42013-08-14 15:59:08 -07004476typedef struct sSirAddPeriodicTxPtrn
4477{
4478 /* MAC Address for the adapter */
4479 tSirMacAddr macAddress;
4480
4481 tANI_U8 ucPtrnId; // Pattern ID
4482 tANI_U16 ucPtrnSize; // Pattern size
4483 tANI_U32 usPtrnIntervalMs; // In msec
4484 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4485} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4486
4487typedef struct sSirDelPeriodicTxPtrn
4488{
4489 /* MAC Address for the adapter */
4490 tSirMacAddr macAddress;
4491
4492 /* Bitmap of pattern IDs that need to be deleted */
4493 tANI_U32 ucPatternIdBitmap;
4494} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4495
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004496typedef struct sSirRateUpdateInd
4497{
4498 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4499 * param.
4500 */
4501 tANI_S32 ucastDataRate;
4502
4503 /* TX flag to differentiate between HT20, HT40 etc */
4504 tTxrateinfoflags ucastDataRateTxFlag;
4505
4506 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4507 tSirMacAddr bssid;
4508
4509 /*
4510 * 0 implies MCAST RA, positive value implies fixed rate,
4511 * -1 implies ignore this param
4512 */
4513 tANI_S32 reliableMcastDataRate;//unit Mbpsx10
4514
4515 /* TX flag to differentiate between HT20, HT40 etc */
4516 tTxrateinfoflags reliableMcastDataRateTxFlag;
4517
4518 /*
4519 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4520 * 0 implies ignore
4521 */
4522 tANI_U32 mcastDataRate24GHz;
4523
4524 /* TX flag to differentiate between HT20, HT40 etc */
4525 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4526
4527 /*
4528 * MCAST(or BCAST) fixed data rate in 5 GHz,
4529 * unit Mbpsx10, 0 implies ignore
4530 */
4531 tANI_U32 mcastDataRate5GHz;
4532
4533 /* TX flag to differentiate between HT20, HT40 etc */
4534 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4535
4536} tSirRateUpdateInd, *tpSirRateUpdateInd;
4537
Rajeev79dbe4c2013-10-05 11:03:42 +05304538#ifdef FEATURE_WLAN_BATCH_SCAN
4539// Set batch scan resposne from FW
4540typedef struct
4541{
4542 /*maximum number of scans which FW can cache*/
4543 tANI_U32 nScansToBatch;
4544} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4545
4546// Set batch scan request to FW
4547typedef struct
4548{
4549 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4550 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4551 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4552 tANI_U8 rfBand; /* band to scan :
4553 0 ->both Band, 1->2.4Ghz Only
4554 and 2-> 5GHz Only */
4555 tANI_U32 rtt; /* set if required to do RTT it is not
4556 supported in current version */
4557} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4558
4559
4560// Stop batch scan request to FW
4561typedef struct
4562{
4563 tANI_U32 param;
4564} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4565
4566// Trigger batch scan result indication to FW
4567typedef struct
4568{
4569 tANI_U32 param;
4570} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4571
4572// Batch scan result indication from FW
4573typedef PACKED_PRE struct PACKED_POST
4574{
4575 tANI_U8 bssid[6]; /* BSSID */
4576 tANI_U8 ssid[32]; /* SSID */
4577 tANI_U8 ch; /* Channel */
4578 tANI_U8 rssi; /* RSSI or Level */
4579 /*Timestamp when Network was found. Used to calculate age based on timestamp
4580 in GET_RSP msg header */
4581 tANI_U32 timestamp;
4582} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4583
4584typedef PACKED_PRE struct PACKED_POST
4585{
4586 tANI_U32 scanId; /* Scan List ID. */
4587 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4588 tANI_U32 numNetworksInScanList;
4589 /*Variable data ptr: Number of AP in Scan List*/
4590 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4591 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4592 tANI_U8 scanList[1];
4593} tSirBatchScanList, *tpSirBatchScanList;
4594
4595typedef PACKED_PRE struct PACKED_POST
4596{
4597 tANI_U32 timestamp;
4598 tANI_U32 numScanLists;
4599 boolean isLastResult;
4600 /* Variable Data ptr: Number of Scan Lists*/
4601 /* following isLastResult is data of type tSirBatchScanList
4602 * of sizeof(tSirBatchScanList) * numScanLists*/
4603 tANI_U8 scanResults[1];
4604} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4605
4606#endif // FEATURE_WLAN_BATCH_SCAN
4607
4608
Jeff Johnson295189b2012-06-20 16:38:30 -07004609#endif /* __SIR_API_H */