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