blob: c865ba2c74b5b2b8cd864076a7aac7b2ad8bc1d1 [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
Dino Mycle2c198072014-06-10 10:15:52 +0530138
139#ifdef WLAN_FEATURE_EXTSCAN
140
141#define WLAN_EXTSCAN_MAX_CHANNELS 16
142#define WLAN_EXTSCAN_MAX_BUCKETS 16
143#define WLAN_EXTSCAN_MAX_HOTLIST_APS 128
144#define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
145#define WLAN_EXTSCAN_MAX_RSSI_SAMPLE_SIZE 8
146#endif /* WLAN_FEATURE_EXTSCAN */
147
Jeff Johnson295189b2012-06-20 16:38:30 -0700148enum eSirHostMsgTypes
149{
150 SIR_HAL_APP_SETUP_NTF = SIR_HAL_HOST_MSG_START,
151 SIR_HAL_INITIAL_CAL_FAILED_NTF,
152 SIR_HAL_NIC_OPER_NTF,
153 SIR_HAL_INIT_START_REQ,
154 SIR_HAL_SHUTDOWN_REQ,
155 SIR_HAL_SHUTDOWN_CNF,
156 SIR_HAL_RESET_REQ,
157 SIR_HAL_RADIO_ON_OFF_IND,
158 SIR_HAL_RESET_CNF,
159 SIR_WRITE_TO_TD,
160 SIR_HAL_HDD_ADDBA_REQ, // MAC -> HDD
161 SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
162 SIR_HAL_DELETEBA_IND, // MAC -> HDD
163 SIR_HAL_BA_FAIL_IND, // HDD -> MAC
164 SIR_TL_HAL_FLUSH_AC_REQ,
165 SIR_HAL_TL_FLUSH_AC_RSP
166};
167
168
169
170/**
171 * Module ID definitions.
172 */
173enum {
174 SIR_BOOT_MODULE_ID = 1,
175 SIR_HAL_MODULE_ID = 0x10,
Leela Venkata Kiran Kumar Reddy Chirala45f184c2014-02-14 15:08:21 -0800176 SIR_CFG_MODULE_ID = 0x12,
Jeff Johnson295189b2012-06-20 16:38:30 -0700177 SIR_LIM_MODULE_ID,
178 SIR_ARQ_MODULE_ID,
179 SIR_SCH_MODULE_ID,
180 SIR_PMM_MODULE_ID,
181 SIR_MNT_MODULE_ID,
182 SIR_DBG_MODULE_ID,
183 SIR_DPH_MODULE_ID,
184 SIR_SYS_MODULE_ID,
185 SIR_SMS_MODULE_ID,
186
187 SIR_PHY_MODULE_ID = 0x20,
188
189
190 // Add any modules above this line
191 SIR_DVT_MODULE_ID
192};
193
194#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
195
196/**
197 * First and last module definition for logging utility
198 *
199 * NOTE: The following definitions need to be updated if
200 * the above list is changed.
201 */
202#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
203#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
204
205
206// Type declarations used by Firmware and Host software
207
208// Scan type enum used in scan request
209typedef enum eSirScanType
210{
211 eSIR_PASSIVE_SCAN,
212 eSIR_ACTIVE_SCAN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800213 eSIR_BEACON_TABLE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700214} tSirScanType;
215
Jeff Johnson295189b2012-06-20 16:38:30 -0700216typedef enum eSirResultCodes
217{
218 eSIR_SME_SUCCESS,
219
220 eSIR_EOF_SOF_EXCEPTION,
221 eSIR_BMU_EXCEPTION,
222 eSIR_LOW_PDU_EXCEPTION,
223 eSIR_USER_TRIG_RESET,
224 eSIR_LOGP_EXCEPTION,
225 eSIR_CP_EXCEPTION,
226 eSIR_STOP_BSS,
227 eSIR_AHB_HANG_EXCEPTION,
228 eSIR_DPU_EXCEPTION,
229 eSIR_RPE_EXCEPTION,
230 eSIR_TPE_EXCEPTION,
231 eSIR_DXE_EXCEPTION,
232 eSIR_RXP_EXCEPTION,
233 eSIR_MCPU_EXCEPTION,
234 eSIR_MCU_EXCEPTION,
235 eSIR_MTU_EXCEPTION,
236 eSIR_MIF_EXCEPTION,
237 eSIR_FW_EXCEPTION,
238 eSIR_PS_MUTEX_READ_EXCEPTION,
239 eSIR_PHY_HANG_EXCEPTION,
240 eSIR_MAILBOX_SANITY_CHK_FAILED,
241 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
242 eSIR_CFB_FLAG_STUCK_EXCEPTION,
243
244 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
245
246 eSIR_SME_INVALID_PARAMETERS=500,
247 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
248 eSIR_SME_RESOURCES_UNAVAILABLE,
249 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
250 // matching requested scan criteria
251 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
252 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
253 eSIR_SME_REFUSED,
c_hpothua9dc89c2014-03-22 19:22:31 +0530254 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700255 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
256 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
257 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
258 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
259 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
260 eSIR_SME_AUTH_REFUSED,
261 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
262 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
263 eSIR_SME_ASSOC_REFUSED,
264 eSIR_SME_REASSOC_REFUSED,
265 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
266 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
267 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
268 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
269 eSIR_SME_STA_NOT_AUTHENTICATED,
270 eSIR_SME_STA_NOT_ASSOCIATED,
271 eSIR_SME_STA_DISASSOCIATED,
272 eSIR_SME_ALREADY_JOINED_A_BSS,
273 eSIR_ULA_COMPLETED,
274 eSIR_ULA_FAILURE,
275 eSIR_SME_LINK_ESTABLISHED,
276 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
277 eSIR_SME_UNABLE_TO_PERFORM_DFS,
278 eSIR_SME_DFS_FAILED,
279 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
280 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
281 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
282 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
283 // support requested rate in
284 // LINK_TEST_REQ
285 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
286 // not respond before next test packet
287 // is sent
288 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
289 // of link test
290 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
291 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
292 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
293 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
294 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
295 // unable to plumb down keys
296 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
297
298 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
299 // that more SME_SCAN_RSP
300 // messages are following.
301 // SME_SCAN_RSP message with
302 // eSIR_SME_SUCCESS status
303 // code is the last one.
304 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
305 // messages upon receiving
306 // invalid Re/Assoc Rsp frame.
307 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
308 // with MIC_FAILURE reason code and perform the stop bss operation
309 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
310 // timeout interval
311 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
312 eSIR_SME_RECEIVED,
313 // TBA - TSPEC related Result Codes
314
315 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
316 eSIR_SME_INVALID_STA_ROLE,
317 eSIR_SME_INVALID_STATE,
318#ifdef GEN4_SCAN
319 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
320 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
321 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
322 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
323 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
324 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
325#else // GEN4_SCAN
326 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
327 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
328#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700329#ifdef FEATURE_OEM_DATA_SUPPORT
330 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
331#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700332 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
333 eSIR_SME_STA_ASSOCIATED,
334 eSIR_SME_INVALID_PMM_STATE,
335 eSIR_SME_CANNOT_ENTER_IMPS,
336 eSIR_SME_IMPS_REQ_FAILED,
337 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700338 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700339 eSIR_SME_UAPSD_REQ_FAILED,
340 eSIR_SME_WOWL_ENTER_REQ_FAILED,
341 eSIR_SME_WOWL_EXIT_REQ_FAILED,
342#if defined WLAN_FEATURE_VOWIFI_11R
343 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
344 eSIR_SME_FT_REASSOC_FAILURE,
345#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700346 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700347#ifdef WLAN_FEATURE_PACKET_FILTERING
348 eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
349#endif // WLAN_FEATURE_PACKET_FILTERING
350
351#ifdef WLAN_FEATURE_GTK_OFFLOAD
352 eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
353#endif // WLAN_FEATURE_GTK_OFFLOAD
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800354 eSIR_SME_DEAUTH_STATUS,
Jeff Johnson295189b2012-06-20 16:38:30 -0700355 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
356} tSirResultCodes;
357
Jeff Johnson295189b2012-06-20 16:38:30 -0700358/* each station added has a rate mode which specifies the sta attributes */
359typedef enum eStaRateMode {
360 eSTA_TAURUS = 0,
361 eSTA_TITAN,
362 eSTA_POLARIS,
363 eSTA_11b,
364 eSTA_11bg,
365 eSTA_11a,
366 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700367#ifdef WLAN_FEATURE_11AC
368 eSTA_11ac,
369#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700370 eSTA_INVALID_RATE_MODE
371} tStaRateMode, *tpStaRateMode;
372
373//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
374//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
375#define IERATE_BASICRATE_MASK 0x80
376#define IERATE_RATE_MASK 0x7f
377#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
378#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
379
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530380const char * lim_BssTypetoString(const v_U8_t bssType);
381const char * lim_ScanTypetoString(const v_U8_t scanType);
382const char * lim_BackgroundScanModetoString(const v_U8_t mode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700383typedef struct sSirSupportedRates {
384 /*
385 * For Self STA Entry: this represents Self Mode.
386 * For Peer Stations, this represents the mode of the peer.
387 * On Station:
388 * --this mode is updated when PE adds the Self Entry.
389 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
390 * ON AP:
391 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
392 * to indicate the self mode of the AP.
393 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
394 */
395
396 tStaRateMode opRateMode;
397 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
398 tANI_U16 llbRates[SIR_NUM_11B_RATES];
399 tANI_U16 llaRates[SIR_NUM_11A_RATES];
400 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
401
402 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
403 //First 26 bits are reserved for those Titan rates and
404 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
405 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
406
407 /*
408 * 0-76 bits used, remaining reserved
409 * bits 0-15 and 32 should be set.
410 */
411 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
412
413 /*
414 * RX Highest Supported Data Rate defines the highest data
415 * rate that the STA is able to receive, in unites of 1Mbps.
416 * This value is derived from "Supported MCS Set field" inside
417 * the HT capability element.
418 */
419 tANI_U16 rxHighestDataRate;
420
Jeff Johnsone7245742012-09-05 17:12:55 -0700421#ifdef WLAN_FEATURE_11AC
422 /*Indicates the Maximum MCS that can be received for each number
423 of spacial streams */
424 tANI_U16 vhtRxMCSMap;
425 /*Indicate the highest VHT data rate that the STA is able to receive*/
426 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700427 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700428 of spacial streams */
429 tANI_U16 vhtTxMCSMap;
430 /*Indicate the highest VHT data rate that the STA is able to transmit*/
431 tANI_U16 vhtTxHighestDataRate;
432#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700433} tSirSupportedRates, *tpSirSupportedRates;
434
435
436typedef enum eSirRFBand
437{
438 SIR_BAND_UNKNOWN,
439 SIR_BAND_2_4_GHZ,
440 SIR_BAND_5_GHZ,
441} tSirRFBand;
442
443
444/*
445* Specifies which beacons are to be indicated upto the host driver when
446* Station is in power save mode.
447*/
448typedef enum eBeaconForwarding
449{
450 ePM_BEACON_FWD_NTH,
451 ePM_BEACON_FWD_TIM,
452 ePM_BEACON_FWD_DTIM,
453 ePM_BEACON_FWD_NONE
454} tBeaconForwarding;
455
456
Jeff Johnson295189b2012-06-20 16:38:30 -0700457typedef struct sSirRemainOnChnReq
458{
459 tANI_U16 messageType;
460 tANI_U16 length;
461 tANI_U8 sessionId;
462 tSirMacAddr selfMacAddr;
463 tANI_U8 chnNum;
464 tANI_U8 phyMode;
465 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530466 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700467 tANI_U8 probeRspIe[1];
468}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
469
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530470/* Structure for vendor specific IE of debug marker frame
471 to debug remain on channel issues */
472typedef struct publicVendorSpecific
473{
474 tANI_U8 category;
475 tANI_U8 elementid;
476 tANI_U8 length;
477} publicVendorSpecific;
478
Jeff Johnson295189b2012-06-20 16:38:30 -0700479typedef struct sSirRegisterMgmtFrame
480{
481 tANI_U16 messageType;
482 tANI_U16 length;
483 tANI_U8 sessionId;
484 tANI_BOOLEAN registerFrame;
485 tANI_U16 frameType;
486 tANI_U16 matchLen;
487 tANI_U8 matchData[1];
488}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700489
490//
Jeff Johnson295189b2012-06-20 16:38:30 -0700491// Identifies the neighbor BSS' that was(were) detected
492// by an STA and reported to the AP
493//
494typedef struct sAniTitanCBNeighborInfo
495{
496 // A BSS was found on the Primary
497 tANI_U8 cbBssFoundPri;
498
499 // A BSS was found on the adjacent Upper Secondary
500 tANI_U8 cbBssFoundSecUp;
501
502 // A BSS was found on the adjacent Lower Secondary
503 tANI_U8 cbBssFoundSecDown;
504
505} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
506
Jeff Johnson295189b2012-06-20 16:38:30 -0700507/// Generic type for sending a response message
508/// with result code to host software
509typedef struct sSirSmeRsp
510{
511 tANI_U16 messageType; // eWNI_SME_*_RSP
512 tANI_U16 length;
513 tANI_U8 sessionId; // To support BT-AMP
514 tANI_U16 transactionId; // To support BT-AMP
515 tSirResultCodes statusCode;
516} tSirSmeRsp, *tpSirSmeRsp;
517
518/// Definition for kick starting Firmware on STA
519typedef struct sSirSmeStartReq
520{
521 tANI_U16 messageType; // eWNI_SME_START_REQ
522 tANI_U16 length;
523 tANI_U8 sessionId; //Added for BT-AMP Support
524 tANI_U16 transcationId; //Added for BT-AMP Support
525 tSirMacAddr bssId; //Added For BT-AMP Support
526 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700527 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700528} tSirSmeStartReq, *tpSirSmeStartReq;
529
530/// Definition for indicating all modules ready on STA
531typedef struct sSirSmeReadyReq
532{
533 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
534 tANI_U16 length;
535 tANI_U16 transactionId;
536} tSirSmeReadyReq, *tpSirSmeReadyReq;
537
538/// Definition for response message to previously issued start request
539typedef struct sSirSmeStartRsp
540{
541 tANI_U16 messageType; // eWNI_SME_START_RSP
542 tANI_U16 length;
543 tSirResultCodes statusCode;
544 tANI_U16 transactionId;
545} tSirSmeStartRsp, *tpSirSmeStartRsp;
546
Jeff Johnson295189b2012-06-20 16:38:30 -0700547
548/// Definition for Load structure
549typedef struct sSirLoad
550{
551 tANI_U16 numStas;
552 tANI_U16 channelUtilization;
553} tSirLoad, *tpSirLoad;
554
555/// BSS type enum used in while scanning/joining etc
556typedef enum eSirBssType
557{
558 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700559 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700560 eSIR_IBSS_MODE,
561 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
562 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
563 eSIR_AUTO_MODE,
564 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
565} tSirBssType;
566
567/// Definition for WDS Information
568typedef struct sSirWdsInfo
569{
570 tANI_U16 wdsLength;
571 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
572} tSirWdsInfo, *tpSirWdsInfo;
573
574/// Power Capability info used in 11H
575typedef struct sSirMacPowerCapInfo
576{
577 tANI_U8 minTxPower;
578 tANI_U8 maxTxPower;
579} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
580
581/// Supported Channel info used in 11H
582typedef struct sSirSupChnl
583{
584 tANI_U8 numChnl;
585 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
586} tSirSupChnl, *tpSirSupChnl;
587
588typedef enum eSirNwType
589{
590 eSIR_11A_NW_TYPE,
591 eSIR_11B_NW_TYPE,
592 eSIR_11G_NW_TYPE,
593 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700594#ifdef WLAN_FEATURE_11AC
595 eSIR_11AC_NW_TYPE,
596#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700597 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
598} tSirNwType;
599
600/// Definition for new iBss peer info
601typedef struct sSirNewIbssPeerInfo
602{
603 tSirMacAddr peerAddr;
604 tANI_U16 aid;
605} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
606
607/// Definition for Alternate BSS info
608typedef struct sSirAlternateRadioInfo
609{
610 tSirMacAddr bssId;
611 tANI_U8 channelId;
612} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
613
614/// Definition for Alternate BSS list
615typedef struct sSirAlternateRadioList
616{
617 tANI_U8 numBss;
618 tSirAlternateRadioInfo alternateRadio[1];
619} tSirAlternateRadioList, *tpSirAlternateRadioList;
620
621/// Definition for kick starting BSS
622/// ---> MAC
623/**
624 * Usage of ssId, numSSID & ssIdList:
625 * ---------------------------------
626 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
627 * feature is enabled.
628 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
629 * and interpret the SSID list from numSSID & ssIdList.
630 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
631 * specified in the ssId field and it is expected that
632 * application will set numSSID to one (only one SSID present
633 * in the list) and SSID in the list is same as ssId field.
634 * 4. Application will always set numSSID >= 1.
635 */
636//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
637typedef struct sSirSmeStartBssReq
638{
639 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
640 tANI_U16 length;
641 tANI_U8 sessionId; //Added for BT-AMP Support
642 tANI_U16 transactionId; //Added for BT-AMP Support
643 tSirMacAddr bssId; //Added for BT-AMP Support
644 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
645 tANI_U16 beaconInterval; //Added for BT-AMP Support
646 tANI_U8 dot11mode;
647 tSirBssType bssType;
648 tSirMacSSid ssId;
649 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700650 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700651
Jeff Johnson295189b2012-06-20 16:38:30 -0700652 tANI_U8 privacy;
653 tANI_U8 apUapsdEnable;
654 tANI_U8 ssidHidden;
655 tANI_BOOLEAN fwdWPSPBCProbeReq;
656 tANI_BOOLEAN protEnabled;
657 tANI_BOOLEAN obssProtEnabled;
658 tANI_U16 ht_capab;
659 tAniAuthType authType;
660 tANI_U32 dtimPeriod;
661 tANI_U8 wps_state;
krunal sonie9002db2013-11-25 14:24:17 -0800662 tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob
Jeff Johnson295189b2012-06-20 16:38:30 -0700663 tVOS_CON_MODE bssPersona;
664
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800665 tANI_U8 txLdpcIniFeatureEnabled;
666
Jeff Johnson295189b2012-06-20 16:38:30 -0700667 tSirRSNie rsnIE; // RSN IE to be sent in
668 // Beacon and Probe
669 // Response frames
670 tSirNwType nwType; // Indicates 11a/b/g
671 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
672 tSirMacRateSet extendedRateSet; // Has 11g rates
673
Chet Lanctot8cecea22014-02-11 19:09:36 -0800674#ifdef WLAN_FEATURE_11W
675 tANI_BOOLEAN pmfCapable;
676 tANI_BOOLEAN pmfRequired;
677#endif
678
Jeff Johnson295189b2012-06-20 16:38:30 -0700679} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
680
681#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
krunal soni2a6a9062014-02-11 14:14:23 -0800682 ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700683
684#define WSCIE_PROBE_RSP_LEN (317 + 2)
685
686typedef struct sSirBssDescription
687{
688 //offset of the ieFields from bssId.
689 tANI_U16 length;
690 tSirMacAddr bssId;
691 v_TIME_t scanSysTimeMsec;
692 tANI_U32 timeStamp[2];
693 tANI_U16 beaconInterval;
694 tANI_U16 capabilityInfo;
695 tSirNwType nwType; // Indicates 11a/b/g
696 tANI_U8 aniIndicator;
697 tANI_S8 rssi;
698 tANI_S8 sinr;
699 //channelId what peer sent in beacon/probersp.
700 tANI_U8 channelId;
701 //channelId on which we are parked at.
702 //used only in scan case.
703 tANI_U8 channelIdSelf;
704 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700705 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
706#if defined WLAN_FEATURE_VOWIFI
707 tANI_U32 parentTSF;
708 tANI_U32 startTSF[2];
709#endif
710#ifdef WLAN_FEATURE_VOWIFI_11R
711 tANI_U8 mdiePresent;
712 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
713#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800714#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700715 tANI_U16 QBSSLoad_present;
716 tANI_U16 QBSSLoad_avail;
717#endif
718 // Please keep the structure 4 bytes aligned above the ieFields
719
720 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700721 tANI_U8 reservedPadding1;
722 tANI_U8 reservedPadding2;
723 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700724 tANI_U32 WscIeLen;
725 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700726 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800727
Jeff Johnson295189b2012-06-20 16:38:30 -0700728 tANI_U32 ieFields[1];
729} tSirBssDescription, *tpSirBssDescription;
730
731/// Definition for response message to previously
732/// issued start BSS request
733/// MAC --->
734typedef struct sSirSmeStartBssRsp
735{
736 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
737 tANI_U16 length;
738 tANI_U8 sessionId;
739 tANI_U16 transactionId;//transaction ID for cmd
740 tSirResultCodes statusCode;
741 tSirBssType bssType;//Add new type for WDS mode
742 tANI_U16 beaconInterval;//Beacon Interval for both type
743 tANI_U32 staId;//Staion ID for Self
744 tSirBssDescription bssDescription;//Peer BSS description
745} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
746
Jeff Johnson295189b2012-06-20 16:38:30 -0700747
748typedef struct sSirChannelList
749{
750 tANI_U8 numChannels;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800751 tANI_U8 channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700752} tSirChannelList, *tpSirChannelList;
753
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530754typedef struct sSirDFSChannelList
755{
756 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
757
758} tSirDFSChannelList, *tpSirDFSChannelList;
759
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800760#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700761typedef struct sTspecInfo {
762 tANI_U8 valid;
763 tSirMacTspecIE tspec;
764} tTspecInfo;
765
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800766#define SIR_ESE_MAX_TSPEC_IES 4
767typedef struct sESETspecTspecInfo {
Jeff Johnson295189b2012-06-20 16:38:30 -0700768 tANI_U8 numTspecs;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800769 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
770} tESETspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700771#endif
772
Jeff Johnson295189b2012-06-20 16:38:30 -0700773
774/// Definition for Radar Info
775typedef struct sSirRadarInfo
776{
777 tANI_U8 channelNumber;
778 tANI_U16 radarPulseWidth; // in usecond
779 tANI_U16 numRadarPulse;
780} tSirRadarInfo, *tpSirRadarInfo;
781
782#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
783
784/// Two Background Scan mode
785typedef enum eSirBackgroundScanMode
786{
787 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700788 eSIR_NORMAL_BACKGROUND_SCAN = 1,
789 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700790} tSirBackgroundScanMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700791typedef enum eSirLinkTrafficCheck
792{
793 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700794 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
795 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700796} tSirLinkTrafficCheck;
797
798#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
799#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
800#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
801#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700802#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
803#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700804
805/// Definition for scan request
806typedef struct sSirSmeScanReq
807{
808 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
809 tANI_U16 length;
810 tANI_U8 sessionId; // Session ID
811 tANI_U16 transactionId; // Transaction ID for cmd
812 tSirMacAddr bssId;
813 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
814 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
815 tSirBssType bssType;
816 tANI_U8 dot11mode;
817 tSirScanType scanType;
818 /**
819 * minChannelTime. Not used if scanType is passive.
820 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
821 * 11k measurements set this to zero to user only single duration for scan.
822 * <valid timeout> - Timeout value used for min channel timeout.
823 */
824 tANI_U32 minChannelTime;
825 /**
826 * maxChannelTime.
827 * 0x0 - Invalid. In case of active scan.
828 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
829 *
830 */
831 tANI_U32 maxChannelTime;
832 /**
833 * returnAfterFirstMatch can take following values:
834 * 0x00 - Return SCAN_RSP message after complete channel scan
835 * 0x01 - Return SCAN_RSP message after collecting BSS description
836 * that matches scan criteria.
837 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
838 * 5 GHz band channels
839 * 0x80 - Return after collecting first 11d IE from 5 GHz band
840 * channels
841 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
842 * band channels
843 *
844 * Values of 0xC0, 0x80 & 0x40 are to be used by
845 * Roaming/application when 11d is enabled.
846 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800847 tANI_U32 minChannelTimeBtc; //in units of milliseconds
848 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700849 tANI_U8 returnAfterFirstMatch;
850
851 /**
852 * returnUniqueResults can take following values:
853 * 0 - Collect & report all received BSS descriptions from same BSS.
854 * 1 - Collect & report unique BSS description from same BSS.
855 */
856 tANI_U8 returnUniqueResults;
857
858 /**
859 * returnFreshResults can take following values:
860 * 0x00 - Return background scan results.
861 * 0x80 - Return & purge background scan results
862 * 0x01 - Trigger fresh scan instead of returning background scan
863 * results.
864 * 0x81 - Trigger fresh scan instead of returning background scan
865 * results and purge background scan results.
866 */
867 tANI_U8 returnFreshResults;
868
869 /* backgroundScanMode can take following values:
870 * 0x0 - agressive scan
871 * 0x1 - normal scan where HAL will check for link traffic
872 * prior to proceeding with the scan
873 */
874 tSirBackgroundScanMode backgroundScanMode;
875
876 tANI_U8 hiddenSsid;
877
878 /* Number of SSIDs to scan */
879 tANI_U8 numSsid;
880
881 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
882 /* This MUST be the last field of the structure */
883
884
Jeff Johnson295189b2012-06-20 16:38:30 -0700885 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700886 tANI_U16 uIEFieldLen;
887 tANI_U16 uIEFieldOffset;
888
889 //channelList MUST be the last field of this structure
890 tSirChannelList channelList;
891 /*-----------------------------
892 tSirSmeScanReq....
893 -----------------------------
894 uIEFiledLen
895 -----------------------------
896 uIEFiledOffset ----+
897 ----------------------------- |
898 channelList.numChannels |
899 ----------------------------- |
900 ... variable size up to |
901 channelNumber[numChannels-1] |
902 This can be zero, if |
903 numChannel is zero. |
904 ----------------------------- <--+
905 ... variable size uIEFiled
906 up to uIEFieldLen (can be 0)
907 -----------------------------*/
908} tSirSmeScanReq, *tpSirSmeScanReq;
909
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530910typedef struct sSirSmeScanAbortReq
911{
912 tANI_U16 type;
913 tANI_U16 msgLen;
914 tANI_U8 sessionId;
915} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
916
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530917typedef struct sSirSmeScanChanReq
918{
919 tANI_U16 type;
920 tANI_U16 msgLen;
921 tANI_U8 sessionId;
922 tANI_U16 transcationId;
923} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
924
Jeff Johnsone7245742012-09-05 17:12:55 -0700925#ifdef FEATURE_OEM_DATA_SUPPORT
926
927#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800928#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700929#endif
930#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800931#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700932#endif
933
934typedef struct sSirOemDataReq
935{
936 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
Siddharth Bhal88aa5322014-06-19 14:27:15 +0530937 tANI_U16 messageLen;
Jeff Johnsone7245742012-09-05 17:12:55 -0700938 tSirMacAddr selfMacAddr;
939 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
940} tSirOemDataReq, *tpSirOemDataReq;
941
942typedef struct sSirOemDataRsp
943{
944 tANI_U16 messageType;
945 tANI_U16 length;
946 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
947} tSirOemDataRsp, *tpSirOemDataRsp;
948
949#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700950
951/// Definition for response message to previously issued scan request
952typedef struct sSirSmeScanRsp
953{
954 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
955 tANI_U16 length;
956 tANI_U8 sessionId;
957 tSirResultCodes statusCode;
958 tANI_U16 transcationId;
959 tSirBssDescription bssDescription[1];
960} tSirSmeScanRsp, *tpSirSmeScanRsp;
961
962/// Sme Req message to set the Background Scan mode
963typedef struct sSirSmeBackgroundScanModeReq
964{
965 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
966 tANI_U16 length;
967 tSirBackgroundScanMode mode;
968} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
969
970/// Background Scan Statisics
971typedef struct sSirBackgroundScanInfo {
972 tANI_U32 numOfScanSuccess;
973 tANI_U32 numOfScanFailure;
974 tANI_U32 reserved;
975} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
976
977#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
978
979/// Definition for Authentication request
980typedef struct sSirSmeAuthReq
981{
982 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
983 tANI_U16 length;
984 tANI_U8 sessionId; // Session ID
985 tANI_U16 transactionId; // Transaction ID for cmd
986 tSirMacAddr bssId; // Self BSSID
987 tSirMacAddr peerMacAddr;
988 tAniAuthType authType;
989 tANI_U8 channelNumber;
990} tSirSmeAuthReq, *tpSirSmeAuthReq;
991
992/// Definition for reponse message to previously issued Auth request
993typedef struct sSirSmeAuthRsp
994{
995 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
996 tANI_U16 length;
997 tANI_U8 sessionId; // Session ID
998 tANI_U16 transactionId; // Transaction ID for cmd
999 tSirMacAddr peerMacAddr;
1000 tAniAuthType authType;
1001 tSirResultCodes statusCode;
1002 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
1003 //Otherwise it holds status code.
1004} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
1005
Jeff Johnson295189b2012-06-20 16:38:30 -07001006
Jeff Johnson295189b2012-06-20 16:38:30 -07001007
Jeff Johnson295189b2012-06-20 16:38:30 -07001008/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
1009typedef struct sJoinReassocInfo
1010{
1011 tAniTitanCBNeighborInfo cbNeighbors;
1012 tAniBool spectrumMgtIndicator;
1013 tSirMacPowerCapInfo powerCap;
1014 tSirSupChnl supportedChannels;
1015} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001016
1017/// Definition for join request
1018/// ---> MAC
1019/// WARNING! If you add a field in JOIN REQ.
1020/// Make sure to add it in REASSOC REQ
1021/// The Serdes function is the same and its
1022/// shared with REASSOC. So if we add a field
1023// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1024typedef struct sSirSmeJoinReq
1025{
1026 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1027 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001028 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001029 tANI_U16 transactionId;
1030 tSirMacSSid ssId;
1031 tSirMacAddr selfMacAddr; // self Mac address
1032 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1033 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001034 tVOS_CON_MODE staPersona; //Persona
1035 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001036
1037 /*This contains the UAPSD Flag for all 4 AC
1038 * B0: AC_VO UAPSD FLAG
1039 * B1: AC_VI UAPSD FLAG
1040 * B2: AC_BK UAPSD FLAG
1041 * B3: AC_BE UASPD FLAG
1042 */
1043 tANI_U8 uapsdPerAcBitmask;
1044
Jeff Johnson295189b2012-06-20 16:38:30 -07001045 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1046 tSirMacRateSet extendedRateSet; // Has 11g rates
1047 tSirRSNie rsnIE; // RSN IE to be sent in
1048 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001049#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001050 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1051 // the same. The join will never carry cckm, but will be set to
1052 // 0.
1053#endif
1054
1055 tSirAddie addIEScan; // Additional IE to be sent in
1056 // (unicast) Probe Request at the time of join
1057
1058 tSirAddie addIEAssoc; // Additional IE to be sent in
1059 // (Re) Association Request
1060
1061 tAniEdType UCEncryptionType;
1062
1063 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001064
1065#ifdef WLAN_FEATURE_11W
1066 tAniEdType MgmtEncryptionType;
1067#endif
1068
Jeff Johnson295189b2012-06-20 16:38:30 -07001069#ifdef WLAN_FEATURE_VOWIFI_11R
1070 tAniBool is11Rconnection;
1071#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001072#ifdef FEATURE_WLAN_ESE
1073 tAniBool isESEFeatureIniEnabled;
1074 tAniBool isESEconnection;
1075 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001076#endif
1077
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001078#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001079 tAniBool isFastTransitionEnabled;
1080#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001081#ifdef FEATURE_WLAN_LFR
1082 tAniBool isFastRoamIniFeatureEnabled;
1083#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001084
1085 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001086#ifdef WLAN_FEATURE_11AC
1087 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001088 tANI_U8 txBFCsnValue;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301089 tANI_U8 txMuBformee;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001090#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001091 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301092 tAniBool isWMEenabled;
1093 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001094 tAniTitanCBNeighborInfo cbNeighbors;
1095 tAniBool spectrumMgtIndicator;
1096 tSirMacPowerCapInfo powerCap;
1097 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001098 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001099
1100} tSirSmeJoinReq, *tpSirSmeJoinReq;
1101
1102/// Definition for reponse message to previously issued join request
1103/// MAC --->
1104typedef struct sSirSmeJoinRsp
1105{
1106 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1107 tANI_U16 length;
1108 tANI_U8 sessionId; // Session ID
1109 tANI_U16 transactionId; // Transaction ID for cmd
1110 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001111 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001112 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1113 //Otherwise it holds status code.
1114 tANI_U16 aid;
1115 tANI_U32 beaconLength;
1116 tANI_U32 assocReqLength;
1117 tANI_U32 assocRspLength;
1118#ifdef WLAN_FEATURE_VOWIFI_11R
1119 tANI_U32 parsedRicRspLen;
1120#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001121#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001122 tANI_U32 tspecIeLen;
1123#endif
1124 tANI_U32 staId;//Station ID for peer
1125
1126 /*The DPU signatures will be sent eventually to TL to help it determine the
1127 association to which a packet belongs to*/
1128 /*Unicast DPU signature*/
1129 tANI_U8 ucastSig;
1130
1131 /*Broadcast DPU signature*/
1132 tANI_U8 bcastSig;
1133
c_hpothu44ff4e02014-05-08 00:13:57 +05301134 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1135 tANI_U32 maxRateFlags;
1136
Jeff Johnson295189b2012-06-20 16:38:30 -07001137 tANI_U8 frames[ 1 ];
1138} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1139
1140/// Definition for Authentication indication from peer
1141typedef struct sSirSmeAuthInd
1142{
1143 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1144 tANI_U16 length;
1145 tANI_U8 sessionId;
1146 tSirMacAddr bssId; // Self BSSID
1147 tSirMacAddr peerMacAddr;
1148 tAniAuthType authType;
1149} tSirSmeAuthInd, *tpSirSmeAuthInd;
1150
1151/// probereq from peer, when wsc is enabled
1152typedef struct sSirSmeProbereq
1153{
1154 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1155 tANI_U16 length;
1156 tANI_U8 sessionId;
1157 tSirMacAddr peerMacAddr;
1158 tANI_U16 devicePasswdId;
1159} tSirSmeProbeReq, *tpSirSmeProbeReq;
1160
1161/// Definition for Association indication from peer
1162/// MAC --->
1163typedef struct sSirSmeAssocInd
1164{
1165 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1166 tANI_U16 length;
1167 tANI_U8 sessionId;
1168 tSirMacAddr peerMacAddr;
1169 tANI_U16 aid;
1170 tSirMacAddr bssId; // Self BSSID
1171 tANI_U16 staId; // Station ID for peer
1172 tANI_U8 uniSig; // DPU signature for unicast packets
1173 tANI_U8 bcastSig; // DPU signature for broadcast packets
1174 tAniAuthType authType;
1175 tAniSSID ssId; // SSID used by STA to associate
1176 tSirRSNie rsnIE;// RSN IE received from peer
1177 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1178
Jeff Johnson295189b2012-06-20 16:38:30 -07001179 // powerCap & supportedChannels are present only when
1180 // spectrumMgtIndicator flag is set
1181 tAniBool spectrumMgtIndicator;
1182 tSirMacPowerCapInfo powerCap;
1183 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001184 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1185 tAniBool reassocReq;
1186 // Required for indicating the frames to upper layer
1187 tANI_U32 beaconLength;
1188 tANI_U8* beaconPtr;
1189 tANI_U32 assocReqLength;
1190 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001191} tSirSmeAssocInd, *tpSirSmeAssocInd;
1192
1193
1194/// Definition for Association confirm
1195/// ---> MAC
1196typedef struct sSirSmeAssocCnf
1197{
1198 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1199 tANI_U16 length;
1200 tSirResultCodes statusCode;
1201 tSirMacAddr bssId; // Self BSSID
1202 tSirMacAddr peerMacAddr;
1203 tANI_U16 aid;
1204 tSirMacAddr alternateBssId;
1205 tANI_U8 alternateChannelId;
1206} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1207
Jeff Johnson295189b2012-06-20 16:38:30 -07001208/// Definition for Reassociation indication from peer
1209typedef struct sSirSmeReassocInd
1210{
1211 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1212 tANI_U16 length;
1213 tANI_U8 sessionId; // Session ID
1214 tSirMacAddr peerMacAddr;
1215 tSirMacAddr oldMacAddr;
1216 tANI_U16 aid;
1217 tSirMacAddr bssId; // Self BSSID
1218 tANI_U16 staId; // Station ID for peer
1219 tAniAuthType authType;
1220 tAniSSID ssId; // SSID used by STA to reassociate
1221 tSirRSNie rsnIE; // RSN IE received from peer
1222
1223 tSirAddie addIE; // Additional IE received from peer
1224
Jeff Johnson295189b2012-06-20 16:38:30 -07001225 // powerCap & supportedChannels are present only when
1226 // spectrumMgtIndicator flag is set
1227 tAniBool spectrumMgtIndicator;
1228 tSirMacPowerCapInfo powerCap;
1229 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001230 // Required for indicating the frames to upper layer
1231 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1232 tANI_U32 beaconLength;
1233 tANI_U8* beaconPtr;
1234 tANI_U32 assocReqLength;
1235 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001236} tSirSmeReassocInd, *tpSirSmeReassocInd;
1237
1238/// Definition for Reassociation confirm
1239/// ---> MAC
1240typedef struct sSirSmeReassocCnf
1241{
1242 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1243 tANI_U16 length;
1244 tSirResultCodes statusCode;
1245 tSirMacAddr bssId; // Self BSSID
1246 tSirMacAddr peerMacAddr;
1247 tANI_U16 aid;
1248 tSirMacAddr alternateBssId;
1249 tANI_U8 alternateChannelId;
1250} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1251
Jeff Johnson295189b2012-06-20 16:38:30 -07001252
1253/// Enum definition for Wireless medium status change codes
1254typedef enum eSirSmeStatusChangeCode
1255{
1256 eSIR_SME_DEAUTH_FROM_PEER,
1257 eSIR_SME_DISASSOC_FROM_PEER,
1258 eSIR_SME_LOST_LINK_WITH_PEER,
1259 eSIR_SME_CHANNEL_SWITCH,
1260 eSIR_SME_JOINED_NEW_BSS,
1261 eSIR_SME_LEAVING_BSS,
1262 eSIR_SME_IBSS_ACTIVE,
1263 eSIR_SME_IBSS_INACTIVE,
1264 eSIR_SME_IBSS_PEER_DEPARTED,
1265 eSIR_SME_RADAR_DETECTED,
1266 eSIR_SME_IBSS_NEW_PEER,
1267 eSIR_SME_AP_CAPS_CHANGED,
1268 eSIR_SME_BACKGROUND_SCAN_FAIL,
1269 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1270 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1271} tSirSmeStatusChangeCode;
1272
1273typedef struct sSirSmeNewBssInfo
1274{
1275 tSirMacAddr bssId;
1276 tANI_U8 channelNumber;
1277 tANI_U8 reserved;
1278 tSirMacSSid ssId;
1279} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1280
1281typedef struct sSirSmeApNewCaps
1282{
1283 tANI_U16 capabilityInfo;
1284 tSirMacAddr bssId;
1285 tANI_U8 channelId;
1286 tANI_U8 reserved[3];
1287 tSirMacSSid ssId;
1288} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1289
1290/**
1291 * Table below indicates what information is passed for each of
1292 * the Wireless Media status change notifications:
1293 *
1294 * Status Change code Status change info
1295 * ----------------------------------------------------------------------
1296 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1297 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1298 * eSIR_SME_LOST_LINK_WITH_PEER None
1299 * eSIR_SME_CHANNEL_SWITCH New channel number
1300 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1301 * eSIR_SME_LEAVING_BSS None
1302 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1303 * IBSS apart from this STA that
1304 * started IBSS
1305 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1306 * in IBSS
1307 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1308 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1309 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1310 * that STA is currently associated with
1311 * have changed.
1312 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1313 */
1314
1315/// Definition for Wireless medium status change notification
1316typedef struct sSirSmeWmStatusChangeNtf
1317{
1318 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1319 tANI_U16 length;
1320 tANI_U8 sessionId; // Session ID
1321 tSirSmeStatusChangeCode statusChangeCode;
1322 tSirMacAddr bssId; // Self BSSID
1323 union
1324 {
1325 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1326 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1327 // none for eSIR_SME_LOST_LINK_WITH_PEER
1328 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1329 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1330 // none for eSIR_SME_LEAVING_BSS
1331 // none for eSIR_SME_IBSS_ACTIVE
1332 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001333 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1334 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1335 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1336 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001337 } statusChangeInfo;
1338} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1339
1340/// Definition for Disassociation request
1341typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001342__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001343struct sSirSmeDisassocReq
1344{
1345 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1346 tANI_U16 length;
1347 tANI_U8 sessionId; // Session ID
1348 tANI_U16 transactionId; // Transaction ID for cmd
1349 tSirMacAddr bssId; // Peer BSSID
1350 tSirMacAddr peerMacAddr;
1351 tANI_U16 reasonCode;
1352 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1353 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001354}
Jeff Johnson295189b2012-06-20 16:38:30 -07001355__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001356tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1357
1358/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001359typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1360{
1361 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1362 tANI_U16 length;
1363 tANI_U8 sessionId; // Session ID
1364 tANI_U16 transactionId; // Transaction ID for cmd
1365 tSirMacAddr bssId; // Peer BSSID
1366 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1367} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001368
1369typedef struct sAni64BitCounters
1370{
1371 tANI_U32 Hi;
1372 tANI_U32 Lo;
1373}tAni64BitCounters, *tpAni64BitCounters;
1374
1375typedef struct sAniSecurityStat
1376{
1377 tAni64BitCounters txBlks;
1378 tAni64BitCounters rxBlks;
1379 tAni64BitCounters formatErrorCnt;
1380 tAni64BitCounters decryptErr;
1381 tAni64BitCounters protExclCnt;
1382 tAni64BitCounters unDecryptableCnt;
1383 tAni64BitCounters decryptOkCnt;
1384
1385}tAniSecurityStat, *tpAniSecurityStat;
1386
1387typedef struct sAniTxRxCounters
1388{
1389 tANI_U32 txFrames; // Incremented for every packet tx
1390 tANI_U32 rxFrames;
1391 tANI_U32 nRcvBytes;
1392 tANI_U32 nXmitBytes;
1393}tAniTxRxCounters, *tpAniTxRxCounters;
1394
1395typedef struct sAniTxRxStats
1396{
1397 tAni64BitCounters txFrames;
1398 tAni64BitCounters rxFrames;
1399 tAni64BitCounters nRcvBytes;
1400 tAni64BitCounters nXmitBytes;
1401
1402}tAniTxRxStats,*tpAniTxRxStats;
1403
1404typedef struct sAniSecStats
1405{
1406 tAniSecurityStat aes;
1407 tAni64BitCounters aesReplays;
1408 tAniSecurityStat tkip;
1409 tAni64BitCounters tkipReplays;
1410 tAni64BitCounters tkipMicError;
1411
1412 tAniSecurityStat wep;
1413#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1414 tAniSecurityStat wpi;
1415 tAni64BitCounters wpiReplays;
1416 tAni64BitCounters wpiMicError;
1417#endif
1418}tAniSecStats, *tpAniSecStats;
1419
1420#define SIR_MAX_RX_CHAINS 3
1421
1422typedef struct sAniStaStatStruct
1423{
1424 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1425 * These are kept as it is, since WSM is using this structure.
1426 * These elements can be removed whenever WSM is updated.
1427 * Phystats is used to hold phystats from BD.
1428 */
1429 tANI_U32 sentAesBlksUcastHi;
1430 tANI_U32 sentAesBlksUcastLo;
1431 tANI_U32 recvAesBlksUcastHi;
1432 tANI_U32 recvAesBlksUcastLo;
1433 tANI_U32 aesFormatErrorUcastCnts;
1434 tANI_U32 aesReplaysUcast;
1435 tANI_U32 aesDecryptErrUcast;
1436 tANI_U32 singleRetryPkts;
1437 tANI_U32 failedTxPkts;
1438 tANI_U32 ackTimeouts;
1439 tANI_U32 multiRetryPkts;
1440 tANI_U32 fragTxCntsHi;
1441 tANI_U32 fragTxCntsLo;
1442 tANI_U32 transmittedPktsHi;
1443 tANI_U32 transmittedPktsLo;
1444 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1445 tANI_U32 phyStatLo; //This is only for private use.
1446
1447 tANI_U32 uplinkRssi;
1448 tANI_U32 uplinkSinr;
1449 tANI_U32 uplinkRate;
1450 tANI_U32 downlinkRssi;
1451 tANI_U32 downlinkSinr;
1452 tANI_U32 downlinkRate;
1453 tANI_U32 nRcvBytes;
1454 tANI_U32 nXmitBytes;
1455
1456 // titan 3c stats
1457 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1458 tANI_U32 chunksTxCntLo;
1459 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1460 tANI_U32 compPktRxCntLo;
1461 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1462 tANI_U32 expanPktRxCntLo;
1463
1464
1465 /* Following elements are valid and filled in correctly. They have valid values.
1466 */
1467
1468 //Unicast frames and bytes.
1469 tAniTxRxStats ucStats;
1470
1471 //Broadcast frames and bytes.
1472 tAniTxRxStats bcStats;
1473
1474 //Multicast frames and bytes.
1475 tAniTxRxStats mcStats;
1476
1477 tANI_U32 currentTxRate;
1478 tANI_U32 currentRxRate; //Rate in 100Kbps
1479
1480 tANI_U32 maxTxRate;
1481 tANI_U32 maxRxRate;
1482
1483 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1484
1485
1486 tAniSecStats securityStats;
1487
1488 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1489 tANI_U8 currentTxRateIdx;
1490
1491} tAniStaStatStruct, *tpAniStaStatStruct;
1492
1493//Statistics that are not maintained per stations.
1494typedef struct sAniGlobalStatStruct
1495{
1496 tAni64BitCounters txError;
1497 tAni64BitCounters rxError;
1498 tAni64BitCounters rxDropNoBuffer;
1499 tAni64BitCounters rxDropDup;
1500 tAni64BitCounters rxCRCError;
1501
1502 tAni64BitCounters singleRetryPkts;
1503 tAni64BitCounters failedTxPkts;
1504 tAni64BitCounters ackTimeouts;
1505 tAni64BitCounters multiRetryPkts;
1506 tAni64BitCounters fragTxCnts;
1507 tAni64BitCounters fragRxCnts;
1508
1509 tAni64BitCounters txRTSSuccess;
1510 tAni64BitCounters txCTSSuccess;
1511 tAni64BitCounters rxRTSSuccess;
1512 tAni64BitCounters rxCTSSuccess;
1513
1514 tAniSecStats securityStats;
1515
1516 tAniTxRxStats mcStats;
1517 tAniTxRxStats bcStats;
1518
1519}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1520
1521typedef enum sPacketType
1522{
1523 ePACKET_TYPE_UNKNOWN,
1524 ePACKET_TYPE_11A,
1525 ePACKET_TYPE_11G,
1526 ePACKET_TYPE_11B,
1527 ePACKET_TYPE_11N
1528
1529}tPacketType, *tpPacketType;
1530
1531typedef struct sAniStatSummaryStruct
1532{
1533 tAniTxRxStats uc; //Unicast counters.
1534 tAniTxRxStats bc; //Broadcast counters.
1535 tAniTxRxStats mc; //Multicast counters.
1536 tAni64BitCounters txError;
1537 tAni64BitCounters rxError;
1538 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1539 tANI_U32 rxRate; // Rx rate of the last received packet.
1540 tANI_U32 txRate;
1541 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1542 tANI_U16 txMCSId;
1543 tPacketType rxPacketType;
1544 tPacketType txPacketType;
1545 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1546}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1547
Jeff Johnson295189b2012-06-20 16:38:30 -07001548//structure for stats that may be reset, like the ones in sta descriptor
1549//The stats are saved into here before reset. It should be tANI_U32 aligned.
1550typedef struct _sPermStaStats
1551{
1552 //tANI_U32 sentAesBlksUcastHi;
1553 //tANI_U32 sentAesBlksUcastLo;
1554 //tANI_U32 recvAesBlksUcastHi;
1555 //tANI_U32 recvAesBlksUcastLo;
1556 tANI_U32 aesFormatErrorUcastCnts;
1557 tANI_U32 aesReplaysUcast;
1558 tANI_U32 aesDecryptErrUcast;
1559 tANI_U32 singleRetryPkts;
1560 tANI_U32 failedTxPkts;
1561 tANI_U32 ackTimeouts;
1562 tANI_U32 multiRetryPkts;
1563 tANI_U32 fragTxCntsHi;
1564 tANI_U32 fragTxCntsLo;
1565 tANI_U32 transmittedPktsHi;
1566 tANI_U32 transmittedPktsLo;
1567
1568 // titan 3c stats
1569 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1570 tANI_U32 chunksTxCntLo;
1571 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1572 tANI_U32 compPktRxCntLo;
1573 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1574 tANI_U32 expanPktRxCntLo;
1575}tPermanentStaStats;
1576
Jeff Johnson295189b2012-06-20 16:38:30 -07001577
1578
1579
1580/// Definition for Disassociation response
1581typedef struct sSirSmeDisassocRsp
1582{
1583 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1584 tANI_U16 length;
1585 tANI_U8 sessionId; // Session ID
1586 tANI_U16 transactionId; // Transaction ID for cmd
1587 tSirResultCodes statusCode;
1588 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001589 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001590 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001591}
Jeff Johnson295189b2012-06-20 16:38:30 -07001592__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001593 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1594
1595/// Definition for Disassociation indication from peer
1596typedef struct sSirSmeDisassocInd
1597{
1598 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1599 tANI_U16 length;
1600 tANI_U8 sessionId; // Session Identifier
1601 tANI_U16 transactionId; // Transaction Identifier with PE
1602 tSirResultCodes statusCode;
1603 tSirMacAddr bssId;
1604 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001605 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001606 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001607 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001608} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1609
1610/// Definition for Disassociation confirm
1611/// MAC --->
1612typedef struct sSirSmeDisassocCnf
1613{
1614 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1615 tANI_U16 length;
1616 tSirResultCodes statusCode;
1617 tSirMacAddr bssId;
1618 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001619} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1620
1621/// Definition for Deauthetication request
1622typedef struct sSirSmeDeauthReq
1623{
1624 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1625 tANI_U16 length;
1626 tANI_U8 sessionId; // Session ID
1627 tANI_U16 transactionId; // Transaction ID for cmd
1628 tSirMacAddr bssId; // AP BSSID
1629 tSirMacAddr peerMacAddr;
1630 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001631} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1632
1633/// Definition for Deauthetication response
1634typedef struct sSirSmeDeauthRsp
1635{
1636 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1637 tANI_U16 length;
1638 tANI_U8 sessionId; // Session ID
1639 tANI_U16 transactionId; // Transaction ID for cmd
1640 tSirResultCodes statusCode;
1641 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001642} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1643
1644/// Definition for Deauthetication indication from peer
1645typedef struct sSirSmeDeauthInd
1646{
1647 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1648 tANI_U16 length;
1649 tANI_U8 sessionId; //Added for BT-AMP
1650 tANI_U16 transactionId; //Added for BT-AMP
1651 tSirResultCodes statusCode;
1652 tSirMacAddr bssId;// AP BSSID
1653 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001654
Jeff Johnson295189b2012-06-20 16:38:30 -07001655 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001656 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001657} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1658
1659/// Definition for Deauthentication confirm
1660/// MAC --->
1661typedef struct sSirSmeDeauthCnf
1662{
1663 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1664 tANI_U16 length;
1665 tSirResultCodes statusCode;
1666 tSirMacAddr bssId; // AP BSSID
1667 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001668} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1669
1670/// Definition for stop BSS request message
1671typedef struct sSirSmeStopBssReq
1672{
1673 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1674 tANI_U16 length;
1675 tANI_U8 sessionId; //Session ID
1676 tANI_U16 transactionId; //tranSaction ID for cmd
1677 tSirResultCodes reasonCode;
1678 tSirMacAddr bssId; //Self BSSID
1679} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1680
1681/// Definition for stop BSS response message
1682typedef struct sSirSmeStopBssRsp
1683{
1684 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1685 tANI_U16 length;
1686 tSirResultCodes statusCode;
1687 tANI_U8 sessionId; // Session ID
1688 tANI_U16 transactionId; // Transaction ID for cmd
1689} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1690
Jeff Johnson295189b2012-06-20 16:38:30 -07001691
1692
1693/// Definition for Channel Switch indication for station
1694/// MAC --->
1695typedef struct sSirSmeSwitchChannelInd
1696{
1697 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1698 tANI_U16 length;
1699 tANI_U8 sessionId;
1700 tANI_U16 newChannelId;
1701 tSirMacAddr bssId; // BSSID
1702} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1703
1704/// Definition for ULA complete indication message
1705typedef struct sirUlaCompleteInd
1706{
1707 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1708 tANI_U16 length;
1709 tSirResultCodes statusCode;
1710 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001711} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1712
1713/// Definition for ULA complete confirmation message
1714typedef struct sirUlaCompleteCnf
1715{
1716 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1717 tANI_U16 length;
1718 tSirResultCodes statusCode;
1719 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001720} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1721
1722/// Definition for Neighbor BSS indication
1723/// MAC --->
1724/// MAC reports this each time a new I/BSS is detected
1725typedef struct sSirSmeNeighborBssInd
1726{
1727 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1728 tANI_U16 length;
1729 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001730 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001731} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1732
1733/// Definition for MIC failure indication
1734/// MAC --->
1735/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1736typedef struct sSirSmeMicFailureInd
1737{
1738 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1739 tANI_U16 length;
1740 tANI_U8 sessionId;
1741 tSirMacAddr bssId; // BSSID
1742 tSirMicFailureInfo info;
1743} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1744
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001745typedef struct sSirSmeMissedBeaconInd
1746{
1747 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1748 tANI_U16 length;
1749 tANI_U8 bssIdx;
1750} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001751
1752/// Definition for Set Context request
1753/// ---> MAC
1754typedef struct sSirSmeSetContextReq
1755{
1756 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1757 tANI_U16 length;
1758 tANI_U8 sessionId; //Session ID
1759 tANI_U16 transactionId; //Transaction ID for cmd
1760 tSirMacAddr peerMacAddr;
1761 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001762 // TBD Following QOS fields to be uncommented
1763 //tAniBool qosInfoPresent;
1764 //tSirQos qos;
1765 tSirKeyMaterial keyMaterial;
1766} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1767
1768/// Definition for Set Context response
1769/// MAC --->
1770typedef struct sSirSmeSetContextRsp
1771{
1772 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1773 tANI_U16 length;
1774 tANI_U8 sessionId; // Session ID
1775 tANI_U16 transactionId; // Transaction ID for cmd
1776 tSirResultCodes statusCode;
1777 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001778} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1779
1780/// Definition for Remove Key Context request
1781/// ---> MAC
1782typedef struct sSirSmeRemoveKeyReq
1783{
1784 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1785 tANI_U16 length;
1786 tANI_U8 sessionId; // Session ID
1787 tANI_U16 transactionId; // Transaction ID for cmd
1788 tSirMacAddr bssId; // BSSID
1789 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001790 tANI_U8 edType;
1791 tANI_U8 wepType;
1792 tANI_U8 keyId;
1793 tANI_BOOLEAN unicast;
1794} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1795
1796/// Definition for Remove Key Context response
1797/// MAC --->
1798typedef struct sSirSmeRemoveKeyRsp
1799{
1800 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1801 tANI_U16 length;
1802 tANI_U8 sessionId; // Session ID
1803 tANI_U16 transactionId; // Transaction ID for cmd
1804 tSirResultCodes statusCode;
1805 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001806} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1807
1808/// Definition for Set Power request
1809/// ---> MAC
1810typedef struct sSirSmeSetPowerReq
1811{
1812 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1813 tANI_U16 length;
1814 tANI_U16 transactionId; // Transaction ID for cmd
1815 tANI_S8 powerLevel;
1816} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1817
1818/// Definition for Set Power response
1819/// MAC --->
1820typedef struct sSirSmeSetPowerRsp
1821{
1822 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1823 tANI_U16 length;
1824 tSirResultCodes statusCode;
1825 tANI_U16 transactionId; // Transaction ID for cmd
1826} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1827
Jeff Johnson295189b2012-06-20 16:38:30 -07001828
1829/// Definition for Link Test Start response
1830/// MAC --->
1831typedef struct sSirSmeLinkTestStartRsp
1832{
1833 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1834 tANI_U16 length;
1835 tSirMacAddr peerMacAddr;
1836 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001837} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1838
1839/// Definition for Link Test Stop response
1840/// WSM ---> MAC
1841typedef struct sSirSmeLinkTestStopRsp
1842{
1843 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1844 tANI_U16 length;
1845 tSirMacAddr peerMacAddr;
1846 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001847} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1848
1849/// Definition for kick starting DFS measurements
1850typedef struct sSirSmeDFSreq
1851{
1852 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1853 tANI_U16 length;
1854 tANI_U16 transactionId; // Transaction ID for cmd
1855} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1856
1857/// Definition for response message to previously
1858/// issued DFS request
1859typedef struct sSirSmeDFSrsp
1860{
1861 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1862 tANI_U16 length;
1863 tSirResultCodes statusCode;
1864 tANI_U16 transactionId; // Transaction ID for cmd
1865 tANI_U32 dfsReport[1];
1866} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1867
1868/// Statistic definitions
1869//=============================================================
1870// Per STA statistic structure; This same struct will be used for Aggregate
1871// STA stats as well.
1872
1873// Clear radio stats and clear per sta stats
1874typedef enum
1875{
1876 eANI_CLEAR_ALL_STATS, // Clears all stats
1877 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1878 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1879 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1880 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1881 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1882
1883 // Used to distinguish between per sta to security stats.
1884 // Used only by AP, FW just returns the same parameter as it received.
1885 eANI_LINK_STATS, // Get Per STA stats
1886 eANI_SECURITY_STATS, // Get Per STA security stats
1887
1888 eANI_CLEAR_STAT_TYPES_END
1889} tAniStatSubTypes;
1890
1891typedef struct sAniTxCtrs
1892{
1893 // add the rate counters here
1894 tANI_U32 tx1Mbps;
1895 tANI_U32 tx2Mbps;
1896 tANI_U32 tx5_5Mbps;
1897 tANI_U32 tx6Mbps;
1898 tANI_U32 tx9Mbps;
1899 tANI_U32 tx11Mbps;
1900 tANI_U32 tx12Mbps;
1901 tANI_U32 tx18Mbps;
1902 tANI_U32 tx24Mbps;
1903 tANI_U32 tx36Mbps;
1904 tANI_U32 tx48Mbps;
1905 tANI_U32 tx54Mbps;
1906 tANI_U32 tx72Mbps;
1907 tANI_U32 tx96Mbps;
1908 tANI_U32 tx108Mbps;
1909
1910 // tx path radio counts
1911 tANI_U32 txFragHi;
1912 tANI_U32 txFragLo;
1913 tANI_U32 txFrameHi;
1914 tANI_U32 txFrameLo;
1915 tANI_U32 txMulticastFrameHi;
1916 tANI_U32 txMulticastFrameLo;
1917 tANI_U32 txFailedHi;
1918 tANI_U32 txFailedLo;
1919 tANI_U32 multipleRetryHi;
1920 tANI_U32 multipleRetryLo;
1921 tANI_U32 singleRetryHi;
1922 tANI_U32 singleRetryLo;
1923 tANI_U32 ackFailureHi;
1924 tANI_U32 ackFailureLo;
1925 tANI_U32 xmitBeacons;
1926
1927 // titan 3c stats
1928 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1929 tANI_U32 txCbEscPktCntLo;
1930 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1931 tANI_U32 txChunksCntLo;
1932 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1933 tANI_U32 txCompPktCntLo;
1934 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1935 tANI_U32 tx50PerCompPktCntLo;
1936 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1937 tANI_U32 txExpanPktCntLo;
1938} tAniTxCtrs, *tpAniTxCtrs;
1939
1940typedef struct sAniRxCtrs
1941{
1942 // receive frame rate counters
1943 tANI_U32 rx1Mbps;
1944 tANI_U32 rx2Mbps;
1945 tANI_U32 rx5_5Mbps;
1946 tANI_U32 rx6Mbps;
1947 tANI_U32 rx9Mbps;
1948 tANI_U32 rx11Mbps;
1949 tANI_U32 rx12Mbps;
1950 tANI_U32 rx18Mbps;
1951 tANI_U32 rx24Mbps;
1952 tANI_U32 rx36Mbps;
1953 tANI_U32 rx48Mbps;
1954 tANI_U32 rx54Mbps;
1955 tANI_U32 rx72Mbps;
1956 tANI_U32 rx96Mbps;
1957 tANI_U32 rx108Mbps;
1958
1959 // receive size counters; 'Lte' = Less than or equal to
1960 tANI_U32 rxLte64;
1961 tANI_U32 rxLte128Gt64;
1962 tANI_U32 rxLte256Gt128;
1963 tANI_U32 rxLte512Gt256;
1964 tANI_U32 rxLte1kGt512;
1965 tANI_U32 rxLte1518Gt1k;
1966 tANI_U32 rxLte2kGt1518;
1967 tANI_U32 rxLte4kGt2k;
1968
1969 // rx radio stats
1970 tANI_U32 rxFrag;
1971 tANI_U32 rxFrame;
1972 tANI_U32 fcsError;
1973 tANI_U32 rxMulticast;
1974 tANI_U32 duplicate;
1975 tANI_U32 rtsSuccess;
1976 tANI_U32 rtsFailed;
1977 tANI_U32 wepUndecryptables;
1978 tANI_U32 drops;
1979 tANI_U32 aesFormatErrorUcastCnts;
1980 tANI_U32 aesReplaysUcast;
1981 tANI_U32 aesDecryptErrUcast;
1982
1983 // titan 3c stats
1984 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
1985 tANI_U32 rxDecompPktCntLo;
1986 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
1987 tANI_U32 rxCompPktCntLo;
1988 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
1989 tANI_U32 rxExpanPktCntLo;
1990} tAniRxCtrs, *tpAniRxCtrs;
1991
1992// Radio stats
1993typedef struct sAniRadioStats
1994{
1995 tAniTxCtrs tx;
1996 tAniRxCtrs rx;
1997} tAniRadioStats, *tpAniRadioStats;
1998
1999// Get Radio Stats request structure
2000// This structure shall be used for both Radio stats and Aggregate stats
2001// A valid request must contain entire structure with/without valid fields.
2002// Based on the request type, the valid fields will be checked.
2003typedef struct sAniGetStatsReq
2004{
2005 // Common for all types are requests
2006 tANI_U16 msgType; // message type is same as the request type
2007 tANI_U16 msgLen; // length of the entire request
2008 tANI_U8 sessionId; //Session ID
2009 tANI_U16 transactionId;
2010 tSirMacAddr bssId; //BSSID
2011 // only used for clear stats and per sta stats clear
2012 tAniStatSubTypes stat; // Clears the stats of the described types.
2013 tANI_U32 staId; // Per STA stats request must contain valid
2014 // values
2015 tANI_U8 macAddr[6];
2016} tAniGetStatsReq, *tpAniGetStatsReq;
2017
2018// Get Radio Stats response struct
2019typedef struct sAniGetRadioStatsRsp
2020{
2021 tANI_U16 type; // message type is same as the request type
2022 tANI_U16 msgLen; // length of the entire request
2023 tANI_U32 rc;
2024 tANI_U16 transactionId;
2025 tAniRadioStats radio;
2026} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2027
2028// Per Sta stats response struct
2029typedef struct sAniGetPerStaStatsRsp
2030{
2031 tANI_U16 type; // message type is same as the request type
2032 tANI_U16 msgLen; // length of the entire request
2033 tANI_U32 rc;
2034 tANI_U16 transactionId;
2035 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2036 tAniStaStatStruct sta;
2037 tANI_U32 staId;
2038 tANI_U8 macAddr[6];
2039} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2040
2041// Get Aggregate stats
2042typedef struct sAniGetAggrStaStatsRsp
2043{
2044 tANI_U16 type; // message type is same as the request type
2045 tANI_U16 msgLen; // length of the entire request
2046 tANI_U32 rc;
2047 tANI_U16 transactionId;
2048 tAniStaStatStruct sta;
2049} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2050
2051// Clear stats request and response structure. 'rc' field is unused in
2052// request and this field is used in response field.
2053typedef struct sAniClearStatsRsp
2054{
2055 tANI_U16 type; // message type is same as the request type
2056 tANI_U16 msgLen; // length of the entire request
2057 tANI_U32 rc; // return code - will be filled by FW on
2058 // response.
2059 // Same transaction ID will be returned by the FW
2060 tANI_U16 transactionId;
2061 tAniStatSubTypes stat; // Clears the stats of the described types.
2062 tANI_U32 staId; // Applicable only to PER STA stats clearing
2063 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2064} tAniClearStatsRsp, *tpAniClearStatsRsp;
2065
2066typedef struct sAniGetGlobalStatsRsp
2067{
2068 tANI_U16 type; // message type is same as the request type
2069 tANI_U16 msgLen; // length of the entire request
2070 tANI_U32 rc;
2071 tANI_U16 transactionId;
2072 tAniGlobalStatStruct global;
2073} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2074
2075typedef struct sAniGetStatSummaryRsp
2076{
2077 tANI_U16 type; // message type is same as the request type
2078 tANI_U16 msgLen; // length of the entire request --Why?
2079 tANI_U32 rc;
2080 tANI_U16 transactionId;
2081 tAniStatSummaryStruct stat;
2082} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2083
2084//***************************************************************
2085
2086
2087/*******************PE Statistics*************************/
2088typedef enum
2089{
2090 PE_SUMMARY_STATS_INFO = 0x00000001,
2091 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2092 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2093 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2094 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
2095 PE_PER_STA_STATS_INFO = 0x00000020
2096}ePEStatsMask;
2097
2098/*
2099 * tpAniGetPEStatsReq is tied to
2100 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2101 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2102 */
2103typedef struct sAniGetPEStatsReq
2104{
2105 // Common for all types are requests
2106 tANI_U16 msgType; // message type is same as the request type
2107 tANI_U16 msgLen; // length of the entire request
2108 tANI_U32 staId; // Per STA stats request must contain valid
2109 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2110} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2111
2112/*
2113 * tpAniGetPEStatsRsp is tied to
2114 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2115 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2116 */
2117typedef struct sAniGetPEStatsRsp
2118{
2119 // Common for all types are responses
2120 tANI_U16 msgType; // message type is same as the request type
2121 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2122 tANI_U8 sessionId;
2123 tANI_U32 rc; //success/failure
2124 tANI_U32 staId; // Per STA stats request must contain valid
2125 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2126/**********************************************************************************************
2127 //void *pStatsBuf;
2128 The Stats buffer starts here and can be an aggregate of more than one statistics
2129 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2130 intentionally and the src code that uses this structure should take that into account.
2131**********************************************************************************************/
2132} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2133
2134typedef struct sAniGetRssiReq
2135{
2136 // Common for all types are requests
2137 tANI_U16 msgType; // message type is same as the request type
2138 tANI_U16 msgLen; // length of the entire request
2139 tANI_U8 sessionId;
2140 tANI_U8 staId;
2141 void *rssiCallback;
2142 void *pDevContext; //device context
2143 void *pVosContext; //voss context
2144
2145} tAniGetRssiReq, *tpAniGetRssiReq;
2146
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302147typedef struct sAniGetSnrReq
2148{
2149 // Common for all types are requests
2150 tANI_U16 msgType; // message type is same as the request type
2151 tANI_U16 msgLen; // length of the entire request
2152 tANI_U8 sessionId;
2153 tANI_U8 staId;
2154 void *snrCallback;
2155 void *pDevContext; //device context
2156} tAniGetSnrReq, *tpAniGetSnrReq;
2157
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002158#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002159typedef struct sAniGetRoamRssiRsp
2160{
2161 // Common for all types are responses
2162 tANI_U16 msgType; // message type is same as the request type
2163 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2164 tANI_U8 sessionId;
2165 tANI_U32 rc; //success/failure
2166 tANI_U32 staId; // Per STA stats request must contain valid
2167 tANI_S8 rssi;
2168 void *rssiReq; //rssi request backup
2169
2170} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2171
2172#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002173
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002174#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002175
2176typedef struct sSirTsmIE
2177{
2178 tANI_U8 tsid;
2179 tANI_U8 state;
2180 tANI_U16 msmt_interval;
2181} tSirTsmIE, *tpSirTsmIE;
2182
2183typedef struct sSirSmeTsmIEInd
2184{
2185 tSirTsmIE tsmIe;
2186 tANI_U8 sessionId;
2187} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2188
2189
2190typedef struct sAniTrafStrmMetrics
2191{
2192 tANI_U16 UplinkPktQueueDly;
2193 tANI_U16 UplinkPktQueueDlyHist[4];
2194 tANI_U32 UplinkPktTxDly;
2195 tANI_U16 UplinkPktLoss;
2196 tANI_U16 UplinkPktCount;
2197 tANI_U8 RoamingCount;
2198 tANI_U16 RoamingDly;
2199} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2200
2201typedef struct sAniGetTsmStatsReq
2202{
2203 // Common for all types are requests
2204 tANI_U16 msgType; // message type is same as the request type
2205 tANI_U16 msgLen; // length of the entire request
2206 tANI_U8 staId;
2207 tANI_U8 tid; // traffic id
2208 tSirMacAddr bssId;
2209 void *tsmStatsCallback;
2210 void *pDevContext; //device context
2211 void *pVosContext; //voss context
2212} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2213
2214typedef struct sAniGetTsmStatsRsp
2215{
2216 // Common for all types are responses
2217 tANI_U16 msgType; // message type is same as the request type
2218 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2219 tANI_U8 sessionId;
2220 tANI_U32 rc; //success/failure
2221 tANI_U32 staId; // Per STA stats request must contain valid
2222 tAniTrafStrmMetrics tsmMetrics;
2223 void *tsmStatsReq; //tsm stats request backup
2224} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002225
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002226typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002227{
2228 tBcnReportFields bcnReportFields;
2229 tANI_U8 ieLen;
2230 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002231} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002232
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002233typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002234{
2235 tANI_U16 measurementToken;
2236 tANI_U8 flag; /* Flag to report measurement done and more data */
2237 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002238 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2239} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002240
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002241#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002242
Jeff Johnson295189b2012-06-20 16:38:30 -07002243/* Change country code request MSG structure */
2244typedef struct sAniChangeCountryCodeReq
2245{
2246 // Common for all types are requests
2247 tANI_U16 msgType; // message type is same as the request type
2248 tANI_U16 msgLen; // length of the entire request
2249 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302250 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302251 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002252 void *changeCCCallback;
2253 void *pDevContext; //device context
2254 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002255
Jeff Johnson295189b2012-06-20 16:38:30 -07002256} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2257
Amar Singhal0d15bd52013-10-12 23:13:13 -07002258/* generic country code change request MSG structure */
2259typedef struct sAniGenericChangeCountryCodeReq
2260{
2261 // Common for all types are requests
2262 tANI_U16 msgType; // message type is same as the request type
2263 tANI_U16 msgLen; // length of the entire request
2264 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2265 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002266} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2267
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302268typedef struct sAniDHCPStopInd
2269{
2270 tANI_U16 msgType; // message type is same as the request type
2271 tANI_U16 msgLen; // length of the entire request
2272 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2273 tSirMacAddr macAddr;
2274
2275} tAniDHCPInd, *tpAniDHCPInd;
2276
Jeff Johnson295189b2012-06-20 16:38:30 -07002277typedef struct sAniSummaryStatsInfo
2278{
2279 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2280 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2281 // station successfully transmitted after more than one retransmission attempt
2282
2283 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2284 //(with and without retries, including multi-cast, broadcast)
2285 //tANI_U32 tx_fail_cnt;
2286 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2287 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2288 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2289 //(after appropriate filter rules including multi-cast, broadcast)
2290 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2291 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2292 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2293 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2294 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2295 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2296 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2297 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2298 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2299 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2300 //to provide this.
2301#if 0
2302 //providing the following stats, in case of wrap around for tx_byte_cnt
2303 tANI_U32 tx_unicast_lower_byte_cnt;
2304 tANI_U32 tx_unicast_upper_byte_cnt;
2305 tANI_U32 tx_multicast_lower_byte_cnt;
2306 tANI_U32 tx_multicast_upper_byte_cnt;
2307 tANI_U32 tx_broadcast_lower_byte_cnt;
2308 tANI_U32 tx_broadcast_upper_byte_cnt;
2309#endif
2310
2311}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2312
2313typedef enum eTxRateInfo
2314{
2315 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2316 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2317 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2318 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002319 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2320 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2321 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2322 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002323} tTxrateinfoflags;
2324
2325typedef struct sAniGlobalClassAStatsInfo
2326{
2327 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2328 //or MMPDU frames
2329 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2330 //or MMPDU frames when a promiscuous packet filter was enabled
2331 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2332 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2333 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2334 //to a supported rate and the order shall be the same as the supporteRates parameter.
2335 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2336 //for eg: if it is 10.5dBm, the value would be 105
2337 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2338 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2339 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2340 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2341 //500 kbit/sec, for the most
2342 //recently transmitted frame
2343 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2344 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2345 //HT40 rates; short and long guard interval
2346
2347}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2348
2349
2350typedef struct sAniGlobalSecurityStats
2351{
2352 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2353 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2354 //is enabled
2355 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2356 //because of MIC failures
2357 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2358 //because of a TKIP ICV error
2359 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2360 //invalid AES-CCMP format
2361 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2362 //the AES-CCMP replay protection procedure
2363 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2364 //errors detected by the AES-CCMP decryption algorithm
2365 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2366 //not available on the 802.11 station
2367 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2368 //because of a WEP ICV error
2369 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2370 //decrypted
2371 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2372
2373}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2374
2375typedef struct sAniGlobalClassBStatsInfo
2376{
2377 tAniGlobalSecurityStats ucStats;
2378 tAniGlobalSecurityStats mcbcStats;
2379}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2380
2381typedef struct sAniGlobalClassCStatsInfo
2382{
2383 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2384 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2385 //address 1 field
2386 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2387 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2388 //primary channel
2389 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2390 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2391 //when an A-MPDU is received
2392 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2393 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2394 //decoded correctly
2395
2396}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2397
2398typedef struct sAniPerStaStatsInfo
2399{
2400 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2401 //through a received 802.11 ACK frame
2402 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2403 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2404 //is transmitted
2405
2406}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2407
2408/**********************PE Statistics end*************************/
2409
2410
2411
2412typedef struct sSirRSSIThresholds
2413{
2414#ifdef ANI_BIG_BYTE_ENDIAN
2415 tANI_S8 ucRssiThreshold1 : 8;
2416 tANI_S8 ucRssiThreshold2 : 8;
2417 tANI_S8 ucRssiThreshold3 : 8;
2418 tANI_U8 bRssiThres1PosNotify : 1;
2419 tANI_U8 bRssiThres1NegNotify : 1;
2420 tANI_U8 bRssiThres2PosNotify : 1;
2421 tANI_U8 bRssiThres2NegNotify : 1;
2422 tANI_U8 bRssiThres3PosNotify : 1;
2423 tANI_U8 bRssiThres3NegNotify : 1;
2424 tANI_U8 bReserved10 : 2;
2425#else
2426 tANI_U8 bReserved10 : 2;
2427 tANI_U8 bRssiThres3NegNotify : 1;
2428 tANI_U8 bRssiThres3PosNotify : 1;
2429 tANI_U8 bRssiThres2NegNotify : 1;
2430 tANI_U8 bRssiThres2PosNotify : 1;
2431 tANI_U8 bRssiThres1NegNotify : 1;
2432 tANI_U8 bRssiThres1PosNotify : 1;
2433 tANI_S8 ucRssiThreshold3 : 8;
2434 tANI_S8 ucRssiThreshold2 : 8;
2435 tANI_S8 ucRssiThreshold1 : 8;
2436#endif
2437
2438}tSirRSSIThresholds, *tpSirRSSIThresholds;
2439
2440typedef struct sSirRSSINotification
2441{
2442#ifdef ANI_BIG_BYTE_ENDIAN
2443 tANI_U32 bRssiThres1PosCross : 1;
2444 tANI_U32 bRssiThres1NegCross : 1;
2445 tANI_U32 bRssiThres2PosCross : 1;
2446 tANI_U32 bRssiThres2NegCross : 1;
2447 tANI_U32 bRssiThres3PosCross : 1;
2448 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002449 v_S7_t avgRssi : 8;
2450 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002451#else
Srinivasdaaec712012-12-12 15:59:44 -08002452 tANI_U32 bReserved : 18;
2453 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002454 tANI_U32 bRssiThres3NegCross : 1;
2455 tANI_U32 bRssiThres3PosCross : 1;
2456 tANI_U32 bRssiThres2NegCross : 1;
2457 tANI_U32 bRssiThres2PosCross : 1;
2458 tANI_U32 bRssiThres1NegCross : 1;
2459 tANI_U32 bRssiThres1PosCross : 1;
2460#endif
2461
2462}tSirRSSINotification, *tpSirRSSINotification;
2463
Viral Modid86bde22012-12-10 13:09:21 -08002464
2465typedef struct sSirP2PNoaStart
2466{
2467 tANI_U32 status;
2468 tANI_U32 bssIdx;
2469} tSirP2PNoaStart, *tpSirP2PNoaStart;
2470
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302471typedef struct sSirTdlsInd
2472{
2473 tANI_U16 status;
2474 tANI_U16 assocId;
2475 tANI_U16 staIdx;
2476 tANI_U16 reasonCode;
2477} tSirTdlsInd, *tpSirTdlsInd;
2478
Jeff Johnson295189b2012-06-20 16:38:30 -07002479typedef struct sSirP2PNoaAttr
2480{
2481#ifdef ANI_BIG_BYTE_ENDIAN
2482 tANI_U32 index :8;
2483 tANI_U32 oppPsFlag :1;
2484 tANI_U32 ctWin :7;
2485 tANI_U32 rsvd1: 16;
2486#else
2487 tANI_U32 rsvd1: 16;
2488 tANI_U32 ctWin :7;
2489 tANI_U32 oppPsFlag :1;
2490 tANI_U32 index :8;
2491#endif
2492
2493#ifdef ANI_BIG_BYTE_ENDIAN
2494 tANI_U32 uNoa1IntervalCnt:8;
2495 tANI_U32 rsvd2:24;
2496#else
2497 tANI_U32 rsvd2:24;
2498 tANI_U32 uNoa1IntervalCnt:8;
2499#endif
2500 tANI_U32 uNoa1Duration;
2501 tANI_U32 uNoa1Interval;
2502 tANI_U32 uNoa1StartTime;
2503
2504#ifdef ANI_BIG_BYTE_ENDIAN
2505 tANI_U32 uNoa2IntervalCnt:8;
2506 tANI_U32 rsvd3:24;
2507#else
2508 tANI_U32 rsvd3:24;
2509 tANI_U32 uNoa2IntervalCnt:8;
2510#endif
2511 tANI_U32 uNoa2Duration;
2512 tANI_U32 uNoa2Interval;
2513 tANI_U32 uNoa2StartTime;
2514} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002515
2516typedef __ani_attr_pre_packed struct sSirTclasInfo
2517{
2518 tSirMacTclasIE tclas;
2519 tANI_U8 version; // applies only for classifier type ip
2520 __ani_attr_pre_packed union {
2521 tSirMacTclasParamEthernet eth;
2522 tSirMacTclasParamIPv4 ipv4;
2523 tSirMacTclasParamIPv6 ipv6;
2524 tSirMacTclasParam8021dq t8021dq;
2525 }__ani_attr_packed tclasParams;
2526} __ani_attr_packed tSirTclasInfo;
2527
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002528
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002529#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002530#define TSRS_11AG_RATE_6MBPS 0xC
2531#define TSRS_11B_RATE_5_5MBPS 0xB
2532
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002533typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002534{
2535 tANI_U8 tsid;
2536 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002537} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002538
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002539typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002540{
2541 tANI_U8 tsid;
2542 tANI_U8 state;
2543 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002544} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002545
2546typedef struct sTSMStats
2547{
2548 tANI_U8 tid;
2549 tSirMacAddr bssId;
2550 tTrafStrmMetrics tsmMetrics;
2551} tTSMStats, *tpTSMStats;
2552
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002553typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002554{
2555 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002556 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002557 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002558} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002559
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002560typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002561{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002562#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2563 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002564#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002565 tEseTSMContext tsm;
2566} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002567
2568
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002569#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002570
2571
Jeff Johnson295189b2012-06-20 16:38:30 -07002572typedef struct sSirAddtsReqInfo
2573{
2574 tANI_U8 dialogToken;
2575 tSirMacTspecIE tspec;
2576
2577 tANI_U8 numTclas; // number of Tclas elements
2578 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2579 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002580#if defined(FEATURE_WLAN_ESE)
2581 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002582 tANI_U8 tsrsPresent:1;
2583#endif
2584 tANI_U8 wmeTspecPresent:1;
2585 tANI_U8 wsmTspecPresent:1;
2586 tANI_U8 lleTspecPresent:1;
2587 tANI_U8 tclasProcPresent:1;
2588} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2589
2590typedef struct sSirAddtsRspInfo
2591{
2592 tANI_U8 dialogToken;
2593 tSirMacStatusCodes status;
2594 tSirMacTsDelayIE delay;
2595
2596 tSirMacTspecIE tspec;
2597 tANI_U8 numTclas; // number of Tclas elements
2598 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2599 tANI_U8 tclasProc;
2600 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002601#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2602 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002603 tANI_U8 tsmPresent:1;
2604#endif
2605 tANI_U8 wmeTspecPresent:1;
2606 tANI_U8 wsmTspecPresent:1;
2607 tANI_U8 lleTspecPresent:1;
2608 tANI_U8 tclasProcPresent:1;
2609 tANI_U8 schedulePresent:1;
2610} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2611
2612typedef struct sSirDeltsReqInfo
2613{
2614 tSirMacTSInfo tsinfo;
2615 tSirMacTspecIE tspec;
2616 tANI_U8 wmeTspecPresent:1;
2617 tANI_U8 wsmTspecPresent:1;
2618 tANI_U8 lleTspecPresent:1;
2619} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2620
2621/// Add a tspec as defined
2622typedef struct sSirAddtsReq
2623{
2624 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2625 tANI_U16 length;
2626 tANI_U8 sessionId; //Session ID
2627 tANI_U16 transactionId;
2628 tSirMacAddr bssId; //BSSID
2629 tANI_U32 timeout; // in ms
2630 tANI_U8 rspReqd;
2631 tSirAddtsReqInfo req;
2632} tSirAddtsReq, *tpSirAddtsReq;
2633
2634typedef struct sSirAddtsRsp
2635{
2636 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2637 tANI_U16 length;
2638 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2639 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2640 tANI_U32 rc; // return code
2641 tSirAddtsRspInfo rsp;
2642} tSirAddtsRsp, *tpSirAddtsRsp;
2643
2644typedef struct sSirDeltsReq
2645{
2646 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2647 tANI_U16 length;
2648 tANI_U8 sessionId;//Session ID
2649 tANI_U16 transactionId;
2650 tSirMacAddr bssId; //BSSID
2651 tANI_U16 aid; // use 0 if macAddr is being specified
2652 tANI_U8 macAddr[6]; // only on AP to specify the STA
2653 tANI_U8 rspReqd;
2654 tSirDeltsReqInfo req;
2655} tSirDeltsReq, *tpSirDeltsReq;
2656
2657typedef struct sSirDeltsRsp
2658{
2659 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2660 tANI_U16 length;
2661 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2662 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2663 tANI_U32 rc;
2664 tANI_U16 aid; // use 0 if macAddr is being specified
2665 tANI_U8 macAddr[6]; // only on AP to specify the STA
2666 tSirDeltsReqInfo rsp;
2667} tSirDeltsRsp, *tpSirDeltsRsp;
2668
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002669#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002670
2671#define SIR_QOS_NUM_TSPEC_MAX 2
2672#define SIR_QOS_NUM_AC_MAX 4
2673
2674typedef struct sSirAggrQosReqInfo
2675{
2676 tANI_U16 tspecIdx;
2677 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2678}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2679
2680typedef struct sSirAggrQosReq
2681{
2682 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2683 tANI_U16 length;
2684 tANI_U8 sessionId; //Session ID
2685 tANI_U16 transactionId;
2686 tSirMacAddr bssId; //BSSID
2687 tANI_U32 timeout; // in ms
2688 tANI_U8 rspReqd;
2689 tSirAggrQosReqInfo aggrInfo;
2690}tSirAggrQosReq, *tpSirAggrQosReq;
2691
2692typedef struct sSirAggrQosRspInfo
2693{
2694 tANI_U16 tspecIdx;
2695 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2696} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2697
2698typedef struct sSirAggrQosRsp
2699{
2700 tANI_U16 messageType;
2701 tANI_U16 length;
2702 tANI_U8 sessionId;
2703 tSirAggrQosRspInfo aggrInfo;
2704} tSirAggrQosRsp, *tpSirAggrQosRsp;
2705
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002706#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002707
2708typedef struct sSirSetTxPowerReq
2709{
schang86c22c42013-03-13 18:41:24 -07002710 tANI_U16 messageType;
2711 tANI_U16 length;
2712 tSirMacAddr bssId;
2713 tANI_U8 mwPower;
2714 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002715} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2716
2717typedef struct sSirSetTxPowerRsp
2718{
2719 tANI_U16 messageType;
2720 tANI_U16 length;
2721 tANI_U32 status;
2722} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2723
2724typedef struct sSirGetTxPowerReq
2725{
2726 tANI_U16 messageType;
2727 tANI_U16 length;
2728 tANI_U16 staid;
2729} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2730
2731typedef struct sSirGetTxPowerRsp
2732{
2733 tANI_U16 messageType;
2734 tANI_U16 length; // length of the entire request
2735 tANI_U32 power; // units of milliwatts
2736 tANI_U32 status;
2737} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2738
2739
2740typedef tANI_U32 tSirMacNoise[3];
2741
2742typedef struct sSirGetNoiseRsp
2743{
2744 tANI_U16 messageType;
2745 tANI_U16 length;
2746 tSirMacNoise noise;
2747} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2748
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002749typedef struct sSirQosMapSet
2750{
2751 tANI_U8 present;
2752 tANI_U8 num_dscp_exceptions;
2753 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002754 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002755} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002756
2757//
2758// PMC --> PE --> HAL
2759// Power save configuration parameters
2760//
2761typedef struct sSirPowerSaveCfg
2762{
2763 tANI_U16 listenInterval;
2764
2765 /* Number of consecutive missed beacons before
2766 * hardware generates an interrupt to wake up
2767 * the host. In units of listen interval.
2768 */
2769 tANI_U32 HeartBeatCount;
2770
2771 /* specifies which beacons are to be forwarded
2772 * to host when beacon filtering is enabled.
2773 * In units of listen interval.
2774 */
2775 tANI_U32 nthBeaconFilter;
2776
2777 /* Maximum number of PS-Poll send before
2778 * firmware sends data null with PM set to 0.
2779 */
2780 tANI_U32 maxPsPoll;
2781
2782 /* If the average RSSI value falls below the
2783 * minRssiThreshold, then FW will send an
2784 * interrupt to wake up the host.
2785 */
2786 tANI_U32 minRssiThreshold;
2787
2788 /* Number of beacons for which firmware will
2789 * collect the RSSI values and compute the average.
2790 */
2791 tANI_U8 numBeaconPerRssiAverage;
2792
2793 /* FW collects the RSSI stats for this period
2794 * in BMPS mode.
2795 */
2796 tANI_U8 rssiFilterPeriod;
2797
2798 // Enabling/disabling broadcast frame filter feature
2799 tANI_U8 broadcastFrameFilter;
2800
2801 // Enabling/disabling the ignore DTIM feature
2802 tANI_U8 ignoreDtim;
2803
2804 /* The following configuration parameters are kept
2805 * in order to be backward compatible for Gen5.
2806 * These will NOT be used for Gen6 Libra chip
2807 */
2808 tBeaconForwarding beaconFwd;
2809 tANI_U16 nthBeaconFwd;
2810 tANI_U8 fEnablePwrSaveImmediately;
2811 tANI_U8 fPSPoll;
2812
2813 // Enabling/disabling Beacon Early Termination feature
2814 tANI_U8 fEnableBeaconEarlyTermination;
2815 tANI_U8 bcnEarlyTermWakeInterval;
2816
2817}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2818
2819/* Reason code for requesting Full Power. This reason code is used by
2820 any module requesting full power from PMC and also by PE when it
2821 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2822typedef enum eRequestFullPowerReason
2823{
2824 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2825 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2826 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2827 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2828 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2829 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2830 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2831 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2832 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2833 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002834#ifdef FEATURE_WLAN_TDLS
2835 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2836#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002837 eSME_REASON_OTHER /* No specific reason. General reason code */
2838} tRequestFullPowerReason, tExitBmpsReason;
2839
2840
2841
2842//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2843typedef struct sExitBmpsInfo
2844{
2845 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2846}tExitBmpsInfo, *tpExitBmpsInfo;
2847
2848
2849// MAC SW --> SME
2850// Message indicating to SME to exit BMPS sleep mode
2851typedef struct sSirSmeExitBmpsInd
2852{
2853 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2854 tANI_U16 mesgLen;
2855 tSirResultCodes statusCode;
2856 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2857
2858} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2859
2860
2861//
2862// HDD -> LIM
2863// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2864// tSirMsgQ.reserved = 0
2865// tSirMsgQ.body = instance of tDelBAParams
2866//
2867typedef struct sSmeDelBAPeerInd
2868{
2869 // Message Type
2870 tANI_U16 mesgType;
2871
2872 tSirMacAddr bssId;//BSSID
2873
2874 // Message Length
2875 tANI_U16 mesgLen;
2876
2877 // Station Index
2878 tANI_U16 staIdx;
2879
2880 // TID for which the BA session is being deleted
2881 tANI_U8 baTID;
2882
2883 // DELBA direction
2884 // eBA_INITIATOR - Originator
2885 // eBA_RECEIPIENT - Recipient
2886 tANI_U8 baDirection;
2887} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2888
2889typedef struct sSmeIbssPeerInd
2890{
2891 tANI_U16 mesgType;
2892 tANI_U16 mesgLen;
2893 tANI_U8 sessionId;
2894
2895 tSirMacAddr peerAddr;
2896 tANI_U16 staId;
2897
2898 /*The DPU signatures will be sent eventually to TL to help it determine the
2899 association to which a packet belongs to*/
2900 /*Unicast DPU signature*/
2901 tANI_U8 ucastSig;
2902
2903 /*Broadcast DPU signature*/
2904 tANI_U8 bcastSig;
2905
2906 //Beacon will be appended for new Peer indication.
2907}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2908
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002909typedef struct sSirIbssPeerInactivityInd
2910{
2911 tANI_U8 bssIdx;
2912 tANI_U8 staIdx;
2913 tSirMacAddr peerAddr;
2914}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2915
2916
Jeff Johnson295189b2012-06-20 16:38:30 -07002917typedef struct sLimScanChn
2918{
2919 tANI_U16 numTimeScan; //how many time this channel is scan
2920 tANI_U8 channelId;
2921}tLimScanChn;
2922
2923typedef struct sSmeGetScanChnRsp
2924{
2925 // Message Type
2926 tANI_U16 mesgType;
2927 // Message Length
2928 tANI_U16 mesgLen;
2929 tANI_U8 sessionId;
2930 tANI_U8 numChn;
2931 tLimScanChn scanChn[1];
2932} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2933
2934typedef struct sLimScanChnInfo
2935{
2936 tANI_U8 numChnInfo; //number of channels in scanChn
2937 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2938}tLimScanChnInfo;
2939
Jeff Johnson295189b2012-06-20 16:38:30 -07002940typedef struct sSirSmeGetAssocSTAsReq
2941{
2942 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2943 tANI_U16 length;
2944 tSirMacAddr bssId; // BSSID
2945 tANI_U16 modId;
2946 void *pUsrContext;
2947 void *pSapEventCallback;
2948 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2949} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002950
2951typedef struct sSmeMaxAssocInd
2952{
2953 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2954 tANI_U16 mesgLen;
2955 tANI_U8 sessionId;
2956 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2957} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2958
2959/*--------------------------------------------------------------------*/
2960/* BootLoader message definition */
2961/*--------------------------------------------------------------------*/
2962
2963/*--------------------------------------------------------------------*/
2964/* FW image size */
2965/*--------------------------------------------------------------------*/
2966#define SIR_FW_IMAGE_SIZE 146332
2967
2968
2969#define SIR_BOOT_MODULE_ID 1
2970
2971#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2972#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2973#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2974#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2975#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2976#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2977#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2978
2979/*--------------------------------------------------------------------*/
2980/* Bootloader message syntax */
2981/*--------------------------------------------------------------------*/
2982
2983// Message header
2984#define SIR_BOOT_MB_HEADER 0
2985#define SIR_BOOT_MB_HEADER2 1
2986
2987#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
2988#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
2989
2990// BOOT_SETUP_IND parameter indices
2991#define SIR_BOOT_SETUP_IND_MBADDR 2
2992#define SIR_BOOT_SETUP_IND_MBSIZE 3
2993#define SIR_BOOT_SETUP_IND_MEMOPT 4
2994#define SIR_BOOT_SETUP_IND_LEN \
2995 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
2996
2997// BOOT_POST_RESULT_IND parameter indices
2998#define SIR_BOOT_POST_RESULT_IND_RES 2
2999#define SIR_BOOT_POST_RESULT_IND_LEN \
3000 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
3001
3002#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
3003#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
3004#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
3005#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
3006
3007
3008// BOOT_DNLD_RESULT_IND parameter indices
3009#define SIR_BOOT_DNLD_RESULT_IND_RES 2
3010#define SIR_BOOT_DNLD_RESULT_IND_LEN \
3011 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3012
3013#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3014#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3015#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3016
3017// BOOT_DNLD_DEV_REQ
3018#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3019#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3020#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3021 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3022
3023// BOOT_DNLD_DEV_RSP
3024#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3025#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3026 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3027
3028#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3029#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3030
3031// BOOT_DNLD_REQ
3032#define SIR_BOOT_DNLD_REQ_OFFSET 2
3033#define SIR_BOOT_DNLD_REQ_WRADDR 3
3034#define SIR_BOOT_DNLD_REQ_SIZE 4
3035#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3036
3037// BOOT_DNLD_RSP
3038#define SIR_BOOT_DNLD_RSP_SIZE 2
3039#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3040
Jeff Johnson295189b2012-06-20 16:38:30 -07003041
3042// board capabilities fields are defined here.
3043typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3044{
3045#ifndef ANI_LITTLE_BIT_ENDIAN
3046 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3047 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3048 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3049 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3050 tANI_U32 rsvd1:2;
3051 // (productId derives sub-category in the following three families)
3052 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3053 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3054 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3055 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3056 tANI_U32 bbChipVer:4; // Baseband chip version
3057 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3058 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3059 tANI_U32 nReceivers:2; // 0 based.
3060 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3061 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3062 tANI_U32 rsvd:1;
3063 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3064#else
3065
3066 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3067 tANI_U32 rsvd:1;
3068 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3069 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3070 tANI_U32 nReceivers:2; // 0 based.
3071 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3072 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3073 tANI_U32 bbChipVer:4; // Baseband chip version
3074 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3075 // (productId derives sub-category in the following three families)
3076 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3077 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3078 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3079 tANI_U32 rsvd1:2;
3080 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3081 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3082 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3083 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3084#endif
3085} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3086
3087# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3088# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3089
3090# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3091# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3092
3093# define ANI_BCAP_SDRAM_MASK 0x4
3094# define ANI_BCAP_SDRAM_OFFSET 2
3095
3096# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3097# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3098
3099# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3100# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3101
3102# define ANI_BCAP_RADIO_ON_MASK 0xC0
3103# define ANI_BCAP_RADIO_ON_OFFSET 6
3104
3105# define ANI_BCAP_LO_TYPE_MASK 0x300
3106# define ANI_BCAP_LO_TYPE_OFFSET 8
3107
3108# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3109# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3110
3111# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3112# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3113
3114# define ANI_BCAP_RADIO_OFF 0
3115# define ANI_BCAP_RADIO_ON 1
3116# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3117
3118
3119/// WOW related structures
3120// SME -> PE <-> HAL
3121#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3122#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3123
3124// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3125// SME/HDD maintains the list of the BCAST wake-up patterns.
3126// This is a pass through message for PE
3127typedef struct sSirWowlAddBcastPtrn
3128{
3129 tANI_U8 ucPatternId; // Pattern ID
3130 // Pattern byte offset from beginning of the 802.11 packet to start of the
3131 // wake-up pattern
3132 tANI_U8 ucPatternByteOffset;
3133 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3134 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3135 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3136 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3137 // Extra pattern data beyond 128 bytes
3138 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3139 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003140 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003141} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3142
3143
3144// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3145// SME/HDD maintains the list of the BCAST wake-up patterns.
3146// This is a pass through message for PE
3147typedef struct sSirWowlDelBcastPtrn
3148{
3149 /* Pattern ID of the wakeup pattern to be deleted */
3150 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003151 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003152}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3153
3154
3155// SME->PE: Enter WOWLAN parameters
3156typedef struct sSirSmeWowlEnterParams
3157{
3158 /* Enables/disables magic packet filtering */
3159 tANI_U8 ucMagicPktEnable;
3160
3161 /* Magic pattern */
3162 tSirMacAddr magicPtrn;
3163
3164 /* Enables/disables packet pattern filtering */
3165 tANI_U8 ucPatternFilteringEnable;
3166
3167#ifdef WLAN_WAKEUP_EVENTS
3168 /* This configuration directs the WoW packet filtering to look for EAP-ID
3169 * requests embedded in EAPOL frames and use this as a wake source.
3170 */
3171 tANI_U8 ucWoWEAPIDRequestEnable;
3172
3173 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3174 * requests and use this as a wake source.
3175 */
3176 tANI_U8 ucWoWEAPOL4WayEnable;
3177
3178 /* This configuration allows a host wakeup on an network scan offload match.
3179 */
3180 tANI_U8 ucWowNetScanOffloadMatch;
3181
3182 /* This configuration allows a host wakeup on any GTK rekeying error.
3183 */
3184 tANI_U8 ucWowGTKRekeyError;
3185
3186 /* This configuration allows a host wakeup on BSS connection loss.
3187 */
3188 tANI_U8 ucWoWBSSConnLoss;
3189#endif // WLAN_WAKEUP_EVENTS
3190
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003191 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003192} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3193
3194
3195// PE<->HAL: Enter WOWLAN parameters
3196typedef struct sSirHalWowlEnterParams
3197{
3198 /* Enables/disables magic packet filtering */
3199 tANI_U8 ucMagicPktEnable;
3200
3201 /* Magic pattern */
3202 tSirMacAddr magicPtrn;
3203
3204 /* Enables/disables packet pattern filtering in firmware.
3205 Enabling this flag enables broadcast pattern matching
3206 in Firmware. If unicast pattern matching is also desired,
3207 ucUcastPatternFilteringEnable flag must be set tot true
3208 as well
3209 */
3210 tANI_U8 ucPatternFilteringEnable;
3211
3212 /* Enables/disables unicast packet pattern filtering.
3213 This flag specifies whether we want to do pattern match
3214 on unicast packets as well and not just broadcast packets.
3215 This flag has no effect if the ucPatternFilteringEnable
3216 (main controlling flag) is set to false
3217 */
3218 tANI_U8 ucUcastPatternFilteringEnable;
3219
3220 /* This configuration is valid only when magicPktEnable=1.
3221 * It requests hardware to wake up when it receives the
3222 * Channel Switch Action Frame.
3223 */
3224 tANI_U8 ucWowChnlSwitchRcv;
3225
3226 /* This configuration is valid only when magicPktEnable=1.
3227 * It requests hardware to wake up when it receives the
3228 * Deauthentication Frame.
3229 */
3230 tANI_U8 ucWowDeauthRcv;
3231
3232 /* This configuration is valid only when magicPktEnable=1.
3233 * It requests hardware to wake up when it receives the
3234 * Disassociation Frame.
3235 */
3236 tANI_U8 ucWowDisassocRcv;
3237
3238 /* This configuration is valid only when magicPktEnable=1.
3239 * It requests hardware to wake up when it has missed
3240 * consecutive beacons. This is a hardware register
3241 * configuration (NOT a firmware configuration).
3242 */
3243 tANI_U8 ucWowMaxMissedBeacons;
3244
3245 /* This configuration is valid only when magicPktEnable=1.
3246 * This is a timeout value in units of microsec. It requests
3247 * hardware to unconditionally wake up after it has stayed
3248 * in WoWLAN mode for some time. Set 0 to disable this feature.
3249 */
3250 tANI_U8 ucWowMaxSleepUsec;
3251
3252#ifdef WLAN_WAKEUP_EVENTS
3253 /* This configuration directs the WoW packet filtering to look for EAP-ID
3254 * requests embedded in EAPOL frames and use this as a wake source.
3255 */
3256 tANI_U8 ucWoWEAPIDRequestEnable;
3257
3258 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3259 * requests and use this as a wake source.
3260 */
3261 tANI_U8 ucWoWEAPOL4WayEnable;
3262
3263 /* This configuration allows a host wakeup on an network scan offload match.
3264 */
3265 tANI_U8 ucWowNetScanOffloadMatch;
3266
3267 /* This configuration allows a host wakeup on any GTK rekeying error.
3268 */
3269 tANI_U8 ucWowGTKRekeyError;
3270
3271 /* This configuration allows a host wakeup on BSS connection loss.
3272 */
3273 tANI_U8 ucWoWBSSConnLoss;
3274#endif // WLAN_WAKEUP_EVENTS
3275
3276 /* Status code to be filled by HAL when it sends
3277 * SIR_HAL_WOWL_ENTER_RSP to PE.
3278 */
3279 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003280
3281 /*BSSID to find the current session
3282 */
3283 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003284} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3285
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003286// PE<->HAL: Exit WOWLAN parameters
3287typedef struct sSirHalWowlExitParams
3288{
3289 /* Status code to be filled by HAL when it sends
3290 * SIR_HAL_WOWL_EXIT_RSP to PE.
3291 */
3292 eHalStatus status;
3293
3294 /*BSSIDX to find the current session
3295 */
3296 tANI_U8 bssIdx;
3297} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3298
Jeff Johnson295189b2012-06-20 16:38:30 -07003299
3300#define SIR_MAX_NAME_SIZE 64
3301#define SIR_MAX_TEXT_SIZE 32
3302
3303typedef struct sSirName {
3304 v_U8_t num_name;
3305 v_U8_t name[SIR_MAX_NAME_SIZE];
3306} tSirName;
3307
3308typedef struct sSirText {
3309 v_U8_t num_text;
3310 v_U8_t text[SIR_MAX_TEXT_SIZE];
3311} tSirText;
3312
3313
3314#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3315#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3316#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3317#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3318#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3319#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3320#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3321#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3322#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3323#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3324#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3325#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3326#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3327#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3328#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3329#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3330
3331
3332typedef struct sSirWPSProbeRspIE {
3333 v_U32_t FieldPresent;
3334 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3335 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3336 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3337 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3338 v_U16_t DevicePasswordID; // Device Password ID
3339 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3340 v_U8_t ResponseType; // Response type
3341 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3342 tSirName Manufacture;
3343 tSirText ModelName;
3344 tSirText ModelNumber;
3345 tSirText SerialNumber;
3346 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3347 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3348 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3349 tSirText DeviceName;
3350 v_U16_t ConfigMethod; // Configuaration method
3351 v_U8_t RFBand; // RF bands available on the AP
3352} tSirWPSProbeRspIE;
3353
3354#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3355#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3356#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3357#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3358#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3359#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3360#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3361#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3362
3363typedef struct sSirWPSBeaconIE {
3364 v_U32_t FieldPresent;
3365 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3366 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3367 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3368 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3369 v_U16_t DevicePasswordID; // Device Password ID
3370 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3371 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3372 v_U8_t RFBand; // RF bands available on the AP
3373} tSirWPSBeaconIE;
3374
3375#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3376#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3377
3378typedef struct sSirWPSAssocRspIE {
3379 v_U32_t FieldPresent;
3380 v_U32_t Version;
3381 v_U8_t ResposeType;
3382} tSirWPSAssocRspIE;
3383
3384typedef struct sSirAPWPSIEs {
3385 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3386 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3387 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3388} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3389
3390typedef struct sSirUpdateAPWPSIEsReq
3391{
3392 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3393 tANI_U16 length;
3394 tANI_U16 transactionId; //Transaction ID for cmd
3395 tSirMacAddr bssId; // BSSID
3396 tANI_U8 sessionId; //Session ID
3397 tSirAPWPSIEs APWPSIEs;
3398} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3399
3400typedef struct sSirUpdateParams
3401{
3402 tANI_U16 messageType;
3403 tANI_U16 length;
3404 tANI_U8 sessionId; // Session ID
3405 tANI_U8 ssidHidden; // Hide SSID
3406} tSirUpdateParams, *tpSirUpdateParams;
3407
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003408//Beacon Interval
3409typedef struct sSirChangeBIParams
3410{
3411 tANI_U16 messageType;
3412 tANI_U16 length;
3413 tANI_U16 beaconInterval; // Beacon Interval
3414 tSirMacAddr bssId;
3415 tANI_U8 sessionId; // Session ID
3416} tSirChangeBIParams, *tpSirChangeBIParams;
3417
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303418typedef struct sSirOBSSHT40Param
3419{
3420 tANI_U16 OBSSScanPassiveDwellTime;
3421 tANI_U16 OBSSScanActiveDwellTime;
3422 tANI_U16 BSSChannelWidthTriggerScanInterval;
3423 tANI_U16 OBSSScanPassiveTotalPerChannel;
3424 tANI_U16 OBSSScanActiveTotalPerChannel;
3425 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3426 tANI_U16 OBSSScanActivityThreshold;
3427}tSirOBSSHT40Param, *tpOBSSHT40Param;
3428
Jeff Johnson295189b2012-06-20 16:38:30 -07003429#define SIR_WPS_UUID_LEN 16
3430#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3431
3432typedef struct sSirWPSPBCSession {
3433 struct sSirWPSPBCSession *next;
3434 tSirMacAddr addr;
3435 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3436 tANI_TIMESTAMP timestamp;
3437} tSirWPSPBCSession;
3438
3439typedef struct sSirSmeGetWPSPBCSessionsReq
3440{
3441 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3442 tANI_U16 length;
3443 void *pUsrContext;
3444 void *pSapEventCallback;
3445 tSirMacAddr bssId; // BSSID
3446 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3447} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3448
3449typedef struct sSirWPSPBCProbeReq
3450{
3451 tSirMacAddr peerMacAddr;
3452 tANI_U16 probeReqIELen;
3453 tANI_U8 probeReqIE[512];
3454} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3455
3456// probereq from peer, when wsc is enabled
3457typedef struct sSirSmeProbeReqInd
3458{
3459 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3460 tANI_U16 length;
3461 tANI_U8 sessionId;
3462 tSirMacAddr bssId;
3463 tSirWPSPBCProbeReq WPSPBCProbeReq;
3464} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3465
3466typedef struct sSirUpdateAPWPARSNIEsReq
3467{
3468 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3469 tANI_U16 length;
3470 tANI_U16 transactionId; //Transaction ID for cmd
3471 tSirMacAddr bssId; // BSSID
3472 tANI_U8 sessionId; //Session ID
3473 tSirRSNie APWPARSNIEs;
3474} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3475
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003476#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003477#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003478#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3479#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3480#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3481#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3482#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3483#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3484#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003485
3486/*Adaptive Thresholds to be used for FW based scanning*/
3487#define LFR_SENSITIVITY_THR_1MBPS -89
3488#define LFR_LOOKUP_THR_1MBPS -78
3489#define LFR_SENSITIVITY_THR_2MBPS -87
3490#define LFR_LOOKUP_THR_2MBPS -78
3491#define LFR_SENSITIVITY_THR_5_5MBPS -86
3492#define LFR_LOOKUP_THR_5_5MBPS -77
3493#define LFR_SENSITIVITY_THR_11MBPS -85
3494#define LFR_LOOKUP_THR_11MBPS -76
3495#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3496#define LFR_LOOKUP_THR_6MBPS_2G -78
3497#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3498#define LFR_LOOKUP_THR_6MBPS_5G -78
3499#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3500#define LFR_LOOKUP_THR_12MBPS_2G -78
3501#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3502#define LFR_LOOKUP_THR_12MBPS_5G -76
3503#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3504#define LFR_LOOKUP_THR_24MBPS_2G -76
3505#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3506#define LFR_LOOKUP_THR_24MBPS_5G -74
3507#define LFR_SENSITIVITY_THR_DEFAULT 0
3508#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003509#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003510
3511// SME -> HAL - This is the host offload request.
3512#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3513#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3514#define SIR_IPV6_NS_OFFLOAD 2
3515#define SIR_OFFLOAD_DISABLE 0
3516#define SIR_OFFLOAD_ENABLE 1
3517#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303518#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003519#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303520#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003521
3522#ifdef WLAN_NS_OFFLOAD
3523typedef struct sSirNsOffloadReq
3524{
3525 tANI_U8 srcIPv6Addr[16];
3526 tANI_U8 selfIPv6Addr[16];
3527 //Only support 2 possible Network Advertisement IPv6 address
3528 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3529 tANI_U8 selfMacAddr[6];
3530 tANI_U8 srcIPv6AddrValid;
3531 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303532 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003533} tSirNsOffloadReq, *tpSirNsOffloadReq;
3534#endif //WLAN_NS_OFFLOAD
3535
3536typedef struct sSirHostOffloadReq
3537{
3538 tANI_U8 offloadType;
3539 tANI_U8 enableOrDisable;
3540 union
3541 {
3542 tANI_U8 hostIpv4Addr [4];
3543 tANI_U8 hostIpv6Addr [16];
3544 } params;
3545#ifdef WLAN_NS_OFFLOAD
3546 tSirNsOffloadReq nsOffloadInfo;
3547#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003548 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003549} tSirHostOffloadReq, *tpSirHostOffloadReq;
3550
3551/* Packet Types. */
3552#define SIR_KEEP_ALIVE_NULL_PKT 1
3553#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3554
3555/* Enable or disable offload. */
3556#define SIR_KEEP_ALIVE_DISABLE 0
3557#define SIR_KEEP_ALIVE_ENABLE 1
3558
3559/* Keep Alive request. */
3560typedef struct sSirKeepAliveReq
3561{
3562 v_U8_t packetType;
3563 v_U32_t timePeriod;
3564 tSirIpv4Addr hostIpv4Addr;
3565 tSirIpv4Addr destIpv4Addr;
3566 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003567 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003568} tSirKeepAliveReq, *tpSirKeepAliveReq;
3569
3570typedef struct sSirSmeAddStaSelfReq
3571{
3572 tANI_U16 mesgType;
3573 tANI_U16 mesgLen;
3574 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003575 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003576}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3577
3578typedef struct sSirSmeDelStaSelfReq
3579{
3580 tANI_U16 mesgType;
3581 tANI_U16 mesgLen;
3582 tSirMacAddr selfMacAddr;
3583}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3584
3585typedef struct sSirSmeAddStaSelfRsp
3586{
3587 tANI_U16 mesgType;
3588 tANI_U16 mesgLen;
3589 tANI_U16 status;
3590 tSirMacAddr selfMacAddr;
3591}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3592
3593typedef struct sSirSmeDelStaSelfRsp
3594{
3595 tANI_U16 mesgType;
3596 tANI_U16 mesgLen;
3597 tANI_U16 status;
3598 tSirMacAddr selfMacAddr;
3599}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3600
3601/* Coex Indication defines -
3602 should match WLAN_COEX_IND_DATA_SIZE
3603 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3604 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3605#define SIR_COEX_IND_DATA_SIZE (4)
3606#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3607#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003608#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3609#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003610#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3611#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Jeff Johnson295189b2012-06-20 16:38:30 -07003612
3613typedef struct sSirSmeCoexInd
3614{
3615 tANI_U16 mesgType;
3616 tANI_U16 mesgLen;
3617 tANI_U32 coexIndType;
3618 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3619}tSirSmeCoexInd, *tpSirSmeCoexInd;
3620
Jeff Johnson295189b2012-06-20 16:38:30 -07003621typedef struct sSirSmeMgmtFrameInd
3622{
3623 tANI_U16 mesgType;
3624 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303625 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003626 tANI_U8 sessionId;
3627 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303628 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003629 tANI_U8 frameBuf[1]; //variable
3630}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003631
Chet Lanctot186b5732013-03-18 10:26:30 -07003632#ifdef WLAN_FEATURE_11W
3633typedef struct sSirSmeUnprotMgmtFrameInd
3634{
3635 tANI_U8 sessionId;
3636 tANI_U8 frameType;
3637 tANI_U8 frameLen;
3638 tANI_U8 frameBuf[1]; //variable
3639}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3640#endif
3641
Jeff Johnson295189b2012-06-20 16:38:30 -07003642#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3643 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3644 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3645 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3646#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3647 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3648
3649/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003650typedef struct sSirNoAParam
3651{
3652 tANI_U8 ctWindow:7;
3653 tANI_U8 OppPS:1;
3654 tANI_U8 count;
3655 tANI_U32 duration;
3656 tANI_U32 interval;
3657 tANI_U32 singleNoADuration;
3658 tANI_U8 psSelection;
3659}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003660
Jeff Johnson295189b2012-06-20 16:38:30 -07003661typedef struct sSirWlanSuspendParam
3662{
3663 tANI_U8 configuredMcstBcstFilterSetting;
3664}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3665
3666typedef struct sSirWlanResumeParam
3667{
3668 tANI_U8 configuredMcstBcstFilterSetting;
3669}tSirWlanResumeParam,*tpSirWlanResumeParam;
3670
3671typedef struct sSirWlanSetRxpFilters
3672{
3673 tANI_U8 configuredMcstBcstFilterSetting;
3674 tANI_U8 setMcstBcstFilter;
3675}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003676
3677
3678#ifdef FEATURE_WLAN_SCAN_PNO
3679//
3680// PNO Messages
3681//
3682
3683// Set PNO
3684#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303685#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003686#define SIR_PNO_MAX_SUPP_NETWORKS 16
3687#define SIR_PNO_MAX_SCAN_TIMERS 10
3688
3689/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3690#define SIR_PNO_MAX_PB_REQ_SIZE 450
3691
3692#define SIR_PNO_24G_DEFAULT_CH 1
3693#define SIR_PNO_5G_DEFAULT_CH 36
3694
3695typedef enum
3696{
3697 SIR_PNO_MODE_IMMEDIATE,
3698 SIR_PNO_MODE_ON_SUSPEND,
3699 SIR_PNO_MODE_ON_RESUME,
3700 SIR_PNO_MODE_MAX
3701} eSirPNOMode;
3702
3703typedef struct
3704{
3705 tSirMacSSid ssId;
3706 tANI_U32 authentication;
3707 tANI_U32 encryption;
3708 tANI_U32 bcastNetwType;
3709 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303710 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003711 tANI_U8 rssiThreshold;
3712} tSirNetworkType;
3713
3714typedef struct
3715{
3716 tANI_U32 uTimerValue;
3717 tANI_U32 uTimerRepeat;
3718}tSirScanTimer;
3719
3720typedef struct
3721{
3722 tANI_U8 ucScanTimersCount;
3723 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3724} tSirScanTimersType;
3725
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303726/*Pref Net Req status */
3727typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
3728
3729
Jeff Johnson295189b2012-06-20 16:38:30 -07003730typedef struct sSirPNOScanReq
3731{
3732 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303733 PNOReqStatusCb statusCallback;
3734 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07003735 eSirPNOMode modePNO;
3736 tANI_U8 ucNetworksCount;
3737 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
3738 tSirScanTimersType scanTimers;
3739
3740 /*added by SME*/
3741 tANI_U16 us24GProbeTemplateLen;
3742 tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3743 tANI_U16 us5GProbeTemplateLen;
3744 tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
3745} tSirPNOScanReq, *tpSirPNOScanReq;
3746
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003747typedef struct sSirSetRSSIFilterReq
3748{
3749 tANI_U8 rssiThreshold;
3750} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3751
3752
3753// Update Scan Params
3754typedef struct {
3755 tANI_U8 b11dEnabled;
3756 tANI_U8 b11dResolved;
3757 tANI_U8 ucChannelCount;
3758 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3759 tANI_U16 usPassiveMinChTime;
3760 tANI_U16 usPassiveMaxChTime;
3761 tANI_U16 usActiveMinChTime;
3762 tANI_U16 usActiveMaxChTime;
3763 tANI_U8 ucCBState;
3764} tSirUpdateScanParams, * tpSirUpdateScanParams;
3765
3766// Preferred Network Found Indication
3767typedef struct
3768{
3769 tANI_U16 mesgType;
3770 tANI_U16 mesgLen;
3771 /* Network that was found with the highest RSSI*/
3772 tSirMacSSid ssId;
3773 /* Indicates the RSSI */
3774 tANI_U8 rssi;
3775 /* Length of the beacon or probe response
3776 * corresponding to the candidate found by PNO */
3777 tANI_U32 frameLength;
3778 /* Index to memory location where the contents of
3779 * beacon or probe response frame will be copied */
3780 tANI_U8 data[1];
3781} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3782#endif //FEATURE_WLAN_SCAN_PNO
3783
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003784#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3785typedef struct
3786{
3787 tSirMacSSid ssId;
3788 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3789 tANI_U32 authentication;
3790 tANI_U8 encryption;
3791 tANI_U8 mcencryption;
3792 tANI_U8 ChannelCount;
3793 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3794
3795} tSirRoamNetworkType;
3796
3797typedef struct SirMobilityDomainInfo
3798{
3799 tANI_U8 mdiePresent;
3800 tANI_U16 mobilityDomain;
3801} tSirMobilityDomainInfo;
3802
3803typedef struct sSirRoamOffloadScanReq
3804{
3805 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003806 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003807 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003808 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003809 tANI_U8 RoamRssiDiff;
3810 tANI_U8 ChannelCacheType;
3811 tANI_U8 Command;
3812 tANI_U8 StartScanReason;
3813 tANI_U16 NeighborScanTimerPeriod;
3814 tANI_U16 NeighborRoamScanRefreshPeriod;
3815 tANI_U16 NeighborScanChannelMinTime;
3816 tANI_U16 NeighborScanChannelMaxTime;
3817 tANI_U16 EmptyRefreshScanPeriod;
3818 tANI_U8 ValidChannelCount;
3819 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003820 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003821 tANI_U16 us24GProbeTemplateLen;
3822 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3823 tANI_U16 us5GProbeTemplateLen;
3824 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003825 tANI_U8 nProbes;
3826 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003827 tSirRoamNetworkType ConnectedNetwork;
3828 tSirMobilityDomainInfo MDID;
3829} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003830#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003831
3832#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3833
3834//Power Parameters Type
3835typedef enum
3836{
3837 eSIR_IGNORE_DTIM = 1,
3838 eSIR_LISTEN_INTERVAL = 2,
3839 eSIR_MCAST_BCAST_FILTER = 3,
3840 eSIR_ENABLE_BET = 4,
3841 eSIR_BET_INTERVAL = 5
3842}tPowerParamType;
3843
3844//Power Parameters Value s
3845typedef struct
3846{
3847 /* Ignore DTIM */
3848 tANI_U32 uIgnoreDTIM;
3849
3850 /* DTIM Period */
3851 tANI_U32 uDTIMPeriod;
3852
3853 /* Listen Interval */
3854 tANI_U32 uListenInterval;
3855
3856 /* Broadcast Multicas Filter */
3857 tANI_U32 uBcastMcastFilter;
3858
3859 /* Beacon Early Termination */
3860 tANI_U32 uEnableBET;
3861
3862 /* Beacon Early Termination Interval */
3863 tANI_U32 uBETInterval;
3864
Yue Mac24062f2013-05-13 17:01:29 -07003865 /* MAX LI for modulated DTIM */
3866 tANI_U32 uMaxLIModulatedDTIM;
3867
Jeff Johnson295189b2012-06-20 16:38:30 -07003868}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3869
3870typedef struct sSirTxPerTrackingParam
3871{
3872 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3873 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3874 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 */
3875 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3876}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3877
3878#ifdef WLAN_FEATURE_PACKET_FILTERING
3879/*---------------------------------------------------------------------------
3880 Packet Filtering Parameters
3881---------------------------------------------------------------------------*/
3882#define SIR_IPV4_ADDR_LEN 4
3883#define SIR_MAC_ADDR_LEN 6
3884#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3885#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3886#define SIR_MAX_NUM_FILTERS 20
3887#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3888
3889//
3890// Receive Filter Parameters
3891//
3892typedef enum
3893{
3894 SIR_RCV_FILTER_TYPE_INVALID,
3895 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3896 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3897 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3898}eSirReceivePacketFilterType;
3899
3900typedef enum
3901{
3902 SIR_FILTER_HDR_TYPE_INVALID,
3903 SIR_FILTER_HDR_TYPE_MAC,
3904 SIR_FILTER_HDR_TYPE_ARP,
3905 SIR_FILTER_HDR_TYPE_IPV4,
3906 SIR_FILTER_HDR_TYPE_IPV6,
3907 SIR_FILTER_HDR_TYPE_UDP,
3908 SIR_FILTER_HDR_TYPE_MAX
3909}eSirRcvPktFltProtocolType;
3910
3911typedef enum
3912{
3913 SIR_FILTER_CMP_TYPE_INVALID,
3914 SIR_FILTER_CMP_TYPE_EQUAL,
3915 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3916 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3917 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3918 SIR_FILTER_CMP_TYPE_MAX
3919}eSirRcvPktFltCmpFlagType;
3920
3921typedef struct sSirRcvPktFilterFieldParams
3922{
3923 eSirRcvPktFltProtocolType protocolLayer;
3924 eSirRcvPktFltCmpFlagType cmpFlag;
3925 /* Length of the data to compare */
3926 tANI_U16 dataLength;
3927 /* from start of the respective frame header */
3928 tANI_U8 dataOffset;
3929 /* Reserved field */
3930 tANI_U8 reserved;
3931 /* Data to compare */
3932 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3933 /* Mask to be applied on the received packet data before compare */
3934 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3935}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3936
3937typedef struct sSirRcvPktFilterCfg
3938{
3939 tANI_U8 filterId;
3940 eSirReceivePacketFilterType filterType;
3941 tANI_U32 numFieldParams;
3942 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003943 tSirMacAddr selfMacAddr;
3944 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003945 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003946}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3947
3948//
3949// Filter Packet Match Count Parameters
3950//
3951typedef struct sSirRcvFltPktMatchCnt
3952{
3953 tANI_U8 filterId;
3954 tANI_U32 matchCnt;
3955} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3956
3957typedef struct sSirRcvFltPktMatchRsp
3958{
3959 tANI_U16 mesgType;
3960 tANI_U16 mesgLen;
3961
3962 /* Success or Failure */
3963 tANI_U32 status;
3964 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003965 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003966} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3967
3968//
3969// Receive Filter Clear Parameters
3970//
3971typedef struct sSirRcvFltPktClearParam
3972{
3973 tANI_U32 status; /* only valid for response message */
3974 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07003975 tSirMacAddr selfMacAddr;
3976 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003977}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3978
3979//
3980// Multicast Address List Parameters
3981//
3982typedef struct sSirRcvFltMcAddrList
3983{
3984 tANI_U32 ulMulticastAddrCnt;
3985 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07003986 tSirMacAddr selfMacAddr;
3987 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003988} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3989#endif // WLAN_FEATURE_PACKET_FILTERING
3990
3991//
3992// Generic version information
3993//
3994typedef struct
3995{
3996 tANI_U8 revision;
3997 tANI_U8 version;
3998 tANI_U8 minor;
3999 tANI_U8 major;
4000} tSirVersionType;
4001
4002typedef struct sAniBtAmpLogLinkReq
4003{
4004 // Common for all types are requests
4005 tANI_U16 msgType; // message type is same as the request type
4006 tANI_U16 msgLen; // length of the entire request
4007 tANI_U8 sessionId; //sme Session Id
4008 void *btampHandle; //AMP context
4009
4010} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
4011
4012#ifdef WLAN_FEATURE_GTK_OFFLOAD
4013/*---------------------------------------------------------------------------
4014* WDA_GTK_OFFLOAD_REQ
4015*--------------------------------------------------------------------------*/
4016typedef struct
4017{
4018 tANI_U32 ulFlags; /* optional flags */
4019 tANI_U8 aKCK[16]; /* Key confirmation key */
4020 tANI_U8 aKEK[16]; /* key encryption key */
4021 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004022 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004023} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4024
4025/*---------------------------------------------------------------------------
4026* WDA_GTK_OFFLOAD_GETINFO_REQ
4027*--------------------------------------------------------------------------*/
4028typedef struct
4029{
4030 tANI_U16 mesgType;
4031 tANI_U16 mesgLen;
4032
4033 tANI_U32 ulStatus; /* success or failure */
4034 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4035 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4036 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4037 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004038 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004039} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4040#endif // WLAN_FEATURE_GTK_OFFLOAD
4041
4042#ifdef WLAN_WAKEUP_EVENTS
4043/*---------------------------------------------------------------------------
4044 tSirWakeReasonInd
4045---------------------------------------------------------------------------*/
4046typedef struct
4047{
4048 tANI_U16 mesgType;
4049 tANI_U16 mesgLen;
4050 tANI_U32 ulReason; /* see tWakeReasonType */
4051 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4052 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4053 HAL truncates the data (i.e. data packets) this length
4054 will be less than the actual length */
4055 tANI_U32 ulActualDataLen; /* actual length of data */
4056 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4057 see specific wake type */
4058} tSirWakeReasonInd, *tpSirWakeReasonInd;
4059#endif // WLAN_WAKEUP_EVENTS
4060
4061/*---------------------------------------------------------------------------
4062 sAniSetTmLevelReq
4063---------------------------------------------------------------------------*/
4064typedef struct sAniSetTmLevelReq
4065{
4066 tANI_U16 tmMode;
4067 tANI_U16 newTmLevel;
4068} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4069
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004070#ifdef FEATURE_WLAN_TDLS
4071/* TDLS Request struct SME-->PE */
4072typedef struct sSirTdlsSendMgmtReq
4073{
4074 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4075 tANI_U16 length;
4076 tANI_U8 sessionId; // Session ID
4077 tANI_U16 transactionId; // Transaction ID for cmd
4078 tANI_U8 reqType;
4079 tANI_U8 dialog;
4080 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004081 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304082 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004083 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4084 tSirMacAddr peerMac;
4085 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4086} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004087
4088typedef enum TdlsAddOper
4089{
4090 TDLS_OPER_NONE,
4091 TDLS_OPER_ADD,
4092 TDLS_OPER_UPDATE
4093} eTdlsAddOper;
4094
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004095/* TDLS Request struct SME-->PE */
4096typedef struct sSirTdlsAddStaReq
4097{
4098 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4099 tANI_U16 length;
4100 tANI_U8 sessionId; // Session ID
4101 tANI_U16 transactionId; // Transaction ID for cmd
4102 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004103 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004104 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004105 tANI_U16 capability;
4106 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4107 tANI_U8 supported_rates_length;
4108 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004109 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004110 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004111 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004112 tSirVHTCap vhtCap;
4113 tANI_U8 uapsd_queues;
4114 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004115} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004116
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004117/* TDLS Response struct PE-->SME */
4118typedef struct sSirTdlsAddStaRsp
4119{
4120 tANI_U16 messageType;
4121 tANI_U16 length;
4122 tSirResultCodes statusCode;
4123 tSirMacAddr peerMac;
4124 tANI_U8 sessionId; // Session ID
4125 tANI_U16 staId ;
4126 tANI_U16 staType ;
4127 tANI_U8 ucastSig;
4128 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004129 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004130} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304131
4132/* TDLS Request struct SME-->PE */
4133typedef struct
4134{
4135 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4136 tANI_U16 length;
4137 tANI_U8 sessionId; // Session ID
4138 tANI_U16 transactionId; // Transaction ID for cmd
4139 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4140 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4141 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304142 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304143 tANI_U8 isResponder; // Is Peer a responder.
4144 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4145 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304146 tANI_U8 supportedChannelsLen;
4147 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4148 tANI_U8 supportedOperClassesLen;
4149 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304150}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4151
4152/* TDLS Request struct SME-->PE */
4153typedef struct
4154{
4155 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4156 tANI_U16 length;
4157 tANI_U8 sessionId; // Session ID
4158 tANI_U16 transactionId; // Transaction ID for cmd
4159 tSirResultCodes statusCode;
4160 tSirMacAddr peerMac;
4161}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4162
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004163/* TDLS Request struct SME-->PE */
4164typedef struct sSirTdlsDelStaReq
4165{
4166 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4167 tANI_U16 length;
4168 tANI_U8 sessionId; // Session ID
4169 tANI_U16 transactionId; // Transaction ID for cmd
4170 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4171 tSirMacAddr peerMac;
4172} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4173/* TDLS Response struct PE-->SME */
4174typedef struct sSirTdlsDelStaRsp
4175{
4176 tANI_U16 messageType;
4177 tANI_U16 length;
4178 tANI_U8 sessionId; // Session ID
4179 tSirResultCodes statusCode;
4180 tSirMacAddr peerMac;
4181 tANI_U16 staId;
4182} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004183/* TDLS Delete Indication struct PE-->SME */
4184typedef struct sSirTdlsDelStaInd
4185{
4186 tANI_U16 messageType;
4187 tANI_U16 length;
4188 tANI_U8 sessionId; // Session ID
4189 tSirMacAddr peerMac;
4190 tANI_U16 staId;
4191 tANI_U16 reasonCode;
4192} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004193typedef struct sSirTdlsDelAllPeerInd
4194{
4195 tANI_U16 messageType;
4196 tANI_U16 length;
4197 tANI_U8 sessionId; // Session ID
4198} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004199typedef struct sSirMgmtTxCompletionInd
4200{
4201 tANI_U16 messageType;
4202 tANI_U16 length;
4203 tANI_U8 sessionId; // Session ID
4204 tANI_U32 txCompleteStatus;
4205} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004206#endif /* FEATURE_WLAN_TDLS */
4207
4208#ifdef FEATURE_WLAN_TDLS_INTERNAL
4209typedef enum tdlsListType
4210{
4211 TDLS_DIS_LIST,
4212 TDLS_SETUP_LIST
4213}eTdlsListType ;
4214
4215typedef enum tdlsStates
4216{
4217 TDLS_LINK_IDLE_STATE,
4218 TDLS_LINK_DIS_INIT_STATE,
4219 TDLS_LINK_DIS_RSP_WAIT_STATE,
4220 TDLS_DIS_REQ_PROCESS_STATE,
4221 TDLS_DIS_RSP_SENT_WAIT_STATE,
4222 TDLS_DIS_RSP_SENT_DONE_STATE,
4223 TDLS_LINK_DIS_DONE_STATE,
4224 TDLS_LINK_SETUP_START_STATE,
4225 TDLS_LINK_SETUP_WAIT_STATE,
4226 TDLS_LINK_SETUP_RSP_WAIT_STATE,
4227 TDLS_LINK_SETUP_DONE_STATE,
4228 TDLS_LINK_TEARDOWN_START_STATE,
4229 TDLS_LINK_TEARDOWN_DONE_STATE,
4230 TDLS_LINK_SETUP_STATE
4231}eSirTdlsStates ;
4232
4233typedef struct sSirTdlsPeerInfo
4234{
4235 tSirMacAddr peerMac;
4236 tANI_U8 sessionId;
4237 tANI_U8 dialog ;
4238 tSirMacCapabilityInfo capabilityInfo ;
4239 tSirMacRateSet tdlsPeerSuppRates ;
4240 tSirMacRateSet tdlsPeerExtRates ;
4241 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4242 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4243 tSirMacHTParametersInfo tdlsPeerHtParams ;
4244 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4245 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4246
4247 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4248 tSirMacRsnInfo tdlsPeerRsn ;
4249 tANI_U16 tdlsPeerFtIe ;
4250 tANI_U16 tdlsPeerTimeoutIntvl ;
4251 tANI_U16 tdlsPeerSuppChan ;
4252 tANI_U16 tdlsPeerSuppReguClass ;
4253 tANI_S8 tdlsPeerRssi ;
4254 tANI_U16 tdlsPeerState ;
4255 /* flags to indicate optional IE's are in */
4256 tANI_U8 ExtRatesPresent ;
4257 tANI_U8 rsnIePresent ;
4258 tANI_U8 htCapPresent ;
4259 tANI_U8 delStaNeeded ;
4260
4261} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4262
4263/* TDLS Request struct SME-->PE */
4264typedef struct sSirTdlsDiscoveryReq
4265{
4266 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4267 tANI_U16 length;
4268 tANI_U8 sessionId; // Session ID
4269 tANI_U16 transactionId; // Transaction ID for cmd
4270 tANI_U8 reqType;
4271 tANI_U8 dialog;
4272 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4273 tSirMacAddr peerMac;
4274} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4275
4276typedef struct sSirTdlsLinkSetupReq
4277{
4278 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4279 tANI_U16 length;
4280 tANI_U8 sessionId; // Session ID
4281 tANI_U16 transactionId; // Transaction ID for cmd
4282 tANI_U8 dialog;
4283 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4284 tSirMacAddr peerMac;
4285} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4286
4287typedef struct sSirTdlsTeardownReq
4288{
4289 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4290 tANI_U16 length;
4291 tANI_U8 sessionId; // Session ID
4292 tANI_U16 transactionId; // Transaction ID for cmd
4293 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4294 tSirMacAddr peerMac;
4295} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4296
4297
4298/* TDLS response struct PE-->SME */
4299typedef struct sSirTdlsDiscoveryRsp
4300{
4301 tANI_U16 messageType;
4302 tANI_U16 length;
4303 tSirResultCodes statusCode;
4304 tANI_U16 numDisSta ;
4305 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4306} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4307
4308typedef struct sSirTdlsLinkSetupRsp
4309{
4310 tANI_U16 messageType;
4311 tANI_U16 length;
4312 tSirResultCodes statusCode;
4313 tSirMacAddr peerMac;
4314} tSirTdlsLinksetupRsp ;
4315
4316typedef struct sSirTdlsLinkSetupInd
4317{
4318 tANI_U16 messageType;
4319 tANI_U16 length;
4320 tSirResultCodes statusCode;
4321 tSirMacAddr peerMac;
4322} tSirTdlsLinkSetupInd ;
4323
4324
4325typedef struct sSirTdlsTeardownRsp
4326{
4327 tANI_U16 messageType;
4328 tANI_U16 length;
4329 tSirResultCodes statusCode;
4330 tSirMacAddr peerMac;
4331} tSirTdlsTeardownRsp ;
4332
4333typedef struct sSirTdlsPeerInd
4334{
4335 tANI_U16 messageType;
4336 tANI_U16 length;
4337 tSirMacAddr peerMac;
4338 tANI_U8 sessionId; // Session ID
4339 tANI_U16 staId ;
4340 tANI_U16 staType ;
4341 tANI_U8 ucastSig;
4342 tANI_U8 bcastSig;
4343} tSirTdlsPeerInd ;
4344
4345typedef struct sSirTdlsLinkEstablishInd
4346{
4347 tANI_U16 messageType;
4348 tANI_U16 length;
4349 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4350 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4351 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4352 tANI_U8 ptiTemplateLen;
4353 tANI_U8 ptiTemplateBuf[64];
4354 tANI_U8 extCapability[8];
4355/* This will be part of PTI template when sent by PE
4356 tANI_U8 linkIdentifier[20];
4357*/
4358} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4359
4360typedef struct sSirTdlsLinkTeardownInd
4361{
4362 tANI_U16 messageType;
4363 tANI_U16 length;
4364 tANI_U16 staId;
4365} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4366
4367#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4368
Yathish9f22e662012-12-10 14:21:35 -08004369typedef struct sSirActiveModeSetBcnFilterReq
4370{
4371 tANI_U16 messageType;
4372 tANI_U16 length;
4373 tANI_U8 seesionId;
4374} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4375
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304376typedef enum
4377{
4378 HT40_OBSS_SCAN_PARAM_START,
4379 HT40_OBSS_SCAN_PARAM_UPDATE
4380}tHT40OBssScanCmdType;
4381
4382typedef struct sSirSmeHT40StopOBSSScanInd
4383{
4384 tANI_U16 messageType;
4385 tANI_U16 length;
4386 tANI_U8 seesionId;
4387} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4388
4389typedef struct sSirSmeHT40OBSSScanInd
4390{
4391 tANI_U16 messageType;
4392 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304393 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304394} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4395
4396typedef struct sSirHT40OBSSScanInd
4397{
4398 tHT40OBssScanCmdType cmdType;
4399 tSirScanType scanType;
4400 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4401 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4402 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4403 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4404 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4405 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4406 tANI_U16 OBSSScanActivityThreshold;
4407 tANI_U8 selfStaIdx;
4408 tANI_U8 bssIdx;
4409 tANI_U8 fortyMHZIntolerent;
4410 tANI_U8 channelCount;
4411 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4412 tANI_U8 currentOperatingClass;
4413 tANI_U16 ieFieldLen;
4414 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4415} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4416
4417
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304418//Reset AP Caps Changed
4419typedef struct sSirResetAPCapsChange
4420{
4421 tANI_U16 messageType;
4422 tANI_U16 length;
4423 tSirMacAddr bssId;
4424} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004425/// Definition for Candidate found indication from FW
4426typedef struct sSirSmeCandidateFoundInd
4427{
4428 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4429 tANI_U16 length;
4430 tANI_U8 sessionId; // Session Identifier
4431} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004432
Chet Lanctot186b5732013-03-18 10:26:30 -07004433#ifdef WLAN_FEATURE_11W
4434typedef struct sSirWlanExcludeUnencryptParam
4435{
4436 tANI_BOOLEAN excludeUnencrypt;
4437 tSirMacAddr bssId;
4438}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4439#endif
4440
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004441typedef struct sAniHandoffReq
4442{
4443 // Common for all types are requests
4444 tANI_U16 msgType; // message type is same as the request type
4445 tANI_U16 msgLen; // length of the entire request
4446 tANI_U8 sessionId;
4447 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4448 tANI_U8 channel;
4449} tAniHandoffReq, *tpAniHandoffReq;
4450
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304451typedef struct sSirScanOffloadReq {
4452 tANI_U8 sessionId;
4453 tSirMacAddr bssId;
4454 tANI_U8 numSsid;
4455 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4456 tANI_U8 hiddenSsid;
4457 tSirMacAddr selfMacAddr;
4458 tSirBssType bssType;
4459 tANI_U8 dot11mode;
4460 tSirScanType scanType;
4461 tANI_U32 minChannelTime;
4462 tANI_U32 maxChannelTime;
4463 tANI_BOOLEAN p2pSearch;
4464 tANI_U16 uIEFieldLen;
4465 tANI_U16 uIEFieldOffset;
4466 tSirChannelList channelList;
4467 /*-----------------------------
4468 sSirScanOffloadReq....
4469 -----------------------------
4470 uIEFieldLen
4471 -----------------------------
4472 uIEFieldOffset ----+
4473 ----------------------------- |
4474 channelList.numChannels |
4475 ----------------------------- |
4476 ... variable size up to |
4477 channelNumber[numChannels-1] |
4478 This can be zero, if |
4479 numChannel is zero. |
4480 ----------------------------- <--+
4481 ... variable size uIEField
4482 up to uIEFieldLen (can be 0)
4483 -----------------------------*/
4484} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304485
4486typedef enum sSirScanEventType {
4487 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4488 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4489 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4490 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4491 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4492 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4493 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4494 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4495 SCAN_EVENT_MAX=0x8000
4496} tSirScanEventType;
4497
4498typedef struct sSirScanOffloadEvent{
4499 tSirScanEventType event;
4500 tSirResultCodes reasonCode;
4501 tANI_U32 chanFreq;
4502 tANI_U32 requestor;
4503 tANI_U32 scanId;
4504} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4505
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304506typedef struct sSirUpdateChanParam
4507{
4508 tANI_U8 chanId;
4509 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004510 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304511} tSirUpdateChanParam, *tpSirUpdateChanParam;
4512
4513typedef struct sSirUpdateChan
4514{
4515 tANI_U8 numChan;
4516 tSirUpdateChanParam chanParam[1];
4517} tSirUpdateChanList, *tpSirUpdateChanList;
4518
Leo Chang9056f462013-08-01 19:21:11 -07004519#ifdef FEATURE_WLAN_LPHB
4520#define SIR_LPHB_FILTER_LEN 64
4521
4522typedef enum
4523{
4524 LPHB_SET_EN_PARAMS_INDID,
4525 LPHB_SET_TCP_PARAMS_INDID,
4526 LPHB_SET_TCP_PKT_FILTER_INDID,
4527 LPHB_SET_UDP_PARAMS_INDID,
4528 LPHB_SET_UDP_PKT_FILTER_INDID,
4529 LPHB_SET_NETWORK_INFO_INDID,
4530} LPHBIndType;
4531
4532typedef struct sSirLPHBEnableStruct
4533{
4534 v_U8_t enable;
4535 v_U8_t item;
4536 v_U8_t session;
4537} tSirLPHBEnableStruct;
4538
4539typedef struct sSirLPHBTcpParamStruct
4540{
4541 v_U32_t srv_ip;
4542 v_U32_t dev_ip;
4543 v_U16_t src_port;
4544 v_U16_t dst_port;
4545 v_U16_t timeout;
4546 v_U8_t session;
4547 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004548 uint16 timePeriodSec; // in seconds
4549 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004550} tSirLPHBTcpParamStruct;
4551
4552typedef struct sSirLPHBTcpFilterStruct
4553{
4554 v_U16_t length;
4555 v_U8_t offset;
4556 v_U8_t session;
4557 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4558} tSirLPHBTcpFilterStruct;
4559
4560typedef struct sSirLPHBUdpParamStruct
4561{
4562 v_U32_t srv_ip;
4563 v_U32_t dev_ip;
4564 v_U16_t src_port;
4565 v_U16_t dst_port;
4566 v_U16_t interval;
4567 v_U16_t timeout;
4568 v_U8_t session;
4569 tSirMacAddr gateway_mac;
4570} tSirLPHBUdpParamStruct;
4571
4572typedef struct sSirLPHBUdpFilterStruct
4573{
4574 v_U16_t length;
4575 v_U8_t offset;
4576 v_U8_t session;
4577 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4578} tSirLPHBUdpFilterStruct;
4579
4580typedef struct sSirLPHBReq
4581{
4582 v_U16_t cmd;
4583 v_U16_t dummy;
4584 union
4585 {
4586 tSirLPHBEnableStruct lphbEnableReq;
4587 tSirLPHBTcpParamStruct lphbTcpParamReq;
4588 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4589 tSirLPHBUdpParamStruct lphbUdpParamReq;
4590 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4591 } params;
4592} tSirLPHBReq;
4593
Leo Changd9df8aa2013-09-26 13:32:26 -07004594typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004595{
4596 v_U8_t sessionIdx;
4597 v_U8_t protocolType; /*TCP or UDP*/
4598 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004599} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004600#endif /* FEATURE_WLAN_LPHB */
4601
Yue Mab9c86f42013-08-14 15:59:08 -07004602typedef struct sSirAddPeriodicTxPtrn
4603{
4604 /* MAC Address for the adapter */
4605 tSirMacAddr macAddress;
4606
4607 tANI_U8 ucPtrnId; // Pattern ID
4608 tANI_U16 ucPtrnSize; // Pattern size
4609 tANI_U32 usPtrnIntervalMs; // In msec
4610 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4611} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4612
4613typedef struct sSirDelPeriodicTxPtrn
4614{
4615 /* MAC Address for the adapter */
4616 tSirMacAddr macAddress;
4617
4618 /* Bitmap of pattern IDs that need to be deleted */
4619 tANI_U32 ucPatternIdBitmap;
4620} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4621
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004622typedef struct sSirRateUpdateInd
4623{
4624 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4625 * param.
4626 */
4627 tANI_S32 ucastDataRate;
4628
4629 /* TX flag to differentiate between HT20, HT40 etc */
4630 tTxrateinfoflags ucastDataRateTxFlag;
4631
4632 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4633 tSirMacAddr bssid;
4634
4635 /*
4636 * 0 implies MCAST RA, positive value implies fixed rate,
4637 * -1 implies ignore this param
4638 */
4639 tANI_S32 reliableMcastDataRate;//unit Mbpsx10
4640
4641 /* TX flag to differentiate between HT20, HT40 etc */
4642 tTxrateinfoflags reliableMcastDataRateTxFlag;
4643
4644 /*
4645 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4646 * 0 implies ignore
4647 */
4648 tANI_U32 mcastDataRate24GHz;
4649
4650 /* TX flag to differentiate between HT20, HT40 etc */
4651 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4652
4653 /*
4654 * MCAST(or BCAST) fixed data rate in 5 GHz,
4655 * unit Mbpsx10, 0 implies ignore
4656 */
4657 tANI_U32 mcastDataRate5GHz;
4658
4659 /* TX flag to differentiate between HT20, HT40 etc */
4660 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4661
4662} tSirRateUpdateInd, *tpSirRateUpdateInd;
4663
Rajeev79dbe4c2013-10-05 11:03:42 +05304664#ifdef FEATURE_WLAN_BATCH_SCAN
4665// Set batch scan resposne from FW
4666typedef struct
4667{
4668 /*maximum number of scans which FW can cache*/
4669 tANI_U32 nScansToBatch;
4670} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4671
4672// Set batch scan request to FW
4673typedef struct
4674{
4675 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4676 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4677 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4678 tANI_U8 rfBand; /* band to scan :
4679 0 ->both Band, 1->2.4Ghz Only
4680 and 2-> 5GHz Only */
4681 tANI_U32 rtt; /* set if required to do RTT it is not
4682 supported in current version */
4683} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4684
4685
4686// Stop batch scan request to FW
4687typedef struct
4688{
4689 tANI_U32 param;
4690} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4691
4692// Trigger batch scan result indication to FW
4693typedef struct
4694{
4695 tANI_U32 param;
4696} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4697
4698// Batch scan result indication from FW
4699typedef PACKED_PRE struct PACKED_POST
4700{
4701 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08004702 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304703 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05304704 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05304705 /*Timestamp when Network was found. Used to calculate age based on timestamp
4706 in GET_RSP msg header */
4707 tANI_U32 timestamp;
4708} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4709
4710typedef PACKED_PRE struct PACKED_POST
4711{
4712 tANI_U32 scanId; /* Scan List ID. */
4713 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4714 tANI_U32 numNetworksInScanList;
4715 /*Variable data ptr: Number of AP in Scan List*/
4716 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4717 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4718 tANI_U8 scanList[1];
4719} tSirBatchScanList, *tpSirBatchScanList;
4720
4721typedef PACKED_PRE struct PACKED_POST
4722{
4723 tANI_U32 timestamp;
4724 tANI_U32 numScanLists;
4725 boolean isLastResult;
4726 /* Variable Data ptr: Number of Scan Lists*/
4727 /* following isLastResult is data of type tSirBatchScanList
4728 * of sizeof(tSirBatchScanList) * numScanLists*/
4729 tANI_U8 scanResults[1];
4730} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4731
4732#endif // FEATURE_WLAN_BATCH_SCAN
4733
Leo Chang0b0e45a2013-12-15 15:18:55 -08004734#ifdef FEATURE_WLAN_CH_AVOID
4735#define SIR_CH_AVOID_MAX_RANGE 4
4736
4737typedef struct sSirChAvoidFreqType
4738{
4739 tANI_U32 startFreq;
4740 tANI_U32 endFreq;
4741} tSirChAvoidFreqType;
4742
4743typedef struct sSirChAvoidIndType
4744{
4745 tANI_U32 avoidRangeCount;
4746 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
4747} tSirChAvoidIndType;
4748#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304749
c_hpothu92367912014-05-01 15:18:17 +05304750typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
4751 VOS_STATUS status, void *data);
4752
4753typedef PACKED_PRE struct PACKED_POST
4754{
4755 tANI_U32 msgLen;
4756 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4757 void *callback;
4758 void *data;
4759}tSirBcnMissRateReq;
4760
4761typedef PACKED_PRE struct PACKED_POST
4762{
4763 pGetBcnMissRateCB callback;
4764 void *data;
4765}tSirBcnMissRateInfo;
4766
Sunil Duttc69bccb2014-05-26 21:30:20 +05304767#ifdef WLAN_FEATURE_LINK_LAYER_STATS
4768
4769typedef struct
4770{
4771 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05304772 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304773 u32 mpduSizeThreshold;
4774 u32 aggressiveStatisticsGathering;
4775}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
4776
4777typedef struct
4778{
4779 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05304780 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304781 u32 paramIdMask;
4782}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
4783
4784typedef struct
4785{
4786 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05304787 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304788 u32 statsClearReqMask;
4789 u8 stopReq;
4790}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
4791
4792/*---------------------------------------------------------------------------
4793 WLAN_HAL_LL_NOTIFY_STATS
4794---------------------------------------------------------------------------*/
4795
4796
4797/******************************LINK LAYER Statistics**********************/
4798
4799typedef int tSirWifiRadio;
4800typedef int tSirWifiChannel;
4801typedef int tSirwifiTxRate;
4802
4803/* channel operating width */
4804typedef PACKED_PRE enum PACKED_POST
4805{
4806 WIFI_CHAN_WIDTH_20 = 0,
4807 WIFI_CHAN_WIDTH_40 = 1,
4808 WIFI_CHAN_WIDTH_80 = 2,
4809 WIFI_CHAN_WIDTH_160 = 3,
4810 WIFI_CHAN_WIDTH_80P80 = 4,
4811 WIFI_CHAN_WIDTH_5 = 5,
4812 WIFI_CHAN_WIDTH_10 = 6,
4813} tSirWifiChannelWidth;
4814
4815typedef PACKED_PRE enum PACKED_POST
4816{
4817 WIFI_DISCONNECTED = 0,
4818 WIFI_AUTHENTICATING = 1,
4819 WIFI_ASSOCIATING = 2,
4820 WIFI_ASSOCIATED = 3,
4821 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
4822 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
4823} tSirWifiConnectionState;
4824
4825typedef PACKED_PRE enum PACKED_POST
4826{
4827 WIFI_ROAMING_IDLE = 0,
4828 WIFI_ROAMING_ACTIVE = 1,
4829} tSirWifiRoamState;
4830
4831typedef PACKED_PRE enum PACKED_POST
4832{
4833 WIFI_INTERFACE_STA = 0,
4834 WIFI_INTERFACE_SOFTAP = 1,
4835 WIFI_INTERFACE_IBSS = 2,
4836 WIFI_INTERFACE_P2P_CLIENT = 3,
4837 WIFI_INTERFACE_P2P_GO = 4,
4838 WIFI_INTERFACE_NAN = 5,
4839 WIFI_INTERFACE_MESH = 6,
4840 } tSirWifiInterfaceMode;
4841
4842// set for QOS association
4843#define WIFI_CAPABILITY_QOS 0x00000001
4844// set for protected association (802.11 beacon frame control protected bit set)
4845#define WIFI_CAPABILITY_PROTECTED 0x00000002
4846// set if 802.11 Extended Capabilities element interworking bit is set
4847#define WIFI_CAPABILITY_INTERWORKING 0x00000004
4848// set for HS20 association
4849#define WIFI_CAPABILITY_HS20 0x00000008
4850// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
4851#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
4852// set is 802.11 Country Element is present
4853#define WIFI_CAPABILITY_COUNTRY 0x00000020
4854
4855typedef PACKED_PRE struct PACKED_POST
4856{
4857 /*tSirWifiInterfaceMode*/
4858 // interface mode
4859 tANI_U8 mode;
4860 // interface mac address (self)
4861 tSirMacAddr macAddr;
4862 /*tSirWifiConnectionState*/
4863 // connection state (valid for STA, CLI only)
4864 tANI_U8 state;
4865 /*tSirWifiRoamState*/
4866 // roaming state
4867 tANI_U8 roaming;
4868 // WIFI_CAPABILITY_XXX (self)
4869 tANI_U32 capabilities;
4870 // null terminated SSID
4871 tANI_U8 ssid[33];
4872 // bssid
4873 tSirMacAddr bssid;
4874 // country string advertised by AP
4875 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
4876 // country string for this association
4877 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
4878} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
4879
4880/* channel information */
4881typedef PACKED_PRE struct PACKED_POST
4882{
4883 // channel width (20, 40, 80, 80+80, 160)
4884 tSirWifiChannelWidth width;
4885 // primary 20 MHz channel
4886 tSirWifiChannel centerFreq;
4887 // center frequency (MHz) first segment
4888 tSirWifiChannel centerFreq0;
4889 // center frequency (MHz) second segment
4890 tSirWifiChannel centerFreq1;
4891} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
4892
4893/* wifi rate info */
4894typedef PACKED_PRE struct PACKED_POST
4895{
4896 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
4897 tANI_U32 preamble :3;
4898 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
4899 tANI_U32 nss :2;
4900 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
4901 tANI_U32 bw :3;
4902 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
4903 // HT/VHT it would be mcs index
4904 tANI_U32 rateMcsIdx :8;
4905 // reserved
4906 tANI_U32 reserved :16;
4907 // units of 100 Kbps
4908 tANI_U32 bitrate;
4909} tSirWifiRate, *tpSirWifiRate;
4910
4911/* channel statistics */
4912typedef PACKED_PRE struct PACKED_POST
4913{
4914 // channel
4915 tSirWifiChannelInfo channel;
4916 // msecs the radio is awake (32 bits number accruing over time)
4917 tANI_U32 onTime;
4918 // msecs the CCA register is busy (32 bits number accruing over time)
4919 tANI_U32 ccaBusyTime;
4920} tSirWifiChannelStats, *tpSirWifiChannelStats;
4921
4922/* radio statistics */
4923typedef PACKED_PRE struct PACKED_POST
4924{
4925 // wifi radio (if multiple radio supported)
4926 tSirWifiRadio radio;
4927 // msecs the radio is awake (32 bits number accruing over time)
4928 tANI_U32 onTime;
4929 /* msecs the radio is transmitting
4930 * (32 bits number accruing over time)
4931 */
4932 tANI_U32 txTime;
4933 /* msecs the radio is in active receive
4934 *(32 bits number accruing over time)
4935 */
4936 tANI_U32 rxTime;
4937 /* msecs the radio is awake due to all scan
4938 * (32 bits number accruing over time)
4939 */
4940 tANI_U32 onTimeScan;
4941 /* msecs the radio is awake due to NAN
4942 * (32 bits number accruing over time)
4943 */
4944 tANI_U32 onTimeNbd;
Dino Mycle2c198072014-06-10 10:15:52 +05304945 /* msecs the radio is awake due to EXTScan
Sunil Duttc69bccb2014-05-26 21:30:20 +05304946 * (32 bits number accruing over time)
4947 */
Dino Mycle2c198072014-06-10 10:15:52 +05304948 tANI_U32 onTimeEXTScan;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304949 /* msecs the radio is awake due to roam?scan
4950 * (32 bits number accruing over time)
4951 */
4952 tANI_U32 onTimeRoamScan;
4953 /* msecs the radio is awake due to PNO scan
4954 * (32 bits number accruing over time)
4955 */
4956 tANI_U32 onTimePnoScan;
4957 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
4958 * (32 bits number accruing over time)
4959 */
4960 tANI_U32 onTimeHs20;
4961 // number of channels
4962 tANI_U32 numChannels;
4963 // channel statistics tSirWifiChannelStats
4964 tSirWifiChannelStats channels[1];
4965} tSirWifiRadioStat, *tpSirWifiRadioStat;
4966
4967/* per rate statistics */
4968typedef PACKED_PRE struct PACKED_POST
4969{
4970 // rate information
4971 tSirWifiRate rate;
4972 // number of successfully transmitted data pkts (ACK rcvd)
4973 tANI_U32 txMpdu;
4974 // number of received data pkts
4975 tANI_U32 rxMpdu;
4976 // number of data packet losses (no ACK)
4977 tANI_U32 mpduLost;
4978 // total number of data pkt retries *
4979 tANI_U32 retries;
4980 // number of short data pkt retries
4981 tANI_U32 retriesShort;
4982 // number of long data pkt retries
4983 tANI_U32 retriesLong;
4984} tSirWifiRateStat, *tpSirWifiRateStat;
4985
4986/* access categories */
4987typedef PACKED_PRE enum PACKED_POST
4988{
4989 WIFI_AC_VO = 0,
4990 WIFI_AC_VI = 1,
4991 WIFI_AC_BE = 2,
4992 WIFI_AC_BK = 3,
4993 WIFI_AC_MAX = 4,
4994} tSirWifiTrafficAc;
4995
4996/* wifi peer type */
4997typedef PACKED_PRE enum PACKED_POST
4998{
4999 WIFI_PEER_STA,
5000 WIFI_PEER_AP,
5001 WIFI_PEER_P2P_GO,
5002 WIFI_PEER_P2P_CLIENT,
5003 WIFI_PEER_NAN,
5004 WIFI_PEER_TDLS,
5005 WIFI_PEER_INVALID,
5006} tSirWifiPeerType;
5007
5008/* per peer statistics */
5009typedef PACKED_PRE struct PACKED_POST
5010{
5011 // peer type (AP, TDLS, GO etc.)
5012 tSirWifiPeerType type;
5013 // mac address
5014 tSirMacAddr peerMacAddress;
5015 // peer WIFI_CAPABILITY_XXX
5016 tANI_U32 capabilities;
5017 // number of rates
5018 tANI_U32 numRate;
5019 // per rate statistics, number of entries = num_rate
5020 tSirWifiRateStat rateStats[1];
5021} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5022
5023/* per access category statistics */
5024typedef PACKED_PRE struct PACKED_POST
5025{
5026 /*tSirWifiTrafficAc*/
5027 // access category (VI, VO, BE, BK)
5028 tANI_U8 ac;
5029 // number of successfully transmitted unicast data pkts (ACK rcvd)
5030 tANI_U32 txMpdu;
5031 // number of received unicast mpdus
5032 tANI_U32 rxMpdu;
5033 // number of succesfully transmitted multicast data packets
5034 // STA case: implies ACK received from AP for the unicast
5035 // packet in which mcast pkt was sent
5036 tANI_U32 txMcast;
5037 // number of received multicast data packets
5038 tANI_U32 rxMcast;
5039 // number of received unicast a-mpdus
5040 tANI_U32 rxAmpdu;
5041 // number of transmitted unicast a-mpdus
5042 tANI_U32 txAmpdu;
5043 // number of data pkt losses (no ACK)
5044 tANI_U32 mpduLost;
5045 // total number of data pkt retries
5046 tANI_U32 retries;
5047 // number of short data pkt retries
5048 tANI_U32 retriesShort;
5049 // number of long data pkt retries
5050 tANI_U32 retriesLong;
5051 // data pkt min contention time (usecs)
5052 tANI_U32 contentionTimeMin;
5053 // data pkt max contention time (usecs)
5054 tANI_U32 contentionTimeMax;
5055 // data pkt avg contention time (usecs)
5056 tANI_U32 contentionTimeAvg;
5057 // num of data pkts used for contention statistics
5058 tANI_U32 contentionNumSamples;
5059} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5060
5061/* Interface statistics - corresponding to 2nd most
5062 * LSB in wifi statistics bitmap for getting statistics
5063 */
5064typedef PACKED_PRE struct PACKED_POST
5065{
5066 // current state of the interface
5067 tSirWifiInterfaceInfo info;
5068 // access point beacon received count from connected AP
5069 tANI_U32 beaconRx;
5070 // access point mgmt frames received count from
5071 // connected AP (including Beacon)
5072 tANI_U32 mgmtRx;
5073 // action frames received count
5074 tANI_U32 mgmtActionRx;
5075 // action frames transmit count
5076 tANI_U32 mgmtActionTx;
5077 // access Point Beacon and Management frames RSSI (averaged)
5078 tANI_U32 rssiMgmt;
5079 // access Point Data Frames RSSI (averaged) from connected AP
5080 tANI_U32 rssiData;
5081 // access Point ACK RSSI (averaged) from connected AP
5082 tANI_U32 rssiAck;
5083 // per ac data packet statistics
5084 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
5085} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5086
5087/* Peer statistics - corresponding to 3rd most LSB in
5088 * wifi statistics bitmap for getting statistics
5089 */
5090typedef PACKED_PRE struct PACKED_POST
5091{
5092 // number of peers
5093 tANI_U32 numPeers;
5094 // per peer statistics
5095 tSirWifiPeerInfo peerInfo[1];
5096} tSirWifiPeerStat, *tpSirWifiPeerStat;
5097
5098/* wifi statistics bitmap for getting statistics */
5099#define WMI_LINK_STATS_RADIO 0x00000001
5100#define WMI_LINK_STATS_IFACE 0x00000002
5101#define WMI_LINK_STATS_ALL_PEER 0x00000004
5102#define WMI_LINK_STATS_PER_PEER 0x00000008
5103
5104/* wifi statistics bitmap for clearing statistics */
5105// all radio statistics
5106#define WIFI_STATS_RADIO 0x00000001
5107// cca_busy_time (within radio statistics)
5108#define WIFI_STATS_RADIO_CCA 0x00000002
5109// all channel statistics (within radio statistics)
5110#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5111// all scan statistics (within radio statistics)
5112#define WIFI_STATS_RADIO_SCAN 0x00000008
5113// all interface statistics
5114#define WIFI_STATS_IFACE 0x00000010
5115// all tx rate statistics (within interface statistics)
5116#define WIFI_STATS_IFACE_TXRATE 0x00000020
5117// all ac statistics (within interface statistics)
5118#define WIFI_STATS_IFACE_AC 0x00000040
5119// all contention (min, max, avg) statistics (within ac statistics)
5120#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5121
5122typedef PACKED_PRE struct PACKED_POST
5123{
5124 tANI_U32 paramId;
5125 tANI_U8 ifaceId;
5126 tANI_U32 respId;
5127 tANI_U32 moreResultToFollow;
5128 tANI_U8 result[1];
5129} tSirLLStatsResults, *tpSirLLStatsResults;
5130
5131#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5132
Dino Mycle2c198072014-06-10 10:15:52 +05305133#ifdef WLAN_FEATURE_EXTSCAN
5134
5135typedef enum
5136{
5137 WIFI_BAND_UNSPECIFIED,
5138 WIFI_BAND_BG = 1, // 2.4 GHz
5139 WIFI_BAND_A = 2, // 5 GHz without DFS
5140 WIFI_BAND_ABG = 3, // 2.4 GHz + 5 GHz; no DFS
5141 WIFI_BAND_A_DFS_ONLY = 4, // 5 GHz DFS only
5142 // 5 is reserved
5143 WIFI_BAND_A_WITH_DFS = 6, // 5 GHz with DFS
5144 WIFI_BAND_ABG_WITH_DFS = 7, // 2.4 GHz + 5 GHz with DFS
5145
5146 /* Keep it last */
5147 WIFI_BAND_MAX
5148} tWifiBand;
5149
5150/* wifi scan related events */
5151typedef enum
5152{
5153 WIFI_SCAN_BUFFER_FULL,
5154 WIFI_SCAN_COMPLETE,
5155} tWifiScanEventType;
5156
5157typedef struct
5158{
5159 tSirMacAddr bssid; // AP BSSID
5160 tANI_S32 low; // low threshold
5161 tANI_S32 high; // high threshold
5162 tANI_U32 channel; // channel hint
5163} tSirAPThresholdParam, *tpSirAPThresholdParam;
5164
5165typedef struct
5166{
5167 tANI_U32 requestId;
5168 tANI_U8 sessionId;
5169} tSirGetEXTScanCapabilitiesReqParams, *tpSirGetEXTScanCapabilitiesReqParams;
5170
5171typedef struct
5172{
5173 tANI_U32 requestId;
5174 tANI_U32 status;
5175
5176 tANI_U32 scanCacheSize;
5177 tANI_U32 scanBuckets;
5178 tANI_U32 maxApPerScan;
5179 tANI_U32 maxRssiSampleSize;
5180 tANI_U32 maxScanReportingThreshold;
5181
5182 tANI_U32 maxHotlistAPs;
5183 tANI_U32 maxSignificantWifiChangeAPs;
5184
5185 tANI_U32 maxBsidHistoryEntries;
5186} tSirEXTScanCapabilitiesEvent, *tpSirEXTScanCapabilitiesEvent;
5187
5188/* WLAN_HAL_EXT_SCAN_RESULT_IND */
5189typedef struct
5190{
5191 tANI_U32 requestId;
5192 tANI_U8 sessionId;
5193
5194 /*
5195 * 1 return cached results and flush it
5196 * 0 return cached results and do not flush
5197 */
5198 tANI_BOOLEAN flush;
5199} tSirEXTScanGetCachedResultsReqParams, *tpSirEXTScanGetCachedResultsReqParams;
5200
5201typedef PACKED_PRE struct PACKED_POST
5202{
5203 tANI_U32 requestId;
5204 tANI_U32 status;
5205} tSirEXTScanGetCachedResultsRspParams, *tpSirEXTScanGetCachedResultsRspParams;
5206
5207typedef PACKED_PRE struct PACKED_POST
5208{
5209 tANI_U64 ts; // time of discovery
5210 tANI_U8 ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; // null terminated SSID
5211 tSirMacAddr bssid; // BSSID
5212 tANI_U32 channel; // channel frequency in MHz
5213 tANI_S32 rssi; // RSSI in dBm
5214 tANI_U32 rtt; // RTT in nanoseconds
5215 tANI_U32 rtt_sd; // standard deviation in rtt
5216 tANI_U16 beaconPeriod; // period advertised in the beacon
5217 tANI_U16 capability; // capabilities advertised in the beacon
5218} tSirWifiScanResult, *tpSirWifiScanResult;
5219
5220/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
5221
5222typedef PACKED_PRE struct PACKED_POST
5223{
5224 tANI_U32 requestId;
5225 tANI_U32 numOfAps; // numbers of APs
5226
5227 /*
5228 * 0 for last fragment
5229 * 1 still more fragment(s) coming
5230 */
5231 tANI_BOOLEAN moreData;
5232 tSirWifiScanResult ap[1];
5233} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
5234
5235typedef PACKED_PRE struct PACKED_POST
5236{
5237 tANI_U8 elemId; // Element Identifier
5238 tANI_U8 ieLength; // length of IE data
5239 tANI_U8 *IEs; // IEs
5240} tSirInformationElement, *tpSirInformationElement;
5241
5242/* Reported when each probe response is received, if reportEvents
5243* enabled in tSirWifiScanCmdReqParams */
5244typedef struct
5245{
5246 tANI_U32 requestId;
5247
5248 /*
5249 * 0 for last fragment
5250 * 1 still more fragment(s) coming
5251 */
5252 tANI_BOOLEAN moreData;
5253 tSirWifiScanResult ap; // only 1 AP info for now
5254 tANI_U32 ieLength;
5255 tSirInformationElement *ie;
5256} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
5257
5258
5259typedef struct
5260{
5261 tANI_U32 channel; // frequency
5262 tANI_U32 dwellTimeMs; // dwell time hint
5263 tANI_U8 passive; // 0 => active,
5264 // 1 => passive scan; ignored for DFS
5265 tANI_U8 chnlClass;
5266} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
5267
5268typedef struct
5269{
5270 tANI_U8 bucket; // bucket index, 0 based
5271 tWifiBand band; // when UNSPECIFIED, use channel list
5272
5273 /*
5274 * desired period, in millisecond; if this is too
5275 * low, the firmware should choose to generate results as fast as
5276 * it can instead of failing the command byte
5277 */
5278 tANI_U32 period;
5279
5280 /*
5281 * 0 => normal reporting (reporting rssi history
5282 * only, when rssi history buffer is % full)
5283 * 1 => same as 0 + report a scan completion event after scanning
5284 * this bucket
5285 * 2 => same as 1 + forward scan results (beacons/probe responses + IEs)
5286 * in real time to HAL
5287 */
5288 tANI_U8 reportEvents;
5289
5290 tANI_U8 numChannels;
5291
5292 /*
5293 * channels to scan; these may include DFS channels
5294 */
5295 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
5296} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
5297
5298typedef struct
5299{
5300 tANI_U32 requestId;
5301 tANI_U8 sessionId;
5302 tANI_U32 basePeriod; // base timer period
5303 tANI_U32 maxAPperScan;
5304
5305 /* in %, when buffer is this much full, wake up host */
5306 tANI_U32 reportThreshold;
5307
5308 tANI_U8 numBuckets;
5309 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
5310} tSirEXTScanStartReqParams, *tpSirEXTScanStartReqParams;
5311
5312typedef PACKED_PRE struct PACKED_POST
5313{
5314 tANI_U32 requestId;
5315 tANI_U32 status;
5316} tSirEXTScanStartRspParams, *tpSirEXTScanStartRspParams;
5317
5318typedef struct
5319{
5320 tANI_U32 requestId;
5321 tANI_U8 sessionId;
5322} tSirEXTScanStopReqParams, *tpSirEXTScanStopReqParams;
5323
5324typedef PACKED_PRE struct PACKED_POST
5325{
5326 tANI_U32 requestId;
5327 tANI_U32 status;
5328} tSirEXTScanStopRspParams, *tpSirEXTScanStopRspParams;
5329
5330typedef struct
5331{
5332 tANI_U32 requestId;
5333 tANI_U8 sessionId; // session Id mapped to vdev_id
5334
5335 tANI_U32 numAp; // number of hotlist APs
5336 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; // hotlist APs
5337} tSirEXTScanSetBssidHotListReqParams, *tpSirEXTScanSetBssidHotListReqParams;
5338
5339typedef PACKED_PRE struct PACKED_POST
5340{
5341 tANI_U32 requestId;
5342 tANI_U32 status;
5343} tSirEXTScanSetBssidHotListRspParams, *tpSirEXTScanSetBssidHotListRspParams;
5344
5345typedef struct
5346{
5347 tANI_U32 requestId;
5348 tANI_U8 sessionId;
5349} tSirEXTScanResetBssidHotlistReqParams, *tpSirEXTScanResetBssidHotlistReqParams;
5350
5351typedef PACKED_PRE struct PACKED_POST
5352{
5353 tANI_U32 requestId;
5354 tANI_U32 status;
5355} tSirEXTScanResetBssidHotlistRspParams, *tpSirEXTScanResetBssidHotlistRspParams;
5356
5357typedef struct
5358{
5359 tANI_U32 requestId;
5360 tANI_U8 sessionId;
5361
5362 /* number of samples for averaging RSSI */
5363 tANI_U32 rssiSampleSize;
5364
5365 /* number of missed samples to confirm AP loss */
5366 tANI_U32 lostApSampleSize;
5367
5368 /* number of APs breaching threshold required for firmware
5369 * to generate event
5370 */
5371 tANI_U32 minBreaching;
5372
5373 tANI_U32 numAp;
5374 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
5375} tSirEXTScanSetSignificantChangeReqParams,
5376 *tpSirEXTScanSetSignificantChangeReqParams;
5377
5378typedef PACKED_PRE struct PACKED_POST
5379{
5380 tANI_U32 requestId;
5381 tANI_U32 status;
5382} tSirEXTScanSetSignificantChangeRspParams,
5383 *tpSirEXTScanSetSignificantChangeRspParams;
5384
5385/*---------------------------------------------------------------------------
5386 * WLAN_HAL_SIG_RSSI_RESULT_IND
5387 *-------------------------------------------------------------------------*/
5388
5389typedef PACKED_PRE struct PACKED_POST
5390{
5391 tSirMacAddr bssid; // BSSID
5392 tANI_U32 channel; // channel frequency in MHz
5393 tANI_U8 numRssi; // number of rssi samples
5394 tANI_S32 rssi[WLAN_EXTSCAN_MAX_RSSI_SAMPLE_SIZE]; // RSSI history in db
5395} tSirSigRssiResultParams, *tpSirSigRssiResultParams;
5396
5397typedef PACKED_PRE struct PACKED_POST
5398{
5399 tANI_U32 requestId;
5400 tANI_U32 numSigRssiBss;
5401 tANI_BOOLEAN moreData;
5402 tSirSigRssiResultParams sigRssiResult[1];
5403} tSirWifiSignificantChangeEvent, *tpSirWifiSignificantChangeEvent;
5404
5405typedef struct
5406{
5407 tANI_U32 requestId;
5408 tANI_U8 sessionId;
5409} tSirEXTScanResetSignificantChangeReqParams,
5410 *tpSirEXTScanResetSignificantChangeReqParams;
5411
5412typedef PACKED_PRE struct PACKED_POST
5413{
5414 tANI_U32 requestId;
5415 tANI_U32 status;
5416} tSirEXTScanResetSignificantChangeRspParams,
5417 *tpSirEXTScanResetSignificantChangeRspParams;
5418
5419/*---------------------------------------------------------------------------
5420 * * WLAN_HAL_EXTSCAN_RESULT_AVAILABLE_IND
5421 * *-------------------------------------------------------------------------*/
5422typedef PACKED_PRE struct PACKED_POST
5423{
5424 tANI_U32 requestId;
5425 tANI_U32 numResultsAvailable;
5426} tSirEXTScanResultsAvailableIndParams,
5427 *tpSirEXTScanResultsAvailableIndParams;
5428
5429typedef PACKED_PRE struct PACKED_POST
5430{
5431 tANI_U8 scanEventType;
5432 tANI_U32 status;
5433} tSirEXTScanOnScanEventIndParams,
5434 *tpSirEXTScanOnScanEventIndParams;
5435
5436/*---------------------------------------------------------------------------
5437 * * WLAN_HAL_EXTSCAN_PROGRESS_IND
5438 * *-------------------------------------------------------------------------*/
5439
5440typedef PACKED_PRE enum PACKED_POST
5441{
5442 WLAN_HAL_EXTSCAN_BUFFER_FULL,
5443 WLAN_HAL_EXTSCAN_COMPLETE,
5444}tSirEXTScanProgressEventType;
5445
5446typedef PACKED_PRE struct PACKED_POST
5447{
5448 tANI_U32 requestId;
5449 tANI_U32 status;
5450 tSirEXTScanProgressEventType extScanEventType;
5451}tSirEXTScanProgressIndParams,
5452 *tpSirEXTScanProgressIndParams;
5453
5454
5455
5456#endif /* WLAN_FEATURE_EXTSCAN */
5457
Jeff Johnson295189b2012-06-20 16:38:30 -07005458#endif /* __SIR_API_H */