blob: 3d72e2dac91f0e9e7c3940f6fdff223c657f0513 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -08002 * Copyright (c) 2012-2014 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 */
Jeff Johnson295189b2012-06-20 16:38:30 -070021
22/*
Kiet Lam842dad02014-02-18 18:44:02 -080023 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
26 *
27 */
28
29
30/*
Jeff Johnson295189b2012-06-20 16:38:30 -070031 * This file sirApi.h contains definitions exported by
32 * Sirius software.
33 * Author: Chandra Modumudi
34 * Date: 04/16/2002
35 * History:-
36 * Date Modified by Modification Information
37 * --------------------------------------------------------------------
38 */
39
40#ifndef __SIR_API_H
41#define __SIR_API_H
42
43#include "sirTypes.h"
44#include "sirMacProtDef.h"
45#include "aniSystemDefs.h"
Jeff Johnsone7245742012-09-05 17:12:55 -070046#include "sirParams.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070047
Srinivas Girigowda5cecb202013-10-08 09:13:25 -070048#if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -070049#include "ccxGlobal.h"
50#endif
51
52/// Maximum number of STAs allowed in the BSS
53#define SIR_MAX_NUM_STA 256
54
55/// Maximum number of Neighbors reported by STA for LB feature
56#define SIR_MAX_NUM_NEIGHBOR_BSS 3
57
58/// Maximum number of Neighbors reported by STA for LB feature
59#define SIR_MAX_NUM_ALTERNATE_RADIOS 5
60
61/// Maximum size of SCAN_RSP message
62#define SIR_MAX_SCAN_RSP_MSG_LENGTH 2600
63
64/// Start of Sirius software/Host driver message types
65#define SIR_HAL_HOST_MSG_START 0x1000
66
67/// Power save level definitions
68#define SIR_MAX_POWER_SAVE 3
69#define SIR_INTERMEDIATE_POWER_SAVE 4
70#define SIR_NO_POWER_SAVE 5
71
72/// Max supported channel list
73#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
74
75/// Maximum DTIM Factor
76#define SIR_MAX_DTIM_FACTOR 32
77
78#define SIR_MDIE_SIZE 3
79
Gopichand Nakkalad492d202013-05-10 02:50:47 +053080/* Max number of channels are 165, but to access 165th element of array,
81 *array of 166 is required.
82 */
83#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -080084#define SIR_BCN_REPORT_MAX_BSS_DESC 4
Gopichand Nakkalad492d202013-05-10 02:50:47 +053085
Jeff Johnson295189b2012-06-20 16:38:30 -070086
Rajeev79dbe4c2013-10-05 11:03:42 +053087#ifdef FEATURE_WLAN_BATCH_SCAN
88#define SIR_MAX_SSID_SIZE (32)
89#endif
90
Jeff Johnson295189b2012-06-20 16:38:30 -070091
92#define SIR_NUM_11B_RATES 4 //1,2,5.5,11
93#define SIR_NUM_11A_RATES 8 //6,9,12,18,24,36,48,54
94#define SIR_NUM_POLARIS_RATES 3 //72,96,108
95#define SIR_NUM_TITAN_RATES 26
96#define SIR_NUM_TAURUS_RATES 4 //136.5, 151.7,283.5,315
97#define SIR_NUM_PROP_RATES (SIR_NUM_TITAN_RATES + SIR_NUM_TAURUS_RATES)
98
99#define SIR_11N_PROP_RATE_136_5 (1<<28)
100#define SIR_11N_PROP_RATE_151_7 (1<<29)
101#define SIR_11N_PROP_RATE_283_5 (1<<30)
102#define SIR_11N_PROP_RATE_315 (1<<31)
103#define SIR_11N_PROP_RATE_BITMAP 0x80000000 //only 315MBPS rate is supported today
104//Taurus is going to support 26 Titan Rates(no ESF/concat Rates will be supported)
105//First 26 bits are reserved for Titan and last 4 bits for Taurus, 2(27 and 28) bits are reserved.
106//#define SIR_TITAN_PROP_RATE_BITMAP 0x03FFFFFF
107//Disable all Titan rates
108#define SIR_TITAN_PROP_RATE_BITMAP 0
109#define SIR_CONVERT_2_U32_BITMAP(nRates) ((nRates + 31)/32)
110
111/* #tANI_U32's needed for a bitmap representation for all prop rates */
112#define SIR_NUM_U32_MAP_RATES SIR_CONVERT_2_U32_BITMAP(SIR_NUM_PROP_RATES)
113
114
115#define SIR_PM_SLEEP_MODE 0
116#define SIR_PM_ACTIVE_MODE 1
117
118// Used by various modules to load ALL CFG's
119#define ANI_IGNORE_CFG_ID 0xFFFF
120
121//hidden SSID options
122#define SIR_SCAN_NO_HIDDEN_SSID 0
123#define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1
124#define SIR_SCAN_HIDDEN_SSID 2
125
126#define SIR_MAC_ADDR_LEN 6
127#define SIR_IPV4_ADDR_LEN 4
128
129typedef tANI_U8 tSirIpv4Addr[SIR_IPV4_ADDR_LEN];
130
131#define SIR_VERSION_STRING_LEN 64
132typedef tANI_U8 tSirVersionString[SIR_VERSION_STRING_LEN];
133
Yue Mab9c86f42013-08-14 15:59:08 -0700134/* Periodic Tx pattern offload feature */
135#define PERIODIC_TX_PTRN_MAX_SIZE 1536
136#define MAXNUM_PERIODIC_TX_PTRNS 6
137
Jeff Johnson295189b2012-06-20 16:38:30 -0700138enum eSirHostMsgTypes
139{
140 SIR_HAL_APP_SETUP_NTF = SIR_HAL_HOST_MSG_START,
141 SIR_HAL_INITIAL_CAL_FAILED_NTF,
142 SIR_HAL_NIC_OPER_NTF,
143 SIR_HAL_INIT_START_REQ,
144 SIR_HAL_SHUTDOWN_REQ,
145 SIR_HAL_SHUTDOWN_CNF,
146 SIR_HAL_RESET_REQ,
147 SIR_HAL_RADIO_ON_OFF_IND,
148 SIR_HAL_RESET_CNF,
149 SIR_WRITE_TO_TD,
150 SIR_HAL_HDD_ADDBA_REQ, // MAC -> HDD
151 SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
152 SIR_HAL_DELETEBA_IND, // MAC -> HDD
153 SIR_HAL_BA_FAIL_IND, // HDD -> MAC
154 SIR_TL_HAL_FLUSH_AC_REQ,
155 SIR_HAL_TL_FLUSH_AC_RSP
156};
157
158
159
160/**
161 * Module ID definitions.
162 */
163enum {
164 SIR_BOOT_MODULE_ID = 1,
165 SIR_HAL_MODULE_ID = 0x10,
Leela Venkata Kiran Kumar Reddy Chirala45f184c2014-02-14 15:08:21 -0800166 SIR_CFG_MODULE_ID = 0x12,
Jeff Johnson295189b2012-06-20 16:38:30 -0700167 SIR_LIM_MODULE_ID,
168 SIR_ARQ_MODULE_ID,
169 SIR_SCH_MODULE_ID,
170 SIR_PMM_MODULE_ID,
171 SIR_MNT_MODULE_ID,
172 SIR_DBG_MODULE_ID,
173 SIR_DPH_MODULE_ID,
174 SIR_SYS_MODULE_ID,
175 SIR_SMS_MODULE_ID,
176
177 SIR_PHY_MODULE_ID = 0x20,
178
179
180 // Add any modules above this line
181 SIR_DVT_MODULE_ID
182};
183
184#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
185
186/**
187 * First and last module definition for logging utility
188 *
189 * NOTE: The following definitions need to be updated if
190 * the above list is changed.
191 */
192#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
193#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
194
195
196// Type declarations used by Firmware and Host software
197
198// Scan type enum used in scan request
199typedef enum eSirScanType
200{
201 eSIR_PASSIVE_SCAN,
202 eSIR_ACTIVE_SCAN,
203} tSirScanType;
204
205/// Result codes Firmware return to Host SW
206typedef enum eSirResultCodes
207{
208 eSIR_SME_SUCCESS,
209
210 eSIR_EOF_SOF_EXCEPTION,
211 eSIR_BMU_EXCEPTION,
212 eSIR_LOW_PDU_EXCEPTION,
213 eSIR_USER_TRIG_RESET,
214 eSIR_LOGP_EXCEPTION,
215 eSIR_CP_EXCEPTION,
216 eSIR_STOP_BSS,
217 eSIR_AHB_HANG_EXCEPTION,
218 eSIR_DPU_EXCEPTION,
219 eSIR_RPE_EXCEPTION,
220 eSIR_TPE_EXCEPTION,
221 eSIR_DXE_EXCEPTION,
222 eSIR_RXP_EXCEPTION,
223 eSIR_MCPU_EXCEPTION,
224 eSIR_MCU_EXCEPTION,
225 eSIR_MTU_EXCEPTION,
226 eSIR_MIF_EXCEPTION,
227 eSIR_FW_EXCEPTION,
228 eSIR_PS_MUTEX_READ_EXCEPTION,
229 eSIR_PHY_HANG_EXCEPTION,
230 eSIR_MAILBOX_SANITY_CHK_FAILED,
231 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
232 eSIR_CFB_FLAG_STUCK_EXCEPTION,
233
234 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
235
236 eSIR_SME_INVALID_PARAMETERS=500,
237 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
238 eSIR_SME_RESOURCES_UNAVAILABLE,
239 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
240 // matching requested scan criteria
241 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
242 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
243 eSIR_SME_REFUSED,
244 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
245 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
246 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
247 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
248 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
249 eSIR_SME_AUTH_REFUSED,
250 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
251 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
252 eSIR_SME_ASSOC_REFUSED,
253 eSIR_SME_REASSOC_REFUSED,
254 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
255 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
256 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
257 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
258 eSIR_SME_STA_NOT_AUTHENTICATED,
259 eSIR_SME_STA_NOT_ASSOCIATED,
260 eSIR_SME_STA_DISASSOCIATED,
261 eSIR_SME_ALREADY_JOINED_A_BSS,
262 eSIR_ULA_COMPLETED,
263 eSIR_ULA_FAILURE,
264 eSIR_SME_LINK_ESTABLISHED,
265 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
266 eSIR_SME_UNABLE_TO_PERFORM_DFS,
267 eSIR_SME_DFS_FAILED,
268 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
269 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
270 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
271 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
272 // support requested rate in
273 // LINK_TEST_REQ
274 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
275 // not respond before next test packet
276 // is sent
277 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
278 // of link test
279 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
280 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
281 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
282 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
283 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
284 // unable to plumb down keys
285 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
286
287 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
288 // that more SME_SCAN_RSP
289 // messages are following.
290 // SME_SCAN_RSP message with
291 // eSIR_SME_SUCCESS status
292 // code is the last one.
293 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
294 // messages upon receiving
295 // invalid Re/Assoc Rsp frame.
296 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
297 // with MIC_FAILURE reason code and perform the stop bss operation
298 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
299 // timeout interval
300 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
301 eSIR_SME_RECEIVED,
302 // TBA - TSPEC related Result Codes
303
304 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
305 eSIR_SME_INVALID_STA_ROLE,
306 eSIR_SME_INVALID_STATE,
307#ifdef GEN4_SCAN
308 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
309 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
310 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
311 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
312 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
313 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
314#else // GEN4_SCAN
315 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
316 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
317#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700318#ifdef FEATURE_OEM_DATA_SUPPORT
319 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
320#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700321 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
322 eSIR_SME_STA_ASSOCIATED,
323 eSIR_SME_INVALID_PMM_STATE,
324 eSIR_SME_CANNOT_ENTER_IMPS,
325 eSIR_SME_IMPS_REQ_FAILED,
326 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700327 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700328 eSIR_SME_UAPSD_REQ_FAILED,
329 eSIR_SME_WOWL_ENTER_REQ_FAILED,
330 eSIR_SME_WOWL_EXIT_REQ_FAILED,
331#if defined WLAN_FEATURE_VOWIFI_11R
332 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
333 eSIR_SME_FT_REASSOC_FAILURE,
334#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700335 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700336#ifdef WLAN_FEATURE_PACKET_FILTERING
337 eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
338#endif // WLAN_FEATURE_PACKET_FILTERING
339
340#ifdef WLAN_FEATURE_GTK_OFFLOAD
341 eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
342#endif // WLAN_FEATURE_GTK_OFFLOAD
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800343 eSIR_SME_DEAUTH_STATUS,
Jeff Johnson295189b2012-06-20 16:38:30 -0700344 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
345} tSirResultCodes;
346
Jeff Johnson295189b2012-06-20 16:38:30 -0700347/* each station added has a rate mode which specifies the sta attributes */
348typedef enum eStaRateMode {
349 eSTA_TAURUS = 0,
350 eSTA_TITAN,
351 eSTA_POLARIS,
352 eSTA_11b,
353 eSTA_11bg,
354 eSTA_11a,
355 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700356#ifdef WLAN_FEATURE_11AC
357 eSTA_11ac,
358#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700359 eSTA_INVALID_RATE_MODE
360} tStaRateMode, *tpStaRateMode;
361
362//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
363//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
364#define IERATE_BASICRATE_MASK 0x80
365#define IERATE_RATE_MASK 0x7f
366#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
367#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
368
369typedef struct sSirSupportedRates {
370 /*
371 * For Self STA Entry: this represents Self Mode.
372 * For Peer Stations, this represents the mode of the peer.
373 * On Station:
374 * --this mode is updated when PE adds the Self Entry.
375 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
376 * ON AP:
377 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
378 * to indicate the self mode of the AP.
379 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
380 */
381
382 tStaRateMode opRateMode;
383 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
384 tANI_U16 llbRates[SIR_NUM_11B_RATES];
385 tANI_U16 llaRates[SIR_NUM_11A_RATES];
386 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
387
388 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
389 //First 26 bits are reserved for those Titan rates and
390 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
391 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
392
393 /*
394 * 0-76 bits used, remaining reserved
395 * bits 0-15 and 32 should be set.
396 */
397 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
398
399 /*
400 * RX Highest Supported Data Rate defines the highest data
401 * rate that the STA is able to receive, in unites of 1Mbps.
402 * This value is derived from "Supported MCS Set field" inside
403 * the HT capability element.
404 */
405 tANI_U16 rxHighestDataRate;
406
Jeff Johnsone7245742012-09-05 17:12:55 -0700407#ifdef WLAN_FEATURE_11AC
408 /*Indicates the Maximum MCS that can be received for each number
409 of spacial streams */
410 tANI_U16 vhtRxMCSMap;
411 /*Indicate the highest VHT data rate that the STA is able to receive*/
412 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700413 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700414 of spacial streams */
415 tANI_U16 vhtTxMCSMap;
416 /*Indicate the highest VHT data rate that the STA is able to transmit*/
417 tANI_U16 vhtTxHighestDataRate;
418#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700419} tSirSupportedRates, *tpSirSupportedRates;
420
421
422typedef enum eSirRFBand
423{
424 SIR_BAND_UNKNOWN,
425 SIR_BAND_2_4_GHZ,
426 SIR_BAND_5_GHZ,
427} tSirRFBand;
428
429
430/*
431* Specifies which beacons are to be indicated upto the host driver when
432* Station is in power save mode.
433*/
434typedef enum eBeaconForwarding
435{
436 ePM_BEACON_FWD_NTH,
437 ePM_BEACON_FWD_TIM,
438 ePM_BEACON_FWD_DTIM,
439 ePM_BEACON_FWD_NONE
440} tBeaconForwarding;
441
442
Jeff Johnson295189b2012-06-20 16:38:30 -0700443typedef struct sSirRemainOnChnReq
444{
445 tANI_U16 messageType;
446 tANI_U16 length;
447 tANI_U8 sessionId;
448 tSirMacAddr selfMacAddr;
449 tANI_U8 chnNum;
450 tANI_U8 phyMode;
451 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530452 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700453 tANI_U8 probeRspIe[1];
454}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
455
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530456/* Structure for vendor specific IE of debug marker frame
457 to debug remain on channel issues */
458typedef struct publicVendorSpecific
459{
460 tANI_U8 category;
461 tANI_U8 elementid;
462 tANI_U8 length;
463} publicVendorSpecific;
464
Jeff Johnson295189b2012-06-20 16:38:30 -0700465typedef struct sSirRegisterMgmtFrame
466{
467 tANI_U16 messageType;
468 tANI_U16 length;
469 tANI_U8 sessionId;
470 tANI_BOOLEAN registerFrame;
471 tANI_U16 frameType;
472 tANI_U16 matchLen;
473 tANI_U8 matchData[1];
474}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700475
476//
Jeff Johnson295189b2012-06-20 16:38:30 -0700477// Identifies the neighbor BSS' that was(were) detected
478// by an STA and reported to the AP
479//
480typedef struct sAniTitanCBNeighborInfo
481{
482 // A BSS was found on the Primary
483 tANI_U8 cbBssFoundPri;
484
485 // A BSS was found on the adjacent Upper Secondary
486 tANI_U8 cbBssFoundSecUp;
487
488 // A BSS was found on the adjacent Lower Secondary
489 tANI_U8 cbBssFoundSecDown;
490
491} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
492
Jeff Johnson295189b2012-06-20 16:38:30 -0700493/// Generic type for sending a response message
494/// with result code to host software
495typedef struct sSirSmeRsp
496{
497 tANI_U16 messageType; // eWNI_SME_*_RSP
498 tANI_U16 length;
499 tANI_U8 sessionId; // To support BT-AMP
500 tANI_U16 transactionId; // To support BT-AMP
501 tSirResultCodes statusCode;
502} tSirSmeRsp, *tpSirSmeRsp;
503
504/// Definition for kick starting Firmware on STA
505typedef struct sSirSmeStartReq
506{
507 tANI_U16 messageType; // eWNI_SME_START_REQ
508 tANI_U16 length;
509 tANI_U8 sessionId; //Added for BT-AMP Support
510 tANI_U16 transcationId; //Added for BT-AMP Support
511 tSirMacAddr bssId; //Added For BT-AMP Support
512 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700513 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700514} tSirSmeStartReq, *tpSirSmeStartReq;
515
516/// Definition for indicating all modules ready on STA
517typedef struct sSirSmeReadyReq
518{
519 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
520 tANI_U16 length;
521 tANI_U16 transactionId;
522} tSirSmeReadyReq, *tpSirSmeReadyReq;
523
524/// Definition for response message to previously issued start request
525typedef struct sSirSmeStartRsp
526{
527 tANI_U16 messageType; // eWNI_SME_START_RSP
528 tANI_U16 length;
529 tSirResultCodes statusCode;
530 tANI_U16 transactionId;
531} tSirSmeStartRsp, *tpSirSmeStartRsp;
532
Jeff Johnson295189b2012-06-20 16:38:30 -0700533
534/// Definition for Load structure
535typedef struct sSirLoad
536{
537 tANI_U16 numStas;
538 tANI_U16 channelUtilization;
539} tSirLoad, *tpSirLoad;
540
541/// BSS type enum used in while scanning/joining etc
542typedef enum eSirBssType
543{
544 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700545 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700546 eSIR_IBSS_MODE,
547 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
548 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
549 eSIR_AUTO_MODE,
550 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
551} tSirBssType;
552
553/// Definition for WDS Information
554typedef struct sSirWdsInfo
555{
556 tANI_U16 wdsLength;
557 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
558} tSirWdsInfo, *tpSirWdsInfo;
559
560/// Power Capability info used in 11H
561typedef struct sSirMacPowerCapInfo
562{
563 tANI_U8 minTxPower;
564 tANI_U8 maxTxPower;
565} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
566
567/// Supported Channel info used in 11H
568typedef struct sSirSupChnl
569{
570 tANI_U8 numChnl;
571 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
572} tSirSupChnl, *tpSirSupChnl;
573
574typedef enum eSirNwType
575{
576 eSIR_11A_NW_TYPE,
577 eSIR_11B_NW_TYPE,
578 eSIR_11G_NW_TYPE,
579 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700580#ifdef WLAN_FEATURE_11AC
581 eSIR_11AC_NW_TYPE,
582#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700583 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
584} tSirNwType;
585
586/// Definition for new iBss peer info
587typedef struct sSirNewIbssPeerInfo
588{
589 tSirMacAddr peerAddr;
590 tANI_U16 aid;
591} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
592
593/// Definition for Alternate BSS info
594typedef struct sSirAlternateRadioInfo
595{
596 tSirMacAddr bssId;
597 tANI_U8 channelId;
598} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
599
600/// Definition for Alternate BSS list
601typedef struct sSirAlternateRadioList
602{
603 tANI_U8 numBss;
604 tSirAlternateRadioInfo alternateRadio[1];
605} tSirAlternateRadioList, *tpSirAlternateRadioList;
606
607/// Definition for kick starting BSS
608/// ---> MAC
609/**
610 * Usage of ssId, numSSID & ssIdList:
611 * ---------------------------------
612 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
613 * feature is enabled.
614 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
615 * and interpret the SSID list from numSSID & ssIdList.
616 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
617 * specified in the ssId field and it is expected that
618 * application will set numSSID to one (only one SSID present
619 * in the list) and SSID in the list is same as ssId field.
620 * 4. Application will always set numSSID >= 1.
621 */
622//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
623typedef struct sSirSmeStartBssReq
624{
625 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
626 tANI_U16 length;
627 tANI_U8 sessionId; //Added for BT-AMP Support
628 tANI_U16 transactionId; //Added for BT-AMP Support
629 tSirMacAddr bssId; //Added for BT-AMP Support
630 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
631 tANI_U16 beaconInterval; //Added for BT-AMP Support
632 tANI_U8 dot11mode;
633 tSirBssType bssType;
634 tSirMacSSid ssId;
635 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700636 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700637
Jeff Johnson295189b2012-06-20 16:38:30 -0700638 tANI_U8 privacy;
639 tANI_U8 apUapsdEnable;
640 tANI_U8 ssidHidden;
641 tANI_BOOLEAN fwdWPSPBCProbeReq;
642 tANI_BOOLEAN protEnabled;
643 tANI_BOOLEAN obssProtEnabled;
644 tANI_U16 ht_capab;
645 tAniAuthType authType;
646 tANI_U32 dtimPeriod;
647 tANI_U8 wps_state;
krunal sonie9002db2013-11-25 14:24:17 -0800648 tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob
Jeff Johnson295189b2012-06-20 16:38:30 -0700649 tVOS_CON_MODE bssPersona;
650
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800651 tANI_U8 txLdpcIniFeatureEnabled;
652
Jeff Johnson295189b2012-06-20 16:38:30 -0700653 tSirRSNie rsnIE; // RSN IE to be sent in
654 // Beacon and Probe
655 // Response frames
656 tSirNwType nwType; // Indicates 11a/b/g
657 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
658 tSirMacRateSet extendedRateSet; // Has 11g rates
659
Jeff Johnson295189b2012-06-20 16:38:30 -0700660} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
661
662#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
663 ((int) OFFSET_OF( tSirBssDescription, ieFields)))
664
665#define WSCIE_PROBE_RSP_LEN (317 + 2)
666
667typedef struct sSirBssDescription
668{
669 //offset of the ieFields from bssId.
670 tANI_U16 length;
671 tSirMacAddr bssId;
672 v_TIME_t scanSysTimeMsec;
673 tANI_U32 timeStamp[2];
674 tANI_U16 beaconInterval;
675 tANI_U16 capabilityInfo;
676 tSirNwType nwType; // Indicates 11a/b/g
677 tANI_U8 aniIndicator;
678 tANI_S8 rssi;
679 tANI_S8 sinr;
680 //channelId what peer sent in beacon/probersp.
681 tANI_U8 channelId;
682 //channelId on which we are parked at.
683 //used only in scan case.
684 tANI_U8 channelIdSelf;
685 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700686 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
687#if defined WLAN_FEATURE_VOWIFI
688 tANI_U32 parentTSF;
689 tANI_U32 startTSF[2];
690#endif
691#ifdef WLAN_FEATURE_VOWIFI_11R
692 tANI_U8 mdiePresent;
693 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
694#endif
695#ifdef FEATURE_WLAN_CCX
696 tANI_U16 QBSSLoad_present;
697 tANI_U16 QBSSLoad_avail;
698#endif
699 // Please keep the structure 4 bytes aligned above the ieFields
700
701 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700702 tANI_U8 reservedPadding1;
703 tANI_U8 reservedPadding2;
704 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700705 tANI_U32 WscIeLen;
706 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700707 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800708
Jeff Johnson295189b2012-06-20 16:38:30 -0700709 tANI_U32 ieFields[1];
710} tSirBssDescription, *tpSirBssDescription;
711
712/// Definition for response message to previously
713/// issued start BSS request
714/// MAC --->
715typedef struct sSirSmeStartBssRsp
716{
717 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
718 tANI_U16 length;
719 tANI_U8 sessionId;
720 tANI_U16 transactionId;//transaction ID for cmd
721 tSirResultCodes statusCode;
722 tSirBssType bssType;//Add new type for WDS mode
723 tANI_U16 beaconInterval;//Beacon Interval for both type
724 tANI_U32 staId;//Staion ID for Self
725 tSirBssDescription bssDescription;//Peer BSS description
726} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
727
Jeff Johnson295189b2012-06-20 16:38:30 -0700728
729typedef struct sSirChannelList
730{
731 tANI_U8 numChannels;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800732 tANI_U8 channelNumber[SIR_CCX_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700733} tSirChannelList, *tpSirChannelList;
734
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530735typedef struct sSirDFSChannelList
736{
737 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
738
739} tSirDFSChannelList, *tpSirDFSChannelList;
740
Jeff Johnson295189b2012-06-20 16:38:30 -0700741#ifdef FEATURE_WLAN_CCX
742typedef struct sTspecInfo {
743 tANI_U8 valid;
744 tSirMacTspecIE tspec;
745} tTspecInfo;
746
747#define SIR_CCX_MAX_TSPEC_IES 4
748typedef struct sCCXTspecTspecInfo {
749 tANI_U8 numTspecs;
750 tTspecInfo tspec[SIR_CCX_MAX_TSPEC_IES];
751} tCCXTspecInfo;
752#endif
753
Jeff Johnson295189b2012-06-20 16:38:30 -0700754
755/// Definition for Radar Info
756typedef struct sSirRadarInfo
757{
758 tANI_U8 channelNumber;
759 tANI_U16 radarPulseWidth; // in usecond
760 tANI_U16 numRadarPulse;
761} tSirRadarInfo, *tpSirRadarInfo;
762
763#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
764
765/// Two Background Scan mode
766typedef enum eSirBackgroundScanMode
767{
768 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700769 eSIR_NORMAL_BACKGROUND_SCAN = 1,
770 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700771} tSirBackgroundScanMode;
772
773/// Two types of traffic check
774typedef enum eSirLinkTrafficCheck
775{
776 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700777 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
778 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700779} tSirLinkTrafficCheck;
780
781#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
782#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
783#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
784#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700785#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
786#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700787
788/// Definition for scan request
789typedef struct sSirSmeScanReq
790{
791 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
792 tANI_U16 length;
793 tANI_U8 sessionId; // Session ID
794 tANI_U16 transactionId; // Transaction ID for cmd
795 tSirMacAddr bssId;
796 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
797 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
798 tSirBssType bssType;
799 tANI_U8 dot11mode;
800 tSirScanType scanType;
801 /**
802 * minChannelTime. Not used if scanType is passive.
803 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
804 * 11k measurements set this to zero to user only single duration for scan.
805 * <valid timeout> - Timeout value used for min channel timeout.
806 */
807 tANI_U32 minChannelTime;
808 /**
809 * maxChannelTime.
810 * 0x0 - Invalid. In case of active scan.
811 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
812 *
813 */
814 tANI_U32 maxChannelTime;
815 /**
816 * returnAfterFirstMatch can take following values:
817 * 0x00 - Return SCAN_RSP message after complete channel scan
818 * 0x01 - Return SCAN_RSP message after collecting BSS description
819 * that matches scan criteria.
820 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
821 * 5 GHz band channels
822 * 0x80 - Return after collecting first 11d IE from 5 GHz band
823 * channels
824 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
825 * band channels
826 *
827 * Values of 0xC0, 0x80 & 0x40 are to be used by
828 * Roaming/application when 11d is enabled.
829 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800830 tANI_U32 minChannelTimeBtc; //in units of milliseconds
831 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700832 tANI_U8 returnAfterFirstMatch;
833
834 /**
835 * returnUniqueResults can take following values:
836 * 0 - Collect & report all received BSS descriptions from same BSS.
837 * 1 - Collect & report unique BSS description from same BSS.
838 */
839 tANI_U8 returnUniqueResults;
840
841 /**
842 * returnFreshResults can take following values:
843 * 0x00 - Return background scan results.
844 * 0x80 - Return & purge background scan results
845 * 0x01 - Trigger fresh scan instead of returning background scan
846 * results.
847 * 0x81 - Trigger fresh scan instead of returning background scan
848 * results and purge background scan results.
849 */
850 tANI_U8 returnFreshResults;
851
852 /* backgroundScanMode can take following values:
853 * 0x0 - agressive scan
854 * 0x1 - normal scan where HAL will check for link traffic
855 * prior to proceeding with the scan
856 */
857 tSirBackgroundScanMode backgroundScanMode;
858
859 tANI_U8 hiddenSsid;
860
861 /* Number of SSIDs to scan */
862 tANI_U8 numSsid;
863
864 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
865 /* This MUST be the last field of the structure */
866
867
Jeff Johnson295189b2012-06-20 16:38:30 -0700868 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700869 tANI_U16 uIEFieldLen;
870 tANI_U16 uIEFieldOffset;
871
872 //channelList MUST be the last field of this structure
873 tSirChannelList channelList;
874 /*-----------------------------
875 tSirSmeScanReq....
876 -----------------------------
877 uIEFiledLen
878 -----------------------------
879 uIEFiledOffset ----+
880 ----------------------------- |
881 channelList.numChannels |
882 ----------------------------- |
883 ... variable size up to |
884 channelNumber[numChannels-1] |
885 This can be zero, if |
886 numChannel is zero. |
887 ----------------------------- <--+
888 ... variable size uIEFiled
889 up to uIEFieldLen (can be 0)
890 -----------------------------*/
891} tSirSmeScanReq, *tpSirSmeScanReq;
892
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530893typedef struct sSirSmeScanAbortReq
894{
895 tANI_U16 type;
896 tANI_U16 msgLen;
897 tANI_U8 sessionId;
898} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
899
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530900typedef struct sSirSmeScanChanReq
901{
902 tANI_U16 type;
903 tANI_U16 msgLen;
904 tANI_U8 sessionId;
905 tANI_U16 transcationId;
906} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
907
Jeff Johnsone7245742012-09-05 17:12:55 -0700908#ifdef FEATURE_OEM_DATA_SUPPORT
909
910#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800911#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700912#endif
913#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800914#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700915#endif
916
917typedef struct sSirOemDataReq
918{
919 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
920 tSirMacAddr selfMacAddr;
921 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
922} tSirOemDataReq, *tpSirOemDataReq;
923
924typedef struct sSirOemDataRsp
925{
926 tANI_U16 messageType;
927 tANI_U16 length;
928 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
929} tSirOemDataRsp, *tpSirOemDataRsp;
930
931#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700932
933/// Definition for response message to previously issued scan request
934typedef struct sSirSmeScanRsp
935{
936 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
937 tANI_U16 length;
938 tANI_U8 sessionId;
939 tSirResultCodes statusCode;
940 tANI_U16 transcationId;
941 tSirBssDescription bssDescription[1];
942} tSirSmeScanRsp, *tpSirSmeScanRsp;
943
944/// Sme Req message to set the Background Scan mode
945typedef struct sSirSmeBackgroundScanModeReq
946{
947 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
948 tANI_U16 length;
949 tSirBackgroundScanMode mode;
950} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
951
952/// Background Scan Statisics
953typedef struct sSirBackgroundScanInfo {
954 tANI_U32 numOfScanSuccess;
955 tANI_U32 numOfScanFailure;
956 tANI_U32 reserved;
957} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
958
959#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
960
961/// Definition for Authentication request
962typedef struct sSirSmeAuthReq
963{
964 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
965 tANI_U16 length;
966 tANI_U8 sessionId; // Session ID
967 tANI_U16 transactionId; // Transaction ID for cmd
968 tSirMacAddr bssId; // Self BSSID
969 tSirMacAddr peerMacAddr;
970 tAniAuthType authType;
971 tANI_U8 channelNumber;
972} tSirSmeAuthReq, *tpSirSmeAuthReq;
973
974/// Definition for reponse message to previously issued Auth request
975typedef struct sSirSmeAuthRsp
976{
977 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
978 tANI_U16 length;
979 tANI_U8 sessionId; // Session ID
980 tANI_U16 transactionId; // Transaction ID for cmd
981 tSirMacAddr peerMacAddr;
982 tAniAuthType authType;
983 tSirResultCodes statusCode;
984 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
985 //Otherwise it holds status code.
986} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
987
Jeff Johnson295189b2012-06-20 16:38:30 -0700988
Jeff Johnson295189b2012-06-20 16:38:30 -0700989
Jeff Johnson295189b2012-06-20 16:38:30 -0700990/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
991typedef struct sJoinReassocInfo
992{
993 tAniTitanCBNeighborInfo cbNeighbors;
994 tAniBool spectrumMgtIndicator;
995 tSirMacPowerCapInfo powerCap;
996 tSirSupChnl supportedChannels;
997} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700998
999/// Definition for join request
1000/// ---> MAC
1001/// WARNING! If you add a field in JOIN REQ.
1002/// Make sure to add it in REASSOC REQ
1003/// The Serdes function is the same and its
1004/// shared with REASSOC. So if we add a field
1005// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1006typedef struct sSirSmeJoinReq
1007{
1008 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1009 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001010 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001011 tANI_U16 transactionId;
1012 tSirMacSSid ssId;
1013 tSirMacAddr selfMacAddr; // self Mac address
1014 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1015 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001016 tVOS_CON_MODE staPersona; //Persona
1017 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001018
1019 /*This contains the UAPSD Flag for all 4 AC
1020 * B0: AC_VO UAPSD FLAG
1021 * B1: AC_VI UAPSD FLAG
1022 * B2: AC_BK UAPSD FLAG
1023 * B3: AC_BE UASPD FLAG
1024 */
1025 tANI_U8 uapsdPerAcBitmask;
1026
Jeff Johnson295189b2012-06-20 16:38:30 -07001027 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1028 tSirMacRateSet extendedRateSet; // Has 11g rates
1029 tSirRSNie rsnIE; // RSN IE to be sent in
1030 // (Re) Association Request
1031#ifdef FEATURE_WLAN_CCX
1032 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1033 // the same. The join will never carry cckm, but will be set to
1034 // 0.
1035#endif
1036
1037 tSirAddie addIEScan; // Additional IE to be sent in
1038 // (unicast) Probe Request at the time of join
1039
1040 tSirAddie addIEAssoc; // Additional IE to be sent in
1041 // (Re) Association Request
1042
1043 tAniEdType UCEncryptionType;
1044
1045 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001046
1047#ifdef WLAN_FEATURE_11W
1048 tAniEdType MgmtEncryptionType;
1049#endif
1050
Jeff Johnson295189b2012-06-20 16:38:30 -07001051#ifdef WLAN_FEATURE_VOWIFI_11R
1052 tAniBool is11Rconnection;
1053#endif
1054#ifdef FEATURE_WLAN_CCX
Gopichand Nakkala0ae39db2013-06-10 20:35:49 +05301055 tAniBool isCCXFeatureIniEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001056 tAniBool isCCXconnection;
1057 tCCXTspecInfo ccxTspecInfo;
1058#endif
1059
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001060#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001061 tAniBool isFastTransitionEnabled;
1062#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001063#ifdef FEATURE_WLAN_LFR
1064 tAniBool isFastRoamIniFeatureEnabled;
1065#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001066
1067 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001068#ifdef WLAN_FEATURE_11AC
1069 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001070 tANI_U8 txBFCsnValue;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001071#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001072 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301073 tAniBool isWMEenabled;
1074 tAniBool isQosEnabled;
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;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002203
2204typedef struct sSirCcxBcnReportBssInfo
2205{
2206 tBcnReportFields bcnReportFields;
2207 tANI_U8 ieLen;
2208 tANI_U8 *pBuf;
2209} tSirCcxBcnReportBssInfo, *tpSirCcxBcnReportBssInfo;
2210
2211typedef struct sSirCcxBcnReportRsp
2212{
2213 tANI_U16 measurementToken;
2214 tANI_U8 flag; /* Flag to report measurement done and more data */
2215 tANI_U8 numBss;
2216 tSirCcxBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2217} tSirCcxBcnReportRsp, *tpSirCcxBcnReportRsp;
2218
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002219#endif /* FEATURE_WLAN_CCX || FEATURE_WLAN_CCX_UPLOAD */
2220
Jeff Johnson295189b2012-06-20 16:38:30 -07002221/* Change country code request MSG structure */
2222typedef struct sAniChangeCountryCodeReq
2223{
2224 // Common for all types are requests
2225 tANI_U16 msgType; // message type is same as the request type
2226 tANI_U16 msgLen; // length of the entire request
2227 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302228 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302229 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002230 void *changeCCCallback;
2231 void *pDevContext; //device context
2232 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002233
Jeff Johnson295189b2012-06-20 16:38:30 -07002234} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2235
Amar Singhal0d15bd52013-10-12 23:13:13 -07002236/* generic country code change request MSG structure */
2237typedef struct sAniGenericChangeCountryCodeReq
2238{
2239 // Common for all types are requests
2240 tANI_U16 msgType; // message type is same as the request type
2241 tANI_U16 msgLen; // length of the entire request
2242 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2243 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002244} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2245
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302246typedef struct sAniDHCPStopInd
2247{
2248 tANI_U16 msgType; // message type is same as the request type
2249 tANI_U16 msgLen; // length of the entire request
2250 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2251 tSirMacAddr macAddr;
2252
2253} tAniDHCPInd, *tpAniDHCPInd;
2254
Jeff Johnson295189b2012-06-20 16:38:30 -07002255typedef struct sAniSummaryStatsInfo
2256{
2257 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2258 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2259 // station successfully transmitted after more than one retransmission attempt
2260
2261 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2262 //(with and without retries, including multi-cast, broadcast)
2263 //tANI_U32 tx_fail_cnt;
2264 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2265 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2266 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2267 //(after appropriate filter rules including multi-cast, broadcast)
2268 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2269 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2270 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2271 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2272 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2273 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2274 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2275 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2276 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2277 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2278 //to provide this.
2279#if 0
2280 //providing the following stats, in case of wrap around for tx_byte_cnt
2281 tANI_U32 tx_unicast_lower_byte_cnt;
2282 tANI_U32 tx_unicast_upper_byte_cnt;
2283 tANI_U32 tx_multicast_lower_byte_cnt;
2284 tANI_U32 tx_multicast_upper_byte_cnt;
2285 tANI_U32 tx_broadcast_lower_byte_cnt;
2286 tANI_U32 tx_broadcast_upper_byte_cnt;
2287#endif
2288
2289}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2290
2291typedef enum eTxRateInfo
2292{
2293 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2294 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2295 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2296 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002297 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2298 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2299 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2300 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002301} tTxrateinfoflags;
2302
2303typedef struct sAniGlobalClassAStatsInfo
2304{
2305 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2306 //or MMPDU frames
2307 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2308 //or MMPDU frames when a promiscuous packet filter was enabled
2309 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2310 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2311 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2312 //to a supported rate and the order shall be the same as the supporteRates parameter.
2313 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2314 //for eg: if it is 10.5dBm, the value would be 105
2315 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2316 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2317 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2318 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2319 //500 kbit/sec, for the most
2320 //recently transmitted frame
2321 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2322 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2323 //HT40 rates; short and long guard interval
2324
2325}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2326
2327
2328typedef struct sAniGlobalSecurityStats
2329{
2330 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2331 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2332 //is enabled
2333 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2334 //because of MIC failures
2335 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2336 //because of a TKIP ICV error
2337 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2338 //invalid AES-CCMP format
2339 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2340 //the AES-CCMP replay protection procedure
2341 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2342 //errors detected by the AES-CCMP decryption algorithm
2343 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2344 //not available on the 802.11 station
2345 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2346 //because of a WEP ICV error
2347 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2348 //decrypted
2349 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2350
2351}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2352
2353typedef struct sAniGlobalClassBStatsInfo
2354{
2355 tAniGlobalSecurityStats ucStats;
2356 tAniGlobalSecurityStats mcbcStats;
2357}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2358
2359typedef struct sAniGlobalClassCStatsInfo
2360{
2361 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2362 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2363 //address 1 field
2364 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2365 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2366 //primary channel
2367 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2368 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2369 //when an A-MPDU is received
2370 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2371 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2372 //decoded correctly
2373
2374}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2375
2376typedef struct sAniPerStaStatsInfo
2377{
2378 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2379 //through a received 802.11 ACK frame
2380 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2381 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2382 //is transmitted
2383
2384}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2385
2386/**********************PE Statistics end*************************/
2387
2388
2389
2390typedef struct sSirRSSIThresholds
2391{
2392#ifdef ANI_BIG_BYTE_ENDIAN
2393 tANI_S8 ucRssiThreshold1 : 8;
2394 tANI_S8 ucRssiThreshold2 : 8;
2395 tANI_S8 ucRssiThreshold3 : 8;
2396 tANI_U8 bRssiThres1PosNotify : 1;
2397 tANI_U8 bRssiThres1NegNotify : 1;
2398 tANI_U8 bRssiThres2PosNotify : 1;
2399 tANI_U8 bRssiThres2NegNotify : 1;
2400 tANI_U8 bRssiThres3PosNotify : 1;
2401 tANI_U8 bRssiThres3NegNotify : 1;
2402 tANI_U8 bReserved10 : 2;
2403#else
2404 tANI_U8 bReserved10 : 2;
2405 tANI_U8 bRssiThres3NegNotify : 1;
2406 tANI_U8 bRssiThres3PosNotify : 1;
2407 tANI_U8 bRssiThres2NegNotify : 1;
2408 tANI_U8 bRssiThres2PosNotify : 1;
2409 tANI_U8 bRssiThres1NegNotify : 1;
2410 tANI_U8 bRssiThres1PosNotify : 1;
2411 tANI_S8 ucRssiThreshold3 : 8;
2412 tANI_S8 ucRssiThreshold2 : 8;
2413 tANI_S8 ucRssiThreshold1 : 8;
2414#endif
2415
2416}tSirRSSIThresholds, *tpSirRSSIThresholds;
2417
2418typedef struct sSirRSSINotification
2419{
2420#ifdef ANI_BIG_BYTE_ENDIAN
2421 tANI_U32 bRssiThres1PosCross : 1;
2422 tANI_U32 bRssiThres1NegCross : 1;
2423 tANI_U32 bRssiThres2PosCross : 1;
2424 tANI_U32 bRssiThres2NegCross : 1;
2425 tANI_U32 bRssiThres3PosCross : 1;
2426 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002427 v_S7_t avgRssi : 8;
2428 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002429#else
Srinivasdaaec712012-12-12 15:59:44 -08002430 tANI_U32 bReserved : 18;
2431 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002432 tANI_U32 bRssiThres3NegCross : 1;
2433 tANI_U32 bRssiThres3PosCross : 1;
2434 tANI_U32 bRssiThres2NegCross : 1;
2435 tANI_U32 bRssiThres2PosCross : 1;
2436 tANI_U32 bRssiThres1NegCross : 1;
2437 tANI_U32 bRssiThres1PosCross : 1;
2438#endif
2439
2440}tSirRSSINotification, *tpSirRSSINotification;
2441
Viral Modid86bde22012-12-10 13:09:21 -08002442
2443typedef struct sSirP2PNoaStart
2444{
2445 tANI_U32 status;
2446 tANI_U32 bssIdx;
2447} tSirP2PNoaStart, *tpSirP2PNoaStart;
2448
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302449typedef struct sSirTdlsInd
2450{
2451 tANI_U16 status;
2452 tANI_U16 assocId;
2453 tANI_U16 staIdx;
2454 tANI_U16 reasonCode;
2455} tSirTdlsInd, *tpSirTdlsInd;
2456
Jeff Johnson295189b2012-06-20 16:38:30 -07002457typedef struct sSirP2PNoaAttr
2458{
2459#ifdef ANI_BIG_BYTE_ENDIAN
2460 tANI_U32 index :8;
2461 tANI_U32 oppPsFlag :1;
2462 tANI_U32 ctWin :7;
2463 tANI_U32 rsvd1: 16;
2464#else
2465 tANI_U32 rsvd1: 16;
2466 tANI_U32 ctWin :7;
2467 tANI_U32 oppPsFlag :1;
2468 tANI_U32 index :8;
2469#endif
2470
2471#ifdef ANI_BIG_BYTE_ENDIAN
2472 tANI_U32 uNoa1IntervalCnt:8;
2473 tANI_U32 rsvd2:24;
2474#else
2475 tANI_U32 rsvd2:24;
2476 tANI_U32 uNoa1IntervalCnt:8;
2477#endif
2478 tANI_U32 uNoa1Duration;
2479 tANI_U32 uNoa1Interval;
2480 tANI_U32 uNoa1StartTime;
2481
2482#ifdef ANI_BIG_BYTE_ENDIAN
2483 tANI_U32 uNoa2IntervalCnt:8;
2484 tANI_U32 rsvd3:24;
2485#else
2486 tANI_U32 rsvd3:24;
2487 tANI_U32 uNoa2IntervalCnt:8;
2488#endif
2489 tANI_U32 uNoa2Duration;
2490 tANI_U32 uNoa2Interval;
2491 tANI_U32 uNoa2StartTime;
2492} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002493
2494typedef __ani_attr_pre_packed struct sSirTclasInfo
2495{
2496 tSirMacTclasIE tclas;
2497 tANI_U8 version; // applies only for classifier type ip
2498 __ani_attr_pre_packed union {
2499 tSirMacTclasParamEthernet eth;
2500 tSirMacTclasParamIPv4 ipv4;
2501 tSirMacTclasParamIPv6 ipv6;
2502 tSirMacTclasParam8021dq t8021dq;
2503 }__ani_attr_packed tclasParams;
2504} __ani_attr_packed tSirTclasInfo;
2505
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002506
2507#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
2508#define TSRS_11AG_RATE_6MBPS 0xC
2509#define TSRS_11B_RATE_5_5MBPS 0xB
2510
2511typedef struct sSirMacCCXTSRSIE
2512{
2513 tANI_U8 tsid;
2514 tANI_U8 rates[8];
2515} tSirMacCCXTSRSIE;
2516
2517typedef struct sSirMacCCXTSMIE
2518{
2519 tANI_U8 tsid;
2520 tANI_U8 state;
2521 tANI_U16 msmt_interval;
2522} tSirMacCCXTSMIE;
2523
2524typedef struct sTSMStats
2525{
2526 tANI_U8 tid;
2527 tSirMacAddr bssId;
2528 tTrafStrmMetrics tsmMetrics;
2529} tTSMStats, *tpTSMStats;
2530
2531typedef struct sCcxTSMContext
2532{
2533 tANI_U8 tid;
2534 tSirMacCCXTSMIE tsmInfo;
2535 tTrafStrmMetrics tsmMetrics;
2536} tCcxTSMContext, *tpCcxTSMContext;
2537
2538typedef struct sCcxPEContext
2539{
2540#if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD)
2541 tCcxMeasReq curMeasReq;
2542#endif
2543 tCcxTSMContext tsm;
2544} tCcxPEContext, *tpCcxPEContext;
2545
2546
2547#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
2548
2549
Jeff Johnson295189b2012-06-20 16:38:30 -07002550typedef struct sSirAddtsReqInfo
2551{
2552 tANI_U8 dialogToken;
2553 tSirMacTspecIE tspec;
2554
2555 tANI_U8 numTclas; // number of Tclas elements
2556 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2557 tANI_U8 tclasProc;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002558#if defined(FEATURE_WLAN_CCX)
Jeff Johnson295189b2012-06-20 16:38:30 -07002559 tSirMacCCXTSRSIE tsrsIE;
2560 tANI_U8 tsrsPresent:1;
2561#endif
2562 tANI_U8 wmeTspecPresent:1;
2563 tANI_U8 wsmTspecPresent:1;
2564 tANI_U8 lleTspecPresent:1;
2565 tANI_U8 tclasProcPresent:1;
2566} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2567
2568typedef struct sSirAddtsRspInfo
2569{
2570 tANI_U8 dialogToken;
2571 tSirMacStatusCodes status;
2572 tSirMacTsDelayIE delay;
2573
2574 tSirMacTspecIE tspec;
2575 tANI_U8 numTclas; // number of Tclas elements
2576 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2577 tANI_U8 tclasProc;
2578 tSirMacScheduleIE schedule;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002579#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -07002580 tSirMacCCXTSMIE tsmIE;
2581 tANI_U8 tsmPresent:1;
2582#endif
2583 tANI_U8 wmeTspecPresent:1;
2584 tANI_U8 wsmTspecPresent:1;
2585 tANI_U8 lleTspecPresent:1;
2586 tANI_U8 tclasProcPresent:1;
2587 tANI_U8 schedulePresent:1;
2588} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2589
2590typedef struct sSirDeltsReqInfo
2591{
2592 tSirMacTSInfo tsinfo;
2593 tSirMacTspecIE tspec;
2594 tANI_U8 wmeTspecPresent:1;
2595 tANI_U8 wsmTspecPresent:1;
2596 tANI_U8 lleTspecPresent:1;
2597} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2598
2599/// Add a tspec as defined
2600typedef struct sSirAddtsReq
2601{
2602 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2603 tANI_U16 length;
2604 tANI_U8 sessionId; //Session ID
2605 tANI_U16 transactionId;
2606 tSirMacAddr bssId; //BSSID
2607 tANI_U32 timeout; // in ms
2608 tANI_U8 rspReqd;
2609 tSirAddtsReqInfo req;
2610} tSirAddtsReq, *tpSirAddtsReq;
2611
2612typedef struct sSirAddtsRsp
2613{
2614 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2615 tANI_U16 length;
2616 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2617 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2618 tANI_U32 rc; // return code
2619 tSirAddtsRspInfo rsp;
2620} tSirAddtsRsp, *tpSirAddtsRsp;
2621
2622typedef struct sSirDeltsReq
2623{
2624 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2625 tANI_U16 length;
2626 tANI_U8 sessionId;//Session ID
2627 tANI_U16 transactionId;
2628 tSirMacAddr bssId; //BSSID
2629 tANI_U16 aid; // use 0 if macAddr is being specified
2630 tANI_U8 macAddr[6]; // only on AP to specify the STA
2631 tANI_U8 rspReqd;
2632 tSirDeltsReqInfo req;
2633} tSirDeltsReq, *tpSirDeltsReq;
2634
2635typedef struct sSirDeltsRsp
2636{
2637 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2638 tANI_U16 length;
2639 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2640 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2641 tANI_U32 rc;
2642 tANI_U16 aid; // use 0 if macAddr is being specified
2643 tANI_U8 macAddr[6]; // only on AP to specify the STA
2644 tSirDeltsReqInfo rsp;
2645} tSirDeltsRsp, *tpSirDeltsRsp;
2646
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002647#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002648
2649#define SIR_QOS_NUM_TSPEC_MAX 2
2650#define SIR_QOS_NUM_AC_MAX 4
2651
2652typedef struct sSirAggrQosReqInfo
2653{
2654 tANI_U16 tspecIdx;
2655 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2656}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2657
2658typedef struct sSirAggrQosReq
2659{
2660 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2661 tANI_U16 length;
2662 tANI_U8 sessionId; //Session ID
2663 tANI_U16 transactionId;
2664 tSirMacAddr bssId; //BSSID
2665 tANI_U32 timeout; // in ms
2666 tANI_U8 rspReqd;
2667 tSirAggrQosReqInfo aggrInfo;
2668}tSirAggrQosReq, *tpSirAggrQosReq;
2669
2670typedef struct sSirAggrQosRspInfo
2671{
2672 tANI_U16 tspecIdx;
2673 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2674} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2675
2676typedef struct sSirAggrQosRsp
2677{
2678 tANI_U16 messageType;
2679 tANI_U16 length;
2680 tANI_U8 sessionId;
2681 tSirAggrQosRspInfo aggrInfo;
2682} tSirAggrQosRsp, *tpSirAggrQosRsp;
2683
2684#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_CCX*/
2685
2686typedef struct sSirSetTxPowerReq
2687{
schang86c22c42013-03-13 18:41:24 -07002688 tANI_U16 messageType;
2689 tANI_U16 length;
2690 tSirMacAddr bssId;
2691 tANI_U8 mwPower;
2692 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002693} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2694
2695typedef struct sSirSetTxPowerRsp
2696{
2697 tANI_U16 messageType;
2698 tANI_U16 length;
2699 tANI_U32 status;
2700} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2701
2702typedef struct sSirGetTxPowerReq
2703{
2704 tANI_U16 messageType;
2705 tANI_U16 length;
2706 tANI_U16 staid;
2707} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2708
2709typedef struct sSirGetTxPowerRsp
2710{
2711 tANI_U16 messageType;
2712 tANI_U16 length; // length of the entire request
2713 tANI_U32 power; // units of milliwatts
2714 tANI_U32 status;
2715} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2716
2717
2718typedef tANI_U32 tSirMacNoise[3];
2719
2720typedef struct sSirGetNoiseRsp
2721{
2722 tANI_U16 messageType;
2723 tANI_U16 length;
2724 tSirMacNoise noise;
2725} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2726
2727
2728//
2729// PMC --> PE --> HAL
2730// Power save configuration parameters
2731//
2732typedef struct sSirPowerSaveCfg
2733{
2734 tANI_U16 listenInterval;
2735
2736 /* Number of consecutive missed beacons before
2737 * hardware generates an interrupt to wake up
2738 * the host. In units of listen interval.
2739 */
2740 tANI_U32 HeartBeatCount;
2741
2742 /* specifies which beacons are to be forwarded
2743 * to host when beacon filtering is enabled.
2744 * In units of listen interval.
2745 */
2746 tANI_U32 nthBeaconFilter;
2747
2748 /* Maximum number of PS-Poll send before
2749 * firmware sends data null with PM set to 0.
2750 */
2751 tANI_U32 maxPsPoll;
2752
2753 /* If the average RSSI value falls below the
2754 * minRssiThreshold, then FW will send an
2755 * interrupt to wake up the host.
2756 */
2757 tANI_U32 minRssiThreshold;
2758
2759 /* Number of beacons for which firmware will
2760 * collect the RSSI values and compute the average.
2761 */
2762 tANI_U8 numBeaconPerRssiAverage;
2763
2764 /* FW collects the RSSI stats for this period
2765 * in BMPS mode.
2766 */
2767 tANI_U8 rssiFilterPeriod;
2768
2769 // Enabling/disabling broadcast frame filter feature
2770 tANI_U8 broadcastFrameFilter;
2771
2772 // Enabling/disabling the ignore DTIM feature
2773 tANI_U8 ignoreDtim;
2774
2775 /* The following configuration parameters are kept
2776 * in order to be backward compatible for Gen5.
2777 * These will NOT be used for Gen6 Libra chip
2778 */
2779 tBeaconForwarding beaconFwd;
2780 tANI_U16 nthBeaconFwd;
2781 tANI_U8 fEnablePwrSaveImmediately;
2782 tANI_U8 fPSPoll;
2783
2784 // Enabling/disabling Beacon Early Termination feature
2785 tANI_U8 fEnableBeaconEarlyTermination;
2786 tANI_U8 bcnEarlyTermWakeInterval;
2787
2788}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2789
2790/* Reason code for requesting Full Power. This reason code is used by
2791 any module requesting full power from PMC and also by PE when it
2792 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2793typedef enum eRequestFullPowerReason
2794{
2795 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2796 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2797 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2798 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2799 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2800 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2801 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2802 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2803 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2804 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002805#ifdef FEATURE_WLAN_TDLS
2806 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2807#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002808 eSME_REASON_OTHER /* No specific reason. General reason code */
2809} tRequestFullPowerReason, tExitBmpsReason;
2810
2811
2812
2813//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2814typedef struct sExitBmpsInfo
2815{
2816 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2817}tExitBmpsInfo, *tpExitBmpsInfo;
2818
2819
2820// MAC SW --> SME
2821// Message indicating to SME to exit BMPS sleep mode
2822typedef struct sSirSmeExitBmpsInd
2823{
2824 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2825 tANI_U16 mesgLen;
2826 tSirResultCodes statusCode;
2827 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2828
2829} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2830
2831
2832//
2833// HDD -> LIM
2834// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2835// tSirMsgQ.reserved = 0
2836// tSirMsgQ.body = instance of tDelBAParams
2837//
2838typedef struct sSmeDelBAPeerInd
2839{
2840 // Message Type
2841 tANI_U16 mesgType;
2842
2843 tSirMacAddr bssId;//BSSID
2844
2845 // Message Length
2846 tANI_U16 mesgLen;
2847
2848 // Station Index
2849 tANI_U16 staIdx;
2850
2851 // TID for which the BA session is being deleted
2852 tANI_U8 baTID;
2853
2854 // DELBA direction
2855 // eBA_INITIATOR - Originator
2856 // eBA_RECEIPIENT - Recipient
2857 tANI_U8 baDirection;
2858} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2859
2860typedef struct sSmeIbssPeerInd
2861{
2862 tANI_U16 mesgType;
2863 tANI_U16 mesgLen;
2864 tANI_U8 sessionId;
2865
2866 tSirMacAddr peerAddr;
2867 tANI_U16 staId;
2868
2869 /*The DPU signatures will be sent eventually to TL to help it determine the
2870 association to which a packet belongs to*/
2871 /*Unicast DPU signature*/
2872 tANI_U8 ucastSig;
2873
2874 /*Broadcast DPU signature*/
2875 tANI_U8 bcastSig;
2876
2877 //Beacon will be appended for new Peer indication.
2878}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2879
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002880typedef struct sSirIbssPeerInactivityInd
2881{
2882 tANI_U8 bssIdx;
2883 tANI_U8 staIdx;
2884 tSirMacAddr peerAddr;
2885}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2886
2887
Jeff Johnson295189b2012-06-20 16:38:30 -07002888typedef struct sLimScanChn
2889{
2890 tANI_U16 numTimeScan; //how many time this channel is scan
2891 tANI_U8 channelId;
2892}tLimScanChn;
2893
2894typedef struct sSmeGetScanChnRsp
2895{
2896 // Message Type
2897 tANI_U16 mesgType;
2898 // Message Length
2899 tANI_U16 mesgLen;
2900 tANI_U8 sessionId;
2901 tANI_U8 numChn;
2902 tLimScanChn scanChn[1];
2903} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2904
2905typedef struct sLimScanChnInfo
2906{
2907 tANI_U8 numChnInfo; //number of channels in scanChn
2908 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2909}tLimScanChnInfo;
2910
Jeff Johnson295189b2012-06-20 16:38:30 -07002911typedef struct sSirSmeGetAssocSTAsReq
2912{
2913 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2914 tANI_U16 length;
2915 tSirMacAddr bssId; // BSSID
2916 tANI_U16 modId;
2917 void *pUsrContext;
2918 void *pSapEventCallback;
2919 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2920} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002921
2922typedef struct sSmeMaxAssocInd
2923{
2924 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2925 tANI_U16 mesgLen;
2926 tANI_U8 sessionId;
2927 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2928} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2929
2930/*--------------------------------------------------------------------*/
2931/* BootLoader message definition */
2932/*--------------------------------------------------------------------*/
2933
2934/*--------------------------------------------------------------------*/
2935/* FW image size */
2936/*--------------------------------------------------------------------*/
2937#define SIR_FW_IMAGE_SIZE 146332
2938
2939
2940#define SIR_BOOT_MODULE_ID 1
2941
2942#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2943#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2944#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2945#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2946#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2947#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2948#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2949
2950/*--------------------------------------------------------------------*/
2951/* Bootloader message syntax */
2952/*--------------------------------------------------------------------*/
2953
2954// Message header
2955#define SIR_BOOT_MB_HEADER 0
2956#define SIR_BOOT_MB_HEADER2 1
2957
2958#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2959#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2960
2961// BOOT_SETUP_IND parameter indices
2962#define SIR_BOOT_SETUP_IND_MBADDR 2
2963#define SIR_BOOT_SETUP_IND_MBSIZE 3
2964#define SIR_BOOT_SETUP_IND_MEMOPT 4
2965#define SIR_BOOT_SETUP_IND_LEN \
2966 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2967
2968// BOOT_POST_RESULT_IND parameter indices
2969#define SIR_BOOT_POST_RESULT_IND_RES 2
2970#define SIR_BOOT_POST_RESULT_IND_LEN \
2971 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
2972
2973#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
2974#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
2975#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
2976#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
2977
2978
2979// BOOT_DNLD_RESULT_IND parameter indices
2980#define SIR_BOOT_DNLD_RESULT_IND_RES 2
2981#define SIR_BOOT_DNLD_RESULT_IND_LEN \
2982 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
2983
2984#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
2985#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
2986#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
2987
2988// BOOT_DNLD_DEV_REQ
2989#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
2990#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
2991#define SIR_BOOT_DNLD_DEV_REQ_LEN \
2992 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
2993
2994// BOOT_DNLD_DEV_RSP
2995#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
2996#define SIR_BOOT_DNLD_DEV_RSP_LEN \
2997 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
2998
2999#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3000#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3001
3002// BOOT_DNLD_REQ
3003#define SIR_BOOT_DNLD_REQ_OFFSET 2
3004#define SIR_BOOT_DNLD_REQ_WRADDR 3
3005#define SIR_BOOT_DNLD_REQ_SIZE 4
3006#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3007
3008// BOOT_DNLD_RSP
3009#define SIR_BOOT_DNLD_RSP_SIZE 2
3010#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3011
Jeff Johnson295189b2012-06-20 16:38:30 -07003012
3013// board capabilities fields are defined here.
3014typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3015{
3016#ifndef ANI_LITTLE_BIT_ENDIAN
3017 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3018 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3019 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3020 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3021 tANI_U32 rsvd1:2;
3022 // (productId derives sub-category in the following three families)
3023 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3024 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3025 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3026 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3027 tANI_U32 bbChipVer:4; // Baseband chip version
3028 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3029 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3030 tANI_U32 nReceivers:2; // 0 based.
3031 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3032 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3033 tANI_U32 rsvd:1;
3034 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3035#else
3036
3037 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3038 tANI_U32 rsvd:1;
3039 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3040 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3041 tANI_U32 nReceivers:2; // 0 based.
3042 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3043 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3044 tANI_U32 bbChipVer:4; // Baseband chip version
3045 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3046 // (productId derives sub-category in the following three families)
3047 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3048 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3049 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3050 tANI_U32 rsvd1:2;
3051 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3052 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3053 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3054 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3055#endif
3056} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3057
3058# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3059# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3060
3061# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3062# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3063
3064# define ANI_BCAP_SDRAM_MASK 0x4
3065# define ANI_BCAP_SDRAM_OFFSET 2
3066
3067# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3068# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3069
3070# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3071# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3072
3073# define ANI_BCAP_RADIO_ON_MASK 0xC0
3074# define ANI_BCAP_RADIO_ON_OFFSET 6
3075
3076# define ANI_BCAP_LO_TYPE_MASK 0x300
3077# define ANI_BCAP_LO_TYPE_OFFSET 8
3078
3079# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3080# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3081
3082# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3083# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3084
3085# define ANI_BCAP_RADIO_OFF 0
3086# define ANI_BCAP_RADIO_ON 1
3087# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3088
3089
3090/// WOW related structures
3091// SME -> PE <-> HAL
3092#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3093#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3094
3095// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3096// SME/HDD maintains the list of the BCAST wake-up patterns.
3097// This is a pass through message for PE
3098typedef struct sSirWowlAddBcastPtrn
3099{
3100 tANI_U8 ucPatternId; // Pattern ID
3101 // Pattern byte offset from beginning of the 802.11 packet to start of the
3102 // wake-up pattern
3103 tANI_U8 ucPatternByteOffset;
3104 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3105 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3106 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3107 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3108 // Extra pattern data beyond 128 bytes
3109 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3110 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003111 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003112} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3113
3114
3115// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3116// SME/HDD maintains the list of the BCAST wake-up patterns.
3117// This is a pass through message for PE
3118typedef struct sSirWowlDelBcastPtrn
3119{
3120 /* Pattern ID of the wakeup pattern to be deleted */
3121 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003122 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003123}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3124
3125
3126// SME->PE: Enter WOWLAN parameters
3127typedef struct sSirSmeWowlEnterParams
3128{
3129 /* Enables/disables magic packet filtering */
3130 tANI_U8 ucMagicPktEnable;
3131
3132 /* Magic pattern */
3133 tSirMacAddr magicPtrn;
3134
3135 /* Enables/disables packet pattern filtering */
3136 tANI_U8 ucPatternFilteringEnable;
3137
3138#ifdef WLAN_WAKEUP_EVENTS
3139 /* This configuration directs the WoW packet filtering to look for EAP-ID
3140 * requests embedded in EAPOL frames and use this as a wake source.
3141 */
3142 tANI_U8 ucWoWEAPIDRequestEnable;
3143
3144 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3145 * requests and use this as a wake source.
3146 */
3147 tANI_U8 ucWoWEAPOL4WayEnable;
3148
3149 /* This configuration allows a host wakeup on an network scan offload match.
3150 */
3151 tANI_U8 ucWowNetScanOffloadMatch;
3152
3153 /* This configuration allows a host wakeup on any GTK rekeying error.
3154 */
3155 tANI_U8 ucWowGTKRekeyError;
3156
3157 /* This configuration allows a host wakeup on BSS connection loss.
3158 */
3159 tANI_U8 ucWoWBSSConnLoss;
3160#endif // WLAN_WAKEUP_EVENTS
3161
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003162 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003163} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3164
3165
3166// PE<->HAL: Enter WOWLAN parameters
3167typedef struct sSirHalWowlEnterParams
3168{
3169 /* Enables/disables magic packet filtering */
3170 tANI_U8 ucMagicPktEnable;
3171
3172 /* Magic pattern */
3173 tSirMacAddr magicPtrn;
3174
3175 /* Enables/disables packet pattern filtering in firmware.
3176 Enabling this flag enables broadcast pattern matching
3177 in Firmware. If unicast pattern matching is also desired,
3178 ucUcastPatternFilteringEnable flag must be set tot true
3179 as well
3180 */
3181 tANI_U8 ucPatternFilteringEnable;
3182
3183 /* Enables/disables unicast packet pattern filtering.
3184 This flag specifies whether we want to do pattern match
3185 on unicast packets as well and not just broadcast packets.
3186 This flag has no effect if the ucPatternFilteringEnable
3187 (main controlling flag) is set to false
3188 */
3189 tANI_U8 ucUcastPatternFilteringEnable;
3190
3191 /* This configuration is valid only when magicPktEnable=1.
3192 * It requests hardware to wake up when it receives the
3193 * Channel Switch Action Frame.
3194 */
3195 tANI_U8 ucWowChnlSwitchRcv;
3196
3197 /* This configuration is valid only when magicPktEnable=1.
3198 * It requests hardware to wake up when it receives the
3199 * Deauthentication Frame.
3200 */
3201 tANI_U8 ucWowDeauthRcv;
3202
3203 /* This configuration is valid only when magicPktEnable=1.
3204 * It requests hardware to wake up when it receives the
3205 * Disassociation Frame.
3206 */
3207 tANI_U8 ucWowDisassocRcv;
3208
3209 /* This configuration is valid only when magicPktEnable=1.
3210 * It requests hardware to wake up when it has missed
3211 * consecutive beacons. This is a hardware register
3212 * configuration (NOT a firmware configuration).
3213 */
3214 tANI_U8 ucWowMaxMissedBeacons;
3215
3216 /* This configuration is valid only when magicPktEnable=1.
3217 * This is a timeout value in units of microsec. It requests
3218 * hardware to unconditionally wake up after it has stayed
3219 * in WoWLAN mode for some time. Set 0 to disable this feature.
3220 */
3221 tANI_U8 ucWowMaxSleepUsec;
3222
3223#ifdef WLAN_WAKEUP_EVENTS
3224 /* This configuration directs the WoW packet filtering to look for EAP-ID
3225 * requests embedded in EAPOL frames and use this as a wake source.
3226 */
3227 tANI_U8 ucWoWEAPIDRequestEnable;
3228
3229 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3230 * requests and use this as a wake source.
3231 */
3232 tANI_U8 ucWoWEAPOL4WayEnable;
3233
3234 /* This configuration allows a host wakeup on an network scan offload match.
3235 */
3236 tANI_U8 ucWowNetScanOffloadMatch;
3237
3238 /* This configuration allows a host wakeup on any GTK rekeying error.
3239 */
3240 tANI_U8 ucWowGTKRekeyError;
3241
3242 /* This configuration allows a host wakeup on BSS connection loss.
3243 */
3244 tANI_U8 ucWoWBSSConnLoss;
3245#endif // WLAN_WAKEUP_EVENTS
3246
3247 /* Status code to be filled by HAL when it sends
3248 * SIR_HAL_WOWL_ENTER_RSP to PE.
3249 */
3250 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003251
3252 /*BSSID to find the current session
3253 */
3254 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003255} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3256
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003257// PE<->HAL: Exit WOWLAN parameters
3258typedef struct sSirHalWowlExitParams
3259{
3260 /* Status code to be filled by HAL when it sends
3261 * SIR_HAL_WOWL_EXIT_RSP to PE.
3262 */
3263 eHalStatus status;
3264
3265 /*BSSIDX to find the current session
3266 */
3267 tANI_U8 bssIdx;
3268} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3269
Jeff Johnson295189b2012-06-20 16:38:30 -07003270
3271#define SIR_MAX_NAME_SIZE 64
3272#define SIR_MAX_TEXT_SIZE 32
3273
3274typedef struct sSirName {
3275 v_U8_t num_name;
3276 v_U8_t name[SIR_MAX_NAME_SIZE];
3277} tSirName;
3278
3279typedef struct sSirText {
3280 v_U8_t num_text;
3281 v_U8_t text[SIR_MAX_TEXT_SIZE];
3282} tSirText;
3283
3284
3285#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3286#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3287#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3288#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3289#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3290#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3291#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3292#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3293#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3294#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3295#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3296#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3297#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3298#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3299#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3300#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3301
3302
3303typedef struct sSirWPSProbeRspIE {
3304 v_U32_t FieldPresent;
3305 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3306 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3307 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3308 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3309 v_U16_t DevicePasswordID; // Device Password ID
3310 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3311 v_U8_t ResponseType; // Response type
3312 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3313 tSirName Manufacture;
3314 tSirText ModelName;
3315 tSirText ModelNumber;
3316 tSirText SerialNumber;
3317 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3318 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3319 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3320 tSirText DeviceName;
3321 v_U16_t ConfigMethod; // Configuaration method
3322 v_U8_t RFBand; // RF bands available on the AP
3323} tSirWPSProbeRspIE;
3324
3325#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3326#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3327#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3328#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3329#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3330#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3331#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3332#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3333
3334typedef struct sSirWPSBeaconIE {
3335 v_U32_t FieldPresent;
3336 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3337 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3338 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3339 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3340 v_U16_t DevicePasswordID; // Device Password ID
3341 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3342 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3343 v_U8_t RFBand; // RF bands available on the AP
3344} tSirWPSBeaconIE;
3345
3346#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3347#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3348
3349typedef struct sSirWPSAssocRspIE {
3350 v_U32_t FieldPresent;
3351 v_U32_t Version;
3352 v_U8_t ResposeType;
3353} tSirWPSAssocRspIE;
3354
3355typedef struct sSirAPWPSIEs {
3356 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3357 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3358 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3359} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3360
3361typedef struct sSirUpdateAPWPSIEsReq
3362{
3363 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3364 tANI_U16 length;
3365 tANI_U16 transactionId; //Transaction ID for cmd
3366 tSirMacAddr bssId; // BSSID
3367 tANI_U8 sessionId; //Session ID
3368 tSirAPWPSIEs APWPSIEs;
3369} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3370
3371typedef struct sSirUpdateParams
3372{
3373 tANI_U16 messageType;
3374 tANI_U16 length;
3375 tANI_U8 sessionId; // Session ID
3376 tANI_U8 ssidHidden; // Hide SSID
3377} tSirUpdateParams, *tpSirUpdateParams;
3378
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003379//Beacon Interval
3380typedef struct sSirChangeBIParams
3381{
3382 tANI_U16 messageType;
3383 tANI_U16 length;
3384 tANI_U16 beaconInterval; // Beacon Interval
3385 tSirMacAddr bssId;
3386 tANI_U8 sessionId; // Session ID
3387} tSirChangeBIParams, *tpSirChangeBIParams;
3388
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303389typedef struct sSirOBSSHT40Param
3390{
3391 tANI_U16 OBSSScanPassiveDwellTime;
3392 tANI_U16 OBSSScanActiveDwellTime;
3393 tANI_U16 BSSChannelWidthTriggerScanInterval;
3394 tANI_U16 OBSSScanPassiveTotalPerChannel;
3395 tANI_U16 OBSSScanActiveTotalPerChannel;
3396 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3397 tANI_U16 OBSSScanActivityThreshold;
3398}tSirOBSSHT40Param, *tpOBSSHT40Param;
3399
Jeff Johnson295189b2012-06-20 16:38:30 -07003400#define SIR_WPS_UUID_LEN 16
3401#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3402
3403typedef struct sSirWPSPBCSession {
3404 struct sSirWPSPBCSession *next;
3405 tSirMacAddr addr;
3406 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3407 tANI_TIMESTAMP timestamp;
3408} tSirWPSPBCSession;
3409
3410typedef struct sSirSmeGetWPSPBCSessionsReq
3411{
3412 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3413 tANI_U16 length;
3414 void *pUsrContext;
3415 void *pSapEventCallback;
3416 tSirMacAddr bssId; // BSSID
3417 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3418} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3419
3420typedef struct sSirWPSPBCProbeReq
3421{
3422 tSirMacAddr peerMacAddr;
3423 tANI_U16 probeReqIELen;
3424 tANI_U8 probeReqIE[512];
3425} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3426
3427// probereq from peer, when wsc is enabled
3428typedef struct sSirSmeProbeReqInd
3429{
3430 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3431 tANI_U16 length;
3432 tANI_U8 sessionId;
3433 tSirMacAddr bssId;
3434 tSirWPSPBCProbeReq WPSPBCProbeReq;
3435} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3436
3437typedef struct sSirUpdateAPWPARSNIEsReq
3438{
3439 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3440 tANI_U16 length;
3441 tANI_U16 transactionId; //Transaction ID for cmd
3442 tSirMacAddr bssId; // BSSID
3443 tANI_U8 sessionId; //Session ID
3444 tSirRSNie APWPARSNIEs;
3445} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3446
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003447#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003448#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003449#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3450#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3451#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3452#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3453#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3454#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3455#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003456
3457/*Adaptive Thresholds to be used for FW based scanning*/
3458#define LFR_SENSITIVITY_THR_1MBPS -89
3459#define LFR_LOOKUP_THR_1MBPS -78
3460#define LFR_SENSITIVITY_THR_2MBPS -87
3461#define LFR_LOOKUP_THR_2MBPS -78
3462#define LFR_SENSITIVITY_THR_5_5MBPS -86
3463#define LFR_LOOKUP_THR_5_5MBPS -77
3464#define LFR_SENSITIVITY_THR_11MBPS -85
3465#define LFR_LOOKUP_THR_11MBPS -76
3466#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3467#define LFR_LOOKUP_THR_6MBPS_2G -78
3468#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3469#define LFR_LOOKUP_THR_6MBPS_5G -78
3470#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3471#define LFR_LOOKUP_THR_12MBPS_2G -78
3472#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3473#define LFR_LOOKUP_THR_12MBPS_5G -76
3474#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3475#define LFR_LOOKUP_THR_24MBPS_2G -76
3476#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3477#define LFR_LOOKUP_THR_24MBPS_5G -74
3478#define LFR_SENSITIVITY_THR_DEFAULT 0
3479#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003480#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003481
3482// SME -> HAL - This is the host offload request.
3483#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3484#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3485#define SIR_IPV6_NS_OFFLOAD 2
3486#define SIR_OFFLOAD_DISABLE 0
3487#define SIR_OFFLOAD_ENABLE 1
3488#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303489#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003490#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303491#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003492
3493#ifdef WLAN_NS_OFFLOAD
3494typedef struct sSirNsOffloadReq
3495{
3496 tANI_U8 srcIPv6Addr[16];
3497 tANI_U8 selfIPv6Addr[16];
3498 //Only support 2 possible Network Advertisement IPv6 address
3499 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3500 tANI_U8 selfMacAddr[6];
3501 tANI_U8 srcIPv6AddrValid;
3502 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303503 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003504} tSirNsOffloadReq, *tpSirNsOffloadReq;
3505#endif //WLAN_NS_OFFLOAD
3506
3507typedef struct sSirHostOffloadReq
3508{
3509 tANI_U8 offloadType;
3510 tANI_U8 enableOrDisable;
3511 union
3512 {
3513 tANI_U8 hostIpv4Addr [4];
3514 tANI_U8 hostIpv6Addr [16];
3515 } params;
3516#ifdef WLAN_NS_OFFLOAD
3517 tSirNsOffloadReq nsOffloadInfo;
3518#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003519 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003520} tSirHostOffloadReq, *tpSirHostOffloadReq;
3521
3522/* Packet Types. */
3523#define SIR_KEEP_ALIVE_NULL_PKT 1
3524#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3525
3526/* Enable or disable offload. */
3527#define SIR_KEEP_ALIVE_DISABLE 0
3528#define SIR_KEEP_ALIVE_ENABLE 1
3529
3530/* Keep Alive request. */
3531typedef struct sSirKeepAliveReq
3532{
3533 v_U8_t packetType;
3534 v_U32_t timePeriod;
3535 tSirIpv4Addr hostIpv4Addr;
3536 tSirIpv4Addr destIpv4Addr;
3537 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003538 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003539} tSirKeepAliveReq, *tpSirKeepAliveReq;
3540
3541typedef struct sSirSmeAddStaSelfReq
3542{
3543 tANI_U16 mesgType;
3544 tANI_U16 mesgLen;
3545 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003546 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003547}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3548
3549typedef struct sSirSmeDelStaSelfReq
3550{
3551 tANI_U16 mesgType;
3552 tANI_U16 mesgLen;
3553 tSirMacAddr selfMacAddr;
3554}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3555
3556typedef struct sSirSmeAddStaSelfRsp
3557{
3558 tANI_U16 mesgType;
3559 tANI_U16 mesgLen;
3560 tANI_U16 status;
3561 tSirMacAddr selfMacAddr;
3562}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3563
3564typedef struct sSirSmeDelStaSelfRsp
3565{
3566 tANI_U16 mesgType;
3567 tANI_U16 mesgLen;
3568 tANI_U16 status;
3569 tSirMacAddr selfMacAddr;
3570}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3571
3572/* Coex Indication defines -
3573 should match WLAN_COEX_IND_DATA_SIZE
3574 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3575 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3576#define SIR_COEX_IND_DATA_SIZE (4)
3577#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3578#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003579#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3580#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003581#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3582#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003583
3584typedef struct sSirSmeCoexInd
3585{
3586 tANI_U16 mesgType;
3587 tANI_U16 mesgLen;
3588 tANI_U32 coexIndType;
3589 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3590}tSirSmeCoexInd, *tpSirSmeCoexInd;
3591
Jeff Johnson295189b2012-06-20 16:38:30 -07003592typedef struct sSirSmeMgmtFrameInd
3593{
3594 tANI_U16 mesgType;
3595 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303596 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003597 tANI_U8 sessionId;
3598 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303599 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003600 tANI_U8 frameBuf[1]; //variable
3601}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003602
Chet Lanctot186b5732013-03-18 10:26:30 -07003603#ifdef WLAN_FEATURE_11W
3604typedef struct sSirSmeUnprotMgmtFrameInd
3605{
3606 tANI_U8 sessionId;
3607 tANI_U8 frameType;
3608 tANI_U8 frameLen;
3609 tANI_U8 frameBuf[1]; //variable
3610}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3611#endif
3612
Jeff Johnson295189b2012-06-20 16:38:30 -07003613#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3614 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3615 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3616 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3617#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3618 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3619
3620/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003621typedef struct sSirNoAParam
3622{
3623 tANI_U8 ctWindow:7;
3624 tANI_U8 OppPS:1;
3625 tANI_U8 count;
3626 tANI_U32 duration;
3627 tANI_U32 interval;
3628 tANI_U32 singleNoADuration;
3629 tANI_U8 psSelection;
3630}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003631
Jeff Johnson295189b2012-06-20 16:38:30 -07003632typedef struct sSirWlanSuspendParam
3633{
3634 tANI_U8 configuredMcstBcstFilterSetting;
3635}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3636
3637typedef struct sSirWlanResumeParam
3638{
3639 tANI_U8 configuredMcstBcstFilterSetting;
3640}tSirWlanResumeParam,*tpSirWlanResumeParam;
3641
3642typedef struct sSirWlanSetRxpFilters
3643{
3644 tANI_U8 configuredMcstBcstFilterSetting;
3645 tANI_U8 setMcstBcstFilter;
3646}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003647
3648
3649#ifdef FEATURE_WLAN_SCAN_PNO
3650//
3651// PNO Messages
3652//
3653
3654// Set PNO
3655#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303656#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003657#define SIR_PNO_MAX_SUPP_NETWORKS 16
3658#define SIR_PNO_MAX_SCAN_TIMERS 10
3659
3660/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3661#define SIR_PNO_MAX_PB_REQ_SIZE 450
3662
3663#define SIR_PNO_24G_DEFAULT_CH 1
3664#define SIR_PNO_5G_DEFAULT_CH 36
3665
3666typedef enum
3667{
3668 SIR_PNO_MODE_IMMEDIATE,
3669 SIR_PNO_MODE_ON_SUSPEND,
3670 SIR_PNO_MODE_ON_RESUME,
3671 SIR_PNO_MODE_MAX
3672} eSirPNOMode;
3673
3674typedef struct
3675{
3676 tSirMacSSid ssId;
3677 tANI_U32 authentication;
3678 tANI_U32 encryption;
3679 tANI_U32 bcastNetwType;
3680 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303681 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003682 tANI_U8 rssiThreshold;
3683} tSirNetworkType;
3684
3685typedef struct
3686{
3687 tANI_U32 uTimerValue;
3688 tANI_U32 uTimerRepeat;
3689}tSirScanTimer;
3690
3691typedef struct
3692{
3693 tANI_U8 ucScanTimersCount;
3694 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3695} tSirScanTimersType;
3696
3697typedef struct sSirPNOScanReq
3698{
3699 tANI_U8 enable;
3700 eSirPNOMode modePNO;
3701 tANI_U8 ucNetworksCount;
3702 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3703 tSirScanTimersType scanTimers;
3704
3705 /*added by SME*/
3706 tANI_U16 us24GProbeTemplateLen;
3707 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3708 tANI_U16 us5GProbeTemplateLen;
3709 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3710} tSirPNOScanReq, *tpSirPNOScanReq;
3711
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003712typedef struct sSirSetRSSIFilterReq
3713{
3714 tANI_U8 rssiThreshold;
3715} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3716
3717
3718// Update Scan Params
3719typedef struct {
3720 tANI_U8 b11dEnabled;
3721 tANI_U8 b11dResolved;
3722 tANI_U8 ucChannelCount;
3723 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3724 tANI_U16 usPassiveMinChTime;
3725 tANI_U16 usPassiveMaxChTime;
3726 tANI_U16 usActiveMinChTime;
3727 tANI_U16 usActiveMaxChTime;
3728 tANI_U8 ucCBState;
3729} tSirUpdateScanParams, * tpSirUpdateScanParams;
3730
3731// Preferred Network Found Indication
3732typedef struct
3733{
3734 tANI_U16 mesgType;
3735 tANI_U16 mesgLen;
3736 /* Network that was found with the highest RSSI*/
3737 tSirMacSSid ssId;
3738 /* Indicates the RSSI */
3739 tANI_U8 rssi;
3740 /* Length of the beacon or probe response
3741 * corresponding to the candidate found by PNO */
3742 tANI_U32 frameLength;
3743 /* Index to memory location where the contents of
3744 * beacon or probe response frame will be copied */
3745 tANI_U8 data[1];
3746} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3747#endif //FEATURE_WLAN_SCAN_PNO
3748
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003749#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3750typedef struct
3751{
3752 tSirMacSSid ssId;
3753 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3754 tANI_U32 authentication;
3755 tANI_U8 encryption;
3756 tANI_U8 mcencryption;
3757 tANI_U8 ChannelCount;
3758 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3759
3760} tSirRoamNetworkType;
3761
3762typedef struct SirMobilityDomainInfo
3763{
3764 tANI_U8 mdiePresent;
3765 tANI_U16 mobilityDomain;
3766} tSirMobilityDomainInfo;
3767
3768typedef struct sSirRoamOffloadScanReq
3769{
3770 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003771 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003772 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003773 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003774 tANI_U8 RoamRssiDiff;
3775 tANI_U8 ChannelCacheType;
3776 tANI_U8 Command;
3777 tANI_U8 StartScanReason;
3778 tANI_U16 NeighborScanTimerPeriod;
3779 tANI_U16 NeighborRoamScanRefreshPeriod;
3780 tANI_U16 NeighborScanChannelMinTime;
3781 tANI_U16 NeighborScanChannelMaxTime;
3782 tANI_U16 EmptyRefreshScanPeriod;
3783 tANI_U8 ValidChannelCount;
3784 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
3785 eAniBoolean IsCCXEnabled;
3786 tANI_U16 us24GProbeTemplateLen;
3787 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3788 tANI_U16 us5GProbeTemplateLen;
3789 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003790 tANI_U8 nProbes;
3791 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003792 tSirRoamNetworkType ConnectedNetwork;
3793 tSirMobilityDomainInfo MDID;
3794} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003795#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003796
3797#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3798
3799//Power Parameters Type
3800typedef enum
3801{
3802 eSIR_IGNORE_DTIM = 1,
3803 eSIR_LISTEN_INTERVAL = 2,
3804 eSIR_MCAST_BCAST_FILTER = 3,
3805 eSIR_ENABLE_BET = 4,
3806 eSIR_BET_INTERVAL = 5
3807}tPowerParamType;
3808
3809//Power Parameters Value s
3810typedef struct
3811{
3812 /* Ignore DTIM */
3813 tANI_U32 uIgnoreDTIM;
3814
3815 /* DTIM Period */
3816 tANI_U32 uDTIMPeriod;
3817
3818 /* Listen Interval */
3819 tANI_U32 uListenInterval;
3820
3821 /* Broadcast Multicas Filter */
3822 tANI_U32 uBcastMcastFilter;
3823
3824 /* Beacon Early Termination */
3825 tANI_U32 uEnableBET;
3826
3827 /* Beacon Early Termination Interval */
3828 tANI_U32 uBETInterval;
3829
Yue Mac24062f2013-05-13 17:01:29 -07003830 /* MAX LI for modulated DTIM */
3831 tANI_U32 uMaxLIModulatedDTIM;
3832
Jeff Johnson295189b2012-06-20 16:38:30 -07003833}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3834
3835typedef struct sSirTxPerTrackingParam
3836{
3837 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3838 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3839 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 */
3840 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3841}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3842
3843#ifdef WLAN_FEATURE_PACKET_FILTERING
3844/*---------------------------------------------------------------------------
3845 Packet Filtering Parameters
3846---------------------------------------------------------------------------*/
3847#define SIR_IPV4_ADDR_LEN 4
3848#define SIR_MAC_ADDR_LEN 6
3849#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3850#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3851#define SIR_MAX_NUM_FILTERS 20
3852#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3853
3854//
3855// Receive Filter Parameters
3856//
3857typedef enum
3858{
3859 SIR_RCV_FILTER_TYPE_INVALID,
3860 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3861 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3862 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3863}eSirReceivePacketFilterType;
3864
3865typedef enum
3866{
3867 SIR_FILTER_HDR_TYPE_INVALID,
3868 SIR_FILTER_HDR_TYPE_MAC,
3869 SIR_FILTER_HDR_TYPE_ARP,
3870 SIR_FILTER_HDR_TYPE_IPV4,
3871 SIR_FILTER_HDR_TYPE_IPV6,
3872 SIR_FILTER_HDR_TYPE_UDP,
3873 SIR_FILTER_HDR_TYPE_MAX
3874}eSirRcvPktFltProtocolType;
3875
3876typedef enum
3877{
3878 SIR_FILTER_CMP_TYPE_INVALID,
3879 SIR_FILTER_CMP_TYPE_EQUAL,
3880 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3881 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3882 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3883 SIR_FILTER_CMP_TYPE_MAX
3884}eSirRcvPktFltCmpFlagType;
3885
3886typedef struct sSirRcvPktFilterFieldParams
3887{
3888 eSirRcvPktFltProtocolType protocolLayer;
3889 eSirRcvPktFltCmpFlagType cmpFlag;
3890 /* Length of the data to compare */
3891 tANI_U16 dataLength;
3892 /* from start of the respective frame header */
3893 tANI_U8 dataOffset;
3894 /* Reserved field */
3895 tANI_U8 reserved;
3896 /* Data to compare */
3897 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3898 /* Mask to be applied on the received packet data before compare */
3899 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3900}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3901
3902typedef struct sSirRcvPktFilterCfg
3903{
3904 tANI_U8 filterId;
3905 eSirReceivePacketFilterType filterType;
3906 tANI_U32 numFieldParams;
3907 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003908 tSirMacAddr selfMacAddr;
3909 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003910 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003911}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3912
3913//
3914// Filter Packet Match Count Parameters
3915//
3916typedef struct sSirRcvFltPktMatchCnt
3917{
3918 tANI_U8 filterId;
3919 tANI_U32 matchCnt;
3920} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3921
3922typedef struct sSirRcvFltPktMatchRsp
3923{
3924 tANI_U16 mesgType;
3925 tANI_U16 mesgLen;
3926
3927 /* Success or Failure */
3928 tANI_U32 status;
3929 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003930 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003931} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3932
3933//
3934// Receive Filter Clear Parameters
3935//
3936typedef struct sSirRcvFltPktClearParam
3937{
3938 tANI_U32 status; /* only valid for response message */
3939 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003940 tSirMacAddr selfMacAddr;
3941 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003942}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3943
3944//
3945// Multicast Address List Parameters
3946//
3947typedef struct sSirRcvFltMcAddrList
3948{
3949 tANI_U32 ulMulticastAddrCnt;
3950 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003951 tSirMacAddr selfMacAddr;
3952 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003953} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3954#endif // WLAN_FEATURE_PACKET_FILTERING
3955
3956//
3957// Generic version information
3958//
3959typedef struct
3960{
3961 tANI_U8 revision;
3962 tANI_U8 version;
3963 tANI_U8 minor;
3964 tANI_U8 major;
3965} tSirVersionType;
3966
3967typedef struct sAniBtAmpLogLinkReq
3968{
3969 // Common for all types are requests
3970 tANI_U16 msgType; // message type is same as the request type
3971 tANI_U16 msgLen; // length of the entire request
3972 tANI_U8 sessionId; //sme Session Id
3973 void *btampHandle; //AMP context
3974
3975} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
3976
3977#ifdef WLAN_FEATURE_GTK_OFFLOAD
3978/*---------------------------------------------------------------------------
3979* WDA_GTK_OFFLOAD_REQ
3980*--------------------------------------------------------------------------*/
3981typedef struct
3982{
3983 tANI_U32 ulFlags; /* optional flags */
3984 tANI_U8 aKCK[16]; /* Key confirmation key */
3985 tANI_U8 aKEK[16]; /* key encryption key */
3986 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003987 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003988} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3989
3990/*---------------------------------------------------------------------------
3991* WDA_GTK_OFFLOAD_GETINFO_REQ
3992*--------------------------------------------------------------------------*/
3993typedef struct
3994{
3995 tANI_U16 mesgType;
3996 tANI_U16 mesgLen;
3997
3998 tANI_U32 ulStatus; /* success or failure */
3999 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4000 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4001 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4002 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004003 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004004} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4005#endif // WLAN_FEATURE_GTK_OFFLOAD
4006
4007#ifdef WLAN_WAKEUP_EVENTS
4008/*---------------------------------------------------------------------------
4009 tSirWakeReasonInd
4010---------------------------------------------------------------------------*/
4011typedef struct
4012{
4013 tANI_U16 mesgType;
4014 tANI_U16 mesgLen;
4015 tANI_U32 ulReason; /* see tWakeReasonType */
4016 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4017 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4018 HAL truncates the data (i.e. data packets) this length
4019 will be less than the actual length */
4020 tANI_U32 ulActualDataLen; /* actual length of data */
4021 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4022 see specific wake type */
4023} tSirWakeReasonInd, *tpSirWakeReasonInd;
4024#endif // WLAN_WAKEUP_EVENTS
4025
4026/*---------------------------------------------------------------------------
4027 sAniSetTmLevelReq
4028---------------------------------------------------------------------------*/
4029typedef struct sAniSetTmLevelReq
4030{
4031 tANI_U16 tmMode;
4032 tANI_U16 newTmLevel;
4033} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4034
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004035#ifdef FEATURE_WLAN_TDLS
4036/* TDLS Request struct SME-->PE */
4037typedef struct sSirTdlsSendMgmtReq
4038{
4039 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4040 tANI_U16 length;
4041 tANI_U8 sessionId; // Session ID
4042 tANI_U16 transactionId; // Transaction ID for cmd
4043 tANI_U8 reqType;
4044 tANI_U8 dialog;
4045 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004046 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004047 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4048 tSirMacAddr peerMac;
4049 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4050} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004051
4052typedef enum TdlsAddOper
4053{
4054 TDLS_OPER_NONE,
4055 TDLS_OPER_ADD,
4056 TDLS_OPER_UPDATE
4057} eTdlsAddOper;
4058
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004059/* TDLS Request struct SME-->PE */
4060typedef struct sSirTdlsAddStaReq
4061{
4062 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4063 tANI_U16 length;
4064 tANI_U8 sessionId; // Session ID
4065 tANI_U16 transactionId; // Transaction ID for cmd
4066 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004067 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004068 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004069 tANI_U16 capability;
4070 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4071 tANI_U8 supported_rates_length;
4072 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004073 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004074 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004075 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004076 tSirVHTCap vhtCap;
4077 tANI_U8 uapsd_queues;
4078 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004079} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004080
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004081/* TDLS Response struct PE-->SME */
4082typedef struct sSirTdlsAddStaRsp
4083{
4084 tANI_U16 messageType;
4085 tANI_U16 length;
4086 tSirResultCodes statusCode;
4087 tSirMacAddr peerMac;
4088 tANI_U8 sessionId; // Session ID
4089 tANI_U16 staId ;
4090 tANI_U16 staType ;
4091 tANI_U8 ucastSig;
4092 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004093 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004094} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304095
4096/* TDLS Request struct SME-->PE */
4097typedef struct
4098{
4099 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4100 tANI_U16 length;
4101 tANI_U8 sessionId; // Session ID
4102 tANI_U16 transactionId; // Transaction ID for cmd
4103 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4104 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4105 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304106 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304107 tANI_U8 isResponder; // Is Peer a responder.
4108 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4109 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304110 tANI_U8 supportedChannelsLen;
4111 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4112 tANI_U8 supportedOperClassesLen;
4113 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304114}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4115
4116/* TDLS Request struct SME-->PE */
4117typedef struct
4118{
4119 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4120 tANI_U16 length;
4121 tANI_U8 sessionId; // Session ID
4122 tANI_U16 transactionId; // Transaction ID for cmd
4123 tSirResultCodes statusCode;
4124 tSirMacAddr peerMac;
4125}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4126
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004127/* TDLS Request struct SME-->PE */
4128typedef struct sSirTdlsDelStaReq
4129{
4130 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4131 tANI_U16 length;
4132 tANI_U8 sessionId; // Session ID
4133 tANI_U16 transactionId; // Transaction ID for cmd
4134 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4135 tSirMacAddr peerMac;
4136} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4137/* TDLS Response struct PE-->SME */
4138typedef struct sSirTdlsDelStaRsp
4139{
4140 tANI_U16 messageType;
4141 tANI_U16 length;
4142 tANI_U8 sessionId; // Session ID
4143 tSirResultCodes statusCode;
4144 tSirMacAddr peerMac;
4145 tANI_U16 staId;
4146} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004147/* TDLS Delete Indication struct PE-->SME */
4148typedef struct sSirTdlsDelStaInd
4149{
4150 tANI_U16 messageType;
4151 tANI_U16 length;
4152 tANI_U8 sessionId; // Session ID
4153 tSirMacAddr peerMac;
4154 tANI_U16 staId;
4155 tANI_U16 reasonCode;
4156} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004157typedef struct sSirTdlsDelAllPeerInd
4158{
4159 tANI_U16 messageType;
4160 tANI_U16 length;
4161 tANI_U8 sessionId; // Session ID
4162} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004163typedef struct sSirMgmtTxCompletionInd
4164{
4165 tANI_U16 messageType;
4166 tANI_U16 length;
4167 tANI_U8 sessionId; // Session ID
4168 tANI_U32 txCompleteStatus;
4169} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004170#endif /* FEATURE_WLAN_TDLS */
4171
4172#ifdef FEATURE_WLAN_TDLS_INTERNAL
4173typedef enum tdlsListType
4174{
4175 TDLS_DIS_LIST,
4176 TDLS_SETUP_LIST
4177}eTdlsListType ;
4178
4179typedef enum tdlsStates
4180{
4181 TDLS_LINK_IDLE_STATE,
4182 TDLS_LINK_DIS_INIT_STATE,
4183 TDLS_LINK_DIS_RSP_WAIT_STATE,
4184 TDLS_DIS_REQ_PROCESS_STATE,
4185 TDLS_DIS_RSP_SENT_WAIT_STATE,
4186 TDLS_DIS_RSP_SENT_DONE_STATE,
4187 TDLS_LINK_DIS_DONE_STATE,
4188 TDLS_LINK_SETUP_START_STATE,
4189 TDLS_LINK_SETUP_WAIT_STATE,
4190 TDLS_LINK_SETUP_RSP_WAIT_STATE,
4191 TDLS_LINK_SETUP_DONE_STATE,
4192 TDLS_LINK_TEARDOWN_START_STATE,
4193 TDLS_LINK_TEARDOWN_DONE_STATE,
4194 TDLS_LINK_SETUP_STATE
4195}eSirTdlsStates ;
4196
4197typedef struct sSirTdlsPeerInfo
4198{
4199 tSirMacAddr peerMac;
4200 tANI_U8 sessionId;
4201 tANI_U8 dialog ;
4202 tSirMacCapabilityInfo capabilityInfo ;
4203 tSirMacRateSet tdlsPeerSuppRates ;
4204 tSirMacRateSet tdlsPeerExtRates ;
4205 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4206 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4207 tSirMacHTParametersInfo tdlsPeerHtParams ;
4208 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4209 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4210
4211 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4212 tSirMacRsnInfo tdlsPeerRsn ;
4213 tANI_U16 tdlsPeerFtIe ;
4214 tANI_U16 tdlsPeerTimeoutIntvl ;
4215 tANI_U16 tdlsPeerSuppChan ;
4216 tANI_U16 tdlsPeerSuppReguClass ;
4217 tANI_S8 tdlsPeerRssi ;
4218 tANI_U16 tdlsPeerState ;
4219 /* flags to indicate optional IE's are in */
4220 tANI_U8 ExtRatesPresent ;
4221 tANI_U8 rsnIePresent ;
4222 tANI_U8 htCapPresent ;
4223 tANI_U8 delStaNeeded ;
4224
4225} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4226
4227/* TDLS Request struct SME-->PE */
4228typedef struct sSirTdlsDiscoveryReq
4229{
4230 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4231 tANI_U16 length;
4232 tANI_U8 sessionId; // Session ID
4233 tANI_U16 transactionId; // Transaction ID for cmd
4234 tANI_U8 reqType;
4235 tANI_U8 dialog;
4236 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4237 tSirMacAddr peerMac;
4238} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4239
4240typedef struct sSirTdlsLinkSetupReq
4241{
4242 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4243 tANI_U16 length;
4244 tANI_U8 sessionId; // Session ID
4245 tANI_U16 transactionId; // Transaction ID for cmd
4246 tANI_U8 dialog;
4247 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4248 tSirMacAddr peerMac;
4249} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4250
4251typedef struct sSirTdlsTeardownReq
4252{
4253 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4254 tANI_U16 length;
4255 tANI_U8 sessionId; // Session ID
4256 tANI_U16 transactionId; // Transaction ID for cmd
4257 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4258 tSirMacAddr peerMac;
4259} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4260
4261
4262/* TDLS response struct PE-->SME */
4263typedef struct sSirTdlsDiscoveryRsp
4264{
4265 tANI_U16 messageType;
4266 tANI_U16 length;
4267 tSirResultCodes statusCode;
4268 tANI_U16 numDisSta ;
4269 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4270} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4271
4272typedef struct sSirTdlsLinkSetupRsp
4273{
4274 tANI_U16 messageType;
4275 tANI_U16 length;
4276 tSirResultCodes statusCode;
4277 tSirMacAddr peerMac;
4278} tSirTdlsLinksetupRsp ;
4279
4280typedef struct sSirTdlsLinkSetupInd
4281{
4282 tANI_U16 messageType;
4283 tANI_U16 length;
4284 tSirResultCodes statusCode;
4285 tSirMacAddr peerMac;
4286} tSirTdlsLinkSetupInd ;
4287
4288
4289typedef struct sSirTdlsTeardownRsp
4290{
4291 tANI_U16 messageType;
4292 tANI_U16 length;
4293 tSirResultCodes statusCode;
4294 tSirMacAddr peerMac;
4295} tSirTdlsTeardownRsp ;
4296
4297typedef struct sSirTdlsPeerInd
4298{
4299 tANI_U16 messageType;
4300 tANI_U16 length;
4301 tSirMacAddr peerMac;
4302 tANI_U8 sessionId; // Session ID
4303 tANI_U16 staId ;
4304 tANI_U16 staType ;
4305 tANI_U8 ucastSig;
4306 tANI_U8 bcastSig;
4307} tSirTdlsPeerInd ;
4308
4309typedef struct sSirTdlsLinkEstablishInd
4310{
4311 tANI_U16 messageType;
4312 tANI_U16 length;
4313 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4314 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4315 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4316 tANI_U8 ptiTemplateLen;
4317 tANI_U8 ptiTemplateBuf[64];
4318 tANI_U8 extCapability[8];
4319/* This will be part of PTI template when sent by PE
4320 tANI_U8 linkIdentifier[20];
4321*/
4322} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4323
4324typedef struct sSirTdlsLinkTeardownInd
4325{
4326 tANI_U16 messageType;
4327 tANI_U16 length;
4328 tANI_U16 staId;
4329} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4330
4331#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4332
Yathish9f22e662012-12-10 14:21:35 -08004333typedef struct sSirActiveModeSetBcnFilterReq
4334{
4335 tANI_U16 messageType;
4336 tANI_U16 length;
4337 tANI_U8 seesionId;
4338} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4339
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304340typedef enum
4341{
4342 HT40_OBSS_SCAN_PARAM_START,
4343 HT40_OBSS_SCAN_PARAM_UPDATE
4344}tHT40OBssScanCmdType;
4345
4346typedef struct sSirSmeHT40StopOBSSScanInd
4347{
4348 tANI_U16 messageType;
4349 tANI_U16 length;
4350 tANI_U8 seesionId;
4351} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4352
4353typedef struct sSirSmeHT40OBSSScanInd
4354{
4355 tANI_U16 messageType;
4356 tANI_U16 length;
4357 tANI_U8 seesionId;
4358} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4359
4360typedef struct sSirHT40OBSSScanInd
4361{
4362 tHT40OBssScanCmdType cmdType;
4363 tSirScanType scanType;
4364 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4365 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4366 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4367 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4368 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4369 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4370 tANI_U16 OBSSScanActivityThreshold;
4371 tANI_U8 selfStaIdx;
4372 tANI_U8 bssIdx;
4373 tANI_U8 fortyMHZIntolerent;
4374 tANI_U8 channelCount;
4375 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4376 tANI_U8 currentOperatingClass;
4377 tANI_U16 ieFieldLen;
4378 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4379} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4380
4381
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304382//Reset AP Caps Changed
4383typedef struct sSirResetAPCapsChange
4384{
4385 tANI_U16 messageType;
4386 tANI_U16 length;
4387 tSirMacAddr bssId;
4388} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004389/// Definition for Candidate found indication from FW
4390typedef struct sSirSmeCandidateFoundInd
4391{
4392 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4393 tANI_U16 length;
4394 tANI_U8 sessionId; // Session Identifier
4395} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004396
Chet Lanctot186b5732013-03-18 10:26:30 -07004397#ifdef WLAN_FEATURE_11W
4398typedef struct sSirWlanExcludeUnencryptParam
4399{
4400 tANI_BOOLEAN excludeUnencrypt;
4401 tSirMacAddr bssId;
4402}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4403#endif
4404
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004405typedef struct sAniHandoffReq
4406{
4407 // Common for all types are requests
4408 tANI_U16 msgType; // message type is same as the request type
4409 tANI_U16 msgLen; // length of the entire request
4410 tANI_U8 sessionId;
4411 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4412 tANI_U8 channel;
4413} tAniHandoffReq, *tpAniHandoffReq;
4414
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304415typedef struct sSirScanOffloadReq {
4416 tANI_U8 sessionId;
4417 tSirMacAddr bssId;
4418 tANI_U8 numSsid;
4419 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4420 tANI_U8 hiddenSsid;
4421 tSirMacAddr selfMacAddr;
4422 tSirBssType bssType;
4423 tANI_U8 dot11mode;
4424 tSirScanType scanType;
4425 tANI_U32 minChannelTime;
4426 tANI_U32 maxChannelTime;
4427 tANI_BOOLEAN p2pSearch;
4428 tANI_U16 uIEFieldLen;
4429 tANI_U16 uIEFieldOffset;
4430 tSirChannelList channelList;
4431 /*-----------------------------
4432 sSirScanOffloadReq....
4433 -----------------------------
4434 uIEFieldLen
4435 -----------------------------
4436 uIEFieldOffset ----+
4437 ----------------------------- |
4438 channelList.numChannels |
4439 ----------------------------- |
4440 ... variable size up to |
4441 channelNumber[numChannels-1] |
4442 This can be zero, if |
4443 numChannel is zero. |
4444 ----------------------------- <--+
4445 ... variable size uIEField
4446 up to uIEFieldLen (can be 0)
4447 -----------------------------*/
4448} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304449
4450typedef enum sSirScanEventType {
4451 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4452 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4453 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4454 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4455 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4456 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4457 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4458 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4459 SCAN_EVENT_MAX=0x8000
4460} tSirScanEventType;
4461
4462typedef struct sSirScanOffloadEvent{
4463 tSirScanEventType event;
4464 tSirResultCodes reasonCode;
4465 tANI_U32 chanFreq;
4466 tANI_U32 requestor;
4467 tANI_U32 scanId;
4468} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4469
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304470typedef struct sSirUpdateChanParam
4471{
4472 tANI_U8 chanId;
4473 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004474 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304475} tSirUpdateChanParam, *tpSirUpdateChanParam;
4476
4477typedef struct sSirUpdateChan
4478{
4479 tANI_U8 numChan;
4480 tSirUpdateChanParam chanParam[1];
4481} tSirUpdateChanList, *tpSirUpdateChanList;
4482
Leo Chang9056f462013-08-01 19:21:11 -07004483#ifdef FEATURE_WLAN_LPHB
4484#define SIR_LPHB_FILTER_LEN 64
4485
4486typedef enum
4487{
4488 LPHB_SET_EN_PARAMS_INDID,
4489 LPHB_SET_TCP_PARAMS_INDID,
4490 LPHB_SET_TCP_PKT_FILTER_INDID,
4491 LPHB_SET_UDP_PARAMS_INDID,
4492 LPHB_SET_UDP_PKT_FILTER_INDID,
4493 LPHB_SET_NETWORK_INFO_INDID,
4494} LPHBIndType;
4495
4496typedef struct sSirLPHBEnableStruct
4497{
4498 v_U8_t enable;
4499 v_U8_t item;
4500 v_U8_t session;
4501} tSirLPHBEnableStruct;
4502
4503typedef struct sSirLPHBTcpParamStruct
4504{
4505 v_U32_t srv_ip;
4506 v_U32_t dev_ip;
4507 v_U16_t src_port;
4508 v_U16_t dst_port;
4509 v_U16_t timeout;
4510 v_U8_t session;
4511 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004512 uint16 timePeriodSec; // in seconds
4513 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004514} tSirLPHBTcpParamStruct;
4515
4516typedef struct sSirLPHBTcpFilterStruct
4517{
4518 v_U16_t length;
4519 v_U8_t offset;
4520 v_U8_t session;
4521 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4522} tSirLPHBTcpFilterStruct;
4523
4524typedef struct sSirLPHBUdpParamStruct
4525{
4526 v_U32_t srv_ip;
4527 v_U32_t dev_ip;
4528 v_U16_t src_port;
4529 v_U16_t dst_port;
4530 v_U16_t interval;
4531 v_U16_t timeout;
4532 v_U8_t session;
4533 tSirMacAddr gateway_mac;
4534} tSirLPHBUdpParamStruct;
4535
4536typedef struct sSirLPHBUdpFilterStruct
4537{
4538 v_U16_t length;
4539 v_U8_t offset;
4540 v_U8_t session;
4541 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4542} tSirLPHBUdpFilterStruct;
4543
4544typedef struct sSirLPHBReq
4545{
4546 v_U16_t cmd;
4547 v_U16_t dummy;
4548 union
4549 {
4550 tSirLPHBEnableStruct lphbEnableReq;
4551 tSirLPHBTcpParamStruct lphbTcpParamReq;
4552 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4553 tSirLPHBUdpParamStruct lphbUdpParamReq;
4554 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4555 } params;
4556} tSirLPHBReq;
4557
Leo Changd9df8aa2013-09-26 13:32:26 -07004558typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004559{
4560 v_U8_t sessionIdx;
4561 v_U8_t protocolType; /*TCP or UDP*/
4562 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004563} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004564#endif /* FEATURE_WLAN_LPHB */
4565
Yue Mab9c86f42013-08-14 15:59:08 -07004566typedef struct sSirAddPeriodicTxPtrn
4567{
4568 /* MAC Address for the adapter */
4569 tSirMacAddr macAddress;
4570
4571 tANI_U8 ucPtrnId; // Pattern ID
4572 tANI_U16 ucPtrnSize; // Pattern size
4573 tANI_U32 usPtrnIntervalMs; // In msec
4574 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4575} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4576
4577typedef struct sSirDelPeriodicTxPtrn
4578{
4579 /* MAC Address for the adapter */
4580 tSirMacAddr macAddress;
4581
4582 /* Bitmap of pattern IDs that need to be deleted */
4583 tANI_U32 ucPatternIdBitmap;
4584} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4585
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004586typedef struct sSirRateUpdateInd
4587{
4588 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4589 * param.
4590 */
4591 tANI_S32 ucastDataRate;
4592
4593 /* TX flag to differentiate between HT20, HT40 etc */
4594 tTxrateinfoflags ucastDataRateTxFlag;
4595
4596 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4597 tSirMacAddr bssid;
4598
4599 /*
4600 * 0 implies MCAST RA, positive value implies fixed rate,
4601 * -1 implies ignore this param
4602 */
4603 tANI_S32 reliableMcastDataRate;//unit Mbpsx10
4604
4605 /* TX flag to differentiate between HT20, HT40 etc */
4606 tTxrateinfoflags reliableMcastDataRateTxFlag;
4607
4608 /*
4609 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4610 * 0 implies ignore
4611 */
4612 tANI_U32 mcastDataRate24GHz;
4613
4614 /* TX flag to differentiate between HT20, HT40 etc */
4615 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4616
4617 /*
4618 * MCAST(or BCAST) fixed data rate in 5 GHz,
4619 * unit Mbpsx10, 0 implies ignore
4620 */
4621 tANI_U32 mcastDataRate5GHz;
4622
4623 /* TX flag to differentiate between HT20, HT40 etc */
4624 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4625
4626} tSirRateUpdateInd, *tpSirRateUpdateInd;
4627
Rajeev79dbe4c2013-10-05 11:03:42 +05304628#ifdef FEATURE_WLAN_BATCH_SCAN
4629// Set batch scan resposne from FW
4630typedef struct
4631{
4632 /*maximum number of scans which FW can cache*/
4633 tANI_U32 nScansToBatch;
4634} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4635
4636// Set batch scan request to FW
4637typedef struct
4638{
4639 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4640 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4641 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4642 tANI_U8 rfBand; /* band to scan :
4643 0 ->both Band, 1->2.4Ghz Only
4644 and 2-> 5GHz Only */
4645 tANI_U32 rtt; /* set if required to do RTT it is not
4646 supported in current version */
4647} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4648
4649
4650// Stop batch scan request to FW
4651typedef struct
4652{
4653 tANI_U32 param;
4654} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4655
4656// Trigger batch scan result indication to FW
4657typedef struct
4658{
4659 tANI_U32 param;
4660} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4661
4662// Batch scan result indication from FW
4663typedef PACKED_PRE struct PACKED_POST
4664{
4665 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08004666 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304667 tANI_U8 ch; /* Channel */
4668 tANI_U8 rssi; /* RSSI or Level */
4669 /*Timestamp when Network was found. Used to calculate age based on timestamp
4670 in GET_RSP msg header */
4671 tANI_U32 timestamp;
4672} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4673
4674typedef PACKED_PRE struct PACKED_POST
4675{
4676 tANI_U32 scanId; /* Scan List ID. */
4677 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4678 tANI_U32 numNetworksInScanList;
4679 /*Variable data ptr: Number of AP in Scan List*/
4680 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4681 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4682 tANI_U8 scanList[1];
4683} tSirBatchScanList, *tpSirBatchScanList;
4684
4685typedef PACKED_PRE struct PACKED_POST
4686{
4687 tANI_U32 timestamp;
4688 tANI_U32 numScanLists;
4689 boolean isLastResult;
4690 /* Variable Data ptr: Number of Scan Lists*/
4691 /* following isLastResult is data of type tSirBatchScanList
4692 * of sizeof(tSirBatchScanList) * numScanLists*/
4693 tANI_U8 scanResults[1];
4694} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4695
4696#endif // FEATURE_WLAN_BATCH_SCAN
4697
Leo Chang0b0e45a2013-12-15 15:18:55 -08004698#ifdef FEATURE_WLAN_CH_AVOID
4699#define SIR_CH_AVOID_MAX_RANGE 4
4700
4701typedef struct sSirChAvoidFreqType
4702{
4703 tANI_U32 startFreq;
4704 tANI_U32 endFreq;
4705} tSirChAvoidFreqType;
4706
4707typedef struct sSirChAvoidIndType
4708{
4709 tANI_U32 avoidRangeCount;
4710 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
4711} tSirChAvoidIndType;
4712#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304713
Jeff Johnson295189b2012-06-20 16:38:30 -07004714#endif /* __SIR_API_H */