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