blob: 9d41bf99b734c159096124cc28cb88796a4c038f [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
Chet Lanctot8cecea22014-02-11 19:09:36 -0800660#ifdef WLAN_FEATURE_11W
661 tANI_BOOLEAN pmfCapable;
662 tANI_BOOLEAN pmfRequired;
663#endif
664
Jeff Johnson295189b2012-06-20 16:38:30 -0700665} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
666
667#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
668 ((int) OFFSET_OF( tSirBssDescription, ieFields)))
669
670#define WSCIE_PROBE_RSP_LEN (317 + 2)
671
672typedef struct sSirBssDescription
673{
674 //offset of the ieFields from bssId.
675 tANI_U16 length;
676 tSirMacAddr bssId;
677 v_TIME_t scanSysTimeMsec;
678 tANI_U32 timeStamp[2];
679 tANI_U16 beaconInterval;
680 tANI_U16 capabilityInfo;
681 tSirNwType nwType; // Indicates 11a/b/g
682 tANI_U8 aniIndicator;
683 tANI_S8 rssi;
684 tANI_S8 sinr;
685 //channelId what peer sent in beacon/probersp.
686 tANI_U8 channelId;
687 //channelId on which we are parked at.
688 //used only in scan case.
689 tANI_U8 channelIdSelf;
690 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700691 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
692#if defined WLAN_FEATURE_VOWIFI
693 tANI_U32 parentTSF;
694 tANI_U32 startTSF[2];
695#endif
696#ifdef WLAN_FEATURE_VOWIFI_11R
697 tANI_U8 mdiePresent;
698 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
699#endif
700#ifdef FEATURE_WLAN_CCX
701 tANI_U16 QBSSLoad_present;
702 tANI_U16 QBSSLoad_avail;
703#endif
704 // Please keep the structure 4 bytes aligned above the ieFields
705
706 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700707 tANI_U8 reservedPadding1;
708 tANI_U8 reservedPadding2;
709 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700710 tANI_U32 WscIeLen;
711 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700712 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800713
Jeff Johnson295189b2012-06-20 16:38:30 -0700714 tANI_U32 ieFields[1];
715} tSirBssDescription, *tpSirBssDescription;
716
717/// Definition for response message to previously
718/// issued start BSS request
719/// MAC --->
720typedef struct sSirSmeStartBssRsp
721{
722 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
723 tANI_U16 length;
724 tANI_U8 sessionId;
725 tANI_U16 transactionId;//transaction ID for cmd
726 tSirResultCodes statusCode;
727 tSirBssType bssType;//Add new type for WDS mode
728 tANI_U16 beaconInterval;//Beacon Interval for both type
729 tANI_U32 staId;//Staion ID for Self
730 tSirBssDescription bssDescription;//Peer BSS description
731} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
732
Jeff Johnson295189b2012-06-20 16:38:30 -0700733
734typedef struct sSirChannelList
735{
736 tANI_U8 numChannels;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800737 tANI_U8 channelNumber[SIR_CCX_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700738} tSirChannelList, *tpSirChannelList;
739
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530740typedef struct sSirDFSChannelList
741{
742 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
743
744} tSirDFSChannelList, *tpSirDFSChannelList;
745
Jeff Johnson295189b2012-06-20 16:38:30 -0700746#ifdef FEATURE_WLAN_CCX
747typedef struct sTspecInfo {
748 tANI_U8 valid;
749 tSirMacTspecIE tspec;
750} tTspecInfo;
751
752#define SIR_CCX_MAX_TSPEC_IES 4
753typedef struct sCCXTspecTspecInfo {
754 tANI_U8 numTspecs;
755 tTspecInfo tspec[SIR_CCX_MAX_TSPEC_IES];
756} tCCXTspecInfo;
757#endif
758
Jeff Johnson295189b2012-06-20 16:38:30 -0700759
760/// Definition for Radar Info
761typedef struct sSirRadarInfo
762{
763 tANI_U8 channelNumber;
764 tANI_U16 radarPulseWidth; // in usecond
765 tANI_U16 numRadarPulse;
766} tSirRadarInfo, *tpSirRadarInfo;
767
768#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
769
770/// Two Background Scan mode
771typedef enum eSirBackgroundScanMode
772{
773 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700774 eSIR_NORMAL_BACKGROUND_SCAN = 1,
775 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700776} tSirBackgroundScanMode;
777
778/// Two types of traffic check
779typedef enum eSirLinkTrafficCheck
780{
781 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700782 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
783 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700784} tSirLinkTrafficCheck;
785
786#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
787#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
788#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
789#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700790#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
791#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700792
793/// Definition for scan request
794typedef struct sSirSmeScanReq
795{
796 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
797 tANI_U16 length;
798 tANI_U8 sessionId; // Session ID
799 tANI_U16 transactionId; // Transaction ID for cmd
800 tSirMacAddr bssId;
801 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
802 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
803 tSirBssType bssType;
804 tANI_U8 dot11mode;
805 tSirScanType scanType;
806 /**
807 * minChannelTime. Not used if scanType is passive.
808 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
809 * 11k measurements set this to zero to user only single duration for scan.
810 * <valid timeout> - Timeout value used for min channel timeout.
811 */
812 tANI_U32 minChannelTime;
813 /**
814 * maxChannelTime.
815 * 0x0 - Invalid. In case of active scan.
816 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
817 *
818 */
819 tANI_U32 maxChannelTime;
820 /**
821 * returnAfterFirstMatch can take following values:
822 * 0x00 - Return SCAN_RSP message after complete channel scan
823 * 0x01 - Return SCAN_RSP message after collecting BSS description
824 * that matches scan criteria.
825 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
826 * 5 GHz band channels
827 * 0x80 - Return after collecting first 11d IE from 5 GHz band
828 * channels
829 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
830 * band channels
831 *
832 * Values of 0xC0, 0x80 & 0x40 are to be used by
833 * Roaming/application when 11d is enabled.
834 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800835 tANI_U32 minChannelTimeBtc; //in units of milliseconds
836 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700837 tANI_U8 returnAfterFirstMatch;
838
839 /**
840 * returnUniqueResults can take following values:
841 * 0 - Collect & report all received BSS descriptions from same BSS.
842 * 1 - Collect & report unique BSS description from same BSS.
843 */
844 tANI_U8 returnUniqueResults;
845
846 /**
847 * returnFreshResults can take following values:
848 * 0x00 - Return background scan results.
849 * 0x80 - Return & purge background scan results
850 * 0x01 - Trigger fresh scan instead of returning background scan
851 * results.
852 * 0x81 - Trigger fresh scan instead of returning background scan
853 * results and purge background scan results.
854 */
855 tANI_U8 returnFreshResults;
856
857 /* backgroundScanMode can take following values:
858 * 0x0 - agressive scan
859 * 0x1 - normal scan where HAL will check for link traffic
860 * prior to proceeding with the scan
861 */
862 tSirBackgroundScanMode backgroundScanMode;
863
864 tANI_U8 hiddenSsid;
865
866 /* Number of SSIDs to scan */
867 tANI_U8 numSsid;
868
869 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
870 /* This MUST be the last field of the structure */
871
872
Jeff Johnson295189b2012-06-20 16:38:30 -0700873 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700874 tANI_U16 uIEFieldLen;
875 tANI_U16 uIEFieldOffset;
876
877 //channelList MUST be the last field of this structure
878 tSirChannelList channelList;
879 /*-----------------------------
880 tSirSmeScanReq....
881 -----------------------------
882 uIEFiledLen
883 -----------------------------
884 uIEFiledOffset ----+
885 ----------------------------- |
886 channelList.numChannels |
887 ----------------------------- |
888 ... variable size up to |
889 channelNumber[numChannels-1] |
890 This can be zero, if |
891 numChannel is zero. |
892 ----------------------------- <--+
893 ... variable size uIEFiled
894 up to uIEFieldLen (can be 0)
895 -----------------------------*/
896} tSirSmeScanReq, *tpSirSmeScanReq;
897
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530898typedef struct sSirSmeScanAbortReq
899{
900 tANI_U16 type;
901 tANI_U16 msgLen;
902 tANI_U8 sessionId;
903} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
904
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530905typedef struct sSirSmeScanChanReq
906{
907 tANI_U16 type;
908 tANI_U16 msgLen;
909 tANI_U8 sessionId;
910 tANI_U16 transcationId;
911} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
912
Jeff Johnsone7245742012-09-05 17:12:55 -0700913#ifdef FEATURE_OEM_DATA_SUPPORT
914
915#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800916#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700917#endif
918#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800919#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700920#endif
921
922typedef struct sSirOemDataReq
923{
924 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
925 tSirMacAddr selfMacAddr;
926 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
927} tSirOemDataReq, *tpSirOemDataReq;
928
929typedef struct sSirOemDataRsp
930{
931 tANI_U16 messageType;
932 tANI_U16 length;
933 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
934} tSirOemDataRsp, *tpSirOemDataRsp;
935
936#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700937
938/// Definition for response message to previously issued scan request
939typedef struct sSirSmeScanRsp
940{
941 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
942 tANI_U16 length;
943 tANI_U8 sessionId;
944 tSirResultCodes statusCode;
945 tANI_U16 transcationId;
946 tSirBssDescription bssDescription[1];
947} tSirSmeScanRsp, *tpSirSmeScanRsp;
948
949/// Sme Req message to set the Background Scan mode
950typedef struct sSirSmeBackgroundScanModeReq
951{
952 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
953 tANI_U16 length;
954 tSirBackgroundScanMode mode;
955} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
956
957/// Background Scan Statisics
958typedef struct sSirBackgroundScanInfo {
959 tANI_U32 numOfScanSuccess;
960 tANI_U32 numOfScanFailure;
961 tANI_U32 reserved;
962} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
963
964#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
965
966/// Definition for Authentication request
967typedef struct sSirSmeAuthReq
968{
969 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
970 tANI_U16 length;
971 tANI_U8 sessionId; // Session ID
972 tANI_U16 transactionId; // Transaction ID for cmd
973 tSirMacAddr bssId; // Self BSSID
974 tSirMacAddr peerMacAddr;
975 tAniAuthType authType;
976 tANI_U8 channelNumber;
977} tSirSmeAuthReq, *tpSirSmeAuthReq;
978
979/// Definition for reponse message to previously issued Auth request
980typedef struct sSirSmeAuthRsp
981{
982 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
983 tANI_U16 length;
984 tANI_U8 sessionId; // Session ID
985 tANI_U16 transactionId; // Transaction ID for cmd
986 tSirMacAddr peerMacAddr;
987 tAniAuthType authType;
988 tSirResultCodes statusCode;
989 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
990 //Otherwise it holds status code.
991} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
992
Jeff Johnson295189b2012-06-20 16:38:30 -0700993
Jeff Johnson295189b2012-06-20 16:38:30 -0700994
Jeff Johnson295189b2012-06-20 16:38:30 -0700995/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
996typedef struct sJoinReassocInfo
997{
998 tAniTitanCBNeighborInfo cbNeighbors;
999 tAniBool spectrumMgtIndicator;
1000 tSirMacPowerCapInfo powerCap;
1001 tSirSupChnl supportedChannels;
1002} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001003
1004/// Definition for join request
1005/// ---> MAC
1006/// WARNING! If you add a field in JOIN REQ.
1007/// Make sure to add it in REASSOC REQ
1008/// The Serdes function is the same and its
1009/// shared with REASSOC. So if we add a field
1010// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1011typedef struct sSirSmeJoinReq
1012{
1013 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1014 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001015 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001016 tANI_U16 transactionId;
1017 tSirMacSSid ssId;
1018 tSirMacAddr selfMacAddr; // self Mac address
1019 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1020 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001021 tVOS_CON_MODE staPersona; //Persona
1022 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001023
1024 /*This contains the UAPSD Flag for all 4 AC
1025 * B0: AC_VO UAPSD FLAG
1026 * B1: AC_VI UAPSD FLAG
1027 * B2: AC_BK UAPSD FLAG
1028 * B3: AC_BE UASPD FLAG
1029 */
1030 tANI_U8 uapsdPerAcBitmask;
1031
Jeff Johnson295189b2012-06-20 16:38:30 -07001032 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1033 tSirMacRateSet extendedRateSet; // Has 11g rates
1034 tSirRSNie rsnIE; // RSN IE to be sent in
1035 // (Re) Association Request
1036#ifdef FEATURE_WLAN_CCX
1037 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1038 // the same. The join will never carry cckm, but will be set to
1039 // 0.
1040#endif
1041
1042 tSirAddie addIEScan; // Additional IE to be sent in
1043 // (unicast) Probe Request at the time of join
1044
1045 tSirAddie addIEAssoc; // Additional IE to be sent in
1046 // (Re) Association Request
1047
1048 tAniEdType UCEncryptionType;
1049
1050 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001051
1052#ifdef WLAN_FEATURE_11W
1053 tAniEdType MgmtEncryptionType;
1054#endif
1055
Jeff Johnson295189b2012-06-20 16:38:30 -07001056#ifdef WLAN_FEATURE_VOWIFI_11R
1057 tAniBool is11Rconnection;
1058#endif
1059#ifdef FEATURE_WLAN_CCX
Gopichand Nakkala0ae39db2013-06-10 20:35:49 +05301060 tAniBool isCCXFeatureIniEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001061 tAniBool isCCXconnection;
1062 tCCXTspecInfo ccxTspecInfo;
1063#endif
1064
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001065#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001066 tAniBool isFastTransitionEnabled;
1067#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001068#ifdef FEATURE_WLAN_LFR
1069 tAniBool isFastRoamIniFeatureEnabled;
1070#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001071
1072 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001073#ifdef WLAN_FEATURE_11AC
1074 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001075 tANI_U8 txBFCsnValue;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001076#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001077 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301078 tAniBool isWMEenabled;
1079 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001080 tAniTitanCBNeighborInfo cbNeighbors;
1081 tAniBool spectrumMgtIndicator;
1082 tSirMacPowerCapInfo powerCap;
1083 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001084 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001085
1086} tSirSmeJoinReq, *tpSirSmeJoinReq;
1087
1088/// Definition for reponse message to previously issued join request
1089/// MAC --->
1090typedef struct sSirSmeJoinRsp
1091{
1092 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1093 tANI_U16 length;
1094 tANI_U8 sessionId; // Session ID
1095 tANI_U16 transactionId; // Transaction ID for cmd
1096 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001097 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001098 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1099 //Otherwise it holds status code.
1100 tANI_U16 aid;
1101 tANI_U32 beaconLength;
1102 tANI_U32 assocReqLength;
1103 tANI_U32 assocRspLength;
1104#ifdef WLAN_FEATURE_VOWIFI_11R
1105 tANI_U32 parsedRicRspLen;
1106#endif
1107#ifdef FEATURE_WLAN_CCX
1108 tANI_U32 tspecIeLen;
1109#endif
1110 tANI_U32 staId;//Station ID for peer
1111
1112 /*The DPU signatures will be sent eventually to TL to help it determine the
1113 association to which a packet belongs to*/
1114 /*Unicast DPU signature*/
1115 tANI_U8 ucastSig;
1116
1117 /*Broadcast DPU signature*/
1118 tANI_U8 bcastSig;
1119
1120 tANI_U8 frames[ 1 ];
1121} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1122
1123/// Definition for Authentication indication from peer
1124typedef struct sSirSmeAuthInd
1125{
1126 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1127 tANI_U16 length;
1128 tANI_U8 sessionId;
1129 tSirMacAddr bssId; // Self BSSID
1130 tSirMacAddr peerMacAddr;
1131 tAniAuthType authType;
1132} tSirSmeAuthInd, *tpSirSmeAuthInd;
1133
1134/// probereq from peer, when wsc is enabled
1135typedef struct sSirSmeProbereq
1136{
1137 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1138 tANI_U16 length;
1139 tANI_U8 sessionId;
1140 tSirMacAddr peerMacAddr;
1141 tANI_U16 devicePasswdId;
1142} tSirSmeProbeReq, *tpSirSmeProbeReq;
1143
1144/// Definition for Association indication from peer
1145/// MAC --->
1146typedef struct sSirSmeAssocInd
1147{
1148 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1149 tANI_U16 length;
1150 tANI_U8 sessionId;
1151 tSirMacAddr peerMacAddr;
1152 tANI_U16 aid;
1153 tSirMacAddr bssId; // Self BSSID
1154 tANI_U16 staId; // Station ID for peer
1155 tANI_U8 uniSig; // DPU signature for unicast packets
1156 tANI_U8 bcastSig; // DPU signature for broadcast packets
1157 tAniAuthType authType;
1158 tAniSSID ssId; // SSID used by STA to associate
1159 tSirRSNie rsnIE;// RSN IE received from peer
1160 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1161
Jeff Johnson295189b2012-06-20 16:38:30 -07001162 // powerCap & supportedChannels are present only when
1163 // spectrumMgtIndicator flag is set
1164 tAniBool spectrumMgtIndicator;
1165 tSirMacPowerCapInfo powerCap;
1166 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1168 tAniBool reassocReq;
1169 // Required for indicating the frames to upper layer
1170 tANI_U32 beaconLength;
1171 tANI_U8* beaconPtr;
1172 tANI_U32 assocReqLength;
1173 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001174} tSirSmeAssocInd, *tpSirSmeAssocInd;
1175
1176
1177/// Definition for Association confirm
1178/// ---> MAC
1179typedef struct sSirSmeAssocCnf
1180{
1181 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1182 tANI_U16 length;
1183 tSirResultCodes statusCode;
1184 tSirMacAddr bssId; // Self BSSID
1185 tSirMacAddr peerMacAddr;
1186 tANI_U16 aid;
1187 tSirMacAddr alternateBssId;
1188 tANI_U8 alternateChannelId;
1189} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1190
Jeff Johnson295189b2012-06-20 16:38:30 -07001191/// Definition for Reassociation indication from peer
1192typedef struct sSirSmeReassocInd
1193{
1194 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1195 tANI_U16 length;
1196 tANI_U8 sessionId; // Session ID
1197 tSirMacAddr peerMacAddr;
1198 tSirMacAddr oldMacAddr;
1199 tANI_U16 aid;
1200 tSirMacAddr bssId; // Self BSSID
1201 tANI_U16 staId; // Station ID for peer
1202 tAniAuthType authType;
1203 tAniSSID ssId; // SSID used by STA to reassociate
1204 tSirRSNie rsnIE; // RSN IE received from peer
1205
1206 tSirAddie addIE; // Additional IE received from peer
1207
Jeff Johnson295189b2012-06-20 16:38:30 -07001208 // powerCap & supportedChannels are present only when
1209 // spectrumMgtIndicator flag is set
1210 tAniBool spectrumMgtIndicator;
1211 tSirMacPowerCapInfo powerCap;
1212 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001213 // Required for indicating the frames to upper layer
1214 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1215 tANI_U32 beaconLength;
1216 tANI_U8* beaconPtr;
1217 tANI_U32 assocReqLength;
1218 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001219} tSirSmeReassocInd, *tpSirSmeReassocInd;
1220
1221/// Definition for Reassociation confirm
1222/// ---> MAC
1223typedef struct sSirSmeReassocCnf
1224{
1225 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1226 tANI_U16 length;
1227 tSirResultCodes statusCode;
1228 tSirMacAddr bssId; // Self BSSID
1229 tSirMacAddr peerMacAddr;
1230 tANI_U16 aid;
1231 tSirMacAddr alternateBssId;
1232 tANI_U8 alternateChannelId;
1233} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1234
Jeff Johnson295189b2012-06-20 16:38:30 -07001235
1236/// Enum definition for Wireless medium status change codes
1237typedef enum eSirSmeStatusChangeCode
1238{
1239 eSIR_SME_DEAUTH_FROM_PEER,
1240 eSIR_SME_DISASSOC_FROM_PEER,
1241 eSIR_SME_LOST_LINK_WITH_PEER,
1242 eSIR_SME_CHANNEL_SWITCH,
1243 eSIR_SME_JOINED_NEW_BSS,
1244 eSIR_SME_LEAVING_BSS,
1245 eSIR_SME_IBSS_ACTIVE,
1246 eSIR_SME_IBSS_INACTIVE,
1247 eSIR_SME_IBSS_PEER_DEPARTED,
1248 eSIR_SME_RADAR_DETECTED,
1249 eSIR_SME_IBSS_NEW_PEER,
1250 eSIR_SME_AP_CAPS_CHANGED,
1251 eSIR_SME_BACKGROUND_SCAN_FAIL,
1252 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1253 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1254} tSirSmeStatusChangeCode;
1255
1256typedef struct sSirSmeNewBssInfo
1257{
1258 tSirMacAddr bssId;
1259 tANI_U8 channelNumber;
1260 tANI_U8 reserved;
1261 tSirMacSSid ssId;
1262} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1263
1264typedef struct sSirSmeApNewCaps
1265{
1266 tANI_U16 capabilityInfo;
1267 tSirMacAddr bssId;
1268 tANI_U8 channelId;
1269 tANI_U8 reserved[3];
1270 tSirMacSSid ssId;
1271} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1272
1273/**
1274 * Table below indicates what information is passed for each of
1275 * the Wireless Media status change notifications:
1276 *
1277 * Status Change code Status change info
1278 * ----------------------------------------------------------------------
1279 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1280 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1281 * eSIR_SME_LOST_LINK_WITH_PEER None
1282 * eSIR_SME_CHANNEL_SWITCH New channel number
1283 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1284 * eSIR_SME_LEAVING_BSS None
1285 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1286 * IBSS apart from this STA that
1287 * started IBSS
1288 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1289 * in IBSS
1290 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1291 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1292 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1293 * that STA is currently associated with
1294 * have changed.
1295 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1296 */
1297
1298/// Definition for Wireless medium status change notification
1299typedef struct sSirSmeWmStatusChangeNtf
1300{
1301 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1302 tANI_U16 length;
1303 tANI_U8 sessionId; // Session ID
1304 tSirSmeStatusChangeCode statusChangeCode;
1305 tSirMacAddr bssId; // Self BSSID
1306 union
1307 {
1308 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1309 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1310 // none for eSIR_SME_LOST_LINK_WITH_PEER
1311 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1312 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1313 // none for eSIR_SME_LEAVING_BSS
1314 // none for eSIR_SME_IBSS_ACTIVE
1315 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001316 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1317 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1318 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1319 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001320 } statusChangeInfo;
1321} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1322
1323/// Definition for Disassociation request
1324typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001325__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001326struct sSirSmeDisassocReq
1327{
1328 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1329 tANI_U16 length;
1330 tANI_U8 sessionId; // Session ID
1331 tANI_U16 transactionId; // Transaction ID for cmd
1332 tSirMacAddr bssId; // Peer BSSID
1333 tSirMacAddr peerMacAddr;
1334 tANI_U16 reasonCode;
1335 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1336 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001337}
Jeff Johnson295189b2012-06-20 16:38:30 -07001338__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001339tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1340
1341/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001342typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1343{
1344 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1345 tANI_U16 length;
1346 tANI_U8 sessionId; // Session ID
1347 tANI_U16 transactionId; // Transaction ID for cmd
1348 tSirMacAddr bssId; // Peer BSSID
1349 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1350} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001351
1352typedef struct sAni64BitCounters
1353{
1354 tANI_U32 Hi;
1355 tANI_U32 Lo;
1356}tAni64BitCounters, *tpAni64BitCounters;
1357
1358typedef struct sAniSecurityStat
1359{
1360 tAni64BitCounters txBlks;
1361 tAni64BitCounters rxBlks;
1362 tAni64BitCounters formatErrorCnt;
1363 tAni64BitCounters decryptErr;
1364 tAni64BitCounters protExclCnt;
1365 tAni64BitCounters unDecryptableCnt;
1366 tAni64BitCounters decryptOkCnt;
1367
1368}tAniSecurityStat, *tpAniSecurityStat;
1369
1370typedef struct sAniTxRxCounters
1371{
1372 tANI_U32 txFrames; // Incremented for every packet tx
1373 tANI_U32 rxFrames;
1374 tANI_U32 nRcvBytes;
1375 tANI_U32 nXmitBytes;
1376}tAniTxRxCounters, *tpAniTxRxCounters;
1377
1378typedef struct sAniTxRxStats
1379{
1380 tAni64BitCounters txFrames;
1381 tAni64BitCounters rxFrames;
1382 tAni64BitCounters nRcvBytes;
1383 tAni64BitCounters nXmitBytes;
1384
1385}tAniTxRxStats,*tpAniTxRxStats;
1386
1387typedef struct sAniSecStats
1388{
1389 tAniSecurityStat aes;
1390 tAni64BitCounters aesReplays;
1391 tAniSecurityStat tkip;
1392 tAni64BitCounters tkipReplays;
1393 tAni64BitCounters tkipMicError;
1394
1395 tAniSecurityStat wep;
1396#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1397 tAniSecurityStat wpi;
1398 tAni64BitCounters wpiReplays;
1399 tAni64BitCounters wpiMicError;
1400#endif
1401}tAniSecStats, *tpAniSecStats;
1402
1403#define SIR_MAX_RX_CHAINS 3
1404
1405typedef struct sAniStaStatStruct
1406{
1407 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1408 * These are kept as it is, since WSM is using this structure.
1409 * These elements can be removed whenever WSM is updated.
1410 * Phystats is used to hold phystats from BD.
1411 */
1412 tANI_U32 sentAesBlksUcastHi;
1413 tANI_U32 sentAesBlksUcastLo;
1414 tANI_U32 recvAesBlksUcastHi;
1415 tANI_U32 recvAesBlksUcastLo;
1416 tANI_U32 aesFormatErrorUcastCnts;
1417 tANI_U32 aesReplaysUcast;
1418 tANI_U32 aesDecryptErrUcast;
1419 tANI_U32 singleRetryPkts;
1420 tANI_U32 failedTxPkts;
1421 tANI_U32 ackTimeouts;
1422 tANI_U32 multiRetryPkts;
1423 tANI_U32 fragTxCntsHi;
1424 tANI_U32 fragTxCntsLo;
1425 tANI_U32 transmittedPktsHi;
1426 tANI_U32 transmittedPktsLo;
1427 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1428 tANI_U32 phyStatLo; //This is only for private use.
1429
1430 tANI_U32 uplinkRssi;
1431 tANI_U32 uplinkSinr;
1432 tANI_U32 uplinkRate;
1433 tANI_U32 downlinkRssi;
1434 tANI_U32 downlinkSinr;
1435 tANI_U32 downlinkRate;
1436 tANI_U32 nRcvBytes;
1437 tANI_U32 nXmitBytes;
1438
1439 // titan 3c stats
1440 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1441 tANI_U32 chunksTxCntLo;
1442 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1443 tANI_U32 compPktRxCntLo;
1444 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1445 tANI_U32 expanPktRxCntLo;
1446
1447
1448 /* Following elements are valid and filled in correctly. They have valid values.
1449 */
1450
1451 //Unicast frames and bytes.
1452 tAniTxRxStats ucStats;
1453
1454 //Broadcast frames and bytes.
1455 tAniTxRxStats bcStats;
1456
1457 //Multicast frames and bytes.
1458 tAniTxRxStats mcStats;
1459
1460 tANI_U32 currentTxRate;
1461 tANI_U32 currentRxRate; //Rate in 100Kbps
1462
1463 tANI_U32 maxTxRate;
1464 tANI_U32 maxRxRate;
1465
1466 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1467
1468
1469 tAniSecStats securityStats;
1470
1471 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1472 tANI_U8 currentTxRateIdx;
1473
1474} tAniStaStatStruct, *tpAniStaStatStruct;
1475
1476//Statistics that are not maintained per stations.
1477typedef struct sAniGlobalStatStruct
1478{
1479 tAni64BitCounters txError;
1480 tAni64BitCounters rxError;
1481 tAni64BitCounters rxDropNoBuffer;
1482 tAni64BitCounters rxDropDup;
1483 tAni64BitCounters rxCRCError;
1484
1485 tAni64BitCounters singleRetryPkts;
1486 tAni64BitCounters failedTxPkts;
1487 tAni64BitCounters ackTimeouts;
1488 tAni64BitCounters multiRetryPkts;
1489 tAni64BitCounters fragTxCnts;
1490 tAni64BitCounters fragRxCnts;
1491
1492 tAni64BitCounters txRTSSuccess;
1493 tAni64BitCounters txCTSSuccess;
1494 tAni64BitCounters rxRTSSuccess;
1495 tAni64BitCounters rxCTSSuccess;
1496
1497 tAniSecStats securityStats;
1498
1499 tAniTxRxStats mcStats;
1500 tAniTxRxStats bcStats;
1501
1502}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1503
1504typedef enum sPacketType
1505{
1506 ePACKET_TYPE_UNKNOWN,
1507 ePACKET_TYPE_11A,
1508 ePACKET_TYPE_11G,
1509 ePACKET_TYPE_11B,
1510 ePACKET_TYPE_11N
1511
1512}tPacketType, *tpPacketType;
1513
1514typedef struct sAniStatSummaryStruct
1515{
1516 tAniTxRxStats uc; //Unicast counters.
1517 tAniTxRxStats bc; //Broadcast counters.
1518 tAniTxRxStats mc; //Multicast counters.
1519 tAni64BitCounters txError;
1520 tAni64BitCounters rxError;
1521 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1522 tANI_U32 rxRate; // Rx rate of the last received packet.
1523 tANI_U32 txRate;
1524 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1525 tANI_U16 txMCSId;
1526 tPacketType rxPacketType;
1527 tPacketType txPacketType;
1528 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1529}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1530
Jeff Johnson295189b2012-06-20 16:38:30 -07001531//structure for stats that may be reset, like the ones in sta descriptor
1532//The stats are saved into here before reset. It should be tANI_U32 aligned.
1533typedef struct _sPermStaStats
1534{
1535 //tANI_U32 sentAesBlksUcastHi;
1536 //tANI_U32 sentAesBlksUcastLo;
1537 //tANI_U32 recvAesBlksUcastHi;
1538 //tANI_U32 recvAesBlksUcastLo;
1539 tANI_U32 aesFormatErrorUcastCnts;
1540 tANI_U32 aesReplaysUcast;
1541 tANI_U32 aesDecryptErrUcast;
1542 tANI_U32 singleRetryPkts;
1543 tANI_U32 failedTxPkts;
1544 tANI_U32 ackTimeouts;
1545 tANI_U32 multiRetryPkts;
1546 tANI_U32 fragTxCntsHi;
1547 tANI_U32 fragTxCntsLo;
1548 tANI_U32 transmittedPktsHi;
1549 tANI_U32 transmittedPktsLo;
1550
1551 // titan 3c stats
1552 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1553 tANI_U32 chunksTxCntLo;
1554 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1555 tANI_U32 compPktRxCntLo;
1556 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1557 tANI_U32 expanPktRxCntLo;
1558}tPermanentStaStats;
1559
Jeff Johnson295189b2012-06-20 16:38:30 -07001560
1561
1562
1563/// Definition for Disassociation response
1564typedef struct sSirSmeDisassocRsp
1565{
1566 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1567 tANI_U16 length;
1568 tANI_U8 sessionId; // Session ID
1569 tANI_U16 transactionId; // Transaction ID for cmd
1570 tSirResultCodes statusCode;
1571 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001572 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001573 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001574}
Jeff Johnson295189b2012-06-20 16:38:30 -07001575__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001576 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1577
1578/// Definition for Disassociation indication from peer
1579typedef struct sSirSmeDisassocInd
1580{
1581 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1582 tANI_U16 length;
1583 tANI_U8 sessionId; // Session Identifier
1584 tANI_U16 transactionId; // Transaction Identifier with PE
1585 tSirResultCodes statusCode;
1586 tSirMacAddr bssId;
1587 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001588 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001589 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001590 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001591} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1592
1593/// Definition for Disassociation confirm
1594/// MAC --->
1595typedef struct sSirSmeDisassocCnf
1596{
1597 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1598 tANI_U16 length;
1599 tSirResultCodes statusCode;
1600 tSirMacAddr bssId;
1601 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001602} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1603
1604/// Definition for Deauthetication request
1605typedef struct sSirSmeDeauthReq
1606{
1607 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1608 tANI_U16 length;
1609 tANI_U8 sessionId; // Session ID
1610 tANI_U16 transactionId; // Transaction ID for cmd
1611 tSirMacAddr bssId; // AP BSSID
1612 tSirMacAddr peerMacAddr;
1613 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001614} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1615
1616/// Definition for Deauthetication response
1617typedef struct sSirSmeDeauthRsp
1618{
1619 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1620 tANI_U16 length;
1621 tANI_U8 sessionId; // Session ID
1622 tANI_U16 transactionId; // Transaction ID for cmd
1623 tSirResultCodes statusCode;
1624 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001625} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1626
1627/// Definition for Deauthetication indication from peer
1628typedef struct sSirSmeDeauthInd
1629{
1630 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1631 tANI_U16 length;
1632 tANI_U8 sessionId; //Added for BT-AMP
1633 tANI_U16 transactionId; //Added for BT-AMP
1634 tSirResultCodes statusCode;
1635 tSirMacAddr bssId;// AP BSSID
1636 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001637
Jeff Johnson295189b2012-06-20 16:38:30 -07001638 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001639 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001640} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1641
1642/// Definition for Deauthentication confirm
1643/// MAC --->
1644typedef struct sSirSmeDeauthCnf
1645{
1646 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1647 tANI_U16 length;
1648 tSirResultCodes statusCode;
1649 tSirMacAddr bssId; // AP BSSID
1650 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001651} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1652
1653/// Definition for stop BSS request message
1654typedef struct sSirSmeStopBssReq
1655{
1656 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1657 tANI_U16 length;
1658 tANI_U8 sessionId; //Session ID
1659 tANI_U16 transactionId; //tranSaction ID for cmd
1660 tSirResultCodes reasonCode;
1661 tSirMacAddr bssId; //Self BSSID
1662} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1663
1664/// Definition for stop BSS response message
1665typedef struct sSirSmeStopBssRsp
1666{
1667 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1668 tANI_U16 length;
1669 tSirResultCodes statusCode;
1670 tANI_U8 sessionId; // Session ID
1671 tANI_U16 transactionId; // Transaction ID for cmd
1672} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1673
Jeff Johnson295189b2012-06-20 16:38:30 -07001674
1675
1676/// Definition for Channel Switch indication for station
1677/// MAC --->
1678typedef struct sSirSmeSwitchChannelInd
1679{
1680 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1681 tANI_U16 length;
1682 tANI_U8 sessionId;
1683 tANI_U16 newChannelId;
1684 tSirMacAddr bssId; // BSSID
1685} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1686
1687/// Definition for ULA complete indication message
1688typedef struct sirUlaCompleteInd
1689{
1690 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1691 tANI_U16 length;
1692 tSirResultCodes statusCode;
1693 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001694} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1695
1696/// Definition for ULA complete confirmation message
1697typedef struct sirUlaCompleteCnf
1698{
1699 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1700 tANI_U16 length;
1701 tSirResultCodes statusCode;
1702 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001703} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1704
1705/// Definition for Neighbor BSS indication
1706/// MAC --->
1707/// MAC reports this each time a new I/BSS is detected
1708typedef struct sSirSmeNeighborBssInd
1709{
1710 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1711 tANI_U16 length;
1712 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001713 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001714} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1715
1716/// Definition for MIC failure indication
1717/// MAC --->
1718/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1719typedef struct sSirSmeMicFailureInd
1720{
1721 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1722 tANI_U16 length;
1723 tANI_U8 sessionId;
1724 tSirMacAddr bssId; // BSSID
1725 tSirMicFailureInfo info;
1726} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1727
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001728typedef struct sSirSmeMissedBeaconInd
1729{
1730 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1731 tANI_U16 length;
1732 tANI_U8 bssIdx;
1733} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001734
1735/// Definition for Set Context request
1736/// ---> MAC
1737typedef struct sSirSmeSetContextReq
1738{
1739 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1740 tANI_U16 length;
1741 tANI_U8 sessionId; //Session ID
1742 tANI_U16 transactionId; //Transaction ID for cmd
1743 tSirMacAddr peerMacAddr;
1744 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001745 // TBD Following QOS fields to be uncommented
1746 //tAniBool qosInfoPresent;
1747 //tSirQos qos;
1748 tSirKeyMaterial keyMaterial;
1749} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1750
1751/// Definition for Set Context response
1752/// MAC --->
1753typedef struct sSirSmeSetContextRsp
1754{
1755 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1756 tANI_U16 length;
1757 tANI_U8 sessionId; // Session ID
1758 tANI_U16 transactionId; // Transaction ID for cmd
1759 tSirResultCodes statusCode;
1760 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001761} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1762
1763/// Definition for Remove Key Context request
1764/// ---> MAC
1765typedef struct sSirSmeRemoveKeyReq
1766{
1767 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1768 tANI_U16 length;
1769 tANI_U8 sessionId; // Session ID
1770 tANI_U16 transactionId; // Transaction ID for cmd
1771 tSirMacAddr bssId; // BSSID
1772 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001773 tANI_U8 edType;
1774 tANI_U8 wepType;
1775 tANI_U8 keyId;
1776 tANI_BOOLEAN unicast;
1777} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1778
1779/// Definition for Remove Key Context response
1780/// MAC --->
1781typedef struct sSirSmeRemoveKeyRsp
1782{
1783 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1784 tANI_U16 length;
1785 tANI_U8 sessionId; // Session ID
1786 tANI_U16 transactionId; // Transaction ID for cmd
1787 tSirResultCodes statusCode;
1788 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001789} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1790
1791/// Definition for Set Power request
1792/// ---> MAC
1793typedef struct sSirSmeSetPowerReq
1794{
1795 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1796 tANI_U16 length;
1797 tANI_U16 transactionId; // Transaction ID for cmd
1798 tANI_S8 powerLevel;
1799} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1800
1801/// Definition for Set Power response
1802/// MAC --->
1803typedef struct sSirSmeSetPowerRsp
1804{
1805 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1806 tANI_U16 length;
1807 tSirResultCodes statusCode;
1808 tANI_U16 transactionId; // Transaction ID for cmd
1809} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1810
Jeff Johnson295189b2012-06-20 16:38:30 -07001811
1812/// Definition for Link Test Start response
1813/// MAC --->
1814typedef struct sSirSmeLinkTestStartRsp
1815{
1816 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1817 tANI_U16 length;
1818 tSirMacAddr peerMacAddr;
1819 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001820} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1821
1822/// Definition for Link Test Stop response
1823/// WSM ---> MAC
1824typedef struct sSirSmeLinkTestStopRsp
1825{
1826 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1827 tANI_U16 length;
1828 tSirMacAddr peerMacAddr;
1829 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001830} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1831
1832/// Definition for kick starting DFS measurements
1833typedef struct sSirSmeDFSreq
1834{
1835 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1836 tANI_U16 length;
1837 tANI_U16 transactionId; // Transaction ID for cmd
1838} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1839
1840/// Definition for response message to previously
1841/// issued DFS request
1842typedef struct sSirSmeDFSrsp
1843{
1844 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1845 tANI_U16 length;
1846 tSirResultCodes statusCode;
1847 tANI_U16 transactionId; // Transaction ID for cmd
1848 tANI_U32 dfsReport[1];
1849} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1850
1851/// Statistic definitions
1852//=============================================================
1853// Per STA statistic structure; This same struct will be used for Aggregate
1854// STA stats as well.
1855
1856// Clear radio stats and clear per sta stats
1857typedef enum
1858{
1859 eANI_CLEAR_ALL_STATS, // Clears all stats
1860 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1861 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1862 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1863 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1864 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1865
1866 // Used to distinguish between per sta to security stats.
1867 // Used only by AP, FW just returns the same parameter as it received.
1868 eANI_LINK_STATS, // Get Per STA stats
1869 eANI_SECURITY_STATS, // Get Per STA security stats
1870
1871 eANI_CLEAR_STAT_TYPES_END
1872} tAniStatSubTypes;
1873
1874typedef struct sAniTxCtrs
1875{
1876 // add the rate counters here
1877 tANI_U32 tx1Mbps;
1878 tANI_U32 tx2Mbps;
1879 tANI_U32 tx5_5Mbps;
1880 tANI_U32 tx6Mbps;
1881 tANI_U32 tx9Mbps;
1882 tANI_U32 tx11Mbps;
1883 tANI_U32 tx12Mbps;
1884 tANI_U32 tx18Mbps;
1885 tANI_U32 tx24Mbps;
1886 tANI_U32 tx36Mbps;
1887 tANI_U32 tx48Mbps;
1888 tANI_U32 tx54Mbps;
1889 tANI_U32 tx72Mbps;
1890 tANI_U32 tx96Mbps;
1891 tANI_U32 tx108Mbps;
1892
1893 // tx path radio counts
1894 tANI_U32 txFragHi;
1895 tANI_U32 txFragLo;
1896 tANI_U32 txFrameHi;
1897 tANI_U32 txFrameLo;
1898 tANI_U32 txMulticastFrameHi;
1899 tANI_U32 txMulticastFrameLo;
1900 tANI_U32 txFailedHi;
1901 tANI_U32 txFailedLo;
1902 tANI_U32 multipleRetryHi;
1903 tANI_U32 multipleRetryLo;
1904 tANI_U32 singleRetryHi;
1905 tANI_U32 singleRetryLo;
1906 tANI_U32 ackFailureHi;
1907 tANI_U32 ackFailureLo;
1908 tANI_U32 xmitBeacons;
1909
1910 // titan 3c stats
1911 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1912 tANI_U32 txCbEscPktCntLo;
1913 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1914 tANI_U32 txChunksCntLo;
1915 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1916 tANI_U32 txCompPktCntLo;
1917 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1918 tANI_U32 tx50PerCompPktCntLo;
1919 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1920 tANI_U32 txExpanPktCntLo;
1921} tAniTxCtrs, *tpAniTxCtrs;
1922
1923typedef struct sAniRxCtrs
1924{
1925 // receive frame rate counters
1926 tANI_U32 rx1Mbps;
1927 tANI_U32 rx2Mbps;
1928 tANI_U32 rx5_5Mbps;
1929 tANI_U32 rx6Mbps;
1930 tANI_U32 rx9Mbps;
1931 tANI_U32 rx11Mbps;
1932 tANI_U32 rx12Mbps;
1933 tANI_U32 rx18Mbps;
1934 tANI_U32 rx24Mbps;
1935 tANI_U32 rx36Mbps;
1936 tANI_U32 rx48Mbps;
1937 tANI_U32 rx54Mbps;
1938 tANI_U32 rx72Mbps;
1939 tANI_U32 rx96Mbps;
1940 tANI_U32 rx108Mbps;
1941
1942 // receive size counters; 'Lte' = Less than or equal to
1943 tANI_U32 rxLte64;
1944 tANI_U32 rxLte128Gt64;
1945 tANI_U32 rxLte256Gt128;
1946 tANI_U32 rxLte512Gt256;
1947 tANI_U32 rxLte1kGt512;
1948 tANI_U32 rxLte1518Gt1k;
1949 tANI_U32 rxLte2kGt1518;
1950 tANI_U32 rxLte4kGt2k;
1951
1952 // rx radio stats
1953 tANI_U32 rxFrag;
1954 tANI_U32 rxFrame;
1955 tANI_U32 fcsError;
1956 tANI_U32 rxMulticast;
1957 tANI_U32 duplicate;
1958 tANI_U32 rtsSuccess;
1959 tANI_U32 rtsFailed;
1960 tANI_U32 wepUndecryptables;
1961 tANI_U32 drops;
1962 tANI_U32 aesFormatErrorUcastCnts;
1963 tANI_U32 aesReplaysUcast;
1964 tANI_U32 aesDecryptErrUcast;
1965
1966 // titan 3c stats
1967 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
1968 tANI_U32 rxDecompPktCntLo;
1969 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
1970 tANI_U32 rxCompPktCntLo;
1971 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
1972 tANI_U32 rxExpanPktCntLo;
1973} tAniRxCtrs, *tpAniRxCtrs;
1974
1975// Radio stats
1976typedef struct sAniRadioStats
1977{
1978 tAniTxCtrs tx;
1979 tAniRxCtrs rx;
1980} tAniRadioStats, *tpAniRadioStats;
1981
1982// Get Radio Stats request structure
1983// This structure shall be used for both Radio stats and Aggregate stats
1984// A valid request must contain entire structure with/without valid fields.
1985// Based on the request type, the valid fields will be checked.
1986typedef struct sAniGetStatsReq
1987{
1988 // Common for all types are requests
1989 tANI_U16 msgType; // message type is same as the request type
1990 tANI_U16 msgLen; // length of the entire request
1991 tANI_U8 sessionId; //Session ID
1992 tANI_U16 transactionId;
1993 tSirMacAddr bssId; //BSSID
1994 // only used for clear stats and per sta stats clear
1995 tAniStatSubTypes stat; // Clears the stats of the described types.
1996 tANI_U32 staId; // Per STA stats request must contain valid
1997 // values
1998 tANI_U8 macAddr[6];
1999} tAniGetStatsReq, *tpAniGetStatsReq;
2000
2001// Get Radio Stats response struct
2002typedef struct sAniGetRadioStatsRsp
2003{
2004 tANI_U16 type; // message type is same as the request type
2005 tANI_U16 msgLen; // length of the entire request
2006 tANI_U32 rc;
2007 tANI_U16 transactionId;
2008 tAniRadioStats radio;
2009} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2010
2011// Per Sta stats response struct
2012typedef struct sAniGetPerStaStatsRsp
2013{
2014 tANI_U16 type; // message type is same as the request type
2015 tANI_U16 msgLen; // length of the entire request
2016 tANI_U32 rc;
2017 tANI_U16 transactionId;
2018 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2019 tAniStaStatStruct sta;
2020 tANI_U32 staId;
2021 tANI_U8 macAddr[6];
2022} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2023
2024// Get Aggregate stats
2025typedef struct sAniGetAggrStaStatsRsp
2026{
2027 tANI_U16 type; // message type is same as the request type
2028 tANI_U16 msgLen; // length of the entire request
2029 tANI_U32 rc;
2030 tANI_U16 transactionId;
2031 tAniStaStatStruct sta;
2032} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2033
2034// Clear stats request and response structure. 'rc' field is unused in
2035// request and this field is used in response field.
2036typedef struct sAniClearStatsRsp
2037{
2038 tANI_U16 type; // message type is same as the request type
2039 tANI_U16 msgLen; // length of the entire request
2040 tANI_U32 rc; // return code - will be filled by FW on
2041 // response.
2042 // Same transaction ID will be returned by the FW
2043 tANI_U16 transactionId;
2044 tAniStatSubTypes stat; // Clears the stats of the described types.
2045 tANI_U32 staId; // Applicable only to PER STA stats clearing
2046 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2047} tAniClearStatsRsp, *tpAniClearStatsRsp;
2048
2049typedef struct sAniGetGlobalStatsRsp
2050{
2051 tANI_U16 type; // message type is same as the request type
2052 tANI_U16 msgLen; // length of the entire request
2053 tANI_U32 rc;
2054 tANI_U16 transactionId;
2055 tAniGlobalStatStruct global;
2056} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2057
2058typedef struct sAniGetStatSummaryRsp
2059{
2060 tANI_U16 type; // message type is same as the request type
2061 tANI_U16 msgLen; // length of the entire request --Why?
2062 tANI_U32 rc;
2063 tANI_U16 transactionId;
2064 tAniStatSummaryStruct stat;
2065} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2066
2067//***************************************************************
2068
2069
2070/*******************PE Statistics*************************/
2071typedef enum
2072{
2073 PE_SUMMARY_STATS_INFO = 0x00000001,
2074 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2075 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2076 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2077 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
2078 PE_PER_STA_STATS_INFO = 0x00000020
2079}ePEStatsMask;
2080
2081/*
2082 * tpAniGetPEStatsReq is tied to
2083 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2084 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2085 */
2086typedef struct sAniGetPEStatsReq
2087{
2088 // Common for all types are requests
2089 tANI_U16 msgType; // message type is same as the request type
2090 tANI_U16 msgLen; // length of the entire request
2091 tANI_U32 staId; // Per STA stats request must contain valid
2092 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2093} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2094
2095/*
2096 * tpAniGetPEStatsRsp is tied to
2097 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2098 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2099 */
2100typedef struct sAniGetPEStatsRsp
2101{
2102 // Common for all types are responses
2103 tANI_U16 msgType; // message type is same as the request type
2104 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2105 tANI_U8 sessionId;
2106 tANI_U32 rc; //success/failure
2107 tANI_U32 staId; // Per STA stats request must contain valid
2108 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2109/**********************************************************************************************
2110 //void *pStatsBuf;
2111 The Stats buffer starts here and can be an aggregate of more than one statistics
2112 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2113 intentionally and the src code that uses this structure should take that into account.
2114**********************************************************************************************/
2115} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2116
2117typedef struct sAniGetRssiReq
2118{
2119 // Common for all types are requests
2120 tANI_U16 msgType; // message type is same as the request type
2121 tANI_U16 msgLen; // length of the entire request
2122 tANI_U8 sessionId;
2123 tANI_U8 staId;
2124 void *rssiCallback;
2125 void *pDevContext; //device context
2126 void *pVosContext; //voss context
2127
2128} tAniGetRssiReq, *tpAniGetRssiReq;
2129
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302130typedef struct sAniGetSnrReq
2131{
2132 // Common for all types are requests
2133 tANI_U16 msgType; // message type is same as the request type
2134 tANI_U16 msgLen; // length of the entire request
2135 tANI_U8 sessionId;
2136 tANI_U8 staId;
2137 void *snrCallback;
2138 void *pDevContext; //device context
2139} tAniGetSnrReq, *tpAniGetSnrReq;
2140
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002141#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
2142typedef struct sAniGetRoamRssiRsp
2143{
2144 // Common for all types are responses
2145 tANI_U16 msgType; // message type is same as the request type
2146 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2147 tANI_U8 sessionId;
2148 tANI_U32 rc; //success/failure
2149 tANI_U32 staId; // Per STA stats request must contain valid
2150 tANI_S8 rssi;
2151 void *rssiReq; //rssi request backup
2152
2153} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2154
2155#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002156
2157#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
2158
2159typedef struct sSirTsmIE
2160{
2161 tANI_U8 tsid;
2162 tANI_U8 state;
2163 tANI_U16 msmt_interval;
2164} tSirTsmIE, *tpSirTsmIE;
2165
2166typedef struct sSirSmeTsmIEInd
2167{
2168 tSirTsmIE tsmIe;
2169 tANI_U8 sessionId;
2170} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2171
2172
2173typedef struct sAniTrafStrmMetrics
2174{
2175 tANI_U16 UplinkPktQueueDly;
2176 tANI_U16 UplinkPktQueueDlyHist[4];
2177 tANI_U32 UplinkPktTxDly;
2178 tANI_U16 UplinkPktLoss;
2179 tANI_U16 UplinkPktCount;
2180 tANI_U8 RoamingCount;
2181 tANI_U16 RoamingDly;
2182} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2183
2184typedef struct sAniGetTsmStatsReq
2185{
2186 // Common for all types are requests
2187 tANI_U16 msgType; // message type is same as the request type
2188 tANI_U16 msgLen; // length of the entire request
2189 tANI_U8 staId;
2190 tANI_U8 tid; // traffic id
2191 tSirMacAddr bssId;
2192 void *tsmStatsCallback;
2193 void *pDevContext; //device context
2194 void *pVosContext; //voss context
2195} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2196
2197typedef struct sAniGetTsmStatsRsp
2198{
2199 // Common for all types are responses
2200 tANI_U16 msgType; // message type is same as the request type
2201 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2202 tANI_U8 sessionId;
2203 tANI_U32 rc; //success/failure
2204 tANI_U32 staId; // Per STA stats request must contain valid
2205 tAniTrafStrmMetrics tsmMetrics;
2206 void *tsmStatsReq; //tsm stats request backup
2207} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002208
2209typedef struct sSirCcxBcnReportBssInfo
2210{
2211 tBcnReportFields bcnReportFields;
2212 tANI_U8 ieLen;
2213 tANI_U8 *pBuf;
2214} tSirCcxBcnReportBssInfo, *tpSirCcxBcnReportBssInfo;
2215
2216typedef struct sSirCcxBcnReportRsp
2217{
2218 tANI_U16 measurementToken;
2219 tANI_U8 flag; /* Flag to report measurement done and more data */
2220 tANI_U8 numBss;
2221 tSirCcxBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2222} tSirCcxBcnReportRsp, *tpSirCcxBcnReportRsp;
2223
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002224#endif /* FEATURE_WLAN_CCX || FEATURE_WLAN_CCX_UPLOAD */
2225
Jeff Johnson295189b2012-06-20 16:38:30 -07002226/* Change country code request MSG structure */
2227typedef struct sAniChangeCountryCodeReq
2228{
2229 // Common for all types are requests
2230 tANI_U16 msgType; // message type is same as the request type
2231 tANI_U16 msgLen; // length of the entire request
2232 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302233 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302234 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002235 void *changeCCCallback;
2236 void *pDevContext; //device context
2237 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002238
Jeff Johnson295189b2012-06-20 16:38:30 -07002239} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2240
Amar Singhal0d15bd52013-10-12 23:13:13 -07002241/* generic country code change request MSG structure */
2242typedef struct sAniGenericChangeCountryCodeReq
2243{
2244 // Common for all types are requests
2245 tANI_U16 msgType; // message type is same as the request type
2246 tANI_U16 msgLen; // length of the entire request
2247 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2248 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002249} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2250
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302251typedef struct sAniDHCPStopInd
2252{
2253 tANI_U16 msgType; // message type is same as the request type
2254 tANI_U16 msgLen; // length of the entire request
2255 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2256 tSirMacAddr macAddr;
2257
2258} tAniDHCPInd, *tpAniDHCPInd;
2259
Jeff Johnson295189b2012-06-20 16:38:30 -07002260typedef struct sAniSummaryStatsInfo
2261{
2262 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2263 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2264 // station successfully transmitted after more than one retransmission attempt
2265
2266 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2267 //(with and without retries, including multi-cast, broadcast)
2268 //tANI_U32 tx_fail_cnt;
2269 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2270 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2271 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2272 //(after appropriate filter rules including multi-cast, broadcast)
2273 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2274 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2275 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2276 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2277 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2278 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2279 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2280 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2281 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2282 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2283 //to provide this.
2284#if 0
2285 //providing the following stats, in case of wrap around for tx_byte_cnt
2286 tANI_U32 tx_unicast_lower_byte_cnt;
2287 tANI_U32 tx_unicast_upper_byte_cnt;
2288 tANI_U32 tx_multicast_lower_byte_cnt;
2289 tANI_U32 tx_multicast_upper_byte_cnt;
2290 tANI_U32 tx_broadcast_lower_byte_cnt;
2291 tANI_U32 tx_broadcast_upper_byte_cnt;
2292#endif
2293
2294}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2295
2296typedef enum eTxRateInfo
2297{
2298 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2299 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2300 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2301 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002302 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2303 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2304 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2305 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002306} tTxrateinfoflags;
2307
2308typedef struct sAniGlobalClassAStatsInfo
2309{
2310 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2311 //or MMPDU frames
2312 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2313 //or MMPDU frames when a promiscuous packet filter was enabled
2314 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2315 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2316 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2317 //to a supported rate and the order shall be the same as the supporteRates parameter.
2318 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2319 //for eg: if it is 10.5dBm, the value would be 105
2320 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2321 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2322 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2323 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2324 //500 kbit/sec, for the most
2325 //recently transmitted frame
2326 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2327 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2328 //HT40 rates; short and long guard interval
2329
2330}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2331
2332
2333typedef struct sAniGlobalSecurityStats
2334{
2335 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2336 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2337 //is enabled
2338 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2339 //because of MIC failures
2340 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2341 //because of a TKIP ICV error
2342 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2343 //invalid AES-CCMP format
2344 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2345 //the AES-CCMP replay protection procedure
2346 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2347 //errors detected by the AES-CCMP decryption algorithm
2348 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2349 //not available on the 802.11 station
2350 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2351 //because of a WEP ICV error
2352 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2353 //decrypted
2354 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2355
2356}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2357
2358typedef struct sAniGlobalClassBStatsInfo
2359{
2360 tAniGlobalSecurityStats ucStats;
2361 tAniGlobalSecurityStats mcbcStats;
2362}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2363
2364typedef struct sAniGlobalClassCStatsInfo
2365{
2366 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2367 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2368 //address 1 field
2369 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2370 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2371 //primary channel
2372 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2373 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2374 //when an A-MPDU is received
2375 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2376 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2377 //decoded correctly
2378
2379}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2380
2381typedef struct sAniPerStaStatsInfo
2382{
2383 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2384 //through a received 802.11 ACK frame
2385 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2386 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2387 //is transmitted
2388
2389}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2390
2391/**********************PE Statistics end*************************/
2392
2393
2394
2395typedef struct sSirRSSIThresholds
2396{
2397#ifdef ANI_BIG_BYTE_ENDIAN
2398 tANI_S8 ucRssiThreshold1 : 8;
2399 tANI_S8 ucRssiThreshold2 : 8;
2400 tANI_S8 ucRssiThreshold3 : 8;
2401 tANI_U8 bRssiThres1PosNotify : 1;
2402 tANI_U8 bRssiThres1NegNotify : 1;
2403 tANI_U8 bRssiThres2PosNotify : 1;
2404 tANI_U8 bRssiThres2NegNotify : 1;
2405 tANI_U8 bRssiThres3PosNotify : 1;
2406 tANI_U8 bRssiThres3NegNotify : 1;
2407 tANI_U8 bReserved10 : 2;
2408#else
2409 tANI_U8 bReserved10 : 2;
2410 tANI_U8 bRssiThres3NegNotify : 1;
2411 tANI_U8 bRssiThres3PosNotify : 1;
2412 tANI_U8 bRssiThres2NegNotify : 1;
2413 tANI_U8 bRssiThres2PosNotify : 1;
2414 tANI_U8 bRssiThres1NegNotify : 1;
2415 tANI_U8 bRssiThres1PosNotify : 1;
2416 tANI_S8 ucRssiThreshold3 : 8;
2417 tANI_S8 ucRssiThreshold2 : 8;
2418 tANI_S8 ucRssiThreshold1 : 8;
2419#endif
2420
2421}tSirRSSIThresholds, *tpSirRSSIThresholds;
2422
2423typedef struct sSirRSSINotification
2424{
2425#ifdef ANI_BIG_BYTE_ENDIAN
2426 tANI_U32 bRssiThres1PosCross : 1;
2427 tANI_U32 bRssiThres1NegCross : 1;
2428 tANI_U32 bRssiThres2PosCross : 1;
2429 tANI_U32 bRssiThres2NegCross : 1;
2430 tANI_U32 bRssiThres3PosCross : 1;
2431 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002432 v_S7_t avgRssi : 8;
2433 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002434#else
Srinivasdaaec712012-12-12 15:59:44 -08002435 tANI_U32 bReserved : 18;
2436 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002437 tANI_U32 bRssiThres3NegCross : 1;
2438 tANI_U32 bRssiThres3PosCross : 1;
2439 tANI_U32 bRssiThres2NegCross : 1;
2440 tANI_U32 bRssiThres2PosCross : 1;
2441 tANI_U32 bRssiThres1NegCross : 1;
2442 tANI_U32 bRssiThres1PosCross : 1;
2443#endif
2444
2445}tSirRSSINotification, *tpSirRSSINotification;
2446
Viral Modid86bde22012-12-10 13:09:21 -08002447
2448typedef struct sSirP2PNoaStart
2449{
2450 tANI_U32 status;
2451 tANI_U32 bssIdx;
2452} tSirP2PNoaStart, *tpSirP2PNoaStart;
2453
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302454typedef struct sSirTdlsInd
2455{
2456 tANI_U16 status;
2457 tANI_U16 assocId;
2458 tANI_U16 staIdx;
2459 tANI_U16 reasonCode;
2460} tSirTdlsInd, *tpSirTdlsInd;
2461
Jeff Johnson295189b2012-06-20 16:38:30 -07002462typedef struct sSirP2PNoaAttr
2463{
2464#ifdef ANI_BIG_BYTE_ENDIAN
2465 tANI_U32 index :8;
2466 tANI_U32 oppPsFlag :1;
2467 tANI_U32 ctWin :7;
2468 tANI_U32 rsvd1: 16;
2469#else
2470 tANI_U32 rsvd1: 16;
2471 tANI_U32 ctWin :7;
2472 tANI_U32 oppPsFlag :1;
2473 tANI_U32 index :8;
2474#endif
2475
2476#ifdef ANI_BIG_BYTE_ENDIAN
2477 tANI_U32 uNoa1IntervalCnt:8;
2478 tANI_U32 rsvd2:24;
2479#else
2480 tANI_U32 rsvd2:24;
2481 tANI_U32 uNoa1IntervalCnt:8;
2482#endif
2483 tANI_U32 uNoa1Duration;
2484 tANI_U32 uNoa1Interval;
2485 tANI_U32 uNoa1StartTime;
2486
2487#ifdef ANI_BIG_BYTE_ENDIAN
2488 tANI_U32 uNoa2IntervalCnt:8;
2489 tANI_U32 rsvd3:24;
2490#else
2491 tANI_U32 rsvd3:24;
2492 tANI_U32 uNoa2IntervalCnt:8;
2493#endif
2494 tANI_U32 uNoa2Duration;
2495 tANI_U32 uNoa2Interval;
2496 tANI_U32 uNoa2StartTime;
2497} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002498
2499typedef __ani_attr_pre_packed struct sSirTclasInfo
2500{
2501 tSirMacTclasIE tclas;
2502 tANI_U8 version; // applies only for classifier type ip
2503 __ani_attr_pre_packed union {
2504 tSirMacTclasParamEthernet eth;
2505 tSirMacTclasParamIPv4 ipv4;
2506 tSirMacTclasParamIPv6 ipv6;
2507 tSirMacTclasParam8021dq t8021dq;
2508 }__ani_attr_packed tclasParams;
2509} __ani_attr_packed tSirTclasInfo;
2510
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002511
2512#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
2513#define TSRS_11AG_RATE_6MBPS 0xC
2514#define TSRS_11B_RATE_5_5MBPS 0xB
2515
2516typedef struct sSirMacCCXTSRSIE
2517{
2518 tANI_U8 tsid;
2519 tANI_U8 rates[8];
2520} tSirMacCCXTSRSIE;
2521
2522typedef struct sSirMacCCXTSMIE
2523{
2524 tANI_U8 tsid;
2525 tANI_U8 state;
2526 tANI_U16 msmt_interval;
2527} tSirMacCCXTSMIE;
2528
2529typedef struct sTSMStats
2530{
2531 tANI_U8 tid;
2532 tSirMacAddr bssId;
2533 tTrafStrmMetrics tsmMetrics;
2534} tTSMStats, *tpTSMStats;
2535
2536typedef struct sCcxTSMContext
2537{
2538 tANI_U8 tid;
2539 tSirMacCCXTSMIE tsmInfo;
2540 tTrafStrmMetrics tsmMetrics;
2541} tCcxTSMContext, *tpCcxTSMContext;
2542
2543typedef struct sCcxPEContext
2544{
2545#if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD)
2546 tCcxMeasReq curMeasReq;
2547#endif
2548 tCcxTSMContext tsm;
2549} tCcxPEContext, *tpCcxPEContext;
2550
2551
2552#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
2553
2554
Jeff Johnson295189b2012-06-20 16:38:30 -07002555typedef struct sSirAddtsReqInfo
2556{
2557 tANI_U8 dialogToken;
2558 tSirMacTspecIE tspec;
2559
2560 tANI_U8 numTclas; // number of Tclas elements
2561 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2562 tANI_U8 tclasProc;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002563#if defined(FEATURE_WLAN_CCX)
Jeff Johnson295189b2012-06-20 16:38:30 -07002564 tSirMacCCXTSRSIE tsrsIE;
2565 tANI_U8 tsrsPresent:1;
2566#endif
2567 tANI_U8 wmeTspecPresent:1;
2568 tANI_U8 wsmTspecPresent:1;
2569 tANI_U8 lleTspecPresent:1;
2570 tANI_U8 tclasProcPresent:1;
2571} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2572
2573typedef struct sSirAddtsRspInfo
2574{
2575 tANI_U8 dialogToken;
2576 tSirMacStatusCodes status;
2577 tSirMacTsDelayIE delay;
2578
2579 tSirMacTspecIE tspec;
2580 tANI_U8 numTclas; // number of Tclas elements
2581 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2582 tANI_U8 tclasProc;
2583 tSirMacScheduleIE schedule;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002584#if defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_CCX_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -07002585 tSirMacCCXTSMIE tsmIE;
2586 tANI_U8 tsmPresent:1;
2587#endif
2588 tANI_U8 wmeTspecPresent:1;
2589 tANI_U8 wsmTspecPresent:1;
2590 tANI_U8 lleTspecPresent:1;
2591 tANI_U8 tclasProcPresent:1;
2592 tANI_U8 schedulePresent:1;
2593} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2594
2595typedef struct sSirDeltsReqInfo
2596{
2597 tSirMacTSInfo tsinfo;
2598 tSirMacTspecIE tspec;
2599 tANI_U8 wmeTspecPresent:1;
2600 tANI_U8 wsmTspecPresent:1;
2601 tANI_U8 lleTspecPresent:1;
2602} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2603
2604/// Add a tspec as defined
2605typedef struct sSirAddtsReq
2606{
2607 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2608 tANI_U16 length;
2609 tANI_U8 sessionId; //Session ID
2610 tANI_U16 transactionId;
2611 tSirMacAddr bssId; //BSSID
2612 tANI_U32 timeout; // in ms
2613 tANI_U8 rspReqd;
2614 tSirAddtsReqInfo req;
2615} tSirAddtsReq, *tpSirAddtsReq;
2616
2617typedef struct sSirAddtsRsp
2618{
2619 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2620 tANI_U16 length;
2621 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2622 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2623 tANI_U32 rc; // return code
2624 tSirAddtsRspInfo rsp;
2625} tSirAddtsRsp, *tpSirAddtsRsp;
2626
2627typedef struct sSirDeltsReq
2628{
2629 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2630 tANI_U16 length;
2631 tANI_U8 sessionId;//Session ID
2632 tANI_U16 transactionId;
2633 tSirMacAddr bssId; //BSSID
2634 tANI_U16 aid; // use 0 if macAddr is being specified
2635 tANI_U8 macAddr[6]; // only on AP to specify the STA
2636 tANI_U8 rspReqd;
2637 tSirDeltsReqInfo req;
2638} tSirDeltsReq, *tpSirDeltsReq;
2639
2640typedef struct sSirDeltsRsp
2641{
2642 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2643 tANI_U16 length;
2644 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2645 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2646 tANI_U32 rc;
2647 tANI_U16 aid; // use 0 if macAddr is being specified
2648 tANI_U8 macAddr[6]; // only on AP to specify the STA
2649 tSirDeltsReqInfo rsp;
2650} tSirDeltsRsp, *tpSirDeltsRsp;
2651
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002652#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002653
2654#define SIR_QOS_NUM_TSPEC_MAX 2
2655#define SIR_QOS_NUM_AC_MAX 4
2656
2657typedef struct sSirAggrQosReqInfo
2658{
2659 tANI_U16 tspecIdx;
2660 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2661}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2662
2663typedef struct sSirAggrQosReq
2664{
2665 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2666 tANI_U16 length;
2667 tANI_U8 sessionId; //Session ID
2668 tANI_U16 transactionId;
2669 tSirMacAddr bssId; //BSSID
2670 tANI_U32 timeout; // in ms
2671 tANI_U8 rspReqd;
2672 tSirAggrQosReqInfo aggrInfo;
2673}tSirAggrQosReq, *tpSirAggrQosReq;
2674
2675typedef struct sSirAggrQosRspInfo
2676{
2677 tANI_U16 tspecIdx;
2678 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2679} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2680
2681typedef struct sSirAggrQosRsp
2682{
2683 tANI_U16 messageType;
2684 tANI_U16 length;
2685 tANI_U8 sessionId;
2686 tSirAggrQosRspInfo aggrInfo;
2687} tSirAggrQosRsp, *tpSirAggrQosRsp;
2688
2689#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_CCX*/
2690
2691typedef struct sSirSetTxPowerReq
2692{
schang86c22c42013-03-13 18:41:24 -07002693 tANI_U16 messageType;
2694 tANI_U16 length;
2695 tSirMacAddr bssId;
2696 tANI_U8 mwPower;
2697 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002698} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2699
2700typedef struct sSirSetTxPowerRsp
2701{
2702 tANI_U16 messageType;
2703 tANI_U16 length;
2704 tANI_U32 status;
2705} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2706
2707typedef struct sSirGetTxPowerReq
2708{
2709 tANI_U16 messageType;
2710 tANI_U16 length;
2711 tANI_U16 staid;
2712} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2713
2714typedef struct sSirGetTxPowerRsp
2715{
2716 tANI_U16 messageType;
2717 tANI_U16 length; // length of the entire request
2718 tANI_U32 power; // units of milliwatts
2719 tANI_U32 status;
2720} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2721
2722
2723typedef tANI_U32 tSirMacNoise[3];
2724
2725typedef struct sSirGetNoiseRsp
2726{
2727 tANI_U16 messageType;
2728 tANI_U16 length;
2729 tSirMacNoise noise;
2730} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2731
2732
2733//
2734// PMC --> PE --> HAL
2735// Power save configuration parameters
2736//
2737typedef struct sSirPowerSaveCfg
2738{
2739 tANI_U16 listenInterval;
2740
2741 /* Number of consecutive missed beacons before
2742 * hardware generates an interrupt to wake up
2743 * the host. In units of listen interval.
2744 */
2745 tANI_U32 HeartBeatCount;
2746
2747 /* specifies which beacons are to be forwarded
2748 * to host when beacon filtering is enabled.
2749 * In units of listen interval.
2750 */
2751 tANI_U32 nthBeaconFilter;
2752
2753 /* Maximum number of PS-Poll send before
2754 * firmware sends data null with PM set to 0.
2755 */
2756 tANI_U32 maxPsPoll;
2757
2758 /* If the average RSSI value falls below the
2759 * minRssiThreshold, then FW will send an
2760 * interrupt to wake up the host.
2761 */
2762 tANI_U32 minRssiThreshold;
2763
2764 /* Number of beacons for which firmware will
2765 * collect the RSSI values and compute the average.
2766 */
2767 tANI_U8 numBeaconPerRssiAverage;
2768
2769 /* FW collects the RSSI stats for this period
2770 * in BMPS mode.
2771 */
2772 tANI_U8 rssiFilterPeriod;
2773
2774 // Enabling/disabling broadcast frame filter feature
2775 tANI_U8 broadcastFrameFilter;
2776
2777 // Enabling/disabling the ignore DTIM feature
2778 tANI_U8 ignoreDtim;
2779
2780 /* The following configuration parameters are kept
2781 * in order to be backward compatible for Gen5.
2782 * These will NOT be used for Gen6 Libra chip
2783 */
2784 tBeaconForwarding beaconFwd;
2785 tANI_U16 nthBeaconFwd;
2786 tANI_U8 fEnablePwrSaveImmediately;
2787 tANI_U8 fPSPoll;
2788
2789 // Enabling/disabling Beacon Early Termination feature
2790 tANI_U8 fEnableBeaconEarlyTermination;
2791 tANI_U8 bcnEarlyTermWakeInterval;
2792
2793}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2794
2795/* Reason code for requesting Full Power. This reason code is used by
2796 any module requesting full power from PMC and also by PE when it
2797 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2798typedef enum eRequestFullPowerReason
2799{
2800 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2801 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2802 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2803 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2804 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2805 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2806 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2807 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2808 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2809 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002810#ifdef FEATURE_WLAN_TDLS
2811 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2812#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002813 eSME_REASON_OTHER /* No specific reason. General reason code */
2814} tRequestFullPowerReason, tExitBmpsReason;
2815
2816
2817
2818//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2819typedef struct sExitBmpsInfo
2820{
2821 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2822}tExitBmpsInfo, *tpExitBmpsInfo;
2823
2824
2825// MAC SW --> SME
2826// Message indicating to SME to exit BMPS sleep mode
2827typedef struct sSirSmeExitBmpsInd
2828{
2829 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2830 tANI_U16 mesgLen;
2831 tSirResultCodes statusCode;
2832 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2833
2834} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2835
2836
2837//
2838// HDD -> LIM
2839// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2840// tSirMsgQ.reserved = 0
2841// tSirMsgQ.body = instance of tDelBAParams
2842//
2843typedef struct sSmeDelBAPeerInd
2844{
2845 // Message Type
2846 tANI_U16 mesgType;
2847
2848 tSirMacAddr bssId;//BSSID
2849
2850 // Message Length
2851 tANI_U16 mesgLen;
2852
2853 // Station Index
2854 tANI_U16 staIdx;
2855
2856 // TID for which the BA session is being deleted
2857 tANI_U8 baTID;
2858
2859 // DELBA direction
2860 // eBA_INITIATOR - Originator
2861 // eBA_RECEIPIENT - Recipient
2862 tANI_U8 baDirection;
2863} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2864
2865typedef struct sSmeIbssPeerInd
2866{
2867 tANI_U16 mesgType;
2868 tANI_U16 mesgLen;
2869 tANI_U8 sessionId;
2870
2871 tSirMacAddr peerAddr;
2872 tANI_U16 staId;
2873
2874 /*The DPU signatures will be sent eventually to TL to help it determine the
2875 association to which a packet belongs to*/
2876 /*Unicast DPU signature*/
2877 tANI_U8 ucastSig;
2878
2879 /*Broadcast DPU signature*/
2880 tANI_U8 bcastSig;
2881
2882 //Beacon will be appended for new Peer indication.
2883}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2884
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002885typedef struct sSirIbssPeerInactivityInd
2886{
2887 tANI_U8 bssIdx;
2888 tANI_U8 staIdx;
2889 tSirMacAddr peerAddr;
2890}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2891
2892
Jeff Johnson295189b2012-06-20 16:38:30 -07002893typedef struct sLimScanChn
2894{
2895 tANI_U16 numTimeScan; //how many time this channel is scan
2896 tANI_U8 channelId;
2897}tLimScanChn;
2898
2899typedef struct sSmeGetScanChnRsp
2900{
2901 // Message Type
2902 tANI_U16 mesgType;
2903 // Message Length
2904 tANI_U16 mesgLen;
2905 tANI_U8 sessionId;
2906 tANI_U8 numChn;
2907 tLimScanChn scanChn[1];
2908} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2909
2910typedef struct sLimScanChnInfo
2911{
2912 tANI_U8 numChnInfo; //number of channels in scanChn
2913 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2914}tLimScanChnInfo;
2915
Jeff Johnson295189b2012-06-20 16:38:30 -07002916typedef struct sSirSmeGetAssocSTAsReq
2917{
2918 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2919 tANI_U16 length;
2920 tSirMacAddr bssId; // BSSID
2921 tANI_U16 modId;
2922 void *pUsrContext;
2923 void *pSapEventCallback;
2924 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2925} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002926
2927typedef struct sSmeMaxAssocInd
2928{
2929 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2930 tANI_U16 mesgLen;
2931 tANI_U8 sessionId;
2932 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2933} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2934
2935/*--------------------------------------------------------------------*/
2936/* BootLoader message definition */
2937/*--------------------------------------------------------------------*/
2938
2939/*--------------------------------------------------------------------*/
2940/* FW image size */
2941/*--------------------------------------------------------------------*/
2942#define SIR_FW_IMAGE_SIZE 146332
2943
2944
2945#define SIR_BOOT_MODULE_ID 1
2946
2947#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2948#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2949#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2950#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2951#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2952#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2953#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2954
2955/*--------------------------------------------------------------------*/
2956/* Bootloader message syntax */
2957/*--------------------------------------------------------------------*/
2958
2959// Message header
2960#define SIR_BOOT_MB_HEADER 0
2961#define SIR_BOOT_MB_HEADER2 1
2962
2963#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2964#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2965
2966// BOOT_SETUP_IND parameter indices
2967#define SIR_BOOT_SETUP_IND_MBADDR 2
2968#define SIR_BOOT_SETUP_IND_MBSIZE 3
2969#define SIR_BOOT_SETUP_IND_MEMOPT 4
2970#define SIR_BOOT_SETUP_IND_LEN \
2971 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2972
2973// BOOT_POST_RESULT_IND parameter indices
2974#define SIR_BOOT_POST_RESULT_IND_RES 2
2975#define SIR_BOOT_POST_RESULT_IND_LEN \
2976 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
2977
2978#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
2979#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
2980#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
2981#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
2982
2983
2984// BOOT_DNLD_RESULT_IND parameter indices
2985#define SIR_BOOT_DNLD_RESULT_IND_RES 2
2986#define SIR_BOOT_DNLD_RESULT_IND_LEN \
2987 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
2988
2989#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
2990#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
2991#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
2992
2993// BOOT_DNLD_DEV_REQ
2994#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
2995#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
2996#define SIR_BOOT_DNLD_DEV_REQ_LEN \
2997 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
2998
2999// BOOT_DNLD_DEV_RSP
3000#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3001#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3002 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3003
3004#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3005#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3006
3007// BOOT_DNLD_REQ
3008#define SIR_BOOT_DNLD_REQ_OFFSET 2
3009#define SIR_BOOT_DNLD_REQ_WRADDR 3
3010#define SIR_BOOT_DNLD_REQ_SIZE 4
3011#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3012
3013// BOOT_DNLD_RSP
3014#define SIR_BOOT_DNLD_RSP_SIZE 2
3015#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3016
Jeff Johnson295189b2012-06-20 16:38:30 -07003017
3018// board capabilities fields are defined here.
3019typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3020{
3021#ifndef ANI_LITTLE_BIT_ENDIAN
3022 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3023 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3024 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3025 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3026 tANI_U32 rsvd1:2;
3027 // (productId derives sub-category in the following three families)
3028 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3029 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3030 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3031 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3032 tANI_U32 bbChipVer:4; // Baseband chip version
3033 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3034 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3035 tANI_U32 nReceivers:2; // 0 based.
3036 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3037 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3038 tANI_U32 rsvd:1;
3039 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3040#else
3041
3042 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3043 tANI_U32 rsvd:1;
3044 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3045 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3046 tANI_U32 nReceivers:2; // 0 based.
3047 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3048 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3049 tANI_U32 bbChipVer:4; // Baseband chip version
3050 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3051 // (productId derives sub-category in the following three families)
3052 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3053 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3054 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3055 tANI_U32 rsvd1:2;
3056 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3057 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3058 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3059 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3060#endif
3061} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3062
3063# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3064# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3065
3066# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3067# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3068
3069# define ANI_BCAP_SDRAM_MASK 0x4
3070# define ANI_BCAP_SDRAM_OFFSET 2
3071
3072# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3073# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3074
3075# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3076# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3077
3078# define ANI_BCAP_RADIO_ON_MASK 0xC0
3079# define ANI_BCAP_RADIO_ON_OFFSET 6
3080
3081# define ANI_BCAP_LO_TYPE_MASK 0x300
3082# define ANI_BCAP_LO_TYPE_OFFSET 8
3083
3084# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3085# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3086
3087# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3088# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3089
3090# define ANI_BCAP_RADIO_OFF 0
3091# define ANI_BCAP_RADIO_ON 1
3092# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3093
3094
3095/// WOW related structures
3096// SME -> PE <-> HAL
3097#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3098#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3099
3100// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3101// SME/HDD maintains the list of the BCAST wake-up patterns.
3102// This is a pass through message for PE
3103typedef struct sSirWowlAddBcastPtrn
3104{
3105 tANI_U8 ucPatternId; // Pattern ID
3106 // Pattern byte offset from beginning of the 802.11 packet to start of the
3107 // wake-up pattern
3108 tANI_U8 ucPatternByteOffset;
3109 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3110 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3111 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3112 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3113 // Extra pattern data beyond 128 bytes
3114 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3115 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003116 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003117} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3118
3119
3120// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3121// SME/HDD maintains the list of the BCAST wake-up patterns.
3122// This is a pass through message for PE
3123typedef struct sSirWowlDelBcastPtrn
3124{
3125 /* Pattern ID of the wakeup pattern to be deleted */
3126 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003127 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003128}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3129
3130
3131// SME->PE: Enter WOWLAN parameters
3132typedef struct sSirSmeWowlEnterParams
3133{
3134 /* Enables/disables magic packet filtering */
3135 tANI_U8 ucMagicPktEnable;
3136
3137 /* Magic pattern */
3138 tSirMacAddr magicPtrn;
3139
3140 /* Enables/disables packet pattern filtering */
3141 tANI_U8 ucPatternFilteringEnable;
3142
3143#ifdef WLAN_WAKEUP_EVENTS
3144 /* This configuration directs the WoW packet filtering to look for EAP-ID
3145 * requests embedded in EAPOL frames and use this as a wake source.
3146 */
3147 tANI_U8 ucWoWEAPIDRequestEnable;
3148
3149 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3150 * requests and use this as a wake source.
3151 */
3152 tANI_U8 ucWoWEAPOL4WayEnable;
3153
3154 /* This configuration allows a host wakeup on an network scan offload match.
3155 */
3156 tANI_U8 ucWowNetScanOffloadMatch;
3157
3158 /* This configuration allows a host wakeup on any GTK rekeying error.
3159 */
3160 tANI_U8 ucWowGTKRekeyError;
3161
3162 /* This configuration allows a host wakeup on BSS connection loss.
3163 */
3164 tANI_U8 ucWoWBSSConnLoss;
3165#endif // WLAN_WAKEUP_EVENTS
3166
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003167 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003168} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3169
3170
3171// PE<->HAL: Enter WOWLAN parameters
3172typedef struct sSirHalWowlEnterParams
3173{
3174 /* Enables/disables magic packet filtering */
3175 tANI_U8 ucMagicPktEnable;
3176
3177 /* Magic pattern */
3178 tSirMacAddr magicPtrn;
3179
3180 /* Enables/disables packet pattern filtering in firmware.
3181 Enabling this flag enables broadcast pattern matching
3182 in Firmware. If unicast pattern matching is also desired,
3183 ucUcastPatternFilteringEnable flag must be set tot true
3184 as well
3185 */
3186 tANI_U8 ucPatternFilteringEnable;
3187
3188 /* Enables/disables unicast packet pattern filtering.
3189 This flag specifies whether we want to do pattern match
3190 on unicast packets as well and not just broadcast packets.
3191 This flag has no effect if the ucPatternFilteringEnable
3192 (main controlling flag) is set to false
3193 */
3194 tANI_U8 ucUcastPatternFilteringEnable;
3195
3196 /* This configuration is valid only when magicPktEnable=1.
3197 * It requests hardware to wake up when it receives the
3198 * Channel Switch Action Frame.
3199 */
3200 tANI_U8 ucWowChnlSwitchRcv;
3201
3202 /* This configuration is valid only when magicPktEnable=1.
3203 * It requests hardware to wake up when it receives the
3204 * Deauthentication Frame.
3205 */
3206 tANI_U8 ucWowDeauthRcv;
3207
3208 /* This configuration is valid only when magicPktEnable=1.
3209 * It requests hardware to wake up when it receives the
3210 * Disassociation Frame.
3211 */
3212 tANI_U8 ucWowDisassocRcv;
3213
3214 /* This configuration is valid only when magicPktEnable=1.
3215 * It requests hardware to wake up when it has missed
3216 * consecutive beacons. This is a hardware register
3217 * configuration (NOT a firmware configuration).
3218 */
3219 tANI_U8 ucWowMaxMissedBeacons;
3220
3221 /* This configuration is valid only when magicPktEnable=1.
3222 * This is a timeout value in units of microsec. It requests
3223 * hardware to unconditionally wake up after it has stayed
3224 * in WoWLAN mode for some time. Set 0 to disable this feature.
3225 */
3226 tANI_U8 ucWowMaxSleepUsec;
3227
3228#ifdef WLAN_WAKEUP_EVENTS
3229 /* This configuration directs the WoW packet filtering to look for EAP-ID
3230 * requests embedded in EAPOL frames and use this as a wake source.
3231 */
3232 tANI_U8 ucWoWEAPIDRequestEnable;
3233
3234 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3235 * requests and use this as a wake source.
3236 */
3237 tANI_U8 ucWoWEAPOL4WayEnable;
3238
3239 /* This configuration allows a host wakeup on an network scan offload match.
3240 */
3241 tANI_U8 ucWowNetScanOffloadMatch;
3242
3243 /* This configuration allows a host wakeup on any GTK rekeying error.
3244 */
3245 tANI_U8 ucWowGTKRekeyError;
3246
3247 /* This configuration allows a host wakeup on BSS connection loss.
3248 */
3249 tANI_U8 ucWoWBSSConnLoss;
3250#endif // WLAN_WAKEUP_EVENTS
3251
3252 /* Status code to be filled by HAL when it sends
3253 * SIR_HAL_WOWL_ENTER_RSP to PE.
3254 */
3255 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003256
3257 /*BSSID to find the current session
3258 */
3259 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003260} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3261
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003262// PE<->HAL: Exit WOWLAN parameters
3263typedef struct sSirHalWowlExitParams
3264{
3265 /* Status code to be filled by HAL when it sends
3266 * SIR_HAL_WOWL_EXIT_RSP to PE.
3267 */
3268 eHalStatus status;
3269
3270 /*BSSIDX to find the current session
3271 */
3272 tANI_U8 bssIdx;
3273} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3274
Jeff Johnson295189b2012-06-20 16:38:30 -07003275
3276#define SIR_MAX_NAME_SIZE 64
3277#define SIR_MAX_TEXT_SIZE 32
3278
3279typedef struct sSirName {
3280 v_U8_t num_name;
3281 v_U8_t name[SIR_MAX_NAME_SIZE];
3282} tSirName;
3283
3284typedef struct sSirText {
3285 v_U8_t num_text;
3286 v_U8_t text[SIR_MAX_TEXT_SIZE];
3287} tSirText;
3288
3289
3290#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3291#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3292#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3293#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3294#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3295#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3296#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3297#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3298#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3299#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3300#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3301#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3302#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3303#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3304#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3305#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3306
3307
3308typedef struct sSirWPSProbeRspIE {
3309 v_U32_t FieldPresent;
3310 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3311 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3312 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3313 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3314 v_U16_t DevicePasswordID; // Device Password ID
3315 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3316 v_U8_t ResponseType; // Response type
3317 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3318 tSirName Manufacture;
3319 tSirText ModelName;
3320 tSirText ModelNumber;
3321 tSirText SerialNumber;
3322 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3323 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3324 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3325 tSirText DeviceName;
3326 v_U16_t ConfigMethod; // Configuaration method
3327 v_U8_t RFBand; // RF bands available on the AP
3328} tSirWPSProbeRspIE;
3329
3330#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3331#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3332#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3333#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3334#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3335#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3336#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3337#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3338
3339typedef struct sSirWPSBeaconIE {
3340 v_U32_t FieldPresent;
3341 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3342 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3343 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3344 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3345 v_U16_t DevicePasswordID; // Device Password ID
3346 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3347 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3348 v_U8_t RFBand; // RF bands available on the AP
3349} tSirWPSBeaconIE;
3350
3351#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3352#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3353
3354typedef struct sSirWPSAssocRspIE {
3355 v_U32_t FieldPresent;
3356 v_U32_t Version;
3357 v_U8_t ResposeType;
3358} tSirWPSAssocRspIE;
3359
3360typedef struct sSirAPWPSIEs {
3361 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3362 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3363 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3364} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3365
3366typedef struct sSirUpdateAPWPSIEsReq
3367{
3368 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3369 tANI_U16 length;
3370 tANI_U16 transactionId; //Transaction ID for cmd
3371 tSirMacAddr bssId; // BSSID
3372 tANI_U8 sessionId; //Session ID
3373 tSirAPWPSIEs APWPSIEs;
3374} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3375
3376typedef struct sSirUpdateParams
3377{
3378 tANI_U16 messageType;
3379 tANI_U16 length;
3380 tANI_U8 sessionId; // Session ID
3381 tANI_U8 ssidHidden; // Hide SSID
3382} tSirUpdateParams, *tpSirUpdateParams;
3383
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003384//Beacon Interval
3385typedef struct sSirChangeBIParams
3386{
3387 tANI_U16 messageType;
3388 tANI_U16 length;
3389 tANI_U16 beaconInterval; // Beacon Interval
3390 tSirMacAddr bssId;
3391 tANI_U8 sessionId; // Session ID
3392} tSirChangeBIParams, *tpSirChangeBIParams;
3393
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303394typedef struct sSirOBSSHT40Param
3395{
3396 tANI_U16 OBSSScanPassiveDwellTime;
3397 tANI_U16 OBSSScanActiveDwellTime;
3398 tANI_U16 BSSChannelWidthTriggerScanInterval;
3399 tANI_U16 OBSSScanPassiveTotalPerChannel;
3400 tANI_U16 OBSSScanActiveTotalPerChannel;
3401 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3402 tANI_U16 OBSSScanActivityThreshold;
3403}tSirOBSSHT40Param, *tpOBSSHT40Param;
3404
Jeff Johnson295189b2012-06-20 16:38:30 -07003405#define SIR_WPS_UUID_LEN 16
3406#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3407
3408typedef struct sSirWPSPBCSession {
3409 struct sSirWPSPBCSession *next;
3410 tSirMacAddr addr;
3411 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3412 tANI_TIMESTAMP timestamp;
3413} tSirWPSPBCSession;
3414
3415typedef struct sSirSmeGetWPSPBCSessionsReq
3416{
3417 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3418 tANI_U16 length;
3419 void *pUsrContext;
3420 void *pSapEventCallback;
3421 tSirMacAddr bssId; // BSSID
3422 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3423} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3424
3425typedef struct sSirWPSPBCProbeReq
3426{
3427 tSirMacAddr peerMacAddr;
3428 tANI_U16 probeReqIELen;
3429 tANI_U8 probeReqIE[512];
3430} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3431
3432// probereq from peer, when wsc is enabled
3433typedef struct sSirSmeProbeReqInd
3434{
3435 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3436 tANI_U16 length;
3437 tANI_U8 sessionId;
3438 tSirMacAddr bssId;
3439 tSirWPSPBCProbeReq WPSPBCProbeReq;
3440} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3441
3442typedef struct sSirUpdateAPWPARSNIEsReq
3443{
3444 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3445 tANI_U16 length;
3446 tANI_U16 transactionId; //Transaction ID for cmd
3447 tSirMacAddr bssId; // BSSID
3448 tANI_U8 sessionId; //Session ID
3449 tSirRSNie APWPARSNIEs;
3450} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3451
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003452#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003453#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003454#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3455#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3456#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3457#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3458#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3459#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3460#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003461
3462/*Adaptive Thresholds to be used for FW based scanning*/
3463#define LFR_SENSITIVITY_THR_1MBPS -89
3464#define LFR_LOOKUP_THR_1MBPS -78
3465#define LFR_SENSITIVITY_THR_2MBPS -87
3466#define LFR_LOOKUP_THR_2MBPS -78
3467#define LFR_SENSITIVITY_THR_5_5MBPS -86
3468#define LFR_LOOKUP_THR_5_5MBPS -77
3469#define LFR_SENSITIVITY_THR_11MBPS -85
3470#define LFR_LOOKUP_THR_11MBPS -76
3471#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3472#define LFR_LOOKUP_THR_6MBPS_2G -78
3473#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3474#define LFR_LOOKUP_THR_6MBPS_5G -78
3475#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3476#define LFR_LOOKUP_THR_12MBPS_2G -78
3477#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3478#define LFR_LOOKUP_THR_12MBPS_5G -76
3479#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3480#define LFR_LOOKUP_THR_24MBPS_2G -76
3481#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3482#define LFR_LOOKUP_THR_24MBPS_5G -74
3483#define LFR_SENSITIVITY_THR_DEFAULT 0
3484#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003485#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003486
3487// SME -> HAL - This is the host offload request.
3488#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3489#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3490#define SIR_IPV6_NS_OFFLOAD 2
3491#define SIR_OFFLOAD_DISABLE 0
3492#define SIR_OFFLOAD_ENABLE 1
3493#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303494#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003495#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303496#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003497
3498#ifdef WLAN_NS_OFFLOAD
3499typedef struct sSirNsOffloadReq
3500{
3501 tANI_U8 srcIPv6Addr[16];
3502 tANI_U8 selfIPv6Addr[16];
3503 //Only support 2 possible Network Advertisement IPv6 address
3504 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3505 tANI_U8 selfMacAddr[6];
3506 tANI_U8 srcIPv6AddrValid;
3507 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303508 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003509} tSirNsOffloadReq, *tpSirNsOffloadReq;
3510#endif //WLAN_NS_OFFLOAD
3511
3512typedef struct sSirHostOffloadReq
3513{
3514 tANI_U8 offloadType;
3515 tANI_U8 enableOrDisable;
3516 union
3517 {
3518 tANI_U8 hostIpv4Addr [4];
3519 tANI_U8 hostIpv6Addr [16];
3520 } params;
3521#ifdef WLAN_NS_OFFLOAD
3522 tSirNsOffloadReq nsOffloadInfo;
3523#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003524 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003525} tSirHostOffloadReq, *tpSirHostOffloadReq;
3526
3527/* Packet Types. */
3528#define SIR_KEEP_ALIVE_NULL_PKT 1
3529#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3530
3531/* Enable or disable offload. */
3532#define SIR_KEEP_ALIVE_DISABLE 0
3533#define SIR_KEEP_ALIVE_ENABLE 1
3534
3535/* Keep Alive request. */
3536typedef struct sSirKeepAliveReq
3537{
3538 v_U8_t packetType;
3539 v_U32_t timePeriod;
3540 tSirIpv4Addr hostIpv4Addr;
3541 tSirIpv4Addr destIpv4Addr;
3542 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003543 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003544} tSirKeepAliveReq, *tpSirKeepAliveReq;
3545
3546typedef struct sSirSmeAddStaSelfReq
3547{
3548 tANI_U16 mesgType;
3549 tANI_U16 mesgLen;
3550 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003551 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003552}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3553
3554typedef struct sSirSmeDelStaSelfReq
3555{
3556 tANI_U16 mesgType;
3557 tANI_U16 mesgLen;
3558 tSirMacAddr selfMacAddr;
3559}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3560
3561typedef struct sSirSmeAddStaSelfRsp
3562{
3563 tANI_U16 mesgType;
3564 tANI_U16 mesgLen;
3565 tANI_U16 status;
3566 tSirMacAddr selfMacAddr;
3567}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3568
3569typedef struct sSirSmeDelStaSelfRsp
3570{
3571 tANI_U16 mesgType;
3572 tANI_U16 mesgLen;
3573 tANI_U16 status;
3574 tSirMacAddr selfMacAddr;
3575}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3576
3577/* Coex Indication defines -
3578 should match WLAN_COEX_IND_DATA_SIZE
3579 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3580 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3581#define SIR_COEX_IND_DATA_SIZE (4)
3582#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3583#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003584#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3585#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003586#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3587#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003588
3589typedef struct sSirSmeCoexInd
3590{
3591 tANI_U16 mesgType;
3592 tANI_U16 mesgLen;
3593 tANI_U32 coexIndType;
3594 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3595}tSirSmeCoexInd, *tpSirSmeCoexInd;
3596
Jeff Johnson295189b2012-06-20 16:38:30 -07003597typedef struct sSirSmeMgmtFrameInd
3598{
3599 tANI_U16 mesgType;
3600 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303601 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003602 tANI_U8 sessionId;
3603 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303604 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003605 tANI_U8 frameBuf[1]; //variable
3606}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003607
Chet Lanctot186b5732013-03-18 10:26:30 -07003608#ifdef WLAN_FEATURE_11W
3609typedef struct sSirSmeUnprotMgmtFrameInd
3610{
3611 tANI_U8 sessionId;
3612 tANI_U8 frameType;
3613 tANI_U8 frameLen;
3614 tANI_U8 frameBuf[1]; //variable
3615}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3616#endif
3617
Jeff Johnson295189b2012-06-20 16:38:30 -07003618#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3619 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3620 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3621 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3622#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3623 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3624
3625/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003626typedef struct sSirNoAParam
3627{
3628 tANI_U8 ctWindow:7;
3629 tANI_U8 OppPS:1;
3630 tANI_U8 count;
3631 tANI_U32 duration;
3632 tANI_U32 interval;
3633 tANI_U32 singleNoADuration;
3634 tANI_U8 psSelection;
3635}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003636
Jeff Johnson295189b2012-06-20 16:38:30 -07003637typedef struct sSirWlanSuspendParam
3638{
3639 tANI_U8 configuredMcstBcstFilterSetting;
3640}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3641
3642typedef struct sSirWlanResumeParam
3643{
3644 tANI_U8 configuredMcstBcstFilterSetting;
3645}tSirWlanResumeParam,*tpSirWlanResumeParam;
3646
3647typedef struct sSirWlanSetRxpFilters
3648{
3649 tANI_U8 configuredMcstBcstFilterSetting;
3650 tANI_U8 setMcstBcstFilter;
3651}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003652
3653
3654#ifdef FEATURE_WLAN_SCAN_PNO
3655//
3656// PNO Messages
3657//
3658
3659// Set PNO
3660#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303661#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003662#define SIR_PNO_MAX_SUPP_NETWORKS 16
3663#define SIR_PNO_MAX_SCAN_TIMERS 10
3664
3665/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3666#define SIR_PNO_MAX_PB_REQ_SIZE 450
3667
3668#define SIR_PNO_24G_DEFAULT_CH 1
3669#define SIR_PNO_5G_DEFAULT_CH 36
3670
3671typedef enum
3672{
3673 SIR_PNO_MODE_IMMEDIATE,
3674 SIR_PNO_MODE_ON_SUSPEND,
3675 SIR_PNO_MODE_ON_RESUME,
3676 SIR_PNO_MODE_MAX
3677} eSirPNOMode;
3678
3679typedef struct
3680{
3681 tSirMacSSid ssId;
3682 tANI_U32 authentication;
3683 tANI_U32 encryption;
3684 tANI_U32 bcastNetwType;
3685 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303686 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003687 tANI_U8 rssiThreshold;
3688} tSirNetworkType;
3689
3690typedef struct
3691{
3692 tANI_U32 uTimerValue;
3693 tANI_U32 uTimerRepeat;
3694}tSirScanTimer;
3695
3696typedef struct
3697{
3698 tANI_U8 ucScanTimersCount;
3699 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3700} tSirScanTimersType;
3701
3702typedef struct sSirPNOScanReq
3703{
3704 tANI_U8 enable;
3705 eSirPNOMode modePNO;
3706 tANI_U8 ucNetworksCount;
3707 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3708 tSirScanTimersType scanTimers;
3709
3710 /*added by SME*/
3711 tANI_U16 us24GProbeTemplateLen;
3712 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3713 tANI_U16 us5GProbeTemplateLen;
3714 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3715} tSirPNOScanReq, *tpSirPNOScanReq;
3716
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003717typedef struct sSirSetRSSIFilterReq
3718{
3719 tANI_U8 rssiThreshold;
3720} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3721
3722
3723// Update Scan Params
3724typedef struct {
3725 tANI_U8 b11dEnabled;
3726 tANI_U8 b11dResolved;
3727 tANI_U8 ucChannelCount;
3728 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3729 tANI_U16 usPassiveMinChTime;
3730 tANI_U16 usPassiveMaxChTime;
3731 tANI_U16 usActiveMinChTime;
3732 tANI_U16 usActiveMaxChTime;
3733 tANI_U8 ucCBState;
3734} tSirUpdateScanParams, * tpSirUpdateScanParams;
3735
3736// Preferred Network Found Indication
3737typedef struct
3738{
3739 tANI_U16 mesgType;
3740 tANI_U16 mesgLen;
3741 /* Network that was found with the highest RSSI*/
3742 tSirMacSSid ssId;
3743 /* Indicates the RSSI */
3744 tANI_U8 rssi;
3745 /* Length of the beacon or probe response
3746 * corresponding to the candidate found by PNO */
3747 tANI_U32 frameLength;
3748 /* Index to memory location where the contents of
3749 * beacon or probe response frame will be copied */
3750 tANI_U8 data[1];
3751} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3752#endif //FEATURE_WLAN_SCAN_PNO
3753
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003754#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3755typedef struct
3756{
3757 tSirMacSSid ssId;
3758 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3759 tANI_U32 authentication;
3760 tANI_U8 encryption;
3761 tANI_U8 mcencryption;
3762 tANI_U8 ChannelCount;
3763 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3764
3765} tSirRoamNetworkType;
3766
3767typedef struct SirMobilityDomainInfo
3768{
3769 tANI_U8 mdiePresent;
3770 tANI_U16 mobilityDomain;
3771} tSirMobilityDomainInfo;
3772
3773typedef struct sSirRoamOffloadScanReq
3774{
3775 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003776 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003777 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003778 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003779 tANI_U8 RoamRssiDiff;
3780 tANI_U8 ChannelCacheType;
3781 tANI_U8 Command;
3782 tANI_U8 StartScanReason;
3783 tANI_U16 NeighborScanTimerPeriod;
3784 tANI_U16 NeighborRoamScanRefreshPeriod;
3785 tANI_U16 NeighborScanChannelMinTime;
3786 tANI_U16 NeighborScanChannelMaxTime;
3787 tANI_U16 EmptyRefreshScanPeriod;
3788 tANI_U8 ValidChannelCount;
3789 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
3790 eAniBoolean IsCCXEnabled;
3791 tANI_U16 us24GProbeTemplateLen;
3792 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3793 tANI_U16 us5GProbeTemplateLen;
3794 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003795 tANI_U8 nProbes;
3796 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003797 tSirRoamNetworkType ConnectedNetwork;
3798 tSirMobilityDomainInfo MDID;
3799} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003800#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003801
3802#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3803
3804//Power Parameters Type
3805typedef enum
3806{
3807 eSIR_IGNORE_DTIM = 1,
3808 eSIR_LISTEN_INTERVAL = 2,
3809 eSIR_MCAST_BCAST_FILTER = 3,
3810 eSIR_ENABLE_BET = 4,
3811 eSIR_BET_INTERVAL = 5
3812}tPowerParamType;
3813
3814//Power Parameters Value s
3815typedef struct
3816{
3817 /* Ignore DTIM */
3818 tANI_U32 uIgnoreDTIM;
3819
3820 /* DTIM Period */
3821 tANI_U32 uDTIMPeriod;
3822
3823 /* Listen Interval */
3824 tANI_U32 uListenInterval;
3825
3826 /* Broadcast Multicas Filter */
3827 tANI_U32 uBcastMcastFilter;
3828
3829 /* Beacon Early Termination */
3830 tANI_U32 uEnableBET;
3831
3832 /* Beacon Early Termination Interval */
3833 tANI_U32 uBETInterval;
3834
Yue Mac24062f2013-05-13 17:01:29 -07003835 /* MAX LI for modulated DTIM */
3836 tANI_U32 uMaxLIModulatedDTIM;
3837
Jeff Johnson295189b2012-06-20 16:38:30 -07003838}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3839
3840typedef struct sSirTxPerTrackingParam
3841{
3842 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3843 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3844 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 */
3845 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3846}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3847
3848#ifdef WLAN_FEATURE_PACKET_FILTERING
3849/*---------------------------------------------------------------------------
3850 Packet Filtering Parameters
3851---------------------------------------------------------------------------*/
3852#define SIR_IPV4_ADDR_LEN 4
3853#define SIR_MAC_ADDR_LEN 6
3854#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3855#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3856#define SIR_MAX_NUM_FILTERS 20
3857#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3858
3859//
3860// Receive Filter Parameters
3861//
3862typedef enum
3863{
3864 SIR_RCV_FILTER_TYPE_INVALID,
3865 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3866 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3867 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3868}eSirReceivePacketFilterType;
3869
3870typedef enum
3871{
3872 SIR_FILTER_HDR_TYPE_INVALID,
3873 SIR_FILTER_HDR_TYPE_MAC,
3874 SIR_FILTER_HDR_TYPE_ARP,
3875 SIR_FILTER_HDR_TYPE_IPV4,
3876 SIR_FILTER_HDR_TYPE_IPV6,
3877 SIR_FILTER_HDR_TYPE_UDP,
3878 SIR_FILTER_HDR_TYPE_MAX
3879}eSirRcvPktFltProtocolType;
3880
3881typedef enum
3882{
3883 SIR_FILTER_CMP_TYPE_INVALID,
3884 SIR_FILTER_CMP_TYPE_EQUAL,
3885 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3886 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3887 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3888 SIR_FILTER_CMP_TYPE_MAX
3889}eSirRcvPktFltCmpFlagType;
3890
3891typedef struct sSirRcvPktFilterFieldParams
3892{
3893 eSirRcvPktFltProtocolType protocolLayer;
3894 eSirRcvPktFltCmpFlagType cmpFlag;
3895 /* Length of the data to compare */
3896 tANI_U16 dataLength;
3897 /* from start of the respective frame header */
3898 tANI_U8 dataOffset;
3899 /* Reserved field */
3900 tANI_U8 reserved;
3901 /* Data to compare */
3902 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3903 /* Mask to be applied on the received packet data before compare */
3904 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3905}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3906
3907typedef struct sSirRcvPktFilterCfg
3908{
3909 tANI_U8 filterId;
3910 eSirReceivePacketFilterType filterType;
3911 tANI_U32 numFieldParams;
3912 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003913 tSirMacAddr selfMacAddr;
3914 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003915 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003916}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3917
3918//
3919// Filter Packet Match Count Parameters
3920//
3921typedef struct sSirRcvFltPktMatchCnt
3922{
3923 tANI_U8 filterId;
3924 tANI_U32 matchCnt;
3925} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3926
3927typedef struct sSirRcvFltPktMatchRsp
3928{
3929 tANI_U16 mesgType;
3930 tANI_U16 mesgLen;
3931
3932 /* Success or Failure */
3933 tANI_U32 status;
3934 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003935 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003936} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3937
3938//
3939// Receive Filter Clear Parameters
3940//
3941typedef struct sSirRcvFltPktClearParam
3942{
3943 tANI_U32 status; /* only valid for response message */
3944 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003945 tSirMacAddr selfMacAddr;
3946 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003947}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3948
3949//
3950// Multicast Address List Parameters
3951//
3952typedef struct sSirRcvFltMcAddrList
3953{
3954 tANI_U32 ulMulticastAddrCnt;
3955 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003956 tSirMacAddr selfMacAddr;
3957 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003958} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3959#endif // WLAN_FEATURE_PACKET_FILTERING
3960
3961//
3962// Generic version information
3963//
3964typedef struct
3965{
3966 tANI_U8 revision;
3967 tANI_U8 version;
3968 tANI_U8 minor;
3969 tANI_U8 major;
3970} tSirVersionType;
3971
3972typedef struct sAniBtAmpLogLinkReq
3973{
3974 // Common for all types are requests
3975 tANI_U16 msgType; // message type is same as the request type
3976 tANI_U16 msgLen; // length of the entire request
3977 tANI_U8 sessionId; //sme Session Id
3978 void *btampHandle; //AMP context
3979
3980} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
3981
3982#ifdef WLAN_FEATURE_GTK_OFFLOAD
3983/*---------------------------------------------------------------------------
3984* WDA_GTK_OFFLOAD_REQ
3985*--------------------------------------------------------------------------*/
3986typedef struct
3987{
3988 tANI_U32 ulFlags; /* optional flags */
3989 tANI_U8 aKCK[16]; /* Key confirmation key */
3990 tANI_U8 aKEK[16]; /* key encryption key */
3991 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003992 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003993} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3994
3995/*---------------------------------------------------------------------------
3996* WDA_GTK_OFFLOAD_GETINFO_REQ
3997*--------------------------------------------------------------------------*/
3998typedef struct
3999{
4000 tANI_U16 mesgType;
4001 tANI_U16 mesgLen;
4002
4003 tANI_U32 ulStatus; /* success or failure */
4004 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4005 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4006 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4007 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004008 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004009} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4010#endif // WLAN_FEATURE_GTK_OFFLOAD
4011
4012#ifdef WLAN_WAKEUP_EVENTS
4013/*---------------------------------------------------------------------------
4014 tSirWakeReasonInd
4015---------------------------------------------------------------------------*/
4016typedef struct
4017{
4018 tANI_U16 mesgType;
4019 tANI_U16 mesgLen;
4020 tANI_U32 ulReason; /* see tWakeReasonType */
4021 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4022 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4023 HAL truncates the data (i.e. data packets) this length
4024 will be less than the actual length */
4025 tANI_U32 ulActualDataLen; /* actual length of data */
4026 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4027 see specific wake type */
4028} tSirWakeReasonInd, *tpSirWakeReasonInd;
4029#endif // WLAN_WAKEUP_EVENTS
4030
4031/*---------------------------------------------------------------------------
4032 sAniSetTmLevelReq
4033---------------------------------------------------------------------------*/
4034typedef struct sAniSetTmLevelReq
4035{
4036 tANI_U16 tmMode;
4037 tANI_U16 newTmLevel;
4038} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4039
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004040#ifdef FEATURE_WLAN_TDLS
4041/* TDLS Request struct SME-->PE */
4042typedef struct sSirTdlsSendMgmtReq
4043{
4044 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4045 tANI_U16 length;
4046 tANI_U8 sessionId; // Session ID
4047 tANI_U16 transactionId; // Transaction ID for cmd
4048 tANI_U8 reqType;
4049 tANI_U8 dialog;
4050 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004051 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004052 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4053 tSirMacAddr peerMac;
4054 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4055} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004056
4057typedef enum TdlsAddOper
4058{
4059 TDLS_OPER_NONE,
4060 TDLS_OPER_ADD,
4061 TDLS_OPER_UPDATE
4062} eTdlsAddOper;
4063
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004064/* TDLS Request struct SME-->PE */
4065typedef struct sSirTdlsAddStaReq
4066{
4067 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4068 tANI_U16 length;
4069 tANI_U8 sessionId; // Session ID
4070 tANI_U16 transactionId; // Transaction ID for cmd
4071 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004072 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004073 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004074 tANI_U16 capability;
4075 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4076 tANI_U8 supported_rates_length;
4077 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004078 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004079 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004080 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004081 tSirVHTCap vhtCap;
4082 tANI_U8 uapsd_queues;
4083 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004084} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004085
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004086/* TDLS Response struct PE-->SME */
4087typedef struct sSirTdlsAddStaRsp
4088{
4089 tANI_U16 messageType;
4090 tANI_U16 length;
4091 tSirResultCodes statusCode;
4092 tSirMacAddr peerMac;
4093 tANI_U8 sessionId; // Session ID
4094 tANI_U16 staId ;
4095 tANI_U16 staType ;
4096 tANI_U8 ucastSig;
4097 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004098 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004099} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304100
4101/* TDLS Request struct SME-->PE */
4102typedef struct
4103{
4104 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4105 tANI_U16 length;
4106 tANI_U8 sessionId; // Session ID
4107 tANI_U16 transactionId; // Transaction ID for cmd
4108 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4109 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4110 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304111 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304112 tANI_U8 isResponder; // Is Peer a responder.
4113 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4114 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304115 tANI_U8 supportedChannelsLen;
4116 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4117 tANI_U8 supportedOperClassesLen;
4118 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304119}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4120
4121/* TDLS Request struct SME-->PE */
4122typedef struct
4123{
4124 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4125 tANI_U16 length;
4126 tANI_U8 sessionId; // Session ID
4127 tANI_U16 transactionId; // Transaction ID for cmd
4128 tSirResultCodes statusCode;
4129 tSirMacAddr peerMac;
4130}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4131
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004132/* TDLS Request struct SME-->PE */
4133typedef struct sSirTdlsDelStaReq
4134{
4135 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4136 tANI_U16 length;
4137 tANI_U8 sessionId; // Session ID
4138 tANI_U16 transactionId; // Transaction ID for cmd
4139 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4140 tSirMacAddr peerMac;
4141} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4142/* TDLS Response struct PE-->SME */
4143typedef struct sSirTdlsDelStaRsp
4144{
4145 tANI_U16 messageType;
4146 tANI_U16 length;
4147 tANI_U8 sessionId; // Session ID
4148 tSirResultCodes statusCode;
4149 tSirMacAddr peerMac;
4150 tANI_U16 staId;
4151} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004152/* TDLS Delete Indication struct PE-->SME */
4153typedef struct sSirTdlsDelStaInd
4154{
4155 tANI_U16 messageType;
4156 tANI_U16 length;
4157 tANI_U8 sessionId; // Session ID
4158 tSirMacAddr peerMac;
4159 tANI_U16 staId;
4160 tANI_U16 reasonCode;
4161} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004162typedef struct sSirTdlsDelAllPeerInd
4163{
4164 tANI_U16 messageType;
4165 tANI_U16 length;
4166 tANI_U8 sessionId; // Session ID
4167} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004168typedef struct sSirMgmtTxCompletionInd
4169{
4170 tANI_U16 messageType;
4171 tANI_U16 length;
4172 tANI_U8 sessionId; // Session ID
4173 tANI_U32 txCompleteStatus;
4174} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004175#endif /* FEATURE_WLAN_TDLS */
4176
4177#ifdef FEATURE_WLAN_TDLS_INTERNAL
4178typedef enum tdlsListType
4179{
4180 TDLS_DIS_LIST,
4181 TDLS_SETUP_LIST
4182}eTdlsListType ;
4183
4184typedef enum tdlsStates
4185{
4186 TDLS_LINK_IDLE_STATE,
4187 TDLS_LINK_DIS_INIT_STATE,
4188 TDLS_LINK_DIS_RSP_WAIT_STATE,
4189 TDLS_DIS_REQ_PROCESS_STATE,
4190 TDLS_DIS_RSP_SENT_WAIT_STATE,
4191 TDLS_DIS_RSP_SENT_DONE_STATE,
4192 TDLS_LINK_DIS_DONE_STATE,
4193 TDLS_LINK_SETUP_START_STATE,
4194 TDLS_LINK_SETUP_WAIT_STATE,
4195 TDLS_LINK_SETUP_RSP_WAIT_STATE,
4196 TDLS_LINK_SETUP_DONE_STATE,
4197 TDLS_LINK_TEARDOWN_START_STATE,
4198 TDLS_LINK_TEARDOWN_DONE_STATE,
4199 TDLS_LINK_SETUP_STATE
4200}eSirTdlsStates ;
4201
4202typedef struct sSirTdlsPeerInfo
4203{
4204 tSirMacAddr peerMac;
4205 tANI_U8 sessionId;
4206 tANI_U8 dialog ;
4207 tSirMacCapabilityInfo capabilityInfo ;
4208 tSirMacRateSet tdlsPeerSuppRates ;
4209 tSirMacRateSet tdlsPeerExtRates ;
4210 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4211 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4212 tSirMacHTParametersInfo tdlsPeerHtParams ;
4213 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4214 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4215
4216 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4217 tSirMacRsnInfo tdlsPeerRsn ;
4218 tANI_U16 tdlsPeerFtIe ;
4219 tANI_U16 tdlsPeerTimeoutIntvl ;
4220 tANI_U16 tdlsPeerSuppChan ;
4221 tANI_U16 tdlsPeerSuppReguClass ;
4222 tANI_S8 tdlsPeerRssi ;
4223 tANI_U16 tdlsPeerState ;
4224 /* flags to indicate optional IE's are in */
4225 tANI_U8 ExtRatesPresent ;
4226 tANI_U8 rsnIePresent ;
4227 tANI_U8 htCapPresent ;
4228 tANI_U8 delStaNeeded ;
4229
4230} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4231
4232/* TDLS Request struct SME-->PE */
4233typedef struct sSirTdlsDiscoveryReq
4234{
4235 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4236 tANI_U16 length;
4237 tANI_U8 sessionId; // Session ID
4238 tANI_U16 transactionId; // Transaction ID for cmd
4239 tANI_U8 reqType;
4240 tANI_U8 dialog;
4241 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4242 tSirMacAddr peerMac;
4243} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4244
4245typedef struct sSirTdlsLinkSetupReq
4246{
4247 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4248 tANI_U16 length;
4249 tANI_U8 sessionId; // Session ID
4250 tANI_U16 transactionId; // Transaction ID for cmd
4251 tANI_U8 dialog;
4252 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4253 tSirMacAddr peerMac;
4254} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4255
4256typedef struct sSirTdlsTeardownReq
4257{
4258 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4259 tANI_U16 length;
4260 tANI_U8 sessionId; // Session ID
4261 tANI_U16 transactionId; // Transaction ID for cmd
4262 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4263 tSirMacAddr peerMac;
4264} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4265
4266
4267/* TDLS response struct PE-->SME */
4268typedef struct sSirTdlsDiscoveryRsp
4269{
4270 tANI_U16 messageType;
4271 tANI_U16 length;
4272 tSirResultCodes statusCode;
4273 tANI_U16 numDisSta ;
4274 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4275} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4276
4277typedef struct sSirTdlsLinkSetupRsp
4278{
4279 tANI_U16 messageType;
4280 tANI_U16 length;
4281 tSirResultCodes statusCode;
4282 tSirMacAddr peerMac;
4283} tSirTdlsLinksetupRsp ;
4284
4285typedef struct sSirTdlsLinkSetupInd
4286{
4287 tANI_U16 messageType;
4288 tANI_U16 length;
4289 tSirResultCodes statusCode;
4290 tSirMacAddr peerMac;
4291} tSirTdlsLinkSetupInd ;
4292
4293
4294typedef struct sSirTdlsTeardownRsp
4295{
4296 tANI_U16 messageType;
4297 tANI_U16 length;
4298 tSirResultCodes statusCode;
4299 tSirMacAddr peerMac;
4300} tSirTdlsTeardownRsp ;
4301
4302typedef struct sSirTdlsPeerInd
4303{
4304 tANI_U16 messageType;
4305 tANI_U16 length;
4306 tSirMacAddr peerMac;
4307 tANI_U8 sessionId; // Session ID
4308 tANI_U16 staId ;
4309 tANI_U16 staType ;
4310 tANI_U8 ucastSig;
4311 tANI_U8 bcastSig;
4312} tSirTdlsPeerInd ;
4313
4314typedef struct sSirTdlsLinkEstablishInd
4315{
4316 tANI_U16 messageType;
4317 tANI_U16 length;
4318 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4319 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4320 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4321 tANI_U8 ptiTemplateLen;
4322 tANI_U8 ptiTemplateBuf[64];
4323 tANI_U8 extCapability[8];
4324/* This will be part of PTI template when sent by PE
4325 tANI_U8 linkIdentifier[20];
4326*/
4327} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4328
4329typedef struct sSirTdlsLinkTeardownInd
4330{
4331 tANI_U16 messageType;
4332 tANI_U16 length;
4333 tANI_U16 staId;
4334} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4335
4336#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4337
Yathish9f22e662012-12-10 14:21:35 -08004338typedef struct sSirActiveModeSetBcnFilterReq
4339{
4340 tANI_U16 messageType;
4341 tANI_U16 length;
4342 tANI_U8 seesionId;
4343} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4344
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304345typedef enum
4346{
4347 HT40_OBSS_SCAN_PARAM_START,
4348 HT40_OBSS_SCAN_PARAM_UPDATE
4349}tHT40OBssScanCmdType;
4350
4351typedef struct sSirSmeHT40StopOBSSScanInd
4352{
4353 tANI_U16 messageType;
4354 tANI_U16 length;
4355 tANI_U8 seesionId;
4356} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4357
4358typedef struct sSirSmeHT40OBSSScanInd
4359{
4360 tANI_U16 messageType;
4361 tANI_U16 length;
4362 tANI_U8 seesionId;
4363} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4364
4365typedef struct sSirHT40OBSSScanInd
4366{
4367 tHT40OBssScanCmdType cmdType;
4368 tSirScanType scanType;
4369 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4370 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4371 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4372 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4373 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4374 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4375 tANI_U16 OBSSScanActivityThreshold;
4376 tANI_U8 selfStaIdx;
4377 tANI_U8 bssIdx;
4378 tANI_U8 fortyMHZIntolerent;
4379 tANI_U8 channelCount;
4380 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4381 tANI_U8 currentOperatingClass;
4382 tANI_U16 ieFieldLen;
4383 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4384} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4385
4386
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304387//Reset AP Caps Changed
4388typedef struct sSirResetAPCapsChange
4389{
4390 tANI_U16 messageType;
4391 tANI_U16 length;
4392 tSirMacAddr bssId;
4393} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004394/// Definition for Candidate found indication from FW
4395typedef struct sSirSmeCandidateFoundInd
4396{
4397 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4398 tANI_U16 length;
4399 tANI_U8 sessionId; // Session Identifier
4400} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004401
Chet Lanctot186b5732013-03-18 10:26:30 -07004402#ifdef WLAN_FEATURE_11W
4403typedef struct sSirWlanExcludeUnencryptParam
4404{
4405 tANI_BOOLEAN excludeUnencrypt;
4406 tSirMacAddr bssId;
4407}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4408#endif
4409
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004410typedef struct sAniHandoffReq
4411{
4412 // Common for all types are requests
4413 tANI_U16 msgType; // message type is same as the request type
4414 tANI_U16 msgLen; // length of the entire request
4415 tANI_U8 sessionId;
4416 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4417 tANI_U8 channel;
4418} tAniHandoffReq, *tpAniHandoffReq;
4419
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304420typedef struct sSirScanOffloadReq {
4421 tANI_U8 sessionId;
4422 tSirMacAddr bssId;
4423 tANI_U8 numSsid;
4424 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4425 tANI_U8 hiddenSsid;
4426 tSirMacAddr selfMacAddr;
4427 tSirBssType bssType;
4428 tANI_U8 dot11mode;
4429 tSirScanType scanType;
4430 tANI_U32 minChannelTime;
4431 tANI_U32 maxChannelTime;
4432 tANI_BOOLEAN p2pSearch;
4433 tANI_U16 uIEFieldLen;
4434 tANI_U16 uIEFieldOffset;
4435 tSirChannelList channelList;
4436 /*-----------------------------
4437 sSirScanOffloadReq....
4438 -----------------------------
4439 uIEFieldLen
4440 -----------------------------
4441 uIEFieldOffset ----+
4442 ----------------------------- |
4443 channelList.numChannels |
4444 ----------------------------- |
4445 ... variable size up to |
4446 channelNumber[numChannels-1] |
4447 This can be zero, if |
4448 numChannel is zero. |
4449 ----------------------------- <--+
4450 ... variable size uIEField
4451 up to uIEFieldLen (can be 0)
4452 -----------------------------*/
4453} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304454
4455typedef enum sSirScanEventType {
4456 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4457 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4458 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4459 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4460 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4461 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4462 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4463 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4464 SCAN_EVENT_MAX=0x8000
4465} tSirScanEventType;
4466
4467typedef struct sSirScanOffloadEvent{
4468 tSirScanEventType event;
4469 tSirResultCodes reasonCode;
4470 tANI_U32 chanFreq;
4471 tANI_U32 requestor;
4472 tANI_U32 scanId;
4473} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4474
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304475typedef struct sSirUpdateChanParam
4476{
4477 tANI_U8 chanId;
4478 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004479 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304480} tSirUpdateChanParam, *tpSirUpdateChanParam;
4481
4482typedef struct sSirUpdateChan
4483{
4484 tANI_U8 numChan;
4485 tSirUpdateChanParam chanParam[1];
4486} tSirUpdateChanList, *tpSirUpdateChanList;
4487
Leo Chang9056f462013-08-01 19:21:11 -07004488#ifdef FEATURE_WLAN_LPHB
4489#define SIR_LPHB_FILTER_LEN 64
4490
4491typedef enum
4492{
4493 LPHB_SET_EN_PARAMS_INDID,
4494 LPHB_SET_TCP_PARAMS_INDID,
4495 LPHB_SET_TCP_PKT_FILTER_INDID,
4496 LPHB_SET_UDP_PARAMS_INDID,
4497 LPHB_SET_UDP_PKT_FILTER_INDID,
4498 LPHB_SET_NETWORK_INFO_INDID,
4499} LPHBIndType;
4500
4501typedef struct sSirLPHBEnableStruct
4502{
4503 v_U8_t enable;
4504 v_U8_t item;
4505 v_U8_t session;
4506} tSirLPHBEnableStruct;
4507
4508typedef struct sSirLPHBTcpParamStruct
4509{
4510 v_U32_t srv_ip;
4511 v_U32_t dev_ip;
4512 v_U16_t src_port;
4513 v_U16_t dst_port;
4514 v_U16_t timeout;
4515 v_U8_t session;
4516 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004517 uint16 timePeriodSec; // in seconds
4518 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004519} tSirLPHBTcpParamStruct;
4520
4521typedef struct sSirLPHBTcpFilterStruct
4522{
4523 v_U16_t length;
4524 v_U8_t offset;
4525 v_U8_t session;
4526 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4527} tSirLPHBTcpFilterStruct;
4528
4529typedef struct sSirLPHBUdpParamStruct
4530{
4531 v_U32_t srv_ip;
4532 v_U32_t dev_ip;
4533 v_U16_t src_port;
4534 v_U16_t dst_port;
4535 v_U16_t interval;
4536 v_U16_t timeout;
4537 v_U8_t session;
4538 tSirMacAddr gateway_mac;
4539} tSirLPHBUdpParamStruct;
4540
4541typedef struct sSirLPHBUdpFilterStruct
4542{
4543 v_U16_t length;
4544 v_U8_t offset;
4545 v_U8_t session;
4546 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4547} tSirLPHBUdpFilterStruct;
4548
4549typedef struct sSirLPHBReq
4550{
4551 v_U16_t cmd;
4552 v_U16_t dummy;
4553 union
4554 {
4555 tSirLPHBEnableStruct lphbEnableReq;
4556 tSirLPHBTcpParamStruct lphbTcpParamReq;
4557 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4558 tSirLPHBUdpParamStruct lphbUdpParamReq;
4559 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4560 } params;
4561} tSirLPHBReq;
4562
Leo Changd9df8aa2013-09-26 13:32:26 -07004563typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004564{
4565 v_U8_t sessionIdx;
4566 v_U8_t protocolType; /*TCP or UDP*/
4567 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004568} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004569#endif /* FEATURE_WLAN_LPHB */
4570
Yue Mab9c86f42013-08-14 15:59:08 -07004571typedef struct sSirAddPeriodicTxPtrn
4572{
4573 /* MAC Address for the adapter */
4574 tSirMacAddr macAddress;
4575
4576 tANI_U8 ucPtrnId; // Pattern ID
4577 tANI_U16 ucPtrnSize; // Pattern size
4578 tANI_U32 usPtrnIntervalMs; // In msec
4579 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4580} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4581
4582typedef struct sSirDelPeriodicTxPtrn
4583{
4584 /* MAC Address for the adapter */
4585 tSirMacAddr macAddress;
4586
4587 /* Bitmap of pattern IDs that need to be deleted */
4588 tANI_U32 ucPatternIdBitmap;
4589} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4590
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004591typedef struct sSirRateUpdateInd
4592{
4593 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4594 * param.
4595 */
4596 tANI_S32 ucastDataRate;
4597
4598 /* TX flag to differentiate between HT20, HT40 etc */
4599 tTxrateinfoflags ucastDataRateTxFlag;
4600
4601 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4602 tSirMacAddr bssid;
4603
4604 /*
4605 * 0 implies MCAST RA, positive value implies fixed rate,
4606 * -1 implies ignore this param
4607 */
4608 tANI_S32 reliableMcastDataRate;//unit Mbpsx10
4609
4610 /* TX flag to differentiate between HT20, HT40 etc */
4611 tTxrateinfoflags reliableMcastDataRateTxFlag;
4612
4613 /*
4614 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4615 * 0 implies ignore
4616 */
4617 tANI_U32 mcastDataRate24GHz;
4618
4619 /* TX flag to differentiate between HT20, HT40 etc */
4620 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4621
4622 /*
4623 * MCAST(or BCAST) fixed data rate in 5 GHz,
4624 * unit Mbpsx10, 0 implies ignore
4625 */
4626 tANI_U32 mcastDataRate5GHz;
4627
4628 /* TX flag to differentiate between HT20, HT40 etc */
4629 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4630
4631} tSirRateUpdateInd, *tpSirRateUpdateInd;
4632
Rajeev79dbe4c2013-10-05 11:03:42 +05304633#ifdef FEATURE_WLAN_BATCH_SCAN
4634// Set batch scan resposne from FW
4635typedef struct
4636{
4637 /*maximum number of scans which FW can cache*/
4638 tANI_U32 nScansToBatch;
4639} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4640
4641// Set batch scan request to FW
4642typedef struct
4643{
4644 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4645 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4646 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4647 tANI_U8 rfBand; /* band to scan :
4648 0 ->both Band, 1->2.4Ghz Only
4649 and 2-> 5GHz Only */
4650 tANI_U32 rtt; /* set if required to do RTT it is not
4651 supported in current version */
4652} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4653
4654
4655// Stop batch scan request to FW
4656typedef struct
4657{
4658 tANI_U32 param;
4659} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4660
4661// Trigger batch scan result indication to FW
4662typedef struct
4663{
4664 tANI_U32 param;
4665} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4666
4667// Batch scan result indication from FW
4668typedef PACKED_PRE struct PACKED_POST
4669{
4670 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08004671 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304672 tANI_U8 ch; /* Channel */
4673 tANI_U8 rssi; /* RSSI or Level */
4674 /*Timestamp when Network was found. Used to calculate age based on timestamp
4675 in GET_RSP msg header */
4676 tANI_U32 timestamp;
4677} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4678
4679typedef PACKED_PRE struct PACKED_POST
4680{
4681 tANI_U32 scanId; /* Scan List ID. */
4682 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4683 tANI_U32 numNetworksInScanList;
4684 /*Variable data ptr: Number of AP in Scan List*/
4685 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4686 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4687 tANI_U8 scanList[1];
4688} tSirBatchScanList, *tpSirBatchScanList;
4689
4690typedef PACKED_PRE struct PACKED_POST
4691{
4692 tANI_U32 timestamp;
4693 tANI_U32 numScanLists;
4694 boolean isLastResult;
4695 /* Variable Data ptr: Number of Scan Lists*/
4696 /* following isLastResult is data of type tSirBatchScanList
4697 * of sizeof(tSirBatchScanList) * numScanLists*/
4698 tANI_U8 scanResults[1];
4699} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4700
4701#endif // FEATURE_WLAN_BATCH_SCAN
4702
Leo Chang0b0e45a2013-12-15 15:18:55 -08004703#ifdef FEATURE_WLAN_CH_AVOID
4704#define SIR_CH_AVOID_MAX_RANGE 4
4705
4706typedef struct sSirChAvoidFreqType
4707{
4708 tANI_U32 startFreq;
4709 tANI_U32 endFreq;
4710} tSirChAvoidFreqType;
4711
4712typedef struct sSirChAvoidIndType
4713{
4714 tANI_U32 avoidRangeCount;
4715 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
4716} tSirChAvoidIndType;
4717#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304718
Jeff Johnson295189b2012-06-20 16:38:30 -07004719#endif /* __SIR_API_H */