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