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