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