blob: b20e97db8bfeaf87e4fc40a9b03eb897152e0695 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
Jeff Johnson295189b2012-06-20 16:38:30 -070021
22/*
Kiet Lam842dad02014-02-18 18:44:02 -080023 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
26 *
27 */
28
29
30/*
Jeff Johnson295189b2012-06-20 16:38:30 -070031 * This file sirApi.h contains definitions exported by
32 * Sirius software.
33 * Author: Chandra Modumudi
34 * Date: 04/16/2002
35 * History:-
36 * Date Modified by Modification Information
37 * --------------------------------------------------------------------
38 */
39
40#ifndef __SIR_API_H
41#define __SIR_API_H
42
43#include "sirTypes.h"
44#include "sirMacProtDef.h"
45#include "aniSystemDefs.h"
Jeff Johnsone7245742012-09-05 17:12:55 -070046#include "sirParams.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070047
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080048#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
49#include "eseGlobal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070050#endif
51
52/// Maximum number of STAs allowed in the BSS
53#define SIR_MAX_NUM_STA 256
54
55/// Maximum number of Neighbors reported by STA for LB feature
56#define SIR_MAX_NUM_NEIGHBOR_BSS 3
57
58/// Maximum number of Neighbors reported by STA for LB feature
59#define SIR_MAX_NUM_ALTERNATE_RADIOS 5
60
61/// Maximum size of SCAN_RSP message
62#define SIR_MAX_SCAN_RSP_MSG_LENGTH 2600
63
64/// Start of Sirius software/Host driver message types
65#define SIR_HAL_HOST_MSG_START 0x1000
66
67/// Power save level definitions
68#define SIR_MAX_POWER_SAVE 3
69#define SIR_INTERMEDIATE_POWER_SAVE 4
70#define SIR_NO_POWER_SAVE 5
71
72/// Max supported channel list
73#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
74
75/// Maximum DTIM Factor
76#define SIR_MAX_DTIM_FACTOR 32
77
78#define SIR_MDIE_SIZE 3
79
Gopichand Nakkalad492d202013-05-10 02:50:47 +053080/* Max number of channels are 165, but to access 165th element of array,
81 *array of 166 is required.
82 */
83#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -080084#define SIR_BCN_REPORT_MAX_BSS_DESC 4
Gopichand Nakkalad492d202013-05-10 02:50:47 +053085
Jeff Johnson295189b2012-06-20 16:38:30 -070086
Rajeev79dbe4c2013-10-05 11:03:42 +053087#ifdef FEATURE_WLAN_BATCH_SCAN
88#define SIR_MAX_SSID_SIZE (32)
89#endif
90
Jeff Johnson295189b2012-06-20 16:38:30 -070091
92#define SIR_NUM_11B_RATES 4 //1,2,5.5,11
93#define SIR_NUM_11A_RATES 8 //6,9,12,18,24,36,48,54
94#define SIR_NUM_POLARIS_RATES 3 //72,96,108
95#define SIR_NUM_TITAN_RATES 26
96#define SIR_NUM_TAURUS_RATES 4 //136.5, 151.7,283.5,315
97#define SIR_NUM_PROP_RATES (SIR_NUM_TITAN_RATES + SIR_NUM_TAURUS_RATES)
98
99#define SIR_11N_PROP_RATE_136_5 (1<<28)
100#define SIR_11N_PROP_RATE_151_7 (1<<29)
101#define SIR_11N_PROP_RATE_283_5 (1<<30)
102#define SIR_11N_PROP_RATE_315 (1<<31)
103#define SIR_11N_PROP_RATE_BITMAP 0x80000000 //only 315MBPS rate is supported today
104//Taurus is going to support 26 Titan Rates(no ESF/concat Rates will be supported)
105//First 26 bits are reserved for Titan and last 4 bits for Taurus, 2(27 and 28) bits are reserved.
106//#define SIR_TITAN_PROP_RATE_BITMAP 0x03FFFFFF
107//Disable all Titan rates
108#define SIR_TITAN_PROP_RATE_BITMAP 0
109#define SIR_CONVERT_2_U32_BITMAP(nRates) ((nRates + 31)/32)
110
111/* #tANI_U32's needed for a bitmap representation for all prop rates */
112#define SIR_NUM_U32_MAP_RATES SIR_CONVERT_2_U32_BITMAP(SIR_NUM_PROP_RATES)
113
114
115#define SIR_PM_SLEEP_MODE 0
116#define SIR_PM_ACTIVE_MODE 1
117
118// Used by various modules to load ALL CFG's
119#define ANI_IGNORE_CFG_ID 0xFFFF
120
121//hidden SSID options
122#define SIR_SCAN_NO_HIDDEN_SSID 0
123#define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1
124#define SIR_SCAN_HIDDEN_SSID 2
125
126#define SIR_MAC_ADDR_LEN 6
127#define SIR_IPV4_ADDR_LEN 4
128
129typedef tANI_U8 tSirIpv4Addr[SIR_IPV4_ADDR_LEN];
130
131#define SIR_VERSION_STRING_LEN 64
132typedef tANI_U8 tSirVersionString[SIR_VERSION_STRING_LEN];
133
Yue Mab9c86f42013-08-14 15:59:08 -0700134/* Periodic Tx pattern offload feature */
135#define PERIODIC_TX_PTRN_MAX_SIZE 1536
136#define MAXNUM_PERIODIC_TX_PTRNS 6
137
Jeff Johnson295189b2012-06-20 16:38:30 -0700138enum eSirHostMsgTypes
139{
140 SIR_HAL_APP_SETUP_NTF = SIR_HAL_HOST_MSG_START,
141 SIR_HAL_INITIAL_CAL_FAILED_NTF,
142 SIR_HAL_NIC_OPER_NTF,
143 SIR_HAL_INIT_START_REQ,
144 SIR_HAL_SHUTDOWN_REQ,
145 SIR_HAL_SHUTDOWN_CNF,
146 SIR_HAL_RESET_REQ,
147 SIR_HAL_RADIO_ON_OFF_IND,
148 SIR_HAL_RESET_CNF,
149 SIR_WRITE_TO_TD,
150 SIR_HAL_HDD_ADDBA_REQ, // MAC -> HDD
151 SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
152 SIR_HAL_DELETEBA_IND, // MAC -> HDD
153 SIR_HAL_BA_FAIL_IND, // HDD -> MAC
154 SIR_TL_HAL_FLUSH_AC_REQ,
155 SIR_HAL_TL_FLUSH_AC_RSP
156};
157
158
159
160/**
161 * Module ID definitions.
162 */
163enum {
164 SIR_BOOT_MODULE_ID = 1,
165 SIR_HAL_MODULE_ID = 0x10,
Leela Venkata Kiran Kumar Reddy Chirala45f184c2014-02-14 15:08:21 -0800166 SIR_CFG_MODULE_ID = 0x12,
Jeff Johnson295189b2012-06-20 16:38:30 -0700167 SIR_LIM_MODULE_ID,
168 SIR_ARQ_MODULE_ID,
169 SIR_SCH_MODULE_ID,
170 SIR_PMM_MODULE_ID,
171 SIR_MNT_MODULE_ID,
172 SIR_DBG_MODULE_ID,
173 SIR_DPH_MODULE_ID,
174 SIR_SYS_MODULE_ID,
175 SIR_SMS_MODULE_ID,
176
177 SIR_PHY_MODULE_ID = 0x20,
178
179
180 // Add any modules above this line
181 SIR_DVT_MODULE_ID
182};
183
184#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
185
186/**
187 * First and last module definition for logging utility
188 *
189 * NOTE: The following definitions need to be updated if
190 * the above list is changed.
191 */
192#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
193#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
194
195
196// Type declarations used by Firmware and Host software
197
198// Scan type enum used in scan request
199typedef enum eSirScanType
200{
201 eSIR_PASSIVE_SCAN,
202 eSIR_ACTIVE_SCAN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800203 eSIR_BEACON_TABLE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700204} tSirScanType;
205
Jeff Johnson295189b2012-06-20 16:38:30 -0700206typedef enum eSirResultCodes
207{
208 eSIR_SME_SUCCESS,
209
210 eSIR_EOF_SOF_EXCEPTION,
211 eSIR_BMU_EXCEPTION,
212 eSIR_LOW_PDU_EXCEPTION,
213 eSIR_USER_TRIG_RESET,
214 eSIR_LOGP_EXCEPTION,
215 eSIR_CP_EXCEPTION,
216 eSIR_STOP_BSS,
217 eSIR_AHB_HANG_EXCEPTION,
218 eSIR_DPU_EXCEPTION,
219 eSIR_RPE_EXCEPTION,
220 eSIR_TPE_EXCEPTION,
221 eSIR_DXE_EXCEPTION,
222 eSIR_RXP_EXCEPTION,
223 eSIR_MCPU_EXCEPTION,
224 eSIR_MCU_EXCEPTION,
225 eSIR_MTU_EXCEPTION,
226 eSIR_MIF_EXCEPTION,
227 eSIR_FW_EXCEPTION,
228 eSIR_PS_MUTEX_READ_EXCEPTION,
229 eSIR_PHY_HANG_EXCEPTION,
230 eSIR_MAILBOX_SANITY_CHK_FAILED,
231 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
232 eSIR_CFB_FLAG_STUCK_EXCEPTION,
233
234 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
235
236 eSIR_SME_INVALID_PARAMETERS=500,
237 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
238 eSIR_SME_RESOURCES_UNAVAILABLE,
239 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
240 // matching requested scan criteria
241 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
242 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
243 eSIR_SME_REFUSED,
c_hpothua9dc89c2014-03-22 19:22:31 +0530244 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700245 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
246 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
247 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
248 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
249 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
250 eSIR_SME_AUTH_REFUSED,
251 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
252 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
253 eSIR_SME_ASSOC_REFUSED,
254 eSIR_SME_REASSOC_REFUSED,
255 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
256 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
257 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
258 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
259 eSIR_SME_STA_NOT_AUTHENTICATED,
260 eSIR_SME_STA_NOT_ASSOCIATED,
261 eSIR_SME_STA_DISASSOCIATED,
262 eSIR_SME_ALREADY_JOINED_A_BSS,
263 eSIR_ULA_COMPLETED,
264 eSIR_ULA_FAILURE,
265 eSIR_SME_LINK_ESTABLISHED,
266 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
267 eSIR_SME_UNABLE_TO_PERFORM_DFS,
268 eSIR_SME_DFS_FAILED,
269 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
270 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
271 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
272 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
273 // support requested rate in
274 // LINK_TEST_REQ
275 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
276 // not respond before next test packet
277 // is sent
278 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
279 // of link test
280 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
281 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
282 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
283 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
284 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
285 // unable to plumb down keys
286 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
287
288 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
289 // that more SME_SCAN_RSP
290 // messages are following.
291 // SME_SCAN_RSP message with
292 // eSIR_SME_SUCCESS status
293 // code is the last one.
294 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
295 // messages upon receiving
296 // invalid Re/Assoc Rsp frame.
297 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
298 // with MIC_FAILURE reason code and perform the stop bss operation
299 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
300 // timeout interval
301 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
302 eSIR_SME_RECEIVED,
303 // TBA - TSPEC related Result Codes
304
305 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
306 eSIR_SME_INVALID_STA_ROLE,
307 eSIR_SME_INVALID_STATE,
308#ifdef GEN4_SCAN
309 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
310 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
311 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
312 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
313 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
314 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
315#else // GEN4_SCAN
316 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
317 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
318#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700319#ifdef FEATURE_OEM_DATA_SUPPORT
320 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
321#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700322 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
323 eSIR_SME_STA_ASSOCIATED,
324 eSIR_SME_INVALID_PMM_STATE,
325 eSIR_SME_CANNOT_ENTER_IMPS,
326 eSIR_SME_IMPS_REQ_FAILED,
327 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700328 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700329 eSIR_SME_UAPSD_REQ_FAILED,
330 eSIR_SME_WOWL_ENTER_REQ_FAILED,
331 eSIR_SME_WOWL_EXIT_REQ_FAILED,
332#if defined WLAN_FEATURE_VOWIFI_11R
333 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
334 eSIR_SME_FT_REASSOC_FAILURE,
335#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700336 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700337#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
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800344 eSIR_SME_DEAUTH_STATUS,
Jeff Johnson295189b2012-06-20 16:38:30 -0700345 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
346} tSirResultCodes;
347
Jeff Johnson295189b2012-06-20 16:38:30 -0700348/* each station added has a rate mode which specifies the sta attributes */
349typedef enum eStaRateMode {
350 eSTA_TAURUS = 0,
351 eSTA_TITAN,
352 eSTA_POLARIS,
353 eSTA_11b,
354 eSTA_11bg,
355 eSTA_11a,
356 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700357#ifdef WLAN_FEATURE_11AC
358 eSTA_11ac,
359#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700360 eSTA_INVALID_RATE_MODE
361} tStaRateMode, *tpStaRateMode;
362
363//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
364//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
365#define IERATE_BASICRATE_MASK 0x80
366#define IERATE_RATE_MASK 0x7f
367#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
368#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
369
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530370const char * lim_BssTypetoString(const v_U8_t bssType);
371const char * lim_ScanTypetoString(const v_U8_t scanType);
372const char * lim_BackgroundScanModetoString(const v_U8_t mode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700373typedef struct sSirSupportedRates {
374 /*
375 * For Self STA Entry: this represents Self Mode.
376 * For Peer Stations, this represents the mode of the peer.
377 * On Station:
378 * --this mode is updated when PE adds the Self Entry.
379 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
380 * ON AP:
381 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
382 * to indicate the self mode of the AP.
383 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
384 */
385
386 tStaRateMode opRateMode;
387 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
388 tANI_U16 llbRates[SIR_NUM_11B_RATES];
389 tANI_U16 llaRates[SIR_NUM_11A_RATES];
390 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
391
392 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
393 //First 26 bits are reserved for those Titan rates and
394 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
395 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
396
397 /*
398 * 0-76 bits used, remaining reserved
399 * bits 0-15 and 32 should be set.
400 */
401 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
402
403 /*
404 * RX Highest Supported Data Rate defines the highest data
405 * rate that the STA is able to receive, in unites of 1Mbps.
406 * This value is derived from "Supported MCS Set field" inside
407 * the HT capability element.
408 */
409 tANI_U16 rxHighestDataRate;
410
Jeff Johnsone7245742012-09-05 17:12:55 -0700411#ifdef WLAN_FEATURE_11AC
412 /*Indicates the Maximum MCS that can be received for each number
413 of spacial streams */
414 tANI_U16 vhtRxMCSMap;
415 /*Indicate the highest VHT data rate that the STA is able to receive*/
416 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700417 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700418 of spacial streams */
419 tANI_U16 vhtTxMCSMap;
420 /*Indicate the highest VHT data rate that the STA is able to transmit*/
421 tANI_U16 vhtTxHighestDataRate;
422#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700423} tSirSupportedRates, *tpSirSupportedRates;
424
425
426typedef enum eSirRFBand
427{
428 SIR_BAND_UNKNOWN,
429 SIR_BAND_2_4_GHZ,
430 SIR_BAND_5_GHZ,
431} tSirRFBand;
432
433
434/*
435* Specifies which beacons are to be indicated upto the host driver when
436* Station is in power save mode.
437*/
438typedef enum eBeaconForwarding
439{
440 ePM_BEACON_FWD_NTH,
441 ePM_BEACON_FWD_TIM,
442 ePM_BEACON_FWD_DTIM,
443 ePM_BEACON_FWD_NONE
444} tBeaconForwarding;
445
446
Jeff Johnson295189b2012-06-20 16:38:30 -0700447typedef struct sSirRemainOnChnReq
448{
449 tANI_U16 messageType;
450 tANI_U16 length;
451 tANI_U8 sessionId;
452 tSirMacAddr selfMacAddr;
453 tANI_U8 chnNum;
454 tANI_U8 phyMode;
455 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530456 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700457 tANI_U8 probeRspIe[1];
458}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
459
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530460/* Structure for vendor specific IE of debug marker frame
461 to debug remain on channel issues */
462typedef struct publicVendorSpecific
463{
464 tANI_U8 category;
465 tANI_U8 elementid;
466 tANI_U8 length;
467} publicVendorSpecific;
468
Jeff Johnson295189b2012-06-20 16:38:30 -0700469typedef struct sSirRegisterMgmtFrame
470{
471 tANI_U16 messageType;
472 tANI_U16 length;
473 tANI_U8 sessionId;
474 tANI_BOOLEAN registerFrame;
475 tANI_U16 frameType;
476 tANI_U16 matchLen;
477 tANI_U8 matchData[1];
478}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700479
480//
Jeff Johnson295189b2012-06-20 16:38:30 -0700481// Identifies the neighbor BSS' that was(were) detected
482// by an STA and reported to the AP
483//
484typedef struct sAniTitanCBNeighborInfo
485{
486 // A BSS was found on the Primary
487 tANI_U8 cbBssFoundPri;
488
489 // A BSS was found on the adjacent Upper Secondary
490 tANI_U8 cbBssFoundSecUp;
491
492 // A BSS was found on the adjacent Lower Secondary
493 tANI_U8 cbBssFoundSecDown;
494
495} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
496
Jeff Johnson295189b2012-06-20 16:38:30 -0700497/// Generic type for sending a response message
498/// with result code to host software
499typedef struct sSirSmeRsp
500{
501 tANI_U16 messageType; // eWNI_SME_*_RSP
502 tANI_U16 length;
503 tANI_U8 sessionId; // To support BT-AMP
504 tANI_U16 transactionId; // To support BT-AMP
505 tSirResultCodes statusCode;
506} tSirSmeRsp, *tpSirSmeRsp;
507
508/// Definition for kick starting Firmware on STA
509typedef struct sSirSmeStartReq
510{
511 tANI_U16 messageType; // eWNI_SME_START_REQ
512 tANI_U16 length;
513 tANI_U8 sessionId; //Added for BT-AMP Support
514 tANI_U16 transcationId; //Added for BT-AMP Support
515 tSirMacAddr bssId; //Added For BT-AMP Support
516 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700517 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700518} tSirSmeStartReq, *tpSirSmeStartReq;
519
520/// Definition for indicating all modules ready on STA
521typedef struct sSirSmeReadyReq
522{
523 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
524 tANI_U16 length;
525 tANI_U16 transactionId;
526} tSirSmeReadyReq, *tpSirSmeReadyReq;
527
528/// Definition for response message to previously issued start request
529typedef struct sSirSmeStartRsp
530{
531 tANI_U16 messageType; // eWNI_SME_START_RSP
532 tANI_U16 length;
533 tSirResultCodes statusCode;
534 tANI_U16 transactionId;
535} tSirSmeStartRsp, *tpSirSmeStartRsp;
536
Jeff Johnson295189b2012-06-20 16:38:30 -0700537
538/// Definition for Load structure
539typedef struct sSirLoad
540{
541 tANI_U16 numStas;
542 tANI_U16 channelUtilization;
543} tSirLoad, *tpSirLoad;
544
545/// BSS type enum used in while scanning/joining etc
546typedef enum eSirBssType
547{
548 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700549 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700550 eSIR_IBSS_MODE,
551 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
552 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
553 eSIR_AUTO_MODE,
554 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
555} tSirBssType;
556
557/// Definition for WDS Information
558typedef struct sSirWdsInfo
559{
560 tANI_U16 wdsLength;
561 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
562} tSirWdsInfo, *tpSirWdsInfo;
563
564/// Power Capability info used in 11H
565typedef struct sSirMacPowerCapInfo
566{
567 tANI_U8 minTxPower;
568 tANI_U8 maxTxPower;
569} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
570
571/// Supported Channel info used in 11H
572typedef struct sSirSupChnl
573{
574 tANI_U8 numChnl;
575 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
576} tSirSupChnl, *tpSirSupChnl;
577
578typedef enum eSirNwType
579{
580 eSIR_11A_NW_TYPE,
581 eSIR_11B_NW_TYPE,
582 eSIR_11G_NW_TYPE,
583 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700584#ifdef WLAN_FEATURE_11AC
585 eSIR_11AC_NW_TYPE,
586#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700587 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
588} tSirNwType;
589
590/// Definition for new iBss peer info
591typedef struct sSirNewIbssPeerInfo
592{
593 tSirMacAddr peerAddr;
594 tANI_U16 aid;
595} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
596
597/// Definition for Alternate BSS info
598typedef struct sSirAlternateRadioInfo
599{
600 tSirMacAddr bssId;
601 tANI_U8 channelId;
602} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
603
604/// Definition for Alternate BSS list
605typedef struct sSirAlternateRadioList
606{
607 tANI_U8 numBss;
608 tSirAlternateRadioInfo alternateRadio[1];
609} tSirAlternateRadioList, *tpSirAlternateRadioList;
610
611/// Definition for kick starting BSS
612/// ---> MAC
613/**
614 * Usage of ssId, numSSID & ssIdList:
615 * ---------------------------------
616 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
617 * feature is enabled.
618 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
619 * and interpret the SSID list from numSSID & ssIdList.
620 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
621 * specified in the ssId field and it is expected that
622 * application will set numSSID to one (only one SSID present
623 * in the list) and SSID in the list is same as ssId field.
624 * 4. Application will always set numSSID >= 1.
625 */
626//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
627typedef struct sSirSmeStartBssReq
628{
629 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
630 tANI_U16 length;
631 tANI_U8 sessionId; //Added for BT-AMP Support
632 tANI_U16 transactionId; //Added for BT-AMP Support
633 tSirMacAddr bssId; //Added for BT-AMP Support
634 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
635 tANI_U16 beaconInterval; //Added for BT-AMP Support
636 tANI_U8 dot11mode;
637 tSirBssType bssType;
638 tSirMacSSid ssId;
639 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700640 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700641
Jeff Johnson295189b2012-06-20 16:38:30 -0700642 tANI_U8 privacy;
643 tANI_U8 apUapsdEnable;
644 tANI_U8 ssidHidden;
645 tANI_BOOLEAN fwdWPSPBCProbeReq;
646 tANI_BOOLEAN protEnabled;
647 tANI_BOOLEAN obssProtEnabled;
648 tANI_U16 ht_capab;
649 tAniAuthType authType;
650 tANI_U32 dtimPeriod;
651 tANI_U8 wps_state;
krunal sonie9002db2013-11-25 14:24:17 -0800652 tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob
Jeff Johnson295189b2012-06-20 16:38:30 -0700653 tVOS_CON_MODE bssPersona;
654
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800655 tANI_U8 txLdpcIniFeatureEnabled;
656
Jeff Johnson295189b2012-06-20 16:38:30 -0700657 tSirRSNie rsnIE; // RSN IE to be sent in
658 // Beacon and Probe
659 // Response frames
660 tSirNwType nwType; // Indicates 11a/b/g
661 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
662 tSirMacRateSet extendedRateSet; // Has 11g rates
663
Chet Lanctot8cecea22014-02-11 19:09:36 -0800664#ifdef WLAN_FEATURE_11W
665 tANI_BOOLEAN pmfCapable;
666 tANI_BOOLEAN pmfRequired;
667#endif
668
Jeff Johnson295189b2012-06-20 16:38:30 -0700669} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
670
671#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
krunal soni2a6a9062014-02-11 14:14:23 -0800672 ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700673
674#define WSCIE_PROBE_RSP_LEN (317 + 2)
675
676typedef struct sSirBssDescription
677{
678 //offset of the ieFields from bssId.
679 tANI_U16 length;
680 tSirMacAddr bssId;
681 v_TIME_t scanSysTimeMsec;
682 tANI_U32 timeStamp[2];
683 tANI_U16 beaconInterval;
684 tANI_U16 capabilityInfo;
685 tSirNwType nwType; // Indicates 11a/b/g
686 tANI_U8 aniIndicator;
687 tANI_S8 rssi;
688 tANI_S8 sinr;
689 //channelId what peer sent in beacon/probersp.
690 tANI_U8 channelId;
691 //channelId on which we are parked at.
692 //used only in scan case.
693 tANI_U8 channelIdSelf;
694 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700695 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
696#if defined WLAN_FEATURE_VOWIFI
697 tANI_U32 parentTSF;
698 tANI_U32 startTSF[2];
699#endif
700#ifdef WLAN_FEATURE_VOWIFI_11R
701 tANI_U8 mdiePresent;
702 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
703#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800704#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700705 tANI_U16 QBSSLoad_present;
706 tANI_U16 QBSSLoad_avail;
707#endif
708 // Please keep the structure 4 bytes aligned above the ieFields
709
710 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700711 tANI_U8 reservedPadding1;
712 tANI_U8 reservedPadding2;
713 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700714 tANI_U32 WscIeLen;
715 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700716 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800717
Jeff Johnson295189b2012-06-20 16:38:30 -0700718 tANI_U32 ieFields[1];
719} tSirBssDescription, *tpSirBssDescription;
720
721/// Definition for response message to previously
722/// issued start BSS request
723/// MAC --->
724typedef struct sSirSmeStartBssRsp
725{
726 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
727 tANI_U16 length;
728 tANI_U8 sessionId;
729 tANI_U16 transactionId;//transaction ID for cmd
730 tSirResultCodes statusCode;
731 tSirBssType bssType;//Add new type for WDS mode
732 tANI_U16 beaconInterval;//Beacon Interval for both type
733 tANI_U32 staId;//Staion ID for Self
734 tSirBssDescription bssDescription;//Peer BSS description
735} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
736
Jeff Johnson295189b2012-06-20 16:38:30 -0700737
738typedef struct sSirChannelList
739{
740 tANI_U8 numChannels;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800741 tANI_U8 channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700742} tSirChannelList, *tpSirChannelList;
743
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530744typedef struct sSirDFSChannelList
745{
746 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
747
748} tSirDFSChannelList, *tpSirDFSChannelList;
749
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800750#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700751typedef struct sTspecInfo {
752 tANI_U8 valid;
753 tSirMacTspecIE tspec;
754} tTspecInfo;
755
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800756#define SIR_ESE_MAX_TSPEC_IES 4
757typedef struct sESETspecTspecInfo {
Jeff Johnson295189b2012-06-20 16:38:30 -0700758 tANI_U8 numTspecs;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800759 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
760} tESETspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700761#endif
762
Jeff Johnson295189b2012-06-20 16:38:30 -0700763
764/// Definition for Radar Info
765typedef struct sSirRadarInfo
766{
767 tANI_U8 channelNumber;
768 tANI_U16 radarPulseWidth; // in usecond
769 tANI_U16 numRadarPulse;
770} tSirRadarInfo, *tpSirRadarInfo;
771
772#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
773
774/// Two Background Scan mode
775typedef enum eSirBackgroundScanMode
776{
777 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700778 eSIR_NORMAL_BACKGROUND_SCAN = 1,
779 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700780} tSirBackgroundScanMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700781typedef enum eSirLinkTrafficCheck
782{
783 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700784 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
785 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700786} tSirLinkTrafficCheck;
787
788#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
789#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
790#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
791#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700792#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
793#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700794
795/// Definition for scan request
796typedef struct sSirSmeScanReq
797{
798 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
799 tANI_U16 length;
800 tANI_U8 sessionId; // Session ID
801 tANI_U16 transactionId; // Transaction ID for cmd
802 tSirMacAddr bssId;
803 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
804 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
805 tSirBssType bssType;
806 tANI_U8 dot11mode;
807 tSirScanType scanType;
808 /**
809 * minChannelTime. Not used if scanType is passive.
810 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
811 * 11k measurements set this to zero to user only single duration for scan.
812 * <valid timeout> - Timeout value used for min channel timeout.
813 */
814 tANI_U32 minChannelTime;
815 /**
816 * maxChannelTime.
817 * 0x0 - Invalid. In case of active scan.
818 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
819 *
820 */
821 tANI_U32 maxChannelTime;
822 /**
823 * returnAfterFirstMatch can take following values:
824 * 0x00 - Return SCAN_RSP message after complete channel scan
825 * 0x01 - Return SCAN_RSP message after collecting BSS description
826 * that matches scan criteria.
827 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
828 * 5 GHz band channels
829 * 0x80 - Return after collecting first 11d IE from 5 GHz band
830 * channels
831 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
832 * band channels
833 *
834 * Values of 0xC0, 0x80 & 0x40 are to be used by
835 * Roaming/application when 11d is enabled.
836 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800837 tANI_U32 minChannelTimeBtc; //in units of milliseconds
838 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700839 tANI_U8 returnAfterFirstMatch;
840
841 /**
842 * returnUniqueResults can take following values:
843 * 0 - Collect & report all received BSS descriptions from same BSS.
844 * 1 - Collect & report unique BSS description from same BSS.
845 */
846 tANI_U8 returnUniqueResults;
847
848 /**
849 * returnFreshResults can take following values:
850 * 0x00 - Return background scan results.
851 * 0x80 - Return & purge background scan results
852 * 0x01 - Trigger fresh scan instead of returning background scan
853 * results.
854 * 0x81 - Trigger fresh scan instead of returning background scan
855 * results and purge background scan results.
856 */
857 tANI_U8 returnFreshResults;
858
859 /* backgroundScanMode can take following values:
860 * 0x0 - agressive scan
861 * 0x1 - normal scan where HAL will check for link traffic
862 * prior to proceeding with the scan
863 */
864 tSirBackgroundScanMode backgroundScanMode;
865
866 tANI_U8 hiddenSsid;
867
868 /* Number of SSIDs to scan */
869 tANI_U8 numSsid;
870
871 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
872 /* This MUST be the last field of the structure */
873
874
Jeff Johnson295189b2012-06-20 16:38:30 -0700875 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700876 tANI_U16 uIEFieldLen;
877 tANI_U16 uIEFieldOffset;
878
879 //channelList MUST be the last field of this structure
880 tSirChannelList channelList;
881 /*-----------------------------
882 tSirSmeScanReq....
883 -----------------------------
884 uIEFiledLen
885 -----------------------------
886 uIEFiledOffset ----+
887 ----------------------------- |
888 channelList.numChannels |
889 ----------------------------- |
890 ... variable size up to |
891 channelNumber[numChannels-1] |
892 This can be zero, if |
893 numChannel is zero. |
894 ----------------------------- <--+
895 ... variable size uIEFiled
896 up to uIEFieldLen (can be 0)
897 -----------------------------*/
898} tSirSmeScanReq, *tpSirSmeScanReq;
899
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530900typedef struct sSirSmeScanAbortReq
901{
902 tANI_U16 type;
903 tANI_U16 msgLen;
904 tANI_U8 sessionId;
905} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
906
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530907typedef struct sSirSmeScanChanReq
908{
909 tANI_U16 type;
910 tANI_U16 msgLen;
911 tANI_U8 sessionId;
912 tANI_U16 transcationId;
913} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
914
Jeff Johnsone7245742012-09-05 17:12:55 -0700915#ifdef FEATURE_OEM_DATA_SUPPORT
916
917#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800918#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700919#endif
920#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800921#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700922#endif
923
924typedef struct sSirOemDataReq
925{
926 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
927 tSirMacAddr selfMacAddr;
928 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
929} tSirOemDataReq, *tpSirOemDataReq;
930
931typedef struct sSirOemDataRsp
932{
933 tANI_U16 messageType;
934 tANI_U16 length;
935 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
936} tSirOemDataRsp, *tpSirOemDataRsp;
937
938#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700939
940/// Definition for response message to previously issued scan request
941typedef struct sSirSmeScanRsp
942{
943 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
944 tANI_U16 length;
945 tANI_U8 sessionId;
946 tSirResultCodes statusCode;
947 tANI_U16 transcationId;
948 tSirBssDescription bssDescription[1];
949} tSirSmeScanRsp, *tpSirSmeScanRsp;
950
951/// Sme Req message to set the Background Scan mode
952typedef struct sSirSmeBackgroundScanModeReq
953{
954 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
955 tANI_U16 length;
956 tSirBackgroundScanMode mode;
957} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
958
959/// Background Scan Statisics
960typedef struct sSirBackgroundScanInfo {
961 tANI_U32 numOfScanSuccess;
962 tANI_U32 numOfScanFailure;
963 tANI_U32 reserved;
964} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
965
966#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
967
968/// Definition for Authentication request
969typedef struct sSirSmeAuthReq
970{
971 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
972 tANI_U16 length;
973 tANI_U8 sessionId; // Session ID
974 tANI_U16 transactionId; // Transaction ID for cmd
975 tSirMacAddr bssId; // Self BSSID
976 tSirMacAddr peerMacAddr;
977 tAniAuthType authType;
978 tANI_U8 channelNumber;
979} tSirSmeAuthReq, *tpSirSmeAuthReq;
980
981/// Definition for reponse message to previously issued Auth request
982typedef struct sSirSmeAuthRsp
983{
984 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
985 tANI_U16 length;
986 tANI_U8 sessionId; // Session ID
987 tANI_U16 transactionId; // Transaction ID for cmd
988 tSirMacAddr peerMacAddr;
989 tAniAuthType authType;
990 tSirResultCodes statusCode;
991 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
992 //Otherwise it holds status code.
993} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
994
Jeff Johnson295189b2012-06-20 16:38:30 -0700995
Jeff Johnson295189b2012-06-20 16:38:30 -0700996
Jeff Johnson295189b2012-06-20 16:38:30 -0700997/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
998typedef struct sJoinReassocInfo
999{
1000 tAniTitanCBNeighborInfo cbNeighbors;
1001 tAniBool spectrumMgtIndicator;
1002 tSirMacPowerCapInfo powerCap;
1003 tSirSupChnl supportedChannels;
1004} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001005
1006/// Definition for join request
1007/// ---> MAC
1008/// WARNING! If you add a field in JOIN REQ.
1009/// Make sure to add it in REASSOC REQ
1010/// The Serdes function is the same and its
1011/// shared with REASSOC. So if we add a field
1012// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1013typedef struct sSirSmeJoinReq
1014{
1015 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1016 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001017 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001018 tANI_U16 transactionId;
1019 tSirMacSSid ssId;
1020 tSirMacAddr selfMacAddr; // self Mac address
1021 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1022 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001023 tVOS_CON_MODE staPersona; //Persona
1024 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001025
1026 /*This contains the UAPSD Flag for all 4 AC
1027 * B0: AC_VO UAPSD FLAG
1028 * B1: AC_VI UAPSD FLAG
1029 * B2: AC_BK UAPSD FLAG
1030 * B3: AC_BE UASPD FLAG
1031 */
1032 tANI_U8 uapsdPerAcBitmask;
1033
Jeff Johnson295189b2012-06-20 16:38:30 -07001034 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1035 tSirMacRateSet extendedRateSet; // Has 11g rates
1036 tSirRSNie rsnIE; // RSN IE to be sent in
1037 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001038#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001039 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1040 // the same. The join will never carry cckm, but will be set to
1041 // 0.
1042#endif
1043
1044 tSirAddie addIEScan; // Additional IE to be sent in
1045 // (unicast) Probe Request at the time of join
1046
1047 tSirAddie addIEAssoc; // Additional IE to be sent in
1048 // (Re) Association Request
1049
1050 tAniEdType UCEncryptionType;
1051
1052 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001053
1054#ifdef WLAN_FEATURE_11W
1055 tAniEdType MgmtEncryptionType;
1056#endif
1057
Jeff Johnson295189b2012-06-20 16:38:30 -07001058#ifdef WLAN_FEATURE_VOWIFI_11R
1059 tAniBool is11Rconnection;
1060#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001061#ifdef FEATURE_WLAN_ESE
1062 tAniBool isESEFeatureIniEnabled;
1063 tAniBool isESEconnection;
1064 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001065#endif
1066
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001067#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001068 tAniBool isFastTransitionEnabled;
1069#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001070#ifdef FEATURE_WLAN_LFR
1071 tAniBool isFastRoamIniFeatureEnabled;
1072#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001073
1074 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001075#ifdef WLAN_FEATURE_11AC
1076 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001077 tANI_U8 txBFCsnValue;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001078#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001079 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301080 tAniBool isWMEenabled;
1081 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001082 tAniTitanCBNeighborInfo cbNeighbors;
1083 tAniBool spectrumMgtIndicator;
1084 tSirMacPowerCapInfo powerCap;
1085 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001086 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001087
1088} tSirSmeJoinReq, *tpSirSmeJoinReq;
1089
1090/// Definition for reponse message to previously issued join request
1091/// MAC --->
1092typedef struct sSirSmeJoinRsp
1093{
1094 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1095 tANI_U16 length;
1096 tANI_U8 sessionId; // Session ID
1097 tANI_U16 transactionId; // Transaction ID for cmd
1098 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001099 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001100 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1101 //Otherwise it holds status code.
1102 tANI_U16 aid;
1103 tANI_U32 beaconLength;
1104 tANI_U32 assocReqLength;
1105 tANI_U32 assocRspLength;
1106#ifdef WLAN_FEATURE_VOWIFI_11R
1107 tANI_U32 parsedRicRspLen;
1108#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001109#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001110 tANI_U32 tspecIeLen;
1111#endif
1112 tANI_U32 staId;//Station ID for peer
1113
1114 /*The DPU signatures will be sent eventually to TL to help it determine the
1115 association to which a packet belongs to*/
1116 /*Unicast DPU signature*/
1117 tANI_U8 ucastSig;
1118
1119 /*Broadcast DPU signature*/
1120 tANI_U8 bcastSig;
1121
c_hpothu44ff4e02014-05-08 00:13:57 +05301122 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1123 tANI_U32 maxRateFlags;
1124
Jeff Johnson295189b2012-06-20 16:38:30 -07001125 tANI_U8 frames[ 1 ];
1126} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1127
1128/// Definition for Authentication indication from peer
1129typedef struct sSirSmeAuthInd
1130{
1131 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1132 tANI_U16 length;
1133 tANI_U8 sessionId;
1134 tSirMacAddr bssId; // Self BSSID
1135 tSirMacAddr peerMacAddr;
1136 tAniAuthType authType;
1137} tSirSmeAuthInd, *tpSirSmeAuthInd;
1138
1139/// probereq from peer, when wsc is enabled
1140typedef struct sSirSmeProbereq
1141{
1142 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1143 tANI_U16 length;
1144 tANI_U8 sessionId;
1145 tSirMacAddr peerMacAddr;
1146 tANI_U16 devicePasswdId;
1147} tSirSmeProbeReq, *tpSirSmeProbeReq;
1148
1149/// Definition for Association indication from peer
1150/// MAC --->
1151typedef struct sSirSmeAssocInd
1152{
1153 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1154 tANI_U16 length;
1155 tANI_U8 sessionId;
1156 tSirMacAddr peerMacAddr;
1157 tANI_U16 aid;
1158 tSirMacAddr bssId; // Self BSSID
1159 tANI_U16 staId; // Station ID for peer
1160 tANI_U8 uniSig; // DPU signature for unicast packets
1161 tANI_U8 bcastSig; // DPU signature for broadcast packets
1162 tAniAuthType authType;
1163 tAniSSID ssId; // SSID used by STA to associate
1164 tSirRSNie rsnIE;// RSN IE received from peer
1165 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1166
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 // powerCap & supportedChannels are present only when
1168 // spectrumMgtIndicator flag is set
1169 tAniBool spectrumMgtIndicator;
1170 tSirMacPowerCapInfo powerCap;
1171 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001172 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1173 tAniBool reassocReq;
1174 // Required for indicating the frames to upper layer
1175 tANI_U32 beaconLength;
1176 tANI_U8* beaconPtr;
1177 tANI_U32 assocReqLength;
1178 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001179} tSirSmeAssocInd, *tpSirSmeAssocInd;
1180
1181
1182/// Definition for Association confirm
1183/// ---> MAC
1184typedef struct sSirSmeAssocCnf
1185{
1186 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1187 tANI_U16 length;
1188 tSirResultCodes statusCode;
1189 tSirMacAddr bssId; // Self BSSID
1190 tSirMacAddr peerMacAddr;
1191 tANI_U16 aid;
1192 tSirMacAddr alternateBssId;
1193 tANI_U8 alternateChannelId;
1194} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1195
Jeff Johnson295189b2012-06-20 16:38:30 -07001196/// Definition for Reassociation indication from peer
1197typedef struct sSirSmeReassocInd
1198{
1199 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1200 tANI_U16 length;
1201 tANI_U8 sessionId; // Session ID
1202 tSirMacAddr peerMacAddr;
1203 tSirMacAddr oldMacAddr;
1204 tANI_U16 aid;
1205 tSirMacAddr bssId; // Self BSSID
1206 tANI_U16 staId; // Station ID for peer
1207 tAniAuthType authType;
1208 tAniSSID ssId; // SSID used by STA to reassociate
1209 tSirRSNie rsnIE; // RSN IE received from peer
1210
1211 tSirAddie addIE; // Additional IE received from peer
1212
Jeff Johnson295189b2012-06-20 16:38:30 -07001213 // powerCap & supportedChannels are present only when
1214 // spectrumMgtIndicator flag is set
1215 tAniBool spectrumMgtIndicator;
1216 tSirMacPowerCapInfo powerCap;
1217 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001218 // Required for indicating the frames to upper layer
1219 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1220 tANI_U32 beaconLength;
1221 tANI_U8* beaconPtr;
1222 tANI_U32 assocReqLength;
1223 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001224} tSirSmeReassocInd, *tpSirSmeReassocInd;
1225
1226/// Definition for Reassociation confirm
1227/// ---> MAC
1228typedef struct sSirSmeReassocCnf
1229{
1230 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1231 tANI_U16 length;
1232 tSirResultCodes statusCode;
1233 tSirMacAddr bssId; // Self BSSID
1234 tSirMacAddr peerMacAddr;
1235 tANI_U16 aid;
1236 tSirMacAddr alternateBssId;
1237 tANI_U8 alternateChannelId;
1238} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1239
Jeff Johnson295189b2012-06-20 16:38:30 -07001240
1241/// Enum definition for Wireless medium status change codes
1242typedef enum eSirSmeStatusChangeCode
1243{
1244 eSIR_SME_DEAUTH_FROM_PEER,
1245 eSIR_SME_DISASSOC_FROM_PEER,
1246 eSIR_SME_LOST_LINK_WITH_PEER,
1247 eSIR_SME_CHANNEL_SWITCH,
1248 eSIR_SME_JOINED_NEW_BSS,
1249 eSIR_SME_LEAVING_BSS,
1250 eSIR_SME_IBSS_ACTIVE,
1251 eSIR_SME_IBSS_INACTIVE,
1252 eSIR_SME_IBSS_PEER_DEPARTED,
1253 eSIR_SME_RADAR_DETECTED,
1254 eSIR_SME_IBSS_NEW_PEER,
1255 eSIR_SME_AP_CAPS_CHANGED,
1256 eSIR_SME_BACKGROUND_SCAN_FAIL,
1257 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1258 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1259} tSirSmeStatusChangeCode;
1260
1261typedef struct sSirSmeNewBssInfo
1262{
1263 tSirMacAddr bssId;
1264 tANI_U8 channelNumber;
1265 tANI_U8 reserved;
1266 tSirMacSSid ssId;
1267} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1268
1269typedef struct sSirSmeApNewCaps
1270{
1271 tANI_U16 capabilityInfo;
1272 tSirMacAddr bssId;
1273 tANI_U8 channelId;
1274 tANI_U8 reserved[3];
1275 tSirMacSSid ssId;
1276} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1277
1278/**
1279 * Table below indicates what information is passed for each of
1280 * the Wireless Media status change notifications:
1281 *
1282 * Status Change code Status change info
1283 * ----------------------------------------------------------------------
1284 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1285 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1286 * eSIR_SME_LOST_LINK_WITH_PEER None
1287 * eSIR_SME_CHANNEL_SWITCH New channel number
1288 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1289 * eSIR_SME_LEAVING_BSS None
1290 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1291 * IBSS apart from this STA that
1292 * started IBSS
1293 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1294 * in IBSS
1295 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1296 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1297 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1298 * that STA is currently associated with
1299 * have changed.
1300 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1301 */
1302
1303/// Definition for Wireless medium status change notification
1304typedef struct sSirSmeWmStatusChangeNtf
1305{
1306 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1307 tANI_U16 length;
1308 tANI_U8 sessionId; // Session ID
1309 tSirSmeStatusChangeCode statusChangeCode;
1310 tSirMacAddr bssId; // Self BSSID
1311 union
1312 {
1313 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1314 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1315 // none for eSIR_SME_LOST_LINK_WITH_PEER
1316 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1317 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1318 // none for eSIR_SME_LEAVING_BSS
1319 // none for eSIR_SME_IBSS_ACTIVE
1320 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001321 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1322 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1323 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1324 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001325 } statusChangeInfo;
1326} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1327
1328/// Definition for Disassociation request
1329typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001330__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001331struct sSirSmeDisassocReq
1332{
1333 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1334 tANI_U16 length;
1335 tANI_U8 sessionId; // Session ID
1336 tANI_U16 transactionId; // Transaction ID for cmd
1337 tSirMacAddr bssId; // Peer BSSID
1338 tSirMacAddr peerMacAddr;
1339 tANI_U16 reasonCode;
1340 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1341 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001342}
Jeff Johnson295189b2012-06-20 16:38:30 -07001343__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001344tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1345
1346/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001347typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1348{
1349 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1350 tANI_U16 length;
1351 tANI_U8 sessionId; // Session ID
1352 tANI_U16 transactionId; // Transaction ID for cmd
1353 tSirMacAddr bssId; // Peer BSSID
1354 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1355} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001356
1357typedef struct sAni64BitCounters
1358{
1359 tANI_U32 Hi;
1360 tANI_U32 Lo;
1361}tAni64BitCounters, *tpAni64BitCounters;
1362
1363typedef struct sAniSecurityStat
1364{
1365 tAni64BitCounters txBlks;
1366 tAni64BitCounters rxBlks;
1367 tAni64BitCounters formatErrorCnt;
1368 tAni64BitCounters decryptErr;
1369 tAni64BitCounters protExclCnt;
1370 tAni64BitCounters unDecryptableCnt;
1371 tAni64BitCounters decryptOkCnt;
1372
1373}tAniSecurityStat, *tpAniSecurityStat;
1374
1375typedef struct sAniTxRxCounters
1376{
1377 tANI_U32 txFrames; // Incremented for every packet tx
1378 tANI_U32 rxFrames;
1379 tANI_U32 nRcvBytes;
1380 tANI_U32 nXmitBytes;
1381}tAniTxRxCounters, *tpAniTxRxCounters;
1382
1383typedef struct sAniTxRxStats
1384{
1385 tAni64BitCounters txFrames;
1386 tAni64BitCounters rxFrames;
1387 tAni64BitCounters nRcvBytes;
1388 tAni64BitCounters nXmitBytes;
1389
1390}tAniTxRxStats,*tpAniTxRxStats;
1391
1392typedef struct sAniSecStats
1393{
1394 tAniSecurityStat aes;
1395 tAni64BitCounters aesReplays;
1396 tAniSecurityStat tkip;
1397 tAni64BitCounters tkipReplays;
1398 tAni64BitCounters tkipMicError;
1399
1400 tAniSecurityStat wep;
1401#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1402 tAniSecurityStat wpi;
1403 tAni64BitCounters wpiReplays;
1404 tAni64BitCounters wpiMicError;
1405#endif
1406}tAniSecStats, *tpAniSecStats;
1407
1408#define SIR_MAX_RX_CHAINS 3
1409
1410typedef struct sAniStaStatStruct
1411{
1412 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1413 * These are kept as it is, since WSM is using this structure.
1414 * These elements can be removed whenever WSM is updated.
1415 * Phystats is used to hold phystats from BD.
1416 */
1417 tANI_U32 sentAesBlksUcastHi;
1418 tANI_U32 sentAesBlksUcastLo;
1419 tANI_U32 recvAesBlksUcastHi;
1420 tANI_U32 recvAesBlksUcastLo;
1421 tANI_U32 aesFormatErrorUcastCnts;
1422 tANI_U32 aesReplaysUcast;
1423 tANI_U32 aesDecryptErrUcast;
1424 tANI_U32 singleRetryPkts;
1425 tANI_U32 failedTxPkts;
1426 tANI_U32 ackTimeouts;
1427 tANI_U32 multiRetryPkts;
1428 tANI_U32 fragTxCntsHi;
1429 tANI_U32 fragTxCntsLo;
1430 tANI_U32 transmittedPktsHi;
1431 tANI_U32 transmittedPktsLo;
1432 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1433 tANI_U32 phyStatLo; //This is only for private use.
1434
1435 tANI_U32 uplinkRssi;
1436 tANI_U32 uplinkSinr;
1437 tANI_U32 uplinkRate;
1438 tANI_U32 downlinkRssi;
1439 tANI_U32 downlinkSinr;
1440 tANI_U32 downlinkRate;
1441 tANI_U32 nRcvBytes;
1442 tANI_U32 nXmitBytes;
1443
1444 // titan 3c stats
1445 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1446 tANI_U32 chunksTxCntLo;
1447 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1448 tANI_U32 compPktRxCntLo;
1449 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1450 tANI_U32 expanPktRxCntLo;
1451
1452
1453 /* Following elements are valid and filled in correctly. They have valid values.
1454 */
1455
1456 //Unicast frames and bytes.
1457 tAniTxRxStats ucStats;
1458
1459 //Broadcast frames and bytes.
1460 tAniTxRxStats bcStats;
1461
1462 //Multicast frames and bytes.
1463 tAniTxRxStats mcStats;
1464
1465 tANI_U32 currentTxRate;
1466 tANI_U32 currentRxRate; //Rate in 100Kbps
1467
1468 tANI_U32 maxTxRate;
1469 tANI_U32 maxRxRate;
1470
1471 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1472
1473
1474 tAniSecStats securityStats;
1475
1476 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1477 tANI_U8 currentTxRateIdx;
1478
1479} tAniStaStatStruct, *tpAniStaStatStruct;
1480
1481//Statistics that are not maintained per stations.
1482typedef struct sAniGlobalStatStruct
1483{
1484 tAni64BitCounters txError;
1485 tAni64BitCounters rxError;
1486 tAni64BitCounters rxDropNoBuffer;
1487 tAni64BitCounters rxDropDup;
1488 tAni64BitCounters rxCRCError;
1489
1490 tAni64BitCounters singleRetryPkts;
1491 tAni64BitCounters failedTxPkts;
1492 tAni64BitCounters ackTimeouts;
1493 tAni64BitCounters multiRetryPkts;
1494 tAni64BitCounters fragTxCnts;
1495 tAni64BitCounters fragRxCnts;
1496
1497 tAni64BitCounters txRTSSuccess;
1498 tAni64BitCounters txCTSSuccess;
1499 tAni64BitCounters rxRTSSuccess;
1500 tAni64BitCounters rxCTSSuccess;
1501
1502 tAniSecStats securityStats;
1503
1504 tAniTxRxStats mcStats;
1505 tAniTxRxStats bcStats;
1506
1507}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1508
1509typedef enum sPacketType
1510{
1511 ePACKET_TYPE_UNKNOWN,
1512 ePACKET_TYPE_11A,
1513 ePACKET_TYPE_11G,
1514 ePACKET_TYPE_11B,
1515 ePACKET_TYPE_11N
1516
1517}tPacketType, *tpPacketType;
1518
1519typedef struct sAniStatSummaryStruct
1520{
1521 tAniTxRxStats uc; //Unicast counters.
1522 tAniTxRxStats bc; //Broadcast counters.
1523 tAniTxRxStats mc; //Multicast counters.
1524 tAni64BitCounters txError;
1525 tAni64BitCounters rxError;
1526 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1527 tANI_U32 rxRate; // Rx rate of the last received packet.
1528 tANI_U32 txRate;
1529 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1530 tANI_U16 txMCSId;
1531 tPacketType rxPacketType;
1532 tPacketType txPacketType;
1533 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1534}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1535
Jeff Johnson295189b2012-06-20 16:38:30 -07001536//structure for stats that may be reset, like the ones in sta descriptor
1537//The stats are saved into here before reset. It should be tANI_U32 aligned.
1538typedef struct _sPermStaStats
1539{
1540 //tANI_U32 sentAesBlksUcastHi;
1541 //tANI_U32 sentAesBlksUcastLo;
1542 //tANI_U32 recvAesBlksUcastHi;
1543 //tANI_U32 recvAesBlksUcastLo;
1544 tANI_U32 aesFormatErrorUcastCnts;
1545 tANI_U32 aesReplaysUcast;
1546 tANI_U32 aesDecryptErrUcast;
1547 tANI_U32 singleRetryPkts;
1548 tANI_U32 failedTxPkts;
1549 tANI_U32 ackTimeouts;
1550 tANI_U32 multiRetryPkts;
1551 tANI_U32 fragTxCntsHi;
1552 tANI_U32 fragTxCntsLo;
1553 tANI_U32 transmittedPktsHi;
1554 tANI_U32 transmittedPktsLo;
1555
1556 // titan 3c stats
1557 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1558 tANI_U32 chunksTxCntLo;
1559 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1560 tANI_U32 compPktRxCntLo;
1561 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1562 tANI_U32 expanPktRxCntLo;
1563}tPermanentStaStats;
1564
Jeff Johnson295189b2012-06-20 16:38:30 -07001565
1566
1567
1568/// Definition for Disassociation response
1569typedef struct sSirSmeDisassocRsp
1570{
1571 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1572 tANI_U16 length;
1573 tANI_U8 sessionId; // Session ID
1574 tANI_U16 transactionId; // Transaction ID for cmd
1575 tSirResultCodes statusCode;
1576 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001577 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001578 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001579}
Jeff Johnson295189b2012-06-20 16:38:30 -07001580__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001581 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1582
1583/// Definition for Disassociation indication from peer
1584typedef struct sSirSmeDisassocInd
1585{
1586 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1587 tANI_U16 length;
1588 tANI_U8 sessionId; // Session Identifier
1589 tANI_U16 transactionId; // Transaction Identifier with PE
1590 tSirResultCodes statusCode;
1591 tSirMacAddr bssId;
1592 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001593 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001594 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001595 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001596} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1597
1598/// Definition for Disassociation confirm
1599/// MAC --->
1600typedef struct sSirSmeDisassocCnf
1601{
1602 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1603 tANI_U16 length;
1604 tSirResultCodes statusCode;
1605 tSirMacAddr bssId;
1606 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001607} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1608
1609/// Definition for Deauthetication request
1610typedef struct sSirSmeDeauthReq
1611{
1612 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1613 tANI_U16 length;
1614 tANI_U8 sessionId; // Session ID
1615 tANI_U16 transactionId; // Transaction ID for cmd
1616 tSirMacAddr bssId; // AP BSSID
1617 tSirMacAddr peerMacAddr;
1618 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001619} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1620
1621/// Definition for Deauthetication response
1622typedef struct sSirSmeDeauthRsp
1623{
1624 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1625 tANI_U16 length;
1626 tANI_U8 sessionId; // Session ID
1627 tANI_U16 transactionId; // Transaction ID for cmd
1628 tSirResultCodes statusCode;
1629 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001630} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1631
1632/// Definition for Deauthetication indication from peer
1633typedef struct sSirSmeDeauthInd
1634{
1635 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1636 tANI_U16 length;
1637 tANI_U8 sessionId; //Added for BT-AMP
1638 tANI_U16 transactionId; //Added for BT-AMP
1639 tSirResultCodes statusCode;
1640 tSirMacAddr bssId;// AP BSSID
1641 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001642
Jeff Johnson295189b2012-06-20 16:38:30 -07001643 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001644 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001645} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1646
1647/// Definition for Deauthentication confirm
1648/// MAC --->
1649typedef struct sSirSmeDeauthCnf
1650{
1651 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1652 tANI_U16 length;
1653 tSirResultCodes statusCode;
1654 tSirMacAddr bssId; // AP BSSID
1655 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001656} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1657
1658/// Definition for stop BSS request message
1659typedef struct sSirSmeStopBssReq
1660{
1661 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1662 tANI_U16 length;
1663 tANI_U8 sessionId; //Session ID
1664 tANI_U16 transactionId; //tranSaction ID for cmd
1665 tSirResultCodes reasonCode;
1666 tSirMacAddr bssId; //Self BSSID
1667} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1668
1669/// Definition for stop BSS response message
1670typedef struct sSirSmeStopBssRsp
1671{
1672 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1673 tANI_U16 length;
1674 tSirResultCodes statusCode;
1675 tANI_U8 sessionId; // Session ID
1676 tANI_U16 transactionId; // Transaction ID for cmd
1677} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1678
Jeff Johnson295189b2012-06-20 16:38:30 -07001679
1680
1681/// Definition for Channel Switch indication for station
1682/// MAC --->
1683typedef struct sSirSmeSwitchChannelInd
1684{
1685 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1686 tANI_U16 length;
1687 tANI_U8 sessionId;
1688 tANI_U16 newChannelId;
1689 tSirMacAddr bssId; // BSSID
1690} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1691
1692/// Definition for ULA complete indication message
1693typedef struct sirUlaCompleteInd
1694{
1695 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1696 tANI_U16 length;
1697 tSirResultCodes statusCode;
1698 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001699} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1700
1701/// Definition for ULA complete confirmation message
1702typedef struct sirUlaCompleteCnf
1703{
1704 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1705 tANI_U16 length;
1706 tSirResultCodes statusCode;
1707 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001708} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1709
1710/// Definition for Neighbor BSS indication
1711/// MAC --->
1712/// MAC reports this each time a new I/BSS is detected
1713typedef struct sSirSmeNeighborBssInd
1714{
1715 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1716 tANI_U16 length;
1717 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001718 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001719} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1720
1721/// Definition for MIC failure indication
1722/// MAC --->
1723/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1724typedef struct sSirSmeMicFailureInd
1725{
1726 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1727 tANI_U16 length;
1728 tANI_U8 sessionId;
1729 tSirMacAddr bssId; // BSSID
1730 tSirMicFailureInfo info;
1731} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1732
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001733typedef struct sSirSmeMissedBeaconInd
1734{
1735 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1736 tANI_U16 length;
1737 tANI_U8 bssIdx;
1738} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001739
1740/// Definition for Set Context request
1741/// ---> MAC
1742typedef struct sSirSmeSetContextReq
1743{
1744 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1745 tANI_U16 length;
1746 tANI_U8 sessionId; //Session ID
1747 tANI_U16 transactionId; //Transaction ID for cmd
1748 tSirMacAddr peerMacAddr;
1749 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001750 // TBD Following QOS fields to be uncommented
1751 //tAniBool qosInfoPresent;
1752 //tSirQos qos;
1753 tSirKeyMaterial keyMaterial;
1754} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1755
1756/// Definition for Set Context response
1757/// MAC --->
1758typedef struct sSirSmeSetContextRsp
1759{
1760 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1761 tANI_U16 length;
1762 tANI_U8 sessionId; // Session ID
1763 tANI_U16 transactionId; // Transaction ID for cmd
1764 tSirResultCodes statusCode;
1765 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001766} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1767
1768/// Definition for Remove Key Context request
1769/// ---> MAC
1770typedef struct sSirSmeRemoveKeyReq
1771{
1772 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1773 tANI_U16 length;
1774 tANI_U8 sessionId; // Session ID
1775 tANI_U16 transactionId; // Transaction ID for cmd
1776 tSirMacAddr bssId; // BSSID
1777 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001778 tANI_U8 edType;
1779 tANI_U8 wepType;
1780 tANI_U8 keyId;
1781 tANI_BOOLEAN unicast;
1782} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1783
1784/// Definition for Remove Key Context response
1785/// MAC --->
1786typedef struct sSirSmeRemoveKeyRsp
1787{
1788 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1789 tANI_U16 length;
1790 tANI_U8 sessionId; // Session ID
1791 tANI_U16 transactionId; // Transaction ID for cmd
1792 tSirResultCodes statusCode;
1793 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001794} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1795
1796/// Definition for Set Power request
1797/// ---> MAC
1798typedef struct sSirSmeSetPowerReq
1799{
1800 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1801 tANI_U16 length;
1802 tANI_U16 transactionId; // Transaction ID for cmd
1803 tANI_S8 powerLevel;
1804} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1805
1806/// Definition for Set Power response
1807/// MAC --->
1808typedef struct sSirSmeSetPowerRsp
1809{
1810 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1811 tANI_U16 length;
1812 tSirResultCodes statusCode;
1813 tANI_U16 transactionId; // Transaction ID for cmd
1814} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1815
Jeff Johnson295189b2012-06-20 16:38:30 -07001816
1817/// Definition for Link Test Start response
1818/// MAC --->
1819typedef struct sSirSmeLinkTestStartRsp
1820{
1821 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1822 tANI_U16 length;
1823 tSirMacAddr peerMacAddr;
1824 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001825} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1826
1827/// Definition for Link Test Stop response
1828/// WSM ---> MAC
1829typedef struct sSirSmeLinkTestStopRsp
1830{
1831 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1832 tANI_U16 length;
1833 tSirMacAddr peerMacAddr;
1834 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001835} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1836
1837/// Definition for kick starting DFS measurements
1838typedef struct sSirSmeDFSreq
1839{
1840 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1841 tANI_U16 length;
1842 tANI_U16 transactionId; // Transaction ID for cmd
1843} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1844
1845/// Definition for response message to previously
1846/// issued DFS request
1847typedef struct sSirSmeDFSrsp
1848{
1849 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1850 tANI_U16 length;
1851 tSirResultCodes statusCode;
1852 tANI_U16 transactionId; // Transaction ID for cmd
1853 tANI_U32 dfsReport[1];
1854} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1855
1856/// Statistic definitions
1857//=============================================================
1858// Per STA statistic structure; This same struct will be used for Aggregate
1859// STA stats as well.
1860
1861// Clear radio stats and clear per sta stats
1862typedef enum
1863{
1864 eANI_CLEAR_ALL_STATS, // Clears all stats
1865 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1866 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1867 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1868 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1869 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1870
1871 // Used to distinguish between per sta to security stats.
1872 // Used only by AP, FW just returns the same parameter as it received.
1873 eANI_LINK_STATS, // Get Per STA stats
1874 eANI_SECURITY_STATS, // Get Per STA security stats
1875
1876 eANI_CLEAR_STAT_TYPES_END
1877} tAniStatSubTypes;
1878
1879typedef struct sAniTxCtrs
1880{
1881 // add the rate counters here
1882 tANI_U32 tx1Mbps;
1883 tANI_U32 tx2Mbps;
1884 tANI_U32 tx5_5Mbps;
1885 tANI_U32 tx6Mbps;
1886 tANI_U32 tx9Mbps;
1887 tANI_U32 tx11Mbps;
1888 tANI_U32 tx12Mbps;
1889 tANI_U32 tx18Mbps;
1890 tANI_U32 tx24Mbps;
1891 tANI_U32 tx36Mbps;
1892 tANI_U32 tx48Mbps;
1893 tANI_U32 tx54Mbps;
1894 tANI_U32 tx72Mbps;
1895 tANI_U32 tx96Mbps;
1896 tANI_U32 tx108Mbps;
1897
1898 // tx path radio counts
1899 tANI_U32 txFragHi;
1900 tANI_U32 txFragLo;
1901 tANI_U32 txFrameHi;
1902 tANI_U32 txFrameLo;
1903 tANI_U32 txMulticastFrameHi;
1904 tANI_U32 txMulticastFrameLo;
1905 tANI_U32 txFailedHi;
1906 tANI_U32 txFailedLo;
1907 tANI_U32 multipleRetryHi;
1908 tANI_U32 multipleRetryLo;
1909 tANI_U32 singleRetryHi;
1910 tANI_U32 singleRetryLo;
1911 tANI_U32 ackFailureHi;
1912 tANI_U32 ackFailureLo;
1913 tANI_U32 xmitBeacons;
1914
1915 // titan 3c stats
1916 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1917 tANI_U32 txCbEscPktCntLo;
1918 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1919 tANI_U32 txChunksCntLo;
1920 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1921 tANI_U32 txCompPktCntLo;
1922 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1923 tANI_U32 tx50PerCompPktCntLo;
1924 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1925 tANI_U32 txExpanPktCntLo;
1926} tAniTxCtrs, *tpAniTxCtrs;
1927
1928typedef struct sAniRxCtrs
1929{
1930 // receive frame rate counters
1931 tANI_U32 rx1Mbps;
1932 tANI_U32 rx2Mbps;
1933 tANI_U32 rx5_5Mbps;
1934 tANI_U32 rx6Mbps;
1935 tANI_U32 rx9Mbps;
1936 tANI_U32 rx11Mbps;
1937 tANI_U32 rx12Mbps;
1938 tANI_U32 rx18Mbps;
1939 tANI_U32 rx24Mbps;
1940 tANI_U32 rx36Mbps;
1941 tANI_U32 rx48Mbps;
1942 tANI_U32 rx54Mbps;
1943 tANI_U32 rx72Mbps;
1944 tANI_U32 rx96Mbps;
1945 tANI_U32 rx108Mbps;
1946
1947 // receive size counters; 'Lte' = Less than or equal to
1948 tANI_U32 rxLte64;
1949 tANI_U32 rxLte128Gt64;
1950 tANI_U32 rxLte256Gt128;
1951 tANI_U32 rxLte512Gt256;
1952 tANI_U32 rxLte1kGt512;
1953 tANI_U32 rxLte1518Gt1k;
1954 tANI_U32 rxLte2kGt1518;
1955 tANI_U32 rxLte4kGt2k;
1956
1957 // rx radio stats
1958 tANI_U32 rxFrag;
1959 tANI_U32 rxFrame;
1960 tANI_U32 fcsError;
1961 tANI_U32 rxMulticast;
1962 tANI_U32 duplicate;
1963 tANI_U32 rtsSuccess;
1964 tANI_U32 rtsFailed;
1965 tANI_U32 wepUndecryptables;
1966 tANI_U32 drops;
1967 tANI_U32 aesFormatErrorUcastCnts;
1968 tANI_U32 aesReplaysUcast;
1969 tANI_U32 aesDecryptErrUcast;
1970
1971 // titan 3c stats
1972 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
1973 tANI_U32 rxDecompPktCntLo;
1974 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
1975 tANI_U32 rxCompPktCntLo;
1976 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
1977 tANI_U32 rxExpanPktCntLo;
1978} tAniRxCtrs, *tpAniRxCtrs;
1979
1980// Radio stats
1981typedef struct sAniRadioStats
1982{
1983 tAniTxCtrs tx;
1984 tAniRxCtrs rx;
1985} tAniRadioStats, *tpAniRadioStats;
1986
1987// Get Radio Stats request structure
1988// This structure shall be used for both Radio stats and Aggregate stats
1989// A valid request must contain entire structure with/without valid fields.
1990// Based on the request type, the valid fields will be checked.
1991typedef struct sAniGetStatsReq
1992{
1993 // Common for all types are requests
1994 tANI_U16 msgType; // message type is same as the request type
1995 tANI_U16 msgLen; // length of the entire request
1996 tANI_U8 sessionId; //Session ID
1997 tANI_U16 transactionId;
1998 tSirMacAddr bssId; //BSSID
1999 // only used for clear stats and per sta stats clear
2000 tAniStatSubTypes stat; // Clears the stats of the described types.
2001 tANI_U32 staId; // Per STA stats request must contain valid
2002 // values
2003 tANI_U8 macAddr[6];
2004} tAniGetStatsReq, *tpAniGetStatsReq;
2005
2006// Get Radio Stats response struct
2007typedef struct sAniGetRadioStatsRsp
2008{
2009 tANI_U16 type; // message type is same as the request type
2010 tANI_U16 msgLen; // length of the entire request
2011 tANI_U32 rc;
2012 tANI_U16 transactionId;
2013 tAniRadioStats radio;
2014} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2015
2016// Per Sta stats response struct
2017typedef struct sAniGetPerStaStatsRsp
2018{
2019 tANI_U16 type; // message type is same as the request type
2020 tANI_U16 msgLen; // length of the entire request
2021 tANI_U32 rc;
2022 tANI_U16 transactionId;
2023 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2024 tAniStaStatStruct sta;
2025 tANI_U32 staId;
2026 tANI_U8 macAddr[6];
2027} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2028
2029// Get Aggregate stats
2030typedef struct sAniGetAggrStaStatsRsp
2031{
2032 tANI_U16 type; // message type is same as the request type
2033 tANI_U16 msgLen; // length of the entire request
2034 tANI_U32 rc;
2035 tANI_U16 transactionId;
2036 tAniStaStatStruct sta;
2037} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2038
2039// Clear stats request and response structure. 'rc' field is unused in
2040// request and this field is used in response field.
2041typedef struct sAniClearStatsRsp
2042{
2043 tANI_U16 type; // message type is same as the request type
2044 tANI_U16 msgLen; // length of the entire request
2045 tANI_U32 rc; // return code - will be filled by FW on
2046 // response.
2047 // Same transaction ID will be returned by the FW
2048 tANI_U16 transactionId;
2049 tAniStatSubTypes stat; // Clears the stats of the described types.
2050 tANI_U32 staId; // Applicable only to PER STA stats clearing
2051 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2052} tAniClearStatsRsp, *tpAniClearStatsRsp;
2053
2054typedef struct sAniGetGlobalStatsRsp
2055{
2056 tANI_U16 type; // message type is same as the request type
2057 tANI_U16 msgLen; // length of the entire request
2058 tANI_U32 rc;
2059 tANI_U16 transactionId;
2060 tAniGlobalStatStruct global;
2061} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2062
2063typedef struct sAniGetStatSummaryRsp
2064{
2065 tANI_U16 type; // message type is same as the request type
2066 tANI_U16 msgLen; // length of the entire request --Why?
2067 tANI_U32 rc;
2068 tANI_U16 transactionId;
2069 tAniStatSummaryStruct stat;
2070} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2071
2072//***************************************************************
2073
2074
2075/*******************PE Statistics*************************/
2076typedef enum
2077{
2078 PE_SUMMARY_STATS_INFO = 0x00000001,
2079 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2080 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2081 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2082 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
2083 PE_PER_STA_STATS_INFO = 0x00000020
2084}ePEStatsMask;
2085
2086/*
2087 * tpAniGetPEStatsReq is tied to
2088 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2089 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2090 */
2091typedef struct sAniGetPEStatsReq
2092{
2093 // Common for all types are requests
2094 tANI_U16 msgType; // message type is same as the request type
2095 tANI_U16 msgLen; // length of the entire request
2096 tANI_U32 staId; // Per STA stats request must contain valid
2097 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2098} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2099
2100/*
2101 * tpAniGetPEStatsRsp is tied to
2102 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2103 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2104 */
2105typedef struct sAniGetPEStatsRsp
2106{
2107 // Common for all types are responses
2108 tANI_U16 msgType; // message type is same as the request type
2109 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2110 tANI_U8 sessionId;
2111 tANI_U32 rc; //success/failure
2112 tANI_U32 staId; // Per STA stats request must contain valid
2113 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2114/**********************************************************************************************
2115 //void *pStatsBuf;
2116 The Stats buffer starts here and can be an aggregate of more than one statistics
2117 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2118 intentionally and the src code that uses this structure should take that into account.
2119**********************************************************************************************/
2120} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2121
2122typedef struct sAniGetRssiReq
2123{
2124 // Common for all types are requests
2125 tANI_U16 msgType; // message type is same as the request type
2126 tANI_U16 msgLen; // length of the entire request
2127 tANI_U8 sessionId;
2128 tANI_U8 staId;
2129 void *rssiCallback;
2130 void *pDevContext; //device context
2131 void *pVosContext; //voss context
2132
2133} tAniGetRssiReq, *tpAniGetRssiReq;
2134
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302135typedef struct sAniGetSnrReq
2136{
2137 // Common for all types are requests
2138 tANI_U16 msgType; // message type is same as the request type
2139 tANI_U16 msgLen; // length of the entire request
2140 tANI_U8 sessionId;
2141 tANI_U8 staId;
2142 void *snrCallback;
2143 void *pDevContext; //device context
2144} tAniGetSnrReq, *tpAniGetSnrReq;
2145
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002146#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002147typedef struct sAniGetRoamRssiRsp
2148{
2149 // Common for all types are responses
2150 tANI_U16 msgType; // message type is same as the request type
2151 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2152 tANI_U8 sessionId;
2153 tANI_U32 rc; //success/failure
2154 tANI_U32 staId; // Per STA stats request must contain valid
2155 tANI_S8 rssi;
2156 void *rssiReq; //rssi request backup
2157
2158} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2159
2160#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002161
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002162#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002163
2164typedef struct sSirTsmIE
2165{
2166 tANI_U8 tsid;
2167 tANI_U8 state;
2168 tANI_U16 msmt_interval;
2169} tSirTsmIE, *tpSirTsmIE;
2170
2171typedef struct sSirSmeTsmIEInd
2172{
2173 tSirTsmIE tsmIe;
2174 tANI_U8 sessionId;
2175} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2176
2177
2178typedef struct sAniTrafStrmMetrics
2179{
2180 tANI_U16 UplinkPktQueueDly;
2181 tANI_U16 UplinkPktQueueDlyHist[4];
2182 tANI_U32 UplinkPktTxDly;
2183 tANI_U16 UplinkPktLoss;
2184 tANI_U16 UplinkPktCount;
2185 tANI_U8 RoamingCount;
2186 tANI_U16 RoamingDly;
2187} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2188
2189typedef struct sAniGetTsmStatsReq
2190{
2191 // Common for all types are requests
2192 tANI_U16 msgType; // message type is same as the request type
2193 tANI_U16 msgLen; // length of the entire request
2194 tANI_U8 staId;
2195 tANI_U8 tid; // traffic id
2196 tSirMacAddr bssId;
2197 void *tsmStatsCallback;
2198 void *pDevContext; //device context
2199 void *pVosContext; //voss context
2200} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2201
2202typedef struct sAniGetTsmStatsRsp
2203{
2204 // Common for all types are responses
2205 tANI_U16 msgType; // message type is same as the request type
2206 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2207 tANI_U8 sessionId;
2208 tANI_U32 rc; //success/failure
2209 tANI_U32 staId; // Per STA stats request must contain valid
2210 tAniTrafStrmMetrics tsmMetrics;
2211 void *tsmStatsReq; //tsm stats request backup
2212} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002213
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002214typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002215{
2216 tBcnReportFields bcnReportFields;
2217 tANI_U8 ieLen;
2218 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002219} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002220
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002221typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002222{
2223 tANI_U16 measurementToken;
2224 tANI_U8 flag; /* Flag to report measurement done and more data */
2225 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002226 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2227} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002228
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002229#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002230
Jeff Johnson295189b2012-06-20 16:38:30 -07002231/* Change country code request MSG structure */
2232typedef struct sAniChangeCountryCodeReq
2233{
2234 // Common for all types are requests
2235 tANI_U16 msgType; // message type is same as the request type
2236 tANI_U16 msgLen; // length of the entire request
2237 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302238 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302239 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002240 void *changeCCCallback;
2241 void *pDevContext; //device context
2242 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002243
Jeff Johnson295189b2012-06-20 16:38:30 -07002244} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2245
Amar Singhal0d15bd52013-10-12 23:13:13 -07002246/* generic country code change request MSG structure */
2247typedef struct sAniGenericChangeCountryCodeReq
2248{
2249 // Common for all types are requests
2250 tANI_U16 msgType; // message type is same as the request type
2251 tANI_U16 msgLen; // length of the entire request
2252 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2253 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002254} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2255
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302256typedef struct sAniDHCPStopInd
2257{
2258 tANI_U16 msgType; // message type is same as the request type
2259 tANI_U16 msgLen; // length of the entire request
2260 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2261 tSirMacAddr macAddr;
2262
2263} tAniDHCPInd, *tpAniDHCPInd;
2264
Jeff Johnson295189b2012-06-20 16:38:30 -07002265typedef struct sAniSummaryStatsInfo
2266{
2267 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2268 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2269 // station successfully transmitted after more than one retransmission attempt
2270
2271 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2272 //(with and without retries, including multi-cast, broadcast)
2273 //tANI_U32 tx_fail_cnt;
2274 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2275 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2276 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2277 //(after appropriate filter rules including multi-cast, broadcast)
2278 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2279 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2280 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2281 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2282 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2283 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2284 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2285 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2286 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2287 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2288 //to provide this.
2289#if 0
2290 //providing the following stats, in case of wrap around for tx_byte_cnt
2291 tANI_U32 tx_unicast_lower_byte_cnt;
2292 tANI_U32 tx_unicast_upper_byte_cnt;
2293 tANI_U32 tx_multicast_lower_byte_cnt;
2294 tANI_U32 tx_multicast_upper_byte_cnt;
2295 tANI_U32 tx_broadcast_lower_byte_cnt;
2296 tANI_U32 tx_broadcast_upper_byte_cnt;
2297#endif
2298
2299}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2300
2301typedef enum eTxRateInfo
2302{
2303 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2304 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2305 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2306 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002307 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2308 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2309 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2310 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002311} tTxrateinfoflags;
2312
2313typedef struct sAniGlobalClassAStatsInfo
2314{
2315 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2316 //or MMPDU frames
2317 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2318 //or MMPDU frames when a promiscuous packet filter was enabled
2319 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2320 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2321 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2322 //to a supported rate and the order shall be the same as the supporteRates parameter.
2323 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2324 //for eg: if it is 10.5dBm, the value would be 105
2325 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2326 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2327 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2328 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2329 //500 kbit/sec, for the most
2330 //recently transmitted frame
2331 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2332 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2333 //HT40 rates; short and long guard interval
2334
2335}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2336
2337
2338typedef struct sAniGlobalSecurityStats
2339{
2340 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2341 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2342 //is enabled
2343 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2344 //because of MIC failures
2345 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2346 //because of a TKIP ICV error
2347 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2348 //invalid AES-CCMP format
2349 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2350 //the AES-CCMP replay protection procedure
2351 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2352 //errors detected by the AES-CCMP decryption algorithm
2353 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2354 //not available on the 802.11 station
2355 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2356 //because of a WEP ICV error
2357 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2358 //decrypted
2359 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2360
2361}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2362
2363typedef struct sAniGlobalClassBStatsInfo
2364{
2365 tAniGlobalSecurityStats ucStats;
2366 tAniGlobalSecurityStats mcbcStats;
2367}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2368
2369typedef struct sAniGlobalClassCStatsInfo
2370{
2371 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2372 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2373 //address 1 field
2374 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2375 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2376 //primary channel
2377 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2378 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2379 //when an A-MPDU is received
2380 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2381 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2382 //decoded correctly
2383
2384}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2385
2386typedef struct sAniPerStaStatsInfo
2387{
2388 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2389 //through a received 802.11 ACK frame
2390 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2391 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2392 //is transmitted
2393
2394}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2395
2396/**********************PE Statistics end*************************/
2397
2398
2399
2400typedef struct sSirRSSIThresholds
2401{
2402#ifdef ANI_BIG_BYTE_ENDIAN
2403 tANI_S8 ucRssiThreshold1 : 8;
2404 tANI_S8 ucRssiThreshold2 : 8;
2405 tANI_S8 ucRssiThreshold3 : 8;
2406 tANI_U8 bRssiThres1PosNotify : 1;
2407 tANI_U8 bRssiThres1NegNotify : 1;
2408 tANI_U8 bRssiThres2PosNotify : 1;
2409 tANI_U8 bRssiThres2NegNotify : 1;
2410 tANI_U8 bRssiThres3PosNotify : 1;
2411 tANI_U8 bRssiThres3NegNotify : 1;
2412 tANI_U8 bReserved10 : 2;
2413#else
2414 tANI_U8 bReserved10 : 2;
2415 tANI_U8 bRssiThres3NegNotify : 1;
2416 tANI_U8 bRssiThres3PosNotify : 1;
2417 tANI_U8 bRssiThres2NegNotify : 1;
2418 tANI_U8 bRssiThres2PosNotify : 1;
2419 tANI_U8 bRssiThres1NegNotify : 1;
2420 tANI_U8 bRssiThres1PosNotify : 1;
2421 tANI_S8 ucRssiThreshold3 : 8;
2422 tANI_S8 ucRssiThreshold2 : 8;
2423 tANI_S8 ucRssiThreshold1 : 8;
2424#endif
2425
2426}tSirRSSIThresholds, *tpSirRSSIThresholds;
2427
2428typedef struct sSirRSSINotification
2429{
2430#ifdef ANI_BIG_BYTE_ENDIAN
2431 tANI_U32 bRssiThres1PosCross : 1;
2432 tANI_U32 bRssiThres1NegCross : 1;
2433 tANI_U32 bRssiThres2PosCross : 1;
2434 tANI_U32 bRssiThres2NegCross : 1;
2435 tANI_U32 bRssiThres3PosCross : 1;
2436 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002437 v_S7_t avgRssi : 8;
2438 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002439#else
Srinivasdaaec712012-12-12 15:59:44 -08002440 tANI_U32 bReserved : 18;
2441 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002442 tANI_U32 bRssiThres3NegCross : 1;
2443 tANI_U32 bRssiThres3PosCross : 1;
2444 tANI_U32 bRssiThres2NegCross : 1;
2445 tANI_U32 bRssiThres2PosCross : 1;
2446 tANI_U32 bRssiThres1NegCross : 1;
2447 tANI_U32 bRssiThres1PosCross : 1;
2448#endif
2449
2450}tSirRSSINotification, *tpSirRSSINotification;
2451
Viral Modid86bde22012-12-10 13:09:21 -08002452
2453typedef struct sSirP2PNoaStart
2454{
2455 tANI_U32 status;
2456 tANI_U32 bssIdx;
2457} tSirP2PNoaStart, *tpSirP2PNoaStart;
2458
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302459typedef struct sSirTdlsInd
2460{
2461 tANI_U16 status;
2462 tANI_U16 assocId;
2463 tANI_U16 staIdx;
2464 tANI_U16 reasonCode;
2465} tSirTdlsInd, *tpSirTdlsInd;
2466
Jeff Johnson295189b2012-06-20 16:38:30 -07002467typedef struct sSirP2PNoaAttr
2468{
2469#ifdef ANI_BIG_BYTE_ENDIAN
2470 tANI_U32 index :8;
2471 tANI_U32 oppPsFlag :1;
2472 tANI_U32 ctWin :7;
2473 tANI_U32 rsvd1: 16;
2474#else
2475 tANI_U32 rsvd1: 16;
2476 tANI_U32 ctWin :7;
2477 tANI_U32 oppPsFlag :1;
2478 tANI_U32 index :8;
2479#endif
2480
2481#ifdef ANI_BIG_BYTE_ENDIAN
2482 tANI_U32 uNoa1IntervalCnt:8;
2483 tANI_U32 rsvd2:24;
2484#else
2485 tANI_U32 rsvd2:24;
2486 tANI_U32 uNoa1IntervalCnt:8;
2487#endif
2488 tANI_U32 uNoa1Duration;
2489 tANI_U32 uNoa1Interval;
2490 tANI_U32 uNoa1StartTime;
2491
2492#ifdef ANI_BIG_BYTE_ENDIAN
2493 tANI_U32 uNoa2IntervalCnt:8;
2494 tANI_U32 rsvd3:24;
2495#else
2496 tANI_U32 rsvd3:24;
2497 tANI_U32 uNoa2IntervalCnt:8;
2498#endif
2499 tANI_U32 uNoa2Duration;
2500 tANI_U32 uNoa2Interval;
2501 tANI_U32 uNoa2StartTime;
2502} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002503
2504typedef __ani_attr_pre_packed struct sSirTclasInfo
2505{
2506 tSirMacTclasIE tclas;
2507 tANI_U8 version; // applies only for classifier type ip
2508 __ani_attr_pre_packed union {
2509 tSirMacTclasParamEthernet eth;
2510 tSirMacTclasParamIPv4 ipv4;
2511 tSirMacTclasParamIPv6 ipv6;
2512 tSirMacTclasParam8021dq t8021dq;
2513 }__ani_attr_packed tclasParams;
2514} __ani_attr_packed tSirTclasInfo;
2515
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002516
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002517#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002518#define TSRS_11AG_RATE_6MBPS 0xC
2519#define TSRS_11B_RATE_5_5MBPS 0xB
2520
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002521typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002522{
2523 tANI_U8 tsid;
2524 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002525} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002526
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002527typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002528{
2529 tANI_U8 tsid;
2530 tANI_U8 state;
2531 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002532} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002533
2534typedef struct sTSMStats
2535{
2536 tANI_U8 tid;
2537 tSirMacAddr bssId;
2538 tTrafStrmMetrics tsmMetrics;
2539} tTSMStats, *tpTSMStats;
2540
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002541typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002542{
2543 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002544 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002545 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002546} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002547
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002548typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002549{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002550#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2551 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002552#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002553 tEseTSMContext tsm;
2554} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002555
2556
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002557#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002558
2559
Jeff Johnson295189b2012-06-20 16:38:30 -07002560typedef struct sSirAddtsReqInfo
2561{
2562 tANI_U8 dialogToken;
2563 tSirMacTspecIE tspec;
2564
2565 tANI_U8 numTclas; // number of Tclas elements
2566 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2567 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002568#if defined(FEATURE_WLAN_ESE)
2569 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002570 tANI_U8 tsrsPresent:1;
2571#endif
2572 tANI_U8 wmeTspecPresent:1;
2573 tANI_U8 wsmTspecPresent:1;
2574 tANI_U8 lleTspecPresent:1;
2575 tANI_U8 tclasProcPresent:1;
2576} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2577
2578typedef struct sSirAddtsRspInfo
2579{
2580 tANI_U8 dialogToken;
2581 tSirMacStatusCodes status;
2582 tSirMacTsDelayIE delay;
2583
2584 tSirMacTspecIE tspec;
2585 tANI_U8 numTclas; // number of Tclas elements
2586 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2587 tANI_U8 tclasProc;
2588 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002589#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2590 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002591 tANI_U8 tsmPresent:1;
2592#endif
2593 tANI_U8 wmeTspecPresent:1;
2594 tANI_U8 wsmTspecPresent:1;
2595 tANI_U8 lleTspecPresent:1;
2596 tANI_U8 tclasProcPresent:1;
2597 tANI_U8 schedulePresent:1;
2598} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2599
2600typedef struct sSirDeltsReqInfo
2601{
2602 tSirMacTSInfo tsinfo;
2603 tSirMacTspecIE tspec;
2604 tANI_U8 wmeTspecPresent:1;
2605 tANI_U8 wsmTspecPresent:1;
2606 tANI_U8 lleTspecPresent:1;
2607} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2608
2609/// Add a tspec as defined
2610typedef struct sSirAddtsReq
2611{
2612 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2613 tANI_U16 length;
2614 tANI_U8 sessionId; //Session ID
2615 tANI_U16 transactionId;
2616 tSirMacAddr bssId; //BSSID
2617 tANI_U32 timeout; // in ms
2618 tANI_U8 rspReqd;
2619 tSirAddtsReqInfo req;
2620} tSirAddtsReq, *tpSirAddtsReq;
2621
2622typedef struct sSirAddtsRsp
2623{
2624 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2625 tANI_U16 length;
2626 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2627 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2628 tANI_U32 rc; // return code
2629 tSirAddtsRspInfo rsp;
2630} tSirAddtsRsp, *tpSirAddtsRsp;
2631
2632typedef struct sSirDeltsReq
2633{
2634 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2635 tANI_U16 length;
2636 tANI_U8 sessionId;//Session ID
2637 tANI_U16 transactionId;
2638 tSirMacAddr bssId; //BSSID
2639 tANI_U16 aid; // use 0 if macAddr is being specified
2640 tANI_U8 macAddr[6]; // only on AP to specify the STA
2641 tANI_U8 rspReqd;
2642 tSirDeltsReqInfo req;
2643} tSirDeltsReq, *tpSirDeltsReq;
2644
2645typedef struct sSirDeltsRsp
2646{
2647 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2648 tANI_U16 length;
2649 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2650 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2651 tANI_U32 rc;
2652 tANI_U16 aid; // use 0 if macAddr is being specified
2653 tANI_U8 macAddr[6]; // only on AP to specify the STA
2654 tSirDeltsReqInfo rsp;
2655} tSirDeltsRsp, *tpSirDeltsRsp;
2656
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002657#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002658
2659#define SIR_QOS_NUM_TSPEC_MAX 2
2660#define SIR_QOS_NUM_AC_MAX 4
2661
2662typedef struct sSirAggrQosReqInfo
2663{
2664 tANI_U16 tspecIdx;
2665 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2666}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2667
2668typedef struct sSirAggrQosReq
2669{
2670 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2671 tANI_U16 length;
2672 tANI_U8 sessionId; //Session ID
2673 tANI_U16 transactionId;
2674 tSirMacAddr bssId; //BSSID
2675 tANI_U32 timeout; // in ms
2676 tANI_U8 rspReqd;
2677 tSirAggrQosReqInfo aggrInfo;
2678}tSirAggrQosReq, *tpSirAggrQosReq;
2679
2680typedef struct sSirAggrQosRspInfo
2681{
2682 tANI_U16 tspecIdx;
2683 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2684} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2685
2686typedef struct sSirAggrQosRsp
2687{
2688 tANI_U16 messageType;
2689 tANI_U16 length;
2690 tANI_U8 sessionId;
2691 tSirAggrQosRspInfo aggrInfo;
2692} tSirAggrQosRsp, *tpSirAggrQosRsp;
2693
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002694#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002695
2696typedef struct sSirSetTxPowerReq
2697{
schang86c22c42013-03-13 18:41:24 -07002698 tANI_U16 messageType;
2699 tANI_U16 length;
2700 tSirMacAddr bssId;
2701 tANI_U8 mwPower;
2702 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002703} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2704
2705typedef struct sSirSetTxPowerRsp
2706{
2707 tANI_U16 messageType;
2708 tANI_U16 length;
2709 tANI_U32 status;
2710} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2711
2712typedef struct sSirGetTxPowerReq
2713{
2714 tANI_U16 messageType;
2715 tANI_U16 length;
2716 tANI_U16 staid;
2717} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2718
2719typedef struct sSirGetTxPowerRsp
2720{
2721 tANI_U16 messageType;
2722 tANI_U16 length; // length of the entire request
2723 tANI_U32 power; // units of milliwatts
2724 tANI_U32 status;
2725} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2726
2727
2728typedef tANI_U32 tSirMacNoise[3];
2729
2730typedef struct sSirGetNoiseRsp
2731{
2732 tANI_U16 messageType;
2733 tANI_U16 length;
2734 tSirMacNoise noise;
2735} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2736
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002737typedef struct sSirQosMapSet
2738{
2739 tANI_U8 present;
2740 tANI_U8 num_dscp_exceptions;
2741 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002742 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002743} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002744
2745//
2746// PMC --> PE --> HAL
2747// Power save configuration parameters
2748//
2749typedef struct sSirPowerSaveCfg
2750{
2751 tANI_U16 listenInterval;
2752
2753 /* Number of consecutive missed beacons before
2754 * hardware generates an interrupt to wake up
2755 * the host. In units of listen interval.
2756 */
2757 tANI_U32 HeartBeatCount;
2758
2759 /* specifies which beacons are to be forwarded
2760 * to host when beacon filtering is enabled.
2761 * In units of listen interval.
2762 */
2763 tANI_U32 nthBeaconFilter;
2764
2765 /* Maximum number of PS-Poll send before
2766 * firmware sends data null with PM set to 0.
2767 */
2768 tANI_U32 maxPsPoll;
2769
2770 /* If the average RSSI value falls below the
2771 * minRssiThreshold, then FW will send an
2772 * interrupt to wake up the host.
2773 */
2774 tANI_U32 minRssiThreshold;
2775
2776 /* Number of beacons for which firmware will
2777 * collect the RSSI values and compute the average.
2778 */
2779 tANI_U8 numBeaconPerRssiAverage;
2780
2781 /* FW collects the RSSI stats for this period
2782 * in BMPS mode.
2783 */
2784 tANI_U8 rssiFilterPeriod;
2785
2786 // Enabling/disabling broadcast frame filter feature
2787 tANI_U8 broadcastFrameFilter;
2788
2789 // Enabling/disabling the ignore DTIM feature
2790 tANI_U8 ignoreDtim;
2791
2792 /* The following configuration parameters are kept
2793 * in order to be backward compatible for Gen5.
2794 * These will NOT be used for Gen6 Libra chip
2795 */
2796 tBeaconForwarding beaconFwd;
2797 tANI_U16 nthBeaconFwd;
2798 tANI_U8 fEnablePwrSaveImmediately;
2799 tANI_U8 fPSPoll;
2800
2801 // Enabling/disabling Beacon Early Termination feature
2802 tANI_U8 fEnableBeaconEarlyTermination;
2803 tANI_U8 bcnEarlyTermWakeInterval;
2804
2805}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2806
2807/* Reason code for requesting Full Power. This reason code is used by
2808 any module requesting full power from PMC and also by PE when it
2809 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2810typedef enum eRequestFullPowerReason
2811{
2812 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2813 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2814 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2815 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2816 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2817 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2818 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2819 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2820 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2821 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002822#ifdef FEATURE_WLAN_TDLS
2823 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2824#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002825 eSME_REASON_OTHER /* No specific reason. General reason code */
2826} tRequestFullPowerReason, tExitBmpsReason;
2827
2828
2829
2830//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2831typedef struct sExitBmpsInfo
2832{
2833 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2834}tExitBmpsInfo, *tpExitBmpsInfo;
2835
2836
2837// MAC SW --> SME
2838// Message indicating to SME to exit BMPS sleep mode
2839typedef struct sSirSmeExitBmpsInd
2840{
2841 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2842 tANI_U16 mesgLen;
2843 tSirResultCodes statusCode;
2844 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2845
2846} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2847
2848
2849//
2850// HDD -> LIM
2851// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2852// tSirMsgQ.reserved = 0
2853// tSirMsgQ.body = instance of tDelBAParams
2854//
2855typedef struct sSmeDelBAPeerInd
2856{
2857 // Message Type
2858 tANI_U16 mesgType;
2859
2860 tSirMacAddr bssId;//BSSID
2861
2862 // Message Length
2863 tANI_U16 mesgLen;
2864
2865 // Station Index
2866 tANI_U16 staIdx;
2867
2868 // TID for which the BA session is being deleted
2869 tANI_U8 baTID;
2870
2871 // DELBA direction
2872 // eBA_INITIATOR - Originator
2873 // eBA_RECEIPIENT - Recipient
2874 tANI_U8 baDirection;
2875} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2876
2877typedef struct sSmeIbssPeerInd
2878{
2879 tANI_U16 mesgType;
2880 tANI_U16 mesgLen;
2881 tANI_U8 sessionId;
2882
2883 tSirMacAddr peerAddr;
2884 tANI_U16 staId;
2885
2886 /*The DPU signatures will be sent eventually to TL to help it determine the
2887 association to which a packet belongs to*/
2888 /*Unicast DPU signature*/
2889 tANI_U8 ucastSig;
2890
2891 /*Broadcast DPU signature*/
2892 tANI_U8 bcastSig;
2893
2894 //Beacon will be appended for new Peer indication.
2895}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2896
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002897typedef struct sSirIbssPeerInactivityInd
2898{
2899 tANI_U8 bssIdx;
2900 tANI_U8 staIdx;
2901 tSirMacAddr peerAddr;
2902}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2903
2904
Jeff Johnson295189b2012-06-20 16:38:30 -07002905typedef struct sLimScanChn
2906{
2907 tANI_U16 numTimeScan; //how many time this channel is scan
2908 tANI_U8 channelId;
2909}tLimScanChn;
2910
2911typedef struct sSmeGetScanChnRsp
2912{
2913 // Message Type
2914 tANI_U16 mesgType;
2915 // Message Length
2916 tANI_U16 mesgLen;
2917 tANI_U8 sessionId;
2918 tANI_U8 numChn;
2919 tLimScanChn scanChn[1];
2920} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2921
2922typedef struct sLimScanChnInfo
2923{
2924 tANI_U8 numChnInfo; //number of channels in scanChn
2925 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2926}tLimScanChnInfo;
2927
Jeff Johnson295189b2012-06-20 16:38:30 -07002928typedef struct sSirSmeGetAssocSTAsReq
2929{
2930 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2931 tANI_U16 length;
2932 tSirMacAddr bssId; // BSSID
2933 tANI_U16 modId;
2934 void *pUsrContext;
2935 void *pSapEventCallback;
2936 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2937} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002938
2939typedef struct sSmeMaxAssocInd
2940{
2941 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2942 tANI_U16 mesgLen;
2943 tANI_U8 sessionId;
2944 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2945} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2946
2947/*--------------------------------------------------------------------*/
2948/* BootLoader message definition */
2949/*--------------------------------------------------------------------*/
2950
2951/*--------------------------------------------------------------------*/
2952/* FW image size */
2953/*--------------------------------------------------------------------*/
2954#define SIR_FW_IMAGE_SIZE 146332
2955
2956
2957#define SIR_BOOT_MODULE_ID 1
2958
2959#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2960#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2961#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2962#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2963#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2964#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2965#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2966
2967/*--------------------------------------------------------------------*/
2968/* Bootloader message syntax */
2969/*--------------------------------------------------------------------*/
2970
2971// Message header
2972#define SIR_BOOT_MB_HEADER 0
2973#define SIR_BOOT_MB_HEADER2 1
2974
2975#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2976#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2977
2978// BOOT_SETUP_IND parameter indices
2979#define SIR_BOOT_SETUP_IND_MBADDR 2
2980#define SIR_BOOT_SETUP_IND_MBSIZE 3
2981#define SIR_BOOT_SETUP_IND_MEMOPT 4
2982#define SIR_BOOT_SETUP_IND_LEN \
2983 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2984
2985// BOOT_POST_RESULT_IND parameter indices
2986#define SIR_BOOT_POST_RESULT_IND_RES 2
2987#define SIR_BOOT_POST_RESULT_IND_LEN \
2988 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
2989
2990#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
2991#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
2992#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
2993#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
2994
2995
2996// BOOT_DNLD_RESULT_IND parameter indices
2997#define SIR_BOOT_DNLD_RESULT_IND_RES 2
2998#define SIR_BOOT_DNLD_RESULT_IND_LEN \
2999 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3000
3001#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3002#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3003#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3004
3005// BOOT_DNLD_DEV_REQ
3006#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3007#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3008#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3009 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3010
3011// BOOT_DNLD_DEV_RSP
3012#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3013#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3014 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3015
3016#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3017#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3018
3019// BOOT_DNLD_REQ
3020#define SIR_BOOT_DNLD_REQ_OFFSET 2
3021#define SIR_BOOT_DNLD_REQ_WRADDR 3
3022#define SIR_BOOT_DNLD_REQ_SIZE 4
3023#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3024
3025// BOOT_DNLD_RSP
3026#define SIR_BOOT_DNLD_RSP_SIZE 2
3027#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3028
Jeff Johnson295189b2012-06-20 16:38:30 -07003029
3030// board capabilities fields are defined here.
3031typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3032{
3033#ifndef ANI_LITTLE_BIT_ENDIAN
3034 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3035 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3036 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3037 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3038 tANI_U32 rsvd1:2;
3039 // (productId derives sub-category in the following three families)
3040 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3041 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3042 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3043 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3044 tANI_U32 bbChipVer:4; // Baseband chip version
3045 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3046 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3047 tANI_U32 nReceivers:2; // 0 based.
3048 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3049 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3050 tANI_U32 rsvd:1;
3051 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3052#else
3053
3054 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3055 tANI_U32 rsvd:1;
3056 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3057 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3058 tANI_U32 nReceivers:2; // 0 based.
3059 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3060 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3061 tANI_U32 bbChipVer:4; // Baseband chip version
3062 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3063 // (productId derives sub-category in the following three families)
3064 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3065 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3066 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3067 tANI_U32 rsvd1:2;
3068 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3069 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3070 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3071 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3072#endif
3073} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3074
3075# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3076# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3077
3078# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3079# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3080
3081# define ANI_BCAP_SDRAM_MASK 0x4
3082# define ANI_BCAP_SDRAM_OFFSET 2
3083
3084# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3085# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3086
3087# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3088# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3089
3090# define ANI_BCAP_RADIO_ON_MASK 0xC0
3091# define ANI_BCAP_RADIO_ON_OFFSET 6
3092
3093# define ANI_BCAP_LO_TYPE_MASK 0x300
3094# define ANI_BCAP_LO_TYPE_OFFSET 8
3095
3096# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3097# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3098
3099# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3100# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3101
3102# define ANI_BCAP_RADIO_OFF 0
3103# define ANI_BCAP_RADIO_ON 1
3104# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3105
3106
3107/// WOW related structures
3108// SME -> PE <-> HAL
3109#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3110#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3111
3112// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3113// SME/HDD maintains the list of the BCAST wake-up patterns.
3114// This is a pass through message for PE
3115typedef struct sSirWowlAddBcastPtrn
3116{
3117 tANI_U8 ucPatternId; // Pattern ID
3118 // Pattern byte offset from beginning of the 802.11 packet to start of the
3119 // wake-up pattern
3120 tANI_U8 ucPatternByteOffset;
3121 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3122 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3123 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3124 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3125 // Extra pattern data beyond 128 bytes
3126 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3127 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003128 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003129} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3130
3131
3132// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3133// SME/HDD maintains the list of the BCAST wake-up patterns.
3134// This is a pass through message for PE
3135typedef struct sSirWowlDelBcastPtrn
3136{
3137 /* Pattern ID of the wakeup pattern to be deleted */
3138 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003139 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003140}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3141
3142
3143// SME->PE: Enter WOWLAN parameters
3144typedef struct sSirSmeWowlEnterParams
3145{
3146 /* Enables/disables magic packet filtering */
3147 tANI_U8 ucMagicPktEnable;
3148
3149 /* Magic pattern */
3150 tSirMacAddr magicPtrn;
3151
3152 /* Enables/disables packet pattern filtering */
3153 tANI_U8 ucPatternFilteringEnable;
3154
3155#ifdef WLAN_WAKEUP_EVENTS
3156 /* This configuration directs the WoW packet filtering to look for EAP-ID
3157 * requests embedded in EAPOL frames and use this as a wake source.
3158 */
3159 tANI_U8 ucWoWEAPIDRequestEnable;
3160
3161 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3162 * requests and use this as a wake source.
3163 */
3164 tANI_U8 ucWoWEAPOL4WayEnable;
3165
3166 /* This configuration allows a host wakeup on an network scan offload match.
3167 */
3168 tANI_U8 ucWowNetScanOffloadMatch;
3169
3170 /* This configuration allows a host wakeup on any GTK rekeying error.
3171 */
3172 tANI_U8 ucWowGTKRekeyError;
3173
3174 /* This configuration allows a host wakeup on BSS connection loss.
3175 */
3176 tANI_U8 ucWoWBSSConnLoss;
3177#endif // WLAN_WAKEUP_EVENTS
3178
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003179 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003180} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3181
3182
3183// PE<->HAL: Enter WOWLAN parameters
3184typedef struct sSirHalWowlEnterParams
3185{
3186 /* Enables/disables magic packet filtering */
3187 tANI_U8 ucMagicPktEnable;
3188
3189 /* Magic pattern */
3190 tSirMacAddr magicPtrn;
3191
3192 /* Enables/disables packet pattern filtering in firmware.
3193 Enabling this flag enables broadcast pattern matching
3194 in Firmware. If unicast pattern matching is also desired,
3195 ucUcastPatternFilteringEnable flag must be set tot true
3196 as well
3197 */
3198 tANI_U8 ucPatternFilteringEnable;
3199
3200 /* Enables/disables unicast packet pattern filtering.
3201 This flag specifies whether we want to do pattern match
3202 on unicast packets as well and not just broadcast packets.
3203 This flag has no effect if the ucPatternFilteringEnable
3204 (main controlling flag) is set to false
3205 */
3206 tANI_U8 ucUcastPatternFilteringEnable;
3207
3208 /* This configuration is valid only when magicPktEnable=1.
3209 * It requests hardware to wake up when it receives the
3210 * Channel Switch Action Frame.
3211 */
3212 tANI_U8 ucWowChnlSwitchRcv;
3213
3214 /* This configuration is valid only when magicPktEnable=1.
3215 * It requests hardware to wake up when it receives the
3216 * Deauthentication Frame.
3217 */
3218 tANI_U8 ucWowDeauthRcv;
3219
3220 /* This configuration is valid only when magicPktEnable=1.
3221 * It requests hardware to wake up when it receives the
3222 * Disassociation Frame.
3223 */
3224 tANI_U8 ucWowDisassocRcv;
3225
3226 /* This configuration is valid only when magicPktEnable=1.
3227 * It requests hardware to wake up when it has missed
3228 * consecutive beacons. This is a hardware register
3229 * configuration (NOT a firmware configuration).
3230 */
3231 tANI_U8 ucWowMaxMissedBeacons;
3232
3233 /* This configuration is valid only when magicPktEnable=1.
3234 * This is a timeout value in units of microsec. It requests
3235 * hardware to unconditionally wake up after it has stayed
3236 * in WoWLAN mode for some time. Set 0 to disable this feature.
3237 */
3238 tANI_U8 ucWowMaxSleepUsec;
3239
3240#ifdef WLAN_WAKEUP_EVENTS
3241 /* This configuration directs the WoW packet filtering to look for EAP-ID
3242 * requests embedded in EAPOL frames and use this as a wake source.
3243 */
3244 tANI_U8 ucWoWEAPIDRequestEnable;
3245
3246 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3247 * requests and use this as a wake source.
3248 */
3249 tANI_U8 ucWoWEAPOL4WayEnable;
3250
3251 /* This configuration allows a host wakeup on an network scan offload match.
3252 */
3253 tANI_U8 ucWowNetScanOffloadMatch;
3254
3255 /* This configuration allows a host wakeup on any GTK rekeying error.
3256 */
3257 tANI_U8 ucWowGTKRekeyError;
3258
3259 /* This configuration allows a host wakeup on BSS connection loss.
3260 */
3261 tANI_U8 ucWoWBSSConnLoss;
3262#endif // WLAN_WAKEUP_EVENTS
3263
3264 /* Status code to be filled by HAL when it sends
3265 * SIR_HAL_WOWL_ENTER_RSP to PE.
3266 */
3267 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003268
3269 /*BSSID to find the current session
3270 */
3271 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003272} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3273
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003274// PE<->HAL: Exit WOWLAN parameters
3275typedef struct sSirHalWowlExitParams
3276{
3277 /* Status code to be filled by HAL when it sends
3278 * SIR_HAL_WOWL_EXIT_RSP to PE.
3279 */
3280 eHalStatus status;
3281
3282 /*BSSIDX to find the current session
3283 */
3284 tANI_U8 bssIdx;
3285} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3286
Jeff Johnson295189b2012-06-20 16:38:30 -07003287
3288#define SIR_MAX_NAME_SIZE 64
3289#define SIR_MAX_TEXT_SIZE 32
3290
3291typedef struct sSirName {
3292 v_U8_t num_name;
3293 v_U8_t name[SIR_MAX_NAME_SIZE];
3294} tSirName;
3295
3296typedef struct sSirText {
3297 v_U8_t num_text;
3298 v_U8_t text[SIR_MAX_TEXT_SIZE];
3299} tSirText;
3300
3301
3302#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3303#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3304#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3305#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3306#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3307#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3308#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3309#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3310#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3311#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3312#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3313#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3314#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3315#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3316#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3317#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3318
3319
3320typedef struct sSirWPSProbeRspIE {
3321 v_U32_t FieldPresent;
3322 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3323 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3324 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3325 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3326 v_U16_t DevicePasswordID; // Device Password ID
3327 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3328 v_U8_t ResponseType; // Response type
3329 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3330 tSirName Manufacture;
3331 tSirText ModelName;
3332 tSirText ModelNumber;
3333 tSirText SerialNumber;
3334 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3335 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3336 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3337 tSirText DeviceName;
3338 v_U16_t ConfigMethod; // Configuaration method
3339 v_U8_t RFBand; // RF bands available on the AP
3340} tSirWPSProbeRspIE;
3341
3342#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3343#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3344#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3345#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3346#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3347#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3348#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3349#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3350
3351typedef struct sSirWPSBeaconIE {
3352 v_U32_t FieldPresent;
3353 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3354 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3355 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3356 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3357 v_U16_t DevicePasswordID; // Device Password ID
3358 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3359 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3360 v_U8_t RFBand; // RF bands available on the AP
3361} tSirWPSBeaconIE;
3362
3363#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3364#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3365
3366typedef struct sSirWPSAssocRspIE {
3367 v_U32_t FieldPresent;
3368 v_U32_t Version;
3369 v_U8_t ResposeType;
3370} tSirWPSAssocRspIE;
3371
3372typedef struct sSirAPWPSIEs {
3373 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3374 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3375 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3376} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3377
3378typedef struct sSirUpdateAPWPSIEsReq
3379{
3380 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3381 tANI_U16 length;
3382 tANI_U16 transactionId; //Transaction ID for cmd
3383 tSirMacAddr bssId; // BSSID
3384 tANI_U8 sessionId; //Session ID
3385 tSirAPWPSIEs APWPSIEs;
3386} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3387
3388typedef struct sSirUpdateParams
3389{
3390 tANI_U16 messageType;
3391 tANI_U16 length;
3392 tANI_U8 sessionId; // Session ID
3393 tANI_U8 ssidHidden; // Hide SSID
3394} tSirUpdateParams, *tpSirUpdateParams;
3395
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003396//Beacon Interval
3397typedef struct sSirChangeBIParams
3398{
3399 tANI_U16 messageType;
3400 tANI_U16 length;
3401 tANI_U16 beaconInterval; // Beacon Interval
3402 tSirMacAddr bssId;
3403 tANI_U8 sessionId; // Session ID
3404} tSirChangeBIParams, *tpSirChangeBIParams;
3405
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303406typedef struct sSirOBSSHT40Param
3407{
3408 tANI_U16 OBSSScanPassiveDwellTime;
3409 tANI_U16 OBSSScanActiveDwellTime;
3410 tANI_U16 BSSChannelWidthTriggerScanInterval;
3411 tANI_U16 OBSSScanPassiveTotalPerChannel;
3412 tANI_U16 OBSSScanActiveTotalPerChannel;
3413 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3414 tANI_U16 OBSSScanActivityThreshold;
3415}tSirOBSSHT40Param, *tpOBSSHT40Param;
3416
Jeff Johnson295189b2012-06-20 16:38:30 -07003417#define SIR_WPS_UUID_LEN 16
3418#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3419
3420typedef struct sSirWPSPBCSession {
3421 struct sSirWPSPBCSession *next;
3422 tSirMacAddr addr;
3423 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3424 tANI_TIMESTAMP timestamp;
3425} tSirWPSPBCSession;
3426
3427typedef struct sSirSmeGetWPSPBCSessionsReq
3428{
3429 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3430 tANI_U16 length;
3431 void *pUsrContext;
3432 void *pSapEventCallback;
3433 tSirMacAddr bssId; // BSSID
3434 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3435} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3436
3437typedef struct sSirWPSPBCProbeReq
3438{
3439 tSirMacAddr peerMacAddr;
3440 tANI_U16 probeReqIELen;
3441 tANI_U8 probeReqIE[512];
3442} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3443
3444// probereq from peer, when wsc is enabled
3445typedef struct sSirSmeProbeReqInd
3446{
3447 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3448 tANI_U16 length;
3449 tANI_U8 sessionId;
3450 tSirMacAddr bssId;
3451 tSirWPSPBCProbeReq WPSPBCProbeReq;
3452} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3453
3454typedef struct sSirUpdateAPWPARSNIEsReq
3455{
3456 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3457 tANI_U16 length;
3458 tANI_U16 transactionId; //Transaction ID for cmd
3459 tSirMacAddr bssId; // BSSID
3460 tANI_U8 sessionId; //Session ID
3461 tSirRSNie APWPARSNIEs;
3462} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3463
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003464#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003465#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003466#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3467#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3468#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3469#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3470#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3471#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3472#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003473
3474/*Adaptive Thresholds to be used for FW based scanning*/
3475#define LFR_SENSITIVITY_THR_1MBPS -89
3476#define LFR_LOOKUP_THR_1MBPS -78
3477#define LFR_SENSITIVITY_THR_2MBPS -87
3478#define LFR_LOOKUP_THR_2MBPS -78
3479#define LFR_SENSITIVITY_THR_5_5MBPS -86
3480#define LFR_LOOKUP_THR_5_5MBPS -77
3481#define LFR_SENSITIVITY_THR_11MBPS -85
3482#define LFR_LOOKUP_THR_11MBPS -76
3483#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3484#define LFR_LOOKUP_THR_6MBPS_2G -78
3485#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3486#define LFR_LOOKUP_THR_6MBPS_5G -78
3487#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3488#define LFR_LOOKUP_THR_12MBPS_2G -78
3489#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3490#define LFR_LOOKUP_THR_12MBPS_5G -76
3491#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3492#define LFR_LOOKUP_THR_24MBPS_2G -76
3493#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3494#define LFR_LOOKUP_THR_24MBPS_5G -74
3495#define LFR_SENSITIVITY_THR_DEFAULT 0
3496#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003497#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003498
3499// SME -> HAL - This is the host offload request.
3500#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3501#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3502#define SIR_IPV6_NS_OFFLOAD 2
3503#define SIR_OFFLOAD_DISABLE 0
3504#define SIR_OFFLOAD_ENABLE 1
3505#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303506#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003507#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303508#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003509
3510#ifdef WLAN_NS_OFFLOAD
3511typedef struct sSirNsOffloadReq
3512{
3513 tANI_U8 srcIPv6Addr[16];
3514 tANI_U8 selfIPv6Addr[16];
3515 //Only support 2 possible Network Advertisement IPv6 address
3516 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3517 tANI_U8 selfMacAddr[6];
3518 tANI_U8 srcIPv6AddrValid;
3519 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303520 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003521} tSirNsOffloadReq, *tpSirNsOffloadReq;
3522#endif //WLAN_NS_OFFLOAD
3523
3524typedef struct sSirHostOffloadReq
3525{
3526 tANI_U8 offloadType;
3527 tANI_U8 enableOrDisable;
3528 union
3529 {
3530 tANI_U8 hostIpv4Addr [4];
3531 tANI_U8 hostIpv6Addr [16];
3532 } params;
3533#ifdef WLAN_NS_OFFLOAD
3534 tSirNsOffloadReq nsOffloadInfo;
3535#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003536 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003537} tSirHostOffloadReq, *tpSirHostOffloadReq;
3538
3539/* Packet Types. */
3540#define SIR_KEEP_ALIVE_NULL_PKT 1
3541#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3542
3543/* Enable or disable offload. */
3544#define SIR_KEEP_ALIVE_DISABLE 0
3545#define SIR_KEEP_ALIVE_ENABLE 1
3546
3547/* Keep Alive request. */
3548typedef struct sSirKeepAliveReq
3549{
3550 v_U8_t packetType;
3551 v_U32_t timePeriod;
3552 tSirIpv4Addr hostIpv4Addr;
3553 tSirIpv4Addr destIpv4Addr;
3554 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003555 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003556} tSirKeepAliveReq, *tpSirKeepAliveReq;
3557
3558typedef struct sSirSmeAddStaSelfReq
3559{
3560 tANI_U16 mesgType;
3561 tANI_U16 mesgLen;
3562 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003563 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003564}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3565
3566typedef struct sSirSmeDelStaSelfReq
3567{
3568 tANI_U16 mesgType;
3569 tANI_U16 mesgLen;
3570 tSirMacAddr selfMacAddr;
3571}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3572
3573typedef struct sSirSmeAddStaSelfRsp
3574{
3575 tANI_U16 mesgType;
3576 tANI_U16 mesgLen;
3577 tANI_U16 status;
3578 tSirMacAddr selfMacAddr;
3579}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3580
3581typedef struct sSirSmeDelStaSelfRsp
3582{
3583 tANI_U16 mesgType;
3584 tANI_U16 mesgLen;
3585 tANI_U16 status;
3586 tSirMacAddr selfMacAddr;
3587}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3588
3589/* Coex Indication defines -
3590 should match WLAN_COEX_IND_DATA_SIZE
3591 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3592 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3593#define SIR_COEX_IND_DATA_SIZE (4)
3594#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3595#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003596#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3597#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003598#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3599#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003600
3601typedef struct sSirSmeCoexInd
3602{
3603 tANI_U16 mesgType;
3604 tANI_U16 mesgLen;
3605 tANI_U32 coexIndType;
3606 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3607}tSirSmeCoexInd, *tpSirSmeCoexInd;
3608
Jeff Johnson295189b2012-06-20 16:38:30 -07003609typedef struct sSirSmeMgmtFrameInd
3610{
3611 tANI_U16 mesgType;
3612 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303613 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003614 tANI_U8 sessionId;
3615 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303616 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003617 tANI_U8 frameBuf[1]; //variable
3618}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003619
Chet Lanctot186b5732013-03-18 10:26:30 -07003620#ifdef WLAN_FEATURE_11W
3621typedef struct sSirSmeUnprotMgmtFrameInd
3622{
3623 tANI_U8 sessionId;
3624 tANI_U8 frameType;
3625 tANI_U8 frameLen;
3626 tANI_U8 frameBuf[1]; //variable
3627}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3628#endif
3629
Jeff Johnson295189b2012-06-20 16:38:30 -07003630#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3631 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3632 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3633 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3634#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3635 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3636
3637/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003638typedef struct sSirNoAParam
3639{
3640 tANI_U8 ctWindow:7;
3641 tANI_U8 OppPS:1;
3642 tANI_U8 count;
3643 tANI_U32 duration;
3644 tANI_U32 interval;
3645 tANI_U32 singleNoADuration;
3646 tANI_U8 psSelection;
3647}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003648
Jeff Johnson295189b2012-06-20 16:38:30 -07003649typedef struct sSirWlanSuspendParam
3650{
3651 tANI_U8 configuredMcstBcstFilterSetting;
3652}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3653
3654typedef struct sSirWlanResumeParam
3655{
3656 tANI_U8 configuredMcstBcstFilterSetting;
3657}tSirWlanResumeParam,*tpSirWlanResumeParam;
3658
3659typedef struct sSirWlanSetRxpFilters
3660{
3661 tANI_U8 configuredMcstBcstFilterSetting;
3662 tANI_U8 setMcstBcstFilter;
3663}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003664
3665
3666#ifdef FEATURE_WLAN_SCAN_PNO
3667//
3668// PNO Messages
3669//
3670
3671// Set PNO
3672#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303673#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003674#define SIR_PNO_MAX_SUPP_NETWORKS 16
3675#define SIR_PNO_MAX_SCAN_TIMERS 10
3676
3677/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3678#define SIR_PNO_MAX_PB_REQ_SIZE 450
3679
3680#define SIR_PNO_24G_DEFAULT_CH 1
3681#define SIR_PNO_5G_DEFAULT_CH 36
3682
3683typedef enum
3684{
3685 SIR_PNO_MODE_IMMEDIATE,
3686 SIR_PNO_MODE_ON_SUSPEND,
3687 SIR_PNO_MODE_ON_RESUME,
3688 SIR_PNO_MODE_MAX
3689} eSirPNOMode;
3690
3691typedef struct
3692{
3693 tSirMacSSid ssId;
3694 tANI_U32 authentication;
3695 tANI_U32 encryption;
3696 tANI_U32 bcastNetwType;
3697 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303698 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003699 tANI_U8 rssiThreshold;
3700} tSirNetworkType;
3701
3702typedef struct
3703{
3704 tANI_U32 uTimerValue;
3705 tANI_U32 uTimerRepeat;
3706}tSirScanTimer;
3707
3708typedef struct
3709{
3710 tANI_U8 ucScanTimersCount;
3711 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3712} tSirScanTimersType;
3713
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303714/*Pref Net Req status */
3715typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
3716
3717
Jeff Johnson295189b2012-06-20 16:38:30 -07003718typedef struct sSirPNOScanReq
3719{
3720 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303721 PNOReqStatusCb statusCallback;
3722 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07003723 eSirPNOMode modePNO;
3724 tANI_U8 ucNetworksCount;
3725 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3726 tSirScanTimersType scanTimers;
3727
3728 /*added by SME*/
3729 tANI_U16 us24GProbeTemplateLen;
3730 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3731 tANI_U16 us5GProbeTemplateLen;
3732 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3733} tSirPNOScanReq, *tpSirPNOScanReq;
3734
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003735typedef struct sSirSetRSSIFilterReq
3736{
3737 tANI_U8 rssiThreshold;
3738} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3739
3740
3741// Update Scan Params
3742typedef struct {
3743 tANI_U8 b11dEnabled;
3744 tANI_U8 b11dResolved;
3745 tANI_U8 ucChannelCount;
3746 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3747 tANI_U16 usPassiveMinChTime;
3748 tANI_U16 usPassiveMaxChTime;
3749 tANI_U16 usActiveMinChTime;
3750 tANI_U16 usActiveMaxChTime;
3751 tANI_U8 ucCBState;
3752} tSirUpdateScanParams, * tpSirUpdateScanParams;
3753
3754// Preferred Network Found Indication
3755typedef struct
3756{
3757 tANI_U16 mesgType;
3758 tANI_U16 mesgLen;
3759 /* Network that was found with the highest RSSI*/
3760 tSirMacSSid ssId;
3761 /* Indicates the RSSI */
3762 tANI_U8 rssi;
3763 /* Length of the beacon or probe response
3764 * corresponding to the candidate found by PNO */
3765 tANI_U32 frameLength;
3766 /* Index to memory location where the contents of
3767 * beacon or probe response frame will be copied */
3768 tANI_U8 data[1];
3769} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3770#endif //FEATURE_WLAN_SCAN_PNO
3771
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003772#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3773typedef struct
3774{
3775 tSirMacSSid ssId;
3776 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3777 tANI_U32 authentication;
3778 tANI_U8 encryption;
3779 tANI_U8 mcencryption;
3780 tANI_U8 ChannelCount;
3781 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3782
3783} tSirRoamNetworkType;
3784
3785typedef struct SirMobilityDomainInfo
3786{
3787 tANI_U8 mdiePresent;
3788 tANI_U16 mobilityDomain;
3789} tSirMobilityDomainInfo;
3790
3791typedef struct sSirRoamOffloadScanReq
3792{
3793 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003794 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003795 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003796 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003797 tANI_U8 RoamRssiDiff;
3798 tANI_U8 ChannelCacheType;
3799 tANI_U8 Command;
3800 tANI_U8 StartScanReason;
3801 tANI_U16 NeighborScanTimerPeriod;
3802 tANI_U16 NeighborRoamScanRefreshPeriod;
3803 tANI_U16 NeighborScanChannelMinTime;
3804 tANI_U16 NeighborScanChannelMaxTime;
3805 tANI_U16 EmptyRefreshScanPeriod;
3806 tANI_U8 ValidChannelCount;
3807 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003808 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003809 tANI_U16 us24GProbeTemplateLen;
3810 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3811 tANI_U16 us5GProbeTemplateLen;
3812 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003813 tANI_U8 nProbes;
3814 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003815 tSirRoamNetworkType ConnectedNetwork;
3816 tSirMobilityDomainInfo MDID;
3817} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003818#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003819
3820#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3821
3822//Power Parameters Type
3823typedef enum
3824{
3825 eSIR_IGNORE_DTIM = 1,
3826 eSIR_LISTEN_INTERVAL = 2,
3827 eSIR_MCAST_BCAST_FILTER = 3,
3828 eSIR_ENABLE_BET = 4,
3829 eSIR_BET_INTERVAL = 5
3830}tPowerParamType;
3831
3832//Power Parameters Value s
3833typedef struct
3834{
3835 /* Ignore DTIM */
3836 tANI_U32 uIgnoreDTIM;
3837
3838 /* DTIM Period */
3839 tANI_U32 uDTIMPeriod;
3840
3841 /* Listen Interval */
3842 tANI_U32 uListenInterval;
3843
3844 /* Broadcast Multicas Filter */
3845 tANI_U32 uBcastMcastFilter;
3846
3847 /* Beacon Early Termination */
3848 tANI_U32 uEnableBET;
3849
3850 /* Beacon Early Termination Interval */
3851 tANI_U32 uBETInterval;
3852
Yue Mac24062f2013-05-13 17:01:29 -07003853 /* MAX LI for modulated DTIM */
3854 tANI_U32 uMaxLIModulatedDTIM;
3855
Jeff Johnson295189b2012-06-20 16:38:30 -07003856}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3857
3858typedef struct sSirTxPerTrackingParam
3859{
3860 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3861 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3862 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 */
3863 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3864}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3865
3866#ifdef WLAN_FEATURE_PACKET_FILTERING
3867/*---------------------------------------------------------------------------
3868 Packet Filtering Parameters
3869---------------------------------------------------------------------------*/
3870#define SIR_IPV4_ADDR_LEN 4
3871#define SIR_MAC_ADDR_LEN 6
3872#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3873#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3874#define SIR_MAX_NUM_FILTERS 20
3875#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3876
3877//
3878// Receive Filter Parameters
3879//
3880typedef enum
3881{
3882 SIR_RCV_FILTER_TYPE_INVALID,
3883 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3884 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3885 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3886}eSirReceivePacketFilterType;
3887
3888typedef enum
3889{
3890 SIR_FILTER_HDR_TYPE_INVALID,
3891 SIR_FILTER_HDR_TYPE_MAC,
3892 SIR_FILTER_HDR_TYPE_ARP,
3893 SIR_FILTER_HDR_TYPE_IPV4,
3894 SIR_FILTER_HDR_TYPE_IPV6,
3895 SIR_FILTER_HDR_TYPE_UDP,
3896 SIR_FILTER_HDR_TYPE_MAX
3897}eSirRcvPktFltProtocolType;
3898
3899typedef enum
3900{
3901 SIR_FILTER_CMP_TYPE_INVALID,
3902 SIR_FILTER_CMP_TYPE_EQUAL,
3903 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3904 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3905 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3906 SIR_FILTER_CMP_TYPE_MAX
3907}eSirRcvPktFltCmpFlagType;
3908
3909typedef struct sSirRcvPktFilterFieldParams
3910{
3911 eSirRcvPktFltProtocolType protocolLayer;
3912 eSirRcvPktFltCmpFlagType cmpFlag;
3913 /* Length of the data to compare */
3914 tANI_U16 dataLength;
3915 /* from start of the respective frame header */
3916 tANI_U8 dataOffset;
3917 /* Reserved field */
3918 tANI_U8 reserved;
3919 /* Data to compare */
3920 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3921 /* Mask to be applied on the received packet data before compare */
3922 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3923}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3924
3925typedef struct sSirRcvPktFilterCfg
3926{
3927 tANI_U8 filterId;
3928 eSirReceivePacketFilterType filterType;
3929 tANI_U32 numFieldParams;
3930 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003931 tSirMacAddr selfMacAddr;
3932 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003933 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003934}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3935
3936//
3937// Filter Packet Match Count Parameters
3938//
3939typedef struct sSirRcvFltPktMatchCnt
3940{
3941 tANI_U8 filterId;
3942 tANI_U32 matchCnt;
3943} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3944
3945typedef struct sSirRcvFltPktMatchRsp
3946{
3947 tANI_U16 mesgType;
3948 tANI_U16 mesgLen;
3949
3950 /* Success or Failure */
3951 tANI_U32 status;
3952 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003953 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003954} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3955
3956//
3957// Receive Filter Clear Parameters
3958//
3959typedef struct sSirRcvFltPktClearParam
3960{
3961 tANI_U32 status; /* only valid for response message */
3962 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003963 tSirMacAddr selfMacAddr;
3964 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003965}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3966
3967//
3968// Multicast Address List Parameters
3969//
3970typedef struct sSirRcvFltMcAddrList
3971{
3972 tANI_U32 ulMulticastAddrCnt;
3973 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003974 tSirMacAddr selfMacAddr;
3975 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003976} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3977#endif // WLAN_FEATURE_PACKET_FILTERING
3978
3979//
3980// Generic version information
3981//
3982typedef struct
3983{
3984 tANI_U8 revision;
3985 tANI_U8 version;
3986 tANI_U8 minor;
3987 tANI_U8 major;
3988} tSirVersionType;
3989
3990typedef struct sAniBtAmpLogLinkReq
3991{
3992 // Common for all types are requests
3993 tANI_U16 msgType; // message type is same as the request type
3994 tANI_U16 msgLen; // length of the entire request
3995 tANI_U8 sessionId; //sme Session Id
3996 void *btampHandle; //AMP context
3997
3998} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
3999
4000#ifdef WLAN_FEATURE_GTK_OFFLOAD
4001/*---------------------------------------------------------------------------
4002* WDA_GTK_OFFLOAD_REQ
4003*--------------------------------------------------------------------------*/
4004typedef struct
4005{
4006 tANI_U32 ulFlags; /* optional flags */
4007 tANI_U8 aKCK[16]; /* Key confirmation key */
4008 tANI_U8 aKEK[16]; /* key encryption key */
4009 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004010 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004011} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4012
4013/*---------------------------------------------------------------------------
4014* WDA_GTK_OFFLOAD_GETINFO_REQ
4015*--------------------------------------------------------------------------*/
4016typedef struct
4017{
4018 tANI_U16 mesgType;
4019 tANI_U16 mesgLen;
4020
4021 tANI_U32 ulStatus; /* success or failure */
4022 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4023 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4024 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4025 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004026 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004027} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4028#endif // WLAN_FEATURE_GTK_OFFLOAD
4029
4030#ifdef WLAN_WAKEUP_EVENTS
4031/*---------------------------------------------------------------------------
4032 tSirWakeReasonInd
4033---------------------------------------------------------------------------*/
4034typedef struct
4035{
4036 tANI_U16 mesgType;
4037 tANI_U16 mesgLen;
4038 tANI_U32 ulReason; /* see tWakeReasonType */
4039 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4040 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4041 HAL truncates the data (i.e. data packets) this length
4042 will be less than the actual length */
4043 tANI_U32 ulActualDataLen; /* actual length of data */
4044 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4045 see specific wake type */
4046} tSirWakeReasonInd, *tpSirWakeReasonInd;
4047#endif // WLAN_WAKEUP_EVENTS
4048
4049/*---------------------------------------------------------------------------
4050 sAniSetTmLevelReq
4051---------------------------------------------------------------------------*/
4052typedef struct sAniSetTmLevelReq
4053{
4054 tANI_U16 tmMode;
4055 tANI_U16 newTmLevel;
4056} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4057
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004058#ifdef FEATURE_WLAN_TDLS
4059/* TDLS Request struct SME-->PE */
4060typedef struct sSirTdlsSendMgmtReq
4061{
4062 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4063 tANI_U16 length;
4064 tANI_U8 sessionId; // Session ID
4065 tANI_U16 transactionId; // Transaction ID for cmd
4066 tANI_U8 reqType;
4067 tANI_U8 dialog;
4068 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004069 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304070 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004071 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4072 tSirMacAddr peerMac;
4073 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4074} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004075
4076typedef enum TdlsAddOper
4077{
4078 TDLS_OPER_NONE,
4079 TDLS_OPER_ADD,
4080 TDLS_OPER_UPDATE
4081} eTdlsAddOper;
4082
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004083/* TDLS Request struct SME-->PE */
4084typedef struct sSirTdlsAddStaReq
4085{
4086 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4087 tANI_U16 length;
4088 tANI_U8 sessionId; // Session ID
4089 tANI_U16 transactionId; // Transaction ID for cmd
4090 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004091 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004092 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004093 tANI_U16 capability;
4094 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4095 tANI_U8 supported_rates_length;
4096 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004097 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004098 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004099 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004100 tSirVHTCap vhtCap;
4101 tANI_U8 uapsd_queues;
4102 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004103} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004104
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004105/* TDLS Response struct PE-->SME */
4106typedef struct sSirTdlsAddStaRsp
4107{
4108 tANI_U16 messageType;
4109 tANI_U16 length;
4110 tSirResultCodes statusCode;
4111 tSirMacAddr peerMac;
4112 tANI_U8 sessionId; // Session ID
4113 tANI_U16 staId ;
4114 tANI_U16 staType ;
4115 tANI_U8 ucastSig;
4116 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004117 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004118} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304119
4120/* TDLS Request struct SME-->PE */
4121typedef struct
4122{
4123 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4124 tANI_U16 length;
4125 tANI_U8 sessionId; // Session ID
4126 tANI_U16 transactionId; // Transaction ID for cmd
4127 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4128 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4129 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304130 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304131 tANI_U8 isResponder; // Is Peer a responder.
4132 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4133 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304134 tANI_U8 supportedChannelsLen;
4135 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4136 tANI_U8 supportedOperClassesLen;
4137 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304138}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4139
4140/* TDLS Request struct SME-->PE */
4141typedef struct
4142{
4143 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4144 tANI_U16 length;
4145 tANI_U8 sessionId; // Session ID
4146 tANI_U16 transactionId; // Transaction ID for cmd
4147 tSirResultCodes statusCode;
4148 tSirMacAddr peerMac;
4149}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4150
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004151/* TDLS Request struct SME-->PE */
4152typedef struct sSirTdlsDelStaReq
4153{
4154 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4155 tANI_U16 length;
4156 tANI_U8 sessionId; // Session ID
4157 tANI_U16 transactionId; // Transaction ID for cmd
4158 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4159 tSirMacAddr peerMac;
4160} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4161/* TDLS Response struct PE-->SME */
4162typedef struct sSirTdlsDelStaRsp
4163{
4164 tANI_U16 messageType;
4165 tANI_U16 length;
4166 tANI_U8 sessionId; // Session ID
4167 tSirResultCodes statusCode;
4168 tSirMacAddr peerMac;
4169 tANI_U16 staId;
4170} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004171/* TDLS Delete Indication struct PE-->SME */
4172typedef struct sSirTdlsDelStaInd
4173{
4174 tANI_U16 messageType;
4175 tANI_U16 length;
4176 tANI_U8 sessionId; // Session ID
4177 tSirMacAddr peerMac;
4178 tANI_U16 staId;
4179 tANI_U16 reasonCode;
4180} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004181typedef struct sSirTdlsDelAllPeerInd
4182{
4183 tANI_U16 messageType;
4184 tANI_U16 length;
4185 tANI_U8 sessionId; // Session ID
4186} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004187typedef struct sSirMgmtTxCompletionInd
4188{
4189 tANI_U16 messageType;
4190 tANI_U16 length;
4191 tANI_U8 sessionId; // Session ID
4192 tANI_U32 txCompleteStatus;
4193} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004194#endif /* FEATURE_WLAN_TDLS */
4195
4196#ifdef FEATURE_WLAN_TDLS_INTERNAL
4197typedef enum tdlsListType
4198{
4199 TDLS_DIS_LIST,
4200 TDLS_SETUP_LIST
4201}eTdlsListType ;
4202
4203typedef enum tdlsStates
4204{
4205 TDLS_LINK_IDLE_STATE,
4206 TDLS_LINK_DIS_INIT_STATE,
4207 TDLS_LINK_DIS_RSP_WAIT_STATE,
4208 TDLS_DIS_REQ_PROCESS_STATE,
4209 TDLS_DIS_RSP_SENT_WAIT_STATE,
4210 TDLS_DIS_RSP_SENT_DONE_STATE,
4211 TDLS_LINK_DIS_DONE_STATE,
4212 TDLS_LINK_SETUP_START_STATE,
4213 TDLS_LINK_SETUP_WAIT_STATE,
4214 TDLS_LINK_SETUP_RSP_WAIT_STATE,
4215 TDLS_LINK_SETUP_DONE_STATE,
4216 TDLS_LINK_TEARDOWN_START_STATE,
4217 TDLS_LINK_TEARDOWN_DONE_STATE,
4218 TDLS_LINK_SETUP_STATE
4219}eSirTdlsStates ;
4220
4221typedef struct sSirTdlsPeerInfo
4222{
4223 tSirMacAddr peerMac;
4224 tANI_U8 sessionId;
4225 tANI_U8 dialog ;
4226 tSirMacCapabilityInfo capabilityInfo ;
4227 tSirMacRateSet tdlsPeerSuppRates ;
4228 tSirMacRateSet tdlsPeerExtRates ;
4229 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4230 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4231 tSirMacHTParametersInfo tdlsPeerHtParams ;
4232 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4233 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4234
4235 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4236 tSirMacRsnInfo tdlsPeerRsn ;
4237 tANI_U16 tdlsPeerFtIe ;
4238 tANI_U16 tdlsPeerTimeoutIntvl ;
4239 tANI_U16 tdlsPeerSuppChan ;
4240 tANI_U16 tdlsPeerSuppReguClass ;
4241 tANI_S8 tdlsPeerRssi ;
4242 tANI_U16 tdlsPeerState ;
4243 /* flags to indicate optional IE's are in */
4244 tANI_U8 ExtRatesPresent ;
4245 tANI_U8 rsnIePresent ;
4246 tANI_U8 htCapPresent ;
4247 tANI_U8 delStaNeeded ;
4248
4249} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4250
4251/* TDLS Request struct SME-->PE */
4252typedef struct sSirTdlsDiscoveryReq
4253{
4254 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4255 tANI_U16 length;
4256 tANI_U8 sessionId; // Session ID
4257 tANI_U16 transactionId; // Transaction ID for cmd
4258 tANI_U8 reqType;
4259 tANI_U8 dialog;
4260 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4261 tSirMacAddr peerMac;
4262} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4263
4264typedef struct sSirTdlsLinkSetupReq
4265{
4266 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4267 tANI_U16 length;
4268 tANI_U8 sessionId; // Session ID
4269 tANI_U16 transactionId; // Transaction ID for cmd
4270 tANI_U8 dialog;
4271 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4272 tSirMacAddr peerMac;
4273} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4274
4275typedef struct sSirTdlsTeardownReq
4276{
4277 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4278 tANI_U16 length;
4279 tANI_U8 sessionId; // Session ID
4280 tANI_U16 transactionId; // Transaction ID for cmd
4281 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4282 tSirMacAddr peerMac;
4283} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4284
4285
4286/* TDLS response struct PE-->SME */
4287typedef struct sSirTdlsDiscoveryRsp
4288{
4289 tANI_U16 messageType;
4290 tANI_U16 length;
4291 tSirResultCodes statusCode;
4292 tANI_U16 numDisSta ;
4293 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4294} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4295
4296typedef struct sSirTdlsLinkSetupRsp
4297{
4298 tANI_U16 messageType;
4299 tANI_U16 length;
4300 tSirResultCodes statusCode;
4301 tSirMacAddr peerMac;
4302} tSirTdlsLinksetupRsp ;
4303
4304typedef struct sSirTdlsLinkSetupInd
4305{
4306 tANI_U16 messageType;
4307 tANI_U16 length;
4308 tSirResultCodes statusCode;
4309 tSirMacAddr peerMac;
4310} tSirTdlsLinkSetupInd ;
4311
4312
4313typedef struct sSirTdlsTeardownRsp
4314{
4315 tANI_U16 messageType;
4316 tANI_U16 length;
4317 tSirResultCodes statusCode;
4318 tSirMacAddr peerMac;
4319} tSirTdlsTeardownRsp ;
4320
4321typedef struct sSirTdlsPeerInd
4322{
4323 tANI_U16 messageType;
4324 tANI_U16 length;
4325 tSirMacAddr peerMac;
4326 tANI_U8 sessionId; // Session ID
4327 tANI_U16 staId ;
4328 tANI_U16 staType ;
4329 tANI_U8 ucastSig;
4330 tANI_U8 bcastSig;
4331} tSirTdlsPeerInd ;
4332
4333typedef struct sSirTdlsLinkEstablishInd
4334{
4335 tANI_U16 messageType;
4336 tANI_U16 length;
4337 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4338 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4339 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4340 tANI_U8 ptiTemplateLen;
4341 tANI_U8 ptiTemplateBuf[64];
4342 tANI_U8 extCapability[8];
4343/* This will be part of PTI template when sent by PE
4344 tANI_U8 linkIdentifier[20];
4345*/
4346} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4347
4348typedef struct sSirTdlsLinkTeardownInd
4349{
4350 tANI_U16 messageType;
4351 tANI_U16 length;
4352 tANI_U16 staId;
4353} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4354
4355#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4356
Yathish9f22e662012-12-10 14:21:35 -08004357typedef struct sSirActiveModeSetBcnFilterReq
4358{
4359 tANI_U16 messageType;
4360 tANI_U16 length;
4361 tANI_U8 seesionId;
4362} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4363
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304364typedef enum
4365{
4366 HT40_OBSS_SCAN_PARAM_START,
4367 HT40_OBSS_SCAN_PARAM_UPDATE
4368}tHT40OBssScanCmdType;
4369
4370typedef struct sSirSmeHT40StopOBSSScanInd
4371{
4372 tANI_U16 messageType;
4373 tANI_U16 length;
4374 tANI_U8 seesionId;
4375} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4376
4377typedef struct sSirSmeHT40OBSSScanInd
4378{
4379 tANI_U16 messageType;
4380 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304381 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304382} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4383
4384typedef struct sSirHT40OBSSScanInd
4385{
4386 tHT40OBssScanCmdType cmdType;
4387 tSirScanType scanType;
4388 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4389 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4390 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4391 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4392 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4393 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4394 tANI_U16 OBSSScanActivityThreshold;
4395 tANI_U8 selfStaIdx;
4396 tANI_U8 bssIdx;
4397 tANI_U8 fortyMHZIntolerent;
4398 tANI_U8 channelCount;
4399 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4400 tANI_U8 currentOperatingClass;
4401 tANI_U16 ieFieldLen;
4402 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4403} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4404
4405
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304406//Reset AP Caps Changed
4407typedef struct sSirResetAPCapsChange
4408{
4409 tANI_U16 messageType;
4410 tANI_U16 length;
4411 tSirMacAddr bssId;
4412} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004413/// Definition for Candidate found indication from FW
4414typedef struct sSirSmeCandidateFoundInd
4415{
4416 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4417 tANI_U16 length;
4418 tANI_U8 sessionId; // Session Identifier
4419} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004420
Chet Lanctot186b5732013-03-18 10:26:30 -07004421#ifdef WLAN_FEATURE_11W
4422typedef struct sSirWlanExcludeUnencryptParam
4423{
4424 tANI_BOOLEAN excludeUnencrypt;
4425 tSirMacAddr bssId;
4426}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4427#endif
4428
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004429typedef struct sAniHandoffReq
4430{
4431 // Common for all types are requests
4432 tANI_U16 msgType; // message type is same as the request type
4433 tANI_U16 msgLen; // length of the entire request
4434 tANI_U8 sessionId;
4435 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4436 tANI_U8 channel;
4437} tAniHandoffReq, *tpAniHandoffReq;
4438
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304439typedef struct sSirScanOffloadReq {
4440 tANI_U8 sessionId;
4441 tSirMacAddr bssId;
4442 tANI_U8 numSsid;
4443 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4444 tANI_U8 hiddenSsid;
4445 tSirMacAddr selfMacAddr;
4446 tSirBssType bssType;
4447 tANI_U8 dot11mode;
4448 tSirScanType scanType;
4449 tANI_U32 minChannelTime;
4450 tANI_U32 maxChannelTime;
4451 tANI_BOOLEAN p2pSearch;
4452 tANI_U16 uIEFieldLen;
4453 tANI_U16 uIEFieldOffset;
4454 tSirChannelList channelList;
4455 /*-----------------------------
4456 sSirScanOffloadReq....
4457 -----------------------------
4458 uIEFieldLen
4459 -----------------------------
4460 uIEFieldOffset ----+
4461 ----------------------------- |
4462 channelList.numChannels |
4463 ----------------------------- |
4464 ... variable size up to |
4465 channelNumber[numChannels-1] |
4466 This can be zero, if |
4467 numChannel is zero. |
4468 ----------------------------- <--+
4469 ... variable size uIEField
4470 up to uIEFieldLen (can be 0)
4471 -----------------------------*/
4472} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304473
4474typedef enum sSirScanEventType {
4475 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4476 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4477 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4478 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4479 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4480 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4481 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4482 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4483 SCAN_EVENT_MAX=0x8000
4484} tSirScanEventType;
4485
4486typedef struct sSirScanOffloadEvent{
4487 tSirScanEventType event;
4488 tSirResultCodes reasonCode;
4489 tANI_U32 chanFreq;
4490 tANI_U32 requestor;
4491 tANI_U32 scanId;
4492} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4493
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304494typedef struct sSirUpdateChanParam
4495{
4496 tANI_U8 chanId;
4497 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004498 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304499} tSirUpdateChanParam, *tpSirUpdateChanParam;
4500
4501typedef struct sSirUpdateChan
4502{
4503 tANI_U8 numChan;
4504 tSirUpdateChanParam chanParam[1];
4505} tSirUpdateChanList, *tpSirUpdateChanList;
4506
Leo Chang9056f462013-08-01 19:21:11 -07004507#ifdef FEATURE_WLAN_LPHB
4508#define SIR_LPHB_FILTER_LEN 64
4509
4510typedef enum
4511{
4512 LPHB_SET_EN_PARAMS_INDID,
4513 LPHB_SET_TCP_PARAMS_INDID,
4514 LPHB_SET_TCP_PKT_FILTER_INDID,
4515 LPHB_SET_UDP_PARAMS_INDID,
4516 LPHB_SET_UDP_PKT_FILTER_INDID,
4517 LPHB_SET_NETWORK_INFO_INDID,
4518} LPHBIndType;
4519
4520typedef struct sSirLPHBEnableStruct
4521{
4522 v_U8_t enable;
4523 v_U8_t item;
4524 v_U8_t session;
4525} tSirLPHBEnableStruct;
4526
4527typedef struct sSirLPHBTcpParamStruct
4528{
4529 v_U32_t srv_ip;
4530 v_U32_t dev_ip;
4531 v_U16_t src_port;
4532 v_U16_t dst_port;
4533 v_U16_t timeout;
4534 v_U8_t session;
4535 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004536 uint16 timePeriodSec; // in seconds
4537 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004538} tSirLPHBTcpParamStruct;
4539
4540typedef struct sSirLPHBTcpFilterStruct
4541{
4542 v_U16_t length;
4543 v_U8_t offset;
4544 v_U8_t session;
4545 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4546} tSirLPHBTcpFilterStruct;
4547
4548typedef struct sSirLPHBUdpParamStruct
4549{
4550 v_U32_t srv_ip;
4551 v_U32_t dev_ip;
4552 v_U16_t src_port;
4553 v_U16_t dst_port;
4554 v_U16_t interval;
4555 v_U16_t timeout;
4556 v_U8_t session;
4557 tSirMacAddr gateway_mac;
4558} tSirLPHBUdpParamStruct;
4559
4560typedef struct sSirLPHBUdpFilterStruct
4561{
4562 v_U16_t length;
4563 v_U8_t offset;
4564 v_U8_t session;
4565 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4566} tSirLPHBUdpFilterStruct;
4567
4568typedef struct sSirLPHBReq
4569{
4570 v_U16_t cmd;
4571 v_U16_t dummy;
4572 union
4573 {
4574 tSirLPHBEnableStruct lphbEnableReq;
4575 tSirLPHBTcpParamStruct lphbTcpParamReq;
4576 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4577 tSirLPHBUdpParamStruct lphbUdpParamReq;
4578 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4579 } params;
4580} tSirLPHBReq;
4581
Leo Changd9df8aa2013-09-26 13:32:26 -07004582typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004583{
4584 v_U8_t sessionIdx;
4585 v_U8_t protocolType; /*TCP or UDP*/
4586 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004587} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004588#endif /* FEATURE_WLAN_LPHB */
4589
Yue Mab9c86f42013-08-14 15:59:08 -07004590typedef struct sSirAddPeriodicTxPtrn
4591{
4592 /* MAC Address for the adapter */
4593 tSirMacAddr macAddress;
4594
4595 tANI_U8 ucPtrnId; // Pattern ID
4596 tANI_U16 ucPtrnSize; // Pattern size
4597 tANI_U32 usPtrnIntervalMs; // In msec
4598 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4599} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4600
4601typedef struct sSirDelPeriodicTxPtrn
4602{
4603 /* MAC Address for the adapter */
4604 tSirMacAddr macAddress;
4605
4606 /* Bitmap of pattern IDs that need to be deleted */
4607 tANI_U32 ucPatternIdBitmap;
4608} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4609
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004610typedef struct sSirRateUpdateInd
4611{
4612 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4613 * param.
4614 */
4615 tANI_S32 ucastDataRate;
4616
4617 /* TX flag to differentiate between HT20, HT40 etc */
4618 tTxrateinfoflags ucastDataRateTxFlag;
4619
4620 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4621 tSirMacAddr bssid;
4622
4623 /*
4624 * 0 implies MCAST RA, positive value implies fixed rate,
4625 * -1 implies ignore this param
4626 */
4627 tANI_S32 reliableMcastDataRate;//unit Mbpsx10
4628
4629 /* TX flag to differentiate between HT20, HT40 etc */
4630 tTxrateinfoflags reliableMcastDataRateTxFlag;
4631
4632 /*
4633 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4634 * 0 implies ignore
4635 */
4636 tANI_U32 mcastDataRate24GHz;
4637
4638 /* TX flag to differentiate between HT20, HT40 etc */
4639 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4640
4641 /*
4642 * MCAST(or BCAST) fixed data rate in 5 GHz,
4643 * unit Mbpsx10, 0 implies ignore
4644 */
4645 tANI_U32 mcastDataRate5GHz;
4646
4647 /* TX flag to differentiate between HT20, HT40 etc */
4648 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4649
4650} tSirRateUpdateInd, *tpSirRateUpdateInd;
4651
Rajeev79dbe4c2013-10-05 11:03:42 +05304652#ifdef FEATURE_WLAN_BATCH_SCAN
4653// Set batch scan resposne from FW
4654typedef struct
4655{
4656 /*maximum number of scans which FW can cache*/
4657 tANI_U32 nScansToBatch;
4658} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4659
4660// Set batch scan request to FW
4661typedef struct
4662{
4663 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4664 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4665 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4666 tANI_U8 rfBand; /* band to scan :
4667 0 ->both Band, 1->2.4Ghz Only
4668 and 2-> 5GHz Only */
4669 tANI_U32 rtt; /* set if required to do RTT it is not
4670 supported in current version */
4671} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4672
4673
4674// Stop batch scan request to FW
4675typedef struct
4676{
4677 tANI_U32 param;
4678} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4679
4680// Trigger batch scan result indication to FW
4681typedef struct
4682{
4683 tANI_U32 param;
4684} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4685
4686// Batch scan result indication from FW
4687typedef PACKED_PRE struct PACKED_POST
4688{
4689 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08004690 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304691 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05304692 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05304693 /*Timestamp when Network was found. Used to calculate age based on timestamp
4694 in GET_RSP msg header */
4695 tANI_U32 timestamp;
4696} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4697
4698typedef PACKED_PRE struct PACKED_POST
4699{
4700 tANI_U32 scanId; /* Scan List ID. */
4701 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4702 tANI_U32 numNetworksInScanList;
4703 /*Variable data ptr: Number of AP in Scan List*/
4704 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4705 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4706 tANI_U8 scanList[1];
4707} tSirBatchScanList, *tpSirBatchScanList;
4708
4709typedef PACKED_PRE struct PACKED_POST
4710{
4711 tANI_U32 timestamp;
4712 tANI_U32 numScanLists;
4713 boolean isLastResult;
4714 /* Variable Data ptr: Number of Scan Lists*/
4715 /* following isLastResult is data of type tSirBatchScanList
4716 * of sizeof(tSirBatchScanList) * numScanLists*/
4717 tANI_U8 scanResults[1];
4718} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4719
4720#endif // FEATURE_WLAN_BATCH_SCAN
4721
Leo Chang0b0e45a2013-12-15 15:18:55 -08004722#ifdef FEATURE_WLAN_CH_AVOID
4723#define SIR_CH_AVOID_MAX_RANGE 4
4724
4725typedef struct sSirChAvoidFreqType
4726{
4727 tANI_U32 startFreq;
4728 tANI_U32 endFreq;
4729} tSirChAvoidFreqType;
4730
4731typedef struct sSirChAvoidIndType
4732{
4733 tANI_U32 avoidRangeCount;
4734 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
4735} tSirChAvoidIndType;
4736#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304737
c_hpothu92367912014-05-01 15:18:17 +05304738typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
4739 VOS_STATUS status, void *data);
4740
4741typedef PACKED_PRE struct PACKED_POST
4742{
4743 tANI_U32 msgLen;
4744 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4745 void *callback;
4746 void *data;
4747}tSirBcnMissRateReq;
4748
4749typedef PACKED_PRE struct PACKED_POST
4750{
4751 pGetBcnMissRateCB callback;
4752 void *data;
4753}tSirBcnMissRateInfo;
4754
Sunil Duttc69bccb2014-05-26 21:30:20 +05304755#ifdef WLAN_FEATURE_LINK_LAYER_STATS
4756
4757typedef struct
4758{
4759 u32 reqId;
4760 u8 staId;
4761 u32 mpduSizeThreshold;
4762 u32 aggressiveStatisticsGathering;
4763}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
4764
4765typedef struct
4766{
4767 u32 reqId;
4768 u8 staId;
4769 u32 paramIdMask;
4770}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
4771
4772typedef struct
4773{
4774 u32 reqId;
4775 u8 staId;
4776 u32 statsClearReqMask;
4777 u8 stopReq;
4778}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
4779
4780/*---------------------------------------------------------------------------
4781 WLAN_HAL_LL_NOTIFY_STATS
4782---------------------------------------------------------------------------*/
4783
4784
4785/******************************LINK LAYER Statistics**********************/
4786
4787typedef int tSirWifiRadio;
4788typedef int tSirWifiChannel;
4789typedef int tSirwifiTxRate;
4790
4791/* channel operating width */
4792typedef PACKED_PRE enum PACKED_POST
4793{
4794 WIFI_CHAN_WIDTH_20 = 0,
4795 WIFI_CHAN_WIDTH_40 = 1,
4796 WIFI_CHAN_WIDTH_80 = 2,
4797 WIFI_CHAN_WIDTH_160 = 3,
4798 WIFI_CHAN_WIDTH_80P80 = 4,
4799 WIFI_CHAN_WIDTH_5 = 5,
4800 WIFI_CHAN_WIDTH_10 = 6,
4801} tSirWifiChannelWidth;
4802
4803typedef PACKED_PRE enum PACKED_POST
4804{
4805 WIFI_DISCONNECTED = 0,
4806 WIFI_AUTHENTICATING = 1,
4807 WIFI_ASSOCIATING = 2,
4808 WIFI_ASSOCIATED = 3,
4809 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
4810 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
4811} tSirWifiConnectionState;
4812
4813typedef PACKED_PRE enum PACKED_POST
4814{
4815 WIFI_ROAMING_IDLE = 0,
4816 WIFI_ROAMING_ACTIVE = 1,
4817} tSirWifiRoamState;
4818
4819typedef PACKED_PRE enum PACKED_POST
4820{
4821 WIFI_INTERFACE_STA = 0,
4822 WIFI_INTERFACE_SOFTAP = 1,
4823 WIFI_INTERFACE_IBSS = 2,
4824 WIFI_INTERFACE_P2P_CLIENT = 3,
4825 WIFI_INTERFACE_P2P_GO = 4,
4826 WIFI_INTERFACE_NAN = 5,
4827 WIFI_INTERFACE_MESH = 6,
4828 } tSirWifiInterfaceMode;
4829
4830// set for QOS association
4831#define WIFI_CAPABILITY_QOS 0x00000001
4832// set for protected association (802.11 beacon frame control protected bit set)
4833#define WIFI_CAPABILITY_PROTECTED 0x00000002
4834// set if 802.11 Extended Capabilities element interworking bit is set
4835#define WIFI_CAPABILITY_INTERWORKING 0x00000004
4836// set for HS20 association
4837#define WIFI_CAPABILITY_HS20 0x00000008
4838// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
4839#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
4840// set is 802.11 Country Element is present
4841#define WIFI_CAPABILITY_COUNTRY 0x00000020
4842
4843typedef PACKED_PRE struct PACKED_POST
4844{
4845 /*tSirWifiInterfaceMode*/
4846 // interface mode
4847 tANI_U8 mode;
4848 // interface mac address (self)
4849 tSirMacAddr macAddr;
4850 /*tSirWifiConnectionState*/
4851 // connection state (valid for STA, CLI only)
4852 tANI_U8 state;
4853 /*tSirWifiRoamState*/
4854 // roaming state
4855 tANI_U8 roaming;
4856 // WIFI_CAPABILITY_XXX (self)
4857 tANI_U32 capabilities;
4858 // null terminated SSID
4859 tANI_U8 ssid[33];
4860 // bssid
4861 tSirMacAddr bssid;
4862 // country string advertised by AP
4863 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
4864 // country string for this association
4865 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
4866} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
4867
4868/* channel information */
4869typedef PACKED_PRE struct PACKED_POST
4870{
4871 // channel width (20, 40, 80, 80+80, 160)
4872 tSirWifiChannelWidth width;
4873 // primary 20 MHz channel
4874 tSirWifiChannel centerFreq;
4875 // center frequency (MHz) first segment
4876 tSirWifiChannel centerFreq0;
4877 // center frequency (MHz) second segment
4878 tSirWifiChannel centerFreq1;
4879} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
4880
4881/* wifi rate info */
4882typedef PACKED_PRE struct PACKED_POST
4883{
4884 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
4885 tANI_U32 preamble :3;
4886 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
4887 tANI_U32 nss :2;
4888 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
4889 tANI_U32 bw :3;
4890 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
4891 // HT/VHT it would be mcs index
4892 tANI_U32 rateMcsIdx :8;
4893 // reserved
4894 tANI_U32 reserved :16;
4895 // units of 100 Kbps
4896 tANI_U32 bitrate;
4897} tSirWifiRate, *tpSirWifiRate;
4898
4899/* channel statistics */
4900typedef PACKED_PRE struct PACKED_POST
4901{
4902 // channel
4903 tSirWifiChannelInfo channel;
4904 // msecs the radio is awake (32 bits number accruing over time)
4905 tANI_U32 onTime;
4906 // msecs the CCA register is busy (32 bits number accruing over time)
4907 tANI_U32 ccaBusyTime;
4908} tSirWifiChannelStats, *tpSirWifiChannelStats;
4909
4910/* radio statistics */
4911typedef PACKED_PRE struct PACKED_POST
4912{
4913 // wifi radio (if multiple radio supported)
4914 tSirWifiRadio radio;
4915 // msecs the radio is awake (32 bits number accruing over time)
4916 tANI_U32 onTime;
4917 /* msecs the radio is transmitting
4918 * (32 bits number accruing over time)
4919 */
4920 tANI_U32 txTime;
4921 /* msecs the radio is in active receive
4922 *(32 bits number accruing over time)
4923 */
4924 tANI_U32 rxTime;
4925 /* msecs the radio is awake due to all scan
4926 * (32 bits number accruing over time)
4927 */
4928 tANI_U32 onTimeScan;
4929 /* msecs the radio is awake due to NAN
4930 * (32 bits number accruing over time)
4931 */
4932 tANI_U32 onTimeNbd;
4933 /* msecs the radio is awake due to Gscan
4934 * (32 bits number accruing over time)
4935 */
4936 tANI_U32 onTimeGscan;
4937 /* msecs the radio is awake due to roam?scan
4938 * (32 bits number accruing over time)
4939 */
4940 tANI_U32 onTimeRoamScan;
4941 /* msecs the radio is awake due to PNO scan
4942 * (32 bits number accruing over time)
4943 */
4944 tANI_U32 onTimePnoScan;
4945 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
4946 * (32 bits number accruing over time)
4947 */
4948 tANI_U32 onTimeHs20;
4949 // number of channels
4950 tANI_U32 numChannels;
4951 // channel statistics tSirWifiChannelStats
4952 tSirWifiChannelStats channels[1];
4953} tSirWifiRadioStat, *tpSirWifiRadioStat;
4954
4955/* per rate statistics */
4956typedef PACKED_PRE struct PACKED_POST
4957{
4958 // rate information
4959 tSirWifiRate rate;
4960 // number of successfully transmitted data pkts (ACK rcvd)
4961 tANI_U32 txMpdu;
4962 // number of received data pkts
4963 tANI_U32 rxMpdu;
4964 // number of data packet losses (no ACK)
4965 tANI_U32 mpduLost;
4966 // total number of data pkt retries *
4967 tANI_U32 retries;
4968 // number of short data pkt retries
4969 tANI_U32 retriesShort;
4970 // number of long data pkt retries
4971 tANI_U32 retriesLong;
4972} tSirWifiRateStat, *tpSirWifiRateStat;
4973
4974/* access categories */
4975typedef PACKED_PRE enum PACKED_POST
4976{
4977 WIFI_AC_VO = 0,
4978 WIFI_AC_VI = 1,
4979 WIFI_AC_BE = 2,
4980 WIFI_AC_BK = 3,
4981 WIFI_AC_MAX = 4,
4982} tSirWifiTrafficAc;
4983
4984/* wifi peer type */
4985typedef PACKED_PRE enum PACKED_POST
4986{
4987 WIFI_PEER_STA,
4988 WIFI_PEER_AP,
4989 WIFI_PEER_P2P_GO,
4990 WIFI_PEER_P2P_CLIENT,
4991 WIFI_PEER_NAN,
4992 WIFI_PEER_TDLS,
4993 WIFI_PEER_INVALID,
4994} tSirWifiPeerType;
4995
4996/* per peer statistics */
4997typedef PACKED_PRE struct PACKED_POST
4998{
4999 // peer type (AP, TDLS, GO etc.)
5000 tSirWifiPeerType type;
5001 // mac address
5002 tSirMacAddr peerMacAddress;
5003 // peer WIFI_CAPABILITY_XXX
5004 tANI_U32 capabilities;
5005 // number of rates
5006 tANI_U32 numRate;
5007 // per rate statistics, number of entries = num_rate
5008 tSirWifiRateStat rateStats[1];
5009} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5010
5011/* per access category statistics */
5012typedef PACKED_PRE struct PACKED_POST
5013{
5014 /*tSirWifiTrafficAc*/
5015 // access category (VI, VO, BE, BK)
5016 tANI_U8 ac;
5017 // number of successfully transmitted unicast data pkts (ACK rcvd)
5018 tANI_U32 txMpdu;
5019 // number of received unicast mpdus
5020 tANI_U32 rxMpdu;
5021 // number of succesfully transmitted multicast data packets
5022 // STA case: implies ACK received from AP for the unicast
5023 // packet in which mcast pkt was sent
5024 tANI_U32 txMcast;
5025 // number of received multicast data packets
5026 tANI_U32 rxMcast;
5027 // number of received unicast a-mpdus
5028 tANI_U32 rxAmpdu;
5029 // number of transmitted unicast a-mpdus
5030 tANI_U32 txAmpdu;
5031 // number of data pkt losses (no ACK)
5032 tANI_U32 mpduLost;
5033 // total number of data pkt retries
5034 tANI_U32 retries;
5035 // number of short data pkt retries
5036 tANI_U32 retriesShort;
5037 // number of long data pkt retries
5038 tANI_U32 retriesLong;
5039 // data pkt min contention time (usecs)
5040 tANI_U32 contentionTimeMin;
5041 // data pkt max contention time (usecs)
5042 tANI_U32 contentionTimeMax;
5043 // data pkt avg contention time (usecs)
5044 tANI_U32 contentionTimeAvg;
5045 // num of data pkts used for contention statistics
5046 tANI_U32 contentionNumSamples;
5047} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5048
5049/* Interface statistics - corresponding to 2nd most
5050 * LSB in wifi statistics bitmap for getting statistics
5051 */
5052typedef PACKED_PRE struct PACKED_POST
5053{
5054 // current state of the interface
5055 tSirWifiInterfaceInfo info;
5056 // access point beacon received count from connected AP
5057 tANI_U32 beaconRx;
5058 // access point mgmt frames received count from
5059 // connected AP (including Beacon)
5060 tANI_U32 mgmtRx;
5061 // action frames received count
5062 tANI_U32 mgmtActionRx;
5063 // action frames transmit count
5064 tANI_U32 mgmtActionTx;
5065 // access Point Beacon and Management frames RSSI (averaged)
5066 tANI_U32 rssiMgmt;
5067 // access Point Data Frames RSSI (averaged) from connected AP
5068 tANI_U32 rssiData;
5069 // access Point ACK RSSI (averaged) from connected AP
5070 tANI_U32 rssiAck;
5071 // per ac data packet statistics
5072 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
5073} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5074
5075/* Peer statistics - corresponding to 3rd most LSB in
5076 * wifi statistics bitmap for getting statistics
5077 */
5078typedef PACKED_PRE struct PACKED_POST
5079{
5080 // number of peers
5081 tANI_U32 numPeers;
5082 // per peer statistics
5083 tSirWifiPeerInfo peerInfo[1];
5084} tSirWifiPeerStat, *tpSirWifiPeerStat;
5085
5086/* wifi statistics bitmap for getting statistics */
5087#define WMI_LINK_STATS_RADIO 0x00000001
5088#define WMI_LINK_STATS_IFACE 0x00000002
5089#define WMI_LINK_STATS_ALL_PEER 0x00000004
5090#define WMI_LINK_STATS_PER_PEER 0x00000008
5091
5092/* wifi statistics bitmap for clearing statistics */
5093// all radio statistics
5094#define WIFI_STATS_RADIO 0x00000001
5095// cca_busy_time (within radio statistics)
5096#define WIFI_STATS_RADIO_CCA 0x00000002
5097// all channel statistics (within radio statistics)
5098#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5099// all scan statistics (within radio statistics)
5100#define WIFI_STATS_RADIO_SCAN 0x00000008
5101// all interface statistics
5102#define WIFI_STATS_IFACE 0x00000010
5103// all tx rate statistics (within interface statistics)
5104#define WIFI_STATS_IFACE_TXRATE 0x00000020
5105// all ac statistics (within interface statistics)
5106#define WIFI_STATS_IFACE_AC 0x00000040
5107// all contention (min, max, avg) statistics (within ac statistics)
5108#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5109
5110typedef PACKED_PRE struct PACKED_POST
5111{
5112 tANI_U32 paramId;
5113 tANI_U8 ifaceId;
5114 tANI_U32 respId;
5115 tANI_U32 moreResultToFollow;
5116 tANI_U8 result[1];
5117} tSirLLStatsResults, *tpSirLLStatsResults;
5118
5119#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5120
Jeff Johnson295189b2012-06-20 16:38:30 -07005121#endif /* __SIR_API_H */