blob: 909506d5c980df65cd4ee394a6b8ddb24b393972 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Masti, Narayanraddif10fd792015-12-15 15:01:01 +05302 * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
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
Dino Mycle2c198072014-06-10 10:15:52 +0530145#define WLAN_EXTSCAN_MAX_RSSI_SAMPLE_SIZE 8
Padma, Santhosh Kumar9acee012015-08-21 19:58:01 +0530146#define WLAN_EXTSCAN_MAX_HOTLIST_SSIDS 8
Dino Mycle2c198072014-06-10 10:15:52 +0530147#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,
Siddharth Bhal64246172015-02-27 01:04:37 +0530179 SIR_HAL_EXT_MODULE_ID = 0x11,
Leela Venkata Kiran Kumar Reddy Chirala45f184c2014-02-14 15:08:21 -0800180 SIR_CFG_MODULE_ID = 0x12,
Jeff Johnson295189b2012-06-20 16:38:30 -0700181 SIR_LIM_MODULE_ID,
182 SIR_ARQ_MODULE_ID,
183 SIR_SCH_MODULE_ID,
184 SIR_PMM_MODULE_ID,
185 SIR_MNT_MODULE_ID,
186 SIR_DBG_MODULE_ID,
187 SIR_DPH_MODULE_ID,
188 SIR_SYS_MODULE_ID,
189 SIR_SMS_MODULE_ID,
190
191 SIR_PHY_MODULE_ID = 0x20,
192
193
194 // Add any modules above this line
195 SIR_DVT_MODULE_ID
196};
197
198#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
199
200/**
201 * First and last module definition for logging utility
202 *
203 * NOTE: The following definitions need to be updated if
204 * the above list is changed.
205 */
206#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
207#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
208
209
210// Type declarations used by Firmware and Host software
211
212// Scan type enum used in scan request
213typedef enum eSirScanType
214{
215 eSIR_PASSIVE_SCAN,
216 eSIR_ACTIVE_SCAN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800217 eSIR_BEACON_TABLE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700218} tSirScanType;
219
Jeff Johnson295189b2012-06-20 16:38:30 -0700220typedef enum eSirResultCodes
221{
222 eSIR_SME_SUCCESS,
223
224 eSIR_EOF_SOF_EXCEPTION,
225 eSIR_BMU_EXCEPTION,
226 eSIR_LOW_PDU_EXCEPTION,
227 eSIR_USER_TRIG_RESET,
228 eSIR_LOGP_EXCEPTION,
229 eSIR_CP_EXCEPTION,
230 eSIR_STOP_BSS,
231 eSIR_AHB_HANG_EXCEPTION,
232 eSIR_DPU_EXCEPTION,
233 eSIR_RPE_EXCEPTION,
234 eSIR_TPE_EXCEPTION,
235 eSIR_DXE_EXCEPTION,
236 eSIR_RXP_EXCEPTION,
237 eSIR_MCPU_EXCEPTION,
238 eSIR_MCU_EXCEPTION,
239 eSIR_MTU_EXCEPTION,
240 eSIR_MIF_EXCEPTION,
241 eSIR_FW_EXCEPTION,
242 eSIR_PS_MUTEX_READ_EXCEPTION,
243 eSIR_PHY_HANG_EXCEPTION,
244 eSIR_MAILBOX_SANITY_CHK_FAILED,
245 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
246 eSIR_CFB_FLAG_STUCK_EXCEPTION,
247
248 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
249
250 eSIR_SME_INVALID_PARAMETERS=500,
251 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
252 eSIR_SME_RESOURCES_UNAVAILABLE,
253 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
254 // matching requested scan criteria
255 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
256 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
257 eSIR_SME_REFUSED,
c_hpothua9dc89c2014-03-22 19:22:31 +0530258 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700259 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
260 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
261 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
262 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
263 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
264 eSIR_SME_AUTH_REFUSED,
265 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
266 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
267 eSIR_SME_ASSOC_REFUSED,
268 eSIR_SME_REASSOC_REFUSED,
269 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
270 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
271 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
272 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
273 eSIR_SME_STA_NOT_AUTHENTICATED,
274 eSIR_SME_STA_NOT_ASSOCIATED,
275 eSIR_SME_STA_DISASSOCIATED,
276 eSIR_SME_ALREADY_JOINED_A_BSS,
277 eSIR_ULA_COMPLETED,
278 eSIR_ULA_FAILURE,
279 eSIR_SME_LINK_ESTABLISHED,
280 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
281 eSIR_SME_UNABLE_TO_PERFORM_DFS,
282 eSIR_SME_DFS_FAILED,
283 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
284 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
285 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
286 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
287 // support requested rate in
288 // LINK_TEST_REQ
289 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
290 // not respond before next test packet
291 // is sent
292 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
293 // of link test
294 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
295 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
296 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
297 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
298 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
299 // unable to plumb down keys
300 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
301
302 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
303 // that more SME_SCAN_RSP
304 // messages are following.
305 // SME_SCAN_RSP message with
306 // eSIR_SME_SUCCESS status
307 // code is the last one.
308 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
309 // messages upon receiving
310 // invalid Re/Assoc Rsp frame.
311 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
312 // with MIC_FAILURE reason code and perform the stop bss operation
313 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
314 // timeout interval
315 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
316 eSIR_SME_RECEIVED,
317 // TBA - TSPEC related Result Codes
318
319 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
320 eSIR_SME_INVALID_STA_ROLE,
321 eSIR_SME_INVALID_STATE,
322#ifdef GEN4_SCAN
323 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
324 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
325 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
326 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
327 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
328 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
329#else // GEN4_SCAN
330 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
331 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
332#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700333#ifdef FEATURE_OEM_DATA_SUPPORT
334 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
335#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700336 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
337 eSIR_SME_STA_ASSOCIATED,
338 eSIR_SME_INVALID_PMM_STATE,
339 eSIR_SME_CANNOT_ENTER_IMPS,
340 eSIR_SME_IMPS_REQ_FAILED,
341 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700342 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700343 eSIR_SME_UAPSD_REQ_FAILED,
Kanchanapally, Vidyullatha2ed7bde2014-12-29 12:18:36 +0530344 eSIR_SME_UAPSD_REQ_INVALID,
Jeff Johnson295189b2012-06-20 16:38:30 -0700345 eSIR_SME_WOWL_ENTER_REQ_FAILED,
346 eSIR_SME_WOWL_EXIT_REQ_FAILED,
347#if defined WLAN_FEATURE_VOWIFI_11R
348 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
349 eSIR_SME_FT_REASSOC_FAILURE,
350#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700351 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700352#ifdef WLAN_FEATURE_PACKET_FILTERING
353 eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
354#endif // WLAN_FEATURE_PACKET_FILTERING
355
356#ifdef WLAN_FEATURE_GTK_OFFLOAD
357 eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
358#endif // WLAN_FEATURE_GTK_OFFLOAD
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800359 eSIR_SME_DEAUTH_STATUS,
Jeff Johnson295189b2012-06-20 16:38:30 -0700360 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
361} tSirResultCodes;
362
Jeff Johnson295189b2012-06-20 16:38:30 -0700363/* each station added has a rate mode which specifies the sta attributes */
364typedef enum eStaRateMode {
365 eSTA_TAURUS = 0,
366 eSTA_TITAN,
367 eSTA_POLARIS,
368 eSTA_11b,
369 eSTA_11bg,
370 eSTA_11a,
371 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700372#ifdef WLAN_FEATURE_11AC
373 eSTA_11ac,
374#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700375 eSTA_INVALID_RATE_MODE
376} tStaRateMode, *tpStaRateMode;
377
378//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
379//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
380#define IERATE_BASICRATE_MASK 0x80
381#define IERATE_RATE_MASK 0x7f
382#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
383#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
384
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530385const char * lim_BssTypetoString(const v_U8_t bssType);
386const char * lim_ScanTypetoString(const v_U8_t scanType);
387const char * lim_BackgroundScanModetoString(const v_U8_t mode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700388typedef struct sSirSupportedRates {
389 /*
390 * For Self STA Entry: this represents Self Mode.
391 * For Peer Stations, this represents the mode of the peer.
392 * On Station:
393 * --this mode is updated when PE adds the Self Entry.
394 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
395 * ON AP:
396 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
397 * to indicate the self mode of the AP.
398 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
399 */
400
401 tStaRateMode opRateMode;
402 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
403 tANI_U16 llbRates[SIR_NUM_11B_RATES];
404 tANI_U16 llaRates[SIR_NUM_11A_RATES];
405 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
406
407 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
408 //First 26 bits are reserved for those Titan rates and
409 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
410 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
411
412 /*
413 * 0-76 bits used, remaining reserved
414 * bits 0-15 and 32 should be set.
415 */
416 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
417
418 /*
419 * RX Highest Supported Data Rate defines the highest data
420 * rate that the STA is able to receive, in unites of 1Mbps.
421 * This value is derived from "Supported MCS Set field" inside
422 * the HT capability element.
423 */
424 tANI_U16 rxHighestDataRate;
425
Jeff Johnsone7245742012-09-05 17:12:55 -0700426#ifdef WLAN_FEATURE_11AC
427 /*Indicates the Maximum MCS that can be received for each number
428 of spacial streams */
429 tANI_U16 vhtRxMCSMap;
430 /*Indicate the highest VHT data rate that the STA is able to receive*/
431 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700432 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700433 of spacial streams */
434 tANI_U16 vhtTxMCSMap;
435 /*Indicate the highest VHT data rate that the STA is able to transmit*/
436 tANI_U16 vhtTxHighestDataRate;
437#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700438} tSirSupportedRates, *tpSirSupportedRates;
439
440
441typedef enum eSirRFBand
442{
443 SIR_BAND_UNKNOWN,
444 SIR_BAND_2_4_GHZ,
445 SIR_BAND_5_GHZ,
446} tSirRFBand;
447
448
449/*
450* Specifies which beacons are to be indicated upto the host driver when
451* Station is in power save mode.
452*/
453typedef enum eBeaconForwarding
454{
455 ePM_BEACON_FWD_NTH,
456 ePM_BEACON_FWD_TIM,
457 ePM_BEACON_FWD_DTIM,
458 ePM_BEACON_FWD_NONE
459} tBeaconForwarding;
460
461
Jeff Johnson295189b2012-06-20 16:38:30 -0700462typedef struct sSirRemainOnChnReq
463{
464 tANI_U16 messageType;
465 tANI_U16 length;
466 tANI_U8 sessionId;
467 tSirMacAddr selfMacAddr;
468 tANI_U8 chnNum;
469 tANI_U8 phyMode;
470 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530471 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700472 tANI_U8 probeRspIe[1];
473}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
474
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530475/* Structure for vendor specific IE of debug marker frame
476 to debug remain on channel issues */
477typedef struct publicVendorSpecific
478{
479 tANI_U8 category;
480 tANI_U8 elementid;
481 tANI_U8 length;
482} publicVendorSpecific;
483
Jeff Johnson295189b2012-06-20 16:38:30 -0700484typedef struct sSirRegisterMgmtFrame
485{
486 tANI_U16 messageType;
487 tANI_U16 length;
488 tANI_U8 sessionId;
489 tANI_BOOLEAN registerFrame;
490 tANI_U16 frameType;
491 tANI_U16 matchLen;
492 tANI_U8 matchData[1];
493}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700494
495//
Jeff Johnson295189b2012-06-20 16:38:30 -0700496// Identifies the neighbor BSS' that was(were) detected
497// by an STA and reported to the AP
498//
499typedef struct sAniTitanCBNeighborInfo
500{
501 // A BSS was found on the Primary
502 tANI_U8 cbBssFoundPri;
503
504 // A BSS was found on the adjacent Upper Secondary
505 tANI_U8 cbBssFoundSecUp;
506
507 // A BSS was found on the adjacent Lower Secondary
508 tANI_U8 cbBssFoundSecDown;
509
510} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
511
Jeff Johnson295189b2012-06-20 16:38:30 -0700512/// Generic type for sending a response message
513/// with result code to host software
514typedef struct sSirSmeRsp
515{
516 tANI_U16 messageType; // eWNI_SME_*_RSP
517 tANI_U16 length;
518 tANI_U8 sessionId; // To support BT-AMP
519 tANI_U16 transactionId; // To support BT-AMP
520 tSirResultCodes statusCode;
521} tSirSmeRsp, *tpSirSmeRsp;
522
523/// Definition for kick starting Firmware on STA
524typedef struct sSirSmeStartReq
525{
526 tANI_U16 messageType; // eWNI_SME_START_REQ
527 tANI_U16 length;
528 tANI_U8 sessionId; //Added for BT-AMP Support
529 tANI_U16 transcationId; //Added for BT-AMP Support
530 tSirMacAddr bssId; //Added For BT-AMP Support
531 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700532 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700533} tSirSmeStartReq, *tpSirSmeStartReq;
534
535/// Definition for indicating all modules ready on STA
536typedef struct sSirSmeReadyReq
537{
538 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
539 tANI_U16 length;
540 tANI_U16 transactionId;
541} tSirSmeReadyReq, *tpSirSmeReadyReq;
542
543/// Definition for response message to previously issued start request
544typedef struct sSirSmeStartRsp
545{
546 tANI_U16 messageType; // eWNI_SME_START_RSP
547 tANI_U16 length;
548 tSirResultCodes statusCode;
549 tANI_U16 transactionId;
550} tSirSmeStartRsp, *tpSirSmeStartRsp;
551
Jeff Johnson295189b2012-06-20 16:38:30 -0700552
553/// Definition for Load structure
554typedef struct sSirLoad
555{
556 tANI_U16 numStas;
557 tANI_U16 channelUtilization;
558} tSirLoad, *tpSirLoad;
559
560/// BSS type enum used in while scanning/joining etc
561typedef enum eSirBssType
562{
563 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700564 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700565 eSIR_IBSS_MODE,
566 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
567 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
568 eSIR_AUTO_MODE,
569 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
570} tSirBssType;
571
572/// Definition for WDS Information
573typedef struct sSirWdsInfo
574{
575 tANI_U16 wdsLength;
576 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
577} tSirWdsInfo, *tpSirWdsInfo;
578
579/// Power Capability info used in 11H
580typedef struct sSirMacPowerCapInfo
581{
582 tANI_U8 minTxPower;
583 tANI_U8 maxTxPower;
584} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
585
586/// Supported Channel info used in 11H
587typedef struct sSirSupChnl
588{
589 tANI_U8 numChnl;
590 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
591} tSirSupChnl, *tpSirSupChnl;
592
593typedef enum eSirNwType
594{
595 eSIR_11A_NW_TYPE,
596 eSIR_11B_NW_TYPE,
597 eSIR_11G_NW_TYPE,
598 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700599#ifdef WLAN_FEATURE_11AC
600 eSIR_11AC_NW_TYPE,
601#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700602 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
603} tSirNwType;
604
605/// Definition for new iBss peer info
606typedef struct sSirNewIbssPeerInfo
607{
608 tSirMacAddr peerAddr;
609 tANI_U16 aid;
610} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
611
612/// Definition for Alternate BSS info
613typedef struct sSirAlternateRadioInfo
614{
615 tSirMacAddr bssId;
616 tANI_U8 channelId;
617} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
618
619/// Definition for Alternate BSS list
620typedef struct sSirAlternateRadioList
621{
622 tANI_U8 numBss;
623 tSirAlternateRadioInfo alternateRadio[1];
624} tSirAlternateRadioList, *tpSirAlternateRadioList;
625
626/// Definition for kick starting BSS
627/// ---> MAC
628/**
629 * Usage of ssId, numSSID & ssIdList:
630 * ---------------------------------
631 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
632 * feature is enabled.
633 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
634 * and interpret the SSID list from numSSID & ssIdList.
635 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
636 * specified in the ssId field and it is expected that
637 * application will set numSSID to one (only one SSID present
638 * in the list) and SSID in the list is same as ssId field.
639 * 4. Application will always set numSSID >= 1.
640 */
641//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
642typedef struct sSirSmeStartBssReq
643{
644 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
645 tANI_U16 length;
646 tANI_U8 sessionId; //Added for BT-AMP Support
647 tANI_U16 transactionId; //Added for BT-AMP Support
648 tSirMacAddr bssId; //Added for BT-AMP Support
649 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
650 tANI_U16 beaconInterval; //Added for BT-AMP Support
651 tANI_U8 dot11mode;
652 tSirBssType bssType;
653 tSirMacSSid ssId;
654 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700655 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700656
Jeff Johnson295189b2012-06-20 16:38:30 -0700657 tANI_U8 privacy;
658 tANI_U8 apUapsdEnable;
659 tANI_U8 ssidHidden;
660 tANI_BOOLEAN fwdWPSPBCProbeReq;
661 tANI_BOOLEAN protEnabled;
662 tANI_BOOLEAN obssProtEnabled;
663 tANI_U16 ht_capab;
664 tAniAuthType authType;
665 tANI_U32 dtimPeriod;
666 tANI_U8 wps_state;
krunal sonie9002db2013-11-25 14:24:17 -0800667 tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob
Jeff Johnson295189b2012-06-20 16:38:30 -0700668 tVOS_CON_MODE bssPersona;
669
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800670 tANI_U8 txLdpcIniFeatureEnabled;
671
Jeff Johnson295189b2012-06-20 16:38:30 -0700672 tSirRSNie rsnIE; // RSN IE to be sent in
673 // Beacon and Probe
674 // Response frames
675 tSirNwType nwType; // Indicates 11a/b/g
676 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
677 tSirMacRateSet extendedRateSet; // Has 11g rates
678
Chet Lanctot8cecea22014-02-11 19:09:36 -0800679#ifdef WLAN_FEATURE_11W
680 tANI_BOOLEAN pmfCapable;
681 tANI_BOOLEAN pmfRequired;
682#endif
683
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +0530684#ifdef WLAN_FEATURE_AP_HT40_24G
685 tANI_BOOLEAN apHT40_24GEnabled;
686#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700687} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
688
689#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
krunal soni2a6a9062014-02-11 14:14:23 -0800690 ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700691
692#define WSCIE_PROBE_RSP_LEN (317 + 2)
693
694typedef struct sSirBssDescription
695{
696 //offset of the ieFields from bssId.
697 tANI_U16 length;
698 tSirMacAddr bssId;
699 v_TIME_t scanSysTimeMsec;
700 tANI_U32 timeStamp[2];
701 tANI_U16 beaconInterval;
702 tANI_U16 capabilityInfo;
703 tSirNwType nwType; // Indicates 11a/b/g
704 tANI_U8 aniIndicator;
705 tANI_S8 rssi;
706 tANI_S8 sinr;
707 //channelId what peer sent in beacon/probersp.
708 tANI_U8 channelId;
709 //channelId on which we are parked at.
710 //used only in scan case.
711 tANI_U8 channelIdSelf;
712 tANI_U8 sSirBssDescriptionRsvd[3];
Deepthi Gowri2f435132016-05-18 19:30:17 +0530713 v_TIME_t nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
Jeff Johnson295189b2012-06-20 16:38:30 -0700714#if defined WLAN_FEATURE_VOWIFI
715 tANI_U32 parentTSF;
716 tANI_U32 startTSF[2];
717#endif
718#ifdef WLAN_FEATURE_VOWIFI_11R
719 tANI_U8 mdiePresent;
720 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
721#endif
Kapil Gupta04ab1992016-06-26 13:36:51 +0530722#if defined(FEATURE_WLAN_ESE) || defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
723 tANI_U8 QBSSLoad_present;
724 tANI_U8 QBSS_ChanLoad;
725 tANI_U16 QBSSLoad_avail;
Jeff Johnson295189b2012-06-20 16:38:30 -0700726#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700727
728 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700729 tANI_U8 reservedPadding1;
730 tANI_U8 reservedPadding2;
731 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700732 tANI_U32 WscIeLen;
733 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Kapil Gupta04ab1992016-06-26 13:36:51 +0530734 tANI_U8 HTCapsPresent;
735 tANI_U8 vhtCapsPresent;
736 tANI_U8 wmeInfoPresent;
737 tANI_U8 beacomformingCapable;
738 tANI_U8 chanWidth;
739 /* Please keep the structure 4 bytes aligned above the ieFields */
Jeff Johnson295189b2012-06-20 16:38:30 -0700740 tANI_U32 ieFields[1];
Kapil Gupta04ab1992016-06-26 13:36:51 +0530741
Jeff Johnson295189b2012-06-20 16:38:30 -0700742} tSirBssDescription, *tpSirBssDescription;
743
744/// Definition for response message to previously
745/// issued start BSS request
746/// MAC --->
747typedef struct sSirSmeStartBssRsp
748{
749 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
750 tANI_U16 length;
751 tANI_U8 sessionId;
752 tANI_U16 transactionId;//transaction ID for cmd
753 tSirResultCodes statusCode;
754 tSirBssType bssType;//Add new type for WDS mode
755 tANI_U16 beaconInterval;//Beacon Interval for both type
756 tANI_U32 staId;//Staion ID for Self
757 tSirBssDescription bssDescription;//Peer BSS description
758} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
759
Jeff Johnson295189b2012-06-20 16:38:30 -0700760
761typedef struct sSirChannelList
762{
763 tANI_U8 numChannels;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800764 tANI_U8 channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700765} tSirChannelList, *tpSirChannelList;
766
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530767typedef struct sSirDFSChannelList
768{
769 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
770
771} tSirDFSChannelList, *tpSirDFSChannelList;
772
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800773#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700774typedef struct sTspecInfo {
775 tANI_U8 valid;
776 tSirMacTspecIE tspec;
777} tTspecInfo;
778
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800779#define SIR_ESE_MAX_TSPEC_IES 4
780typedef struct sESETspecTspecInfo {
Jeff Johnson295189b2012-06-20 16:38:30 -0700781 tANI_U8 numTspecs;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800782 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
783} tESETspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700784#endif
785
Jeff Johnson295189b2012-06-20 16:38:30 -0700786
787/// Definition for Radar Info
788typedef struct sSirRadarInfo
789{
790 tANI_U8 channelNumber;
791 tANI_U16 radarPulseWidth; // in usecond
792 tANI_U16 numRadarPulse;
793} tSirRadarInfo, *tpSirRadarInfo;
794
795#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
796
797/// Two Background Scan mode
798typedef enum eSirBackgroundScanMode
799{
800 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700801 eSIR_NORMAL_BACKGROUND_SCAN = 1,
802 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700803} tSirBackgroundScanMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700804typedef enum eSirLinkTrafficCheck
805{
806 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700807 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
808 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700809} tSirLinkTrafficCheck;
810
811#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
812#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
813#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
814#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700815#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
816#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700817
818/// Definition for scan request
819typedef struct sSirSmeScanReq
820{
821 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
822 tANI_U16 length;
823 tANI_U8 sessionId; // Session ID
824 tANI_U16 transactionId; // Transaction ID for cmd
825 tSirMacAddr bssId;
826 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
827 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
828 tSirBssType bssType;
829 tANI_U8 dot11mode;
830 tSirScanType scanType;
831 /**
832 * minChannelTime. Not used if scanType is passive.
833 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
834 * 11k measurements set this to zero to user only single duration for scan.
835 * <valid timeout> - Timeout value used for min channel timeout.
836 */
837 tANI_U32 minChannelTime;
838 /**
839 * maxChannelTime.
840 * 0x0 - Invalid. In case of active scan.
841 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
842 *
843 */
844 tANI_U32 maxChannelTime;
845 /**
846 * returnAfterFirstMatch can take following values:
847 * 0x00 - Return SCAN_RSP message after complete channel scan
848 * 0x01 - Return SCAN_RSP message after collecting BSS description
849 * that matches scan criteria.
850 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
851 * 5 GHz band channels
852 * 0x80 - Return after collecting first 11d IE from 5 GHz band
853 * channels
854 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
855 * band channels
856 *
857 * Values of 0xC0, 0x80 & 0x40 are to be used by
858 * Roaming/application when 11d is enabled.
859 */
Abhishek Singh3a93ee42016-09-29 17:00:03 +0530860 tANI_U32 min_chntime_btc_esco; //in units of milliseconds
861 tANI_U32 max_chntime_btc_esco; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700862 tANI_U8 returnAfterFirstMatch;
863
864 /**
865 * returnUniqueResults can take following values:
866 * 0 - Collect & report all received BSS descriptions from same BSS.
867 * 1 - Collect & report unique BSS description from same BSS.
868 */
869 tANI_U8 returnUniqueResults;
870
871 /**
872 * returnFreshResults can take following values:
873 * 0x00 - Return background scan results.
874 * 0x80 - Return & purge background scan results
875 * 0x01 - Trigger fresh scan instead of returning background scan
876 * results.
877 * 0x81 - Trigger fresh scan instead of returning background scan
878 * results and purge background scan results.
879 */
880 tANI_U8 returnFreshResults;
881
882 /* backgroundScanMode can take following values:
883 * 0x0 - agressive scan
884 * 0x1 - normal scan where HAL will check for link traffic
885 * prior to proceeding with the scan
886 */
887 tSirBackgroundScanMode backgroundScanMode;
888
889 tANI_U8 hiddenSsid;
890
891 /* Number of SSIDs to scan */
892 tANI_U8 numSsid;
893
894 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
895 /* This MUST be the last field of the structure */
896
897
Jeff Johnson295189b2012-06-20 16:38:30 -0700898 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700899 tANI_U16 uIEFieldLen;
900 tANI_U16 uIEFieldOffset;
901
902 //channelList MUST be the last field of this structure
903 tSirChannelList channelList;
904 /*-----------------------------
905 tSirSmeScanReq....
906 -----------------------------
907 uIEFiledLen
908 -----------------------------
909 uIEFiledOffset ----+
910 ----------------------------- |
911 channelList.numChannels |
912 ----------------------------- |
913 ... variable size up to |
914 channelNumber[numChannels-1] |
915 This can be zero, if |
916 numChannel is zero. |
917 ----------------------------- <--+
918 ... variable size uIEFiled
919 up to uIEFieldLen (can be 0)
920 -----------------------------*/
921} tSirSmeScanReq, *tpSirSmeScanReq;
922
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530923typedef struct sSirSmeScanAbortReq
924{
925 tANI_U16 type;
926 tANI_U16 msgLen;
927 tANI_U8 sessionId;
928} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
929
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530930typedef struct sSirSmeScanChanReq
931{
932 tANI_U16 type;
933 tANI_U16 msgLen;
934 tANI_U8 sessionId;
935 tANI_U16 transcationId;
936} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
937
Jeff Johnsone7245742012-09-05 17:12:55 -0700938#ifdef FEATURE_OEM_DATA_SUPPORT
939
940#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800941#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700942#endif
943#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800944#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700945#endif
946
947typedef struct sSirOemDataReq
948{
949 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
Siddharth Bhal88aa5322014-06-19 14:27:15 +0530950 tANI_U16 messageLen;
Jeff Johnsone7245742012-09-05 17:12:55 -0700951 tSirMacAddr selfMacAddr;
952 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
953} tSirOemDataReq, *tpSirOemDataReq;
954
955typedef struct sSirOemDataRsp
956{
957 tANI_U16 messageType;
958 tANI_U16 length;
959 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
960} tSirOemDataRsp, *tpSirOemDataRsp;
961
962#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700963
964/// Definition for response message to previously issued scan request
965typedef struct sSirSmeScanRsp
966{
967 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
968 tANI_U16 length;
969 tANI_U8 sessionId;
970 tSirResultCodes statusCode;
971 tANI_U16 transcationId;
972 tSirBssDescription bssDescription[1];
973} tSirSmeScanRsp, *tpSirSmeScanRsp;
974
975/// Sme Req message to set the Background Scan mode
976typedef struct sSirSmeBackgroundScanModeReq
977{
978 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
979 tANI_U16 length;
980 tSirBackgroundScanMode mode;
981} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
982
983/// Background Scan Statisics
984typedef struct sSirBackgroundScanInfo {
985 tANI_U32 numOfScanSuccess;
986 tANI_U32 numOfScanFailure;
987 tANI_U32 reserved;
988} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
989
990#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
991
992/// Definition for Authentication request
993typedef struct sSirSmeAuthReq
994{
995 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
996 tANI_U16 length;
997 tANI_U8 sessionId; // Session ID
998 tANI_U16 transactionId; // Transaction ID for cmd
999 tSirMacAddr bssId; // Self BSSID
1000 tSirMacAddr peerMacAddr;
1001 tAniAuthType authType;
1002 tANI_U8 channelNumber;
1003} tSirSmeAuthReq, *tpSirSmeAuthReq;
1004
1005/// Definition for reponse message to previously issued Auth request
1006typedef struct sSirSmeAuthRsp
1007{
1008 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
1009 tANI_U16 length;
1010 tANI_U8 sessionId; // Session ID
1011 tANI_U16 transactionId; // Transaction ID for cmd
1012 tSirMacAddr peerMacAddr;
1013 tAniAuthType authType;
1014 tSirResultCodes statusCode;
1015 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
1016 //Otherwise it holds status code.
1017} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
1018
Jeff Johnson295189b2012-06-20 16:38:30 -07001019
Jeff Johnson295189b2012-06-20 16:38:30 -07001020
Jeff Johnson295189b2012-06-20 16:38:30 -07001021/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
1022typedef struct sJoinReassocInfo
1023{
1024 tAniTitanCBNeighborInfo cbNeighbors;
1025 tAniBool spectrumMgtIndicator;
1026 tSirMacPowerCapInfo powerCap;
1027 tSirSupChnl supportedChannels;
1028} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001029
1030/// Definition for join request
1031/// ---> MAC
1032/// WARNING! If you add a field in JOIN REQ.
1033/// Make sure to add it in REASSOC REQ
1034/// The Serdes function is the same and its
1035/// shared with REASSOC. So if we add a field
1036// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1037typedef struct sSirSmeJoinReq
1038{
1039 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1040 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001041 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001042 tANI_U16 transactionId;
1043 tSirMacSSid ssId;
1044 tSirMacAddr selfMacAddr; // self Mac address
1045 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1046 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001047 tVOS_CON_MODE staPersona; //Persona
Sushant Kaushik74df8db2015-03-11 18:09:05 +05301048 tANI_BOOLEAN bOSENAssociation; //HS2.0
Abhishek Singheef5c992016-01-27 13:41:54 +05301049 tANI_BOOLEAN bWPSAssociation; //WPS
Jeff Johnsone7245742012-09-05 17:12:55 -07001050 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001051
1052 /*This contains the UAPSD Flag for all 4 AC
1053 * B0: AC_VO UAPSD FLAG
1054 * B1: AC_VI UAPSD FLAG
1055 * B2: AC_BK UAPSD FLAG
1056 * B3: AC_BE UASPD FLAG
1057 */
1058 tANI_U8 uapsdPerAcBitmask;
1059
Jeff Johnson295189b2012-06-20 16:38:30 -07001060 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1061 tSirMacRateSet extendedRateSet; // Has 11g rates
Masti, Narayanraddi67ea5912015-01-08 12:34:05 +05301062 tANI_U16 rateBitMap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001063 tSirRSNie rsnIE; // RSN IE to be sent in
1064 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001065#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001066 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1067 // the same. The join will never carry cckm, but will be set to
1068 // 0.
1069#endif
1070
1071 tSirAddie addIEScan; // Additional IE to be sent in
1072 // (unicast) Probe Request at the time of join
1073
1074 tSirAddie addIEAssoc; // Additional IE to be sent in
1075 // (Re) Association Request
1076
1077 tAniEdType UCEncryptionType;
1078
1079 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001080
1081#ifdef WLAN_FEATURE_11W
1082 tAniEdType MgmtEncryptionType;
1083#endif
1084
Jeff Johnson295189b2012-06-20 16:38:30 -07001085#ifdef WLAN_FEATURE_VOWIFI_11R
1086 tAniBool is11Rconnection;
1087#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001088#ifdef FEATURE_WLAN_ESE
1089 tAniBool isESEFeatureIniEnabled;
1090 tAniBool isESEconnection;
1091 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001092#endif
1093
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001094#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001095 tAniBool isFastTransitionEnabled;
1096#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001097#ifdef FEATURE_WLAN_LFR
1098 tAniBool isFastRoamIniFeatureEnabled;
1099#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001100
1101 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001102#ifdef WLAN_FEATURE_11AC
1103 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001104 tANI_U8 txBFCsnValue;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301105 tANI_U8 txMuBformee;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001106#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001107 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301108 tAniBool isWMEenabled;
1109 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001110 tAniTitanCBNeighborInfo cbNeighbors;
1111 tAniBool spectrumMgtIndicator;
1112 tSirMacPowerCapInfo powerCap;
1113 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001114 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001115
1116} tSirSmeJoinReq, *tpSirSmeJoinReq;
1117
1118/// Definition for reponse message to previously issued join request
1119/// MAC --->
1120typedef struct sSirSmeJoinRsp
1121{
1122 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1123 tANI_U16 length;
1124 tANI_U8 sessionId; // Session ID
1125 tANI_U16 transactionId; // Transaction ID for cmd
1126 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001127 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001128 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1129 //Otherwise it holds status code.
1130 tANI_U16 aid;
1131 tANI_U32 beaconLength;
1132 tANI_U32 assocReqLength;
1133 tANI_U32 assocRspLength;
1134#ifdef WLAN_FEATURE_VOWIFI_11R
1135 tANI_U32 parsedRicRspLen;
1136#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001137#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001138 tANI_U32 tspecIeLen;
1139#endif
1140 tANI_U32 staId;//Station ID for peer
1141
1142 /*The DPU signatures will be sent eventually to TL to help it determine the
1143 association to which a packet belongs to*/
1144 /*Unicast DPU signature*/
1145 tANI_U8 ucastSig;
1146
1147 /*Broadcast DPU signature*/
1148 tANI_U8 bcastSig;
1149
c_hpothu44ff4e02014-05-08 00:13:57 +05301150 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1151 tANI_U32 maxRateFlags;
1152
Jeff Johnson295189b2012-06-20 16:38:30 -07001153 tANI_U8 frames[ 1 ];
1154} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1155
1156/// Definition for Authentication indication from peer
1157typedef struct sSirSmeAuthInd
1158{
1159 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1160 tANI_U16 length;
1161 tANI_U8 sessionId;
1162 tSirMacAddr bssId; // Self BSSID
1163 tSirMacAddr peerMacAddr;
1164 tAniAuthType authType;
1165} tSirSmeAuthInd, *tpSirSmeAuthInd;
1166
1167/// probereq from peer, when wsc is enabled
1168typedef struct sSirSmeProbereq
1169{
1170 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1171 tANI_U16 length;
1172 tANI_U8 sessionId;
1173 tSirMacAddr peerMacAddr;
1174 tANI_U16 devicePasswdId;
1175} tSirSmeProbeReq, *tpSirSmeProbeReq;
1176
1177/// Definition for Association indication from peer
1178/// MAC --->
1179typedef struct sSirSmeAssocInd
1180{
1181 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1182 tANI_U16 length;
1183 tANI_U8 sessionId;
1184 tSirMacAddr peerMacAddr;
1185 tANI_U16 aid;
1186 tSirMacAddr bssId; // Self BSSID
1187 tANI_U16 staId; // Station ID for peer
1188 tANI_U8 uniSig; // DPU signature for unicast packets
1189 tANI_U8 bcastSig; // DPU signature for broadcast packets
1190 tAniAuthType authType;
1191 tAniSSID ssId; // SSID used by STA to associate
1192 tSirRSNie rsnIE;// RSN IE received from peer
1193 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1194
Jeff Johnson295189b2012-06-20 16:38:30 -07001195 // powerCap & supportedChannels are present only when
1196 // spectrumMgtIndicator flag is set
1197 tAniBool spectrumMgtIndicator;
1198 tSirMacPowerCapInfo powerCap;
1199 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001200 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +05301201#ifdef WLAN_FEATURE_AP_HT40_24G
1202 tAniBool HT40MHzIntoEnabledSta; /* if present - STA Enable 40 MHz Intolerant */
1203#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001204 tAniBool reassocReq;
1205 // Required for indicating the frames to upper layer
1206 tANI_U32 beaconLength;
1207 tANI_U8* beaconPtr;
1208 tANI_U32 assocReqLength;
1209 tANI_U8* assocReqPtr;
Deepthi Gowriae6a1662015-10-12 12:59:37 +05301210 uint32_t rate_flags;
Jeff Johnson295189b2012-06-20 16:38:30 -07001211} tSirSmeAssocInd, *tpSirSmeAssocInd;
1212
1213
1214/// Definition for Association confirm
1215/// ---> MAC
1216typedef struct sSirSmeAssocCnf
1217{
1218 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1219 tANI_U16 length;
1220 tSirResultCodes statusCode;
1221 tSirMacAddr bssId; // Self BSSID
1222 tSirMacAddr peerMacAddr;
1223 tANI_U16 aid;
1224 tSirMacAddr alternateBssId;
1225 tANI_U8 alternateChannelId;
1226} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1227
Jeff Johnson295189b2012-06-20 16:38:30 -07001228/// Definition for Reassociation indication from peer
1229typedef struct sSirSmeReassocInd
1230{
1231 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1232 tANI_U16 length;
1233 tANI_U8 sessionId; // Session ID
1234 tSirMacAddr peerMacAddr;
1235 tSirMacAddr oldMacAddr;
1236 tANI_U16 aid;
1237 tSirMacAddr bssId; // Self BSSID
1238 tANI_U16 staId; // Station ID for peer
1239 tAniAuthType authType;
1240 tAniSSID ssId; // SSID used by STA to reassociate
1241 tSirRSNie rsnIE; // RSN IE received from peer
1242
1243 tSirAddie addIE; // Additional IE received from peer
1244
Jeff Johnson295189b2012-06-20 16:38:30 -07001245 // powerCap & supportedChannels are present only when
1246 // spectrumMgtIndicator flag is set
1247 tAniBool spectrumMgtIndicator;
1248 tSirMacPowerCapInfo powerCap;
1249 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001250 // Required for indicating the frames to upper layer
1251 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1252 tANI_U32 beaconLength;
1253 tANI_U8* beaconPtr;
1254 tANI_U32 assocReqLength;
1255 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001256} tSirSmeReassocInd, *tpSirSmeReassocInd;
1257
1258/// Definition for Reassociation confirm
1259/// ---> MAC
1260typedef struct sSirSmeReassocCnf
1261{
1262 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1263 tANI_U16 length;
1264 tSirResultCodes statusCode;
1265 tSirMacAddr bssId; // Self BSSID
1266 tSirMacAddr peerMacAddr;
1267 tANI_U16 aid;
1268 tSirMacAddr alternateBssId;
1269 tANI_U8 alternateChannelId;
1270} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1271
Jeff Johnson295189b2012-06-20 16:38:30 -07001272
1273/// Enum definition for Wireless medium status change codes
1274typedef enum eSirSmeStatusChangeCode
1275{
1276 eSIR_SME_DEAUTH_FROM_PEER,
1277 eSIR_SME_DISASSOC_FROM_PEER,
1278 eSIR_SME_LOST_LINK_WITH_PEER,
1279 eSIR_SME_CHANNEL_SWITCH,
1280 eSIR_SME_JOINED_NEW_BSS,
1281 eSIR_SME_LEAVING_BSS,
1282 eSIR_SME_IBSS_ACTIVE,
1283 eSIR_SME_IBSS_INACTIVE,
1284 eSIR_SME_IBSS_PEER_DEPARTED,
1285 eSIR_SME_RADAR_DETECTED,
1286 eSIR_SME_IBSS_NEW_PEER,
1287 eSIR_SME_AP_CAPS_CHANGED,
1288 eSIR_SME_BACKGROUND_SCAN_FAIL,
1289 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1290 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1291} tSirSmeStatusChangeCode;
1292
1293typedef struct sSirSmeNewBssInfo
1294{
1295 tSirMacAddr bssId;
1296 tANI_U8 channelNumber;
1297 tANI_U8 reserved;
1298 tSirMacSSid ssId;
1299} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1300
1301typedef struct sSirSmeApNewCaps
1302{
1303 tANI_U16 capabilityInfo;
1304 tSirMacAddr bssId;
1305 tANI_U8 channelId;
1306 tANI_U8 reserved[3];
1307 tSirMacSSid ssId;
1308} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1309
1310/**
1311 * Table below indicates what information is passed for each of
1312 * the Wireless Media status change notifications:
1313 *
1314 * Status Change code Status change info
1315 * ----------------------------------------------------------------------
1316 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1317 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1318 * eSIR_SME_LOST_LINK_WITH_PEER None
1319 * eSIR_SME_CHANNEL_SWITCH New channel number
1320 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1321 * eSIR_SME_LEAVING_BSS None
1322 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1323 * IBSS apart from this STA that
1324 * started IBSS
1325 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1326 * in IBSS
1327 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1328 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1329 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1330 * that STA is currently associated with
1331 * have changed.
1332 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1333 */
1334
1335/// Definition for Wireless medium status change notification
1336typedef struct sSirSmeWmStatusChangeNtf
1337{
1338 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1339 tANI_U16 length;
1340 tANI_U8 sessionId; // Session ID
1341 tSirSmeStatusChangeCode statusChangeCode;
1342 tSirMacAddr bssId; // Self BSSID
1343 union
1344 {
1345 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1346 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1347 // none for eSIR_SME_LOST_LINK_WITH_PEER
1348 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1349 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1350 // none for eSIR_SME_LEAVING_BSS
1351 // none for eSIR_SME_IBSS_ACTIVE
1352 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001353 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1354 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1355 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1356 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001357 } statusChangeInfo;
1358} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1359
1360/// Definition for Disassociation request
1361typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001362__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001363struct sSirSmeDisassocReq
1364{
1365 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1366 tANI_U16 length;
1367 tANI_U8 sessionId; // Session ID
1368 tANI_U16 transactionId; // Transaction ID for cmd
1369 tSirMacAddr bssId; // Peer BSSID
1370 tSirMacAddr peerMacAddr;
1371 tANI_U16 reasonCode;
1372 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1373 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001374}
Jeff Johnson295189b2012-06-20 16:38:30 -07001375__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001376tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1377
1378/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001379typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1380{
1381 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1382 tANI_U16 length;
1383 tANI_U8 sessionId; // Session ID
1384 tANI_U16 transactionId; // Transaction ID for cmd
1385 tSirMacAddr bssId; // Peer BSSID
1386 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1387} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001388
1389typedef struct sAni64BitCounters
1390{
1391 tANI_U32 Hi;
1392 tANI_U32 Lo;
1393}tAni64BitCounters, *tpAni64BitCounters;
1394
1395typedef struct sAniSecurityStat
1396{
1397 tAni64BitCounters txBlks;
1398 tAni64BitCounters rxBlks;
1399 tAni64BitCounters formatErrorCnt;
1400 tAni64BitCounters decryptErr;
1401 tAni64BitCounters protExclCnt;
1402 tAni64BitCounters unDecryptableCnt;
1403 tAni64BitCounters decryptOkCnt;
1404
1405}tAniSecurityStat, *tpAniSecurityStat;
1406
1407typedef struct sAniTxRxCounters
1408{
1409 tANI_U32 txFrames; // Incremented for every packet tx
1410 tANI_U32 rxFrames;
1411 tANI_U32 nRcvBytes;
1412 tANI_U32 nXmitBytes;
1413}tAniTxRxCounters, *tpAniTxRxCounters;
1414
1415typedef struct sAniTxRxStats
1416{
1417 tAni64BitCounters txFrames;
1418 tAni64BitCounters rxFrames;
1419 tAni64BitCounters nRcvBytes;
1420 tAni64BitCounters nXmitBytes;
1421
1422}tAniTxRxStats,*tpAniTxRxStats;
1423
1424typedef struct sAniSecStats
1425{
1426 tAniSecurityStat aes;
1427 tAni64BitCounters aesReplays;
1428 tAniSecurityStat tkip;
1429 tAni64BitCounters tkipReplays;
1430 tAni64BitCounters tkipMicError;
1431
1432 tAniSecurityStat wep;
1433#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1434 tAniSecurityStat wpi;
1435 tAni64BitCounters wpiReplays;
1436 tAni64BitCounters wpiMicError;
1437#endif
1438}tAniSecStats, *tpAniSecStats;
1439
1440#define SIR_MAX_RX_CHAINS 3
1441
1442typedef struct sAniStaStatStruct
1443{
1444 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1445 * These are kept as it is, since WSM is using this structure.
1446 * These elements can be removed whenever WSM is updated.
1447 * Phystats is used to hold phystats from BD.
1448 */
1449 tANI_U32 sentAesBlksUcastHi;
1450 tANI_U32 sentAesBlksUcastLo;
1451 tANI_U32 recvAesBlksUcastHi;
1452 tANI_U32 recvAesBlksUcastLo;
1453 tANI_U32 aesFormatErrorUcastCnts;
1454 tANI_U32 aesReplaysUcast;
1455 tANI_U32 aesDecryptErrUcast;
1456 tANI_U32 singleRetryPkts;
1457 tANI_U32 failedTxPkts;
1458 tANI_U32 ackTimeouts;
1459 tANI_U32 multiRetryPkts;
1460 tANI_U32 fragTxCntsHi;
1461 tANI_U32 fragTxCntsLo;
1462 tANI_U32 transmittedPktsHi;
1463 tANI_U32 transmittedPktsLo;
1464 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1465 tANI_U32 phyStatLo; //This is only for private use.
1466
1467 tANI_U32 uplinkRssi;
1468 tANI_U32 uplinkSinr;
1469 tANI_U32 uplinkRate;
1470 tANI_U32 downlinkRssi;
1471 tANI_U32 downlinkSinr;
1472 tANI_U32 downlinkRate;
1473 tANI_U32 nRcvBytes;
1474 tANI_U32 nXmitBytes;
1475
1476 // titan 3c stats
1477 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1478 tANI_U32 chunksTxCntLo;
1479 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1480 tANI_U32 compPktRxCntLo;
1481 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1482 tANI_U32 expanPktRxCntLo;
1483
1484
1485 /* Following elements are valid and filled in correctly. They have valid values.
1486 */
1487
1488 //Unicast frames and bytes.
1489 tAniTxRxStats ucStats;
1490
1491 //Broadcast frames and bytes.
1492 tAniTxRxStats bcStats;
1493
1494 //Multicast frames and bytes.
1495 tAniTxRxStats mcStats;
1496
1497 tANI_U32 currentTxRate;
1498 tANI_U32 currentRxRate; //Rate in 100Kbps
1499
1500 tANI_U32 maxTxRate;
1501 tANI_U32 maxRxRate;
1502
1503 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1504
1505
1506 tAniSecStats securityStats;
1507
1508 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1509 tANI_U8 currentTxRateIdx;
1510
1511} tAniStaStatStruct, *tpAniStaStatStruct;
1512
1513//Statistics that are not maintained per stations.
1514typedef struct sAniGlobalStatStruct
1515{
1516 tAni64BitCounters txError;
1517 tAni64BitCounters rxError;
1518 tAni64BitCounters rxDropNoBuffer;
1519 tAni64BitCounters rxDropDup;
1520 tAni64BitCounters rxCRCError;
1521
1522 tAni64BitCounters singleRetryPkts;
1523 tAni64BitCounters failedTxPkts;
1524 tAni64BitCounters ackTimeouts;
1525 tAni64BitCounters multiRetryPkts;
1526 tAni64BitCounters fragTxCnts;
1527 tAni64BitCounters fragRxCnts;
1528
1529 tAni64BitCounters txRTSSuccess;
1530 tAni64BitCounters txCTSSuccess;
1531 tAni64BitCounters rxRTSSuccess;
1532 tAni64BitCounters rxCTSSuccess;
1533
1534 tAniSecStats securityStats;
1535
1536 tAniTxRxStats mcStats;
1537 tAniTxRxStats bcStats;
1538
1539}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1540
1541typedef enum sPacketType
1542{
1543 ePACKET_TYPE_UNKNOWN,
1544 ePACKET_TYPE_11A,
1545 ePACKET_TYPE_11G,
1546 ePACKET_TYPE_11B,
1547 ePACKET_TYPE_11N
1548
1549}tPacketType, *tpPacketType;
1550
1551typedef struct sAniStatSummaryStruct
1552{
1553 tAniTxRxStats uc; //Unicast counters.
1554 tAniTxRxStats bc; //Broadcast counters.
1555 tAniTxRxStats mc; //Multicast counters.
1556 tAni64BitCounters txError;
1557 tAni64BitCounters rxError;
1558 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1559 tANI_U32 rxRate; // Rx rate of the last received packet.
1560 tANI_U32 txRate;
1561 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1562 tANI_U16 txMCSId;
1563 tPacketType rxPacketType;
1564 tPacketType txPacketType;
1565 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1566}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1567
Jeff Johnson295189b2012-06-20 16:38:30 -07001568//structure for stats that may be reset, like the ones in sta descriptor
1569//The stats are saved into here before reset. It should be tANI_U32 aligned.
1570typedef struct _sPermStaStats
1571{
1572 //tANI_U32 sentAesBlksUcastHi;
1573 //tANI_U32 sentAesBlksUcastLo;
1574 //tANI_U32 recvAesBlksUcastHi;
1575 //tANI_U32 recvAesBlksUcastLo;
1576 tANI_U32 aesFormatErrorUcastCnts;
1577 tANI_U32 aesReplaysUcast;
1578 tANI_U32 aesDecryptErrUcast;
1579 tANI_U32 singleRetryPkts;
1580 tANI_U32 failedTxPkts;
1581 tANI_U32 ackTimeouts;
1582 tANI_U32 multiRetryPkts;
1583 tANI_U32 fragTxCntsHi;
1584 tANI_U32 fragTxCntsLo;
1585 tANI_U32 transmittedPktsHi;
1586 tANI_U32 transmittedPktsLo;
1587
1588 // titan 3c stats
1589 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1590 tANI_U32 chunksTxCntLo;
1591 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1592 tANI_U32 compPktRxCntLo;
1593 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1594 tANI_U32 expanPktRxCntLo;
1595}tPermanentStaStats;
1596
Jeff Johnson295189b2012-06-20 16:38:30 -07001597
1598
1599
1600/// Definition for Disassociation response
1601typedef struct sSirSmeDisassocRsp
1602{
1603 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1604 tANI_U16 length;
1605 tANI_U8 sessionId; // Session ID
1606 tANI_U16 transactionId; // Transaction ID for cmd
1607 tSirResultCodes statusCode;
1608 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001609 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001610 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001611}
Jeff Johnson295189b2012-06-20 16:38:30 -07001612__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001613 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1614
1615/// Definition for Disassociation indication from peer
1616typedef struct sSirSmeDisassocInd
1617{
1618 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1619 tANI_U16 length;
1620 tANI_U8 sessionId; // Session Identifier
1621 tANI_U16 transactionId; // Transaction Identifier with PE
1622 tSirResultCodes statusCode;
1623 tSirMacAddr bssId;
1624 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001625 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001626 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001627 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001628 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001629} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1630
1631/// Definition for Disassociation confirm
1632/// MAC --->
1633typedef struct sSirSmeDisassocCnf
1634{
1635 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1636 tANI_U16 length;
1637 tSirResultCodes statusCode;
1638 tSirMacAddr bssId;
1639 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001640 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001641} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1642
1643/// Definition for Deauthetication request
1644typedef struct sSirSmeDeauthReq
1645{
1646 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1647 tANI_U16 length;
1648 tANI_U8 sessionId; // Session ID
1649 tANI_U16 transactionId; // Transaction ID for cmd
1650 tSirMacAddr bssId; // AP BSSID
1651 tSirMacAddr peerMacAddr;
1652 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001653} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1654
1655/// Definition for Deauthetication response
1656typedef struct sSirSmeDeauthRsp
1657{
1658 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1659 tANI_U16 length;
1660 tANI_U8 sessionId; // Session ID
1661 tANI_U16 transactionId; // Transaction ID for cmd
1662 tSirResultCodes statusCode;
1663 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001664} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1665
1666/// Definition for Deauthetication indication from peer
1667typedef struct sSirSmeDeauthInd
1668{
1669 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1670 tANI_U16 length;
1671 tANI_U8 sessionId; //Added for BT-AMP
1672 tANI_U16 transactionId; //Added for BT-AMP
1673 tSirResultCodes statusCode;
1674 tSirMacAddr bssId;// AP BSSID
1675 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001676
Jeff Johnson295189b2012-06-20 16:38:30 -07001677 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001678 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001679 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001680} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1681
1682/// Definition for Deauthentication confirm
1683/// MAC --->
1684typedef struct sSirSmeDeauthCnf
1685{
1686 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1687 tANI_U16 length;
1688 tSirResultCodes statusCode;
1689 tSirMacAddr bssId; // AP BSSID
1690 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001691 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001692} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1693
Hanumantha Reddy Pothula1b6eb2f2015-11-30 20:50:23 +05301694typedef struct sSirSmeDisConDoneInd
1695{
1696 tANI_U16 messageType;
1697 tANI_U16 length;
1698 tANI_U8 sessionId;
1699 tSirResultCodes reasonCode;
1700 tSirMacAddr peerMacAddr;
1701}tSirSmeDisConDoneInd, *tpSirSmeDisConDoneInd;
1702
Jeff Johnson295189b2012-06-20 16:38:30 -07001703/// Definition for stop BSS request message
1704typedef struct sSirSmeStopBssReq
1705{
1706 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1707 tANI_U16 length;
1708 tANI_U8 sessionId; //Session ID
1709 tANI_U16 transactionId; //tranSaction ID for cmd
1710 tSirResultCodes reasonCode;
1711 tSirMacAddr bssId; //Self BSSID
1712} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1713
1714/// Definition for stop BSS response message
1715typedef struct sSirSmeStopBssRsp
1716{
1717 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1718 tANI_U16 length;
1719 tSirResultCodes statusCode;
1720 tANI_U8 sessionId; // Session ID
1721 tANI_U16 transactionId; // Transaction ID for cmd
1722} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1723
Jeff Johnson295189b2012-06-20 16:38:30 -07001724
1725
1726/// Definition for Channel Switch indication for station
1727/// MAC --->
1728typedef struct sSirSmeSwitchChannelInd
1729{
1730 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1731 tANI_U16 length;
1732 tANI_U8 sessionId;
1733 tANI_U16 newChannelId;
1734 tSirMacAddr bssId; // BSSID
1735} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1736
1737/// Definition for ULA complete indication message
1738typedef struct sirUlaCompleteInd
1739{
1740 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1741 tANI_U16 length;
1742 tSirResultCodes statusCode;
1743 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001744} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1745
1746/// Definition for ULA complete confirmation message
1747typedef struct sirUlaCompleteCnf
1748{
1749 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1750 tANI_U16 length;
1751 tSirResultCodes statusCode;
1752 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001753} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1754
1755/// Definition for Neighbor BSS indication
1756/// MAC --->
1757/// MAC reports this each time a new I/BSS is detected
1758typedef struct sSirSmeNeighborBssInd
1759{
1760 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1761 tANI_U16 length;
1762 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001763 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001764} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1765
1766/// Definition for MIC failure indication
1767/// MAC --->
1768/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1769typedef struct sSirSmeMicFailureInd
1770{
1771 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1772 tANI_U16 length;
1773 tANI_U8 sessionId;
1774 tSirMacAddr bssId; // BSSID
1775 tSirMicFailureInfo info;
1776} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1777
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05301778typedef struct sSirSmeLostLinkParamsInd
1779{
1780 tANI_U16 messageType;
1781 tANI_U16 length;
1782 tANI_U8 sessionId;
1783 tSirLostLinkParamsInfo info;
1784} tSirSmeLostLinkParamsInd, *tpSirSmeLostLinkParamsInd;
1785
1786
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001787typedef struct sSirSmeMissedBeaconInd
1788{
1789 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1790 tANI_U16 length;
1791 tANI_U8 bssIdx;
1792} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001793
1794/// Definition for Set Context request
1795/// ---> MAC
1796typedef struct sSirSmeSetContextReq
1797{
1798 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1799 tANI_U16 length;
1800 tANI_U8 sessionId; //Session ID
1801 tANI_U16 transactionId; //Transaction ID for cmd
1802 tSirMacAddr peerMacAddr;
1803 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001804 // TBD Following QOS fields to be uncommented
1805 //tAniBool qosInfoPresent;
1806 //tSirQos qos;
1807 tSirKeyMaterial keyMaterial;
1808} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1809
1810/// Definition for Set Context response
1811/// MAC --->
1812typedef struct sSirSmeSetContextRsp
1813{
1814 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1815 tANI_U16 length;
1816 tANI_U8 sessionId; // Session ID
1817 tANI_U16 transactionId; // Transaction ID for cmd
1818 tSirResultCodes statusCode;
1819 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001820} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1821
1822/// Definition for Remove Key Context request
1823/// ---> MAC
1824typedef struct sSirSmeRemoveKeyReq
1825{
1826 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1827 tANI_U16 length;
1828 tANI_U8 sessionId; // Session ID
1829 tANI_U16 transactionId; // Transaction ID for cmd
1830 tSirMacAddr bssId; // BSSID
1831 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001832 tANI_U8 edType;
1833 tANI_U8 wepType;
1834 tANI_U8 keyId;
1835 tANI_BOOLEAN unicast;
1836} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1837
1838/// Definition for Remove Key Context response
1839/// MAC --->
1840typedef struct sSirSmeRemoveKeyRsp
1841{
1842 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1843 tANI_U16 length;
1844 tANI_U8 sessionId; // Session ID
1845 tANI_U16 transactionId; // Transaction ID for cmd
1846 tSirResultCodes statusCode;
1847 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001848} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1849
1850/// Definition for Set Power request
1851/// ---> MAC
1852typedef struct sSirSmeSetPowerReq
1853{
1854 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1855 tANI_U16 length;
1856 tANI_U16 transactionId; // Transaction ID for cmd
1857 tANI_S8 powerLevel;
1858} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1859
1860/// Definition for Set Power response
1861/// MAC --->
1862typedef struct sSirSmeSetPowerRsp
1863{
1864 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1865 tANI_U16 length;
1866 tSirResultCodes statusCode;
1867 tANI_U16 transactionId; // Transaction ID for cmd
1868} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1869
Jeff Johnson295189b2012-06-20 16:38:30 -07001870
1871/// Definition for Link Test Start response
1872/// MAC --->
1873typedef struct sSirSmeLinkTestStartRsp
1874{
1875 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1876 tANI_U16 length;
1877 tSirMacAddr peerMacAddr;
1878 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001879} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1880
1881/// Definition for Link Test Stop response
1882/// WSM ---> MAC
1883typedef struct sSirSmeLinkTestStopRsp
1884{
1885 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1886 tANI_U16 length;
1887 tSirMacAddr peerMacAddr;
1888 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001889} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1890
1891/// Definition for kick starting DFS measurements
1892typedef struct sSirSmeDFSreq
1893{
1894 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1895 tANI_U16 length;
1896 tANI_U16 transactionId; // Transaction ID for cmd
1897} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1898
1899/// Definition for response message to previously
1900/// issued DFS request
1901typedef struct sSirSmeDFSrsp
1902{
1903 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1904 tANI_U16 length;
1905 tSirResultCodes statusCode;
1906 tANI_U16 transactionId; // Transaction ID for cmd
1907 tANI_U32 dfsReport[1];
1908} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1909
1910/// Statistic definitions
1911//=============================================================
1912// Per STA statistic structure; This same struct will be used for Aggregate
1913// STA stats as well.
1914
1915// Clear radio stats and clear per sta stats
1916typedef enum
1917{
1918 eANI_CLEAR_ALL_STATS, // Clears all stats
1919 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1920 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1921 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1922 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1923 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1924
1925 // Used to distinguish between per sta to security stats.
1926 // Used only by AP, FW just returns the same parameter as it received.
1927 eANI_LINK_STATS, // Get Per STA stats
1928 eANI_SECURITY_STATS, // Get Per STA security stats
1929
1930 eANI_CLEAR_STAT_TYPES_END
1931} tAniStatSubTypes;
1932
1933typedef struct sAniTxCtrs
1934{
1935 // add the rate counters here
1936 tANI_U32 tx1Mbps;
1937 tANI_U32 tx2Mbps;
1938 tANI_U32 tx5_5Mbps;
1939 tANI_U32 tx6Mbps;
1940 tANI_U32 tx9Mbps;
1941 tANI_U32 tx11Mbps;
1942 tANI_U32 tx12Mbps;
1943 tANI_U32 tx18Mbps;
1944 tANI_U32 tx24Mbps;
1945 tANI_U32 tx36Mbps;
1946 tANI_U32 tx48Mbps;
1947 tANI_U32 tx54Mbps;
1948 tANI_U32 tx72Mbps;
1949 tANI_U32 tx96Mbps;
1950 tANI_U32 tx108Mbps;
1951
1952 // tx path radio counts
1953 tANI_U32 txFragHi;
1954 tANI_U32 txFragLo;
1955 tANI_U32 txFrameHi;
1956 tANI_U32 txFrameLo;
1957 tANI_U32 txMulticastFrameHi;
1958 tANI_U32 txMulticastFrameLo;
1959 tANI_U32 txFailedHi;
1960 tANI_U32 txFailedLo;
1961 tANI_U32 multipleRetryHi;
1962 tANI_U32 multipleRetryLo;
1963 tANI_U32 singleRetryHi;
1964 tANI_U32 singleRetryLo;
1965 tANI_U32 ackFailureHi;
1966 tANI_U32 ackFailureLo;
1967 tANI_U32 xmitBeacons;
1968
1969 // titan 3c stats
1970 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1971 tANI_U32 txCbEscPktCntLo;
1972 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1973 tANI_U32 txChunksCntLo;
1974 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1975 tANI_U32 txCompPktCntLo;
1976 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1977 tANI_U32 tx50PerCompPktCntLo;
1978 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1979 tANI_U32 txExpanPktCntLo;
1980} tAniTxCtrs, *tpAniTxCtrs;
1981
1982typedef struct sAniRxCtrs
1983{
1984 // receive frame rate counters
1985 tANI_U32 rx1Mbps;
1986 tANI_U32 rx2Mbps;
1987 tANI_U32 rx5_5Mbps;
1988 tANI_U32 rx6Mbps;
1989 tANI_U32 rx9Mbps;
1990 tANI_U32 rx11Mbps;
1991 tANI_U32 rx12Mbps;
1992 tANI_U32 rx18Mbps;
1993 tANI_U32 rx24Mbps;
1994 tANI_U32 rx36Mbps;
1995 tANI_U32 rx48Mbps;
1996 tANI_U32 rx54Mbps;
1997 tANI_U32 rx72Mbps;
1998 tANI_U32 rx96Mbps;
1999 tANI_U32 rx108Mbps;
2000
2001 // receive size counters; 'Lte' = Less than or equal to
2002 tANI_U32 rxLte64;
2003 tANI_U32 rxLte128Gt64;
2004 tANI_U32 rxLte256Gt128;
2005 tANI_U32 rxLte512Gt256;
2006 tANI_U32 rxLte1kGt512;
2007 tANI_U32 rxLte1518Gt1k;
2008 tANI_U32 rxLte2kGt1518;
2009 tANI_U32 rxLte4kGt2k;
2010
2011 // rx radio stats
2012 tANI_U32 rxFrag;
2013 tANI_U32 rxFrame;
2014 tANI_U32 fcsError;
2015 tANI_U32 rxMulticast;
2016 tANI_U32 duplicate;
2017 tANI_U32 rtsSuccess;
2018 tANI_U32 rtsFailed;
2019 tANI_U32 wepUndecryptables;
2020 tANI_U32 drops;
2021 tANI_U32 aesFormatErrorUcastCnts;
2022 tANI_U32 aesReplaysUcast;
2023 tANI_U32 aesDecryptErrUcast;
2024
2025 // titan 3c stats
2026 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
2027 tANI_U32 rxDecompPktCntLo;
2028 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
2029 tANI_U32 rxCompPktCntLo;
2030 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
2031 tANI_U32 rxExpanPktCntLo;
2032} tAniRxCtrs, *tpAniRxCtrs;
2033
2034// Radio stats
2035typedef struct sAniRadioStats
2036{
2037 tAniTxCtrs tx;
2038 tAniRxCtrs rx;
2039} tAniRadioStats, *tpAniRadioStats;
2040
2041// Get Radio Stats request structure
2042// This structure shall be used for both Radio stats and Aggregate stats
2043// A valid request must contain entire structure with/without valid fields.
2044// Based on the request type, the valid fields will be checked.
2045typedef struct sAniGetStatsReq
2046{
2047 // Common for all types are requests
2048 tANI_U16 msgType; // message type is same as the request type
2049 tANI_U16 msgLen; // length of the entire request
2050 tANI_U8 sessionId; //Session ID
2051 tANI_U16 transactionId;
2052 tSirMacAddr bssId; //BSSID
2053 // only used for clear stats and per sta stats clear
2054 tAniStatSubTypes stat; // Clears the stats of the described types.
2055 tANI_U32 staId; // Per STA stats request must contain valid
2056 // values
2057 tANI_U8 macAddr[6];
2058} tAniGetStatsReq, *tpAniGetStatsReq;
2059
2060// Get Radio Stats response struct
2061typedef struct sAniGetRadioStatsRsp
2062{
2063 tANI_U16 type; // message type is same as the request type
2064 tANI_U16 msgLen; // length of the entire request
2065 tANI_U32 rc;
2066 tANI_U16 transactionId;
2067 tAniRadioStats radio;
2068} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2069
2070// Per Sta stats response struct
2071typedef struct sAniGetPerStaStatsRsp
2072{
2073 tANI_U16 type; // message type is same as the request type
2074 tANI_U16 msgLen; // length of the entire request
2075 tANI_U32 rc;
2076 tANI_U16 transactionId;
2077 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2078 tAniStaStatStruct sta;
2079 tANI_U32 staId;
2080 tANI_U8 macAddr[6];
2081} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2082
2083// Get Aggregate stats
2084typedef struct sAniGetAggrStaStatsRsp
2085{
2086 tANI_U16 type; // message type is same as the request type
2087 tANI_U16 msgLen; // length of the entire request
2088 tANI_U32 rc;
2089 tANI_U16 transactionId;
2090 tAniStaStatStruct sta;
2091} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2092
2093// Clear stats request and response structure. 'rc' field is unused in
2094// request and this field is used in response field.
2095typedef struct sAniClearStatsRsp
2096{
2097 tANI_U16 type; // message type is same as the request type
2098 tANI_U16 msgLen; // length of the entire request
2099 tANI_U32 rc; // return code - will be filled by FW on
2100 // response.
2101 // Same transaction ID will be returned by the FW
2102 tANI_U16 transactionId;
2103 tAniStatSubTypes stat; // Clears the stats of the described types.
2104 tANI_U32 staId; // Applicable only to PER STA stats clearing
2105 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2106} tAniClearStatsRsp, *tpAniClearStatsRsp;
2107
2108typedef struct sAniGetGlobalStatsRsp
2109{
2110 tANI_U16 type; // message type is same as the request type
2111 tANI_U16 msgLen; // length of the entire request
2112 tANI_U32 rc;
2113 tANI_U16 transactionId;
2114 tAniGlobalStatStruct global;
2115} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2116
2117typedef struct sAniGetStatSummaryRsp
2118{
2119 tANI_U16 type; // message type is same as the request type
2120 tANI_U16 msgLen; // length of the entire request --Why?
2121 tANI_U32 rc;
2122 tANI_U16 transactionId;
2123 tAniStatSummaryStruct stat;
2124} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2125
2126//***************************************************************
2127
2128
2129/*******************PE Statistics*************************/
2130typedef enum
2131{
2132 PE_SUMMARY_STATS_INFO = 0x00000001,
2133 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2134 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2135 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2136 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
Sushant Kaushik33200572015-08-05 16:46:20 +05302137 PE_PER_STA_STATS_INFO = 0x00000020,
2138 PE_PER_TX_PKT_STATS_INFO = 0x00000040,
Jeff Johnson295189b2012-06-20 16:38:30 -07002139}ePEStatsMask;
2140
2141/*
2142 * tpAniGetPEStatsReq is tied to
2143 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2144 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2145 */
2146typedef struct sAniGetPEStatsReq
2147{
2148 // Common for all types are requests
2149 tANI_U16 msgType; // message type is same as the request type
2150 tANI_U16 msgLen; // length of the entire request
2151 tANI_U32 staId; // Per STA stats request must contain valid
2152 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2153} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2154
2155/*
2156 * tpAniGetPEStatsRsp is tied to
2157 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2158 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2159 */
2160typedef struct sAniGetPEStatsRsp
2161{
2162 // Common for all types are responses
2163 tANI_U16 msgType; // message type is same as the request type
2164 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2165 tANI_U8 sessionId;
2166 tANI_U32 rc; //success/failure
2167 tANI_U32 staId; // Per STA stats request must contain valid
2168 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2169/**********************************************************************************************
2170 //void *pStatsBuf;
2171 The Stats buffer starts here and can be an aggregate of more than one statistics
2172 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2173 intentionally and the src code that uses this structure should take that into account.
2174**********************************************************************************************/
2175} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2176
2177typedef struct sAniGetRssiReq
2178{
2179 // Common for all types are requests
2180 tANI_U16 msgType; // message type is same as the request type
2181 tANI_U16 msgLen; // length of the entire request
2182 tANI_U8 sessionId;
2183 tANI_U8 staId;
2184 void *rssiCallback;
2185 void *pDevContext; //device context
2186 void *pVosContext; //voss context
2187
2188} tAniGetRssiReq, *tpAniGetRssiReq;
2189
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302190typedef struct sAniGetSnrReq
2191{
2192 // Common for all types are requests
2193 tANI_U16 msgType; // message type is same as the request type
2194 tANI_U16 msgLen; // length of the entire request
2195 tANI_U8 sessionId;
2196 tANI_U8 staId;
2197 void *snrCallback;
2198 void *pDevContext; //device context
2199} tAniGetSnrReq, *tpAniGetSnrReq;
2200
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002201#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002202typedef struct sAniGetRoamRssiRsp
2203{
2204 // Common for all types are responses
2205 tANI_U16 msgType; // message type is same as the request type
2206 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2207 tANI_U8 sessionId;
2208 tANI_U32 rc; //success/failure
2209 tANI_U32 staId; // Per STA stats request must contain valid
2210 tANI_S8 rssi;
2211 void *rssiReq; //rssi request backup
2212
2213} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2214
2215#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002216
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002217#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002218
2219typedef struct sSirTsmIE
2220{
2221 tANI_U8 tsid;
2222 tANI_U8 state;
2223 tANI_U16 msmt_interval;
2224} tSirTsmIE, *tpSirTsmIE;
2225
2226typedef struct sSirSmeTsmIEInd
2227{
2228 tSirTsmIE tsmIe;
2229 tANI_U8 sessionId;
2230} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2231
2232
2233typedef struct sAniTrafStrmMetrics
2234{
2235 tANI_U16 UplinkPktQueueDly;
2236 tANI_U16 UplinkPktQueueDlyHist[4];
2237 tANI_U32 UplinkPktTxDly;
2238 tANI_U16 UplinkPktLoss;
2239 tANI_U16 UplinkPktCount;
2240 tANI_U8 RoamingCount;
2241 tANI_U16 RoamingDly;
2242} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2243
2244typedef struct sAniGetTsmStatsReq
2245{
2246 // Common for all types are requests
2247 tANI_U16 msgType; // message type is same as the request type
2248 tANI_U16 msgLen; // length of the entire request
2249 tANI_U8 staId;
2250 tANI_U8 tid; // traffic id
2251 tSirMacAddr bssId;
2252 void *tsmStatsCallback;
2253 void *pDevContext; //device context
2254 void *pVosContext; //voss context
2255} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2256
2257typedef struct sAniGetTsmStatsRsp
2258{
2259 // Common for all types are responses
2260 tANI_U16 msgType; // message type is same as the request type
2261 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2262 tANI_U8 sessionId;
2263 tANI_U32 rc; //success/failure
2264 tANI_U32 staId; // Per STA stats request must contain valid
2265 tAniTrafStrmMetrics tsmMetrics;
2266 void *tsmStatsReq; //tsm stats request backup
2267} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002268
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002269typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002270{
2271 tBcnReportFields bcnReportFields;
2272 tANI_U8 ieLen;
2273 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002274} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002275
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002276typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002277{
2278 tANI_U16 measurementToken;
2279 tANI_U8 flag; /* Flag to report measurement done and more data */
2280 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002281 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2282} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002283
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002284#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002285
Jeff Johnson295189b2012-06-20 16:38:30 -07002286/* Change country code request MSG structure */
2287typedef struct sAniChangeCountryCodeReq
2288{
2289 // Common for all types are requests
2290 tANI_U16 msgType; // message type is same as the request type
2291 tANI_U16 msgLen; // length of the entire request
2292 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302293 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302294 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002295 void *changeCCCallback;
2296 void *pDevContext; //device context
2297 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002298
Jeff Johnson295189b2012-06-20 16:38:30 -07002299} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2300
Amar Singhal0d15bd52013-10-12 23:13:13 -07002301/* generic country code change request MSG structure */
2302typedef struct sAniGenericChangeCountryCodeReq
2303{
2304 // Common for all types are requests
2305 tANI_U16 msgType; // message type is same as the request type
2306 tANI_U16 msgLen; // length of the entire request
2307 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2308 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002309} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2310
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302311typedef struct sAniDHCPStopInd
2312{
2313 tANI_U16 msgType; // message type is same as the request type
2314 tANI_U16 msgLen; // length of the entire request
2315 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2316 tSirMacAddr macAddr;
2317
2318} tAniDHCPInd, *tpAniDHCPInd;
2319
Abhishek Singh00b71972016-01-07 10:51:04 +05302320#ifdef WLAN_FEATURE_RMC
2321typedef struct sAniTXFailMonitorInd
2322{
2323 tANI_U16 msgType; // message type is same as the request type
2324 tANI_U16 msgLen; // length of the entire request
2325 tANI_U8 tx_fail_count;
2326 void *txFailIndCallback;
2327} tAniTXFailMonitorInd, *tpAniTXFailMonitorInd;
2328#endif /* WLAN_FEATURE_RMC */
2329
Jeff Johnson295189b2012-06-20 16:38:30 -07002330typedef struct sAniSummaryStatsInfo
2331{
2332 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2333 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2334 // station successfully transmitted after more than one retransmission attempt
2335
2336 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2337 //(with and without retries, including multi-cast, broadcast)
2338 //tANI_U32 tx_fail_cnt;
2339 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2340 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2341 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2342 //(after appropriate filter rules including multi-cast, broadcast)
2343 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2344 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2345 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2346 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2347 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2348 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2349 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2350 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2351 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2352 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2353 //to provide this.
2354#if 0
2355 //providing the following stats, in case of wrap around for tx_byte_cnt
2356 tANI_U32 tx_unicast_lower_byte_cnt;
2357 tANI_U32 tx_unicast_upper_byte_cnt;
2358 tANI_U32 tx_multicast_lower_byte_cnt;
2359 tANI_U32 tx_multicast_upper_byte_cnt;
2360 tANI_U32 tx_broadcast_lower_byte_cnt;
2361 tANI_U32 tx_broadcast_upper_byte_cnt;
2362#endif
2363
2364}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2365
2366typedef enum eTxRateInfo
2367{
2368 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2369 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2370 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2371 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002372 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2373 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2374 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2375 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002376} tTxrateinfoflags;
2377
2378typedef struct sAniGlobalClassAStatsInfo
2379{
2380 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2381 //or MMPDU frames
2382 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2383 //or MMPDU frames when a promiscuous packet filter was enabled
2384 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2385 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2386 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2387 //to a supported rate and the order shall be the same as the supporteRates parameter.
2388 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2389 //for eg: if it is 10.5dBm, the value would be 105
2390 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2391 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2392 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2393 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2394 //500 kbit/sec, for the most
2395 //recently transmitted frame
2396 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2397 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2398 //HT40 rates; short and long guard interval
2399
2400}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2401
2402
2403typedef struct sAniGlobalSecurityStats
2404{
2405 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2406 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2407 //is enabled
2408 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2409 //because of MIC failures
2410 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2411 //because of a TKIP ICV error
2412 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2413 //invalid AES-CCMP format
2414 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2415 //the AES-CCMP replay protection procedure
2416 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2417 //errors detected by the AES-CCMP decryption algorithm
2418 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2419 //not available on the 802.11 station
2420 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2421 //because of a WEP ICV error
2422 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2423 //decrypted
2424 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2425
2426}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2427
2428typedef struct sAniGlobalClassBStatsInfo
2429{
2430 tAniGlobalSecurityStats ucStats;
2431 tAniGlobalSecurityStats mcbcStats;
2432}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2433
2434typedef struct sAniGlobalClassCStatsInfo
2435{
2436 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2437 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2438 //address 1 field
2439 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2440 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2441 //primary channel
2442 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2443 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2444 //when an A-MPDU is received
2445 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2446 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2447 //decoded correctly
2448
2449}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2450
2451typedef struct sAniPerStaStatsInfo
2452{
2453 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2454 //through a received 802.11 ACK frame
2455 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2456 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2457 //is transmitted
2458
2459}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2460
Sushant Kaushik33200572015-08-05 16:46:20 +05302461typedef struct sAniPerTxPktStatsInfo
2462{
2463 tANI_U32 lastTxRate; // 802.11 data rate at which the last data frame is transmitted.
Sushant Kaushik3d5c1e62015-10-07 12:05:33 +05302464 tANI_U32 txAvgRetry; // Average number of retries per 10 packets.
Sushant Kaushik33200572015-08-05 16:46:20 +05302465}tAniPerTxPktStatsInfo, *tpAniPerTxPktStatsInfo;
2466
2467
Jeff Johnson295189b2012-06-20 16:38:30 -07002468/**********************PE Statistics end*************************/
2469
2470
2471
2472typedef struct sSirRSSIThresholds
2473{
2474#ifdef ANI_BIG_BYTE_ENDIAN
2475 tANI_S8 ucRssiThreshold1 : 8;
2476 tANI_S8 ucRssiThreshold2 : 8;
2477 tANI_S8 ucRssiThreshold3 : 8;
2478 tANI_U8 bRssiThres1PosNotify : 1;
2479 tANI_U8 bRssiThres1NegNotify : 1;
2480 tANI_U8 bRssiThres2PosNotify : 1;
2481 tANI_U8 bRssiThres2NegNotify : 1;
2482 tANI_U8 bRssiThres3PosNotify : 1;
2483 tANI_U8 bRssiThres3NegNotify : 1;
2484 tANI_U8 bReserved10 : 2;
2485#else
2486 tANI_U8 bReserved10 : 2;
2487 tANI_U8 bRssiThres3NegNotify : 1;
2488 tANI_U8 bRssiThres3PosNotify : 1;
2489 tANI_U8 bRssiThres2NegNotify : 1;
2490 tANI_U8 bRssiThres2PosNotify : 1;
2491 tANI_U8 bRssiThres1NegNotify : 1;
2492 tANI_U8 bRssiThres1PosNotify : 1;
2493 tANI_S8 ucRssiThreshold3 : 8;
2494 tANI_S8 ucRssiThreshold2 : 8;
2495 tANI_S8 ucRssiThreshold1 : 8;
2496#endif
2497
2498}tSirRSSIThresholds, *tpSirRSSIThresholds;
2499
2500typedef struct sSirRSSINotification
2501{
2502#ifdef ANI_BIG_BYTE_ENDIAN
2503 tANI_U32 bRssiThres1PosCross : 1;
2504 tANI_U32 bRssiThres1NegCross : 1;
2505 tANI_U32 bRssiThres2PosCross : 1;
2506 tANI_U32 bRssiThres2NegCross : 1;
2507 tANI_U32 bRssiThres3PosCross : 1;
2508 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002509 v_S7_t avgRssi : 8;
2510 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002511#else
Srinivasdaaec712012-12-12 15:59:44 -08002512 tANI_U32 bReserved : 18;
2513 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002514 tANI_U32 bRssiThres3NegCross : 1;
2515 tANI_U32 bRssiThres3PosCross : 1;
2516 tANI_U32 bRssiThres2NegCross : 1;
2517 tANI_U32 bRssiThres2PosCross : 1;
2518 tANI_U32 bRssiThres1NegCross : 1;
2519 tANI_U32 bRssiThres1PosCross : 1;
2520#endif
2521
2522}tSirRSSINotification, *tpSirRSSINotification;
2523
Viral Modid86bde22012-12-10 13:09:21 -08002524
2525typedef struct sSirP2PNoaStart
2526{
2527 tANI_U32 status;
2528 tANI_U32 bssIdx;
2529} tSirP2PNoaStart, *tpSirP2PNoaStart;
2530
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302531typedef struct sSirTdlsInd
2532{
2533 tANI_U16 status;
2534 tANI_U16 assocId;
2535 tANI_U16 staIdx;
2536 tANI_U16 reasonCode;
2537} tSirTdlsInd, *tpSirTdlsInd;
2538
Jeff Johnson295189b2012-06-20 16:38:30 -07002539typedef struct sSirP2PNoaAttr
2540{
2541#ifdef ANI_BIG_BYTE_ENDIAN
2542 tANI_U32 index :8;
2543 tANI_U32 oppPsFlag :1;
2544 tANI_U32 ctWin :7;
2545 tANI_U32 rsvd1: 16;
2546#else
2547 tANI_U32 rsvd1: 16;
2548 tANI_U32 ctWin :7;
2549 tANI_U32 oppPsFlag :1;
2550 tANI_U32 index :8;
2551#endif
2552
2553#ifdef ANI_BIG_BYTE_ENDIAN
2554 tANI_U32 uNoa1IntervalCnt:8;
2555 tANI_U32 rsvd2:24;
2556#else
2557 tANI_U32 rsvd2:24;
2558 tANI_U32 uNoa1IntervalCnt:8;
2559#endif
2560 tANI_U32 uNoa1Duration;
2561 tANI_U32 uNoa1Interval;
2562 tANI_U32 uNoa1StartTime;
2563
2564#ifdef ANI_BIG_BYTE_ENDIAN
2565 tANI_U32 uNoa2IntervalCnt:8;
2566 tANI_U32 rsvd3:24;
2567#else
2568 tANI_U32 rsvd3:24;
2569 tANI_U32 uNoa2IntervalCnt:8;
2570#endif
2571 tANI_U32 uNoa2Duration;
2572 tANI_U32 uNoa2Interval;
2573 tANI_U32 uNoa2StartTime;
2574} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002575
2576typedef __ani_attr_pre_packed struct sSirTclasInfo
2577{
2578 tSirMacTclasIE tclas;
2579 tANI_U8 version; // applies only for classifier type ip
2580 __ani_attr_pre_packed union {
2581 tSirMacTclasParamEthernet eth;
2582 tSirMacTclasParamIPv4 ipv4;
2583 tSirMacTclasParamIPv6 ipv6;
2584 tSirMacTclasParam8021dq t8021dq;
2585 }__ani_attr_packed tclasParams;
2586} __ani_attr_packed tSirTclasInfo;
2587
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002588
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002589#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002590#define TSRS_11AG_RATE_6MBPS 0xC
2591#define TSRS_11B_RATE_5_5MBPS 0xB
2592
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002593typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002594{
2595 tANI_U8 tsid;
2596 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002597} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002598
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002599typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002600{
2601 tANI_U8 tsid;
2602 tANI_U8 state;
2603 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002604} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002605
2606typedef struct sTSMStats
2607{
2608 tANI_U8 tid;
2609 tSirMacAddr bssId;
2610 tTrafStrmMetrics tsmMetrics;
2611} tTSMStats, *tpTSMStats;
2612
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002613typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002614{
2615 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002616 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002617 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002618} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002619
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002620typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002621{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002622#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2623 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002624#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002625 tEseTSMContext tsm;
2626} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002627
2628
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002629#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002630
2631
Jeff Johnson295189b2012-06-20 16:38:30 -07002632typedef struct sSirAddtsReqInfo
2633{
2634 tANI_U8 dialogToken;
2635 tSirMacTspecIE tspec;
2636
2637 tANI_U8 numTclas; // number of Tclas elements
2638 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2639 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002640#if defined(FEATURE_WLAN_ESE)
2641 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002642 tANI_U8 tsrsPresent:1;
2643#endif
2644 tANI_U8 wmeTspecPresent:1;
2645 tANI_U8 wsmTspecPresent:1;
2646 tANI_U8 lleTspecPresent:1;
2647 tANI_U8 tclasProcPresent:1;
2648} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2649
2650typedef struct sSirAddtsRspInfo
2651{
2652 tANI_U8 dialogToken;
2653 tSirMacStatusCodes status;
2654 tSirMacTsDelayIE delay;
2655
2656 tSirMacTspecIE tspec;
2657 tANI_U8 numTclas; // number of Tclas elements
2658 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2659 tANI_U8 tclasProc;
2660 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002661#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2662 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002663 tANI_U8 tsmPresent:1;
2664#endif
2665 tANI_U8 wmeTspecPresent:1;
2666 tANI_U8 wsmTspecPresent:1;
2667 tANI_U8 lleTspecPresent:1;
2668 tANI_U8 tclasProcPresent:1;
2669 tANI_U8 schedulePresent:1;
2670} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2671
2672typedef struct sSirDeltsReqInfo
2673{
2674 tSirMacTSInfo tsinfo;
2675 tSirMacTspecIE tspec;
2676 tANI_U8 wmeTspecPresent:1;
2677 tANI_U8 wsmTspecPresent:1;
2678 tANI_U8 lleTspecPresent:1;
2679} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2680
2681/// Add a tspec as defined
2682typedef struct sSirAddtsReq
2683{
2684 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2685 tANI_U16 length;
2686 tANI_U8 sessionId; //Session ID
2687 tANI_U16 transactionId;
2688 tSirMacAddr bssId; //BSSID
2689 tANI_U32 timeout; // in ms
2690 tANI_U8 rspReqd;
2691 tSirAddtsReqInfo req;
2692} tSirAddtsReq, *tpSirAddtsReq;
2693
2694typedef struct sSirAddtsRsp
2695{
2696 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2697 tANI_U16 length;
2698 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2699 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2700 tANI_U32 rc; // return code
2701 tSirAddtsRspInfo rsp;
2702} tSirAddtsRsp, *tpSirAddtsRsp;
2703
2704typedef struct sSirDeltsReq
2705{
2706 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2707 tANI_U16 length;
2708 tANI_U8 sessionId;//Session ID
2709 tANI_U16 transactionId;
2710 tSirMacAddr bssId; //BSSID
2711 tANI_U16 aid; // use 0 if macAddr is being specified
2712 tANI_U8 macAddr[6]; // only on AP to specify the STA
2713 tANI_U8 rspReqd;
2714 tSirDeltsReqInfo req;
2715} tSirDeltsReq, *tpSirDeltsReq;
2716
2717typedef struct sSirDeltsRsp
2718{
2719 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2720 tANI_U16 length;
2721 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2722 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2723 tANI_U32 rc;
2724 tANI_U16 aid; // use 0 if macAddr is being specified
2725 tANI_U8 macAddr[6]; // only on AP to specify the STA
2726 tSirDeltsReqInfo rsp;
2727} tSirDeltsRsp, *tpSirDeltsRsp;
2728
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002729#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002730
2731#define SIR_QOS_NUM_TSPEC_MAX 2
2732#define SIR_QOS_NUM_AC_MAX 4
2733
2734typedef struct sSirAggrQosReqInfo
2735{
2736 tANI_U16 tspecIdx;
2737 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2738}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2739
2740typedef struct sSirAggrQosReq
2741{
2742 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2743 tANI_U16 length;
2744 tANI_U8 sessionId; //Session ID
2745 tANI_U16 transactionId;
2746 tSirMacAddr bssId; //BSSID
2747 tANI_U32 timeout; // in ms
2748 tANI_U8 rspReqd;
2749 tSirAggrQosReqInfo aggrInfo;
2750}tSirAggrQosReq, *tpSirAggrQosReq;
2751
2752typedef struct sSirAggrQosRspInfo
2753{
2754 tANI_U16 tspecIdx;
2755 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2756} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2757
2758typedef struct sSirAggrQosRsp
2759{
2760 tANI_U16 messageType;
2761 tANI_U16 length;
2762 tANI_U8 sessionId;
2763 tSirAggrQosRspInfo aggrInfo;
2764} tSirAggrQosRsp, *tpSirAggrQosRsp;
2765
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002766#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002767
2768typedef struct sSirSetTxPowerReq
2769{
schang86c22c42013-03-13 18:41:24 -07002770 tANI_U16 messageType;
2771 tANI_U16 length;
2772 tSirMacAddr bssId;
2773 tANI_U8 mwPower;
2774 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002775} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2776
2777typedef struct sSirSetTxPowerRsp
2778{
2779 tANI_U16 messageType;
2780 tANI_U16 length;
2781 tANI_U32 status;
2782} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2783
2784typedef struct sSirGetTxPowerReq
2785{
2786 tANI_U16 messageType;
2787 tANI_U16 length;
2788 tANI_U16 staid;
2789} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2790
2791typedef struct sSirGetTxPowerRsp
2792{
2793 tANI_U16 messageType;
2794 tANI_U16 length; // length of the entire request
2795 tANI_U32 power; // units of milliwatts
2796 tANI_U32 status;
2797} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2798
2799
2800typedef tANI_U32 tSirMacNoise[3];
2801
2802typedef struct sSirGetNoiseRsp
2803{
2804 tANI_U16 messageType;
2805 tANI_U16 length;
2806 tSirMacNoise noise;
2807} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2808
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002809typedef struct sSirQosMapSet
2810{
2811 tANI_U8 present;
2812 tANI_U8 num_dscp_exceptions;
2813 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002814 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002815} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002816
2817//
2818// PMC --> PE --> HAL
2819// Power save configuration parameters
2820//
2821typedef struct sSirPowerSaveCfg
2822{
2823 tANI_U16 listenInterval;
2824
2825 /* Number of consecutive missed beacons before
2826 * hardware generates an interrupt to wake up
2827 * the host. In units of listen interval.
2828 */
2829 tANI_U32 HeartBeatCount;
2830
2831 /* specifies which beacons are to be forwarded
2832 * to host when beacon filtering is enabled.
2833 * In units of listen interval.
2834 */
2835 tANI_U32 nthBeaconFilter;
2836
2837 /* Maximum number of PS-Poll send before
2838 * firmware sends data null with PM set to 0.
2839 */
2840 tANI_U32 maxPsPoll;
2841
2842 /* If the average RSSI value falls below the
2843 * minRssiThreshold, then FW will send an
2844 * interrupt to wake up the host.
2845 */
2846 tANI_U32 minRssiThreshold;
2847
2848 /* Number of beacons for which firmware will
2849 * collect the RSSI values and compute the average.
2850 */
2851 tANI_U8 numBeaconPerRssiAverage;
2852
2853 /* FW collects the RSSI stats for this period
2854 * in BMPS mode.
2855 */
2856 tANI_U8 rssiFilterPeriod;
2857
2858 // Enabling/disabling broadcast frame filter feature
2859 tANI_U8 broadcastFrameFilter;
2860
2861 // Enabling/disabling the ignore DTIM feature
2862 tANI_U8 ignoreDtim;
2863
2864 /* The following configuration parameters are kept
2865 * in order to be backward compatible for Gen5.
2866 * These will NOT be used for Gen6 Libra chip
2867 */
2868 tBeaconForwarding beaconFwd;
2869 tANI_U16 nthBeaconFwd;
2870 tANI_U8 fEnablePwrSaveImmediately;
2871 tANI_U8 fPSPoll;
2872
2873 // Enabling/disabling Beacon Early Termination feature
2874 tANI_U8 fEnableBeaconEarlyTermination;
2875 tANI_U8 bcnEarlyTermWakeInterval;
2876
2877}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2878
2879/* Reason code for requesting Full Power. This reason code is used by
2880 any module requesting full power from PMC and also by PE when it
2881 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2882typedef enum eRequestFullPowerReason
2883{
2884 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2885 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2886 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2887 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2888 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2889 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2890 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2891 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2892 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2893 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002894#ifdef FEATURE_WLAN_TDLS
2895 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2896#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002897 eSME_REASON_OTHER /* No specific reason. General reason code */
2898} tRequestFullPowerReason, tExitBmpsReason;
2899
2900
2901
2902//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2903typedef struct sExitBmpsInfo
2904{
2905 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2906}tExitBmpsInfo, *tpExitBmpsInfo;
2907
2908
2909// MAC SW --> SME
2910// Message indicating to SME to exit BMPS sleep mode
2911typedef struct sSirSmeExitBmpsInd
2912{
2913 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2914 tANI_U16 mesgLen;
2915 tSirResultCodes statusCode;
2916 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2917
2918} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2919
2920
2921//
2922// HDD -> LIM
2923// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2924// tSirMsgQ.reserved = 0
2925// tSirMsgQ.body = instance of tDelBAParams
2926//
2927typedef struct sSmeDelBAPeerInd
2928{
2929 // Message Type
2930 tANI_U16 mesgType;
2931
2932 tSirMacAddr bssId;//BSSID
2933
2934 // Message Length
2935 tANI_U16 mesgLen;
2936
2937 // Station Index
2938 tANI_U16 staIdx;
2939
2940 // TID for which the BA session is being deleted
2941 tANI_U8 baTID;
2942
2943 // DELBA direction
2944 // eBA_INITIATOR - Originator
2945 // eBA_RECEIPIENT - Recipient
2946 tANI_U8 baDirection;
2947} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2948
2949typedef struct sSmeIbssPeerInd
2950{
2951 tANI_U16 mesgType;
2952 tANI_U16 mesgLen;
2953 tANI_U8 sessionId;
2954
2955 tSirMacAddr peerAddr;
2956 tANI_U16 staId;
2957
2958 /*The DPU signatures will be sent eventually to TL to help it determine the
2959 association to which a packet belongs to*/
2960 /*Unicast DPU signature*/
2961 tANI_U8 ucastSig;
2962
2963 /*Broadcast DPU signature*/
2964 tANI_U8 bcastSig;
2965
2966 //Beacon will be appended for new Peer indication.
2967}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2968
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002969typedef struct sSirIbssPeerInactivityInd
2970{
2971 tANI_U8 bssIdx;
2972 tANI_U8 staIdx;
2973 tSirMacAddr peerAddr;
2974}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2975
2976
Jeff Johnson295189b2012-06-20 16:38:30 -07002977typedef struct sLimScanChn
2978{
2979 tANI_U16 numTimeScan; //how many time this channel is scan
2980 tANI_U8 channelId;
2981}tLimScanChn;
2982
2983typedef struct sSmeGetScanChnRsp
2984{
2985 // Message Type
2986 tANI_U16 mesgType;
2987 // Message Length
2988 tANI_U16 mesgLen;
2989 tANI_U8 sessionId;
2990 tANI_U8 numChn;
2991 tLimScanChn scanChn[1];
2992} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2993
2994typedef struct sLimScanChnInfo
2995{
2996 tANI_U8 numChnInfo; //number of channels in scanChn
2997 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2998}tLimScanChnInfo;
2999
Jeff Johnson295189b2012-06-20 16:38:30 -07003000typedef struct sSirSmeGetAssocSTAsReq
3001{
3002 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
3003 tANI_U16 length;
3004 tSirMacAddr bssId; // BSSID
3005 tANI_U16 modId;
3006 void *pUsrContext;
3007 void *pSapEventCallback;
3008 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
3009} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07003010
3011typedef struct sSmeMaxAssocInd
3012{
3013 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
3014 tANI_U16 mesgLen;
3015 tANI_U8 sessionId;
3016 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
3017} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
3018
3019/*--------------------------------------------------------------------*/
3020/* BootLoader message definition */
3021/*--------------------------------------------------------------------*/
3022
3023/*--------------------------------------------------------------------*/
3024/* FW image size */
3025/*--------------------------------------------------------------------*/
3026#define SIR_FW_IMAGE_SIZE 146332
3027
3028
3029#define SIR_BOOT_MODULE_ID 1
3030
3031#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
3032#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
3033#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
3034#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
3035#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
3036#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
3037#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
3038
3039/*--------------------------------------------------------------------*/
3040/* Bootloader message syntax */
3041/*--------------------------------------------------------------------*/
3042
3043// Message header
3044#define SIR_BOOT_MB_HEADER 0
3045#define SIR_BOOT_MB_HEADER2 1
3046
3047#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
3048#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
3049
3050// BOOT_SETUP_IND parameter indices
3051#define SIR_BOOT_SETUP_IND_MBADDR 2
3052#define SIR_BOOT_SETUP_IND_MBSIZE 3
3053#define SIR_BOOT_SETUP_IND_MEMOPT 4
3054#define SIR_BOOT_SETUP_IND_LEN \
3055 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
3056
3057// BOOT_POST_RESULT_IND parameter indices
3058#define SIR_BOOT_POST_RESULT_IND_RES 2
3059#define SIR_BOOT_POST_RESULT_IND_LEN \
3060 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
3061
3062#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
3063#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
3064#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
3065#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
3066
3067
3068// BOOT_DNLD_RESULT_IND parameter indices
3069#define SIR_BOOT_DNLD_RESULT_IND_RES 2
3070#define SIR_BOOT_DNLD_RESULT_IND_LEN \
3071 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3072
3073#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3074#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3075#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3076
3077// BOOT_DNLD_DEV_REQ
3078#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3079#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3080#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3081 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3082
3083// BOOT_DNLD_DEV_RSP
3084#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3085#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3086 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3087
3088#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3089#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3090
3091// BOOT_DNLD_REQ
3092#define SIR_BOOT_DNLD_REQ_OFFSET 2
3093#define SIR_BOOT_DNLD_REQ_WRADDR 3
3094#define SIR_BOOT_DNLD_REQ_SIZE 4
3095#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3096
3097// BOOT_DNLD_RSP
3098#define SIR_BOOT_DNLD_RSP_SIZE 2
3099#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3100
Jeff Johnson295189b2012-06-20 16:38:30 -07003101
3102// board capabilities fields are defined here.
3103typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3104{
3105#ifndef ANI_LITTLE_BIT_ENDIAN
3106 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3107 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3108 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3109 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3110 tANI_U32 rsvd1:2;
3111 // (productId derives sub-category in the following three families)
3112 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3113 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3114 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3115 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3116 tANI_U32 bbChipVer:4; // Baseband chip version
3117 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3118 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3119 tANI_U32 nReceivers:2; // 0 based.
3120 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3121 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3122 tANI_U32 rsvd:1;
3123 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3124#else
3125
3126 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3127 tANI_U32 rsvd:1;
3128 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3129 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3130 tANI_U32 nReceivers:2; // 0 based.
3131 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3132 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3133 tANI_U32 bbChipVer:4; // Baseband chip version
3134 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3135 // (productId derives sub-category in the following three families)
3136 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3137 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3138 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3139 tANI_U32 rsvd1:2;
3140 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3141 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3142 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3143 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3144#endif
3145} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3146
3147# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3148# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3149
3150# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3151# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3152
3153# define ANI_BCAP_SDRAM_MASK 0x4
3154# define ANI_BCAP_SDRAM_OFFSET 2
3155
3156# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3157# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3158
3159# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3160# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3161
3162# define ANI_BCAP_RADIO_ON_MASK 0xC0
3163# define ANI_BCAP_RADIO_ON_OFFSET 6
3164
3165# define ANI_BCAP_LO_TYPE_MASK 0x300
3166# define ANI_BCAP_LO_TYPE_OFFSET 8
3167
3168# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3169# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3170
3171# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3172# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3173
3174# define ANI_BCAP_RADIO_OFF 0
3175# define ANI_BCAP_RADIO_ON 1
3176# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3177
3178
3179/// WOW related structures
3180// SME -> PE <-> HAL
3181#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3182#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3183
3184// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3185// SME/HDD maintains the list of the BCAST wake-up patterns.
3186// This is a pass through message for PE
3187typedef struct sSirWowlAddBcastPtrn
3188{
3189 tANI_U8 ucPatternId; // Pattern ID
3190 // Pattern byte offset from beginning of the 802.11 packet to start of the
3191 // wake-up pattern
3192 tANI_U8 ucPatternByteOffset;
3193 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3194 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3195 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3196 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3197 // Extra pattern data beyond 128 bytes
3198 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3199 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003200 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003201} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3202
3203
3204// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3205// SME/HDD maintains the list of the BCAST wake-up patterns.
3206// This is a pass through message for PE
3207typedef struct sSirWowlDelBcastPtrn
3208{
3209 /* Pattern ID of the wakeup pattern to be deleted */
3210 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003211 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003212}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3213
3214
3215// SME->PE: Enter WOWLAN parameters
3216typedef struct sSirSmeWowlEnterParams
3217{
3218 /* Enables/disables magic packet filtering */
3219 tANI_U8 ucMagicPktEnable;
3220
3221 /* Magic pattern */
3222 tSirMacAddr magicPtrn;
3223
3224 /* Enables/disables packet pattern filtering */
3225 tANI_U8 ucPatternFilteringEnable;
3226
3227#ifdef WLAN_WAKEUP_EVENTS
3228 /* This configuration directs the WoW packet filtering to look for EAP-ID
3229 * requests embedded in EAPOL frames and use this as a wake source.
3230 */
3231 tANI_U8 ucWoWEAPIDRequestEnable;
3232
3233 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3234 * requests and use this as a wake source.
3235 */
3236 tANI_U8 ucWoWEAPOL4WayEnable;
3237
3238 /* This configuration allows a host wakeup on an network scan offload match.
3239 */
3240 tANI_U8 ucWowNetScanOffloadMatch;
3241
3242 /* This configuration allows a host wakeup on any GTK rekeying error.
3243 */
3244 tANI_U8 ucWowGTKRekeyError;
3245
3246 /* This configuration allows a host wakeup on BSS connection loss.
3247 */
3248 tANI_U8 ucWoWBSSConnLoss;
3249#endif // WLAN_WAKEUP_EVENTS
3250
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003251 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003252} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3253
3254
3255// PE<->HAL: Enter WOWLAN parameters
3256typedef struct sSirHalWowlEnterParams
3257{
3258 /* Enables/disables magic packet filtering */
3259 tANI_U8 ucMagicPktEnable;
3260
3261 /* Magic pattern */
3262 tSirMacAddr magicPtrn;
3263
3264 /* Enables/disables packet pattern filtering in firmware.
3265 Enabling this flag enables broadcast pattern matching
3266 in Firmware. If unicast pattern matching is also desired,
3267 ucUcastPatternFilteringEnable flag must be set tot true
3268 as well
3269 */
3270 tANI_U8 ucPatternFilteringEnable;
3271
3272 /* Enables/disables unicast packet pattern filtering.
3273 This flag specifies whether we want to do pattern match
3274 on unicast packets as well and not just broadcast packets.
3275 This flag has no effect if the ucPatternFilteringEnable
3276 (main controlling flag) is set to false
3277 */
3278 tANI_U8 ucUcastPatternFilteringEnable;
3279
3280 /* This configuration is valid only when magicPktEnable=1.
3281 * It requests hardware to wake up when it receives the
3282 * Channel Switch Action Frame.
3283 */
3284 tANI_U8 ucWowChnlSwitchRcv;
3285
3286 /* This configuration is valid only when magicPktEnable=1.
3287 * It requests hardware to wake up when it receives the
3288 * Deauthentication Frame.
3289 */
3290 tANI_U8 ucWowDeauthRcv;
3291
3292 /* This configuration is valid only when magicPktEnable=1.
3293 * It requests hardware to wake up when it receives the
3294 * Disassociation Frame.
3295 */
3296 tANI_U8 ucWowDisassocRcv;
3297
3298 /* This configuration is valid only when magicPktEnable=1.
3299 * It requests hardware to wake up when it has missed
3300 * consecutive beacons. This is a hardware register
3301 * configuration (NOT a firmware configuration).
3302 */
3303 tANI_U8 ucWowMaxMissedBeacons;
3304
3305 /* This configuration is valid only when magicPktEnable=1.
3306 * This is a timeout value in units of microsec. It requests
3307 * hardware to unconditionally wake up after it has stayed
3308 * in WoWLAN mode for some time. Set 0 to disable this feature.
3309 */
3310 tANI_U8 ucWowMaxSleepUsec;
3311
3312#ifdef WLAN_WAKEUP_EVENTS
3313 /* This configuration directs the WoW packet filtering to look for EAP-ID
3314 * requests embedded in EAPOL frames and use this as a wake source.
3315 */
3316 tANI_U8 ucWoWEAPIDRequestEnable;
3317
3318 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3319 * requests and use this as a wake source.
3320 */
3321 tANI_U8 ucWoWEAPOL4WayEnable;
3322
3323 /* This configuration allows a host wakeup on an network scan offload match.
3324 */
3325 tANI_U8 ucWowNetScanOffloadMatch;
3326
3327 /* This configuration allows a host wakeup on any GTK rekeying error.
3328 */
3329 tANI_U8 ucWowGTKRekeyError;
3330
3331 /* This configuration allows a host wakeup on BSS connection loss.
3332 */
3333 tANI_U8 ucWoWBSSConnLoss;
3334#endif // WLAN_WAKEUP_EVENTS
3335
3336 /* Status code to be filled by HAL when it sends
3337 * SIR_HAL_WOWL_ENTER_RSP to PE.
3338 */
3339 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003340
3341 /*BSSID to find the current session
3342 */
3343 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003344} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3345
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003346// PE<->HAL: Exit WOWLAN parameters
3347typedef struct sSirHalWowlExitParams
3348{
3349 /* Status code to be filled by HAL when it sends
3350 * SIR_HAL_WOWL_EXIT_RSP to PE.
3351 */
3352 eHalStatus status;
3353
3354 /*BSSIDX to find the current session
3355 */
3356 tANI_U8 bssIdx;
3357} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3358
Jeff Johnson295189b2012-06-20 16:38:30 -07003359
3360#define SIR_MAX_NAME_SIZE 64
3361#define SIR_MAX_TEXT_SIZE 32
3362
3363typedef struct sSirName {
3364 v_U8_t num_name;
3365 v_U8_t name[SIR_MAX_NAME_SIZE];
3366} tSirName;
3367
3368typedef struct sSirText {
3369 v_U8_t num_text;
3370 v_U8_t text[SIR_MAX_TEXT_SIZE];
3371} tSirText;
3372
3373
3374#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3375#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3376#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3377#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3378#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3379#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3380#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3381#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3382#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3383#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3384#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3385#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3386#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3387#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3388#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3389#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3390
3391
3392typedef struct sSirWPSProbeRspIE {
3393 v_U32_t FieldPresent;
3394 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3395 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3396 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3397 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3398 v_U16_t DevicePasswordID; // Device Password ID
3399 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3400 v_U8_t ResponseType; // Response type
3401 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3402 tSirName Manufacture;
3403 tSirText ModelName;
3404 tSirText ModelNumber;
3405 tSirText SerialNumber;
3406 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3407 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3408 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3409 tSirText DeviceName;
3410 v_U16_t ConfigMethod; // Configuaration method
3411 v_U8_t RFBand; // RF bands available on the AP
3412} tSirWPSProbeRspIE;
3413
3414#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3415#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3416#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3417#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3418#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3419#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3420#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3421#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3422
3423typedef struct sSirWPSBeaconIE {
3424 v_U32_t FieldPresent;
3425 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3426 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3427 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3428 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3429 v_U16_t DevicePasswordID; // Device Password ID
3430 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3431 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3432 v_U8_t RFBand; // RF bands available on the AP
3433} tSirWPSBeaconIE;
3434
3435#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3436#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3437
3438typedef struct sSirWPSAssocRspIE {
3439 v_U32_t FieldPresent;
3440 v_U32_t Version;
3441 v_U8_t ResposeType;
3442} tSirWPSAssocRspIE;
3443
3444typedef struct sSirAPWPSIEs {
3445 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3446 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3447 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3448} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3449
3450typedef struct sSirUpdateAPWPSIEsReq
3451{
3452 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3453 tANI_U16 length;
3454 tANI_U16 transactionId; //Transaction ID for cmd
3455 tSirMacAddr bssId; // BSSID
3456 tANI_U8 sessionId; //Session ID
3457 tSirAPWPSIEs APWPSIEs;
3458} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3459
3460typedef struct sSirUpdateParams
3461{
3462 tANI_U16 messageType;
3463 tANI_U16 length;
3464 tANI_U8 sessionId; // Session ID
3465 tANI_U8 ssidHidden; // Hide SSID
3466} tSirUpdateParams, *tpSirUpdateParams;
3467
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003468//Beacon Interval
3469typedef struct sSirChangeBIParams
3470{
3471 tANI_U16 messageType;
3472 tANI_U16 length;
3473 tANI_U16 beaconInterval; // Beacon Interval
3474 tSirMacAddr bssId;
3475 tANI_U8 sessionId; // Session ID
3476} tSirChangeBIParams, *tpSirChangeBIParams;
3477
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303478#ifdef WLAN_FEATURE_AP_HT40_24G
3479typedef struct sSirSetHT2040Mode
3480{
3481 tANI_U16 messageType;
3482 tANI_U16 length;
3483 tANI_U8 cbMode;
3484 tSirMacAddr bssId;
3485 tANI_U8 sessionId; // Session ID
3486} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -08003487
3488typedef struct sSirHT2040CoexInfoInd
3489{
3490 tANI_U16 messageType; // eWNI_SME_2040_COEX_IND
3491 tANI_U16 length;
3492 tANI_U8 sessionId;
3493 tANI_U8 HT40MHzIntolerant;
3494 tANI_U8 HT20MHzBssWidthReq;
3495 tANI_U8 channel_num;
3496 tANI_U8 HT2040BssIntoChanReport [1]; //variable
3497}tSirHT2040CoexInfoInd, *tpSirHT2040CoexInfoInd;
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303498#endif
3499
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303500typedef struct sSirOBSSHT40Param
3501{
3502 tANI_U16 OBSSScanPassiveDwellTime;
3503 tANI_U16 OBSSScanActiveDwellTime;
3504 tANI_U16 BSSChannelWidthTriggerScanInterval;
3505 tANI_U16 OBSSScanPassiveTotalPerChannel;
3506 tANI_U16 OBSSScanActiveTotalPerChannel;
3507 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3508 tANI_U16 OBSSScanActivityThreshold;
3509}tSirOBSSHT40Param, *tpOBSSHT40Param;
3510
Jeff Johnson295189b2012-06-20 16:38:30 -07003511#define SIR_WPS_UUID_LEN 16
3512#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3513
3514typedef struct sSirWPSPBCSession {
3515 struct sSirWPSPBCSession *next;
3516 tSirMacAddr addr;
3517 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3518 tANI_TIMESTAMP timestamp;
3519} tSirWPSPBCSession;
3520
3521typedef struct sSirSmeGetWPSPBCSessionsReq
3522{
3523 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3524 tANI_U16 length;
3525 void *pUsrContext;
3526 void *pSapEventCallback;
3527 tSirMacAddr bssId; // BSSID
3528 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3529} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3530
3531typedef struct sSirWPSPBCProbeReq
3532{
3533 tSirMacAddr peerMacAddr;
3534 tANI_U16 probeReqIELen;
3535 tANI_U8 probeReqIE[512];
3536} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3537
3538// probereq from peer, when wsc is enabled
3539typedef struct sSirSmeProbeReqInd
3540{
3541 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3542 tANI_U16 length;
3543 tANI_U8 sessionId;
3544 tSirMacAddr bssId;
3545 tSirWPSPBCProbeReq WPSPBCProbeReq;
3546} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3547
3548typedef struct sSirUpdateAPWPARSNIEsReq
3549{
3550 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3551 tANI_U16 length;
3552 tANI_U16 transactionId; //Transaction ID for cmd
3553 tSirMacAddr bssId; // BSSID
3554 tANI_U8 sessionId; //Session ID
3555 tSirRSNie APWPARSNIEs;
3556} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3557
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003558#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003559#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003560#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3561#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3562#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3563#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3564#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3565#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3566#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003567
3568/*Adaptive Thresholds to be used for FW based scanning*/
3569#define LFR_SENSITIVITY_THR_1MBPS -89
3570#define LFR_LOOKUP_THR_1MBPS -78
3571#define LFR_SENSITIVITY_THR_2MBPS -87
3572#define LFR_LOOKUP_THR_2MBPS -78
3573#define LFR_SENSITIVITY_THR_5_5MBPS -86
3574#define LFR_LOOKUP_THR_5_5MBPS -77
3575#define LFR_SENSITIVITY_THR_11MBPS -85
3576#define LFR_LOOKUP_THR_11MBPS -76
3577#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3578#define LFR_LOOKUP_THR_6MBPS_2G -78
3579#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3580#define LFR_LOOKUP_THR_6MBPS_5G -78
3581#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3582#define LFR_LOOKUP_THR_12MBPS_2G -78
3583#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3584#define LFR_LOOKUP_THR_12MBPS_5G -76
3585#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3586#define LFR_LOOKUP_THR_24MBPS_2G -76
3587#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3588#define LFR_LOOKUP_THR_24MBPS_5G -74
3589#define LFR_SENSITIVITY_THR_DEFAULT 0
3590#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003591#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003592
3593// SME -> HAL - This is the host offload request.
3594#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3595#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3596#define SIR_IPV6_NS_OFFLOAD 2
3597#define SIR_OFFLOAD_DISABLE 0
3598#define SIR_OFFLOAD_ENABLE 1
3599#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303600#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003601#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303602#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003603
3604#ifdef WLAN_NS_OFFLOAD
3605typedef struct sSirNsOffloadReq
3606{
3607 tANI_U8 srcIPv6Addr[16];
3608 tANI_U8 selfIPv6Addr[16];
3609 //Only support 2 possible Network Advertisement IPv6 address
3610 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3611 tANI_U8 selfMacAddr[6];
3612 tANI_U8 srcIPv6AddrValid;
3613 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303614 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003615} tSirNsOffloadReq, *tpSirNsOffloadReq;
3616#endif //WLAN_NS_OFFLOAD
3617
3618typedef struct sSirHostOffloadReq
3619{
3620 tANI_U8 offloadType;
3621 tANI_U8 enableOrDisable;
3622 union
3623 {
3624 tANI_U8 hostIpv4Addr [4];
3625 tANI_U8 hostIpv6Addr [16];
3626 } params;
3627#ifdef WLAN_NS_OFFLOAD
3628 tSirNsOffloadReq nsOffloadInfo;
3629#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003630 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003631} tSirHostOffloadReq, *tpSirHostOffloadReq;
3632
3633/* Packet Types. */
3634#define SIR_KEEP_ALIVE_NULL_PKT 1
3635#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3636
3637/* Enable or disable offload. */
3638#define SIR_KEEP_ALIVE_DISABLE 0
3639#define SIR_KEEP_ALIVE_ENABLE 1
3640
3641/* Keep Alive request. */
3642typedef struct sSirKeepAliveReq
3643{
3644 v_U8_t packetType;
3645 v_U32_t timePeriod;
3646 tSirIpv4Addr hostIpv4Addr;
3647 tSirIpv4Addr destIpv4Addr;
3648 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003649 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003650} tSirKeepAliveReq, *tpSirKeepAliveReq;
3651
3652typedef struct sSirSmeAddStaSelfReq
3653{
3654 tANI_U16 mesgType;
3655 tANI_U16 mesgLen;
3656 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003657 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003658}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3659
3660typedef struct sSirSmeDelStaSelfReq
3661{
3662 tANI_U16 mesgType;
3663 tANI_U16 mesgLen;
3664 tSirMacAddr selfMacAddr;
3665}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3666
3667typedef struct sSirSmeAddStaSelfRsp
3668{
3669 tANI_U16 mesgType;
3670 tANI_U16 mesgLen;
3671 tANI_U16 status;
3672 tSirMacAddr selfMacAddr;
3673}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3674
3675typedef struct sSirSmeDelStaSelfRsp
3676{
3677 tANI_U16 mesgType;
3678 tANI_U16 mesgLen;
3679 tANI_U16 status;
3680 tSirMacAddr selfMacAddr;
3681}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3682
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303683typedef enum DFSChanScanType
3684{
3685 DFS_CHNL_SCAN_DISABLED,
3686 DFS_CHNL_SCAN_ENABLED_NORMAL,
3687 DFS_CHNL_SCAN_ENABLED_ACTIVE
3688}eDFSChanScanType;
3689
Jeff Johnson295189b2012-06-20 16:38:30 -07003690/* Coex Indication defines -
3691 should match WLAN_COEX_IND_DATA_SIZE
3692 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3693 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3694#define SIR_COEX_IND_DATA_SIZE (4)
3695#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3696#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003697#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3698#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003699#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3700#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Kanchanapally, Vidyullatha23cea3c2014-11-04 13:05:20 +05303701#define SIR_COEX_IND_TYPE_ENABLE_UAPSD (6)
3702#define SIR_COEX_IND_TYPE_DISABLE_UAPSD (7)
c_hpothub3458992014-09-19 19:58:57 +05303703#define SIR_COEX_IND_TYPE_CXM_FEATURES_NOTIFICATION (8)
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303704#define SIR_COEX_IND_TYPE_TDLS_ENABLE (6)
3705#define SIR_COEX_IND_TYPE_TDLS_DISABLE (7)
Jeff Johnson295189b2012-06-20 16:38:30 -07003706
3707typedef struct sSirSmeCoexInd
3708{
3709 tANI_U16 mesgType;
3710 tANI_U16 mesgLen;
3711 tANI_U32 coexIndType;
3712 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3713}tSirSmeCoexInd, *tpSirSmeCoexInd;
3714
Jeff Johnson295189b2012-06-20 16:38:30 -07003715typedef struct sSirSmeMgmtFrameInd
3716{
Abhishek Singh7d624e12015-11-30 14:29:27 +05303717 tANI_U16 frameLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303718 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003719 tANI_U8 sessionId;
3720 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303721 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003722 tANI_U8 frameBuf[1]; //variable
3723}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003724
Chet Lanctot186b5732013-03-18 10:26:30 -07003725#ifdef WLAN_FEATURE_11W
3726typedef struct sSirSmeUnprotMgmtFrameInd
3727{
3728 tANI_U8 sessionId;
3729 tANI_U8 frameType;
3730 tANI_U8 frameLen;
3731 tANI_U8 frameBuf[1]; //variable
3732}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3733#endif
3734
Jeff Johnson295189b2012-06-20 16:38:30 -07003735#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3736 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3737 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3738 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3739#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3740 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3741
3742/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003743typedef struct sSirNoAParam
3744{
3745 tANI_U8 ctWindow:7;
3746 tANI_U8 OppPS:1;
3747 tANI_U8 count;
3748 tANI_U32 duration;
3749 tANI_U32 interval;
3750 tANI_U32 singleNoADuration;
3751 tANI_U8 psSelection;
3752}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003753
Jeff Johnson295189b2012-06-20 16:38:30 -07003754typedef struct sSirWlanSuspendParam
3755{
3756 tANI_U8 configuredMcstBcstFilterSetting;
3757}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3758
3759typedef struct sSirWlanResumeParam
3760{
3761 tANI_U8 configuredMcstBcstFilterSetting;
3762}tSirWlanResumeParam,*tpSirWlanResumeParam;
3763
3764typedef struct sSirWlanSetRxpFilters
3765{
3766 tANI_U8 configuredMcstBcstFilterSetting;
3767 tANI_U8 setMcstBcstFilter;
3768}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003769
c_manjeecfd1efb2015-09-25 19:32:34 +05303770typedef struct
3771{
3772 //FW mail box address
3773 uint64 logMailBoxAddr;
3774 tANI_U32 status;
3775 //Logging mail box version
3776 tANI_U8 logMailBoxVer;
3777 //Qshrink is enabled
3778 tANI_U8 logCompressEnabled;
3779 /* used to tell fwr mem dump size */
3780 tANI_U32 fw_mem_dump_max_size;
3781 //Reserved for future purpose
3782 tANI_U32 reserved1;
3783 tANI_U32 reserved2;
3784}tAniLoggingInitRsp, *tpAniLoggingInitRsp;
3785
3786typedef void(*FWLoggingInitReqCb)(void *fwlogInitCbContext, tAniLoggingInitRsp *pRsp);
Siddharth Bhal64246172015-02-27 01:04:37 +05303787typedef void ( *tGetFrameLogCallback) (void *pContext);
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303788typedef void(*RssiMonitorReqCb)(void *rssiMonitorCbContext, VOS_STATUS status);
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05303789typedef void(*pktFilterReqCb)(void *data, tANI_U32 status);
Siddharth Bhal64246172015-02-27 01:04:37 +05303790
3791typedef struct sAniGetFrameLogReq
3792{
3793 tANI_U16 msgType;
3794 tANI_U16 msgLen;
Siddharth Bhal64246172015-02-27 01:04:37 +05303795 tANI_U8 getFrameLogCmdFlag;
Siddharth Bhal64246172015-02-27 01:04:37 +05303796} tAniGetFrameLogReq, *tpAniGetFrameLogReq;
3797
Abhishek Singh99a31be2015-12-10 10:37:44 +05303798/**
3799 * struct s_ani_set_tx_max_pwr - Req params to set max tx power
3800 * @bssid: bssid to set the power cap for
3801 * @self_mac_addr:self mac address
3802 * @power: power to set in dB
3803 */
3804struct s_ani_set_tx_max_pwr
3805{
3806 tSirMacAddr bssid;
3807 tSirMacAddr self_sta_mac_addr;
3808 tPowerdBm power;
3809};
3810
3811
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303812
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303813typedef struct sSirFWLoggingInitParam
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303814{
3815 tANI_U8 enableFlag;
3816 tANI_U8 frameType;
3817 tANI_U8 frameSize;
3818 tANI_U8 bufferMode;
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303819 tANI_U8 continuousFrameLogging;
3820 tANI_U8 minLogBufferSize;
3821 tANI_U8 maxLogBufferSize;
3822 FWLoggingInitReqCb fwlogInitCallback;
3823 void *fwlogInitCbContext;
3824}tSirFWLoggingInitParam,*tpSirFWLoggingInitParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003825
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +05303826/**
3827 * struct sir_allowed_action_frames - Parameters to set Allowed action frames
3828 * @bitmask: Bits to convey the allowed action frames
3829 * @reserved: For future use
3830 */
3831struct sir_allowed_action_frames {
3832 uint32_t bitmask;
3833 uint32_t reserved;
3834};
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303835
3836/*
3837 * struct rssi_monitor_req - rssi monitoring
3838 * @request_id: request id
3839 * @session_id: session id
3840 * @min_rssi: minimum rssi
3841 * @max_rssi: maximum rssi
3842 * @control: flag to indicate start or stop
3843 */
3844typedef struct sSirRssiMonitorReq
3845{
3846 tANI_U32 requestId;
3847 tANI_U32 sessionId;
3848 tANI_S8 minRssi;
3849 tANI_S8 maxRssi;
3850 tANI_U8 currentBssId[6];
3851 RssiMonitorReqCb rssiMonitorCallback;
3852 void *rssiMonitorCbContext;
3853}tSirRssiMonitorReq, *tpSirRssiMonitorReq;
3854
3855
3856/**
3857 * struct rssi_breach_event - rssi breached event structure
3858 * @request_id: request id
3859 * @curr_rssi: current rssi
3860 * @curr_bssid: current bssid
3861 */
3862struct rssi_breach_event {
3863 tANI_U32 request_id;
3864 v_MACADDR_t curr_bssid;
3865 tANI_S8 curr_rssi;
3866};
3867
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303868typedef struct sSirFatalEventLogsReqParam
3869{
3870 tANI_U32 reason_code;
3871}tSirFatalEventLogsReqParam, *tpSirFatalEventLogsReqParam;
3872
Jeff Johnson295189b2012-06-20 16:38:30 -07003873#ifdef FEATURE_WLAN_SCAN_PNO
3874//
3875// PNO Messages
3876//
3877
3878// Set PNO
3879#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303880#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003881#define SIR_PNO_MAX_SUPP_NETWORKS 16
3882#define SIR_PNO_MAX_SCAN_TIMERS 10
3883
3884/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3885#define SIR_PNO_MAX_PB_REQ_SIZE 450
3886
3887#define SIR_PNO_24G_DEFAULT_CH 1
3888#define SIR_PNO_5G_DEFAULT_CH 36
3889
3890typedef enum
3891{
3892 SIR_PNO_MODE_IMMEDIATE,
3893 SIR_PNO_MODE_ON_SUSPEND,
3894 SIR_PNO_MODE_ON_RESUME,
3895 SIR_PNO_MODE_MAX
3896} eSirPNOMode;
3897
3898typedef struct
3899{
3900 tSirMacSSid ssId;
3901 tANI_U32 authentication;
3902 tANI_U32 encryption;
3903 tANI_U32 bcastNetwType;
3904 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303905 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003906 tANI_U8 rssiThreshold;
3907} tSirNetworkType;
3908
3909typedef struct
3910{
3911 tANI_U32 uTimerValue;
3912 tANI_U32 uTimerRepeat;
3913}tSirScanTimer;
3914
3915typedef struct
3916{
3917 tANI_U8 ucScanTimersCount;
3918 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3919} tSirScanTimersType;
3920
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303921/*Pref Net Req status */
3922typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
3923
3924
Jeff Johnson295189b2012-06-20 16:38:30 -07003925typedef struct sSirPNOScanReq
3926{
3927 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303928 PNOReqStatusCb statusCallback;
3929 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07003930 eSirPNOMode modePNO;
3931 tANI_U8 ucNetworksCount;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05303932 tSirNetworkType *aNetworks;
Jeff Johnson295189b2012-06-20 16:38:30 -07003933 tSirScanTimersType scanTimers;
3934
3935 /*added by SME*/
3936 tANI_U16 us24GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05303937 tANI_U8 *p24GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07003938 tANI_U16 us5GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05303939 tANI_U8 *p5GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07003940} tSirPNOScanReq, *tpSirPNOScanReq;
3941
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003942typedef struct sSirSetRSSIFilterReq
3943{
3944 tANI_U8 rssiThreshold;
3945} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3946
3947
3948// Update Scan Params
3949typedef struct {
3950 tANI_U8 b11dEnabled;
3951 tANI_U8 b11dResolved;
3952 tANI_U8 ucChannelCount;
3953 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3954 tANI_U16 usPassiveMinChTime;
3955 tANI_U16 usPassiveMaxChTime;
3956 tANI_U16 usActiveMinChTime;
3957 tANI_U16 usActiveMaxChTime;
3958 tANI_U8 ucCBState;
3959} tSirUpdateScanParams, * tpSirUpdateScanParams;
3960
3961// Preferred Network Found Indication
3962typedef struct
3963{
3964 tANI_U16 mesgType;
3965 tANI_U16 mesgLen;
3966 /* Network that was found with the highest RSSI*/
3967 tSirMacSSid ssId;
3968 /* Indicates the RSSI */
3969 tANI_U8 rssi;
3970 /* Length of the beacon or probe response
3971 * corresponding to the candidate found by PNO */
3972 tANI_U32 frameLength;
3973 /* Index to memory location where the contents of
3974 * beacon or probe response frame will be copied */
3975 tANI_U8 data[1];
3976} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3977#endif //FEATURE_WLAN_SCAN_PNO
3978
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003979#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Kapil Gupta04ab1992016-06-26 13:36:51 +05303980#define SIR_PER_ROAM_MAX_AP_CNT 20
Kapil Guptac69c28a2016-08-25 14:11:17 +05303981#define SIR_PER_ROAM_MAX_CANDIDATE_CNT 32
Kapil Gupta04ab1992016-06-26 13:36:51 +05303982typedef struct __attribute__((packed))
3983{
3984 tANI_U8 channelNumber;
3985 tANI_U8 channelCCA;
3986 tANI_U8 otherApCount;
3987 tANI_S8 otherApRssi[SIR_PER_ROAM_MAX_AP_CNT];
3988} tSirCandidateChanInfo, * tpSirCandidateChanInfo;
3989
3990typedef struct sPERRoamScanStart
3991{
3992 tANI_U16 msgType;
3993 tANI_U16 msgLen;
3994 tANI_U8 start;
3995} tPERRoamScanStart, *tpPERRoamScanStart;
3996
3997typedef struct sSirRoamAPInfo
3998{
3999 tSirMacAddr bssAddr;
4000 unsigned int timeStamp;
4001} tSirRoamAPInfo, *tpSirRoamAPInfo;
4002
4003typedef struct __attribute__((packed))
4004{
4005 tANI_U32 candidateCount;
4006 tSirCandidateChanInfo channelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
4007} tSirPerRoamScanResult, * tpSirPerRoamScanResult;
4008
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004009typedef struct
4010{
4011 tSirMacSSid ssId;
4012 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
4013 tANI_U32 authentication;
4014 tANI_U8 encryption;
4015 tANI_U8 mcencryption;
4016 tANI_U8 ChannelCount;
4017 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
4018
4019} tSirRoamNetworkType;
4020
4021typedef struct SirMobilityDomainInfo
4022{
4023 tANI_U8 mdiePresent;
4024 tANI_U16 mobilityDomain;
4025} tSirMobilityDomainInfo;
4026
4027typedef struct sSirRoamOffloadScanReq
4028{
4029 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08004030 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004031 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08004032 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004033 tANI_U8 RoamRssiDiff;
4034 tANI_U8 ChannelCacheType;
4035 tANI_U8 Command;
4036 tANI_U8 StartScanReason;
4037 tANI_U16 NeighborScanTimerPeriod;
4038 tANI_U16 NeighborRoamScanRefreshPeriod;
4039 tANI_U16 NeighborScanChannelMinTime;
4040 tANI_U16 NeighborScanChannelMaxTime;
4041 tANI_U16 EmptyRefreshScanPeriod;
4042 tANI_U8 ValidChannelCount;
4043 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08004044 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004045 tANI_U16 us24GProbeTemplateLen;
4046 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4047 tANI_U16 us5GProbeTemplateLen;
4048 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07004049 tANI_U8 nProbes;
4050 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004051 tSirRoamNetworkType ConnectedNetwork;
4052 tSirMobilityDomainInfo MDID;
4053} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304054
4055/**
4056 * struct sSirPERRoamOffloadScanReq - Offload PER config params
4057 * @sessionId: session id
4058 * @rateUpThreshold: rate at which to stop monitoring the rate
4059 * @rateDownThreshold: rate at which to start monitoring
4060 * @isPERRoamCCAEnabled: CCA sensing is enabled or disabled
4061 * @waitPeriodForNextPERScan: time to wait before start monitoring again once a
4062 * scan has been triggered
4063 * @PERtimerThreshold: time to collect stats to trigger roam scan
4064 * @PERroamTriggerPercent: minimum percentage of packets needs to be below
4065 * rateDownThreshold to trigger a roam scan
4066 */
4067typedef struct sSirPERRoamOffloadScanReq
4068{
4069 tANI_U16 sessionId;
4070 tANI_U16 rateUpThreshold;
4071 tANI_U16 rateDownThreshold;
4072 tANI_U16 isPERRoamCCAEnabled;
4073 tANI_U32 waitPeriodForNextPERScan;
4074 tANI_U32 PERtimerThreshold;
4075 tANI_U32 PERroamTriggerPercent;
Kapil Guptac69c28a2016-08-25 14:11:17 +05304076 tANI_S16 PERRoamFullScanThreshold;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304077} tSirPERRoamOffloadScanReq, *tpSirPERRoamOffloadScanReq;
4078
4079typedef struct sSirPERRoamTriggerScanReq
4080{
4081 tANI_BOOLEAN roamScanReq;
4082} tSirPERRoamTriggerScanReq, *tpSirPERRoamTriggerScanReq;
4083
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004084#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07004085
4086#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
4087
4088//Power Parameters Type
4089typedef enum
4090{
4091 eSIR_IGNORE_DTIM = 1,
4092 eSIR_LISTEN_INTERVAL = 2,
4093 eSIR_MCAST_BCAST_FILTER = 3,
4094 eSIR_ENABLE_BET = 4,
4095 eSIR_BET_INTERVAL = 5
4096}tPowerParamType;
4097
4098//Power Parameters Value s
4099typedef struct
4100{
4101 /* Ignore DTIM */
4102 tANI_U32 uIgnoreDTIM;
4103
4104 /* DTIM Period */
4105 tANI_U32 uDTIMPeriod;
4106
4107 /* Listen Interval */
4108 tANI_U32 uListenInterval;
4109
4110 /* Broadcast Multicas Filter */
4111 tANI_U32 uBcastMcastFilter;
4112
4113 /* Beacon Early Termination */
4114 tANI_U32 uEnableBET;
4115
4116 /* Beacon Early Termination Interval */
4117 tANI_U32 uBETInterval;
4118
Yue Mac24062f2013-05-13 17:01:29 -07004119 /* MAX LI for modulated DTIM */
4120 tANI_U32 uMaxLIModulatedDTIM;
4121
Jeff Johnson295189b2012-06-20 16:38:30 -07004122}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
4123
4124typedef struct sSirTxPerTrackingParam
4125{
4126 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
4127 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
4128 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 */
4129 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
4130}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
4131
4132#ifdef WLAN_FEATURE_PACKET_FILTERING
4133/*---------------------------------------------------------------------------
4134 Packet Filtering Parameters
4135---------------------------------------------------------------------------*/
4136#define SIR_IPV4_ADDR_LEN 4
4137#define SIR_MAC_ADDR_LEN 6
4138#define SIR_MAX_FILTER_TEST_DATA_LEN 8
4139#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
4140#define SIR_MAX_NUM_FILTERS 20
4141#define SIR_MAX_NUM_TESTS_PER_FILTER 10
4142
4143//
4144// Receive Filter Parameters
4145//
4146typedef enum
4147{
4148 SIR_RCV_FILTER_TYPE_INVALID,
4149 SIR_RCV_FILTER_TYPE_FILTER_PKT,
4150 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
4151 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4152}eSirReceivePacketFilterType;
4153
4154typedef enum
4155{
4156 SIR_FILTER_HDR_TYPE_INVALID,
4157 SIR_FILTER_HDR_TYPE_MAC,
4158 SIR_FILTER_HDR_TYPE_ARP,
4159 SIR_FILTER_HDR_TYPE_IPV4,
4160 SIR_FILTER_HDR_TYPE_IPV6,
4161 SIR_FILTER_HDR_TYPE_UDP,
4162 SIR_FILTER_HDR_TYPE_MAX
4163}eSirRcvPktFltProtocolType;
4164
4165typedef enum
4166{
4167 SIR_FILTER_CMP_TYPE_INVALID,
4168 SIR_FILTER_CMP_TYPE_EQUAL,
4169 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
4170 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
4171 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
4172 SIR_FILTER_CMP_TYPE_MAX
4173}eSirRcvPktFltCmpFlagType;
4174
4175typedef struct sSirRcvPktFilterFieldParams
4176{
4177 eSirRcvPktFltProtocolType protocolLayer;
4178 eSirRcvPktFltCmpFlagType cmpFlag;
4179 /* Length of the data to compare */
4180 tANI_U16 dataLength;
4181 /* from start of the respective frame header */
4182 tANI_U8 dataOffset;
4183 /* Reserved field */
4184 tANI_U8 reserved;
4185 /* Data to compare */
4186 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
4187 /* Mask to be applied on the received packet data before compare */
4188 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
4189}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
4190
4191typedef struct sSirRcvPktFilterCfg
4192{
4193 tANI_U8 filterId;
4194 eSirReceivePacketFilterType filterType;
4195 tANI_U32 numFieldParams;
4196 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07004197 tSirMacAddr selfMacAddr;
4198 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004199 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07004200}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
4201
4202//
4203// Filter Packet Match Count Parameters
4204//
4205typedef struct sSirRcvFltPktMatchCnt
4206{
4207 tANI_U8 filterId;
4208 tANI_U32 matchCnt;
4209} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
4210
4211typedef struct sSirRcvFltPktMatchRsp
4212{
4213 tANI_U16 mesgType;
4214 tANI_U16 mesgLen;
4215
4216 /* Success or Failure */
4217 tANI_U32 status;
4218 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004219 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004220} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
4221
4222//
4223// Receive Filter Clear Parameters
4224//
4225typedef struct sSirRcvFltPktClearParam
4226{
4227 tANI_U32 status; /* only valid for response message */
4228 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07004229 tSirMacAddr selfMacAddr;
4230 tSirMacAddr bssId;
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05304231 pktFilterReqCb pktFilterCallback;
4232 void *cbCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07004233}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
4234
4235//
4236// Multicast Address List Parameters
4237//
4238typedef struct sSirRcvFltMcAddrList
4239{
4240 tANI_U32 ulMulticastAddrCnt;
4241 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07004242 tSirMacAddr selfMacAddr;
4243 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004244} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
4245#endif // WLAN_FEATURE_PACKET_FILTERING
4246
4247//
4248// Generic version information
4249//
4250typedef struct
4251{
4252 tANI_U8 revision;
4253 tANI_U8 version;
4254 tANI_U8 minor;
4255 tANI_U8 major;
4256} tSirVersionType;
4257
4258typedef struct sAniBtAmpLogLinkReq
4259{
4260 // Common for all types are requests
4261 tANI_U16 msgType; // message type is same as the request type
4262 tANI_U16 msgLen; // length of the entire request
4263 tANI_U8 sessionId; //sme Session Id
4264 void *btampHandle; //AMP context
4265
4266} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
4267
4268#ifdef WLAN_FEATURE_GTK_OFFLOAD
4269/*---------------------------------------------------------------------------
4270* WDA_GTK_OFFLOAD_REQ
4271*--------------------------------------------------------------------------*/
4272typedef struct
4273{
4274 tANI_U32 ulFlags; /* optional flags */
4275 tANI_U8 aKCK[16]; /* Key confirmation key */
4276 tANI_U8 aKEK[16]; /* key encryption key */
4277 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004278 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004279} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4280
4281/*---------------------------------------------------------------------------
4282* WDA_GTK_OFFLOAD_GETINFO_REQ
4283*--------------------------------------------------------------------------*/
4284typedef struct
4285{
4286 tANI_U16 mesgType;
4287 tANI_U16 mesgLen;
4288
4289 tANI_U32 ulStatus; /* success or failure */
4290 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4291 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4292 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4293 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004294 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004295} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4296#endif // WLAN_FEATURE_GTK_OFFLOAD
4297
4298#ifdef WLAN_WAKEUP_EVENTS
4299/*---------------------------------------------------------------------------
4300 tSirWakeReasonInd
4301---------------------------------------------------------------------------*/
4302typedef struct
4303{
4304 tANI_U16 mesgType;
4305 tANI_U16 mesgLen;
4306 tANI_U32 ulReason; /* see tWakeReasonType */
4307 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4308 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4309 HAL truncates the data (i.e. data packets) this length
4310 will be less than the actual length */
4311 tANI_U32 ulActualDataLen; /* actual length of data */
4312 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4313 see specific wake type */
4314} tSirWakeReasonInd, *tpSirWakeReasonInd;
4315#endif // WLAN_WAKEUP_EVENTS
4316
4317/*---------------------------------------------------------------------------
4318 sAniSetTmLevelReq
4319---------------------------------------------------------------------------*/
4320typedef struct sAniSetTmLevelReq
4321{
4322 tANI_U16 tmMode;
4323 tANI_U16 newTmLevel;
4324} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4325
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004326#ifdef FEATURE_WLAN_TDLS
4327/* TDLS Request struct SME-->PE */
4328typedef struct sSirTdlsSendMgmtReq
4329{
4330 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4331 tANI_U16 length;
4332 tANI_U8 sessionId; // Session ID
4333 tANI_U16 transactionId; // Transaction ID for cmd
4334 tANI_U8 reqType;
4335 tANI_U8 dialog;
4336 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004337 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304338 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004339 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4340 tSirMacAddr peerMac;
4341 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4342} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004343
4344typedef enum TdlsAddOper
4345{
4346 TDLS_OPER_NONE,
4347 TDLS_OPER_ADD,
4348 TDLS_OPER_UPDATE
4349} eTdlsAddOper;
4350
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004351/* TDLS Request struct SME-->PE */
4352typedef struct sSirTdlsAddStaReq
4353{
4354 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4355 tANI_U16 length;
4356 tANI_U8 sessionId; // Session ID
4357 tANI_U16 transactionId; // Transaction ID for cmd
4358 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004359 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004360 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004361 tANI_U16 capability;
4362 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4363 tANI_U8 supported_rates_length;
4364 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004365 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004366 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004367 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004368 tSirVHTCap vhtCap;
4369 tANI_U8 uapsd_queues;
4370 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004371} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004372
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004373/* TDLS Response struct PE-->SME */
4374typedef struct sSirTdlsAddStaRsp
4375{
4376 tANI_U16 messageType;
4377 tANI_U16 length;
4378 tSirResultCodes statusCode;
4379 tSirMacAddr peerMac;
4380 tANI_U8 sessionId; // Session ID
4381 tANI_U16 staId ;
4382 tANI_U16 staType ;
4383 tANI_U8 ucastSig;
4384 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004385 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004386} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304387
4388/* TDLS Request struct SME-->PE */
4389typedef struct
4390{
4391 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4392 tANI_U16 length;
4393 tANI_U8 sessionId; // Session ID
4394 tANI_U16 transactionId; // Transaction ID for cmd
4395 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4396 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4397 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304398 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304399 tANI_U8 isResponder; // Is Peer a responder.
4400 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4401 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304402 tANI_U8 supportedChannelsLen;
4403 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4404 tANI_U8 supportedOperClassesLen;
4405 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304406}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4407
4408/* TDLS Request struct SME-->PE */
4409typedef struct
4410{
4411 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4412 tANI_U16 length;
4413 tANI_U8 sessionId; // Session ID
4414 tANI_U16 transactionId; // Transaction ID for cmd
4415 tSirResultCodes statusCode;
4416 tSirMacAddr peerMac;
Masti, Narayanraddif10fd792015-12-15 15:01:01 +05304417 tANI_U16 sta_idx;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304418}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4419
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004420/* TDLS Request struct SME-->PE */
4421typedef struct sSirTdlsDelStaReq
4422{
4423 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4424 tANI_U16 length;
4425 tANI_U8 sessionId; // Session ID
4426 tANI_U16 transactionId; // Transaction ID for cmd
4427 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4428 tSirMacAddr peerMac;
4429} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4430/* TDLS Response struct PE-->SME */
4431typedef struct sSirTdlsDelStaRsp
4432{
4433 tANI_U16 messageType;
4434 tANI_U16 length;
4435 tANI_U8 sessionId; // Session ID
4436 tSirResultCodes statusCode;
4437 tSirMacAddr peerMac;
4438 tANI_U16 staId;
4439} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004440/* TDLS Delete Indication struct PE-->SME */
4441typedef struct sSirTdlsDelStaInd
4442{
4443 tANI_U16 messageType;
4444 tANI_U16 length;
4445 tANI_U8 sessionId; // Session ID
4446 tSirMacAddr peerMac;
4447 tANI_U16 staId;
4448 tANI_U16 reasonCode;
4449} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004450typedef struct sSirTdlsDelAllPeerInd
4451{
4452 tANI_U16 messageType;
4453 tANI_U16 length;
4454 tANI_U8 sessionId; // Session ID
4455} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004456typedef struct sSirMgmtTxCompletionInd
4457{
4458 tANI_U16 messageType;
4459 tANI_U16 length;
4460 tANI_U8 sessionId; // Session ID
4461 tANI_U32 txCompleteStatus;
4462} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Atul Mittalc0f739f2014-07-31 13:47:47 +05304463
4464//tdlsoffchan
4465/* TDLS Channel Switch struct SME-->PE */
4466typedef struct
4467{
4468 tANI_U16 messageType; //eWNI_SME_TDLS_CHANNEL_SWITCH_REQ
4469 tANI_U16 length;
4470 tANI_U8 sessionId; // Session ID
4471 tANI_U16 transactionId; // Transaction ID for cmd
4472 tANI_U8 tdlsOffCh; // Target Off Channel
4473 tANI_U8 tdlsOffChBwOffset;// Target Off Channel Bandwidth offset
4474 tANI_U8 tdlsSwMode; // TDLS Off Channel Mode
4475 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4476 tSirMacAddr peerMac;
4477}tSirTdlsChanSwitch, *tpSirTdlsChanSwitch;
4478
Atul Mittal60bd4292014-08-14 12:19:27 +05304479/* TDLS Resp struct */
4480typedef struct
4481{
4482 tANI_U16 messageType; // eWNI_SME_TDLS_CHANNEL_SWITCH_RSP
4483 tANI_U16 length;
4484 tANI_U8 sessionId; // Session ID
4485 tANI_U16 transactionId; // Transaction ID for cmd
4486 tSirResultCodes statusCode;
4487 tSirMacAddr peerMac;
Masti, Narayanraddi36c67622016-01-06 16:07:34 +05304488 tANI_U16 sta_idx;
Atul Mittal60bd4292014-08-14 12:19:27 +05304489}tSirTdlsChanSwitchReqRsp, *tpSirTdlsChanSwitchReqRsp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004490#endif /* FEATURE_WLAN_TDLS */
4491
Yathish9f22e662012-12-10 14:21:35 -08004492typedef struct sSirActiveModeSetBcnFilterReq
4493{
4494 tANI_U16 messageType;
4495 tANI_U16 length;
4496 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304497 tSirMacAddr bssid;
Yathish9f22e662012-12-10 14:21:35 -08004498} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4499
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304500typedef enum
4501{
4502 HT40_OBSS_SCAN_PARAM_START,
4503 HT40_OBSS_SCAN_PARAM_UPDATE
4504}tHT40OBssScanCmdType;
4505
4506typedef struct sSirSmeHT40StopOBSSScanInd
4507{
4508 tANI_U16 messageType;
4509 tANI_U16 length;
4510 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304511 tSirMacAddr bssid;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304512} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4513
4514typedef struct sSirSmeHT40OBSSScanInd
4515{
4516 tANI_U16 messageType;
4517 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304518 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304519} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4520
4521typedef struct sSirHT40OBSSScanInd
4522{
4523 tHT40OBssScanCmdType cmdType;
4524 tSirScanType scanType;
4525 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4526 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4527 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4528 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4529 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4530 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4531 tANI_U16 OBSSScanActivityThreshold;
4532 tANI_U8 selfStaIdx;
4533 tANI_U8 bssIdx;
4534 tANI_U8 fortyMHZIntolerent;
4535 tANI_U8 channelCount;
4536 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4537 tANI_U8 currentOperatingClass;
4538 tANI_U16 ieFieldLen;
4539 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4540} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4541
4542
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304543//Reset AP Caps Changed
4544typedef struct sSirResetAPCapsChange
4545{
4546 tANI_U16 messageType;
4547 tANI_U16 length;
4548 tSirMacAddr bssId;
4549} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004550/// Definition for Candidate found indication from FW
4551typedef struct sSirSmeCandidateFoundInd
4552{
4553 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4554 tANI_U16 length;
4555 tANI_U8 sessionId; // Session Identifier
4556} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004557
Chet Lanctot186b5732013-03-18 10:26:30 -07004558#ifdef WLAN_FEATURE_11W
4559typedef struct sSirWlanExcludeUnencryptParam
4560{
4561 tANI_BOOLEAN excludeUnencrypt;
4562 tSirMacAddr bssId;
4563}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4564#endif
4565
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004566typedef struct sAniHandoffReq
4567{
4568 // Common for all types are requests
4569 tANI_U16 msgType; // message type is same as the request type
4570 tANI_U16 msgLen; // length of the entire request
4571 tANI_U8 sessionId;
4572 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4573 tANI_U8 channel;
Selvaraj, Sridhar3714c4d2016-06-22 15:19:12 +05304574#ifndef QCA_WIFI_ISOC
4575 tANI_U8 handoff_src;
4576#endif
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004577} tAniHandoffReq, *tpAniHandoffReq;
4578
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304579typedef struct sSirScanOffloadReq {
4580 tANI_U8 sessionId;
4581 tSirMacAddr bssId;
4582 tANI_U8 numSsid;
4583 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4584 tANI_U8 hiddenSsid;
4585 tSirMacAddr selfMacAddr;
4586 tSirBssType bssType;
4587 tANI_U8 dot11mode;
4588 tSirScanType scanType;
4589 tANI_U32 minChannelTime;
4590 tANI_U32 maxChannelTime;
4591 tANI_BOOLEAN p2pSearch;
4592 tANI_U16 uIEFieldLen;
4593 tANI_U16 uIEFieldOffset;
4594 tSirChannelList channelList;
4595 /*-----------------------------
4596 sSirScanOffloadReq....
4597 -----------------------------
4598 uIEFieldLen
4599 -----------------------------
4600 uIEFieldOffset ----+
4601 ----------------------------- |
4602 channelList.numChannels |
4603 ----------------------------- |
4604 ... variable size up to |
4605 channelNumber[numChannels-1] |
4606 This can be zero, if |
4607 numChannel is zero. |
4608 ----------------------------- <--+
4609 ... variable size uIEField
4610 up to uIEFieldLen (can be 0)
4611 -----------------------------*/
4612} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304613
4614typedef enum sSirScanEventType {
4615 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4616 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4617 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4618 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4619 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4620 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4621 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4622 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4623 SCAN_EVENT_MAX=0x8000
4624} tSirScanEventType;
4625
4626typedef struct sSirScanOffloadEvent{
4627 tSirScanEventType event;
4628 tSirResultCodes reasonCode;
4629 tANI_U32 chanFreq;
4630 tANI_U32 requestor;
4631 tANI_U32 scanId;
4632} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4633
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304634typedef struct sSirUpdateChanParam
4635{
4636 tANI_U8 chanId;
4637 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004638 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304639} tSirUpdateChanParam, *tpSirUpdateChanParam;
4640
4641typedef struct sSirUpdateChan
4642{
Sachin Ahujacb64fc82015-01-12 17:01:05 +05304643 tANI_U8 regId;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304644 tANI_U8 numChan;
4645 tSirUpdateChanParam chanParam[1];
4646} tSirUpdateChanList, *tpSirUpdateChanList;
4647
Leo Chang9056f462013-08-01 19:21:11 -07004648#ifdef FEATURE_WLAN_LPHB
4649#define SIR_LPHB_FILTER_LEN 64
4650
4651typedef enum
4652{
4653 LPHB_SET_EN_PARAMS_INDID,
4654 LPHB_SET_TCP_PARAMS_INDID,
4655 LPHB_SET_TCP_PKT_FILTER_INDID,
4656 LPHB_SET_UDP_PARAMS_INDID,
4657 LPHB_SET_UDP_PKT_FILTER_INDID,
4658 LPHB_SET_NETWORK_INFO_INDID,
4659} LPHBIndType;
4660
4661typedef struct sSirLPHBEnableStruct
4662{
4663 v_U8_t enable;
4664 v_U8_t item;
4665 v_U8_t session;
4666} tSirLPHBEnableStruct;
4667
4668typedef struct sSirLPHBTcpParamStruct
4669{
4670 v_U32_t srv_ip;
4671 v_U32_t dev_ip;
4672 v_U16_t src_port;
4673 v_U16_t dst_port;
4674 v_U16_t timeout;
4675 v_U8_t session;
4676 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004677 uint16 timePeriodSec; // in seconds
4678 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004679} tSirLPHBTcpParamStruct;
4680
4681typedef struct sSirLPHBTcpFilterStruct
4682{
4683 v_U16_t length;
4684 v_U8_t offset;
4685 v_U8_t session;
4686 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4687} tSirLPHBTcpFilterStruct;
4688
4689typedef struct sSirLPHBUdpParamStruct
4690{
4691 v_U32_t srv_ip;
4692 v_U32_t dev_ip;
4693 v_U16_t src_port;
4694 v_U16_t dst_port;
4695 v_U16_t interval;
4696 v_U16_t timeout;
4697 v_U8_t session;
4698 tSirMacAddr gateway_mac;
4699} tSirLPHBUdpParamStruct;
4700
4701typedef struct sSirLPHBUdpFilterStruct
4702{
4703 v_U16_t length;
4704 v_U8_t offset;
4705 v_U8_t session;
4706 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4707} tSirLPHBUdpFilterStruct;
4708
4709typedef struct sSirLPHBReq
4710{
4711 v_U16_t cmd;
4712 v_U16_t dummy;
4713 union
4714 {
4715 tSirLPHBEnableStruct lphbEnableReq;
4716 tSirLPHBTcpParamStruct lphbTcpParamReq;
4717 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4718 tSirLPHBUdpParamStruct lphbUdpParamReq;
4719 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4720 } params;
4721} tSirLPHBReq;
4722
Leo Changd9df8aa2013-09-26 13:32:26 -07004723typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004724{
4725 v_U8_t sessionIdx;
4726 v_U8_t protocolType; /*TCP or UDP*/
4727 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004728} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004729#endif /* FEATURE_WLAN_LPHB */
4730
Yue Mab9c86f42013-08-14 15:59:08 -07004731typedef struct sSirAddPeriodicTxPtrn
4732{
4733 /* MAC Address for the adapter */
4734 tSirMacAddr macAddress;
4735
4736 tANI_U8 ucPtrnId; // Pattern ID
4737 tANI_U16 ucPtrnSize; // Pattern size
4738 tANI_U32 usPtrnIntervalMs; // In msec
4739 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4740} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4741
4742typedef struct sSirDelPeriodicTxPtrn
4743{
4744 /* MAC Address for the adapter */
4745 tSirMacAddr macAddress;
4746
4747 /* Bitmap of pattern IDs that need to be deleted */
4748 tANI_U32 ucPatternIdBitmap;
4749} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4750
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004751typedef struct sSirRateUpdateInd
4752{
4753 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4754 * param.
4755 */
4756 tANI_S32 ucastDataRate;
4757
4758 /* TX flag to differentiate between HT20, HT40 etc */
4759 tTxrateinfoflags ucastDataRateTxFlag;
4760
4761 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4762 tSirMacAddr bssid;
4763
4764 /*
4765 * 0 implies MCAST RA, positive value implies fixed rate,
4766 * -1 implies ignore this param
4767 */
Abhishek Singh00b71972016-01-07 10:51:04 +05304768 tANI_S32 rmcDataRate;//unit Mbpsx10
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004769
4770 /* TX flag to differentiate between HT20, HT40 etc */
Abhishek Singh00b71972016-01-07 10:51:04 +05304771 tTxrateinfoflags rmcDataRateTxFlag;
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004772
4773 /*
4774 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4775 * 0 implies ignore
4776 */
4777 tANI_U32 mcastDataRate24GHz;
4778
4779 /* TX flag to differentiate between HT20, HT40 etc */
4780 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4781
4782 /*
4783 * MCAST(or BCAST) fixed data rate in 5 GHz,
4784 * unit Mbpsx10, 0 implies ignore
4785 */
4786 tANI_U32 mcastDataRate5GHz;
4787
4788 /* TX flag to differentiate between HT20, HT40 etc */
4789 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4790
4791} tSirRateUpdateInd, *tpSirRateUpdateInd;
4792
Abhishek Singh00b71972016-01-07 10:51:04 +05304793#ifdef WLAN_FEATURE_RMC
4794
4795#define SIR_RMC_NUM_MAX_RULERS 8 /* HAL_NUM_MAX_RULERS */
4796typedef struct sSirSetRMCReq
4797{
4798 tANI_U16 msgType;
4799 tANI_U16 msgLen;
4800 tSirMacAddr mcastTransmitter;
4801} tSirSetRMCReq, *tpSirSetRMCReq;
4802
4803typedef struct sSirRMCInfo
4804{
4805 tANI_U32 dialogToken;
4806 tANI_U8 action;
4807 tSirMacAddr mcastRuler;
4808} tSirRMCInfo, *tpSirRMCInfo;
4809
4810typedef struct sSirRmcRulerSelectInd
4811{
4812 tANI_U16 status;
4813 tSirMacAddr mcastTransmitter;
4814 tSirMacAddr mcastGroup;
4815 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4816} tSirRmcRulerSelectInd, *tpSirRmcRulerSelectInd;
4817
4818typedef struct sSirRmcBecomeRulerInd
4819{
4820 tANI_U16 status;
4821 tSirMacAddr mcastTransmitter;
4822 tSirMacAddr mcastGroup;
4823} tSirRmcBecomeRulerInd, *tpSirRmcBecomeRulerInd;
4824
4825typedef struct sSirRmcRulerReq
4826{
4827 // Common for all types are requests
4828 tANI_U16 msgType; // message type is same as the request type
4829 tANI_U16 msgLen; // length of the entire request
4830 tANI_U8 cmd; // tRulerReqCmdType
4831 tSirMacAddr mcastTransmitter;
4832 tSirMacAddr mcastGroup;
4833 tSirMacAddr blacklist[SIR_RMC_NUM_MAX_RULERS];
4834} tSirRmcRulerReq, *tpSirRmcRulerReq;
4835
4836typedef struct sSirRmcUpdateInd
4837{
4838 // Common for all types are requests
4839 tANI_U16 msgType; // message type is same as the request type
4840 tANI_U16 msgLen; // length of the entire request
4841 tANI_U8 indication; // trulerUpdateIndType
4842 tANI_U8 role; // tRoleType
4843 tSirMacAddr mcastTransmitter;
4844 tSirMacAddr mcastGroup;
4845 tSirMacAddr mcastRuler;
4846 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4847} tSirRmcUpdateInd, *tpSirRmcUpdateInd;
4848
4849/*---------------------------------------------------------------------------
4850* tSirIbssGetPeerInfoReqParams
4851*--------------------------------------------------------------------------*/
4852typedef struct
4853{
4854 tANI_BOOLEAN allPeerInfoReqd; // If set, all IBSS peers stats are reported
4855 tANI_U8 staIdx; // If allPeerInfoReqd is not set, only stats
4856 // of peer with staIdx is reported
4857}tSirIbssGetPeerInfoReqParams, *tpSirIbssGetPeerInfoReqParams;
4858
4859/*---------------------------------------------------------------------------
4860* tSirIbssGetPeerInfoParams
4861*--------------------------------------------------------------------------*/
4862typedef struct
4863{
4864 tANI_U8 staIdx; //StaIdx
4865 tANI_U32 txRate; //Tx Rate
4866 tANI_U32 mcsIndex; //MCS Index
4867 tANI_U32 txRateFlags; //TxRate Flags
4868 tANI_S8 rssi; //RSSI
4869}tSirIbssPeerInfoParams;
4870
4871typedef struct
4872{
4873 tANI_U32 status;
4874 tANI_U8 numPeers;
4875 tSirIbssPeerInfoParams peerInfoParams[32];
4876}tSirPeerInfoRspParams, *tpSirIbssPeerInfoRspParams;
4877
4878/*---------------------------------------------------------------------------
4879* tSirIbssGetPeerInfoRspParams
4880*--------------------------------------------------------------------------*/
4881typedef struct
4882{
4883 tANI_U16 mesgType;
4884 tANI_U16 mesgLen;
4885 tSirPeerInfoRspParams ibssPeerInfoRspParams;
4886} tSirIbssGetPeerInfoRspParams, *tpSirIbssGetPeerInfoRspParams;
4887#endif /* WLAN_FEATURE_RMC */
4888
Rajeev79dbe4c2013-10-05 11:03:42 +05304889#ifdef FEATURE_WLAN_BATCH_SCAN
4890// Set batch scan resposne from FW
4891typedef struct
4892{
4893 /*maximum number of scans which FW can cache*/
4894 tANI_U32 nScansToBatch;
4895} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4896
4897// Set batch scan request to FW
4898typedef struct
4899{
4900 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4901 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4902 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4903 tANI_U8 rfBand; /* band to scan :
4904 0 ->both Band, 1->2.4Ghz Only
4905 and 2-> 5GHz Only */
4906 tANI_U32 rtt; /* set if required to do RTT it is not
4907 supported in current version */
4908} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4909
4910
4911// Stop batch scan request to FW
4912typedef struct
4913{
4914 tANI_U32 param;
4915} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4916
4917// Trigger batch scan result indication to FW
4918typedef struct
4919{
4920 tANI_U32 param;
4921} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4922
4923// Batch scan result indication from FW
4924typedef PACKED_PRE struct PACKED_POST
4925{
4926 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08004927 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304928 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05304929 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05304930 /*Timestamp when Network was found. Used to calculate age based on timestamp
4931 in GET_RSP msg header */
4932 tANI_U32 timestamp;
4933} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4934
4935typedef PACKED_PRE struct PACKED_POST
4936{
4937 tANI_U32 scanId; /* Scan List ID. */
4938 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4939 tANI_U32 numNetworksInScanList;
4940 /*Variable data ptr: Number of AP in Scan List*/
4941 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4942 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4943 tANI_U8 scanList[1];
4944} tSirBatchScanList, *tpSirBatchScanList;
4945
4946typedef PACKED_PRE struct PACKED_POST
4947{
4948 tANI_U32 timestamp;
4949 tANI_U32 numScanLists;
4950 boolean isLastResult;
4951 /* Variable Data ptr: Number of Scan Lists*/
4952 /* following isLastResult is data of type tSirBatchScanList
4953 * of sizeof(tSirBatchScanList) * numScanLists*/
4954 tANI_U8 scanResults[1];
4955} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4956
4957#endif // FEATURE_WLAN_BATCH_SCAN
4958
Leo Chang0b0e45a2013-12-15 15:18:55 -08004959#ifdef FEATURE_WLAN_CH_AVOID
Abhishek Singhe34eb552015-06-18 10:12:15 +05304960#define SIR_CH_AVOID_MAX_RANGE 15
Leo Chang0b0e45a2013-12-15 15:18:55 -08004961
4962typedef struct sSirChAvoidFreqType
4963{
4964 tANI_U32 startFreq;
4965 tANI_U32 endFreq;
4966} tSirChAvoidFreqType;
4967
4968typedef struct sSirChAvoidIndType
4969{
4970 tANI_U32 avoidRangeCount;
4971 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
4972} tSirChAvoidIndType;
4973#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304974
c_hpothu92367912014-05-01 15:18:17 +05304975typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
4976 VOS_STATUS status, void *data);
Abhishek Singh08aa7762014-12-16 13:59:03 +05304977typedef void (*tSirFWStatsCallback)(VOS_STATUS status,
4978 tSirFwStatsResult *fwStatsRsp, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05304979typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind);
4980
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05304981typedef void (*tAntennaDivSelCB)(int antennaId, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05304982
4983/**
4984 * struct sir_sme_mgmt_frame_cb_req - Register a
4985 * management frame callback req
4986 * @message_type: message id
4987 * @length: msg length
4988 * @callback: callback for management frame indication
4989 */
4990struct sir_sme_mgmt_frame_cb_req
4991{
4992 tANI_U16 message_type;
4993 tANI_U16 length;
4994 sir_mgmt_frame_ind_callback callback;
4995};
4996
c_hpothu92367912014-05-01 15:18:17 +05304997typedef PACKED_PRE struct PACKED_POST
4998{
4999 tANI_U32 msgLen;
5000 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
5001 void *callback;
5002 void *data;
5003}tSirBcnMissRateReq;
5004
5005typedef PACKED_PRE struct PACKED_POST
5006{
5007 pGetBcnMissRateCB callback;
5008 void *data;
5009}tSirBcnMissRateInfo;
5010
Sunil Duttc69bccb2014-05-26 21:30:20 +05305011#ifdef WLAN_FEATURE_LINK_LAYER_STATS
5012
5013typedef struct
5014{
5015 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305016 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305017 u32 mpduSizeThreshold;
5018 u32 aggressiveStatisticsGathering;
5019}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
5020
5021typedef struct
5022{
5023 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305024 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305025 u32 paramIdMask;
5026}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
5027
5028typedef struct
5029{
5030 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305031 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305032 u32 statsClearReqMask;
5033 u8 stopReq;
5034}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
5035
Abhishek Singh3ae443b2014-10-08 11:49:27 +05305036typedef PACKED_PRE struct PACKED_POST
5037{
5038 u32 stats;
5039 tSirFWStatsCallback callback;
5040 void *data;
5041}tSirFWStatsGetReq;
5042
5043typedef PACKED_PRE struct PACKED_POST
5044{
5045 tSirFWStatsCallback callback;
5046 void *data;
5047}tSirFWStatsInfo;
5048
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305049typedef PACKED_PRE struct PACKED_POST
5050{
5051 tANI_U16 status;
5052 tANI_U32 selectedAntennaId;
5053 tANI_U32 reserved;
5054} tSirAntennaDivSelRsp, *tpSirntennaDivSelRsp;
5055
5056typedef PACKED_PRE struct PACKED_POST
5057{
5058 tAntennaDivSelCB callback;
5059 void *data;
5060 tANI_U32 reserved;
5061}tSirAntennaDiversitySelectionReq;
5062
5063typedef PACKED_PRE struct PACKED_POST
5064{
5065 tAntennaDivSelCB callback;
5066 void *data;
5067}tSirAntennaDiversitySelectionInfo;
5068
Sunil Duttc69bccb2014-05-26 21:30:20 +05305069/*---------------------------------------------------------------------------
5070 WLAN_HAL_LL_NOTIFY_STATS
5071---------------------------------------------------------------------------*/
5072
5073
5074/******************************LINK LAYER Statistics**********************/
5075
5076typedef int tSirWifiRadio;
5077typedef int tSirWifiChannel;
5078typedef int tSirwifiTxRate;
5079
5080/* channel operating width */
5081typedef PACKED_PRE enum PACKED_POST
5082{
5083 WIFI_CHAN_WIDTH_20 = 0,
5084 WIFI_CHAN_WIDTH_40 = 1,
5085 WIFI_CHAN_WIDTH_80 = 2,
5086 WIFI_CHAN_WIDTH_160 = 3,
5087 WIFI_CHAN_WIDTH_80P80 = 4,
5088 WIFI_CHAN_WIDTH_5 = 5,
5089 WIFI_CHAN_WIDTH_10 = 6,
5090} tSirWifiChannelWidth;
5091
5092typedef PACKED_PRE enum PACKED_POST
5093{
5094 WIFI_DISCONNECTED = 0,
5095 WIFI_AUTHENTICATING = 1,
5096 WIFI_ASSOCIATING = 2,
5097 WIFI_ASSOCIATED = 3,
5098 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
5099 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
5100} tSirWifiConnectionState;
5101
5102typedef PACKED_PRE enum PACKED_POST
5103{
5104 WIFI_ROAMING_IDLE = 0,
5105 WIFI_ROAMING_ACTIVE = 1,
5106} tSirWifiRoamState;
5107
5108typedef PACKED_PRE enum PACKED_POST
5109{
Dino Myclec8f3f332014-07-21 16:48:27 +05305110 WIFI_INTERFACE_UNKNOWN = -1,
Sunil Duttc69bccb2014-05-26 21:30:20 +05305111 WIFI_INTERFACE_STA = 0,
5112 WIFI_INTERFACE_SOFTAP = 1,
5113 WIFI_INTERFACE_IBSS = 2,
5114 WIFI_INTERFACE_P2P_CLIENT = 3,
5115 WIFI_INTERFACE_P2P_GO = 4,
5116 WIFI_INTERFACE_NAN = 5,
5117 WIFI_INTERFACE_MESH = 6,
5118 } tSirWifiInterfaceMode;
5119
5120// set for QOS association
5121#define WIFI_CAPABILITY_QOS 0x00000001
5122// set for protected association (802.11 beacon frame control protected bit set)
5123#define WIFI_CAPABILITY_PROTECTED 0x00000002
5124// set if 802.11 Extended Capabilities element interworking bit is set
5125#define WIFI_CAPABILITY_INTERWORKING 0x00000004
5126// set for HS20 association
5127#define WIFI_CAPABILITY_HS20 0x00000008
5128// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
5129#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
5130// set is 802.11 Country Element is present
5131#define WIFI_CAPABILITY_COUNTRY 0x00000020
5132
5133typedef PACKED_PRE struct PACKED_POST
5134{
5135 /*tSirWifiInterfaceMode*/
5136 // interface mode
Dino Myclec8f3f332014-07-21 16:48:27 +05305137 tANI_S8 mode;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305138 // interface mac address (self)
5139 tSirMacAddr macAddr;
5140 /*tSirWifiConnectionState*/
5141 // connection state (valid for STA, CLI only)
5142 tANI_U8 state;
5143 /*tSirWifiRoamState*/
5144 // roaming state
5145 tANI_U8 roaming;
5146 // WIFI_CAPABILITY_XXX (self)
5147 tANI_U32 capabilities;
5148 // null terminated SSID
5149 tANI_U8 ssid[33];
5150 // bssid
5151 tSirMacAddr bssid;
5152 // country string advertised by AP
5153 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
5154 // country string for this association
5155 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
5156} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
5157
5158/* channel information */
5159typedef PACKED_PRE struct PACKED_POST
5160{
5161 // channel width (20, 40, 80, 80+80, 160)
5162 tSirWifiChannelWidth width;
5163 // primary 20 MHz channel
5164 tSirWifiChannel centerFreq;
5165 // center frequency (MHz) first segment
5166 tSirWifiChannel centerFreq0;
5167 // center frequency (MHz) second segment
5168 tSirWifiChannel centerFreq1;
5169} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
5170
5171/* wifi rate info */
5172typedef PACKED_PRE struct PACKED_POST
5173{
5174 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
5175 tANI_U32 preamble :3;
5176 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
5177 tANI_U32 nss :2;
5178 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
5179 tANI_U32 bw :3;
5180 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
5181 // HT/VHT it would be mcs index
5182 tANI_U32 rateMcsIdx :8;
5183 // reserved
5184 tANI_U32 reserved :16;
5185 // units of 100 Kbps
5186 tANI_U32 bitrate;
5187} tSirWifiRate, *tpSirWifiRate;
5188
5189/* channel statistics */
5190typedef PACKED_PRE struct PACKED_POST
5191{
5192 // channel
5193 tSirWifiChannelInfo channel;
5194 // msecs the radio is awake (32 bits number accruing over time)
5195 tANI_U32 onTime;
5196 // msecs the CCA register is busy (32 bits number accruing over time)
5197 tANI_U32 ccaBusyTime;
5198} tSirWifiChannelStats, *tpSirWifiChannelStats;
5199
5200/* radio statistics */
5201typedef PACKED_PRE struct PACKED_POST
5202{
5203 // wifi radio (if multiple radio supported)
5204 tSirWifiRadio radio;
5205 // msecs the radio is awake (32 bits number accruing over time)
5206 tANI_U32 onTime;
5207 /* msecs the radio is transmitting
5208 * (32 bits number accruing over time)
5209 */
5210 tANI_U32 txTime;
5211 /* msecs the radio is in active receive
5212 *(32 bits number accruing over time)
5213 */
5214 tANI_U32 rxTime;
5215 /* msecs the radio is awake due to all scan
5216 * (32 bits number accruing over time)
5217 */
5218 tANI_U32 onTimeScan;
5219 /* msecs the radio is awake due to NAN
5220 * (32 bits number accruing over time)
5221 */
5222 tANI_U32 onTimeNbd;
Dino Mycle2c198072014-06-10 10:15:52 +05305223 /* msecs the radio is awake due to EXTScan
Sunil Duttc69bccb2014-05-26 21:30:20 +05305224 * (32 bits number accruing over time)
5225 */
Dino Mycle2c198072014-06-10 10:15:52 +05305226 tANI_U32 onTimeEXTScan;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305227 /* msecs the radio is awake due to roam?scan
5228 * (32 bits number accruing over time)
5229 */
5230 tANI_U32 onTimeRoamScan;
5231 /* msecs the radio is awake due to PNO scan
5232 * (32 bits number accruing over time)
5233 */
5234 tANI_U32 onTimePnoScan;
5235 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
5236 * (32 bits number accruing over time)
5237 */
5238 tANI_U32 onTimeHs20;
5239 // number of channels
5240 tANI_U32 numChannels;
5241 // channel statistics tSirWifiChannelStats
5242 tSirWifiChannelStats channels[1];
5243} tSirWifiRadioStat, *tpSirWifiRadioStat;
5244
5245/* per rate statistics */
5246typedef PACKED_PRE struct PACKED_POST
5247{
5248 // rate information
5249 tSirWifiRate rate;
5250 // number of successfully transmitted data pkts (ACK rcvd)
5251 tANI_U32 txMpdu;
5252 // number of received data pkts
5253 tANI_U32 rxMpdu;
5254 // number of data packet losses (no ACK)
5255 tANI_U32 mpduLost;
5256 // total number of data pkt retries *
5257 tANI_U32 retries;
5258 // number of short data pkt retries
5259 tANI_U32 retriesShort;
5260 // number of long data pkt retries
5261 tANI_U32 retriesLong;
5262} tSirWifiRateStat, *tpSirWifiRateStat;
5263
5264/* access categories */
5265typedef PACKED_PRE enum PACKED_POST
5266{
5267 WIFI_AC_VO = 0,
5268 WIFI_AC_VI = 1,
5269 WIFI_AC_BE = 2,
5270 WIFI_AC_BK = 3,
5271 WIFI_AC_MAX = 4,
5272} tSirWifiTrafficAc;
5273
5274/* wifi peer type */
5275typedef PACKED_PRE enum PACKED_POST
5276{
5277 WIFI_PEER_STA,
5278 WIFI_PEER_AP,
5279 WIFI_PEER_P2P_GO,
5280 WIFI_PEER_P2P_CLIENT,
5281 WIFI_PEER_NAN,
5282 WIFI_PEER_TDLS,
5283 WIFI_PEER_INVALID,
5284} tSirWifiPeerType;
5285
5286/* per peer statistics */
5287typedef PACKED_PRE struct PACKED_POST
5288{
5289 // peer type (AP, TDLS, GO etc.)
5290 tSirWifiPeerType type;
5291 // mac address
5292 tSirMacAddr peerMacAddress;
5293 // peer WIFI_CAPABILITY_XXX
5294 tANI_U32 capabilities;
5295 // number of rates
5296 tANI_U32 numRate;
5297 // per rate statistics, number of entries = num_rate
5298 tSirWifiRateStat rateStats[1];
5299} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5300
5301/* per access category statistics */
5302typedef PACKED_PRE struct PACKED_POST
5303{
5304 /*tSirWifiTrafficAc*/
5305 // access category (VI, VO, BE, BK)
5306 tANI_U8 ac;
5307 // number of successfully transmitted unicast data pkts (ACK rcvd)
5308 tANI_U32 txMpdu;
5309 // number of received unicast mpdus
5310 tANI_U32 rxMpdu;
5311 // number of succesfully transmitted multicast data packets
5312 // STA case: implies ACK received from AP for the unicast
5313 // packet in which mcast pkt was sent
5314 tANI_U32 txMcast;
5315 // number of received multicast data packets
5316 tANI_U32 rxMcast;
5317 // number of received unicast a-mpdus
5318 tANI_U32 rxAmpdu;
5319 // number of transmitted unicast a-mpdus
5320 tANI_U32 txAmpdu;
5321 // number of data pkt losses (no ACK)
5322 tANI_U32 mpduLost;
5323 // total number of data pkt retries
5324 tANI_U32 retries;
5325 // number of short data pkt retries
5326 tANI_U32 retriesShort;
5327 // number of long data pkt retries
5328 tANI_U32 retriesLong;
5329 // data pkt min contention time (usecs)
5330 tANI_U32 contentionTimeMin;
5331 // data pkt max contention time (usecs)
5332 tANI_U32 contentionTimeMax;
5333 // data pkt avg contention time (usecs)
5334 tANI_U32 contentionTimeAvg;
5335 // num of data pkts used for contention statistics
5336 tANI_U32 contentionNumSamples;
5337} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5338
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305339#ifdef FEATURE_EXT_LL_STAT
5340typedef PACKED_PRE struct PACKED_POST
5341{
5342 /* Average Beacon spread offset is the averaged
5343 * time delay between TBTT and beacon TSF
5344 */
5345 tANI_U64 avg_bcn_spread;
5346 /* Average number of frames received from AP after
5347 * receiving the ACK for a frame with PM=1
5348 */
5349 tANI_U32 avg_rx_frms_leaked;
5350 /* Rx leak watch window currently in force to minimize data loss
5351 * because of leaky AP. Rx leak window is the time driver waits
5352 * before shutting down the radio or switching the channel and
5353 * after receiving an ACK for a data frame with PM bit set)
5354 */
5355 tANI_U32 rx_leak_window;
5356
5357 /* Takes value of 1 if AP leaks packets after sending
5358 * an ACK for PM=1 otherwise 0
5359 */
5360 tANI_U32 is_leaky_ap;
5361
5362} tSirWifiIfaceLeakyApStat, *tpSirWifiIfaceLeakyApStat;
5363#endif
5364
Sunil Duttc69bccb2014-05-26 21:30:20 +05305365/* Interface statistics - corresponding to 2nd most
5366 * LSB in wifi statistics bitmap for getting statistics
5367 */
5368typedef PACKED_PRE struct PACKED_POST
5369{
5370 // current state of the interface
5371 tSirWifiInterfaceInfo info;
5372 // access point beacon received count from connected AP
5373 tANI_U32 beaconRx;
5374 // access point mgmt frames received count from
5375 // connected AP (including Beacon)
5376 tANI_U32 mgmtRx;
5377 // action frames received count
5378 tANI_U32 mgmtActionRx;
5379 // action frames transmit count
5380 tANI_U32 mgmtActionTx;
5381 // access Point Beacon and Management frames RSSI (averaged)
Dino Mycle3b9536d2014-07-09 22:05:24 +05305382 tANI_S32 rssiMgmt;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305383 // access Point Data Frames RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305384 tANI_S32 rssiData;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305385 // access Point ACK RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305386 tANI_S32 rssiAck;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305387 // per ac data packet statistics
5388 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305389#ifdef FEATURE_EXT_LL_STAT
5390 //Leaky Ap Stats
5391 tSirWifiIfaceLeakyApStat leakyApStat;
5392#endif
Sunil Duttc69bccb2014-05-26 21:30:20 +05305393} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5394
5395/* Peer statistics - corresponding to 3rd most LSB in
5396 * wifi statistics bitmap for getting statistics
5397 */
5398typedef PACKED_PRE struct PACKED_POST
5399{
5400 // number of peers
5401 tANI_U32 numPeers;
5402 // per peer statistics
5403 tSirWifiPeerInfo peerInfo[1];
5404} tSirWifiPeerStat, *tpSirWifiPeerStat;
5405
5406/* wifi statistics bitmap for getting statistics */
5407#define WMI_LINK_STATS_RADIO 0x00000001
5408#define WMI_LINK_STATS_IFACE 0x00000002
5409#define WMI_LINK_STATS_ALL_PEER 0x00000004
5410#define WMI_LINK_STATS_PER_PEER 0x00000008
5411
5412/* wifi statistics bitmap for clearing statistics */
5413// all radio statistics
5414#define WIFI_STATS_RADIO 0x00000001
5415// cca_busy_time (within radio statistics)
5416#define WIFI_STATS_RADIO_CCA 0x00000002
5417// all channel statistics (within radio statistics)
5418#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5419// all scan statistics (within radio statistics)
5420#define WIFI_STATS_RADIO_SCAN 0x00000008
5421// all interface statistics
5422#define WIFI_STATS_IFACE 0x00000010
5423// all tx rate statistics (within interface statistics)
5424#define WIFI_STATS_IFACE_TXRATE 0x00000020
5425// all ac statistics (within interface statistics)
5426#define WIFI_STATS_IFACE_AC 0x00000040
5427// all contention (min, max, avg) statistics (within ac statistics)
5428#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5429
5430typedef PACKED_PRE struct PACKED_POST
5431{
5432 tANI_U32 paramId;
5433 tANI_U8 ifaceId;
5434 tANI_U32 respId;
5435 tANI_U32 moreResultToFollow;
5436 tANI_U8 result[1];
5437} tSirLLStatsResults, *tpSirLLStatsResults;
5438
5439#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5440
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05305441
5442
Dino Mycle2c198072014-06-10 10:15:52 +05305443#ifdef WLAN_FEATURE_EXTSCAN
5444
5445typedef enum
5446{
5447 WIFI_BAND_UNSPECIFIED,
5448 WIFI_BAND_BG = 1, // 2.4 GHz
5449 WIFI_BAND_A = 2, // 5 GHz without DFS
5450 WIFI_BAND_ABG = 3, // 2.4 GHz + 5 GHz; no DFS
5451 WIFI_BAND_A_DFS_ONLY = 4, // 5 GHz DFS only
5452 // 5 is reserved
5453 WIFI_BAND_A_WITH_DFS = 6, // 5 GHz with DFS
5454 WIFI_BAND_ABG_WITH_DFS = 7, // 2.4 GHz + 5 GHz with DFS
5455
5456 /* Keep it last */
5457 WIFI_BAND_MAX
5458} tWifiBand;
5459
5460/* wifi scan related events */
5461typedef enum
5462{
5463 WIFI_SCAN_BUFFER_FULL,
5464 WIFI_SCAN_COMPLETE,
5465} tWifiScanEventType;
5466
5467typedef struct
5468{
5469 tSirMacAddr bssid; // AP BSSID
5470 tANI_S32 low; // low threshold
5471 tANI_S32 high; // high threshold
Dino Mycle2c198072014-06-10 10:15:52 +05305472} tSirAPThresholdParam, *tpSirAPThresholdParam;
5473
5474typedef struct
5475{
5476 tANI_U32 requestId;
5477 tANI_U8 sessionId;
5478} tSirGetEXTScanCapabilitiesReqParams, *tpSirGetEXTScanCapabilitiesReqParams;
5479
5480typedef struct
5481{
5482 tANI_U32 requestId;
5483 tANI_U32 status;
5484
5485 tANI_U32 scanCacheSize;
5486 tANI_U32 scanBuckets;
5487 tANI_U32 maxApPerScan;
5488 tANI_U32 maxRssiSampleSize;
5489 tANI_U32 maxScanReportingThreshold;
5490
5491 tANI_U32 maxHotlistAPs;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305492 tANI_U32 maxHotlistSSIDs;
Dino Mycle2c198072014-06-10 10:15:52 +05305493
5494 tANI_U32 maxBsidHistoryEntries;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305495
Dino Mycle2c198072014-06-10 10:15:52 +05305496} tSirEXTScanCapabilitiesEvent, *tpSirEXTScanCapabilitiesEvent;
5497
5498/* WLAN_HAL_EXT_SCAN_RESULT_IND */
5499typedef struct
5500{
5501 tANI_U32 requestId;
5502 tANI_U8 sessionId;
5503
5504 /*
5505 * 1 return cached results and flush it
5506 * 0 return cached results and do not flush
5507 */
5508 tANI_BOOLEAN flush;
5509} tSirEXTScanGetCachedResultsReqParams, *tpSirEXTScanGetCachedResultsReqParams;
5510
5511typedef PACKED_PRE struct PACKED_POST
5512{
5513 tANI_U32 requestId;
5514 tANI_U32 status;
5515} tSirEXTScanGetCachedResultsRspParams, *tpSirEXTScanGetCachedResultsRspParams;
5516
5517typedef PACKED_PRE struct PACKED_POST
5518{
5519 tANI_U64 ts; // time of discovery
5520 tANI_U8 ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; // null terminated SSID
5521 tSirMacAddr bssid; // BSSID
5522 tANI_U32 channel; // channel frequency in MHz
5523 tANI_S32 rssi; // RSSI in dBm
5524 tANI_U32 rtt; // RTT in nanoseconds
5525 tANI_U32 rtt_sd; // standard deviation in rtt
5526 tANI_U16 beaconPeriod; // period advertised in the beacon
5527 tANI_U16 capability; // capabilities advertised in the beacon
5528} tSirWifiScanResult, *tpSirWifiScanResult;
5529
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305530/**
5531 * struct tExtscanCachedScanResult - extscan cached scan result
5532 * @scan_id: a unique identifier for the scan unit
5533 * @flags: a bitmask with additional information about scan
5534 * @num_results: number of bssids retrieved by the scan
5535 * @ap: wifi scan bssid results info
5536 */
5537
5538typedef PACKED_PRE struct PACKED_POST
5539{
5540 tANI_U16 scan_id;
5541 tANI_U8 flags;
5542 tANI_U8 num_results;
5543
5544 tSirWifiScanResult ap[32];
5545} tExtscanCachedScanResult, *tpExtscanCachedScanResult;
5546
Dino Mycle2c198072014-06-10 10:15:52 +05305547/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
5548
5549typedef PACKED_PRE struct PACKED_POST
5550{
5551 tANI_U32 requestId;
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305552 tANI_BOOLEAN bss_found;
5553 tANI_U32 numHotlistBss; // numbers of APs
5554
5555 /*
5556 * 0 for last fragment
5557 * 1 still more fragment(s) coming
5558 */
5559 tANI_BOOLEAN moreData;
5560 tSirWifiScanResult bssHotlist[1];
5561} tSirEXTScanHotlistMatch, *tpSirEXTScanHotlistMatch;
5562
5563
5564typedef PACKED_PRE struct PACKED_POST
5565{
5566 tANI_U32 requestId;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305567 /*
5568 * It gives number of scan ids
5569 */
5570 tANI_U32 scanResultSize;
Dino Mycle2c198072014-06-10 10:15:52 +05305571
5572 /*
5573 * 0 for last fragment
5574 * 1 still more fragment(s) coming
5575 */
5576 tANI_BOOLEAN moreData;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305577 tANI_U8 result[1];
Dino Mycle2c198072014-06-10 10:15:52 +05305578} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
5579
Padma, Santhosh Kumar9acee012015-08-21 19:58:01 +05305580/* WLAN_HAL_SSID_HOTLIST_RESULT_IND */
5581
5582typedef PACKED_PRE struct PACKED_POST
5583{
5584 tANI_U32 requestId;
5585 tANI_BOOLEAN ssid_found;
5586 tANI_U32 numHotlistSsid; // numbers of SSIDs
5587
5588 /*
5589 * 0 for last fragment
5590 * 1 still more fragment(s) coming
5591 */
5592 tANI_BOOLEAN moreData;
5593 tSirWifiScanResult ssidHotlist[1];
5594} tSirEXTScanSsidHotlistMatch, *tpSirEXTScanSsidHotlistMatch;
5595
Dino Mycle2c198072014-06-10 10:15:52 +05305596typedef PACKED_PRE struct PACKED_POST
5597{
5598 tANI_U8 elemId; // Element Identifier
5599 tANI_U8 ieLength; // length of IE data
5600 tANI_U8 *IEs; // IEs
5601} tSirInformationElement, *tpSirInformationElement;
5602
5603/* Reported when each probe response is received, if reportEvents
5604* enabled in tSirWifiScanCmdReqParams */
5605typedef struct
5606{
5607 tANI_U32 requestId;
5608
5609 /*
5610 * 0 for last fragment
5611 * 1 still more fragment(s) coming
5612 */
5613 tANI_BOOLEAN moreData;
5614 tSirWifiScanResult ap; // only 1 AP info for now
5615 tANI_U32 ieLength;
5616 tSirInformationElement *ie;
5617} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
5618
5619
5620typedef struct
5621{
5622 tANI_U32 channel; // frequency
5623 tANI_U32 dwellTimeMs; // dwell time hint
5624 tANI_U8 passive; // 0 => active,
5625 // 1 => passive scan; ignored for DFS
5626 tANI_U8 chnlClass;
5627} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
5628
5629typedef struct
5630{
5631 tANI_U8 bucket; // bucket index, 0 based
5632 tWifiBand band; // when UNSPECIFIED, use channel list
5633
5634 /*
5635 * desired period, in millisecond; if this is too
5636 * low, the firmware should choose to generate results as fast as
5637 * it can instead of failing the command byte
5638 */
5639 tANI_U32 period;
5640
5641 /*
5642 * 0 => normal reporting (reporting rssi history
5643 * only, when rssi history buffer is % full)
5644 * 1 => same as 0 + report a scan completion event after scanning
5645 * this bucket
5646 * 2 => same as 1 + forward scan results (beacons/probe responses + IEs)
5647 * in real time to HAL
5648 */
5649 tANI_U8 reportEvents;
5650
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305651 tANI_U32 max_period;
5652 tANI_U32 exponent;
5653 tANI_U32 step_count;
5654
Dino Mycle2c198072014-06-10 10:15:52 +05305655 tANI_U8 numChannels;
5656
5657 /*
5658 * channels to scan; these may include DFS channels
5659 */
5660 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
5661} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
5662
5663typedef struct
5664{
5665 tANI_U32 requestId;
5666 tANI_U8 sessionId;
5667 tANI_U32 basePeriod; // base timer period
5668 tANI_U32 maxAPperScan;
5669
5670 /* in %, when buffer is this much full, wake up host */
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305671 tANI_U32 reportThresholdPercent;
5672 tANI_U32 reportThresholdNumScans;
Dino Mycle2c198072014-06-10 10:15:52 +05305673
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305674 tANI_U32 homeAwayTime; //in units of milliseconds
5675
5676 tANI_U8 numBuckets;
Dino Mycle2c198072014-06-10 10:15:52 +05305677 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
5678} tSirEXTScanStartReqParams, *tpSirEXTScanStartReqParams;
5679
5680typedef PACKED_PRE struct PACKED_POST
5681{
5682 tANI_U32 requestId;
5683 tANI_U32 status;
5684} tSirEXTScanStartRspParams, *tpSirEXTScanStartRspParams;
5685
5686typedef struct
5687{
5688 tANI_U32 requestId;
5689 tANI_U8 sessionId;
5690} tSirEXTScanStopReqParams, *tpSirEXTScanStopReqParams;
5691
5692typedef PACKED_PRE struct PACKED_POST
5693{
5694 tANI_U32 requestId;
5695 tANI_U32 status;
5696} tSirEXTScanStopRspParams, *tpSirEXTScanStopRspParams;
5697
5698typedef struct
5699{
5700 tANI_U32 requestId;
5701 tANI_U8 sessionId; // session Id mapped to vdev_id
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305702 tANI_U32 lostBssidSampleSize;
5703 tANI_U32 numBssid; // number of hotlist APs
Dino Mycle2c198072014-06-10 10:15:52 +05305704 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; // hotlist APs
5705} tSirEXTScanSetBssidHotListReqParams, *tpSirEXTScanSetBssidHotListReqParams;
5706
5707typedef PACKED_PRE struct PACKED_POST
5708{
5709 tANI_U32 requestId;
5710 tANI_U32 status;
5711} tSirEXTScanSetBssidHotListRspParams, *tpSirEXTScanSetBssidHotListRspParams;
5712
5713typedef struct
5714{
5715 tANI_U32 requestId;
5716 tANI_U8 sessionId;
5717} tSirEXTScanResetBssidHotlistReqParams, *tpSirEXTScanResetBssidHotlistReqParams;
5718
5719typedef PACKED_PRE struct PACKED_POST
5720{
5721 tANI_U32 requestId;
5722 tANI_U32 status;
5723} tSirEXTScanResetBssidHotlistRspParams, *tpSirEXTScanResetBssidHotlistRspParams;
5724
Padma, Santhosh Kumar9acee012015-08-21 19:58:01 +05305725typedef struct
5726{
5727 tANI_U32 requestId;
5728 tANI_U8 sessionId;
5729} tSirEXTScanResetSsidHotlistReqParams, *tpSirEXTScanResetSsidHotlistReqParams;
5730
5731typedef PACKED_PRE struct PACKED_POST
5732{
5733 tANI_U32 requestId;
5734 tANI_U32 status;
5735} tSirEXTScanResetSsidHotlistRspParams, *tpSirEXTScanResetSsidHotlistRspParams;
5736
5737
5738/**
5739 * struct sir_ssid_hotlist_param - param for SSID Hotlist
5740 * @ssid: SSID which is being hotlisted
5741 * @band: Band in which the given SSID should be scanned
5742 * @rssi_low: Low bound on RSSI
5743 * @rssi_high: High bound on RSSI
5744 */
5745typedef struct
5746{
5747 tSirMacSSid ssid;
5748 tANI_U8 band;
5749 tANI_S32 rssi_low;
5750 tANI_S32 rssi_high;
5751}tSirSsidThresholdParam, *tpSirSsidThresholdParam;
5752
5753typedef struct
5754{
5755 tANI_U32 request_id;
5756 tANI_U8 session_id;
5757 tANI_U32 lost_ssid_sample_size;
5758 tANI_U32 ssid_count;
5759 tSirSsidThresholdParam ssid[WLAN_EXTSCAN_MAX_HOTLIST_SSIDS];
5760}tSirEXTScanSetSsidHotListReqParams, *tpSirEXTScanSetSsidHotListReqParams;
5761
5762typedef PACKED_PRE struct PACKED_POST
5763{
5764 tANI_U32 requestId;
5765 tANI_U32 status;
5766} tSirEXTScanSetSsidHotListRspParams, *tpSirEXTScanSetSsidHotListRspParams;
5767
Dino Mycle2c198072014-06-10 10:15:52 +05305768/*---------------------------------------------------------------------------
5769 * * WLAN_HAL_EXTSCAN_RESULT_AVAILABLE_IND
5770 * *-------------------------------------------------------------------------*/
5771typedef PACKED_PRE struct PACKED_POST
5772{
5773 tANI_U32 requestId;
5774 tANI_U32 numResultsAvailable;
5775} tSirEXTScanResultsAvailableIndParams,
5776 *tpSirEXTScanResultsAvailableIndParams;
5777
5778typedef PACKED_PRE struct PACKED_POST
5779{
5780 tANI_U8 scanEventType;
5781 tANI_U32 status;
5782} tSirEXTScanOnScanEventIndParams,
5783 *tpSirEXTScanOnScanEventIndParams;
5784
5785/*---------------------------------------------------------------------------
5786 * * WLAN_HAL_EXTSCAN_PROGRESS_IND
5787 * *-------------------------------------------------------------------------*/
5788
5789typedef PACKED_PRE enum PACKED_POST
5790{
5791 WLAN_HAL_EXTSCAN_BUFFER_FULL,
5792 WLAN_HAL_EXTSCAN_COMPLETE,
5793}tSirEXTScanProgressEventType;
5794
5795typedef PACKED_PRE struct PACKED_POST
5796{
5797 tANI_U32 requestId;
5798 tANI_U32 status;
5799 tSirEXTScanProgressEventType extScanEventType;
5800}tSirEXTScanProgressIndParams,
5801 *tpSirEXTScanProgressIndParams;
5802
Padma, Santhosh Kumarc1f7f052015-08-26 12:29:01 +05305803typedef PACKED_PRE struct PACKED_POST
5804{
5805 tANI_BOOLEAN pause; // 1 -> pause, 0 -> unpause
5806 tANI_U32 reserved; //reserved for future use
5807}tSirHighPriorityDataInfoInd, *tpSirHighPriorityDataInfoInd;
Dino Mycle2c198072014-06-10 10:15:52 +05305808
5809#endif /* WLAN_FEATURE_EXTSCAN */
5810
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +05305811typedef struct
5812{
5813 tANI_U16 messageType;
5814 tANI_U16 length;
5815 tSirMacAddr macAddr;
5816} tSirSpoofMacAddrReq, *tpSirSpoofMacAddrReq;
5817
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05305818typedef struct
5819{
5820 //BIT order is most likely little endian.
5821 //This structure is for netowkr-order byte array (or big-endian byte order)
5822#ifndef WLAN_PAL_BIG_ENDIAN_BIT
5823 tANI_U8 protVer :2;
5824 tANI_U8 type :2;
5825 tANI_U8 subType :4;
5826
5827 tANI_U8 toDS :1;
5828 tANI_U8 fromDS :1;
5829 tANI_U8 moreFrag :1;
5830 tANI_U8 retry :1;
5831 tANI_U8 powerMgmt :1;
5832 tANI_U8 moreData :1;
5833 tANI_U8 wep :1;
5834 tANI_U8 order :1;
5835
5836#else
5837
5838 tANI_U8 subType :4;
5839 tANI_U8 type :2;
5840 tANI_U8 protVer :2;
5841
5842 tANI_U8 order :1;
5843 tANI_U8 wep :1;
5844 tANI_U8 moreData :1;
5845 tANI_U8 powerMgmt :1;
5846 tANI_U8 retry :1;
5847 tANI_U8 moreFrag :1;
5848 tANI_U8 fromDS :1;
5849 tANI_U8 toDS :1;
5850
5851#endif
5852
5853} tSirFC;
5854
5855typedef struct
5856{
5857 /* Frame control field */
5858 tSirFC frameCtrl;
5859 /* Duration ID */
5860 tANI_U16 usDurationId;
5861 /* Address 1 field */
5862 tSirMacAddr vA1;
5863 /* Address 2 field */
5864 tSirMacAddr vA2;
5865 /* Address 3 field */
5866 tSirMacAddr vA3;
5867 /* Sequence control field */
5868 tANI_U16 sSeqCtrl;
5869 /* Optional A4 address */
5870 tSirMacAddr optvA4;
5871 /* Optional QOS control field */
5872 tANI_U16 usQosCtrl;
5873}tSir80211Header;
5874// Definition for Encryption Keys
5875//typedef struct sSirKeys
5876typedef struct
5877{
5878 tANI_U8 keyId;
5879 tANI_U8 unicast; // 0 for multicast
5880 tAniKeyDirection keyDirection;
5881 tANI_U8 keyRsc[WLAN_MAX_KEY_RSC_LEN]; // Usage is unknown
5882 tANI_U8 paeRole; // =1 for authenticator,
5883 // =0 for supplicant
5884 tANI_U16 keyLength;
5885 tANI_U8 key[SIR_MAC_MAX_KEY_LENGTH];
5886} tMacKeys, *tpMacKeys;
5887
5888typedef enum
5889{
5890 eMAC_WEP_STATIC,
5891 eMAC_WEP_DYNAMIC,
5892} tMacWepType;
5893
5894/*
5895 * This is used by PE to configure the key information on a given station.
5896 * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
5897 * a preconfigured key from a BSS the station assoicated with; otherwise
5898 * a new key descriptor is created based on the key field.
5899 */
5900//typedef struct
5901typedef struct
5902{
5903 tANI_U16 staIdx;
5904 tAniEdType encType; // Encryption/Decryption type
5905 tMacWepType wepType; // valid only for WEP
5906 tANI_U8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
5907 tMacKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
5908 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
5909 tANI_U8 sessionId; // PE session id for PE<->HAL interface
5910} tSirSetStaKeyParams, *tpSirSetStaKeyParams;
5911
5912//typedef struct
5913typedef struct
5914{
5915 tSirSetStaKeyParams keyParams;
5916 tANI_U8 pn[6];
5917}tSirencConfigParams;
5918
5919typedef struct
5920{
5921 tANI_U16 length;
5922 tANI_U8 data[WLAN_DISA_MAX_PAYLOAD_SIZE];
5923}tSirpayload;
5924
5925typedef struct
5926{
5927 tSir80211Header macHeader;
5928 tSirencConfigParams encParams;
5929 tSirpayload data;
5930}tSirpkt80211;
5931
5932typedef struct
5933{
5934 tANI_U32 status;
5935 tSirpayload encryptedPayload;
5936} tSetEncryptedDataRspParams, *tpSetEncryptedDataRspParams;
5937
5938typedef struct
5939{
5940 tANI_U16 mesgType;
5941 tANI_U16 mesgLen;
5942 tSetEncryptedDataRspParams encryptedDataRsp;
5943} tSirEncryptedDataRspParams, *tpSirEncryptedDataRspParams;
c_hpothua3d45d52015-01-05 14:11:17 +05305944
5945typedef enum eSirAbortScanStatus
5946{
5947 eSIR_ABORT_ACTIVE_SCAN_LIST_EMPTY,
5948 eSIR_ABORT_ACTIVE_SCAN_LIST_NOT_EMPTY,
5949 eSIR_ABORT_SCAN_FAILURE
5950}tSirAbortScanStatus;
5951
Masti, Narayanraddi4b359dd2015-02-03 15:49:29 +05305952/* Max number of rates allowed in Supported Rates IE */
5953#define MAX_NUM_SUPPORTED_RATES (8)
5954
Girish Gowlia95daca2015-02-04 20:31:31 +05305955typedef struct sSirSmeUpdateMaxRateParams
5956{
5957 tANI_U32 maxRateFlag;
5958 tANI_U8 smeSessionId;
5959}tSirSmeUpdateMaxRateParams, *tpSirSmeUpdateMaxRateParams;
5960
Srinivas Dasari32a79262015-02-19 13:04:49 +05305961typedef struct
5962{
5963 tANI_U32 event_data_len;
5964 tANI_U8 event_data[1];
5965} tSirNanEvent, *tpSirNanEvent;
Ganesh Kondabattinib18b3292015-03-16 16:59:26 +05305966
5967typedef struct
5968{
5969 tANI_U32 txCompleteStatus;
5970 tANI_U32 txBdToken;
5971}tSirTxBdStatus, *tpSirTxBdStatus;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05305972
5973/* enable or disable 20_40 BSS Coexistence IE in TDLS frames*/
5974typedef struct
5975{
5976 // Common for all types are requests
5977 tANI_U16 msgType; // message type is same as the request type
5978 tANI_U16 msgLen; // length of the entire request
5979 tANI_U8 SetTdls2040BSSCoex; //enabled or disabled
5980} tAniSetTdls2040BSSCoex, *tpAniSetTdls2040BSSCoex;
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05305981
Sushant Kaushik8e644982015-09-23 12:18:54 +05305982/**
5983 * struct sir_wifi_start_log - Structure to store the params sent to start/
5984 * stop logging
5985 * @ringId: Attribute which indicates the type of logging like per packet
5986 * statistics, connectivity etc.
5987 * @verboseLevel: Verbose level which can be 0,1,2,3
5988 * @flag: Flag field for future use
5989 */
5990typedef struct sir_wifi_start_log {
5991 tANI_U32 ringId;
5992 tANI_U32 verboseLevel;
5993 tANI_U32 flag;
5994}tAniWifiStartLog, *tpAniWifiStartLog;
5995
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05305996typedef struct
5997{
5998 tANI_U16 mesgType;
5999 tANI_U16 mesgLen;
6000 tSirMacAddr bssid;
6001}tSirDelAllTdlsPeers, *ptSirDelAllTdlsPeers;
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306002
6003typedef void (*tSirMonModeCb)(tANI_U32 *magic, struct completion *cmpVar);
6004typedef struct
6005{
6006 tANI_U32 *magic;
6007 struct completion *cmpVar;
6008 void *data;
6009 tSirMonModeCb callback;
6010}tSirMonModeReq, *ptSirMonModeReq;
c_manjeecfd1efb2015-09-25 19:32:34 +05306011
6012/**
6013 * struct tAniFwrDumpRsp - firmware dump response details.
6014 *
6015 * This structure is used to store the firmware dump
6016 * response from the firmware.
6017 */
6018typedef struct
6019{
6020 tANI_U32 dump_status;
6021}tAniFwrDumpRsp, *tpAniFwrDumpRsp;
6022
6023typedef void (*FWMemDumpReqCb)(void *fwMemDumpReqContext, tAniFwrDumpRsp *dump_rsp);
6024
6025/**
6026 * struct tAniFwrDumpReq - firmware memory dump request details.
6027.*.@FWMemDumpReqCb - Associated Callback
6028 *.@fwMemDumpReqContext - Callback context
6029 * @reserved - reserved field 1.
6030 *
6031 * This structure carries information about the firmware
6032 * memory dump request.
6033 */
6034typedef struct
6035{
6036 FWMemDumpReqCb fwMemDumpReqCallback;
6037 void * fwMemDumpReqContext;
6038 tANI_U32 reserved1;
6039}tAniFwrDumpReq, *tpAniFwrDumpReq;
6040
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05306041/**
6042* struct tSetWifiConfigParams - Structure to store the wificonfig related params
6043* @paramType: 1. Average Stats factor 2. Guard type
6044* @paramvalue: Value to be set in the firmware.
6045* @bssId: macaddr of the connected BssId
6046*/
6047typedef struct
6048{
6049 tANI_U8 paramType;
6050 tANI_U8 sessionId;
6051 tANI_U32 paramValue;
6052 tSirMacAddr bssId;
6053} tSetWifiConfigParams, *tpSetWifiConfigParams;
6054
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306055typedef struct {
6056 tANI_U8 param;
6057 tANI_U32 value;
6058} tModifyRoamParamsReqParams, * tpModifyRoamParamsReqParams;
6059
6060
Jeff Johnson295189b2012-06-20 16:38:30 -07006061#endif /* __SIR_API_H */