blob: 4b054bf79c6db6d0da752242ec96687d8203ad4a [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhishek Singh8a3e4dc2017-01-02 10:39:18 +05302 * Copyright (c) 2012-2017 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
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +053044/* Take care to avoid redefinition of this type, if it is */
45/* already defined in "halWmmApi.h" */
46#if !defined(_HALMAC_WMM_API_H)
47typedef struct sAniSirGlobal *tpAniSirGlobal;
48#endif
49
50
Jeff Johnson295189b2012-06-20 16:38:30 -070051#include "sirTypes.h"
52#include "sirMacProtDef.h"
53#include "aniSystemDefs.h"
Jeff Johnsone7245742012-09-05 17:12:55 -070054#include "sirParams.h"
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +053055#include <dot11f.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070056
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080057#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
58#include "eseGlobal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070059#endif
60
61/// Maximum number of STAs allowed in the BSS
62#define SIR_MAX_NUM_STA 256
63
64/// Maximum number of Neighbors reported by STA for LB feature
65#define SIR_MAX_NUM_NEIGHBOR_BSS 3
66
67/// Maximum number of Neighbors reported by STA for LB feature
68#define SIR_MAX_NUM_ALTERNATE_RADIOS 5
69
70/// Maximum size of SCAN_RSP message
71#define SIR_MAX_SCAN_RSP_MSG_LENGTH 2600
72
73/// Start of Sirius software/Host driver message types
74#define SIR_HAL_HOST_MSG_START 0x1000
75
76/// Power save level definitions
77#define SIR_MAX_POWER_SAVE 3
78#define SIR_INTERMEDIATE_POWER_SAVE 4
79#define SIR_NO_POWER_SAVE 5
80
81/// Max supported channel list
82#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
83
84/// Maximum DTIM Factor
85#define SIR_MAX_DTIM_FACTOR 32
86
87#define SIR_MDIE_SIZE 3
88
Gopichand Nakkalad492d202013-05-10 02:50:47 +053089/* Max number of channels are 165, but to access 165th element of array,
90 *array of 166 is required.
91 */
92#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -080093#define SIR_BCN_REPORT_MAX_BSS_DESC 4
Gopichand Nakkalad492d202013-05-10 02:50:47 +053094
Jeff Johnson295189b2012-06-20 16:38:30 -070095
Rajeev79dbe4c2013-10-05 11:03:42 +053096#ifdef FEATURE_WLAN_BATCH_SCAN
97#define SIR_MAX_SSID_SIZE (32)
98#endif
99
Jeff Johnson295189b2012-06-20 16:38:30 -0700100
101#define SIR_NUM_11B_RATES 4 //1,2,5.5,11
102#define SIR_NUM_11A_RATES 8 //6,9,12,18,24,36,48,54
103#define SIR_NUM_POLARIS_RATES 3 //72,96,108
104#define SIR_NUM_TITAN_RATES 26
105#define SIR_NUM_TAURUS_RATES 4 //136.5, 151.7,283.5,315
106#define SIR_NUM_PROP_RATES (SIR_NUM_TITAN_RATES + SIR_NUM_TAURUS_RATES)
107
108#define SIR_11N_PROP_RATE_136_5 (1<<28)
109#define SIR_11N_PROP_RATE_151_7 (1<<29)
110#define SIR_11N_PROP_RATE_283_5 (1<<30)
111#define SIR_11N_PROP_RATE_315 (1<<31)
112#define SIR_11N_PROP_RATE_BITMAP 0x80000000 //only 315MBPS rate is supported today
113//Taurus is going to support 26 Titan Rates(no ESF/concat Rates will be supported)
114//First 26 bits are reserved for Titan and last 4 bits for Taurus, 2(27 and 28) bits are reserved.
115//#define SIR_TITAN_PROP_RATE_BITMAP 0x03FFFFFF
116//Disable all Titan rates
117#define SIR_TITAN_PROP_RATE_BITMAP 0
118#define SIR_CONVERT_2_U32_BITMAP(nRates) ((nRates + 31)/32)
119
120/* #tANI_U32's needed for a bitmap representation for all prop rates */
121#define SIR_NUM_U32_MAP_RATES SIR_CONVERT_2_U32_BITMAP(SIR_NUM_PROP_RATES)
122
123
124#define SIR_PM_SLEEP_MODE 0
125#define SIR_PM_ACTIVE_MODE 1
126
127// Used by various modules to load ALL CFG's
128#define ANI_IGNORE_CFG_ID 0xFFFF
129
130//hidden SSID options
131#define SIR_SCAN_NO_HIDDEN_SSID 0
132#define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1
133#define SIR_SCAN_HIDDEN_SSID 2
134
135#define SIR_MAC_ADDR_LEN 6
136#define SIR_IPV4_ADDR_LEN 4
137
138typedef tANI_U8 tSirIpv4Addr[SIR_IPV4_ADDR_LEN];
139
140#define SIR_VERSION_STRING_LEN 64
141typedef tANI_U8 tSirVersionString[SIR_VERSION_STRING_LEN];
142
Yue Mab9c86f42013-08-14 15:59:08 -0700143/* Periodic Tx pattern offload feature */
144#define PERIODIC_TX_PTRN_MAX_SIZE 1536
145#define MAXNUM_PERIODIC_TX_PTRNS 6
146
Dino Mycle2c198072014-06-10 10:15:52 +0530147
148#ifdef WLAN_FEATURE_EXTSCAN
149
150#define WLAN_EXTSCAN_MAX_CHANNELS 16
151#define WLAN_EXTSCAN_MAX_BUCKETS 16
152#define WLAN_EXTSCAN_MAX_HOTLIST_APS 128
Dino Mycle2c198072014-06-10 10:15:52 +0530153#define WLAN_EXTSCAN_MAX_RSSI_SAMPLE_SIZE 8
154#endif /* WLAN_FEATURE_EXTSCAN */
155
Srinivas Dasarib8fdd422014-11-27 10:44:20 +0530156#define WLAN_DISA_MAX_PAYLOAD_SIZE 1600
157
Abhishek Singh02605092017-10-25 14:06:12 +0530158#define CHANNEL_SWITCH_BEACON_COUNT 5
159#define SAP_CHANNEL_SWITCH_MODE 1
160
Jeff Johnson295189b2012-06-20 16:38:30 -0700161enum eSirHostMsgTypes
162{
163 SIR_HAL_APP_SETUP_NTF = SIR_HAL_HOST_MSG_START,
164 SIR_HAL_INITIAL_CAL_FAILED_NTF,
165 SIR_HAL_NIC_OPER_NTF,
166 SIR_HAL_INIT_START_REQ,
167 SIR_HAL_SHUTDOWN_REQ,
168 SIR_HAL_SHUTDOWN_CNF,
169 SIR_HAL_RESET_REQ,
170 SIR_HAL_RADIO_ON_OFF_IND,
171 SIR_HAL_RESET_CNF,
172 SIR_WRITE_TO_TD,
173 SIR_HAL_HDD_ADDBA_REQ, // MAC -> HDD
174 SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
175 SIR_HAL_DELETEBA_IND, // MAC -> HDD
176 SIR_HAL_BA_FAIL_IND, // HDD -> MAC
177 SIR_TL_HAL_FLUSH_AC_REQ,
178 SIR_HAL_TL_FLUSH_AC_RSP
179};
180
181
182
183/**
184 * Module ID definitions.
185 */
186enum {
187 SIR_BOOT_MODULE_ID = 1,
188 SIR_HAL_MODULE_ID = 0x10,
Siddharth Bhal64246172015-02-27 01:04:37 +0530189 SIR_HAL_EXT_MODULE_ID = 0x11,
Leela Venkata Kiran Kumar Reddy Chirala45f184c2014-02-14 15:08:21 -0800190 SIR_CFG_MODULE_ID = 0x12,
Jeff Johnson295189b2012-06-20 16:38:30 -0700191 SIR_LIM_MODULE_ID,
192 SIR_ARQ_MODULE_ID,
193 SIR_SCH_MODULE_ID,
194 SIR_PMM_MODULE_ID,
195 SIR_MNT_MODULE_ID,
196 SIR_DBG_MODULE_ID,
197 SIR_DPH_MODULE_ID,
198 SIR_SYS_MODULE_ID,
199 SIR_SMS_MODULE_ID,
200
201 SIR_PHY_MODULE_ID = 0x20,
202
203
204 // Add any modules above this line
205 SIR_DVT_MODULE_ID
206};
207
208#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
209
210/**
211 * First and last module definition for logging utility
212 *
213 * NOTE: The following definitions need to be updated if
214 * the above list is changed.
215 */
216#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
217#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
218
219
220// Type declarations used by Firmware and Host software
221
222// Scan type enum used in scan request
223typedef enum eSirScanType
224{
225 eSIR_PASSIVE_SCAN,
226 eSIR_ACTIVE_SCAN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800227 eSIR_BEACON_TABLE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700228} tSirScanType;
229
Jeff Johnson295189b2012-06-20 16:38:30 -0700230typedef enum eSirResultCodes
231{
232 eSIR_SME_SUCCESS,
233
234 eSIR_EOF_SOF_EXCEPTION,
235 eSIR_BMU_EXCEPTION,
236 eSIR_LOW_PDU_EXCEPTION,
237 eSIR_USER_TRIG_RESET,
238 eSIR_LOGP_EXCEPTION,
239 eSIR_CP_EXCEPTION,
240 eSIR_STOP_BSS,
241 eSIR_AHB_HANG_EXCEPTION,
242 eSIR_DPU_EXCEPTION,
243 eSIR_RPE_EXCEPTION,
244 eSIR_TPE_EXCEPTION,
245 eSIR_DXE_EXCEPTION,
246 eSIR_RXP_EXCEPTION,
247 eSIR_MCPU_EXCEPTION,
248 eSIR_MCU_EXCEPTION,
249 eSIR_MTU_EXCEPTION,
250 eSIR_MIF_EXCEPTION,
251 eSIR_FW_EXCEPTION,
252 eSIR_PS_MUTEX_READ_EXCEPTION,
253 eSIR_PHY_HANG_EXCEPTION,
254 eSIR_MAILBOX_SANITY_CHK_FAILED,
255 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
256 eSIR_CFB_FLAG_STUCK_EXCEPTION,
257
258 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
259
260 eSIR_SME_INVALID_PARAMETERS=500,
261 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
262 eSIR_SME_RESOURCES_UNAVAILABLE,
263 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
264 // matching requested scan criteria
265 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
266 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
267 eSIR_SME_REFUSED,
c_hpothua9dc89c2014-03-22 19:22:31 +0530268 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700269 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
270 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
271 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
272 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
273 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
274 eSIR_SME_AUTH_REFUSED,
275 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
276 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
277 eSIR_SME_ASSOC_REFUSED,
278 eSIR_SME_REASSOC_REFUSED,
279 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
280 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
281 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
282 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
283 eSIR_SME_STA_NOT_AUTHENTICATED,
284 eSIR_SME_STA_NOT_ASSOCIATED,
285 eSIR_SME_STA_DISASSOCIATED,
286 eSIR_SME_ALREADY_JOINED_A_BSS,
287 eSIR_ULA_COMPLETED,
288 eSIR_ULA_FAILURE,
289 eSIR_SME_LINK_ESTABLISHED,
290 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
291 eSIR_SME_UNABLE_TO_PERFORM_DFS,
292 eSIR_SME_DFS_FAILED,
293 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
294 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
295 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
296 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
297 // support requested rate in
298 // LINK_TEST_REQ
299 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
300 // not respond before next test packet
301 // is sent
302 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
303 // of link test
304 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
305 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
306 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
307 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
308 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
309 // unable to plumb down keys
310 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
311
312 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
313 // that more SME_SCAN_RSP
314 // messages are following.
315 // SME_SCAN_RSP message with
316 // eSIR_SME_SUCCESS status
317 // code is the last one.
318 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
319 // messages upon receiving
320 // invalid Re/Assoc Rsp frame.
321 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
322 // with MIC_FAILURE reason code and perform the stop bss operation
323 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
324 // timeout interval
325 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
326 eSIR_SME_RECEIVED,
327 // TBA - TSPEC related Result Codes
328
329 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
330 eSIR_SME_INVALID_STA_ROLE,
331 eSIR_SME_INVALID_STATE,
332#ifdef GEN4_SCAN
333 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
334 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
335 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
336 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
337 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
338 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
339#else // GEN4_SCAN
340 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
341 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
342#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700343#ifdef FEATURE_OEM_DATA_SUPPORT
344 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
345#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700346 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
347 eSIR_SME_STA_ASSOCIATED,
348 eSIR_SME_INVALID_PMM_STATE,
349 eSIR_SME_CANNOT_ENTER_IMPS,
350 eSIR_SME_IMPS_REQ_FAILED,
351 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700352 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700353 eSIR_SME_UAPSD_REQ_FAILED,
Kanchanapally, Vidyullatha2ed7bde2014-12-29 12:18:36 +0530354 eSIR_SME_UAPSD_REQ_INVALID,
Jeff Johnson295189b2012-06-20 16:38:30 -0700355 eSIR_SME_WOWL_ENTER_REQ_FAILED,
356 eSIR_SME_WOWL_EXIT_REQ_FAILED,
357#if defined WLAN_FEATURE_VOWIFI_11R
358 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
359 eSIR_SME_FT_REASSOC_FAILURE,
360#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700361 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700362#ifdef WLAN_FEATURE_PACKET_FILTERING
363 eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
364#endif // WLAN_FEATURE_PACKET_FILTERING
365
366#ifdef WLAN_FEATURE_GTK_OFFLOAD
367 eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
368#endif // WLAN_FEATURE_GTK_OFFLOAD
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800369 eSIR_SME_DEAUTH_STATUS,
Jeff Johnson295189b2012-06-20 16:38:30 -0700370 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
371} tSirResultCodes;
372
Jeff Johnson295189b2012-06-20 16:38:30 -0700373/* each station added has a rate mode which specifies the sta attributes */
374typedef enum eStaRateMode {
375 eSTA_TAURUS = 0,
376 eSTA_TITAN,
377 eSTA_POLARIS,
378 eSTA_11b,
379 eSTA_11bg,
380 eSTA_11a,
381 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700382#ifdef WLAN_FEATURE_11AC
383 eSTA_11ac,
384#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700385 eSTA_INVALID_RATE_MODE
386} tStaRateMode, *tpStaRateMode;
387
388//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
389//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
390#define IERATE_BASICRATE_MASK 0x80
391#define IERATE_RATE_MASK 0x7f
392#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
393#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
394
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530395const char * lim_BssTypetoString(const v_U8_t bssType);
396const char * lim_ScanTypetoString(const v_U8_t scanType);
397const char * lim_BackgroundScanModetoString(const v_U8_t mode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700398typedef struct sSirSupportedRates {
399 /*
400 * For Self STA Entry: this represents Self Mode.
401 * For Peer Stations, this represents the mode of the peer.
402 * On Station:
403 * --this mode is updated when PE adds the Self Entry.
404 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
405 * ON AP:
406 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
407 * to indicate the self mode of the AP.
408 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
409 */
410
411 tStaRateMode opRateMode;
412 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
413 tANI_U16 llbRates[SIR_NUM_11B_RATES];
414 tANI_U16 llaRates[SIR_NUM_11A_RATES];
415 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
416
417 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
418 //First 26 bits are reserved for those Titan rates and
419 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
420 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
421
422 /*
423 * 0-76 bits used, remaining reserved
424 * bits 0-15 and 32 should be set.
425 */
426 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
427
428 /*
429 * RX Highest Supported Data Rate defines the highest data
430 * rate that the STA is able to receive, in unites of 1Mbps.
431 * This value is derived from "Supported MCS Set field" inside
432 * the HT capability element.
433 */
434 tANI_U16 rxHighestDataRate;
435
Jeff Johnsone7245742012-09-05 17:12:55 -0700436#ifdef WLAN_FEATURE_11AC
437 /*Indicates the Maximum MCS that can be received for each number
438 of spacial streams */
439 tANI_U16 vhtRxMCSMap;
440 /*Indicate the highest VHT data rate that the STA is able to receive*/
441 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700442 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700443 of spacial streams */
444 tANI_U16 vhtTxMCSMap;
445 /*Indicate the highest VHT data rate that the STA is able to transmit*/
446 tANI_U16 vhtTxHighestDataRate;
447#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700448} tSirSupportedRates, *tpSirSupportedRates;
449
450
451typedef enum eSirRFBand
452{
453 SIR_BAND_UNKNOWN,
454 SIR_BAND_2_4_GHZ,
455 SIR_BAND_5_GHZ,
456} tSirRFBand;
457
458
459/*
460* Specifies which beacons are to be indicated upto the host driver when
461* Station is in power save mode.
462*/
463typedef enum eBeaconForwarding
464{
465 ePM_BEACON_FWD_NTH,
466 ePM_BEACON_FWD_TIM,
467 ePM_BEACON_FWD_DTIM,
468 ePM_BEACON_FWD_NONE
469} tBeaconForwarding;
470
471
Jeff Johnson295189b2012-06-20 16:38:30 -0700472typedef struct sSirRemainOnChnReq
473{
474 tANI_U16 messageType;
475 tANI_U16 length;
476 tANI_U8 sessionId;
477 tSirMacAddr selfMacAddr;
478 tANI_U8 chnNum;
479 tANI_U8 phyMode;
480 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530481 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700482 tANI_U8 probeRspIe[1];
483}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
484
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530485/* Structure for vendor specific IE of debug marker frame
486 to debug remain on channel issues */
487typedef struct publicVendorSpecific
488{
489 tANI_U8 category;
490 tANI_U8 elementid;
491 tANI_U8 length;
492} publicVendorSpecific;
493
Jeff Johnson295189b2012-06-20 16:38:30 -0700494typedef struct sSirRegisterMgmtFrame
495{
496 tANI_U16 messageType;
497 tANI_U16 length;
498 tANI_U8 sessionId;
499 tANI_BOOLEAN registerFrame;
500 tANI_U16 frameType;
501 tANI_U16 matchLen;
502 tANI_U8 matchData[1];
503}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700504
505//
Jeff Johnson295189b2012-06-20 16:38:30 -0700506// Identifies the neighbor BSS' that was(were) detected
507// by an STA and reported to the AP
508//
509typedef struct sAniTitanCBNeighborInfo
510{
511 // A BSS was found on the Primary
512 tANI_U8 cbBssFoundPri;
513
514 // A BSS was found on the adjacent Upper Secondary
515 tANI_U8 cbBssFoundSecUp;
516
517 // A BSS was found on the adjacent Lower Secondary
518 tANI_U8 cbBssFoundSecDown;
519
520} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
521
Jeff Johnson295189b2012-06-20 16:38:30 -0700522/// Generic type for sending a response message
523/// with result code to host software
524typedef struct sSirSmeRsp
525{
526 tANI_U16 messageType; // eWNI_SME_*_RSP
527 tANI_U16 length;
528 tANI_U8 sessionId; // To support BT-AMP
529 tANI_U16 transactionId; // To support BT-AMP
530 tSirResultCodes statusCode;
531} tSirSmeRsp, *tpSirSmeRsp;
532
533/// Definition for kick starting Firmware on STA
534typedef struct sSirSmeStartReq
535{
536 tANI_U16 messageType; // eWNI_SME_START_REQ
537 tANI_U16 length;
538 tANI_U8 sessionId; //Added for BT-AMP Support
539 tANI_U16 transcationId; //Added for BT-AMP Support
540 tSirMacAddr bssId; //Added For BT-AMP Support
541 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700542 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700543} tSirSmeStartReq, *tpSirSmeStartReq;
544
545/// Definition for indicating all modules ready on STA
546typedef struct sSirSmeReadyReq
547{
548 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
549 tANI_U16 length;
550 tANI_U16 transactionId;
551} tSirSmeReadyReq, *tpSirSmeReadyReq;
552
553/// Definition for response message to previously issued start request
554typedef struct sSirSmeStartRsp
555{
556 tANI_U16 messageType; // eWNI_SME_START_RSP
557 tANI_U16 length;
558 tSirResultCodes statusCode;
559 tANI_U16 transactionId;
560} tSirSmeStartRsp, *tpSirSmeStartRsp;
561
Jeff Johnson295189b2012-06-20 16:38:30 -0700562
563/// Definition for Load structure
564typedef struct sSirLoad
565{
566 tANI_U16 numStas;
567 tANI_U16 channelUtilization;
568} tSirLoad, *tpSirLoad;
569
570/// BSS type enum used in while scanning/joining etc
571typedef enum eSirBssType
572{
573 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700574 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700575 eSIR_IBSS_MODE,
576 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
577 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
578 eSIR_AUTO_MODE,
579 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
580} tSirBssType;
581
582/// Definition for WDS Information
583typedef struct sSirWdsInfo
584{
585 tANI_U16 wdsLength;
586 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
587} tSirWdsInfo, *tpSirWdsInfo;
588
589/// Power Capability info used in 11H
590typedef struct sSirMacPowerCapInfo
591{
592 tANI_U8 minTxPower;
593 tANI_U8 maxTxPower;
594} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
595
596/// Supported Channel info used in 11H
597typedef struct sSirSupChnl
598{
599 tANI_U8 numChnl;
600 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
601} tSirSupChnl, *tpSirSupChnl;
602
603typedef enum eSirNwType
604{
605 eSIR_11A_NW_TYPE,
606 eSIR_11B_NW_TYPE,
607 eSIR_11G_NW_TYPE,
608 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700609#ifdef WLAN_FEATURE_11AC
610 eSIR_11AC_NW_TYPE,
611#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700612 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
613} tSirNwType;
614
615/// Definition for new iBss peer info
616typedef struct sSirNewIbssPeerInfo
617{
618 tSirMacAddr peerAddr;
619 tANI_U16 aid;
620} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
621
622/// Definition for Alternate BSS info
623typedef struct sSirAlternateRadioInfo
624{
625 tSirMacAddr bssId;
626 tANI_U8 channelId;
627} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
628
629/// Definition for Alternate BSS list
630typedef struct sSirAlternateRadioList
631{
632 tANI_U8 numBss;
633 tSirAlternateRadioInfo alternateRadio[1];
634} tSirAlternateRadioList, *tpSirAlternateRadioList;
635
636/// Definition for kick starting BSS
637/// ---> MAC
638/**
639 * Usage of ssId, numSSID & ssIdList:
640 * ---------------------------------
641 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
642 * feature is enabled.
643 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
644 * and interpret the SSID list from numSSID & ssIdList.
645 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
646 * specified in the ssId field and it is expected that
647 * application will set numSSID to one (only one SSID present
648 * in the list) and SSID in the list is same as ssId field.
649 * 4. Application will always set numSSID >= 1.
650 */
651//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
652typedef struct sSirSmeStartBssReq
653{
654 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
655 tANI_U16 length;
656 tANI_U8 sessionId; //Added for BT-AMP Support
657 tANI_U16 transactionId; //Added for BT-AMP Support
658 tSirMacAddr bssId; //Added for BT-AMP Support
659 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
660 tANI_U16 beaconInterval; //Added for BT-AMP Support
661 tANI_U8 dot11mode;
662 tSirBssType bssType;
663 tSirMacSSid ssId;
664 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700665 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700666
Jeff Johnson295189b2012-06-20 16:38:30 -0700667 tANI_U8 privacy;
668 tANI_U8 apUapsdEnable;
669 tANI_U8 ssidHidden;
670 tANI_BOOLEAN fwdWPSPBCProbeReq;
671 tANI_BOOLEAN protEnabled;
672 tANI_BOOLEAN obssProtEnabled;
673 tANI_U16 ht_capab;
674 tAniAuthType authType;
675 tANI_U32 dtimPeriod;
676 tANI_U8 wps_state;
krunal sonie9002db2013-11-25 14:24:17 -0800677 tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob
Jeff Johnson295189b2012-06-20 16:38:30 -0700678 tVOS_CON_MODE bssPersona;
679
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800680 tANI_U8 txLdpcIniFeatureEnabled;
681
Jeff Johnson295189b2012-06-20 16:38:30 -0700682 tSirRSNie rsnIE; // RSN IE to be sent in
683 // Beacon and Probe
684 // Response frames
685 tSirNwType nwType; // Indicates 11a/b/g
686 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
687 tSirMacRateSet extendedRateSet; // Has 11g rates
688
Chet Lanctot8cecea22014-02-11 19:09:36 -0800689#ifdef WLAN_FEATURE_11W
690 tANI_BOOLEAN pmfCapable;
691 tANI_BOOLEAN pmfRequired;
692#endif
693
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +0530694#ifdef WLAN_FEATURE_AP_HT40_24G
695 tANI_BOOLEAN apHT40_24GEnabled;
696#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700697} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
698
699#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
krunal soni2a6a9062014-02-11 14:14:23 -0800700 ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700701
702#define WSCIE_PROBE_RSP_LEN (317 + 2)
703
704typedef struct sSirBssDescription
705{
706 //offset of the ieFields from bssId.
707 tANI_U16 length;
708 tSirMacAddr bssId;
709 v_TIME_t scanSysTimeMsec;
710 tANI_U32 timeStamp[2];
711 tANI_U16 beaconInterval;
712 tANI_U16 capabilityInfo;
713 tSirNwType nwType; // Indicates 11a/b/g
714 tANI_U8 aniIndicator;
715 tANI_S8 rssi;
716 tANI_S8 sinr;
717 //channelId what peer sent in beacon/probersp.
718 tANI_U8 channelId;
719 //channelId on which we are parked at.
720 //used only in scan case.
721 tANI_U8 channelIdSelf;
722 tANI_U8 sSirBssDescriptionRsvd[3];
Deepthi Gowri2f435132016-05-18 19:30:17 +0530723 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 -0700724#if defined WLAN_FEATURE_VOWIFI
725 tANI_U32 parentTSF;
726 tANI_U32 startTSF[2];
727#endif
728#ifdef WLAN_FEATURE_VOWIFI_11R
729 tANI_U8 mdiePresent;
730 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
731#endif
Kapil Gupta04ab1992016-06-26 13:36:51 +0530732#if defined(FEATURE_WLAN_ESE) || defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
733 tANI_U8 QBSSLoad_present;
734 tANI_U8 QBSS_ChanLoad;
735 tANI_U16 QBSSLoad_avail;
Jeff Johnson295189b2012-06-20 16:38:30 -0700736#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700737
738 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700739 tANI_U8 reservedPadding1;
740 tANI_U8 reservedPadding2;
741 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700742 tANI_U32 WscIeLen;
743 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Kapil Gupta04ab1992016-06-26 13:36:51 +0530744 tANI_U8 HTCapsPresent;
745 tANI_U8 vhtCapsPresent;
746 tANI_U8 wmeInfoPresent;
747 tANI_U8 beacomformingCapable;
748 tANI_U8 chanWidth;
749 /* Please keep the structure 4 bytes aligned above the ieFields */
Jeff Johnson295189b2012-06-20 16:38:30 -0700750 tANI_U32 ieFields[1];
Kapil Gupta04ab1992016-06-26 13:36:51 +0530751
Jeff Johnson295189b2012-06-20 16:38:30 -0700752} tSirBssDescription, *tpSirBssDescription;
753
754/// Definition for response message to previously
755/// issued start BSS request
756/// MAC --->
757typedef struct sSirSmeStartBssRsp
758{
759 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
760 tANI_U16 length;
761 tANI_U8 sessionId;
762 tANI_U16 transactionId;//transaction ID for cmd
763 tSirResultCodes statusCode;
764 tSirBssType bssType;//Add new type for WDS mode
765 tANI_U16 beaconInterval;//Beacon Interval for both type
766 tANI_U32 staId;//Staion ID for Self
767 tSirBssDescription bssDescription;//Peer BSS description
768} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
769
Kapil Gupta3d923fb2016-12-20 18:59:27 +0530770#ifdef WLAN_FEATURE_APFIND
771struct hal_apfind_request
772{
773 tANI_U16 request_data_len;
774 tANI_U8 request_data[];
775};
776#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700777
778typedef struct sSirChannelList
779{
780 tANI_U8 numChannels;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800781 tANI_U8 channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700782} tSirChannelList, *tpSirChannelList;
783
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530784typedef struct sSirDFSChannelList
785{
Abhishek Singh6fcdf652016-11-23 10:59:12 +0530786 v_TIME_t timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530787
788} tSirDFSChannelList, *tpSirDFSChannelList;
789
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800790#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700791typedef struct sTspecInfo {
792 tANI_U8 valid;
793 tSirMacTspecIE tspec;
794} tTspecInfo;
795
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800796#define SIR_ESE_MAX_TSPEC_IES 4
797typedef struct sESETspecTspecInfo {
Jeff Johnson295189b2012-06-20 16:38:30 -0700798 tANI_U8 numTspecs;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800799 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
800} tESETspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700801#endif
802
Jeff Johnson295189b2012-06-20 16:38:30 -0700803
804/// Definition for Radar Info
805typedef struct sSirRadarInfo
806{
807 tANI_U8 channelNumber;
808 tANI_U16 radarPulseWidth; // in usecond
809 tANI_U16 numRadarPulse;
810} tSirRadarInfo, *tpSirRadarInfo;
811
812#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
813
814/// Two Background Scan mode
815typedef enum eSirBackgroundScanMode
816{
817 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700818 eSIR_NORMAL_BACKGROUND_SCAN = 1,
819 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700820} tSirBackgroundScanMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700821typedef enum eSirLinkTrafficCheck
822{
823 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700824 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
825 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700826} tSirLinkTrafficCheck;
827
828#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
829#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
830#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
831#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700832#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
833#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700834
835/// Definition for scan request
836typedef struct sSirSmeScanReq
837{
838 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
839 tANI_U16 length;
840 tANI_U8 sessionId; // Session ID
841 tANI_U16 transactionId; // Transaction ID for cmd
842 tSirMacAddr bssId;
843 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
844 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
845 tSirBssType bssType;
846 tANI_U8 dot11mode;
847 tSirScanType scanType;
848 /**
849 * minChannelTime. Not used if scanType is passive.
850 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
851 * 11k measurements set this to zero to user only single duration for scan.
852 * <valid timeout> - Timeout value used for min channel timeout.
853 */
854 tANI_U32 minChannelTime;
855 /**
856 * maxChannelTime.
857 * 0x0 - Invalid. In case of active scan.
858 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
859 *
860 */
861 tANI_U32 maxChannelTime;
862 /**
863 * returnAfterFirstMatch can take following values:
864 * 0x00 - Return SCAN_RSP message after complete channel scan
865 * 0x01 - Return SCAN_RSP message after collecting BSS description
866 * that matches scan criteria.
867 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
868 * 5 GHz band channels
869 * 0x80 - Return after collecting first 11d IE from 5 GHz band
870 * channels
871 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
872 * band channels
873 *
874 * Values of 0xC0, 0x80 & 0x40 are to be used by
875 * Roaming/application when 11d is enabled.
876 */
Abhishek Singh3a93ee42016-09-29 17:00:03 +0530877 tANI_U32 min_chntime_btc_esco; //in units of milliseconds
878 tANI_U32 max_chntime_btc_esco; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700879 tANI_U8 returnAfterFirstMatch;
880
881 /**
882 * returnUniqueResults can take following values:
883 * 0 - Collect & report all received BSS descriptions from same BSS.
884 * 1 - Collect & report unique BSS description from same BSS.
885 */
886 tANI_U8 returnUniqueResults;
887
888 /**
889 * returnFreshResults can take following values:
890 * 0x00 - Return background scan results.
891 * 0x80 - Return & purge background scan results
892 * 0x01 - Trigger fresh scan instead of returning background scan
893 * results.
894 * 0x81 - Trigger fresh scan instead of returning background scan
895 * results and purge background scan results.
896 */
897 tANI_U8 returnFreshResults;
898
899 /* backgroundScanMode can take following values:
900 * 0x0 - agressive scan
901 * 0x1 - normal scan where HAL will check for link traffic
902 * prior to proceeding with the scan
903 */
904 tSirBackgroundScanMode backgroundScanMode;
905
906 tANI_U8 hiddenSsid;
907
908 /* Number of SSIDs to scan */
909 tANI_U8 numSsid;
910
911 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
912 /* This MUST be the last field of the structure */
913
914
Jeff Johnson295189b2012-06-20 16:38:30 -0700915 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700916 tANI_U16 uIEFieldLen;
917 tANI_U16 uIEFieldOffset;
918
919 //channelList MUST be the last field of this structure
920 tSirChannelList channelList;
921 /*-----------------------------
922 tSirSmeScanReq....
923 -----------------------------
924 uIEFiledLen
925 -----------------------------
926 uIEFiledOffset ----+
927 ----------------------------- |
928 channelList.numChannels |
929 ----------------------------- |
930 ... variable size up to |
931 channelNumber[numChannels-1] |
932 This can be zero, if |
933 numChannel is zero. |
934 ----------------------------- <--+
935 ... variable size uIEFiled
936 up to uIEFieldLen (can be 0)
937 -----------------------------*/
938} tSirSmeScanReq, *tpSirSmeScanReq;
939
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530940typedef struct sSirSmeScanAbortReq
941{
942 tANI_U16 type;
943 tANI_U16 msgLen;
944 tANI_U8 sessionId;
945} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
946
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530947typedef struct sSirSmeScanChanReq
948{
949 tANI_U16 type;
950 tANI_U16 msgLen;
951 tANI_U8 sessionId;
952 tANI_U16 transcationId;
953} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
954
Jeff Johnsone7245742012-09-05 17:12:55 -0700955#ifdef FEATURE_OEM_DATA_SUPPORT
956
957#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800958#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700959#endif
960#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800961#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700962#endif
963
964typedef struct sSirOemDataReq
965{
966 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
Siddharth Bhal88aa5322014-06-19 14:27:15 +0530967 tANI_U16 messageLen;
Jeff Johnsone7245742012-09-05 17:12:55 -0700968 tSirMacAddr selfMacAddr;
969 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
970} tSirOemDataReq, *tpSirOemDataReq;
971
972typedef struct sSirOemDataRsp
973{
974 tANI_U16 messageType;
975 tANI_U16 length;
976 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
977} tSirOemDataRsp, *tpSirOemDataRsp;
978
979#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700980
981/// Definition for response message to previously issued scan request
982typedef struct sSirSmeScanRsp
983{
984 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
985 tANI_U16 length;
986 tANI_U8 sessionId;
987 tSirResultCodes statusCode;
988 tANI_U16 transcationId;
989 tSirBssDescription bssDescription[1];
990} tSirSmeScanRsp, *tpSirSmeScanRsp;
991
992/// Sme Req message to set the Background Scan mode
993typedef struct sSirSmeBackgroundScanModeReq
994{
995 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
996 tANI_U16 length;
997 tSirBackgroundScanMode mode;
998} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
999
1000/// Background Scan Statisics
1001typedef struct sSirBackgroundScanInfo {
1002 tANI_U32 numOfScanSuccess;
1003 tANI_U32 numOfScanFailure;
1004 tANI_U32 reserved;
1005} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
1006
1007#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
1008
1009/// Definition for Authentication request
1010typedef struct sSirSmeAuthReq
1011{
1012 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
1013 tANI_U16 length;
1014 tANI_U8 sessionId; // Session ID
1015 tANI_U16 transactionId; // Transaction ID for cmd
1016 tSirMacAddr bssId; // Self BSSID
1017 tSirMacAddr peerMacAddr;
1018 tAniAuthType authType;
1019 tANI_U8 channelNumber;
1020} tSirSmeAuthReq, *tpSirSmeAuthReq;
1021
1022/// Definition for reponse message to previously issued Auth request
1023typedef struct sSirSmeAuthRsp
1024{
1025 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
1026 tANI_U16 length;
1027 tANI_U8 sessionId; // Session ID
1028 tANI_U16 transactionId; // Transaction ID for cmd
1029 tSirMacAddr peerMacAddr;
1030 tAniAuthType authType;
1031 tSirResultCodes statusCode;
1032 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
1033 //Otherwise it holds status code.
1034} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
1035
Jeff Johnson295189b2012-06-20 16:38:30 -07001036
Jeff Johnson295189b2012-06-20 16:38:30 -07001037
Jeff Johnson295189b2012-06-20 16:38:30 -07001038/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
1039typedef struct sJoinReassocInfo
1040{
1041 tAniTitanCBNeighborInfo cbNeighbors;
1042 tAniBool spectrumMgtIndicator;
1043 tSirMacPowerCapInfo powerCap;
1044 tSirSupChnl supportedChannels;
1045} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001046
1047/// Definition for join request
1048/// ---> MAC
1049/// WARNING! If you add a field in JOIN REQ.
1050/// Make sure to add it in REASSOC REQ
1051/// The Serdes function is the same and its
1052/// shared with REASSOC. So if we add a field
1053// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1054typedef struct sSirSmeJoinReq
1055{
1056 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1057 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001058 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001059 tANI_U16 transactionId;
1060 tSirMacSSid ssId;
1061 tSirMacAddr selfMacAddr; // self Mac address
1062 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1063 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001064 tVOS_CON_MODE staPersona; //Persona
Sushant Kaushik74df8db2015-03-11 18:09:05 +05301065 tANI_BOOLEAN bOSENAssociation; //HS2.0
Abhishek Singheef5c992016-01-27 13:41:54 +05301066 tANI_BOOLEAN bWPSAssociation; //WPS
Jeff Johnsone7245742012-09-05 17:12:55 -07001067 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001068
1069 /*This contains the UAPSD Flag for all 4 AC
1070 * B0: AC_VO UAPSD FLAG
1071 * B1: AC_VI UAPSD FLAG
1072 * B2: AC_BK UAPSD FLAG
1073 * B3: AC_BE UASPD FLAG
1074 */
1075 tANI_U8 uapsdPerAcBitmask;
1076
Jeff Johnson295189b2012-06-20 16:38:30 -07001077 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1078 tSirMacRateSet extendedRateSet; // Has 11g rates
Masti, Narayanraddi67ea5912015-01-08 12:34:05 +05301079 tANI_U16 rateBitMap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001080 tSirRSNie rsnIE; // RSN IE to be sent in
1081 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001082#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001083 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1084 // the same. The join will never carry cckm, but will be set to
1085 // 0.
1086#endif
1087
1088 tSirAddie addIEScan; // Additional IE to be sent in
1089 // (unicast) Probe Request at the time of join
1090
1091 tSirAddie addIEAssoc; // Additional IE to be sent in
1092 // (Re) Association Request
1093
1094 tAniEdType UCEncryptionType;
1095
1096 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001097
1098#ifdef WLAN_FEATURE_11W
1099 tAniEdType MgmtEncryptionType;
1100#endif
1101
Jeff Johnson295189b2012-06-20 16:38:30 -07001102#ifdef WLAN_FEATURE_VOWIFI_11R
1103 tAniBool is11Rconnection;
1104#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001105#ifdef FEATURE_WLAN_ESE
1106 tAniBool isESEFeatureIniEnabled;
1107 tAniBool isESEconnection;
1108 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001109#endif
1110
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001111#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001112 tAniBool isFastTransitionEnabled;
1113#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001114#ifdef FEATURE_WLAN_LFR
1115 tAniBool isFastRoamIniFeatureEnabled;
1116#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001117
1118 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001119#ifdef WLAN_FEATURE_11AC
1120 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001121 tANI_U8 txBFCsnValue;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301122 tANI_U8 txMuBformee;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001123#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001124 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301125 tAniBool isWMEenabled;
1126 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001127 tAniTitanCBNeighborInfo cbNeighbors;
1128 tAniBool spectrumMgtIndicator;
1129 tSirMacPowerCapInfo powerCap;
1130 tSirSupChnl supportedChannels;
Abhishek Singhe3beee22017-07-31 15:35:40 +05301131 bool force_24ghz_in_ht20;
Jeff Johnson295189b2012-06-20 16:38:30 -07001132 tSirBssDescription bssDescription;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +05301133 /*
1134 * WARNING: Pls make bssDescription as last variable in struct
1135 * tSirSmeJoinReq as it has ieFields followed after this bss
1136 * description. Adding a variable after this corrupts the ieFields
1137 */
Jeff Johnson295189b2012-06-20 16:38:30 -07001138} tSirSmeJoinReq, *tpSirSmeJoinReq;
1139
1140/// Definition for reponse message to previously issued join request
1141/// MAC --->
1142typedef struct sSirSmeJoinRsp
1143{
1144 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1145 tANI_U16 length;
1146 tANI_U8 sessionId; // Session ID
1147 tANI_U16 transactionId; // Transaction ID for cmd
1148 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001149 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001150 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1151 //Otherwise it holds status code.
1152 tANI_U16 aid;
1153 tANI_U32 beaconLength;
1154 tANI_U32 assocReqLength;
1155 tANI_U32 assocRspLength;
1156#ifdef WLAN_FEATURE_VOWIFI_11R
1157 tANI_U32 parsedRicRspLen;
1158#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001159#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001160 tANI_U32 tspecIeLen;
1161#endif
1162 tANI_U32 staId;//Station ID for peer
1163
1164 /*The DPU signatures will be sent eventually to TL to help it determine the
1165 association to which a packet belongs to*/
1166 /*Unicast DPU signature*/
1167 tANI_U8 ucastSig;
1168
1169 /*Broadcast DPU signature*/
1170 tANI_U8 bcastSig;
1171
c_hpothu44ff4e02014-05-08 00:13:57 +05301172 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1173 tANI_U32 maxRateFlags;
1174
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +05301175 tDot11fIEHTCaps ht_caps;
1176 tDot11fIEVHTCaps vht_caps;
1177 tDot11fIEHTInfo ht_operation;
1178 tDot11fIEVHTOperation vht_operation;
1179 tDot11fIEhs20vendor_ie hs20vendor_ie;
1180
Jeff Johnson295189b2012-06-20 16:38:30 -07001181 tANI_U8 frames[ 1 ];
1182} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1183
1184/// Definition for Authentication indication from peer
1185typedef struct sSirSmeAuthInd
1186{
1187 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1188 tANI_U16 length;
1189 tANI_U8 sessionId;
1190 tSirMacAddr bssId; // Self BSSID
1191 tSirMacAddr peerMacAddr;
1192 tAniAuthType authType;
1193} tSirSmeAuthInd, *tpSirSmeAuthInd;
1194
1195/// probereq from peer, when wsc is enabled
1196typedef struct sSirSmeProbereq
1197{
1198 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1199 tANI_U16 length;
1200 tANI_U8 sessionId;
1201 tSirMacAddr peerMacAddr;
1202 tANI_U16 devicePasswdId;
1203} tSirSmeProbeReq, *tpSirSmeProbeReq;
1204
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +05301205typedef struct sSirSmeChanInfo
1206{
1207 /* channel id */
1208 tANI_U8 chan_id;
1209 /* channel info described below */
1210 tANI_U32 info;
1211}tSirSmeChanInfo, *tpSirSmeChanInfo;
1212
1213
Jeff Johnson295189b2012-06-20 16:38:30 -07001214/// Definition for Association indication from peer
1215/// MAC --->
1216typedef struct sSirSmeAssocInd
1217{
1218 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1219 tANI_U16 length;
1220 tANI_U8 sessionId;
1221 tSirMacAddr peerMacAddr;
1222 tANI_U16 aid;
1223 tSirMacAddr bssId; // Self BSSID
1224 tANI_U16 staId; // Station ID for peer
1225 tANI_U8 uniSig; // DPU signature for unicast packets
1226 tANI_U8 bcastSig; // DPU signature for broadcast packets
1227 tAniAuthType authType;
1228 tAniSSID ssId; // SSID used by STA to associate
1229 tSirRSNie rsnIE;// RSN IE received from peer
1230 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1231
Jeff Johnson295189b2012-06-20 16:38:30 -07001232 // powerCap & supportedChannels are present only when
1233 // spectrumMgtIndicator flag is set
1234 tAniBool spectrumMgtIndicator;
1235 tSirMacPowerCapInfo powerCap;
1236 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001237 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +05301238#ifdef WLAN_FEATURE_AP_HT40_24G
1239 tAniBool HT40MHzIntoEnabledSta; /* if present - STA Enable 40 MHz Intolerant */
1240#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001241 tAniBool reassocReq;
1242 // Required for indicating the frames to upper layer
1243 tANI_U32 beaconLength;
1244 tANI_U8* beaconPtr;
1245 tANI_U32 assocReqLength;
1246 tANI_U8* assocReqPtr;
Deepthi Gowriae6a1662015-10-12 12:59:37 +05301247 uint32_t rate_flags;
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +05301248 tSirSmeChanInfo chan_info;
1249 tSirMacHTChannelWidth ch_width;
1250 tDot11fIEHTCaps HTCaps;
1251 tDot11fIEVHTCaps VHTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -07001252} tSirSmeAssocInd, *tpSirSmeAssocInd;
1253
1254
1255/// Definition for Association confirm
1256/// ---> MAC
1257typedef struct sSirSmeAssocCnf
1258{
1259 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1260 tANI_U16 length;
1261 tSirResultCodes statusCode;
1262 tSirMacAddr bssId; // Self BSSID
1263 tSirMacAddr peerMacAddr;
1264 tANI_U16 aid;
1265 tSirMacAddr alternateBssId;
1266 tANI_U8 alternateChannelId;
1267} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1268
Jeff Johnson295189b2012-06-20 16:38:30 -07001269/// Definition for Reassociation indication from peer
1270typedef struct sSirSmeReassocInd
1271{
1272 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1273 tANI_U16 length;
1274 tANI_U8 sessionId; // Session ID
1275 tSirMacAddr peerMacAddr;
1276 tSirMacAddr oldMacAddr;
1277 tANI_U16 aid;
1278 tSirMacAddr bssId; // Self BSSID
1279 tANI_U16 staId; // Station ID for peer
1280 tAniAuthType authType;
1281 tAniSSID ssId; // SSID used by STA to reassociate
1282 tSirRSNie rsnIE; // RSN IE received from peer
1283
1284 tSirAddie addIE; // Additional IE received from peer
1285
Jeff Johnson295189b2012-06-20 16:38:30 -07001286 // powerCap & supportedChannels are present only when
1287 // spectrumMgtIndicator flag is set
1288 tAniBool spectrumMgtIndicator;
1289 tSirMacPowerCapInfo powerCap;
1290 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001291 // Required for indicating the frames to upper layer
1292 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1293 tANI_U32 beaconLength;
1294 tANI_U8* beaconPtr;
1295 tANI_U32 assocReqLength;
1296 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001297} tSirSmeReassocInd, *tpSirSmeReassocInd;
1298
1299/// Definition for Reassociation confirm
1300/// ---> MAC
1301typedef struct sSirSmeReassocCnf
1302{
1303 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1304 tANI_U16 length;
1305 tSirResultCodes statusCode;
1306 tSirMacAddr bssId; // Self BSSID
1307 tSirMacAddr peerMacAddr;
1308 tANI_U16 aid;
1309 tSirMacAddr alternateBssId;
1310 tANI_U8 alternateChannelId;
1311} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1312
Jeff Johnson295189b2012-06-20 16:38:30 -07001313
1314/// Enum definition for Wireless medium status change codes
1315typedef enum eSirSmeStatusChangeCode
1316{
1317 eSIR_SME_DEAUTH_FROM_PEER,
1318 eSIR_SME_DISASSOC_FROM_PEER,
1319 eSIR_SME_LOST_LINK_WITH_PEER,
1320 eSIR_SME_CHANNEL_SWITCH,
1321 eSIR_SME_JOINED_NEW_BSS,
1322 eSIR_SME_LEAVING_BSS,
1323 eSIR_SME_IBSS_ACTIVE,
1324 eSIR_SME_IBSS_INACTIVE,
1325 eSIR_SME_IBSS_PEER_DEPARTED,
1326 eSIR_SME_RADAR_DETECTED,
1327 eSIR_SME_IBSS_NEW_PEER,
1328 eSIR_SME_AP_CAPS_CHANGED,
1329 eSIR_SME_BACKGROUND_SCAN_FAIL,
1330 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1331 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1332} tSirSmeStatusChangeCode;
1333
1334typedef struct sSirSmeNewBssInfo
1335{
1336 tSirMacAddr bssId;
1337 tANI_U8 channelNumber;
1338 tANI_U8 reserved;
1339 tSirMacSSid ssId;
1340} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1341
1342typedef struct sSirSmeApNewCaps
1343{
1344 tANI_U16 capabilityInfo;
1345 tSirMacAddr bssId;
1346 tANI_U8 channelId;
1347 tANI_U8 reserved[3];
1348 tSirMacSSid ssId;
1349} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1350
1351/**
1352 * Table below indicates what information is passed for each of
1353 * the Wireless Media status change notifications:
1354 *
1355 * Status Change code Status change info
1356 * ----------------------------------------------------------------------
1357 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1358 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1359 * eSIR_SME_LOST_LINK_WITH_PEER None
1360 * eSIR_SME_CHANNEL_SWITCH New channel number
1361 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1362 * eSIR_SME_LEAVING_BSS None
1363 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1364 * IBSS apart from this STA that
1365 * started IBSS
1366 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1367 * in IBSS
1368 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1369 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1370 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1371 * that STA is currently associated with
1372 * have changed.
1373 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1374 */
1375
1376/// Definition for Wireless medium status change notification
1377typedef struct sSirSmeWmStatusChangeNtf
1378{
1379 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1380 tANI_U16 length;
1381 tANI_U8 sessionId; // Session ID
1382 tSirSmeStatusChangeCode statusChangeCode;
1383 tSirMacAddr bssId; // Self BSSID
1384 union
1385 {
1386 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1387 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1388 // none for eSIR_SME_LOST_LINK_WITH_PEER
1389 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1390 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1391 // none for eSIR_SME_LEAVING_BSS
1392 // none for eSIR_SME_IBSS_ACTIVE
1393 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001394 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1395 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1396 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1397 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001398 } statusChangeInfo;
1399} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1400
1401/// Definition for Disassociation request
1402typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001403__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001404struct sSirSmeDisassocReq
1405{
1406 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1407 tANI_U16 length;
1408 tANI_U8 sessionId; // Session ID
1409 tANI_U16 transactionId; // Transaction ID for cmd
1410 tSirMacAddr bssId; // Peer BSSID
1411 tSirMacAddr peerMacAddr;
1412 tANI_U16 reasonCode;
1413 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1414 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001415}
Jeff Johnson295189b2012-06-20 16:38:30 -07001416__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001417tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1418
1419/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001420typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1421{
1422 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1423 tANI_U16 length;
1424 tANI_U8 sessionId; // Session ID
1425 tANI_U16 transactionId; // Transaction ID for cmd
1426 tSirMacAddr bssId; // Peer BSSID
1427 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1428} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001429
1430typedef struct sAni64BitCounters
1431{
1432 tANI_U32 Hi;
1433 tANI_U32 Lo;
1434}tAni64BitCounters, *tpAni64BitCounters;
1435
1436typedef struct sAniSecurityStat
1437{
1438 tAni64BitCounters txBlks;
1439 tAni64BitCounters rxBlks;
1440 tAni64BitCounters formatErrorCnt;
1441 tAni64BitCounters decryptErr;
1442 tAni64BitCounters protExclCnt;
1443 tAni64BitCounters unDecryptableCnt;
1444 tAni64BitCounters decryptOkCnt;
1445
1446}tAniSecurityStat, *tpAniSecurityStat;
1447
1448typedef struct sAniTxRxCounters
1449{
1450 tANI_U32 txFrames; // Incremented for every packet tx
1451 tANI_U32 rxFrames;
1452 tANI_U32 nRcvBytes;
1453 tANI_U32 nXmitBytes;
1454}tAniTxRxCounters, *tpAniTxRxCounters;
1455
1456typedef struct sAniTxRxStats
1457{
1458 tAni64BitCounters txFrames;
1459 tAni64BitCounters rxFrames;
1460 tAni64BitCounters nRcvBytes;
1461 tAni64BitCounters nXmitBytes;
1462
1463}tAniTxRxStats,*tpAniTxRxStats;
1464
1465typedef struct sAniSecStats
1466{
1467 tAniSecurityStat aes;
1468 tAni64BitCounters aesReplays;
1469 tAniSecurityStat tkip;
1470 tAni64BitCounters tkipReplays;
1471 tAni64BitCounters tkipMicError;
1472
1473 tAniSecurityStat wep;
1474#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1475 tAniSecurityStat wpi;
1476 tAni64BitCounters wpiReplays;
1477 tAni64BitCounters wpiMicError;
1478#endif
1479}tAniSecStats, *tpAniSecStats;
1480
1481#define SIR_MAX_RX_CHAINS 3
1482
1483typedef struct sAniStaStatStruct
1484{
1485 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1486 * These are kept as it is, since WSM is using this structure.
1487 * These elements can be removed whenever WSM is updated.
1488 * Phystats is used to hold phystats from BD.
1489 */
1490 tANI_U32 sentAesBlksUcastHi;
1491 tANI_U32 sentAesBlksUcastLo;
1492 tANI_U32 recvAesBlksUcastHi;
1493 tANI_U32 recvAesBlksUcastLo;
1494 tANI_U32 aesFormatErrorUcastCnts;
1495 tANI_U32 aesReplaysUcast;
1496 tANI_U32 aesDecryptErrUcast;
1497 tANI_U32 singleRetryPkts;
1498 tANI_U32 failedTxPkts;
1499 tANI_U32 ackTimeouts;
1500 tANI_U32 multiRetryPkts;
1501 tANI_U32 fragTxCntsHi;
1502 tANI_U32 fragTxCntsLo;
1503 tANI_U32 transmittedPktsHi;
1504 tANI_U32 transmittedPktsLo;
1505 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1506 tANI_U32 phyStatLo; //This is only for private use.
1507
1508 tANI_U32 uplinkRssi;
1509 tANI_U32 uplinkSinr;
1510 tANI_U32 uplinkRate;
1511 tANI_U32 downlinkRssi;
1512 tANI_U32 downlinkSinr;
1513 tANI_U32 downlinkRate;
1514 tANI_U32 nRcvBytes;
1515 tANI_U32 nXmitBytes;
1516
1517 // titan 3c stats
1518 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1519 tANI_U32 chunksTxCntLo;
1520 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1521 tANI_U32 compPktRxCntLo;
1522 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1523 tANI_U32 expanPktRxCntLo;
1524
1525
1526 /* Following elements are valid and filled in correctly. They have valid values.
1527 */
1528
1529 //Unicast frames and bytes.
1530 tAniTxRxStats ucStats;
1531
1532 //Broadcast frames and bytes.
1533 tAniTxRxStats bcStats;
1534
1535 //Multicast frames and bytes.
1536 tAniTxRxStats mcStats;
1537
1538 tANI_U32 currentTxRate;
1539 tANI_U32 currentRxRate; //Rate in 100Kbps
1540
1541 tANI_U32 maxTxRate;
1542 tANI_U32 maxRxRate;
1543
1544 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1545
1546
1547 tAniSecStats securityStats;
1548
1549 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1550 tANI_U8 currentTxRateIdx;
1551
1552} tAniStaStatStruct, *tpAniStaStatStruct;
1553
1554//Statistics that are not maintained per stations.
1555typedef struct sAniGlobalStatStruct
1556{
1557 tAni64BitCounters txError;
1558 tAni64BitCounters rxError;
1559 tAni64BitCounters rxDropNoBuffer;
1560 tAni64BitCounters rxDropDup;
1561 tAni64BitCounters rxCRCError;
1562
1563 tAni64BitCounters singleRetryPkts;
1564 tAni64BitCounters failedTxPkts;
1565 tAni64BitCounters ackTimeouts;
1566 tAni64BitCounters multiRetryPkts;
1567 tAni64BitCounters fragTxCnts;
1568 tAni64BitCounters fragRxCnts;
1569
1570 tAni64BitCounters txRTSSuccess;
1571 tAni64BitCounters txCTSSuccess;
1572 tAni64BitCounters rxRTSSuccess;
1573 tAni64BitCounters rxCTSSuccess;
1574
1575 tAniSecStats securityStats;
1576
1577 tAniTxRxStats mcStats;
1578 tAniTxRxStats bcStats;
1579
1580}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1581
1582typedef enum sPacketType
1583{
1584 ePACKET_TYPE_UNKNOWN,
1585 ePACKET_TYPE_11A,
1586 ePACKET_TYPE_11G,
1587 ePACKET_TYPE_11B,
1588 ePACKET_TYPE_11N
1589
1590}tPacketType, *tpPacketType;
1591
1592typedef struct sAniStatSummaryStruct
1593{
1594 tAniTxRxStats uc; //Unicast counters.
1595 tAniTxRxStats bc; //Broadcast counters.
1596 tAniTxRxStats mc; //Multicast counters.
1597 tAni64BitCounters txError;
1598 tAni64BitCounters rxError;
1599 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1600 tANI_U32 rxRate; // Rx rate of the last received packet.
1601 tANI_U32 txRate;
1602 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1603 tANI_U16 txMCSId;
1604 tPacketType rxPacketType;
1605 tPacketType txPacketType;
1606 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1607}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1608
Jeff Johnson295189b2012-06-20 16:38:30 -07001609//structure for stats that may be reset, like the ones in sta descriptor
1610//The stats are saved into here before reset. It should be tANI_U32 aligned.
1611typedef struct _sPermStaStats
1612{
1613 //tANI_U32 sentAesBlksUcastHi;
1614 //tANI_U32 sentAesBlksUcastLo;
1615 //tANI_U32 recvAesBlksUcastHi;
1616 //tANI_U32 recvAesBlksUcastLo;
1617 tANI_U32 aesFormatErrorUcastCnts;
1618 tANI_U32 aesReplaysUcast;
1619 tANI_U32 aesDecryptErrUcast;
1620 tANI_U32 singleRetryPkts;
1621 tANI_U32 failedTxPkts;
1622 tANI_U32 ackTimeouts;
1623 tANI_U32 multiRetryPkts;
1624 tANI_U32 fragTxCntsHi;
1625 tANI_U32 fragTxCntsLo;
1626 tANI_U32 transmittedPktsHi;
1627 tANI_U32 transmittedPktsLo;
1628
1629 // titan 3c stats
1630 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1631 tANI_U32 chunksTxCntLo;
1632 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1633 tANI_U32 compPktRxCntLo;
1634 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1635 tANI_U32 expanPktRxCntLo;
1636}tPermanentStaStats;
1637
Jeff Johnson295189b2012-06-20 16:38:30 -07001638
1639
1640
1641/// Definition for Disassociation response
1642typedef struct sSirSmeDisassocRsp
1643{
1644 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1645 tANI_U16 length;
1646 tANI_U8 sessionId; // Session ID
1647 tANI_U16 transactionId; // Transaction ID for cmd
1648 tSirResultCodes statusCode;
1649 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001650 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001651 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001652}
Jeff Johnson295189b2012-06-20 16:38:30 -07001653__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001654 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1655
1656/// Definition for Disassociation indication from peer
1657typedef struct sSirSmeDisassocInd
1658{
1659 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1660 tANI_U16 length;
1661 tANI_U8 sessionId; // Session Identifier
1662 tANI_U16 transactionId; // Transaction Identifier with PE
1663 tSirResultCodes statusCode;
1664 tSirMacAddr bssId;
1665 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001666 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001667 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001668 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001669 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001670} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1671
1672/// Definition for Disassociation confirm
1673/// MAC --->
1674typedef struct sSirSmeDisassocCnf
1675{
1676 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1677 tANI_U16 length;
1678 tSirResultCodes statusCode;
1679 tSirMacAddr bssId;
1680 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001681 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001682} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1683
1684/// Definition for Deauthetication request
1685typedef struct sSirSmeDeauthReq
1686{
1687 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1688 tANI_U16 length;
1689 tANI_U8 sessionId; // Session ID
1690 tANI_U16 transactionId; // Transaction ID for cmd
1691 tSirMacAddr bssId; // AP BSSID
1692 tSirMacAddr peerMacAddr;
1693 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001694} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1695
1696/// Definition for Deauthetication response
1697typedef struct sSirSmeDeauthRsp
1698{
1699 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1700 tANI_U16 length;
1701 tANI_U8 sessionId; // Session ID
1702 tANI_U16 transactionId; // Transaction ID for cmd
1703 tSirResultCodes statusCode;
1704 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001705} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1706
1707/// Definition for Deauthetication indication from peer
1708typedef struct sSirSmeDeauthInd
1709{
1710 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1711 tANI_U16 length;
1712 tANI_U8 sessionId; //Added for BT-AMP
1713 tANI_U16 transactionId; //Added for BT-AMP
1714 tSirResultCodes statusCode;
1715 tSirMacAddr bssId;// AP BSSID
1716 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001717
Jeff Johnson295189b2012-06-20 16:38:30 -07001718 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001719 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001720 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001721} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1722
1723/// Definition for Deauthentication confirm
1724/// MAC --->
1725typedef struct sSirSmeDeauthCnf
1726{
1727 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1728 tANI_U16 length;
1729 tSirResultCodes statusCode;
1730 tSirMacAddr bssId; // AP BSSID
1731 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001732 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001733} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1734
Hanumantha Reddy Pothula1b6eb2f2015-11-30 20:50:23 +05301735typedef struct sSirSmeDisConDoneInd
1736{
1737 tANI_U16 messageType;
1738 tANI_U16 length;
1739 tANI_U8 sessionId;
1740 tSirResultCodes reasonCode;
1741 tSirMacAddr peerMacAddr;
1742}tSirSmeDisConDoneInd, *tpSirSmeDisConDoneInd;
1743
Jeff Johnson295189b2012-06-20 16:38:30 -07001744/// Definition for stop BSS request message
1745typedef struct sSirSmeStopBssReq
1746{
1747 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1748 tANI_U16 length;
1749 tANI_U8 sessionId; //Session ID
1750 tANI_U16 transactionId; //tranSaction ID for cmd
1751 tSirResultCodes reasonCode;
1752 tSirMacAddr bssId; //Self BSSID
1753} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1754
1755/// Definition for stop BSS response message
1756typedef struct sSirSmeStopBssRsp
1757{
1758 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1759 tANI_U16 length;
1760 tSirResultCodes statusCode;
1761 tANI_U8 sessionId; // Session ID
1762 tANI_U16 transactionId; // Transaction ID for cmd
1763} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1764
Jeff Johnson295189b2012-06-20 16:38:30 -07001765
1766
1767/// Definition for Channel Switch indication for station
1768/// MAC --->
1769typedef struct sSirSmeSwitchChannelInd
1770{
1771 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1772 tANI_U16 length;
1773 tANI_U8 sessionId;
1774 tANI_U16 newChannelId;
1775 tSirMacAddr bssId; // BSSID
1776} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1777
1778/// Definition for ULA complete indication message
1779typedef struct sirUlaCompleteInd
1780{
1781 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1782 tANI_U16 length;
1783 tSirResultCodes statusCode;
1784 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001785} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1786
1787/// Definition for ULA complete confirmation message
1788typedef struct sirUlaCompleteCnf
1789{
1790 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1791 tANI_U16 length;
1792 tSirResultCodes statusCode;
1793 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001794} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1795
1796/// Definition for Neighbor BSS indication
1797/// MAC --->
1798/// MAC reports this each time a new I/BSS is detected
1799typedef struct sSirSmeNeighborBssInd
1800{
1801 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1802 tANI_U16 length;
1803 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001804 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001805} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1806
1807/// Definition for MIC failure indication
1808/// MAC --->
1809/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1810typedef struct sSirSmeMicFailureInd
1811{
1812 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1813 tANI_U16 length;
1814 tANI_U8 sessionId;
1815 tSirMacAddr bssId; // BSSID
1816 tSirMicFailureInfo info;
1817} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1818
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05301819typedef struct sSirSmeLostLinkParamsInd
1820{
1821 tANI_U16 messageType;
1822 tANI_U16 length;
1823 tANI_U8 sessionId;
1824 tSirLostLinkParamsInfo info;
1825} tSirSmeLostLinkParamsInd, *tpSirSmeLostLinkParamsInd;
1826
1827
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001828typedef struct sSirSmeMissedBeaconInd
1829{
1830 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1831 tANI_U16 length;
1832 tANI_U8 bssIdx;
1833} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001834
1835/// Definition for Set Context request
1836/// ---> MAC
1837typedef struct sSirSmeSetContextReq
1838{
1839 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1840 tANI_U16 length;
1841 tANI_U8 sessionId; //Session ID
1842 tANI_U16 transactionId; //Transaction ID for cmd
1843 tSirMacAddr peerMacAddr;
1844 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001845 // TBD Following QOS fields to be uncommented
1846 //tAniBool qosInfoPresent;
1847 //tSirQos qos;
1848 tSirKeyMaterial keyMaterial;
1849} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1850
1851/// Definition for Set Context response
1852/// MAC --->
1853typedef struct sSirSmeSetContextRsp
1854{
1855 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1856 tANI_U16 length;
1857 tANI_U8 sessionId; // Session ID
1858 tANI_U16 transactionId; // Transaction ID for cmd
1859 tSirResultCodes statusCode;
1860 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001861} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1862
1863/// Definition for Remove Key Context request
1864/// ---> MAC
1865typedef struct sSirSmeRemoveKeyReq
1866{
1867 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1868 tANI_U16 length;
1869 tANI_U8 sessionId; // Session ID
1870 tANI_U16 transactionId; // Transaction ID for cmd
1871 tSirMacAddr bssId; // BSSID
1872 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001873 tANI_U8 edType;
1874 tANI_U8 wepType;
1875 tANI_U8 keyId;
1876 tANI_BOOLEAN unicast;
1877} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1878
1879/// Definition for Remove Key Context response
1880/// MAC --->
1881typedef struct sSirSmeRemoveKeyRsp
1882{
1883 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1884 tANI_U16 length;
1885 tANI_U8 sessionId; // Session ID
1886 tANI_U16 transactionId; // Transaction ID for cmd
1887 tSirResultCodes statusCode;
1888 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001889} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1890
1891/// Definition for Set Power request
1892/// ---> MAC
1893typedef struct sSirSmeSetPowerReq
1894{
1895 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1896 tANI_U16 length;
1897 tANI_U16 transactionId; // Transaction ID for cmd
1898 tANI_S8 powerLevel;
1899} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1900
1901/// Definition for Set Power response
1902/// MAC --->
1903typedef struct sSirSmeSetPowerRsp
1904{
1905 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1906 tANI_U16 length;
1907 tSirResultCodes statusCode;
1908 tANI_U16 transactionId; // Transaction ID for cmd
1909} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1910
Jeff Johnson295189b2012-06-20 16:38:30 -07001911
1912/// Definition for Link Test Start response
1913/// MAC --->
1914typedef struct sSirSmeLinkTestStartRsp
1915{
1916 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1917 tANI_U16 length;
1918 tSirMacAddr peerMacAddr;
1919 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001920} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1921
1922/// Definition for Link Test Stop response
1923/// WSM ---> MAC
1924typedef struct sSirSmeLinkTestStopRsp
1925{
1926 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1927 tANI_U16 length;
1928 tSirMacAddr peerMacAddr;
1929 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001930} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1931
1932/// Definition for kick starting DFS measurements
1933typedef struct sSirSmeDFSreq
1934{
1935 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1936 tANI_U16 length;
1937 tANI_U16 transactionId; // Transaction ID for cmd
1938} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1939
1940/// Definition for response message to previously
1941/// issued DFS request
1942typedef struct sSirSmeDFSrsp
1943{
1944 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1945 tANI_U16 length;
1946 tSirResultCodes statusCode;
1947 tANI_U16 transactionId; // Transaction ID for cmd
1948 tANI_U32 dfsReport[1];
1949} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1950
1951/// Statistic definitions
1952//=============================================================
1953// Per STA statistic structure; This same struct will be used for Aggregate
1954// STA stats as well.
1955
1956// Clear radio stats and clear per sta stats
1957typedef enum
1958{
1959 eANI_CLEAR_ALL_STATS, // Clears all stats
1960 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1961 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1962 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1963 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1964 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1965
1966 // Used to distinguish between per sta to security stats.
1967 // Used only by AP, FW just returns the same parameter as it received.
1968 eANI_LINK_STATS, // Get Per STA stats
1969 eANI_SECURITY_STATS, // Get Per STA security stats
1970
1971 eANI_CLEAR_STAT_TYPES_END
1972} tAniStatSubTypes;
1973
1974typedef struct sAniTxCtrs
1975{
1976 // add the rate counters here
1977 tANI_U32 tx1Mbps;
1978 tANI_U32 tx2Mbps;
1979 tANI_U32 tx5_5Mbps;
1980 tANI_U32 tx6Mbps;
1981 tANI_U32 tx9Mbps;
1982 tANI_U32 tx11Mbps;
1983 tANI_U32 tx12Mbps;
1984 tANI_U32 tx18Mbps;
1985 tANI_U32 tx24Mbps;
1986 tANI_U32 tx36Mbps;
1987 tANI_U32 tx48Mbps;
1988 tANI_U32 tx54Mbps;
1989 tANI_U32 tx72Mbps;
1990 tANI_U32 tx96Mbps;
1991 tANI_U32 tx108Mbps;
1992
1993 // tx path radio counts
1994 tANI_U32 txFragHi;
1995 tANI_U32 txFragLo;
1996 tANI_U32 txFrameHi;
1997 tANI_U32 txFrameLo;
1998 tANI_U32 txMulticastFrameHi;
1999 tANI_U32 txMulticastFrameLo;
2000 tANI_U32 txFailedHi;
2001 tANI_U32 txFailedLo;
2002 tANI_U32 multipleRetryHi;
2003 tANI_U32 multipleRetryLo;
2004 tANI_U32 singleRetryHi;
2005 tANI_U32 singleRetryLo;
2006 tANI_U32 ackFailureHi;
2007 tANI_U32 ackFailureLo;
2008 tANI_U32 xmitBeacons;
2009
2010 // titan 3c stats
2011 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
2012 tANI_U32 txCbEscPktCntLo;
2013 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
2014 tANI_U32 txChunksCntLo;
2015 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
2016 tANI_U32 txCompPktCntLo;
2017 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
2018 tANI_U32 tx50PerCompPktCntLo;
2019 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
2020 tANI_U32 txExpanPktCntLo;
2021} tAniTxCtrs, *tpAniTxCtrs;
2022
2023typedef struct sAniRxCtrs
2024{
2025 // receive frame rate counters
2026 tANI_U32 rx1Mbps;
2027 tANI_U32 rx2Mbps;
2028 tANI_U32 rx5_5Mbps;
2029 tANI_U32 rx6Mbps;
2030 tANI_U32 rx9Mbps;
2031 tANI_U32 rx11Mbps;
2032 tANI_U32 rx12Mbps;
2033 tANI_U32 rx18Mbps;
2034 tANI_U32 rx24Mbps;
2035 tANI_U32 rx36Mbps;
2036 tANI_U32 rx48Mbps;
2037 tANI_U32 rx54Mbps;
2038 tANI_U32 rx72Mbps;
2039 tANI_U32 rx96Mbps;
2040 tANI_U32 rx108Mbps;
2041
2042 // receive size counters; 'Lte' = Less than or equal to
2043 tANI_U32 rxLte64;
2044 tANI_U32 rxLte128Gt64;
2045 tANI_U32 rxLte256Gt128;
2046 tANI_U32 rxLte512Gt256;
2047 tANI_U32 rxLte1kGt512;
2048 tANI_U32 rxLte1518Gt1k;
2049 tANI_U32 rxLte2kGt1518;
2050 tANI_U32 rxLte4kGt2k;
2051
2052 // rx radio stats
2053 tANI_U32 rxFrag;
2054 tANI_U32 rxFrame;
2055 tANI_U32 fcsError;
2056 tANI_U32 rxMulticast;
2057 tANI_U32 duplicate;
2058 tANI_U32 rtsSuccess;
2059 tANI_U32 rtsFailed;
2060 tANI_U32 wepUndecryptables;
2061 tANI_U32 drops;
2062 tANI_U32 aesFormatErrorUcastCnts;
2063 tANI_U32 aesReplaysUcast;
2064 tANI_U32 aesDecryptErrUcast;
2065
2066 // titan 3c stats
2067 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
2068 tANI_U32 rxDecompPktCntLo;
2069 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
2070 tANI_U32 rxCompPktCntLo;
2071 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
2072 tANI_U32 rxExpanPktCntLo;
2073} tAniRxCtrs, *tpAniRxCtrs;
2074
2075// Radio stats
2076typedef struct sAniRadioStats
2077{
2078 tAniTxCtrs tx;
2079 tAniRxCtrs rx;
2080} tAniRadioStats, *tpAniRadioStats;
2081
2082// Get Radio Stats request structure
2083// This structure shall be used for both Radio stats and Aggregate stats
2084// A valid request must contain entire structure with/without valid fields.
2085// Based on the request type, the valid fields will be checked.
2086typedef struct sAniGetStatsReq
2087{
2088 // Common for all types are requests
2089 tANI_U16 msgType; // message type is same as the request type
2090 tANI_U16 msgLen; // length of the entire request
2091 tANI_U8 sessionId; //Session ID
2092 tANI_U16 transactionId;
2093 tSirMacAddr bssId; //BSSID
2094 // only used for clear stats and per sta stats clear
2095 tAniStatSubTypes stat; // Clears the stats of the described types.
2096 tANI_U32 staId; // Per STA stats request must contain valid
2097 // values
2098 tANI_U8 macAddr[6];
2099} tAniGetStatsReq, *tpAniGetStatsReq;
2100
2101// Get Radio Stats response struct
2102typedef struct sAniGetRadioStatsRsp
2103{
2104 tANI_U16 type; // message type is same as the request type
2105 tANI_U16 msgLen; // length of the entire request
2106 tANI_U32 rc;
2107 tANI_U16 transactionId;
2108 tAniRadioStats radio;
2109} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2110
2111// Per Sta stats response struct
2112typedef struct sAniGetPerStaStatsRsp
2113{
2114 tANI_U16 type; // message type is same as the request type
2115 tANI_U16 msgLen; // length of the entire request
2116 tANI_U32 rc;
2117 tANI_U16 transactionId;
2118 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2119 tAniStaStatStruct sta;
2120 tANI_U32 staId;
2121 tANI_U8 macAddr[6];
2122} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2123
2124// Get Aggregate stats
2125typedef struct sAniGetAggrStaStatsRsp
2126{
2127 tANI_U16 type; // message type is same as the request type
2128 tANI_U16 msgLen; // length of the entire request
2129 tANI_U32 rc;
2130 tANI_U16 transactionId;
2131 tAniStaStatStruct sta;
2132} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2133
2134// Clear stats request and response structure. 'rc' field is unused in
2135// request and this field is used in response field.
2136typedef struct sAniClearStatsRsp
2137{
2138 tANI_U16 type; // message type is same as the request type
2139 tANI_U16 msgLen; // length of the entire request
2140 tANI_U32 rc; // return code - will be filled by FW on
2141 // response.
2142 // Same transaction ID will be returned by the FW
2143 tANI_U16 transactionId;
2144 tAniStatSubTypes stat; // Clears the stats of the described types.
2145 tANI_U32 staId; // Applicable only to PER STA stats clearing
2146 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2147} tAniClearStatsRsp, *tpAniClearStatsRsp;
2148
2149typedef struct sAniGetGlobalStatsRsp
2150{
2151 tANI_U16 type; // message type is same as the request type
2152 tANI_U16 msgLen; // length of the entire request
2153 tANI_U32 rc;
2154 tANI_U16 transactionId;
2155 tAniGlobalStatStruct global;
2156} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2157
2158typedef struct sAniGetStatSummaryRsp
2159{
2160 tANI_U16 type; // message type is same as the request type
2161 tANI_U16 msgLen; // length of the entire request --Why?
2162 tANI_U32 rc;
2163 tANI_U16 transactionId;
2164 tAniStatSummaryStruct stat;
2165} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2166
2167//***************************************************************
2168
2169
2170/*******************PE Statistics*************************/
2171typedef enum
2172{
2173 PE_SUMMARY_STATS_INFO = 0x00000001,
2174 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2175 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2176 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2177 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
Sushant Kaushik33200572015-08-05 16:46:20 +05302178 PE_PER_STA_STATS_INFO = 0x00000020,
2179 PE_PER_TX_PKT_STATS_INFO = 0x00000040,
Jeff Johnson295189b2012-06-20 16:38:30 -07002180}ePEStatsMask;
2181
2182/*
2183 * tpAniGetPEStatsReq is tied to
2184 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2185 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2186 */
2187typedef struct sAniGetPEStatsReq
2188{
2189 // Common for all types are requests
2190 tANI_U16 msgType; // message type is same as the request type
2191 tANI_U16 msgLen; // length of the entire request
2192 tANI_U32 staId; // Per STA stats request must contain valid
2193 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2194} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2195
2196/*
2197 * tpAniGetPEStatsRsp is tied to
2198 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2199 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2200 */
2201typedef struct sAniGetPEStatsRsp
2202{
2203 // Common for all types are responses
2204 tANI_U16 msgType; // message type is same as the request type
2205 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2206 tANI_U8 sessionId;
2207 tANI_U32 rc; //success/failure
2208 tANI_U32 staId; // Per STA stats request must contain valid
2209 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2210/**********************************************************************************************
2211 //void *pStatsBuf;
2212 The Stats buffer starts here and can be an aggregate of more than one statistics
2213 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2214 intentionally and the src code that uses this structure should take that into account.
2215**********************************************************************************************/
2216} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2217
2218typedef struct sAniGetRssiReq
2219{
2220 // Common for all types are requests
2221 tANI_U16 msgType; // message type is same as the request type
2222 tANI_U16 msgLen; // length of the entire request
2223 tANI_U8 sessionId;
2224 tANI_U8 staId;
2225 void *rssiCallback;
2226 void *pDevContext; //device context
2227 void *pVosContext; //voss context
2228
2229} tAniGetRssiReq, *tpAniGetRssiReq;
2230
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302231typedef struct sAniGetSnrReq
2232{
2233 // Common for all types are requests
2234 tANI_U16 msgType; // message type is same as the request type
2235 tANI_U16 msgLen; // length of the entire request
2236 tANI_U8 sessionId;
2237 tANI_U8 staId;
2238 void *snrCallback;
2239 void *pDevContext; //device context
2240} tAniGetSnrReq, *tpAniGetSnrReq;
2241
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002242#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002243typedef struct sAniGetRoamRssiRsp
2244{
2245 // Common for all types are responses
2246 tANI_U16 msgType; // message type is same as the request type
2247 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2248 tANI_U8 sessionId;
2249 tANI_U32 rc; //success/failure
2250 tANI_U32 staId; // Per STA stats request must contain valid
2251 tANI_S8 rssi;
2252 void *rssiReq; //rssi request backup
2253
2254} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2255
2256#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002257
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002258#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002259
2260typedef struct sSirTsmIE
2261{
2262 tANI_U8 tsid;
2263 tANI_U8 state;
2264 tANI_U16 msmt_interval;
2265} tSirTsmIE, *tpSirTsmIE;
2266
2267typedef struct sSirSmeTsmIEInd
2268{
2269 tSirTsmIE tsmIe;
2270 tANI_U8 sessionId;
2271} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2272
2273
2274typedef struct sAniTrafStrmMetrics
2275{
2276 tANI_U16 UplinkPktQueueDly;
2277 tANI_U16 UplinkPktQueueDlyHist[4];
2278 tANI_U32 UplinkPktTxDly;
2279 tANI_U16 UplinkPktLoss;
2280 tANI_U16 UplinkPktCount;
2281 tANI_U8 RoamingCount;
2282 tANI_U16 RoamingDly;
2283} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2284
2285typedef struct sAniGetTsmStatsReq
2286{
2287 // Common for all types are requests
2288 tANI_U16 msgType; // message type is same as the request type
2289 tANI_U16 msgLen; // length of the entire request
2290 tANI_U8 staId;
2291 tANI_U8 tid; // traffic id
2292 tSirMacAddr bssId;
2293 void *tsmStatsCallback;
2294 void *pDevContext; //device context
2295 void *pVosContext; //voss context
2296} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2297
2298typedef struct sAniGetTsmStatsRsp
2299{
2300 // Common for all types are responses
2301 tANI_U16 msgType; // message type is same as the request type
2302 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2303 tANI_U8 sessionId;
2304 tANI_U32 rc; //success/failure
2305 tANI_U32 staId; // Per STA stats request must contain valid
2306 tAniTrafStrmMetrics tsmMetrics;
2307 void *tsmStatsReq; //tsm stats request backup
2308} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002309
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002310typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002311{
2312 tBcnReportFields bcnReportFields;
2313 tANI_U8 ieLen;
2314 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002315} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002316
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002317typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002318{
2319 tANI_U16 measurementToken;
2320 tANI_U8 flag; /* Flag to report measurement done and more data */
2321 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002322 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2323} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002324
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002325#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002326
Jeff Johnson295189b2012-06-20 16:38:30 -07002327/* Change country code request MSG structure */
2328typedef struct sAniChangeCountryCodeReq
2329{
2330 // Common for all types are requests
2331 tANI_U16 msgType; // message type is same as the request type
2332 tANI_U16 msgLen; // length of the entire request
2333 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302334 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302335 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002336 void *changeCCCallback;
2337 void *pDevContext; //device context
2338 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002339
Jeff Johnson295189b2012-06-20 16:38:30 -07002340} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2341
Amar Singhal0d15bd52013-10-12 23:13:13 -07002342/* generic country code change request MSG structure */
2343typedef struct sAniGenericChangeCountryCodeReq
2344{
2345 // Common for all types are requests
2346 tANI_U16 msgType; // message type is same as the request type
2347 tANI_U16 msgLen; // length of the entire request
2348 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2349 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002350} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2351
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302352typedef struct sAniDHCPStopInd
2353{
2354 tANI_U16 msgType; // message type is same as the request type
2355 tANI_U16 msgLen; // length of the entire request
2356 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2357 tSirMacAddr macAddr;
2358
2359} tAniDHCPInd, *tpAniDHCPInd;
2360
Abhishek Singh00b71972016-01-07 10:51:04 +05302361#ifdef WLAN_FEATURE_RMC
2362typedef struct sAniTXFailMonitorInd
2363{
2364 tANI_U16 msgType; // message type is same as the request type
2365 tANI_U16 msgLen; // length of the entire request
2366 tANI_U8 tx_fail_count;
2367 void *txFailIndCallback;
2368} tAniTXFailMonitorInd, *tpAniTXFailMonitorInd;
2369#endif /* WLAN_FEATURE_RMC */
2370
Jeff Johnson295189b2012-06-20 16:38:30 -07002371typedef struct sAniSummaryStatsInfo
2372{
2373 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2374 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2375 // station successfully transmitted after more than one retransmission attempt
2376
2377 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2378 //(with and without retries, including multi-cast, broadcast)
2379 //tANI_U32 tx_fail_cnt;
2380 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2381 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2382 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2383 //(after appropriate filter rules including multi-cast, broadcast)
2384 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2385 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2386 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2387 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2388 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2389 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2390 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2391 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2392 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2393 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2394 //to provide this.
2395#if 0
2396 //providing the following stats, in case of wrap around for tx_byte_cnt
2397 tANI_U32 tx_unicast_lower_byte_cnt;
2398 tANI_U32 tx_unicast_upper_byte_cnt;
2399 tANI_U32 tx_multicast_lower_byte_cnt;
2400 tANI_U32 tx_multicast_upper_byte_cnt;
2401 tANI_U32 tx_broadcast_lower_byte_cnt;
2402 tANI_U32 tx_broadcast_upper_byte_cnt;
2403#endif
2404
2405}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2406
2407typedef enum eTxRateInfo
2408{
2409 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2410 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2411 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2412 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002413 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2414 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2415 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2416 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002417} tTxrateinfoflags;
2418
2419typedef struct sAniGlobalClassAStatsInfo
2420{
2421 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2422 //or MMPDU frames
2423 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2424 //or MMPDU frames when a promiscuous packet filter was enabled
2425 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2426 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2427 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2428 //to a supported rate and the order shall be the same as the supporteRates parameter.
2429 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2430 //for eg: if it is 10.5dBm, the value would be 105
2431 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2432 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2433 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2434 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2435 //500 kbit/sec, for the most
2436 //recently transmitted frame
2437 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2438 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2439 //HT40 rates; short and long guard interval
2440
2441}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2442
2443
2444typedef struct sAniGlobalSecurityStats
2445{
2446 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2447 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2448 //is enabled
2449 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2450 //because of MIC failures
2451 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2452 //because of a TKIP ICV error
2453 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2454 //invalid AES-CCMP format
2455 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2456 //the AES-CCMP replay protection procedure
2457 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2458 //errors detected by the AES-CCMP decryption algorithm
2459 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2460 //not available on the 802.11 station
2461 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2462 //because of a WEP ICV error
2463 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2464 //decrypted
2465 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2466
2467}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2468
2469typedef struct sAniGlobalClassBStatsInfo
2470{
2471 tAniGlobalSecurityStats ucStats;
2472 tAniGlobalSecurityStats mcbcStats;
2473}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2474
2475typedef struct sAniGlobalClassCStatsInfo
2476{
2477 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2478 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2479 //address 1 field
2480 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2481 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2482 //primary channel
2483 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2484 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2485 //when an A-MPDU is received
2486 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2487 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2488 //decoded correctly
2489
2490}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2491
2492typedef struct sAniPerStaStatsInfo
2493{
2494 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2495 //through a received 802.11 ACK frame
2496 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2497 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2498 //is transmitted
2499
2500}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2501
Sushant Kaushik33200572015-08-05 16:46:20 +05302502typedef struct sAniPerTxPktStatsInfo
2503{
2504 tANI_U32 lastTxRate; // 802.11 data rate at which the last data frame is transmitted.
Sushant Kaushik3d5c1e62015-10-07 12:05:33 +05302505 tANI_U32 txAvgRetry; // Average number of retries per 10 packets.
Sushant Kaushik33200572015-08-05 16:46:20 +05302506}tAniPerTxPktStatsInfo, *tpAniPerTxPktStatsInfo;
2507
2508
Jeff Johnson295189b2012-06-20 16:38:30 -07002509/**********************PE Statistics end*************************/
2510
2511
2512
2513typedef struct sSirRSSIThresholds
2514{
2515#ifdef ANI_BIG_BYTE_ENDIAN
2516 tANI_S8 ucRssiThreshold1 : 8;
2517 tANI_S8 ucRssiThreshold2 : 8;
2518 tANI_S8 ucRssiThreshold3 : 8;
2519 tANI_U8 bRssiThres1PosNotify : 1;
2520 tANI_U8 bRssiThres1NegNotify : 1;
2521 tANI_U8 bRssiThres2PosNotify : 1;
2522 tANI_U8 bRssiThres2NegNotify : 1;
2523 tANI_U8 bRssiThres3PosNotify : 1;
2524 tANI_U8 bRssiThres3NegNotify : 1;
2525 tANI_U8 bReserved10 : 2;
2526#else
2527 tANI_U8 bReserved10 : 2;
2528 tANI_U8 bRssiThres3NegNotify : 1;
2529 tANI_U8 bRssiThres3PosNotify : 1;
2530 tANI_U8 bRssiThres2NegNotify : 1;
2531 tANI_U8 bRssiThres2PosNotify : 1;
2532 tANI_U8 bRssiThres1NegNotify : 1;
2533 tANI_U8 bRssiThres1PosNotify : 1;
2534 tANI_S8 ucRssiThreshold3 : 8;
2535 tANI_S8 ucRssiThreshold2 : 8;
2536 tANI_S8 ucRssiThreshold1 : 8;
2537#endif
2538
2539}tSirRSSIThresholds, *tpSirRSSIThresholds;
2540
2541typedef struct sSirRSSINotification
2542{
2543#ifdef ANI_BIG_BYTE_ENDIAN
2544 tANI_U32 bRssiThres1PosCross : 1;
2545 tANI_U32 bRssiThres1NegCross : 1;
2546 tANI_U32 bRssiThres2PosCross : 1;
2547 tANI_U32 bRssiThres2NegCross : 1;
2548 tANI_U32 bRssiThres3PosCross : 1;
2549 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002550 v_S7_t avgRssi : 8;
2551 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002552#else
Srinivasdaaec712012-12-12 15:59:44 -08002553 tANI_U32 bReserved : 18;
2554 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002555 tANI_U32 bRssiThres3NegCross : 1;
2556 tANI_U32 bRssiThres3PosCross : 1;
2557 tANI_U32 bRssiThres2NegCross : 1;
2558 tANI_U32 bRssiThres2PosCross : 1;
2559 tANI_U32 bRssiThres1NegCross : 1;
2560 tANI_U32 bRssiThres1PosCross : 1;
2561#endif
2562
2563}tSirRSSINotification, *tpSirRSSINotification;
2564
Viral Modid86bde22012-12-10 13:09:21 -08002565
2566typedef struct sSirP2PNoaStart
2567{
2568 tANI_U32 status;
2569 tANI_U32 bssIdx;
2570} tSirP2PNoaStart, *tpSirP2PNoaStart;
2571
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302572typedef struct sSirTdlsInd
2573{
2574 tANI_U16 status;
2575 tANI_U16 assocId;
2576 tANI_U16 staIdx;
2577 tANI_U16 reasonCode;
2578} tSirTdlsInd, *tpSirTdlsInd;
2579
Jeff Johnson295189b2012-06-20 16:38:30 -07002580typedef struct sSirP2PNoaAttr
2581{
2582#ifdef ANI_BIG_BYTE_ENDIAN
2583 tANI_U32 index :8;
2584 tANI_U32 oppPsFlag :1;
2585 tANI_U32 ctWin :7;
2586 tANI_U32 rsvd1: 16;
2587#else
2588 tANI_U32 rsvd1: 16;
2589 tANI_U32 ctWin :7;
2590 tANI_U32 oppPsFlag :1;
2591 tANI_U32 index :8;
2592#endif
2593
2594#ifdef ANI_BIG_BYTE_ENDIAN
2595 tANI_U32 uNoa1IntervalCnt:8;
2596 tANI_U32 rsvd2:24;
2597#else
2598 tANI_U32 rsvd2:24;
2599 tANI_U32 uNoa1IntervalCnt:8;
2600#endif
2601 tANI_U32 uNoa1Duration;
2602 tANI_U32 uNoa1Interval;
2603 tANI_U32 uNoa1StartTime;
2604
2605#ifdef ANI_BIG_BYTE_ENDIAN
2606 tANI_U32 uNoa2IntervalCnt:8;
2607 tANI_U32 rsvd3:24;
2608#else
2609 tANI_U32 rsvd3:24;
2610 tANI_U32 uNoa2IntervalCnt:8;
2611#endif
2612 tANI_U32 uNoa2Duration;
2613 tANI_U32 uNoa2Interval;
2614 tANI_U32 uNoa2StartTime;
2615} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002616
2617typedef __ani_attr_pre_packed struct sSirTclasInfo
2618{
2619 tSirMacTclasIE tclas;
2620 tANI_U8 version; // applies only for classifier type ip
2621 __ani_attr_pre_packed union {
2622 tSirMacTclasParamEthernet eth;
2623 tSirMacTclasParamIPv4 ipv4;
2624 tSirMacTclasParamIPv6 ipv6;
2625 tSirMacTclasParam8021dq t8021dq;
2626 }__ani_attr_packed tclasParams;
2627} __ani_attr_packed tSirTclasInfo;
2628
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002629
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002630#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002631#define TSRS_11AG_RATE_6MBPS 0xC
2632#define TSRS_11B_RATE_5_5MBPS 0xB
2633
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002634typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002635{
2636 tANI_U8 tsid;
2637 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002638} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002639
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002640typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002641{
2642 tANI_U8 tsid;
2643 tANI_U8 state;
2644 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002645} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002646
2647typedef struct sTSMStats
2648{
2649 tANI_U8 tid;
2650 tSirMacAddr bssId;
2651 tTrafStrmMetrics tsmMetrics;
2652} tTSMStats, *tpTSMStats;
2653
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002654typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002655{
2656 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002657 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002658 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002659} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002660
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002661typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002662{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002663#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2664 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002665#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002666 tEseTSMContext tsm;
2667} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002668
2669
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002670#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002671
2672
Jeff Johnson295189b2012-06-20 16:38:30 -07002673typedef struct sSirAddtsReqInfo
2674{
2675 tANI_U8 dialogToken;
2676 tSirMacTspecIE tspec;
2677
2678 tANI_U8 numTclas; // number of Tclas elements
2679 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2680 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002681#if defined(FEATURE_WLAN_ESE)
2682 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002683 tANI_U8 tsrsPresent:1;
2684#endif
2685 tANI_U8 wmeTspecPresent:1;
2686 tANI_U8 wsmTspecPresent:1;
2687 tANI_U8 lleTspecPresent:1;
2688 tANI_U8 tclasProcPresent:1;
2689} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2690
2691typedef struct sSirAddtsRspInfo
2692{
2693 tANI_U8 dialogToken;
2694 tSirMacStatusCodes status;
2695 tSirMacTsDelayIE delay;
2696
2697 tSirMacTspecIE tspec;
2698 tANI_U8 numTclas; // number of Tclas elements
2699 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2700 tANI_U8 tclasProc;
2701 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002702#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2703 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002704 tANI_U8 tsmPresent:1;
2705#endif
2706 tANI_U8 wmeTspecPresent:1;
2707 tANI_U8 wsmTspecPresent:1;
2708 tANI_U8 lleTspecPresent:1;
2709 tANI_U8 tclasProcPresent:1;
2710 tANI_U8 schedulePresent:1;
2711} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2712
2713typedef struct sSirDeltsReqInfo
2714{
2715 tSirMacTSInfo tsinfo;
2716 tSirMacTspecIE tspec;
2717 tANI_U8 wmeTspecPresent:1;
2718 tANI_U8 wsmTspecPresent:1;
2719 tANI_U8 lleTspecPresent:1;
2720} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2721
2722/// Add a tspec as defined
2723typedef struct sSirAddtsReq
2724{
2725 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2726 tANI_U16 length;
2727 tANI_U8 sessionId; //Session ID
2728 tANI_U16 transactionId;
2729 tSirMacAddr bssId; //BSSID
2730 tANI_U32 timeout; // in ms
2731 tANI_U8 rspReqd;
2732 tSirAddtsReqInfo req;
2733} tSirAddtsReq, *tpSirAddtsReq;
2734
2735typedef struct sSirAddtsRsp
2736{
2737 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2738 tANI_U16 length;
2739 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2740 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2741 tANI_U32 rc; // return code
2742 tSirAddtsRspInfo rsp;
2743} tSirAddtsRsp, *tpSirAddtsRsp;
2744
2745typedef struct sSirDeltsReq
2746{
2747 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2748 tANI_U16 length;
2749 tANI_U8 sessionId;//Session ID
2750 tANI_U16 transactionId;
2751 tSirMacAddr bssId; //BSSID
2752 tANI_U16 aid; // use 0 if macAddr is being specified
2753 tANI_U8 macAddr[6]; // only on AP to specify the STA
2754 tANI_U8 rspReqd;
2755 tSirDeltsReqInfo req;
2756} tSirDeltsReq, *tpSirDeltsReq;
2757
2758typedef struct sSirDeltsRsp
2759{
2760 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2761 tANI_U16 length;
2762 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2763 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2764 tANI_U32 rc;
2765 tANI_U16 aid; // use 0 if macAddr is being specified
2766 tANI_U8 macAddr[6]; // only on AP to specify the STA
2767 tSirDeltsReqInfo rsp;
2768} tSirDeltsRsp, *tpSirDeltsRsp;
2769
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002770#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002771
2772#define SIR_QOS_NUM_TSPEC_MAX 2
2773#define SIR_QOS_NUM_AC_MAX 4
2774
2775typedef struct sSirAggrQosReqInfo
2776{
2777 tANI_U16 tspecIdx;
2778 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2779}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2780
2781typedef struct sSirAggrQosReq
2782{
2783 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2784 tANI_U16 length;
2785 tANI_U8 sessionId; //Session ID
2786 tANI_U16 transactionId;
2787 tSirMacAddr bssId; //BSSID
2788 tANI_U32 timeout; // in ms
2789 tANI_U8 rspReqd;
2790 tSirAggrQosReqInfo aggrInfo;
2791}tSirAggrQosReq, *tpSirAggrQosReq;
2792
2793typedef struct sSirAggrQosRspInfo
2794{
2795 tANI_U16 tspecIdx;
2796 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2797} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2798
2799typedef struct sSirAggrQosRsp
2800{
2801 tANI_U16 messageType;
2802 tANI_U16 length;
2803 tANI_U8 sessionId;
2804 tSirAggrQosRspInfo aggrInfo;
2805} tSirAggrQosRsp, *tpSirAggrQosRsp;
2806
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002807#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002808
2809typedef struct sSirSetTxPowerReq
2810{
schang86c22c42013-03-13 18:41:24 -07002811 tANI_U16 messageType;
2812 tANI_U16 length;
2813 tSirMacAddr bssId;
2814 tANI_U8 mwPower;
2815 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002816} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2817
2818typedef struct sSirSetTxPowerRsp
2819{
2820 tANI_U16 messageType;
2821 tANI_U16 length;
2822 tANI_U32 status;
2823} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2824
2825typedef struct sSirGetTxPowerReq
2826{
2827 tANI_U16 messageType;
2828 tANI_U16 length;
2829 tANI_U16 staid;
2830} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2831
2832typedef struct sSirGetTxPowerRsp
2833{
2834 tANI_U16 messageType;
2835 tANI_U16 length; // length of the entire request
2836 tANI_U32 power; // units of milliwatts
2837 tANI_U32 status;
2838} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2839
2840
2841typedef tANI_U32 tSirMacNoise[3];
2842
2843typedef struct sSirGetNoiseRsp
2844{
2845 tANI_U16 messageType;
2846 tANI_U16 length;
2847 tSirMacNoise noise;
2848} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2849
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002850typedef struct sSirQosMapSet
2851{
2852 tANI_U8 present;
2853 tANI_U8 num_dscp_exceptions;
2854 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002855 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002856} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002857
2858//
2859// PMC --> PE --> HAL
2860// Power save configuration parameters
2861//
2862typedef struct sSirPowerSaveCfg
2863{
2864 tANI_U16 listenInterval;
2865
2866 /* Number of consecutive missed beacons before
2867 * hardware generates an interrupt to wake up
2868 * the host. In units of listen interval.
2869 */
2870 tANI_U32 HeartBeatCount;
2871
2872 /* specifies which beacons are to be forwarded
2873 * to host when beacon filtering is enabled.
2874 * In units of listen interval.
2875 */
2876 tANI_U32 nthBeaconFilter;
2877
2878 /* Maximum number of PS-Poll send before
2879 * firmware sends data null with PM set to 0.
2880 */
2881 tANI_U32 maxPsPoll;
2882
2883 /* If the average RSSI value falls below the
2884 * minRssiThreshold, then FW will send an
2885 * interrupt to wake up the host.
2886 */
2887 tANI_U32 minRssiThreshold;
2888
2889 /* Number of beacons for which firmware will
2890 * collect the RSSI values and compute the average.
2891 */
2892 tANI_U8 numBeaconPerRssiAverage;
2893
2894 /* FW collects the RSSI stats for this period
2895 * in BMPS mode.
2896 */
2897 tANI_U8 rssiFilterPeriod;
2898
2899 // Enabling/disabling broadcast frame filter feature
2900 tANI_U8 broadcastFrameFilter;
2901
2902 // Enabling/disabling the ignore DTIM feature
2903 tANI_U8 ignoreDtim;
2904
2905 /* The following configuration parameters are kept
2906 * in order to be backward compatible for Gen5.
2907 * These will NOT be used for Gen6 Libra chip
2908 */
2909 tBeaconForwarding beaconFwd;
2910 tANI_U16 nthBeaconFwd;
2911 tANI_U8 fEnablePwrSaveImmediately;
2912 tANI_U8 fPSPoll;
2913
2914 // Enabling/disabling Beacon Early Termination feature
2915 tANI_U8 fEnableBeaconEarlyTermination;
2916 tANI_U8 bcnEarlyTermWakeInterval;
2917
2918}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2919
2920/* Reason code for requesting Full Power. This reason code is used by
2921 any module requesting full power from PMC and also by PE when it
2922 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2923typedef enum eRequestFullPowerReason
2924{
2925 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2926 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2927 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2928 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2929 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2930 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2931 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2932 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2933 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2934 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002935#ifdef FEATURE_WLAN_TDLS
2936 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2937#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002938 eSME_REASON_OTHER /* No specific reason. General reason code */
2939} tRequestFullPowerReason, tExitBmpsReason;
2940
2941
2942
2943//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2944typedef struct sExitBmpsInfo
2945{
2946 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2947}tExitBmpsInfo, *tpExitBmpsInfo;
2948
2949
2950// MAC SW --> SME
2951// Message indicating to SME to exit BMPS sleep mode
2952typedef struct sSirSmeExitBmpsInd
2953{
2954 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2955 tANI_U16 mesgLen;
2956 tSirResultCodes statusCode;
2957 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2958
2959} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2960
2961
2962//
2963// HDD -> LIM
2964// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2965// tSirMsgQ.reserved = 0
2966// tSirMsgQ.body = instance of tDelBAParams
2967//
2968typedef struct sSmeDelBAPeerInd
2969{
2970 // Message Type
2971 tANI_U16 mesgType;
2972
2973 tSirMacAddr bssId;//BSSID
2974
2975 // Message Length
2976 tANI_U16 mesgLen;
2977
2978 // Station Index
2979 tANI_U16 staIdx;
2980
2981 // TID for which the BA session is being deleted
2982 tANI_U8 baTID;
2983
2984 // DELBA direction
2985 // eBA_INITIATOR - Originator
2986 // eBA_RECEIPIENT - Recipient
2987 tANI_U8 baDirection;
2988} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2989
2990typedef struct sSmeIbssPeerInd
2991{
2992 tANI_U16 mesgType;
2993 tANI_U16 mesgLen;
2994 tANI_U8 sessionId;
2995
2996 tSirMacAddr peerAddr;
2997 tANI_U16 staId;
2998
2999 /*The DPU signatures will be sent eventually to TL to help it determine the
3000 association to which a packet belongs to*/
3001 /*Unicast DPU signature*/
3002 tANI_U8 ucastSig;
3003
3004 /*Broadcast DPU signature*/
3005 tANI_U8 bcastSig;
3006
3007 //Beacon will be appended for new Peer indication.
3008}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
3009
Ravi Joshid2ca7c42013-07-23 08:37:49 -07003010typedef struct sSirIbssPeerInactivityInd
3011{
3012 tANI_U8 bssIdx;
3013 tANI_U8 staIdx;
3014 tSirMacAddr peerAddr;
3015}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
3016
3017
Jeff Johnson295189b2012-06-20 16:38:30 -07003018typedef struct sLimScanChn
3019{
3020 tANI_U16 numTimeScan; //how many time this channel is scan
3021 tANI_U8 channelId;
3022}tLimScanChn;
3023
3024typedef struct sSmeGetScanChnRsp
3025{
3026 // Message Type
3027 tANI_U16 mesgType;
3028 // Message Length
3029 tANI_U16 mesgLen;
3030 tANI_U8 sessionId;
3031 tANI_U8 numChn;
3032 tLimScanChn scanChn[1];
3033} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
3034
3035typedef struct sLimScanChnInfo
3036{
3037 tANI_U8 numChnInfo; //number of channels in scanChn
3038 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
3039}tLimScanChnInfo;
3040
Jeff Johnson295189b2012-06-20 16:38:30 -07003041typedef struct sSirSmeGetAssocSTAsReq
3042{
3043 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
3044 tANI_U16 length;
3045 tSirMacAddr bssId; // BSSID
3046 tANI_U16 modId;
3047 void *pUsrContext;
3048 void *pSapEventCallback;
3049 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
3050} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07003051
3052typedef struct sSmeMaxAssocInd
3053{
3054 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
3055 tANI_U16 mesgLen;
3056 tANI_U8 sessionId;
3057 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
3058} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
3059
3060/*--------------------------------------------------------------------*/
3061/* BootLoader message definition */
3062/*--------------------------------------------------------------------*/
3063
3064/*--------------------------------------------------------------------*/
3065/* FW image size */
3066/*--------------------------------------------------------------------*/
3067#define SIR_FW_IMAGE_SIZE 146332
3068
3069
3070#define SIR_BOOT_MODULE_ID 1
3071
3072#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
3073#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
3074#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
3075#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
3076#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
3077#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
3078#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
3079
3080/*--------------------------------------------------------------------*/
3081/* Bootloader message syntax */
3082/*--------------------------------------------------------------------*/
3083
3084// Message header
3085#define SIR_BOOT_MB_HEADER 0
3086#define SIR_BOOT_MB_HEADER2 1
3087
3088#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
3089#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
3090
3091// BOOT_SETUP_IND parameter indices
3092#define SIR_BOOT_SETUP_IND_MBADDR 2
3093#define SIR_BOOT_SETUP_IND_MBSIZE 3
3094#define SIR_BOOT_SETUP_IND_MEMOPT 4
3095#define SIR_BOOT_SETUP_IND_LEN \
3096 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
3097
3098// BOOT_POST_RESULT_IND parameter indices
3099#define SIR_BOOT_POST_RESULT_IND_RES 2
3100#define SIR_BOOT_POST_RESULT_IND_LEN \
3101 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
3102
3103#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
3104#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
3105#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
3106#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
3107
3108
3109// BOOT_DNLD_RESULT_IND parameter indices
3110#define SIR_BOOT_DNLD_RESULT_IND_RES 2
3111#define SIR_BOOT_DNLD_RESULT_IND_LEN \
3112 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3113
3114#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3115#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3116#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3117
3118// BOOT_DNLD_DEV_REQ
3119#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3120#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3121#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3122 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3123
3124// BOOT_DNLD_DEV_RSP
3125#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3126#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3127 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3128
3129#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3130#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3131
3132// BOOT_DNLD_REQ
3133#define SIR_BOOT_DNLD_REQ_OFFSET 2
3134#define SIR_BOOT_DNLD_REQ_WRADDR 3
3135#define SIR_BOOT_DNLD_REQ_SIZE 4
3136#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3137
3138// BOOT_DNLD_RSP
3139#define SIR_BOOT_DNLD_RSP_SIZE 2
3140#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3141
Jeff Johnson295189b2012-06-20 16:38:30 -07003142
3143// board capabilities fields are defined here.
3144typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3145{
3146#ifndef ANI_LITTLE_BIT_ENDIAN
3147 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3148 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3149 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3150 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3151 tANI_U32 rsvd1:2;
3152 // (productId derives sub-category in the following three families)
3153 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3154 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3155 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3156 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3157 tANI_U32 bbChipVer:4; // Baseband chip version
3158 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3159 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3160 tANI_U32 nReceivers:2; // 0 based.
3161 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3162 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3163 tANI_U32 rsvd:1;
3164 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3165#else
3166
3167 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3168 tANI_U32 rsvd:1;
3169 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3170 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3171 tANI_U32 nReceivers:2; // 0 based.
3172 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3173 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3174 tANI_U32 bbChipVer:4; // Baseband chip version
3175 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3176 // (productId derives sub-category in the following three families)
3177 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3178 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3179 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3180 tANI_U32 rsvd1:2;
3181 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3182 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3183 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3184 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3185#endif
3186} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3187
3188# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3189# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3190
3191# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3192# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3193
3194# define ANI_BCAP_SDRAM_MASK 0x4
3195# define ANI_BCAP_SDRAM_OFFSET 2
3196
3197# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3198# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3199
3200# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3201# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3202
3203# define ANI_BCAP_RADIO_ON_MASK 0xC0
3204# define ANI_BCAP_RADIO_ON_OFFSET 6
3205
3206# define ANI_BCAP_LO_TYPE_MASK 0x300
3207# define ANI_BCAP_LO_TYPE_OFFSET 8
3208
3209# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3210# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3211
3212# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3213# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3214
3215# define ANI_BCAP_RADIO_OFF 0
3216# define ANI_BCAP_RADIO_ON 1
3217# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3218
3219
3220/// WOW related structures
3221// SME -> PE <-> HAL
3222#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3223#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3224
3225// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3226// SME/HDD maintains the list of the BCAST wake-up patterns.
3227// This is a pass through message for PE
3228typedef struct sSirWowlAddBcastPtrn
3229{
3230 tANI_U8 ucPatternId; // Pattern ID
3231 // Pattern byte offset from beginning of the 802.11 packet to start of the
3232 // wake-up pattern
3233 tANI_U8 ucPatternByteOffset;
3234 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3235 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3236 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3237 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3238 // Extra pattern data beyond 128 bytes
3239 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3240 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003241 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003242} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3243
3244
3245// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3246// SME/HDD maintains the list of the BCAST wake-up patterns.
3247// This is a pass through message for PE
3248typedef struct sSirWowlDelBcastPtrn
3249{
3250 /* Pattern ID of the wakeup pattern to be deleted */
3251 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003252 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003253}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3254
3255
3256// SME->PE: Enter WOWLAN parameters
3257typedef struct sSirSmeWowlEnterParams
3258{
3259 /* Enables/disables magic packet filtering */
3260 tANI_U8 ucMagicPktEnable;
3261
3262 /* Magic pattern */
3263 tSirMacAddr magicPtrn;
3264
3265 /* Enables/disables packet pattern filtering */
3266 tANI_U8 ucPatternFilteringEnable;
3267
3268#ifdef WLAN_WAKEUP_EVENTS
3269 /* This configuration directs the WoW packet filtering to look for EAP-ID
3270 * requests embedded in EAPOL frames and use this as a wake source.
3271 */
3272 tANI_U8 ucWoWEAPIDRequestEnable;
3273
3274 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3275 * requests and use this as a wake source.
3276 */
3277 tANI_U8 ucWoWEAPOL4WayEnable;
3278
3279 /* This configuration allows a host wakeup on an network scan offload match.
3280 */
3281 tANI_U8 ucWowNetScanOffloadMatch;
3282
3283 /* This configuration allows a host wakeup on any GTK rekeying error.
3284 */
3285 tANI_U8 ucWowGTKRekeyError;
3286
3287 /* This configuration allows a host wakeup on BSS connection loss.
3288 */
3289 tANI_U8 ucWoWBSSConnLoss;
3290#endif // WLAN_WAKEUP_EVENTS
3291
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003292 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003293} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3294
3295
3296// PE<->HAL: Enter WOWLAN parameters
3297typedef struct sSirHalWowlEnterParams
3298{
3299 /* Enables/disables magic packet filtering */
3300 tANI_U8 ucMagicPktEnable;
3301
3302 /* Magic pattern */
3303 tSirMacAddr magicPtrn;
3304
3305 /* Enables/disables packet pattern filtering in firmware.
3306 Enabling this flag enables broadcast pattern matching
3307 in Firmware. If unicast pattern matching is also desired,
3308 ucUcastPatternFilteringEnable flag must be set tot true
3309 as well
3310 */
3311 tANI_U8 ucPatternFilteringEnable;
3312
3313 /* Enables/disables unicast packet pattern filtering.
3314 This flag specifies whether we want to do pattern match
3315 on unicast packets as well and not just broadcast packets.
3316 This flag has no effect if the ucPatternFilteringEnable
3317 (main controlling flag) is set to false
3318 */
3319 tANI_U8 ucUcastPatternFilteringEnable;
3320
3321 /* This configuration is valid only when magicPktEnable=1.
3322 * It requests hardware to wake up when it receives the
3323 * Channel Switch Action Frame.
3324 */
3325 tANI_U8 ucWowChnlSwitchRcv;
3326
3327 /* This configuration is valid only when magicPktEnable=1.
3328 * It requests hardware to wake up when it receives the
3329 * Deauthentication Frame.
3330 */
3331 tANI_U8 ucWowDeauthRcv;
3332
3333 /* This configuration is valid only when magicPktEnable=1.
3334 * It requests hardware to wake up when it receives the
3335 * Disassociation Frame.
3336 */
3337 tANI_U8 ucWowDisassocRcv;
3338
3339 /* This configuration is valid only when magicPktEnable=1.
3340 * It requests hardware to wake up when it has missed
3341 * consecutive beacons. This is a hardware register
3342 * configuration (NOT a firmware configuration).
3343 */
3344 tANI_U8 ucWowMaxMissedBeacons;
3345
3346 /* This configuration is valid only when magicPktEnable=1.
3347 * This is a timeout value in units of microsec. It requests
3348 * hardware to unconditionally wake up after it has stayed
3349 * in WoWLAN mode for some time. Set 0 to disable this feature.
3350 */
3351 tANI_U8 ucWowMaxSleepUsec;
3352
3353#ifdef WLAN_WAKEUP_EVENTS
3354 /* This configuration directs the WoW packet filtering to look for EAP-ID
3355 * requests embedded in EAPOL frames and use this as a wake source.
3356 */
3357 tANI_U8 ucWoWEAPIDRequestEnable;
3358
3359 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3360 * requests and use this as a wake source.
3361 */
3362 tANI_U8 ucWoWEAPOL4WayEnable;
3363
3364 /* This configuration allows a host wakeup on an network scan offload match.
3365 */
3366 tANI_U8 ucWowNetScanOffloadMatch;
3367
3368 /* This configuration allows a host wakeup on any GTK rekeying error.
3369 */
3370 tANI_U8 ucWowGTKRekeyError;
3371
3372 /* This configuration allows a host wakeup on BSS connection loss.
3373 */
3374 tANI_U8 ucWoWBSSConnLoss;
3375#endif // WLAN_WAKEUP_EVENTS
3376
3377 /* Status code to be filled by HAL when it sends
3378 * SIR_HAL_WOWL_ENTER_RSP to PE.
3379 */
3380 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003381
3382 /*BSSID to find the current session
3383 */
3384 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003385} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3386
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003387// PE<->HAL: Exit WOWLAN parameters
3388typedef struct sSirHalWowlExitParams
3389{
3390 /* Status code to be filled by HAL when it sends
3391 * SIR_HAL_WOWL_EXIT_RSP to PE.
3392 */
3393 eHalStatus status;
3394
3395 /*BSSIDX to find the current session
3396 */
3397 tANI_U8 bssIdx;
3398} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3399
Jeff Johnson295189b2012-06-20 16:38:30 -07003400
3401#define SIR_MAX_NAME_SIZE 64
3402#define SIR_MAX_TEXT_SIZE 32
3403
3404typedef struct sSirName {
3405 v_U8_t num_name;
3406 v_U8_t name[SIR_MAX_NAME_SIZE];
3407} tSirName;
3408
3409typedef struct sSirText {
3410 v_U8_t num_text;
3411 v_U8_t text[SIR_MAX_TEXT_SIZE];
3412} tSirText;
3413
3414
3415#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3416#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3417#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3418#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3419#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3420#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3421#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3422#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3423#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3424#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3425#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3426#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3427#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3428#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3429#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3430#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3431
3432
3433typedef struct sSirWPSProbeRspIE {
3434 v_U32_t FieldPresent;
3435 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3436 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3437 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3438 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3439 v_U16_t DevicePasswordID; // Device Password ID
3440 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3441 v_U8_t ResponseType; // Response type
3442 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3443 tSirName Manufacture;
3444 tSirText ModelName;
3445 tSirText ModelNumber;
3446 tSirText SerialNumber;
3447 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3448 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3449 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3450 tSirText DeviceName;
3451 v_U16_t ConfigMethod; // Configuaration method
3452 v_U8_t RFBand; // RF bands available on the AP
3453} tSirWPSProbeRspIE;
3454
3455#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3456#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3457#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3458#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3459#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3460#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3461#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3462#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3463
3464typedef struct sSirWPSBeaconIE {
3465 v_U32_t FieldPresent;
3466 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3467 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3468 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3469 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3470 v_U16_t DevicePasswordID; // Device Password ID
3471 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3472 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3473 v_U8_t RFBand; // RF bands available on the AP
3474} tSirWPSBeaconIE;
3475
3476#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3477#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3478
3479typedef struct sSirWPSAssocRspIE {
3480 v_U32_t FieldPresent;
3481 v_U32_t Version;
3482 v_U8_t ResposeType;
3483} tSirWPSAssocRspIE;
3484
3485typedef struct sSirAPWPSIEs {
3486 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3487 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3488 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3489} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3490
3491typedef struct sSirUpdateAPWPSIEsReq
3492{
3493 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3494 tANI_U16 length;
3495 tANI_U16 transactionId; //Transaction ID for cmd
3496 tSirMacAddr bssId; // BSSID
3497 tANI_U8 sessionId; //Session ID
3498 tSirAPWPSIEs APWPSIEs;
3499} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3500
3501typedef struct sSirUpdateParams
3502{
3503 tANI_U16 messageType;
3504 tANI_U16 length;
3505 tANI_U8 sessionId; // Session ID
3506 tANI_U8 ssidHidden; // Hide SSID
3507} tSirUpdateParams, *tpSirUpdateParams;
3508
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003509//Beacon Interval
3510typedef struct sSirChangeBIParams
3511{
3512 tANI_U16 messageType;
3513 tANI_U16 length;
3514 tANI_U16 beaconInterval; // Beacon Interval
3515 tSirMacAddr bssId;
3516 tANI_U8 sessionId; // Session ID
3517} tSirChangeBIParams, *tpSirChangeBIParams;
3518
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303519#ifdef WLAN_FEATURE_AP_HT40_24G
3520typedef struct sSirSetHT2040Mode
3521{
3522 tANI_U16 messageType;
3523 tANI_U16 length;
3524 tANI_U8 cbMode;
3525 tSirMacAddr bssId;
3526 tANI_U8 sessionId; // Session ID
3527} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -08003528
3529typedef struct sSirHT2040CoexInfoInd
3530{
3531 tANI_U16 messageType; // eWNI_SME_2040_COEX_IND
3532 tANI_U16 length;
3533 tANI_U8 sessionId;
3534 tANI_U8 HT40MHzIntolerant;
3535 tANI_U8 HT20MHzBssWidthReq;
3536 tANI_U8 channel_num;
3537 tANI_U8 HT2040BssIntoChanReport [1]; //variable
3538}tSirHT2040CoexInfoInd, *tpSirHT2040CoexInfoInd;
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303539#endif
3540
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303541typedef struct sSirOBSSHT40Param
3542{
3543 tANI_U16 OBSSScanPassiveDwellTime;
3544 tANI_U16 OBSSScanActiveDwellTime;
3545 tANI_U16 BSSChannelWidthTriggerScanInterval;
3546 tANI_U16 OBSSScanPassiveTotalPerChannel;
3547 tANI_U16 OBSSScanActiveTotalPerChannel;
3548 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3549 tANI_U16 OBSSScanActivityThreshold;
3550}tSirOBSSHT40Param, *tpOBSSHT40Param;
3551
Jeff Johnson295189b2012-06-20 16:38:30 -07003552#define SIR_WPS_UUID_LEN 16
3553#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3554
3555typedef struct sSirWPSPBCSession {
3556 struct sSirWPSPBCSession *next;
3557 tSirMacAddr addr;
3558 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3559 tANI_TIMESTAMP timestamp;
3560} tSirWPSPBCSession;
3561
3562typedef struct sSirSmeGetWPSPBCSessionsReq
3563{
3564 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3565 tANI_U16 length;
3566 void *pUsrContext;
3567 void *pSapEventCallback;
3568 tSirMacAddr bssId; // BSSID
3569 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3570} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3571
3572typedef struct sSirWPSPBCProbeReq
3573{
3574 tSirMacAddr peerMacAddr;
3575 tANI_U16 probeReqIELen;
3576 tANI_U8 probeReqIE[512];
3577} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3578
3579// probereq from peer, when wsc is enabled
3580typedef struct sSirSmeProbeReqInd
3581{
3582 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3583 tANI_U16 length;
3584 tANI_U8 sessionId;
3585 tSirMacAddr bssId;
3586 tSirWPSPBCProbeReq WPSPBCProbeReq;
3587} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3588
3589typedef struct sSirUpdateAPWPARSNIEsReq
3590{
3591 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3592 tANI_U16 length;
3593 tANI_U16 transactionId; //Transaction ID for cmd
3594 tSirMacAddr bssId; // BSSID
3595 tANI_U8 sessionId; //Session ID
3596 tSirRSNie APWPARSNIEs;
3597} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3598
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003599#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003600#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003601#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3602#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3603#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3604#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3605#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3606#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3607#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003608
3609/*Adaptive Thresholds to be used for FW based scanning*/
3610#define LFR_SENSITIVITY_THR_1MBPS -89
3611#define LFR_LOOKUP_THR_1MBPS -78
3612#define LFR_SENSITIVITY_THR_2MBPS -87
3613#define LFR_LOOKUP_THR_2MBPS -78
3614#define LFR_SENSITIVITY_THR_5_5MBPS -86
3615#define LFR_LOOKUP_THR_5_5MBPS -77
3616#define LFR_SENSITIVITY_THR_11MBPS -85
3617#define LFR_LOOKUP_THR_11MBPS -76
3618#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3619#define LFR_LOOKUP_THR_6MBPS_2G -78
3620#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3621#define LFR_LOOKUP_THR_6MBPS_5G -78
3622#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3623#define LFR_LOOKUP_THR_12MBPS_2G -78
3624#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3625#define LFR_LOOKUP_THR_12MBPS_5G -76
3626#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3627#define LFR_LOOKUP_THR_24MBPS_2G -76
3628#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3629#define LFR_LOOKUP_THR_24MBPS_5G -74
3630#define LFR_SENSITIVITY_THR_DEFAULT 0
3631#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003632#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003633
3634// SME -> HAL - This is the host offload request.
3635#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3636#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3637#define SIR_IPV6_NS_OFFLOAD 2
3638#define SIR_OFFLOAD_DISABLE 0
3639#define SIR_OFFLOAD_ENABLE 1
3640#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303641#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003642#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303643#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003644
3645#ifdef WLAN_NS_OFFLOAD
3646typedef struct sSirNsOffloadReq
3647{
3648 tANI_U8 srcIPv6Addr[16];
3649 tANI_U8 selfIPv6Addr[16];
3650 //Only support 2 possible Network Advertisement IPv6 address
3651 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3652 tANI_U8 selfMacAddr[6];
3653 tANI_U8 srcIPv6AddrValid;
3654 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303655 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003656} tSirNsOffloadReq, *tpSirNsOffloadReq;
3657#endif //WLAN_NS_OFFLOAD
3658
3659typedef struct sSirHostOffloadReq
3660{
3661 tANI_U8 offloadType;
3662 tANI_U8 enableOrDisable;
3663 union
3664 {
3665 tANI_U8 hostIpv4Addr [4];
3666 tANI_U8 hostIpv6Addr [16];
3667 } params;
3668#ifdef WLAN_NS_OFFLOAD
3669 tSirNsOffloadReq nsOffloadInfo;
3670#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003671 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003672} tSirHostOffloadReq, *tpSirHostOffloadReq;
3673
3674/* Packet Types. */
3675#define SIR_KEEP_ALIVE_NULL_PKT 1
3676#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3677
3678/* Enable or disable offload. */
3679#define SIR_KEEP_ALIVE_DISABLE 0
3680#define SIR_KEEP_ALIVE_ENABLE 1
3681
3682/* Keep Alive request. */
3683typedef struct sSirKeepAliveReq
3684{
3685 v_U8_t packetType;
3686 v_U32_t timePeriod;
3687 tSirIpv4Addr hostIpv4Addr;
3688 tSirIpv4Addr destIpv4Addr;
3689 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003690 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003691} tSirKeepAliveReq, *tpSirKeepAliveReq;
3692
3693typedef struct sSirSmeAddStaSelfReq
3694{
3695 tANI_U16 mesgType;
3696 tANI_U16 mesgLen;
3697 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003698 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003699}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3700
3701typedef struct sSirSmeDelStaSelfReq
3702{
3703 tANI_U16 mesgType;
3704 tANI_U16 mesgLen;
3705 tSirMacAddr selfMacAddr;
3706}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3707
3708typedef struct sSirSmeAddStaSelfRsp
3709{
3710 tANI_U16 mesgType;
3711 tANI_U16 mesgLen;
3712 tANI_U16 status;
3713 tSirMacAddr selfMacAddr;
3714}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3715
3716typedef struct sSirSmeDelStaSelfRsp
3717{
3718 tANI_U16 mesgType;
3719 tANI_U16 mesgLen;
3720 tANI_U16 status;
3721 tSirMacAddr selfMacAddr;
3722}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3723
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303724typedef enum DFSChanScanType
3725{
3726 DFS_CHNL_SCAN_DISABLED,
3727 DFS_CHNL_SCAN_ENABLED_NORMAL,
3728 DFS_CHNL_SCAN_ENABLED_ACTIVE
3729}eDFSChanScanType;
3730
Jeff Johnson295189b2012-06-20 16:38:30 -07003731/* Coex Indication defines -
3732 should match WLAN_COEX_IND_DATA_SIZE
3733 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3734 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3735#define SIR_COEX_IND_DATA_SIZE (4)
3736#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3737#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003738#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3739#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003740#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3741#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Kanchanapally, Vidyullatha23cea3c2014-11-04 13:05:20 +05303742#define SIR_COEX_IND_TYPE_ENABLE_UAPSD (6)
3743#define SIR_COEX_IND_TYPE_DISABLE_UAPSD (7)
c_hpothub3458992014-09-19 19:58:57 +05303744#define SIR_COEX_IND_TYPE_CXM_FEATURES_NOTIFICATION (8)
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303745#define SIR_COEX_IND_TYPE_TDLS_ENABLE (6)
3746#define SIR_COEX_IND_TYPE_TDLS_DISABLE (7)
Abhishek Singh8a3e4dc2017-01-02 10:39:18 +05303747#define SIR_COEX_IND_TYPE_HID_CONNECTED_WLAN_CONNECTED_IN_2p4 (9)
3748#define SIR_COEX_IND_TYPE_HID_DISCONNECTED_WLAN_CONNECTED_IN_2p4 (10)
Jeff Johnson295189b2012-06-20 16:38:30 -07003749
3750typedef struct sSirSmeCoexInd
3751{
3752 tANI_U16 mesgType;
3753 tANI_U16 mesgLen;
3754 tANI_U32 coexIndType;
3755 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3756}tSirSmeCoexInd, *tpSirSmeCoexInd;
3757
Jeff Johnson295189b2012-06-20 16:38:30 -07003758typedef struct sSirSmeMgmtFrameInd
3759{
Abhishek Singh7d624e12015-11-30 14:29:27 +05303760 tANI_U16 frameLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303761 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003762 tANI_U8 sessionId;
3763 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303764 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003765 tANI_U8 frameBuf[1]; //variable
3766}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003767
Chet Lanctot186b5732013-03-18 10:26:30 -07003768#ifdef WLAN_FEATURE_11W
3769typedef struct sSirSmeUnprotMgmtFrameInd
3770{
3771 tANI_U8 sessionId;
3772 tANI_U8 frameType;
3773 tANI_U8 frameLen;
3774 tANI_U8 frameBuf[1]; //variable
3775}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3776#endif
3777
Jeff Johnson295189b2012-06-20 16:38:30 -07003778#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3779 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3780 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3781 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3782#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3783 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3784
3785/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003786typedef struct sSirNoAParam
3787{
3788 tANI_U8 ctWindow:7;
3789 tANI_U8 OppPS:1;
3790 tANI_U8 count;
3791 tANI_U32 duration;
3792 tANI_U32 interval;
3793 tANI_U32 singleNoADuration;
3794 tANI_U8 psSelection;
3795}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003796
Kapil Gupta2b44acb2016-12-30 16:49:51 +05303797typedef void(*wlan_suspend_req_cb)(void *ptr, VOS_STATUS status);
3798
Jeff Johnson295189b2012-06-20 16:38:30 -07003799typedef struct sSirWlanSuspendParam
3800{
3801 tANI_U8 configuredMcstBcstFilterSetting;
Kapil Gupta2b44acb2016-12-30 16:49:51 +05303802 wlan_suspend_req_cb wlan_sus_callback;
3803 void *context;
Jeff Johnson295189b2012-06-20 16:38:30 -07003804}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3805
3806typedef struct sSirWlanResumeParam
3807{
3808 tANI_U8 configuredMcstBcstFilterSetting;
3809}tSirWlanResumeParam,*tpSirWlanResumeParam;
3810
3811typedef struct sSirWlanSetRxpFilters
3812{
3813 tANI_U8 configuredMcstBcstFilterSetting;
3814 tANI_U8 setMcstBcstFilter;
3815}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003816
mukul sharma6b53e202016-11-23 19:29:18 +05303817
3818typedef struct sSirUpdateCfgIntParam
3819{
3820 tANI_U32 cfgId;
3821}tSirUpdateCfgIntParam,*tpSirUpdateCfgIntParam;
3822
c_manjeecfd1efb2015-09-25 19:32:34 +05303823typedef struct
3824{
3825 //FW mail box address
3826 uint64 logMailBoxAddr;
3827 tANI_U32 status;
3828 //Logging mail box version
3829 tANI_U8 logMailBoxVer;
3830 //Qshrink is enabled
3831 tANI_U8 logCompressEnabled;
3832 /* used to tell fwr mem dump size */
3833 tANI_U32 fw_mem_dump_max_size;
3834 //Reserved for future purpose
3835 tANI_U32 reserved1;
3836 tANI_U32 reserved2;
3837}tAniLoggingInitRsp, *tpAniLoggingInitRsp;
3838
Anurag Chouhan6ee81542017-02-09 18:09:27 +05303839/**
3840 * struct rsp_stats - arp packet stats
3841 * @status: success or failure
3842 * @tx_fw_cnt: tx packets count
3843 * @tx_ack_cnt: tx acknowledgement count
3844 */
3845typedef struct {
3846 uint32_t status;
3847 uint16_t dad;
3848 uint16_t tx_fw_cnt;
3849 uint16_t tx_ack_cnt;
3850 uint16_t rx_fw_cnt;
3851} rsp_stats;
3852
3853typedef void(*setArpStatsReqCb)(void *data, VOS_STATUS rsp);
3854
3855/**
3856 * struct setArpStatsParams - set/reset arp stats
3857 * @flag: enable/disable stats
3858 * @pkt_type: type of packet(1 - arp)
3859 * @ip_addr: subnet ipv4 address in case of encrypted packets
3860 * @rsp_cb_fn: FW response callback api
3861 * @data_ctx: parameter for callback api
3862 */
3863typedef struct {
3864 uint8_t flag;
3865 uint8_t pkt_type;
3866 uint32_t ip_addr;
3867 setArpStatsReqCb rsp_cb_fn;
3868 void *data_ctx;
3869} setArpStatsParams, *psetArpStatsParams;
3870
3871typedef void(*getArpStatsReqCb)(void *data, rsp_stats *rsp);
3872/**
3873 * struct getArpStatsParams - get arp stats from firmware
3874 * @pkt_type: packet type(1 - ARP)
3875 * @get_rsp_cb_fn: FW response callback api
3876 * @data_ctx: parameter for callback api
3877 */
3878typedef struct {
3879 uint8_t pkt_type;
3880 getArpStatsReqCb get_rsp_cb_fn;
3881 void *data_ctx;
3882} getArpStatsParams, *pgetArpStatsParams;
3883
3884
c_manjeecfd1efb2015-09-25 19:32:34 +05303885typedef void(*FWLoggingInitReqCb)(void *fwlogInitCbContext, tAniLoggingInitRsp *pRsp);
Siddharth Bhal64246172015-02-27 01:04:37 +05303886typedef void ( *tGetFrameLogCallback) (void *pContext);
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303887typedef void(*RssiMonitorReqCb)(void *rssiMonitorCbContext, VOS_STATUS status);
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05303888typedef void(*pktFilterReqCb)(void *data, tANI_U32 status);
Anurag Chouhan83026002016-12-13 22:46:21 +05303889typedef void(*dhcp_offload_req_cb)(void *rssiMonitorCbContext,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303890 VOS_STATUS status);
3891typedef void(*mdns_enable_req_cb)(void *mdns_enable_cb_context,
3892 VOS_STATUS status);
3893typedef void(*mdns_fqdn_req_cb)(void *mdns_fqdn_cb_context, VOS_STATUS status);
3894typedef void(*mdns_resp_req_cb)(void *mdns_resp_cb_context, VOS_STATUS status);
Siddharth Bhal64246172015-02-27 01:04:37 +05303895
3896typedef struct sAniGetFrameLogReq
3897{
3898 tANI_U16 msgType;
3899 tANI_U16 msgLen;
Siddharth Bhal64246172015-02-27 01:04:37 +05303900 tANI_U8 getFrameLogCmdFlag;
Siddharth Bhal64246172015-02-27 01:04:37 +05303901} tAniGetFrameLogReq, *tpAniGetFrameLogReq;
3902
Abhishek Singh99a31be2015-12-10 10:37:44 +05303903/**
3904 * struct s_ani_set_tx_max_pwr - Req params to set max tx power
3905 * @bssid: bssid to set the power cap for
3906 * @self_mac_addr:self mac address
3907 * @power: power to set in dB
3908 */
3909struct s_ani_set_tx_max_pwr
3910{
3911 tSirMacAddr bssid;
3912 tSirMacAddr self_sta_mac_addr;
3913 tPowerdBm power;
3914};
3915
3916
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303917
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303918typedef struct sSirFWLoggingInitParam
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303919{
3920 tANI_U8 enableFlag;
3921 tANI_U8 frameType;
3922 tANI_U8 frameSize;
3923 tANI_U8 bufferMode;
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303924 tANI_U8 continuousFrameLogging;
3925 tANI_U8 minLogBufferSize;
3926 tANI_U8 maxLogBufferSize;
3927 FWLoggingInitReqCb fwlogInitCallback;
3928 void *fwlogInitCbContext;
3929}tSirFWLoggingInitParam,*tpSirFWLoggingInitParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003930
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +05303931/**
3932 * struct sir_allowed_action_frames - Parameters to set Allowed action frames
3933 * @bitmask: Bits to convey the allowed action frames
3934 * @reserved: For future use
3935 */
3936struct sir_allowed_action_frames {
3937 uint32_t bitmask;
3938 uint32_t reserved;
3939};
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303940
3941/*
3942 * struct rssi_monitor_req - rssi monitoring
3943 * @request_id: request id
3944 * @session_id: session id
3945 * @min_rssi: minimum rssi
3946 * @max_rssi: maximum rssi
3947 * @control: flag to indicate start or stop
3948 */
3949typedef struct sSirRssiMonitorReq
3950{
3951 tANI_U32 requestId;
3952 tANI_U32 sessionId;
3953 tANI_S8 minRssi;
3954 tANI_S8 maxRssi;
3955 tANI_U8 currentBssId[6];
3956 RssiMonitorReqCb rssiMonitorCallback;
3957 void *rssiMonitorCbContext;
3958}tSirRssiMonitorReq, *tpSirRssiMonitorReq;
3959
3960
3961/**
3962 * struct rssi_breach_event - rssi breached event structure
3963 * @request_id: request id
3964 * @curr_rssi: current rssi
3965 * @curr_bssid: current bssid
3966 */
3967struct rssi_breach_event {
3968 tANI_U32 request_id;
3969 v_MACADDR_t curr_bssid;
3970 tANI_S8 curr_rssi;
3971};
3972
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303973typedef struct sSirFatalEventLogsReqParam
3974{
3975 tANI_U32 reason_code;
3976}tSirFatalEventLogsReqParam, *tpSirFatalEventLogsReqParam;
3977
Jeff Johnson295189b2012-06-20 16:38:30 -07003978#ifdef FEATURE_WLAN_SCAN_PNO
3979//
3980// PNO Messages
3981//
3982
3983// Set PNO
3984#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303985#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003986#define SIR_PNO_MAX_SUPP_NETWORKS 16
3987#define SIR_PNO_MAX_SCAN_TIMERS 10
3988
3989/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3990#define SIR_PNO_MAX_PB_REQ_SIZE 450
3991
3992#define SIR_PNO_24G_DEFAULT_CH 1
3993#define SIR_PNO_5G_DEFAULT_CH 36
3994
3995typedef enum
3996{
3997 SIR_PNO_MODE_IMMEDIATE,
3998 SIR_PNO_MODE_ON_SUSPEND,
3999 SIR_PNO_MODE_ON_RESUME,
4000 SIR_PNO_MODE_MAX
4001} eSirPNOMode;
4002
4003typedef struct
4004{
4005 tSirMacSSid ssId;
4006 tANI_U32 authentication;
4007 tANI_U32 encryption;
4008 tANI_U32 bcastNetwType;
4009 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05304010 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07004011 tANI_U8 rssiThreshold;
4012} tSirNetworkType;
4013
4014typedef struct
4015{
4016 tANI_U32 uTimerValue;
4017 tANI_U32 uTimerRepeat;
4018}tSirScanTimer;
4019
4020typedef struct
4021{
4022 tANI_U8 ucScanTimersCount;
4023 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
4024} tSirScanTimersType;
4025
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05304026/*Pref Net Req status */
4027typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
4028
4029
Jeff Johnson295189b2012-06-20 16:38:30 -07004030typedef struct sSirPNOScanReq
4031{
4032 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05304033 PNOReqStatusCb statusCallback;
4034 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07004035 eSirPNOMode modePNO;
4036 tANI_U8 ucNetworksCount;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304037 tSirNetworkType *aNetworks;
Jeff Johnson295189b2012-06-20 16:38:30 -07004038 tSirScanTimersType scanTimers;
4039
4040 /*added by SME*/
4041 tANI_U16 us24GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304042 tANI_U8 *p24GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07004043 tANI_U16 us5GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304044 tANI_U8 *p5GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07004045} tSirPNOScanReq, *tpSirPNOScanReq;
4046
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004047typedef struct sSirSetRSSIFilterReq
4048{
4049 tANI_U8 rssiThreshold;
4050} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
4051
4052
4053// Update Scan Params
4054typedef struct {
4055 tANI_U8 b11dEnabled;
4056 tANI_U8 b11dResolved;
4057 tANI_U8 ucChannelCount;
4058 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
4059 tANI_U16 usPassiveMinChTime;
4060 tANI_U16 usPassiveMaxChTime;
4061 tANI_U16 usActiveMinChTime;
4062 tANI_U16 usActiveMaxChTime;
4063 tANI_U8 ucCBState;
4064} tSirUpdateScanParams, * tpSirUpdateScanParams;
4065
4066// Preferred Network Found Indication
4067typedef struct
4068{
4069 tANI_U16 mesgType;
4070 tANI_U16 mesgLen;
4071 /* Network that was found with the highest RSSI*/
4072 tSirMacSSid ssId;
4073 /* Indicates the RSSI */
4074 tANI_U8 rssi;
4075 /* Length of the beacon or probe response
4076 * corresponding to the candidate found by PNO */
4077 tANI_U32 frameLength;
4078 /* Index to memory location where the contents of
4079 * beacon or probe response frame will be copied */
4080 tANI_U8 data[1];
4081} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
4082#endif //FEATURE_WLAN_SCAN_PNO
4083
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004084#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Kapil Gupta04ab1992016-06-26 13:36:51 +05304085#define SIR_PER_ROAM_MAX_AP_CNT 20
Kapil Guptac69c28a2016-08-25 14:11:17 +05304086#define SIR_PER_ROAM_MAX_CANDIDATE_CNT 32
Kapil Gupta04ab1992016-06-26 13:36:51 +05304087typedef struct __attribute__((packed))
4088{
4089 tANI_U8 channelNumber;
4090 tANI_U8 channelCCA;
4091 tANI_U8 otherApCount;
4092 tANI_S8 otherApRssi[SIR_PER_ROAM_MAX_AP_CNT];
4093} tSirCandidateChanInfo, * tpSirCandidateChanInfo;
4094
4095typedef struct sPERRoamScanStart
4096{
4097 tANI_U16 msgType;
4098 tANI_U16 msgLen;
4099 tANI_U8 start;
4100} tPERRoamScanStart, *tpPERRoamScanStart;
4101
4102typedef struct sSirRoamAPInfo
4103{
4104 tSirMacAddr bssAddr;
4105 unsigned int timeStamp;
4106} tSirRoamAPInfo, *tpSirRoamAPInfo;
4107
4108typedef struct __attribute__((packed))
4109{
4110 tANI_U32 candidateCount;
4111 tSirCandidateChanInfo channelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
4112} tSirPerRoamScanResult, * tpSirPerRoamScanResult;
4113
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004114typedef struct
4115{
4116 tSirMacSSid ssId;
4117 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
4118 tANI_U32 authentication;
4119 tANI_U8 encryption;
4120 tANI_U8 mcencryption;
4121 tANI_U8 ChannelCount;
4122 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
4123
4124} tSirRoamNetworkType;
4125
4126typedef struct SirMobilityDomainInfo
4127{
4128 tANI_U8 mdiePresent;
4129 tANI_U16 mobilityDomain;
4130} tSirMobilityDomainInfo;
4131
4132typedef struct sSirRoamOffloadScanReq
4133{
4134 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08004135 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004136 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08004137 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004138 tANI_U8 RoamRssiDiff;
4139 tANI_U8 ChannelCacheType;
4140 tANI_U8 Command;
4141 tANI_U8 StartScanReason;
4142 tANI_U16 NeighborScanTimerPeriod;
4143 tANI_U16 NeighborRoamScanRefreshPeriod;
4144 tANI_U16 NeighborScanChannelMinTime;
4145 tANI_U16 NeighborScanChannelMaxTime;
4146 tANI_U16 EmptyRefreshScanPeriod;
4147 tANI_U8 ValidChannelCount;
4148 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08004149 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004150 tANI_U16 us24GProbeTemplateLen;
4151 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4152 tANI_U16 us5GProbeTemplateLen;
4153 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07004154 tANI_U8 nProbes;
4155 tANI_U16 HomeAwayTime;
Sreelakshmi Konamki70bfdaf2017-05-29 18:47:29 +05304156 tANI_U8 WeakZoneRssiThresholdForRoam;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004157 tSirRoamNetworkType ConnectedNetwork;
4158 tSirMobilityDomainInfo MDID;
4159} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304160
4161/**
4162 * struct sSirPERRoamOffloadScanReq - Offload PER config params
4163 * @sessionId: session id
4164 * @rateUpThreshold: rate at which to stop monitoring the rate
4165 * @rateDownThreshold: rate at which to start monitoring
4166 * @isPERRoamCCAEnabled: CCA sensing is enabled or disabled
4167 * @waitPeriodForNextPERScan: time to wait before start monitoring again once a
4168 * scan has been triggered
4169 * @PERtimerThreshold: time to collect stats to trigger roam scan
4170 * @PERroamTriggerPercent: minimum percentage of packets needs to be below
4171 * rateDownThreshold to trigger a roam scan
4172 */
4173typedef struct sSirPERRoamOffloadScanReq
4174{
4175 tANI_U16 sessionId;
4176 tANI_U16 rateUpThreshold;
4177 tANI_U16 rateDownThreshold;
4178 tANI_U16 isPERRoamCCAEnabled;
4179 tANI_U32 waitPeriodForNextPERScan;
4180 tANI_U32 PERtimerThreshold;
4181 tANI_U32 PERroamTriggerPercent;
Kapil Guptac69c28a2016-08-25 14:11:17 +05304182 tANI_S16 PERRoamFullScanThreshold;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304183} tSirPERRoamOffloadScanReq, *tpSirPERRoamOffloadScanReq;
4184
4185typedef struct sSirPERRoamTriggerScanReq
4186{
4187 tANI_BOOLEAN roamScanReq;
4188} tSirPERRoamTriggerScanReq, *tpSirPERRoamTriggerScanReq;
4189
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004190#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07004191
4192#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
4193
4194//Power Parameters Type
4195typedef enum
4196{
4197 eSIR_IGNORE_DTIM = 1,
4198 eSIR_LISTEN_INTERVAL = 2,
4199 eSIR_MCAST_BCAST_FILTER = 3,
4200 eSIR_ENABLE_BET = 4,
4201 eSIR_BET_INTERVAL = 5
4202}tPowerParamType;
4203
4204//Power Parameters Value s
4205typedef struct
4206{
4207 /* Ignore DTIM */
4208 tANI_U32 uIgnoreDTIM;
4209
4210 /* DTIM Period */
4211 tANI_U32 uDTIMPeriod;
4212
4213 /* Listen Interval */
4214 tANI_U32 uListenInterval;
4215
4216 /* Broadcast Multicas Filter */
4217 tANI_U32 uBcastMcastFilter;
4218
4219 /* Beacon Early Termination */
4220 tANI_U32 uEnableBET;
4221
4222 /* Beacon Early Termination Interval */
4223 tANI_U32 uBETInterval;
4224
Yue Mac24062f2013-05-13 17:01:29 -07004225 /* MAX LI for modulated DTIM */
4226 tANI_U32 uMaxLIModulatedDTIM;
4227
Jeff Johnson295189b2012-06-20 16:38:30 -07004228}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
4229
4230typedef struct sSirTxPerTrackingParam
4231{
4232 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
4233 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
4234 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 */
4235 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
4236}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
4237
4238#ifdef WLAN_FEATURE_PACKET_FILTERING
4239/*---------------------------------------------------------------------------
4240 Packet Filtering Parameters
4241---------------------------------------------------------------------------*/
4242#define SIR_IPV4_ADDR_LEN 4
4243#define SIR_MAC_ADDR_LEN 6
4244#define SIR_MAX_FILTER_TEST_DATA_LEN 8
4245#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
4246#define SIR_MAX_NUM_FILTERS 20
4247#define SIR_MAX_NUM_TESTS_PER_FILTER 10
4248
4249//
4250// Receive Filter Parameters
4251//
4252typedef enum
4253{
4254 SIR_RCV_FILTER_TYPE_INVALID,
4255 SIR_RCV_FILTER_TYPE_FILTER_PKT,
4256 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
4257 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4258}eSirReceivePacketFilterType;
4259
4260typedef enum
4261{
4262 SIR_FILTER_HDR_TYPE_INVALID,
4263 SIR_FILTER_HDR_TYPE_MAC,
4264 SIR_FILTER_HDR_TYPE_ARP,
4265 SIR_FILTER_HDR_TYPE_IPV4,
4266 SIR_FILTER_HDR_TYPE_IPV6,
4267 SIR_FILTER_HDR_TYPE_UDP,
4268 SIR_FILTER_HDR_TYPE_MAX
4269}eSirRcvPktFltProtocolType;
4270
4271typedef enum
4272{
4273 SIR_FILTER_CMP_TYPE_INVALID,
4274 SIR_FILTER_CMP_TYPE_EQUAL,
4275 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
4276 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
4277 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
4278 SIR_FILTER_CMP_TYPE_MAX
4279}eSirRcvPktFltCmpFlagType;
4280
4281typedef struct sSirRcvPktFilterFieldParams
4282{
4283 eSirRcvPktFltProtocolType protocolLayer;
4284 eSirRcvPktFltCmpFlagType cmpFlag;
4285 /* Length of the data to compare */
4286 tANI_U16 dataLength;
4287 /* from start of the respective frame header */
4288 tANI_U8 dataOffset;
4289 /* Reserved field */
4290 tANI_U8 reserved;
4291 /* Data to compare */
4292 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
4293 /* Mask to be applied on the received packet data before compare */
4294 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
4295}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
4296
4297typedef struct sSirRcvPktFilterCfg
4298{
4299 tANI_U8 filterId;
4300 eSirReceivePacketFilterType filterType;
4301 tANI_U32 numFieldParams;
4302 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07004303 tSirMacAddr selfMacAddr;
4304 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004305 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07004306}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
4307
4308//
4309// Filter Packet Match Count Parameters
4310//
4311typedef struct sSirRcvFltPktMatchCnt
4312{
4313 tANI_U8 filterId;
4314 tANI_U32 matchCnt;
4315} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
4316
4317typedef struct sSirRcvFltPktMatchRsp
4318{
4319 tANI_U16 mesgType;
4320 tANI_U16 mesgLen;
4321
4322 /* Success or Failure */
4323 tANI_U32 status;
4324 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004325 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004326} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
4327
4328//
4329// Receive Filter Clear Parameters
4330//
4331typedef struct sSirRcvFltPktClearParam
4332{
4333 tANI_U32 status; /* only valid for response message */
4334 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07004335 tSirMacAddr selfMacAddr;
4336 tSirMacAddr bssId;
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05304337 pktFilterReqCb pktFilterCallback;
4338 void *cbCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07004339}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
4340
4341//
4342// Multicast Address List Parameters
4343//
4344typedef struct sSirRcvFltMcAddrList
4345{
4346 tANI_U32 ulMulticastAddrCnt;
4347 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07004348 tSirMacAddr selfMacAddr;
4349 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004350} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
4351#endif // WLAN_FEATURE_PACKET_FILTERING
4352
4353//
4354// Generic version information
4355//
4356typedef struct
4357{
4358 tANI_U8 revision;
4359 tANI_U8 version;
4360 tANI_U8 minor;
4361 tANI_U8 major;
4362} tSirVersionType;
4363
4364typedef struct sAniBtAmpLogLinkReq
4365{
4366 // Common for all types are requests
4367 tANI_U16 msgType; // message type is same as the request type
4368 tANI_U16 msgLen; // length of the entire request
4369 tANI_U8 sessionId; //sme Session Id
4370 void *btampHandle; //AMP context
4371
4372} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
4373
4374#ifdef WLAN_FEATURE_GTK_OFFLOAD
4375/*---------------------------------------------------------------------------
4376* WDA_GTK_OFFLOAD_REQ
4377*--------------------------------------------------------------------------*/
4378typedef struct
4379{
4380 tANI_U32 ulFlags; /* optional flags */
4381 tANI_U8 aKCK[16]; /* Key confirmation key */
4382 tANI_U8 aKEK[16]; /* key encryption key */
4383 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004384 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004385} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4386
4387/*---------------------------------------------------------------------------
4388* WDA_GTK_OFFLOAD_GETINFO_REQ
4389*--------------------------------------------------------------------------*/
4390typedef struct
4391{
4392 tANI_U16 mesgType;
4393 tANI_U16 mesgLen;
4394
4395 tANI_U32 ulStatus; /* success or failure */
4396 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4397 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4398 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4399 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004400 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004401} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4402#endif // WLAN_FEATURE_GTK_OFFLOAD
4403
4404#ifdef WLAN_WAKEUP_EVENTS
4405/*---------------------------------------------------------------------------
4406 tSirWakeReasonInd
4407---------------------------------------------------------------------------*/
4408typedef struct
4409{
4410 tANI_U16 mesgType;
4411 tANI_U16 mesgLen;
4412 tANI_U32 ulReason; /* see tWakeReasonType */
4413 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4414 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4415 HAL truncates the data (i.e. data packets) this length
4416 will be less than the actual length */
4417 tANI_U32 ulActualDataLen; /* actual length of data */
4418 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4419 see specific wake type */
4420} tSirWakeReasonInd, *tpSirWakeReasonInd;
4421#endif // WLAN_WAKEUP_EVENTS
4422
4423/*---------------------------------------------------------------------------
4424 sAniSetTmLevelReq
4425---------------------------------------------------------------------------*/
4426typedef struct sAniSetTmLevelReq
4427{
4428 tANI_U16 tmMode;
4429 tANI_U16 newTmLevel;
4430} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4431
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004432#ifdef FEATURE_WLAN_TDLS
4433/* TDLS Request struct SME-->PE */
4434typedef struct sSirTdlsSendMgmtReq
4435{
4436 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4437 tANI_U16 length;
4438 tANI_U8 sessionId; // Session ID
4439 tANI_U16 transactionId; // Transaction ID for cmd
4440 tANI_U8 reqType;
4441 tANI_U8 dialog;
4442 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004443 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304444 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004445 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4446 tSirMacAddr peerMac;
4447 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4448} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004449
4450typedef enum TdlsAddOper
4451{
4452 TDLS_OPER_NONE,
4453 TDLS_OPER_ADD,
4454 TDLS_OPER_UPDATE
4455} eTdlsAddOper;
4456
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004457/* TDLS Request struct SME-->PE */
4458typedef struct sSirTdlsAddStaReq
4459{
4460 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4461 tANI_U16 length;
4462 tANI_U8 sessionId; // Session ID
4463 tANI_U16 transactionId; // Transaction ID for cmd
4464 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004465 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004466 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004467 tANI_U16 capability;
4468 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4469 tANI_U8 supported_rates_length;
4470 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004471 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004472 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004473 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004474 tSirVHTCap vhtCap;
4475 tANI_U8 uapsd_queues;
4476 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004477} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004478
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004479/* TDLS Response struct PE-->SME */
4480typedef struct sSirTdlsAddStaRsp
4481{
4482 tANI_U16 messageType;
4483 tANI_U16 length;
4484 tSirResultCodes statusCode;
4485 tSirMacAddr peerMac;
4486 tANI_U8 sessionId; // Session ID
4487 tANI_U16 staId ;
4488 tANI_U16 staType ;
4489 tANI_U8 ucastSig;
4490 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004491 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004492} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304493
4494/* TDLS Request struct SME-->PE */
4495typedef struct
4496{
4497 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4498 tANI_U16 length;
4499 tANI_U8 sessionId; // Session ID
4500 tANI_U16 transactionId; // Transaction ID for cmd
4501 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4502 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4503 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304504 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304505 tANI_U8 isResponder; // Is Peer a responder.
4506 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4507 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304508 tANI_U8 supportedChannelsLen;
4509 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4510 tANI_U8 supportedOperClassesLen;
4511 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304512}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4513
4514/* TDLS Request struct SME-->PE */
4515typedef struct
4516{
4517 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4518 tANI_U16 length;
4519 tANI_U8 sessionId; // Session ID
4520 tANI_U16 transactionId; // Transaction ID for cmd
4521 tSirResultCodes statusCode;
4522 tSirMacAddr peerMac;
Masti, Narayanraddif10fd792015-12-15 15:01:01 +05304523 tANI_U16 sta_idx;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304524}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4525
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004526/* TDLS Request struct SME-->PE */
4527typedef struct sSirTdlsDelStaReq
4528{
4529 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4530 tANI_U16 length;
4531 tANI_U8 sessionId; // Session ID
4532 tANI_U16 transactionId; // Transaction ID for cmd
4533 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4534 tSirMacAddr peerMac;
4535} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4536/* TDLS Response struct PE-->SME */
4537typedef struct sSirTdlsDelStaRsp
4538{
4539 tANI_U16 messageType;
4540 tANI_U16 length;
4541 tANI_U8 sessionId; // Session ID
4542 tSirResultCodes statusCode;
4543 tSirMacAddr peerMac;
4544 tANI_U16 staId;
4545} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004546/* TDLS Delete Indication struct PE-->SME */
4547typedef struct sSirTdlsDelStaInd
4548{
4549 tANI_U16 messageType;
4550 tANI_U16 length;
4551 tANI_U8 sessionId; // Session ID
4552 tSirMacAddr peerMac;
4553 tANI_U16 staId;
4554 tANI_U16 reasonCode;
4555} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004556typedef struct sSirTdlsDelAllPeerInd
4557{
4558 tANI_U16 messageType;
4559 tANI_U16 length;
4560 tANI_U8 sessionId; // Session ID
4561} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004562typedef struct sSirMgmtTxCompletionInd
4563{
4564 tANI_U16 messageType;
4565 tANI_U16 length;
4566 tANI_U8 sessionId; // Session ID
4567 tANI_U32 txCompleteStatus;
4568} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Atul Mittalc0f739f2014-07-31 13:47:47 +05304569
4570//tdlsoffchan
4571/* TDLS Channel Switch struct SME-->PE */
4572typedef struct
4573{
4574 tANI_U16 messageType; //eWNI_SME_TDLS_CHANNEL_SWITCH_REQ
4575 tANI_U16 length;
4576 tANI_U8 sessionId; // Session ID
4577 tANI_U16 transactionId; // Transaction ID for cmd
4578 tANI_U8 tdlsOffCh; // Target Off Channel
4579 tANI_U8 tdlsOffChBwOffset;// Target Off Channel Bandwidth offset
4580 tANI_U8 tdlsSwMode; // TDLS Off Channel Mode
4581 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4582 tSirMacAddr peerMac;
4583}tSirTdlsChanSwitch, *tpSirTdlsChanSwitch;
4584
Atul Mittal60bd4292014-08-14 12:19:27 +05304585/* TDLS Resp struct */
4586typedef struct
4587{
4588 tANI_U16 messageType; // eWNI_SME_TDLS_CHANNEL_SWITCH_RSP
4589 tANI_U16 length;
4590 tANI_U8 sessionId; // Session ID
4591 tANI_U16 transactionId; // Transaction ID for cmd
4592 tSirResultCodes statusCode;
4593 tSirMacAddr peerMac;
Masti, Narayanraddi36c67622016-01-06 16:07:34 +05304594 tANI_U16 sta_idx;
Atul Mittal60bd4292014-08-14 12:19:27 +05304595}tSirTdlsChanSwitchReqRsp, *tpSirTdlsChanSwitchReqRsp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004596#endif /* FEATURE_WLAN_TDLS */
4597
Yathish9f22e662012-12-10 14:21:35 -08004598typedef struct sSirActiveModeSetBcnFilterReq
4599{
4600 tANI_U16 messageType;
4601 tANI_U16 length;
4602 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304603 tSirMacAddr bssid;
Yathish9f22e662012-12-10 14:21:35 -08004604} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4605
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304606typedef enum
4607{
4608 HT40_OBSS_SCAN_PARAM_START,
4609 HT40_OBSS_SCAN_PARAM_UPDATE
4610}tHT40OBssScanCmdType;
4611
4612typedef struct sSirSmeHT40StopOBSSScanInd
4613{
4614 tANI_U16 messageType;
4615 tANI_U16 length;
4616 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304617 tSirMacAddr bssid;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304618} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4619
4620typedef struct sSirSmeHT40OBSSScanInd
4621{
4622 tANI_U16 messageType;
4623 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304624 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304625} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4626
4627typedef struct sSirHT40OBSSScanInd
4628{
4629 tHT40OBssScanCmdType cmdType;
4630 tSirScanType scanType;
4631 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4632 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4633 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4634 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4635 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4636 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4637 tANI_U16 OBSSScanActivityThreshold;
4638 tANI_U8 selfStaIdx;
4639 tANI_U8 bssIdx;
4640 tANI_U8 fortyMHZIntolerent;
4641 tANI_U8 channelCount;
4642 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4643 tANI_U8 currentOperatingClass;
4644 tANI_U16 ieFieldLen;
4645 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4646} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4647
4648
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304649//Reset AP Caps Changed
4650typedef struct sSirResetAPCapsChange
4651{
4652 tANI_U16 messageType;
4653 tANI_U16 length;
4654 tSirMacAddr bssId;
4655} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004656/// Definition for Candidate found indication from FW
4657typedef struct sSirSmeCandidateFoundInd
4658{
4659 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4660 tANI_U16 length;
4661 tANI_U8 sessionId; // Session Identifier
4662} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004663
Chet Lanctot186b5732013-03-18 10:26:30 -07004664#ifdef WLAN_FEATURE_11W
4665typedef struct sSirWlanExcludeUnencryptParam
4666{
4667 tANI_BOOLEAN excludeUnencrypt;
4668 tSirMacAddr bssId;
4669}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4670#endif
4671
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004672typedef struct sAniHandoffReq
4673{
4674 // Common for all types are requests
4675 tANI_U16 msgType; // message type is same as the request type
4676 tANI_U16 msgLen; // length of the entire request
4677 tANI_U8 sessionId;
4678 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4679 tANI_U8 channel;
Selvaraj, Sridhar3714c4d2016-06-22 15:19:12 +05304680#ifndef QCA_WIFI_ISOC
4681 tANI_U8 handoff_src;
4682#endif
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004683} tAniHandoffReq, *tpAniHandoffReq;
4684
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304685typedef struct sSirScanOffloadReq {
4686 tANI_U8 sessionId;
4687 tSirMacAddr bssId;
4688 tANI_U8 numSsid;
4689 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4690 tANI_U8 hiddenSsid;
4691 tSirMacAddr selfMacAddr;
4692 tSirBssType bssType;
4693 tANI_U8 dot11mode;
4694 tSirScanType scanType;
4695 tANI_U32 minChannelTime;
4696 tANI_U32 maxChannelTime;
4697 tANI_BOOLEAN p2pSearch;
4698 tANI_U16 uIEFieldLen;
4699 tANI_U16 uIEFieldOffset;
4700 tSirChannelList channelList;
4701 /*-----------------------------
4702 sSirScanOffloadReq....
4703 -----------------------------
4704 uIEFieldLen
4705 -----------------------------
4706 uIEFieldOffset ----+
4707 ----------------------------- |
4708 channelList.numChannels |
4709 ----------------------------- |
4710 ... variable size up to |
4711 channelNumber[numChannels-1] |
4712 This can be zero, if |
4713 numChannel is zero. |
4714 ----------------------------- <--+
4715 ... variable size uIEField
4716 up to uIEFieldLen (can be 0)
4717 -----------------------------*/
4718} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304719
4720typedef enum sSirScanEventType {
4721 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4722 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4723 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4724 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4725 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4726 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4727 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4728 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4729 SCAN_EVENT_MAX=0x8000
4730} tSirScanEventType;
4731
4732typedef struct sSirScanOffloadEvent{
4733 tSirScanEventType event;
4734 tSirResultCodes reasonCode;
4735 tANI_U32 chanFreq;
4736 tANI_U32 requestor;
4737 tANI_U32 scanId;
4738} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4739
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304740typedef struct sSirUpdateChanParam
4741{
4742 tANI_U8 chanId;
4743 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004744 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304745} tSirUpdateChanParam, *tpSirUpdateChanParam;
4746
4747typedef struct sSirUpdateChan
4748{
Sachin Ahujacb64fc82015-01-12 17:01:05 +05304749 tANI_U8 regId;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304750 tANI_U8 numChan;
4751 tSirUpdateChanParam chanParam[1];
4752} tSirUpdateChanList, *tpSirUpdateChanList;
4753
Leo Chang9056f462013-08-01 19:21:11 -07004754#ifdef FEATURE_WLAN_LPHB
4755#define SIR_LPHB_FILTER_LEN 64
4756
4757typedef enum
4758{
4759 LPHB_SET_EN_PARAMS_INDID,
4760 LPHB_SET_TCP_PARAMS_INDID,
4761 LPHB_SET_TCP_PKT_FILTER_INDID,
4762 LPHB_SET_UDP_PARAMS_INDID,
4763 LPHB_SET_UDP_PKT_FILTER_INDID,
4764 LPHB_SET_NETWORK_INFO_INDID,
4765} LPHBIndType;
4766
4767typedef struct sSirLPHBEnableStruct
4768{
4769 v_U8_t enable;
4770 v_U8_t item;
4771 v_U8_t session;
4772} tSirLPHBEnableStruct;
4773
4774typedef struct sSirLPHBTcpParamStruct
4775{
4776 v_U32_t srv_ip;
4777 v_U32_t dev_ip;
4778 v_U16_t src_port;
4779 v_U16_t dst_port;
4780 v_U16_t timeout;
4781 v_U8_t session;
4782 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004783 uint16 timePeriodSec; // in seconds
4784 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004785} tSirLPHBTcpParamStruct;
4786
4787typedef struct sSirLPHBTcpFilterStruct
4788{
4789 v_U16_t length;
4790 v_U8_t offset;
4791 v_U8_t session;
4792 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4793} tSirLPHBTcpFilterStruct;
4794
4795typedef struct sSirLPHBUdpParamStruct
4796{
4797 v_U32_t srv_ip;
4798 v_U32_t dev_ip;
4799 v_U16_t src_port;
4800 v_U16_t dst_port;
4801 v_U16_t interval;
4802 v_U16_t timeout;
4803 v_U8_t session;
4804 tSirMacAddr gateway_mac;
4805} tSirLPHBUdpParamStruct;
4806
4807typedef struct sSirLPHBUdpFilterStruct
4808{
4809 v_U16_t length;
4810 v_U8_t offset;
4811 v_U8_t session;
4812 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4813} tSirLPHBUdpFilterStruct;
4814
4815typedef struct sSirLPHBReq
4816{
4817 v_U16_t cmd;
4818 v_U16_t dummy;
4819 union
4820 {
4821 tSirLPHBEnableStruct lphbEnableReq;
4822 tSirLPHBTcpParamStruct lphbTcpParamReq;
4823 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4824 tSirLPHBUdpParamStruct lphbUdpParamReq;
4825 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4826 } params;
4827} tSirLPHBReq;
4828
Leo Changd9df8aa2013-09-26 13:32:26 -07004829typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004830{
4831 v_U8_t sessionIdx;
4832 v_U8_t protocolType; /*TCP or UDP*/
4833 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004834} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004835#endif /* FEATURE_WLAN_LPHB */
4836
Yue Mab9c86f42013-08-14 15:59:08 -07004837typedef struct sSirAddPeriodicTxPtrn
4838{
4839 /* MAC Address for the adapter */
4840 tSirMacAddr macAddress;
4841
4842 tANI_U8 ucPtrnId; // Pattern ID
4843 tANI_U16 ucPtrnSize; // Pattern size
4844 tANI_U32 usPtrnIntervalMs; // In msec
4845 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4846} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4847
4848typedef struct sSirDelPeriodicTxPtrn
4849{
4850 /* MAC Address for the adapter */
4851 tSirMacAddr macAddress;
4852
4853 /* Bitmap of pattern IDs that need to be deleted */
4854 tANI_U32 ucPatternIdBitmap;
4855} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4856
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004857typedef struct sSirRateUpdateInd
4858{
4859 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4860 * param.
4861 */
4862 tANI_S32 ucastDataRate;
4863
4864 /* TX flag to differentiate between HT20, HT40 etc */
4865 tTxrateinfoflags ucastDataRateTxFlag;
4866
4867 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4868 tSirMacAddr bssid;
4869
4870 /*
4871 * 0 implies MCAST RA, positive value implies fixed rate,
4872 * -1 implies ignore this param
4873 */
Abhishek Singh00b71972016-01-07 10:51:04 +05304874 tANI_S32 rmcDataRate;//unit Mbpsx10
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004875
4876 /* TX flag to differentiate between HT20, HT40 etc */
Abhishek Singh00b71972016-01-07 10:51:04 +05304877 tTxrateinfoflags rmcDataRateTxFlag;
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004878
4879 /*
4880 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4881 * 0 implies ignore
4882 */
4883 tANI_U32 mcastDataRate24GHz;
4884
4885 /* TX flag to differentiate between HT20, HT40 etc */
4886 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4887
4888 /*
4889 * MCAST(or BCAST) fixed data rate in 5 GHz,
4890 * unit Mbpsx10, 0 implies ignore
4891 */
4892 tANI_U32 mcastDataRate5GHz;
4893
4894 /* TX flag to differentiate between HT20, HT40 etc */
4895 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4896
4897} tSirRateUpdateInd, *tpSirRateUpdateInd;
4898
Abhishek Singh00b71972016-01-07 10:51:04 +05304899#ifdef WLAN_FEATURE_RMC
4900
4901#define SIR_RMC_NUM_MAX_RULERS 8 /* HAL_NUM_MAX_RULERS */
4902typedef struct sSirSetRMCReq
4903{
4904 tANI_U16 msgType;
4905 tANI_U16 msgLen;
4906 tSirMacAddr mcastTransmitter;
4907} tSirSetRMCReq, *tpSirSetRMCReq;
4908
4909typedef struct sSirRMCInfo
4910{
4911 tANI_U32 dialogToken;
4912 tANI_U8 action;
4913 tSirMacAddr mcastRuler;
4914} tSirRMCInfo, *tpSirRMCInfo;
4915
4916typedef struct sSirRmcRulerSelectInd
4917{
4918 tANI_U16 status;
4919 tSirMacAddr mcastTransmitter;
4920 tSirMacAddr mcastGroup;
4921 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4922} tSirRmcRulerSelectInd, *tpSirRmcRulerSelectInd;
4923
4924typedef struct sSirRmcBecomeRulerInd
4925{
4926 tANI_U16 status;
4927 tSirMacAddr mcastTransmitter;
4928 tSirMacAddr mcastGroup;
4929} tSirRmcBecomeRulerInd, *tpSirRmcBecomeRulerInd;
4930
4931typedef struct sSirRmcRulerReq
4932{
4933 // Common for all types are requests
4934 tANI_U16 msgType; // message type is same as the request type
4935 tANI_U16 msgLen; // length of the entire request
4936 tANI_U8 cmd; // tRulerReqCmdType
4937 tSirMacAddr mcastTransmitter;
4938 tSirMacAddr mcastGroup;
4939 tSirMacAddr blacklist[SIR_RMC_NUM_MAX_RULERS];
4940} tSirRmcRulerReq, *tpSirRmcRulerReq;
4941
4942typedef struct sSirRmcUpdateInd
4943{
4944 // Common for all types are requests
4945 tANI_U16 msgType; // message type is same as the request type
4946 tANI_U16 msgLen; // length of the entire request
4947 tANI_U8 indication; // trulerUpdateIndType
4948 tANI_U8 role; // tRoleType
4949 tSirMacAddr mcastTransmitter;
4950 tSirMacAddr mcastGroup;
4951 tSirMacAddr mcastRuler;
4952 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4953} tSirRmcUpdateInd, *tpSirRmcUpdateInd;
4954
4955/*---------------------------------------------------------------------------
4956* tSirIbssGetPeerInfoReqParams
4957*--------------------------------------------------------------------------*/
4958typedef struct
4959{
4960 tANI_BOOLEAN allPeerInfoReqd; // If set, all IBSS peers stats are reported
4961 tANI_U8 staIdx; // If allPeerInfoReqd is not set, only stats
4962 // of peer with staIdx is reported
4963}tSirIbssGetPeerInfoReqParams, *tpSirIbssGetPeerInfoReqParams;
4964
4965/*---------------------------------------------------------------------------
4966* tSirIbssGetPeerInfoParams
4967*--------------------------------------------------------------------------*/
4968typedef struct
4969{
4970 tANI_U8 staIdx; //StaIdx
4971 tANI_U32 txRate; //Tx Rate
4972 tANI_U32 mcsIndex; //MCS Index
4973 tANI_U32 txRateFlags; //TxRate Flags
4974 tANI_S8 rssi; //RSSI
4975}tSirIbssPeerInfoParams;
4976
4977typedef struct
4978{
4979 tANI_U32 status;
4980 tANI_U8 numPeers;
4981 tSirIbssPeerInfoParams peerInfoParams[32];
4982}tSirPeerInfoRspParams, *tpSirIbssPeerInfoRspParams;
4983
4984/*---------------------------------------------------------------------------
4985* tSirIbssGetPeerInfoRspParams
4986*--------------------------------------------------------------------------*/
4987typedef struct
4988{
4989 tANI_U16 mesgType;
4990 tANI_U16 mesgLen;
4991 tSirPeerInfoRspParams ibssPeerInfoRspParams;
4992} tSirIbssGetPeerInfoRspParams, *tpSirIbssGetPeerInfoRspParams;
4993#endif /* WLAN_FEATURE_RMC */
4994
Rajeev79dbe4c2013-10-05 11:03:42 +05304995#ifdef FEATURE_WLAN_BATCH_SCAN
4996// Set batch scan resposne from FW
4997typedef struct
4998{
4999 /*maximum number of scans which FW can cache*/
5000 tANI_U32 nScansToBatch;
5001} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
5002
5003// Set batch scan request to FW
5004typedef struct
5005{
5006 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
5007 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
5008 tANI_U32 bestNetwork; /* best networks in terms of rssi */
5009 tANI_U8 rfBand; /* band to scan :
5010 0 ->both Band, 1->2.4Ghz Only
5011 and 2-> 5GHz Only */
5012 tANI_U32 rtt; /* set if required to do RTT it is not
5013 supported in current version */
5014} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
5015
5016
5017// Stop batch scan request to FW
5018typedef struct
5019{
5020 tANI_U32 param;
5021} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
5022
5023// Trigger batch scan result indication to FW
5024typedef struct
5025{
5026 tANI_U32 param;
5027} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
5028
5029// Batch scan result indication from FW
5030typedef PACKED_PRE struct PACKED_POST
5031{
5032 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08005033 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05305034 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05305035 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05305036 /*Timestamp when Network was found. Used to calculate age based on timestamp
5037 in GET_RSP msg header */
5038 tANI_U32 timestamp;
5039} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
5040
5041typedef PACKED_PRE struct PACKED_POST
5042{
5043 tANI_U32 scanId; /* Scan List ID. */
5044 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
5045 tANI_U32 numNetworksInScanList;
5046 /*Variable data ptr: Number of AP in Scan List*/
5047 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
5048 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
5049 tANI_U8 scanList[1];
5050} tSirBatchScanList, *tpSirBatchScanList;
5051
5052typedef PACKED_PRE struct PACKED_POST
5053{
5054 tANI_U32 timestamp;
5055 tANI_U32 numScanLists;
5056 boolean isLastResult;
5057 /* Variable Data ptr: Number of Scan Lists*/
5058 /* following isLastResult is data of type tSirBatchScanList
5059 * of sizeof(tSirBatchScanList) * numScanLists*/
5060 tANI_U8 scanResults[1];
5061} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
5062
5063#endif // FEATURE_WLAN_BATCH_SCAN
5064
Leo Chang0b0e45a2013-12-15 15:18:55 -08005065#ifdef FEATURE_WLAN_CH_AVOID
Abhishek Singhe34eb552015-06-18 10:12:15 +05305066#define SIR_CH_AVOID_MAX_RANGE 15
Leo Chang0b0e45a2013-12-15 15:18:55 -08005067
5068typedef struct sSirChAvoidFreqType
5069{
5070 tANI_U32 startFreq;
5071 tANI_U32 endFreq;
5072} tSirChAvoidFreqType;
5073
5074typedef struct sSirChAvoidIndType
5075{
5076 tANI_U32 avoidRangeCount;
5077 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
5078} tSirChAvoidIndType;
5079#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05305080
c_hpothu92367912014-05-01 15:18:17 +05305081typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
5082 VOS_STATUS status, void *data);
Abhishek Singh08aa7762014-12-16 13:59:03 +05305083typedef void (*tSirFWStatsCallback)(VOS_STATUS status,
5084 tSirFwStatsResult *fwStatsRsp, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05305085typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind);
5086
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305087typedef void (*tAntennaDivSelCB)(int antennaId, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05305088
5089/**
5090 * struct sir_sme_mgmt_frame_cb_req - Register a
5091 * management frame callback req
5092 * @message_type: message id
5093 * @length: msg length
5094 * @callback: callback for management frame indication
5095 */
5096struct sir_sme_mgmt_frame_cb_req
5097{
5098 tANI_U16 message_type;
5099 tANI_U16 length;
5100 sir_mgmt_frame_ind_callback callback;
5101};
5102
c_hpothu92367912014-05-01 15:18:17 +05305103typedef PACKED_PRE struct PACKED_POST
5104{
5105 tANI_U32 msgLen;
5106 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
5107 void *callback;
5108 void *data;
5109}tSirBcnMissRateReq;
5110
5111typedef PACKED_PRE struct PACKED_POST
5112{
5113 pGetBcnMissRateCB callback;
5114 void *data;
5115}tSirBcnMissRateInfo;
5116
Sunil Duttc69bccb2014-05-26 21:30:20 +05305117#ifdef WLAN_FEATURE_LINK_LAYER_STATS
5118
5119typedef struct
5120{
5121 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305122 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305123 u32 mpduSizeThreshold;
5124 u32 aggressiveStatisticsGathering;
5125}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
5126
5127typedef struct
5128{
5129 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305130 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305131 u32 paramIdMask;
5132}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
5133
5134typedef struct
5135{
5136 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305137 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305138 u32 statsClearReqMask;
5139 u8 stopReq;
5140}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
5141
Abhishek Singh3ae443b2014-10-08 11:49:27 +05305142typedef PACKED_PRE struct PACKED_POST
5143{
5144 u32 stats;
5145 tSirFWStatsCallback callback;
5146 void *data;
5147}tSirFWStatsGetReq;
5148
5149typedef PACKED_PRE struct PACKED_POST
5150{
5151 tSirFWStatsCallback callback;
5152 void *data;
5153}tSirFWStatsInfo;
5154
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305155typedef PACKED_PRE struct PACKED_POST
5156{
5157 tANI_U16 status;
5158 tANI_U32 selectedAntennaId;
5159 tANI_U32 reserved;
5160} tSirAntennaDivSelRsp, *tpSirntennaDivSelRsp;
5161
5162typedef PACKED_PRE struct PACKED_POST
5163{
5164 tAntennaDivSelCB callback;
5165 void *data;
5166 tANI_U32 reserved;
5167}tSirAntennaDiversitySelectionReq;
5168
5169typedef PACKED_PRE struct PACKED_POST
5170{
5171 tAntennaDivSelCB callback;
5172 void *data;
5173}tSirAntennaDiversitySelectionInfo;
5174
Sunil Duttc69bccb2014-05-26 21:30:20 +05305175/*---------------------------------------------------------------------------
5176 WLAN_HAL_LL_NOTIFY_STATS
5177---------------------------------------------------------------------------*/
5178
5179
5180/******************************LINK LAYER Statistics**********************/
5181
5182typedef int tSirWifiRadio;
5183typedef int tSirWifiChannel;
5184typedef int tSirwifiTxRate;
5185
5186/* channel operating width */
5187typedef PACKED_PRE enum PACKED_POST
5188{
5189 WIFI_CHAN_WIDTH_20 = 0,
5190 WIFI_CHAN_WIDTH_40 = 1,
5191 WIFI_CHAN_WIDTH_80 = 2,
5192 WIFI_CHAN_WIDTH_160 = 3,
5193 WIFI_CHAN_WIDTH_80P80 = 4,
5194 WIFI_CHAN_WIDTH_5 = 5,
5195 WIFI_CHAN_WIDTH_10 = 6,
5196} tSirWifiChannelWidth;
5197
5198typedef PACKED_PRE enum PACKED_POST
5199{
5200 WIFI_DISCONNECTED = 0,
5201 WIFI_AUTHENTICATING = 1,
5202 WIFI_ASSOCIATING = 2,
5203 WIFI_ASSOCIATED = 3,
5204 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
5205 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
5206} tSirWifiConnectionState;
5207
5208typedef PACKED_PRE enum PACKED_POST
5209{
5210 WIFI_ROAMING_IDLE = 0,
5211 WIFI_ROAMING_ACTIVE = 1,
5212} tSirWifiRoamState;
5213
5214typedef PACKED_PRE enum PACKED_POST
5215{
Dino Myclec8f3f332014-07-21 16:48:27 +05305216 WIFI_INTERFACE_UNKNOWN = -1,
Sunil Duttc69bccb2014-05-26 21:30:20 +05305217 WIFI_INTERFACE_STA = 0,
5218 WIFI_INTERFACE_SOFTAP = 1,
5219 WIFI_INTERFACE_IBSS = 2,
5220 WIFI_INTERFACE_P2P_CLIENT = 3,
5221 WIFI_INTERFACE_P2P_GO = 4,
5222 WIFI_INTERFACE_NAN = 5,
5223 WIFI_INTERFACE_MESH = 6,
5224 } tSirWifiInterfaceMode;
5225
5226// set for QOS association
5227#define WIFI_CAPABILITY_QOS 0x00000001
5228// set for protected association (802.11 beacon frame control protected bit set)
5229#define WIFI_CAPABILITY_PROTECTED 0x00000002
5230// set if 802.11 Extended Capabilities element interworking bit is set
5231#define WIFI_CAPABILITY_INTERWORKING 0x00000004
5232// set for HS20 association
5233#define WIFI_CAPABILITY_HS20 0x00000008
5234// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
5235#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
5236// set is 802.11 Country Element is present
5237#define WIFI_CAPABILITY_COUNTRY 0x00000020
5238
5239typedef PACKED_PRE struct PACKED_POST
5240{
5241 /*tSirWifiInterfaceMode*/
5242 // interface mode
Dino Myclec8f3f332014-07-21 16:48:27 +05305243 tANI_S8 mode;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305244 // interface mac address (self)
5245 tSirMacAddr macAddr;
5246 /*tSirWifiConnectionState*/
5247 // connection state (valid for STA, CLI only)
5248 tANI_U8 state;
5249 /*tSirWifiRoamState*/
5250 // roaming state
5251 tANI_U8 roaming;
5252 // WIFI_CAPABILITY_XXX (self)
5253 tANI_U32 capabilities;
5254 // null terminated SSID
5255 tANI_U8 ssid[33];
5256 // bssid
5257 tSirMacAddr bssid;
5258 // country string advertised by AP
5259 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
5260 // country string for this association
5261 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
5262} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
5263
5264/* channel information */
5265typedef PACKED_PRE struct PACKED_POST
5266{
5267 // channel width (20, 40, 80, 80+80, 160)
5268 tSirWifiChannelWidth width;
5269 // primary 20 MHz channel
5270 tSirWifiChannel centerFreq;
5271 // center frequency (MHz) first segment
5272 tSirWifiChannel centerFreq0;
5273 // center frequency (MHz) second segment
5274 tSirWifiChannel centerFreq1;
5275} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
5276
5277/* wifi rate info */
5278typedef PACKED_PRE struct PACKED_POST
5279{
5280 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
5281 tANI_U32 preamble :3;
5282 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
5283 tANI_U32 nss :2;
5284 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
5285 tANI_U32 bw :3;
5286 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
5287 // HT/VHT it would be mcs index
5288 tANI_U32 rateMcsIdx :8;
5289 // reserved
5290 tANI_U32 reserved :16;
5291 // units of 100 Kbps
5292 tANI_U32 bitrate;
5293} tSirWifiRate, *tpSirWifiRate;
5294
5295/* channel statistics */
5296typedef PACKED_PRE struct PACKED_POST
5297{
5298 // channel
5299 tSirWifiChannelInfo channel;
5300 // msecs the radio is awake (32 bits number accruing over time)
5301 tANI_U32 onTime;
5302 // msecs the CCA register is busy (32 bits number accruing over time)
5303 tANI_U32 ccaBusyTime;
5304} tSirWifiChannelStats, *tpSirWifiChannelStats;
5305
5306/* radio statistics */
5307typedef PACKED_PRE struct PACKED_POST
5308{
5309 // wifi radio (if multiple radio supported)
5310 tSirWifiRadio radio;
5311 // msecs the radio is awake (32 bits number accruing over time)
5312 tANI_U32 onTime;
5313 /* msecs the radio is transmitting
5314 * (32 bits number accruing over time)
5315 */
5316 tANI_U32 txTime;
5317 /* msecs the radio is in active receive
5318 *(32 bits number accruing over time)
5319 */
5320 tANI_U32 rxTime;
5321 /* msecs the radio is awake due to all scan
5322 * (32 bits number accruing over time)
5323 */
5324 tANI_U32 onTimeScan;
5325 /* msecs the radio is awake due to NAN
5326 * (32 bits number accruing over time)
5327 */
5328 tANI_U32 onTimeNbd;
Dino Mycle2c198072014-06-10 10:15:52 +05305329 /* msecs the radio is awake due to EXTScan
Sunil Duttc69bccb2014-05-26 21:30:20 +05305330 * (32 bits number accruing over time)
5331 */
Dino Mycle2c198072014-06-10 10:15:52 +05305332 tANI_U32 onTimeEXTScan;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305333 /* msecs the radio is awake due to roam?scan
5334 * (32 bits number accruing over time)
5335 */
5336 tANI_U32 onTimeRoamScan;
5337 /* msecs the radio is awake due to PNO scan
5338 * (32 bits number accruing over time)
5339 */
5340 tANI_U32 onTimePnoScan;
5341 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
5342 * (32 bits number accruing over time)
5343 */
5344 tANI_U32 onTimeHs20;
5345 // number of channels
5346 tANI_U32 numChannels;
5347 // channel statistics tSirWifiChannelStats
5348 tSirWifiChannelStats channels[1];
5349} tSirWifiRadioStat, *tpSirWifiRadioStat;
5350
5351/* per rate statistics */
5352typedef PACKED_PRE struct PACKED_POST
5353{
5354 // rate information
5355 tSirWifiRate rate;
5356 // number of successfully transmitted data pkts (ACK rcvd)
5357 tANI_U32 txMpdu;
5358 // number of received data pkts
5359 tANI_U32 rxMpdu;
5360 // number of data packet losses (no ACK)
5361 tANI_U32 mpduLost;
5362 // total number of data pkt retries *
5363 tANI_U32 retries;
5364 // number of short data pkt retries
5365 tANI_U32 retriesShort;
5366 // number of long data pkt retries
5367 tANI_U32 retriesLong;
5368} tSirWifiRateStat, *tpSirWifiRateStat;
5369
5370/* access categories */
5371typedef PACKED_PRE enum PACKED_POST
5372{
5373 WIFI_AC_VO = 0,
5374 WIFI_AC_VI = 1,
5375 WIFI_AC_BE = 2,
5376 WIFI_AC_BK = 3,
5377 WIFI_AC_MAX = 4,
5378} tSirWifiTrafficAc;
5379
5380/* wifi peer type */
5381typedef PACKED_PRE enum PACKED_POST
5382{
5383 WIFI_PEER_STA,
5384 WIFI_PEER_AP,
5385 WIFI_PEER_P2P_GO,
5386 WIFI_PEER_P2P_CLIENT,
5387 WIFI_PEER_NAN,
5388 WIFI_PEER_TDLS,
5389 WIFI_PEER_INVALID,
5390} tSirWifiPeerType;
5391
5392/* per peer statistics */
5393typedef PACKED_PRE struct PACKED_POST
5394{
5395 // peer type (AP, TDLS, GO etc.)
5396 tSirWifiPeerType type;
5397 // mac address
5398 tSirMacAddr peerMacAddress;
5399 // peer WIFI_CAPABILITY_XXX
5400 tANI_U32 capabilities;
5401 // number of rates
5402 tANI_U32 numRate;
5403 // per rate statistics, number of entries = num_rate
5404 tSirWifiRateStat rateStats[1];
5405} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5406
5407/* per access category statistics */
5408typedef PACKED_PRE struct PACKED_POST
5409{
5410 /*tSirWifiTrafficAc*/
5411 // access category (VI, VO, BE, BK)
5412 tANI_U8 ac;
5413 // number of successfully transmitted unicast data pkts (ACK rcvd)
5414 tANI_U32 txMpdu;
5415 // number of received unicast mpdus
5416 tANI_U32 rxMpdu;
5417 // number of succesfully transmitted multicast data packets
5418 // STA case: implies ACK received from AP for the unicast
5419 // packet in which mcast pkt was sent
5420 tANI_U32 txMcast;
5421 // number of received multicast data packets
5422 tANI_U32 rxMcast;
5423 // number of received unicast a-mpdus
5424 tANI_U32 rxAmpdu;
5425 // number of transmitted unicast a-mpdus
5426 tANI_U32 txAmpdu;
5427 // number of data pkt losses (no ACK)
5428 tANI_U32 mpduLost;
5429 // total number of data pkt retries
5430 tANI_U32 retries;
5431 // number of short data pkt retries
5432 tANI_U32 retriesShort;
5433 // number of long data pkt retries
5434 tANI_U32 retriesLong;
5435 // data pkt min contention time (usecs)
5436 tANI_U32 contentionTimeMin;
5437 // data pkt max contention time (usecs)
5438 tANI_U32 contentionTimeMax;
5439 // data pkt avg contention time (usecs)
5440 tANI_U32 contentionTimeAvg;
5441 // num of data pkts used for contention statistics
5442 tANI_U32 contentionNumSamples;
5443} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5444
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305445#ifdef FEATURE_EXT_LL_STAT
5446typedef PACKED_PRE struct PACKED_POST
5447{
5448 /* Average Beacon spread offset is the averaged
5449 * time delay between TBTT and beacon TSF
5450 */
5451 tANI_U64 avg_bcn_spread;
5452 /* Average number of frames received from AP after
5453 * receiving the ACK for a frame with PM=1
5454 */
5455 tANI_U32 avg_rx_frms_leaked;
5456 /* Rx leak watch window currently in force to minimize data loss
5457 * because of leaky AP. Rx leak window is the time driver waits
5458 * before shutting down the radio or switching the channel and
5459 * after receiving an ACK for a data frame with PM bit set)
5460 */
5461 tANI_U32 rx_leak_window;
5462
5463 /* Takes value of 1 if AP leaks packets after sending
5464 * an ACK for PM=1 otherwise 0
5465 */
5466 tANI_U32 is_leaky_ap;
5467
5468} tSirWifiIfaceLeakyApStat, *tpSirWifiIfaceLeakyApStat;
5469#endif
5470
Sunil Duttc69bccb2014-05-26 21:30:20 +05305471/* Interface statistics - corresponding to 2nd most
5472 * LSB in wifi statistics bitmap for getting statistics
5473 */
5474typedef PACKED_PRE struct PACKED_POST
5475{
5476 // current state of the interface
5477 tSirWifiInterfaceInfo info;
5478 // access point beacon received count from connected AP
5479 tANI_U32 beaconRx;
5480 // access point mgmt frames received count from
5481 // connected AP (including Beacon)
5482 tANI_U32 mgmtRx;
5483 // action frames received count
5484 tANI_U32 mgmtActionRx;
5485 // action frames transmit count
5486 tANI_U32 mgmtActionTx;
5487 // access Point Beacon and Management frames RSSI (averaged)
Dino Mycle3b9536d2014-07-09 22:05:24 +05305488 tANI_S32 rssiMgmt;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305489 // access Point Data Frames RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305490 tANI_S32 rssiData;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305491 // access Point ACK RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305492 tANI_S32 rssiAck;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305493 // per ac data packet statistics
5494 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305495#ifdef FEATURE_EXT_LL_STAT
5496 //Leaky Ap Stats
5497 tSirWifiIfaceLeakyApStat leakyApStat;
5498#endif
Sunil Duttc69bccb2014-05-26 21:30:20 +05305499} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5500
5501/* Peer statistics - corresponding to 3rd most LSB in
5502 * wifi statistics bitmap for getting statistics
5503 */
5504typedef PACKED_PRE struct PACKED_POST
5505{
5506 // number of peers
5507 tANI_U32 numPeers;
5508 // per peer statistics
5509 tSirWifiPeerInfo peerInfo[1];
5510} tSirWifiPeerStat, *tpSirWifiPeerStat;
5511
5512/* wifi statistics bitmap for getting statistics */
5513#define WMI_LINK_STATS_RADIO 0x00000001
5514#define WMI_LINK_STATS_IFACE 0x00000002
5515#define WMI_LINK_STATS_ALL_PEER 0x00000004
5516#define WMI_LINK_STATS_PER_PEER 0x00000008
5517
5518/* wifi statistics bitmap for clearing statistics */
5519// all radio statistics
5520#define WIFI_STATS_RADIO 0x00000001
5521// cca_busy_time (within radio statistics)
5522#define WIFI_STATS_RADIO_CCA 0x00000002
5523// all channel statistics (within radio statistics)
5524#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5525// all scan statistics (within radio statistics)
5526#define WIFI_STATS_RADIO_SCAN 0x00000008
5527// all interface statistics
5528#define WIFI_STATS_IFACE 0x00000010
5529// all tx rate statistics (within interface statistics)
5530#define WIFI_STATS_IFACE_TXRATE 0x00000020
5531// all ac statistics (within interface statistics)
5532#define WIFI_STATS_IFACE_AC 0x00000040
5533// all contention (min, max, avg) statistics (within ac statistics)
5534#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5535
5536typedef PACKED_PRE struct PACKED_POST
5537{
5538 tANI_U32 paramId;
5539 tANI_U8 ifaceId;
5540 tANI_U32 respId;
5541 tANI_U32 moreResultToFollow;
5542 tANI_U8 result[1];
5543} tSirLLStatsResults, *tpSirLLStatsResults;
5544
5545#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5546
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05305547
5548
Dino Mycle2c198072014-06-10 10:15:52 +05305549#ifdef WLAN_FEATURE_EXTSCAN
5550
5551typedef enum
5552{
5553 WIFI_BAND_UNSPECIFIED,
5554 WIFI_BAND_BG = 1, // 2.4 GHz
5555 WIFI_BAND_A = 2, // 5 GHz without DFS
5556 WIFI_BAND_ABG = 3, // 2.4 GHz + 5 GHz; no DFS
5557 WIFI_BAND_A_DFS_ONLY = 4, // 5 GHz DFS only
5558 // 5 is reserved
5559 WIFI_BAND_A_WITH_DFS = 6, // 5 GHz with DFS
5560 WIFI_BAND_ABG_WITH_DFS = 7, // 2.4 GHz + 5 GHz with DFS
5561
5562 /* Keep it last */
5563 WIFI_BAND_MAX
5564} tWifiBand;
5565
5566/* wifi scan related events */
5567typedef enum
5568{
5569 WIFI_SCAN_BUFFER_FULL,
5570 WIFI_SCAN_COMPLETE,
5571} tWifiScanEventType;
5572
5573typedef struct
5574{
5575 tSirMacAddr bssid; // AP BSSID
5576 tANI_S32 low; // low threshold
5577 tANI_S32 high; // high threshold
Dino Mycle2c198072014-06-10 10:15:52 +05305578} tSirAPThresholdParam, *tpSirAPThresholdParam;
5579
5580typedef struct
5581{
5582 tANI_U32 requestId;
5583 tANI_U8 sessionId;
5584} tSirGetEXTScanCapabilitiesReqParams, *tpSirGetEXTScanCapabilitiesReqParams;
5585
5586typedef struct
5587{
5588 tANI_U32 requestId;
5589 tANI_U32 status;
5590
5591 tANI_U32 scanCacheSize;
5592 tANI_U32 scanBuckets;
5593 tANI_U32 maxApPerScan;
5594 tANI_U32 maxRssiSampleSize;
5595 tANI_U32 maxScanReportingThreshold;
5596
5597 tANI_U32 maxHotlistAPs;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305598 tANI_U32 maxHotlistSSIDs;
Dino Mycle2c198072014-06-10 10:15:52 +05305599
5600 tANI_U32 maxBsidHistoryEntries;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305601
Dino Mycle2c198072014-06-10 10:15:52 +05305602} tSirEXTScanCapabilitiesEvent, *tpSirEXTScanCapabilitiesEvent;
5603
5604/* WLAN_HAL_EXT_SCAN_RESULT_IND */
5605typedef struct
5606{
5607 tANI_U32 requestId;
5608 tANI_U8 sessionId;
5609
5610 /*
5611 * 1 return cached results and flush it
5612 * 0 return cached results and do not flush
5613 */
5614 tANI_BOOLEAN flush;
5615} tSirEXTScanGetCachedResultsReqParams, *tpSirEXTScanGetCachedResultsReqParams;
5616
5617typedef PACKED_PRE struct PACKED_POST
5618{
5619 tANI_U32 requestId;
5620 tANI_U32 status;
5621} tSirEXTScanGetCachedResultsRspParams, *tpSirEXTScanGetCachedResultsRspParams;
5622
5623typedef PACKED_PRE struct PACKED_POST
5624{
5625 tANI_U64 ts; // time of discovery
5626 tANI_U8 ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; // null terminated SSID
5627 tSirMacAddr bssid; // BSSID
5628 tANI_U32 channel; // channel frequency in MHz
5629 tANI_S32 rssi; // RSSI in dBm
5630 tANI_U32 rtt; // RTT in nanoseconds
5631 tANI_U32 rtt_sd; // standard deviation in rtt
5632 tANI_U16 beaconPeriod; // period advertised in the beacon
5633 tANI_U16 capability; // capabilities advertised in the beacon
5634} tSirWifiScanResult, *tpSirWifiScanResult;
5635
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305636/**
5637 * struct tExtscanCachedScanResult - extscan cached scan result
5638 * @scan_id: a unique identifier for the scan unit
5639 * @flags: a bitmask with additional information about scan
5640 * @num_results: number of bssids retrieved by the scan
5641 * @ap: wifi scan bssid results info
5642 */
5643
5644typedef PACKED_PRE struct PACKED_POST
5645{
5646 tANI_U16 scan_id;
5647 tANI_U8 flags;
5648 tANI_U8 num_results;
5649
5650 tSirWifiScanResult ap[32];
5651} tExtscanCachedScanResult, *tpExtscanCachedScanResult;
5652
Dino Mycle2c198072014-06-10 10:15:52 +05305653/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
5654
5655typedef PACKED_PRE struct PACKED_POST
5656{
5657 tANI_U32 requestId;
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305658 tANI_BOOLEAN bss_found;
5659 tANI_U32 numHotlistBss; // numbers of APs
5660
5661 /*
5662 * 0 for last fragment
5663 * 1 still more fragment(s) coming
5664 */
5665 tANI_BOOLEAN moreData;
5666 tSirWifiScanResult bssHotlist[1];
5667} tSirEXTScanHotlistMatch, *tpSirEXTScanHotlistMatch;
5668
Anurag Chouhan83026002016-12-13 22:46:21 +05305669#ifdef DHCP_SERVER_OFFLOAD
5670/**
5671 * sir_dhcp_srv_offload_info_t - dhcp server offload info
5672 * @bssidx: bss index
5673 * @dhcp_srv_offload_enabled: enable or disable
5674 * @dhcp_client_num: number of clients supported
5675 * @dhcp_srv_ip: server ip address
5676 * @start_lsb: lsb of start address of dhcp pool
5677 */
5678typedef struct
5679{
5680 tANI_U8 bssidx;
5681 tANI_U32 dhcp_srv_offload_enabled;
5682 tANI_U32 dhcp_client_num;
5683 tANI_U32 dhcp_srv_ip;
5684 tANI_U32 start_lsb;
5685 dhcp_offload_req_cb dhcp_offload_callback;
5686 void *dhcp_server_offload_cb_context;
5687} sir_dhcp_srv_offload_info_t, *sir_dhcp_srv_offload_info;
5688#endif /* DHCP_SERVER_OFFLOAD */
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305689
Anurag Chouhan0b29de02016-12-16 13:18:40 +05305690#ifdef MDNS_OFFLOAD
5691#define MAX_MDNS_FQDN_LEN 64
5692#define MAX_MDNS_RESP_LEN 512
5693
5694typedef struct
5695{
5696 tANI_U8 bss_idx;
5697 tANI_U32 enable;
5698 mdns_enable_req_cb mdns_enable_callback;
5699 void *mdns_enable_cb_context;
5700} sir_mdns_offload_info_t, *sir_mdns_offload_info;
5701
5702typedef struct
5703{
5704 tANI_U8 bss_idx;
5705 tANI_U32 fqdn_type;
5706 tANI_U32 fqdn_len;
5707 tANI_U8 fqdn_data[MAX_MDNS_FQDN_LEN];
5708 mdns_fqdn_req_cb mdns_fqdn_callback;
5709 void *mdns_fqdn_cb_context;
5710
5711} sir_mdns_fqdn_info_t, *sir_mdns_fqdn_info;
5712
5713typedef struct
5714{
5715 tANI_U8 bss_idx;
5716 tANI_U32 resourceRecord_count;
5717 tANI_U32 resp_len;
5718 tANI_U8 resp_data[MAX_MDNS_RESP_LEN];
5719 mdns_resp_req_cb mdns_resp_callback;
5720 void *mdns_resp_cb_context;
5721} sir_mdns_resp_info_t, *sir_mdns_resp_info;
5722
5723typedef struct
5724{
5725 tANI_U8 bss_idx;
5726} sir_get_mdns_stats_info_t, *sir_get_mdns_stats_info;
5727#endif /* MDNS_OFFLOAD */
5728
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305729typedef PACKED_PRE struct PACKED_POST
5730{
5731 tANI_U32 requestId;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305732 /*
5733 * It gives number of scan ids
5734 */
5735 tANI_U32 scanResultSize;
Dino Mycle2c198072014-06-10 10:15:52 +05305736
5737 /*
5738 * 0 for last fragment
5739 * 1 still more fragment(s) coming
5740 */
5741 tANI_BOOLEAN moreData;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305742 tANI_U8 result[1];
Dino Mycle2c198072014-06-10 10:15:52 +05305743} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
5744
5745typedef PACKED_PRE struct PACKED_POST
5746{
5747 tANI_U8 elemId; // Element Identifier
5748 tANI_U8 ieLength; // length of IE data
5749 tANI_U8 *IEs; // IEs
5750} tSirInformationElement, *tpSirInformationElement;
5751
5752/* Reported when each probe response is received, if reportEvents
5753* enabled in tSirWifiScanCmdReqParams */
5754typedef struct
5755{
5756 tANI_U32 requestId;
5757
5758 /*
5759 * 0 for last fragment
5760 * 1 still more fragment(s) coming
5761 */
5762 tANI_BOOLEAN moreData;
5763 tSirWifiScanResult ap; // only 1 AP info for now
5764 tANI_U32 ieLength;
5765 tSirInformationElement *ie;
5766} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
5767
5768
5769typedef struct
5770{
5771 tANI_U32 channel; // frequency
5772 tANI_U32 dwellTimeMs; // dwell time hint
5773 tANI_U8 passive; // 0 => active,
5774 // 1 => passive scan; ignored for DFS
5775 tANI_U8 chnlClass;
5776} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
5777
5778typedef struct
5779{
5780 tANI_U8 bucket; // bucket index, 0 based
5781 tWifiBand band; // when UNSPECIFIED, use channel list
5782
5783 /*
5784 * desired period, in millisecond; if this is too
5785 * low, the firmware should choose to generate results as fast as
5786 * it can instead of failing the command byte
5787 */
5788 tANI_U32 period;
5789
5790 /*
5791 * 0 => normal reporting (reporting rssi history
5792 * only, when rssi history buffer is % full)
5793 * 1 => same as 0 + report a scan completion event after scanning
5794 * this bucket
5795 * 2 => same as 1 + forward scan results (beacons/probe responses + IEs)
5796 * in real time to HAL
5797 */
5798 tANI_U8 reportEvents;
5799
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305800 tANI_U32 max_period;
5801 tANI_U32 exponent;
5802 tANI_U32 step_count;
5803
Dino Mycle2c198072014-06-10 10:15:52 +05305804 tANI_U8 numChannels;
5805
5806 /*
5807 * channels to scan; these may include DFS channels
5808 */
5809 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
5810} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
5811
5812typedef struct
5813{
5814 tANI_U32 requestId;
5815 tANI_U8 sessionId;
5816 tANI_U32 basePeriod; // base timer period
5817 tANI_U32 maxAPperScan;
5818
5819 /* in %, when buffer is this much full, wake up host */
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305820 tANI_U32 reportThresholdPercent;
5821 tANI_U32 reportThresholdNumScans;
Dino Mycle2c198072014-06-10 10:15:52 +05305822
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305823 tANI_U32 homeAwayTime; //in units of milliseconds
5824
5825 tANI_U8 numBuckets;
Dino Mycle2c198072014-06-10 10:15:52 +05305826 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
5827} tSirEXTScanStartReqParams, *tpSirEXTScanStartReqParams;
5828
5829typedef PACKED_PRE struct PACKED_POST
5830{
5831 tANI_U32 requestId;
5832 tANI_U32 status;
5833} tSirEXTScanStartRspParams, *tpSirEXTScanStartRspParams;
5834
5835typedef struct
5836{
5837 tANI_U32 requestId;
5838 tANI_U8 sessionId;
5839} tSirEXTScanStopReqParams, *tpSirEXTScanStopReqParams;
5840
5841typedef PACKED_PRE struct PACKED_POST
5842{
5843 tANI_U32 requestId;
5844 tANI_U32 status;
5845} tSirEXTScanStopRspParams, *tpSirEXTScanStopRspParams;
5846
5847typedef struct
5848{
5849 tANI_U32 requestId;
5850 tANI_U8 sessionId; // session Id mapped to vdev_id
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305851 tANI_U32 lostBssidSampleSize;
5852 tANI_U32 numBssid; // number of hotlist APs
Dino Mycle2c198072014-06-10 10:15:52 +05305853 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; // hotlist APs
5854} tSirEXTScanSetBssidHotListReqParams, *tpSirEXTScanSetBssidHotListReqParams;
5855
5856typedef PACKED_PRE struct PACKED_POST
5857{
5858 tANI_U32 requestId;
5859 tANI_U32 status;
5860} tSirEXTScanSetBssidHotListRspParams, *tpSirEXTScanSetBssidHotListRspParams;
5861
5862typedef struct
5863{
5864 tANI_U32 requestId;
5865 tANI_U8 sessionId;
5866} tSirEXTScanResetBssidHotlistReqParams, *tpSirEXTScanResetBssidHotlistReqParams;
5867
5868typedef PACKED_PRE struct PACKED_POST
5869{
5870 tANI_U32 requestId;
5871 tANI_U32 status;
5872} tSirEXTScanResetBssidHotlistRspParams, *tpSirEXTScanResetBssidHotlistRspParams;
5873
Dino Mycle2c198072014-06-10 10:15:52 +05305874/*---------------------------------------------------------------------------
5875 * * WLAN_HAL_EXTSCAN_RESULT_AVAILABLE_IND
5876 * *-------------------------------------------------------------------------*/
5877typedef PACKED_PRE struct PACKED_POST
5878{
5879 tANI_U32 requestId;
5880 tANI_U32 numResultsAvailable;
5881} tSirEXTScanResultsAvailableIndParams,
5882 *tpSirEXTScanResultsAvailableIndParams;
5883
5884typedef PACKED_PRE struct PACKED_POST
5885{
5886 tANI_U8 scanEventType;
5887 tANI_U32 status;
5888} tSirEXTScanOnScanEventIndParams,
5889 *tpSirEXTScanOnScanEventIndParams;
5890
5891/*---------------------------------------------------------------------------
5892 * * WLAN_HAL_EXTSCAN_PROGRESS_IND
5893 * *-------------------------------------------------------------------------*/
5894
5895typedef PACKED_PRE enum PACKED_POST
5896{
5897 WLAN_HAL_EXTSCAN_BUFFER_FULL,
5898 WLAN_HAL_EXTSCAN_COMPLETE,
5899}tSirEXTScanProgressEventType;
5900
5901typedef PACKED_PRE struct PACKED_POST
5902{
5903 tANI_U32 requestId;
5904 tANI_U32 status;
5905 tSirEXTScanProgressEventType extScanEventType;
5906}tSirEXTScanProgressIndParams,
5907 *tpSirEXTScanProgressIndParams;
5908
Padma, Santhosh Kumarc1f7f052015-08-26 12:29:01 +05305909typedef PACKED_PRE struct PACKED_POST
5910{
5911 tANI_BOOLEAN pause; // 1 -> pause, 0 -> unpause
5912 tANI_U32 reserved; //reserved for future use
5913}tSirHighPriorityDataInfoInd, *tpSirHighPriorityDataInfoInd;
Dino Mycle2c198072014-06-10 10:15:52 +05305914
5915#endif /* WLAN_FEATURE_EXTSCAN */
5916
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +05305917typedef struct
5918{
5919 tANI_U16 messageType;
5920 tANI_U16 length;
5921 tSirMacAddr macAddr;
5922} tSirSpoofMacAddrReq, *tpSirSpoofMacAddrReq;
5923
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05305924typedef struct
5925{
5926 //BIT order is most likely little endian.
5927 //This structure is for netowkr-order byte array (or big-endian byte order)
5928#ifndef WLAN_PAL_BIG_ENDIAN_BIT
5929 tANI_U8 protVer :2;
5930 tANI_U8 type :2;
5931 tANI_U8 subType :4;
5932
5933 tANI_U8 toDS :1;
5934 tANI_U8 fromDS :1;
5935 tANI_U8 moreFrag :1;
5936 tANI_U8 retry :1;
5937 tANI_U8 powerMgmt :1;
5938 tANI_U8 moreData :1;
5939 tANI_U8 wep :1;
5940 tANI_U8 order :1;
5941
5942#else
5943
5944 tANI_U8 subType :4;
5945 tANI_U8 type :2;
5946 tANI_U8 protVer :2;
5947
5948 tANI_U8 order :1;
5949 tANI_U8 wep :1;
5950 tANI_U8 moreData :1;
5951 tANI_U8 powerMgmt :1;
5952 tANI_U8 retry :1;
5953 tANI_U8 moreFrag :1;
5954 tANI_U8 fromDS :1;
5955 tANI_U8 toDS :1;
5956
5957#endif
5958
5959} tSirFC;
5960
5961typedef struct
5962{
5963 /* Frame control field */
5964 tSirFC frameCtrl;
5965 /* Duration ID */
5966 tANI_U16 usDurationId;
5967 /* Address 1 field */
5968 tSirMacAddr vA1;
5969 /* Address 2 field */
5970 tSirMacAddr vA2;
5971 /* Address 3 field */
5972 tSirMacAddr vA3;
5973 /* Sequence control field */
5974 tANI_U16 sSeqCtrl;
5975 /* Optional A4 address */
5976 tSirMacAddr optvA4;
5977 /* Optional QOS control field */
5978 tANI_U16 usQosCtrl;
5979}tSir80211Header;
5980// Definition for Encryption Keys
5981//typedef struct sSirKeys
5982typedef struct
5983{
5984 tANI_U8 keyId;
5985 tANI_U8 unicast; // 0 for multicast
5986 tAniKeyDirection keyDirection;
5987 tANI_U8 keyRsc[WLAN_MAX_KEY_RSC_LEN]; // Usage is unknown
5988 tANI_U8 paeRole; // =1 for authenticator,
5989 // =0 for supplicant
5990 tANI_U16 keyLength;
5991 tANI_U8 key[SIR_MAC_MAX_KEY_LENGTH];
5992} tMacKeys, *tpMacKeys;
5993
5994typedef enum
5995{
5996 eMAC_WEP_STATIC,
5997 eMAC_WEP_DYNAMIC,
5998} tMacWepType;
5999
6000/*
6001 * This is used by PE to configure the key information on a given station.
6002 * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
6003 * a preconfigured key from a BSS the station assoicated with; otherwise
6004 * a new key descriptor is created based on the key field.
6005 */
6006//typedef struct
6007typedef struct
6008{
6009 tANI_U16 staIdx;
6010 tAniEdType encType; // Encryption/Decryption type
6011 tMacWepType wepType; // valid only for WEP
6012 tANI_U8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
6013 tMacKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
6014 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
6015 tANI_U8 sessionId; // PE session id for PE<->HAL interface
6016} tSirSetStaKeyParams, *tpSirSetStaKeyParams;
6017
6018//typedef struct
6019typedef struct
6020{
6021 tSirSetStaKeyParams keyParams;
6022 tANI_U8 pn[6];
6023}tSirencConfigParams;
6024
6025typedef struct
6026{
6027 tANI_U16 length;
6028 tANI_U8 data[WLAN_DISA_MAX_PAYLOAD_SIZE];
6029}tSirpayload;
6030
6031typedef struct
6032{
6033 tSir80211Header macHeader;
6034 tSirencConfigParams encParams;
6035 tSirpayload data;
6036}tSirpkt80211;
6037
6038typedef struct
6039{
6040 tANI_U32 status;
6041 tSirpayload encryptedPayload;
6042} tSetEncryptedDataRspParams, *tpSetEncryptedDataRspParams;
6043
6044typedef struct
6045{
6046 tANI_U16 mesgType;
6047 tANI_U16 mesgLen;
6048 tSetEncryptedDataRspParams encryptedDataRsp;
6049} tSirEncryptedDataRspParams, *tpSirEncryptedDataRspParams;
c_hpothua3d45d52015-01-05 14:11:17 +05306050
6051typedef enum eSirAbortScanStatus
6052{
6053 eSIR_ABORT_ACTIVE_SCAN_LIST_EMPTY,
6054 eSIR_ABORT_ACTIVE_SCAN_LIST_NOT_EMPTY,
6055 eSIR_ABORT_SCAN_FAILURE
6056}tSirAbortScanStatus;
6057
Masti, Narayanraddi4b359dd2015-02-03 15:49:29 +05306058/* Max number of rates allowed in Supported Rates IE */
6059#define MAX_NUM_SUPPORTED_RATES (8)
6060
Girish Gowlia95daca2015-02-04 20:31:31 +05306061typedef struct sSirSmeUpdateMaxRateParams
6062{
6063 tANI_U32 maxRateFlag;
6064 tANI_U8 smeSessionId;
6065}tSirSmeUpdateMaxRateParams, *tpSirSmeUpdateMaxRateParams;
6066
Srinivas Dasari32a79262015-02-19 13:04:49 +05306067typedef struct
6068{
6069 tANI_U32 event_data_len;
6070 tANI_U8 event_data[1];
6071} tSirNanEvent, *tpSirNanEvent;
Ganesh Kondabattinib18b3292015-03-16 16:59:26 +05306072
6073typedef struct
6074{
6075 tANI_U32 txCompleteStatus;
6076 tANI_U32 txBdToken;
6077}tSirTxBdStatus, *tpSirTxBdStatus;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05306078
6079/* enable or disable 20_40 BSS Coexistence IE in TDLS frames*/
6080typedef struct
6081{
6082 // Common for all types are requests
6083 tANI_U16 msgType; // message type is same as the request type
6084 tANI_U16 msgLen; // length of the entire request
6085 tANI_U8 SetTdls2040BSSCoex; //enabled or disabled
6086} tAniSetTdls2040BSSCoex, *tpAniSetTdls2040BSSCoex;
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05306087
Sushant Kaushik8e644982015-09-23 12:18:54 +05306088/**
6089 * struct sir_wifi_start_log - Structure to store the params sent to start/
6090 * stop logging
6091 * @ringId: Attribute which indicates the type of logging like per packet
6092 * statistics, connectivity etc.
6093 * @verboseLevel: Verbose level which can be 0,1,2,3
6094 * @flag: Flag field for future use
6095 */
6096typedef struct sir_wifi_start_log {
6097 tANI_U32 ringId;
6098 tANI_U32 verboseLevel;
6099 tANI_U32 flag;
6100}tAniWifiStartLog, *tpAniWifiStartLog;
6101
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05306102typedef struct
6103{
6104 tANI_U16 mesgType;
6105 tANI_U16 mesgLen;
6106 tSirMacAddr bssid;
6107}tSirDelAllTdlsPeers, *ptSirDelAllTdlsPeers;
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306108
6109typedef void (*tSirMonModeCb)(tANI_U32 *magic, struct completion *cmpVar);
6110typedef struct
6111{
6112 tANI_U32 *magic;
6113 struct completion *cmpVar;
6114 void *data;
6115 tSirMonModeCb callback;
6116}tSirMonModeReq, *ptSirMonModeReq;
c_manjeecfd1efb2015-09-25 19:32:34 +05306117
6118/**
6119 * struct tAniFwrDumpRsp - firmware dump response details.
6120 *
6121 * This structure is used to store the firmware dump
6122 * response from the firmware.
6123 */
6124typedef struct
6125{
6126 tANI_U32 dump_status;
6127}tAniFwrDumpRsp, *tpAniFwrDumpRsp;
6128
6129typedef void (*FWMemDumpReqCb)(void *fwMemDumpReqContext, tAniFwrDumpRsp *dump_rsp);
6130
6131/**
6132 * struct tAniFwrDumpReq - firmware memory dump request details.
6133.*.@FWMemDumpReqCb - Associated Callback
6134 *.@fwMemDumpReqContext - Callback context
6135 * @reserved - reserved field 1.
6136 *
6137 * This structure carries information about the firmware
6138 * memory dump request.
6139 */
6140typedef struct
6141{
6142 FWMemDumpReqCb fwMemDumpReqCallback;
6143 void * fwMemDumpReqContext;
6144 tANI_U32 reserved1;
6145}tAniFwrDumpReq, *tpAniFwrDumpReq;
6146
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05306147/**
6148* struct tSetWifiConfigParams - Structure to store the wificonfig related params
6149* @paramType: 1. Average Stats factor 2. Guard type
6150* @paramvalue: Value to be set in the firmware.
6151* @bssId: macaddr of the connected BssId
6152*/
6153typedef struct
6154{
6155 tANI_U8 paramType;
6156 tANI_U8 sessionId;
6157 tANI_U32 paramValue;
6158 tSirMacAddr bssId;
6159} tSetWifiConfigParams, *tpSetWifiConfigParams;
6160
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306161typedef struct {
6162 tANI_U8 param;
6163 tANI_U32 value;
6164} tModifyRoamParamsReqParams, * tpModifyRoamParamsReqParams;
6165
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306166#ifdef SAP_AUTH_OFFLOAD
6167/* 80211 Pre-Share Key length */
6168#define SIR_PSK_MAX_LEN 64
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306169
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306170/**
6171 * enum tSirSecurityType - definition for Software AP Auth Offload
6172 * Security Type
6173 * @eSIR_OFFLOAD_NONE: None type security
6174 * @eSIR_OFFLOAD_WPA2PSK_CCMP: WPA2-PSK
6175 */
6176enum tSirSecurityType
6177{
6178 eSIR_OFFLOAD_NONE,
6179 eSIR_OFFLOAD_WPA2PSK_CCMP,
6180};
6181
6182/**
6183 * struct tSirSapOffloadInfo - Structure to store sap offload related params.
6184 * @macAddr: Self mac address
6185 * @sap_auth_offload_enable: tell if sap auth offload is enabled or not.
6186 * @sap_auth_offload_sec_type: tells security type
6187 * 0 - none
6188 * 1 - WPA1-PSK
6189 * @key_len: psk key length
6190 * @key: psk key.
6191 */
6192struct tSirSapOffloadInfo
6193{
6194 tSirMacAddr macAddr;
6195 bool sap_auth_offload_enable;
6196 uint32_t sap_auth_offload_sec_type;
6197 uint32_t key_len;
6198 uint8_t key[SIR_PSK_MAX_LEN];
6199};
Agrawal Ashisha8e8a722016-10-18 19:07:45 +05306200
6201typedef PACKED_PRE struct PACKED_POST
6202{
6203 /** staId returned from firmware for each STA association to SAP */
6204 tANI_U8 staIdx;
6205 /** bssIdx on which the STA is added */
6206 tANI_U8 bssIdx;
6207 /** DPU desc index of this station */
6208 tANI_U8 dpuIndex;
6209 /** Bcast DPU index of this station */
6210 tANI_U8 bcastDpuIndex;
6211 /** Bcast DPU Management index of this station */
6212 tANI_U8 bcastMgmtDpuIdx;
6213
6214 tANI_U8 ucUcastSig;
6215
6216 tANI_U8 ucBcastSig;
6217
6218 tANI_U8 ucMgmtSig;
6219 /** aid (association id) of this station */
6220 tANI_U32 assoc_id;
6221 /** peer station's mac addr */
6222 tSirMacAddr peer_macaddr;
6223 /** length of association request frame */
6224 tANI_U32 data_len;
6225 /* Following this structure is the byte stream of a whole
6226 * association request frame of length data_len
6227 */
6228 tANI_U8 bufp[1];
6229} tSapOfldAddStaIndMsg, *tpSapOfldAddStaIndMsg;
6230
6231typedef enum
6232{
6233 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
6234 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
6235} eSapOfldDelStaFlags;
6236
6237typedef PACKED_PRE struct PACKED_POST
6238{
6239 tANI_U32 staIdx;
6240 /** bssIdx on which the STA is added */
6241 tANI_U32 bssIdx;
6242 /** aid (association id) of this station */
6243 tANI_U32 assoc_id;
6244 /** peer station's mac addr */
6245 tSirMacAddr peer_macaddr;
6246 /** disassociation reason */
6247 tANI_U32 reason;
6248 /** flags - wmi_sap_ofl_del_sta_flags */
6249 tANI_U32 flags;
6250} tSapOfldDelStaIndMsg, *tpSapOfldDelStaIndMsg;
6251
6252typedef enum
6253{
6254 SAP_OFFLOAD_ADD_STA_IND = 0x00,
6255 SAP_OFFLOAD_DEL_STA_IND = 0x01,
6256} eSapOfldIndType;
6257
6258typedef PACKED_PRE struct PACKED_POST
6259{
6260 /* indType will be from eSapOfldIndType */
6261 tANI_U32 indType;
6262 /* size of this array will be depend on the indication type.
6263 * Indication type can be either ADD_STA_IND or DEL_STA_IND.
6264 * If indication type is ADD_STA_IND, size of this indication
6265 * array will be sizeof(tSapOfldDelStaIndMsg)
6266 * and if indication type is DEL_STA_IND, size of this indication
6267 * arrary will be sizeof(tSapOfldAddStaIndMsg)
6268 */
6269 tANI_U8 indication[1];
6270} tSapOfldInd;
6271
6272typedef PACKED_PRE struct PACKED_POST
6273{
6274 tANI_U32 num_indications;
6275 /* size of this array will be depend on the number of indications.*/
6276 tSapOfldInd indications[1];
6277}tSapOfldIndications;
6278
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306279#endif /* SAP_AUTH_OFFLOAD */
Agrawal Ashisha8e8a722016-10-18 19:07:45 +05306280
Manjeet Singh3ed79242017-01-11 19:04:32 +05306281/**
6282 * struct stsf - the basic stsf structure
6283 *
6284 * @session_id: session id from adapter
6285 * @set_req: set/get request flag.
6286 * @tsf_low: low 32bits of tsf
6287 * @tsf_high: high 32bits of tsf
6288 *
6289 * driver use this struct to store the tsf info
6290 */
6291struct stsf {
6292 uint32_t session_id;
6293 bool set_tsf_req;
6294 uint32_t tsf_low;
6295 uint32_t tsf_high;
6296 bool tsf_req_status;
6297};
6298
6299typedef int(*tsf_rsp_cb)(void *tsf_ctx, struct stsf *pTsf);
6300
6301/**
6302 * struct tCapTsfParams - capture tsf request
6303 * @bss_idx: bss index, SAP/STA
6304 * @session_id: adapter session id
6305 * @bssid: bssid for SAP/STA
6306 * @tsf_rsp_cb_func : handler for tsf rsp from fw
6307 * @tsf_rsp_cb_ctx : hdd ctx for tsf rsp handler
6308 */
6309typedef struct {
6310 tANI_U8 bss_idx;
6311 tANI_U8 session_id;
6312 tSirMacAddr bssid;
6313 tsf_rsp_cb tsf_rsp_cb_func;
6314 void * tsf_rsp_cb_ctx;
6315}tSirCapTsfParams,*tpSirCapTsfParams;
6316
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05306317#ifdef WLAN_FEATURE_LFR_MBB
6318
6319/**
6320 * enum csr_roam_op_code - Operation to be done by the callback.
6321 * @SIR_ROAMING_DEREGISTER_STA: Deregister the old STA after roaming.
6322 * @SIR_STOP_ROAM_OFFLOAD_SCAN : sends RSO stop
6323 * @SIR_PREPARE_REASSOC_REQ: prepares reassoc request
6324 */
6325enum csr_roam_op_code {
6326 SIR_ROAMING_DEREGISTER_STA,
6327 SIR_STOP_ROAM_OFFLOAD_SCAN,
6328 SIR_PREPARE_REASSOC_REQ,
6329};
Padma, Santhosh Kumar9f729552017-01-09 14:06:30 +05306330
6331/**
6332 * enum sir_roam_cleanup_type - Type of cleanup needs to be performed.
6333 * @SIR_MBB_DISCONNECTED: Entire CSR cleanup for connected AP
6334 * needs to be performed
6335 * @SIR_MBB_CONNECTED: No need to perform CSR cleanup for connected AP.
6336 */
6337enum sir_roam_cleanup_type {
6338 SIR_MBB_DISCONNECTED,
6339 SIR_MBB_CONNECTED,
6340};
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05306341#endif
6342
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05306343/**
6344 * struct tDelBaParams - Del BA Session req
6345 * @session_id: adapter session id
6346 */
6347typedef struct {
6348 tANI_U8 session_id;
6349}tDelBaParams,*ptDelBaParams;
Abhishek Singh02605092017-10-25 14:06:12 +05306350
6351/**
6352 * struct sir_ecsa_ie_req - structure to send req to include ECSA IE in beacon
6353 * @type: type of msg
6354 * @len: length of msg
6355 * @new_chan: new channel to which switch is requested
6356 * @cb_mode:cbmode of the new channel
6357 * @bssid: bssid of the AP
6358 */
6359struct sir_ecsa_ie_req {
6360 uint16_t type;
6361 uint16_t len;
6362 uint8_t new_chan;
6363 uint8_t cb_mode;
6364 uint8_t bssid[VOS_MAC_ADDR_SIZE];
6365};
6366
Abhishek Singh550aa8c2017-10-30 17:34:53 +05306367/**
6368 * struct sir_ecsa_ie_complete_ind - structure to send indication that ECSA IE
6369 * TX completion in beacon
6370 * @session_id: session on which ECSA IE was sent
6371 */
6372struct sir_ecsa_ie_complete_ind {
6373 uint8_t session_id;
6374};
6375
6376/**
6377 * struct sir_channel_chanege_req - structure to send channel change req to LIM
6378 * @type: type of msg
6379 * @len: length of msg
6380 * @new_chan: new channel to which switch is requested
6381 * @cb_mode:cbmode of the new channel
6382 * @bssid: bssid of the AP
6383 * @dot11mode: new dot11 mode
6384 * @operational_rateset: new rate set
6385 * @extended_rateset: new extended rate set
6386 */
6387struct sir_channel_chanege_req {
6388 uint16_t type;
6389 uint16_t len;
6390 uint8_t new_chan;
6391 uint8_t cb_mode;
6392 uint8_t bssid[VOS_MAC_ADDR_SIZE];
6393 uint32_t dot11mode;
6394 tSirMacRateSet operational_rateset;
6395 tSirMacRateSet extended_rateset;
6396};
6397
6398/**
6399 * struct sir_channel_chanege_rsp - structure for channel change resp from LIM
6400 * @sme_session_id: sme session on which channel was changed
6401 * @new_channel: new channel to which channel is changed
6402 * @status:status of channel change
6403 */
6404struct sir_channel_chanege_rsp {
6405 uint8_t sme_session_id;
6406 uint8_t new_channel;
6407 VOS_STATUS status;
6408};
6409
Abhishek Singh39ae47e2017-10-30 17:39:50 +05306410/**
6411 * struct ecsa_frame_params - ecsa frame params
6412 * @switch_mode: switch mode of channel change
6413 * @op_class: new channel op class
6414 * @new_channel: new channel to shift
6415 * @switch_count: channel switch count
6416 */
6417struct ecsa_frame_params {
6418 uint8_t switch_mode;
6419 uint8_t op_class;
6420 uint8_t new_channel;
6421 uint8_t switch_count;
6422};
6423
Jeff Johnson295189b2012-06-20 16:38:30 -07006424#endif /* __SIR_API_H */