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