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