blob: 7227be31a4a9a633d4131f771e82f98e093be58b [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
Sushant Kaushik74df8db2015-03-11 18:09:05 +05301082 tANI_BOOLEAN bOSENAssociation; //HS2.0
Abhishek Singheef5c992016-01-27 13:41:54 +05301083 tANI_BOOLEAN bWPSAssociation; //WPS
Jeff Johnsone7245742012-09-05 17:12:55 -07001084 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001085
1086 /*This contains the UAPSD Flag for all 4 AC
1087 * B0: AC_VO UAPSD FLAG
1088 * B1: AC_VI UAPSD FLAG
1089 * B2: AC_BK UAPSD FLAG
1090 * B3: AC_BE UASPD FLAG
1091 */
1092 tANI_U8 uapsdPerAcBitmask;
1093
Jeff Johnson295189b2012-06-20 16:38:30 -07001094 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1095 tSirMacRateSet extendedRateSet; // Has 11g rates
Masti, Narayanraddi67ea5912015-01-08 12:34:05 +05301096 tANI_U16 rateBitMap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001097 tSirRSNie rsnIE; // RSN IE to be sent in
1098 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001099#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001100 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1101 // the same. The join will never carry cckm, but will be set to
1102 // 0.
1103#endif
1104
1105 tSirAddie addIEScan; // Additional IE to be sent in
1106 // (unicast) Probe Request at the time of join
1107
1108 tSirAddie addIEAssoc; // Additional IE to be sent in
1109 // (Re) Association Request
1110
1111 tAniEdType UCEncryptionType;
1112
1113 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001114
1115#ifdef WLAN_FEATURE_11W
1116 tAniEdType MgmtEncryptionType;
1117#endif
1118
Jeff Johnson295189b2012-06-20 16:38:30 -07001119#ifdef WLAN_FEATURE_VOWIFI_11R
1120 tAniBool is11Rconnection;
1121#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001122#ifdef FEATURE_WLAN_ESE
1123 tAniBool isESEFeatureIniEnabled;
1124 tAniBool isESEconnection;
1125 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001126#endif
1127
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001128#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001129 tAniBool isFastTransitionEnabled;
1130#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001131#ifdef FEATURE_WLAN_LFR
1132 tAniBool isFastRoamIniFeatureEnabled;
1133#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001134
1135 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001136#ifdef WLAN_FEATURE_11AC
1137 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001138 tANI_U8 txBFCsnValue;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301139 tANI_U8 txMuBformee;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001140#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001141 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301142 tAniBool isWMEenabled;
1143 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001144 tAniTitanCBNeighborInfo cbNeighbors;
1145 tAniBool spectrumMgtIndicator;
1146 tSirMacPowerCapInfo powerCap;
1147 tSirSupChnl supportedChannels;
Abhishek Singhe3beee22017-07-31 15:35:40 +05301148 bool force_24ghz_in_ht20;
Pragaspathi Thilagaraj03e2ab12018-06-22 12:19:48 +05301149 bool force_rsne_override;
Jeff Johnson295189b2012-06-20 16:38:30 -07001150 tSirBssDescription bssDescription;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +05301151 /*
1152 * WARNING: Pls make bssDescription as last variable in struct
1153 * tSirSmeJoinReq as it has ieFields followed after this bss
1154 * description. Adding a variable after this corrupts the ieFields
1155 */
Jeff Johnson295189b2012-06-20 16:38:30 -07001156} tSirSmeJoinReq, *tpSirSmeJoinReq;
1157
1158/// Definition for reponse message to previously issued join request
1159/// MAC --->
1160typedef struct sSirSmeJoinRsp
1161{
1162 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1163 tANI_U16 length;
1164 tANI_U8 sessionId; // Session ID
1165 tANI_U16 transactionId; // Transaction ID for cmd
1166 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001168 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1169 //Otherwise it holds status code.
1170 tANI_U16 aid;
1171 tANI_U32 beaconLength;
1172 tANI_U32 assocReqLength;
1173 tANI_U32 assocRspLength;
1174#ifdef WLAN_FEATURE_VOWIFI_11R
1175 tANI_U32 parsedRicRspLen;
1176#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001177#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001178 tANI_U32 tspecIeLen;
1179#endif
1180 tANI_U32 staId;//Station ID for peer
1181
1182 /*The DPU signatures will be sent eventually to TL to help it determine the
1183 association to which a packet belongs to*/
1184 /*Unicast DPU signature*/
1185 tANI_U8 ucastSig;
1186
1187 /*Broadcast DPU signature*/
1188 tANI_U8 bcastSig;
1189
c_hpothu44ff4e02014-05-08 00:13:57 +05301190 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1191 tANI_U32 maxRateFlags;
1192
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +05301193 tDot11fIEHTCaps ht_caps;
1194 tDot11fIEVHTCaps vht_caps;
1195 tDot11fIEHTInfo ht_operation;
1196 tDot11fIEVHTOperation vht_operation;
1197 tDot11fIEhs20vendor_ie hs20vendor_ie;
1198
Jeff Johnson295189b2012-06-20 16:38:30 -07001199 tANI_U8 frames[ 1 ];
1200} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1201
1202/// Definition for Authentication indication from peer
1203typedef struct sSirSmeAuthInd
1204{
1205 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1206 tANI_U16 length;
1207 tANI_U8 sessionId;
1208 tSirMacAddr bssId; // Self BSSID
1209 tSirMacAddr peerMacAddr;
1210 tAniAuthType authType;
1211} tSirSmeAuthInd, *tpSirSmeAuthInd;
1212
1213/// probereq from peer, when wsc is enabled
1214typedef struct sSirSmeProbereq
1215{
1216 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1217 tANI_U16 length;
1218 tANI_U8 sessionId;
1219 tSirMacAddr peerMacAddr;
1220 tANI_U16 devicePasswdId;
1221} tSirSmeProbeReq, *tpSirSmeProbeReq;
1222
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +05301223typedef struct sSirSmeChanInfo
1224{
1225 /* channel id */
1226 tANI_U8 chan_id;
1227 /* channel info described below */
1228 tANI_U32 info;
1229}tSirSmeChanInfo, *tpSirSmeChanInfo;
1230
1231
Jeff Johnson295189b2012-06-20 16:38:30 -07001232/// Definition for Association indication from peer
1233/// MAC --->
1234typedef struct sSirSmeAssocInd
1235{
1236 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1237 tANI_U16 length;
1238 tANI_U8 sessionId;
1239 tSirMacAddr peerMacAddr;
1240 tANI_U16 aid;
1241 tSirMacAddr bssId; // Self BSSID
1242 tANI_U16 staId; // Station ID for peer
1243 tANI_U8 uniSig; // DPU signature for unicast packets
1244 tANI_U8 bcastSig; // DPU signature for broadcast packets
1245 tAniAuthType authType;
1246 tAniSSID ssId; // SSID used by STA to associate
1247 tSirRSNie rsnIE;// RSN IE received from peer
1248 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1249
Jeff Johnson295189b2012-06-20 16:38:30 -07001250 // powerCap & supportedChannels are present only when
1251 // spectrumMgtIndicator flag is set
1252 tAniBool spectrumMgtIndicator;
1253 tSirMacPowerCapInfo powerCap;
1254 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001255 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +05301256#ifdef WLAN_FEATURE_AP_HT40_24G
1257 tAniBool HT40MHzIntoEnabledSta; /* if present - STA Enable 40 MHz Intolerant */
1258#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001259 tAniBool reassocReq;
1260 // Required for indicating the frames to upper layer
1261 tANI_U32 beaconLength;
1262 tANI_U8* beaconPtr;
1263 tANI_U32 assocReqLength;
1264 tANI_U8* assocReqPtr;
Deepthi Gowriae6a1662015-10-12 12:59:37 +05301265 uint32_t rate_flags;
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +05301266 tSirSmeChanInfo chan_info;
1267 tSirMacHTChannelWidth ch_width;
1268 tDot11fIEHTCaps HTCaps;
1269 tDot11fIEVHTCaps VHTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -07001270} tSirSmeAssocInd, *tpSirSmeAssocInd;
1271
1272
1273/// Definition for Association confirm
1274/// ---> MAC
1275typedef struct sSirSmeAssocCnf
1276{
1277 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1278 tANI_U16 length;
1279 tSirResultCodes statusCode;
1280 tSirMacAddr bssId; // Self BSSID
1281 tSirMacAddr peerMacAddr;
1282 tANI_U16 aid;
1283 tSirMacAddr alternateBssId;
1284 tANI_U8 alternateChannelId;
1285} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1286
Jeff Johnson295189b2012-06-20 16:38:30 -07001287/// Definition for Reassociation indication from peer
1288typedef struct sSirSmeReassocInd
1289{
1290 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1291 tANI_U16 length;
1292 tANI_U8 sessionId; // Session ID
1293 tSirMacAddr peerMacAddr;
1294 tSirMacAddr oldMacAddr;
1295 tANI_U16 aid;
1296 tSirMacAddr bssId; // Self BSSID
1297 tANI_U16 staId; // Station ID for peer
1298 tAniAuthType authType;
1299 tAniSSID ssId; // SSID used by STA to reassociate
1300 tSirRSNie rsnIE; // RSN IE received from peer
1301
1302 tSirAddie addIE; // Additional IE received from peer
1303
Jeff Johnson295189b2012-06-20 16:38:30 -07001304 // powerCap & supportedChannels are present only when
1305 // spectrumMgtIndicator flag is set
1306 tAniBool spectrumMgtIndicator;
1307 tSirMacPowerCapInfo powerCap;
1308 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001309 // Required for indicating the frames to upper layer
1310 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1311 tANI_U32 beaconLength;
1312 tANI_U8* beaconPtr;
1313 tANI_U32 assocReqLength;
1314 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001315} tSirSmeReassocInd, *tpSirSmeReassocInd;
1316
1317/// Definition for Reassociation confirm
1318/// ---> MAC
1319typedef struct sSirSmeReassocCnf
1320{
1321 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1322 tANI_U16 length;
1323 tSirResultCodes statusCode;
1324 tSirMacAddr bssId; // Self BSSID
1325 tSirMacAddr peerMacAddr;
1326 tANI_U16 aid;
1327 tSirMacAddr alternateBssId;
1328 tANI_U8 alternateChannelId;
1329} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1330
Jeff Johnson295189b2012-06-20 16:38:30 -07001331
1332/// Enum definition for Wireless medium status change codes
1333typedef enum eSirSmeStatusChangeCode
1334{
1335 eSIR_SME_DEAUTH_FROM_PEER,
1336 eSIR_SME_DISASSOC_FROM_PEER,
1337 eSIR_SME_LOST_LINK_WITH_PEER,
1338 eSIR_SME_CHANNEL_SWITCH,
1339 eSIR_SME_JOINED_NEW_BSS,
1340 eSIR_SME_LEAVING_BSS,
1341 eSIR_SME_IBSS_ACTIVE,
1342 eSIR_SME_IBSS_INACTIVE,
1343 eSIR_SME_IBSS_PEER_DEPARTED,
1344 eSIR_SME_RADAR_DETECTED,
1345 eSIR_SME_IBSS_NEW_PEER,
1346 eSIR_SME_AP_CAPS_CHANGED,
1347 eSIR_SME_BACKGROUND_SCAN_FAIL,
1348 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1349 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1350} tSirSmeStatusChangeCode;
1351
1352typedef struct sSirSmeNewBssInfo
1353{
1354 tSirMacAddr bssId;
1355 tANI_U8 channelNumber;
1356 tANI_U8 reserved;
1357 tSirMacSSid ssId;
1358} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1359
1360typedef struct sSirSmeApNewCaps
1361{
1362 tANI_U16 capabilityInfo;
1363 tSirMacAddr bssId;
1364 tANI_U8 channelId;
1365 tANI_U8 reserved[3];
1366 tSirMacSSid ssId;
1367} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1368
1369/**
1370 * Table below indicates what information is passed for each of
1371 * the Wireless Media status change notifications:
1372 *
1373 * Status Change code Status change info
1374 * ----------------------------------------------------------------------
1375 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1376 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1377 * eSIR_SME_LOST_LINK_WITH_PEER None
1378 * eSIR_SME_CHANNEL_SWITCH New channel number
1379 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1380 * eSIR_SME_LEAVING_BSS None
1381 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1382 * IBSS apart from this STA that
1383 * started IBSS
1384 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1385 * in IBSS
1386 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1387 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1388 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1389 * that STA is currently associated with
1390 * have changed.
1391 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1392 */
1393
1394/// Definition for Wireless medium status change notification
1395typedef struct sSirSmeWmStatusChangeNtf
1396{
1397 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1398 tANI_U16 length;
1399 tANI_U8 sessionId; // Session ID
1400 tSirSmeStatusChangeCode statusChangeCode;
1401 tSirMacAddr bssId; // Self BSSID
1402 union
1403 {
1404 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1405 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1406 // none for eSIR_SME_LOST_LINK_WITH_PEER
1407 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1408 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1409 // none for eSIR_SME_LEAVING_BSS
1410 // none for eSIR_SME_IBSS_ACTIVE
1411 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001412 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1413 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1414 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1415 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001416 } statusChangeInfo;
1417} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1418
1419/// Definition for Disassociation request
1420typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001421__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001422struct sSirSmeDisassocReq
1423{
1424 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1425 tANI_U16 length;
1426 tANI_U8 sessionId; // Session ID
1427 tANI_U16 transactionId; // Transaction ID for cmd
1428 tSirMacAddr bssId; // Peer BSSID
1429 tSirMacAddr peerMacAddr;
1430 tANI_U16 reasonCode;
1431 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1432 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001433}
Jeff Johnson295189b2012-06-20 16:38:30 -07001434__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001435tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1436
1437/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001438typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1439{
1440 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1441 tANI_U16 length;
1442 tANI_U8 sessionId; // Session ID
1443 tANI_U16 transactionId; // Transaction ID for cmd
1444 tSirMacAddr bssId; // Peer BSSID
1445 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1446} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001447
1448typedef struct sAni64BitCounters
1449{
1450 tANI_U32 Hi;
1451 tANI_U32 Lo;
1452}tAni64BitCounters, *tpAni64BitCounters;
1453
1454typedef struct sAniSecurityStat
1455{
1456 tAni64BitCounters txBlks;
1457 tAni64BitCounters rxBlks;
1458 tAni64BitCounters formatErrorCnt;
1459 tAni64BitCounters decryptErr;
1460 tAni64BitCounters protExclCnt;
1461 tAni64BitCounters unDecryptableCnt;
1462 tAni64BitCounters decryptOkCnt;
1463
1464}tAniSecurityStat, *tpAniSecurityStat;
1465
1466typedef struct sAniTxRxCounters
1467{
1468 tANI_U32 txFrames; // Incremented for every packet tx
1469 tANI_U32 rxFrames;
1470 tANI_U32 nRcvBytes;
1471 tANI_U32 nXmitBytes;
1472}tAniTxRxCounters, *tpAniTxRxCounters;
1473
1474typedef struct sAniTxRxStats
1475{
1476 tAni64BitCounters txFrames;
1477 tAni64BitCounters rxFrames;
1478 tAni64BitCounters nRcvBytes;
1479 tAni64BitCounters nXmitBytes;
1480
1481}tAniTxRxStats,*tpAniTxRxStats;
1482
1483typedef struct sAniSecStats
1484{
1485 tAniSecurityStat aes;
1486 tAni64BitCounters aesReplays;
1487 tAniSecurityStat tkip;
1488 tAni64BitCounters tkipReplays;
1489 tAni64BitCounters tkipMicError;
1490
1491 tAniSecurityStat wep;
1492#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1493 tAniSecurityStat wpi;
1494 tAni64BitCounters wpiReplays;
1495 tAni64BitCounters wpiMicError;
1496#endif
1497}tAniSecStats, *tpAniSecStats;
1498
1499#define SIR_MAX_RX_CHAINS 3
1500
1501typedef struct sAniStaStatStruct
1502{
1503 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1504 * These are kept as it is, since WSM is using this structure.
1505 * These elements can be removed whenever WSM is updated.
1506 * Phystats is used to hold phystats from BD.
1507 */
1508 tANI_U32 sentAesBlksUcastHi;
1509 tANI_U32 sentAesBlksUcastLo;
1510 tANI_U32 recvAesBlksUcastHi;
1511 tANI_U32 recvAesBlksUcastLo;
1512 tANI_U32 aesFormatErrorUcastCnts;
1513 tANI_U32 aesReplaysUcast;
1514 tANI_U32 aesDecryptErrUcast;
1515 tANI_U32 singleRetryPkts;
1516 tANI_U32 failedTxPkts;
1517 tANI_U32 ackTimeouts;
1518 tANI_U32 multiRetryPkts;
1519 tANI_U32 fragTxCntsHi;
1520 tANI_U32 fragTxCntsLo;
1521 tANI_U32 transmittedPktsHi;
1522 tANI_U32 transmittedPktsLo;
1523 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1524 tANI_U32 phyStatLo; //This is only for private use.
1525
1526 tANI_U32 uplinkRssi;
1527 tANI_U32 uplinkSinr;
1528 tANI_U32 uplinkRate;
1529 tANI_U32 downlinkRssi;
1530 tANI_U32 downlinkSinr;
1531 tANI_U32 downlinkRate;
1532 tANI_U32 nRcvBytes;
1533 tANI_U32 nXmitBytes;
1534
1535 // titan 3c stats
1536 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1537 tANI_U32 chunksTxCntLo;
1538 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1539 tANI_U32 compPktRxCntLo;
1540 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1541 tANI_U32 expanPktRxCntLo;
1542
1543
1544 /* Following elements are valid and filled in correctly. They have valid values.
1545 */
1546
1547 //Unicast frames and bytes.
1548 tAniTxRxStats ucStats;
1549
1550 //Broadcast frames and bytes.
1551 tAniTxRxStats bcStats;
1552
1553 //Multicast frames and bytes.
1554 tAniTxRxStats mcStats;
1555
1556 tANI_U32 currentTxRate;
1557 tANI_U32 currentRxRate; //Rate in 100Kbps
1558
1559 tANI_U32 maxTxRate;
1560 tANI_U32 maxRxRate;
1561
1562 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1563
1564
1565 tAniSecStats securityStats;
1566
1567 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1568 tANI_U8 currentTxRateIdx;
1569
1570} tAniStaStatStruct, *tpAniStaStatStruct;
1571
1572//Statistics that are not maintained per stations.
1573typedef struct sAniGlobalStatStruct
1574{
1575 tAni64BitCounters txError;
1576 tAni64BitCounters rxError;
1577 tAni64BitCounters rxDropNoBuffer;
1578 tAni64BitCounters rxDropDup;
1579 tAni64BitCounters rxCRCError;
1580
1581 tAni64BitCounters singleRetryPkts;
1582 tAni64BitCounters failedTxPkts;
1583 tAni64BitCounters ackTimeouts;
1584 tAni64BitCounters multiRetryPkts;
1585 tAni64BitCounters fragTxCnts;
1586 tAni64BitCounters fragRxCnts;
1587
1588 tAni64BitCounters txRTSSuccess;
1589 tAni64BitCounters txCTSSuccess;
1590 tAni64BitCounters rxRTSSuccess;
1591 tAni64BitCounters rxCTSSuccess;
1592
1593 tAniSecStats securityStats;
1594
1595 tAniTxRxStats mcStats;
1596 tAniTxRxStats bcStats;
1597
1598}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1599
1600typedef enum sPacketType
1601{
1602 ePACKET_TYPE_UNKNOWN,
1603 ePACKET_TYPE_11A,
1604 ePACKET_TYPE_11G,
1605 ePACKET_TYPE_11B,
1606 ePACKET_TYPE_11N
1607
1608}tPacketType, *tpPacketType;
1609
1610typedef struct sAniStatSummaryStruct
1611{
1612 tAniTxRxStats uc; //Unicast counters.
1613 tAniTxRxStats bc; //Broadcast counters.
1614 tAniTxRxStats mc; //Multicast counters.
1615 tAni64BitCounters txError;
1616 tAni64BitCounters rxError;
1617 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1618 tANI_U32 rxRate; // Rx rate of the last received packet.
1619 tANI_U32 txRate;
1620 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1621 tANI_U16 txMCSId;
1622 tPacketType rxPacketType;
1623 tPacketType txPacketType;
1624 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1625}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1626
Jeff Johnson295189b2012-06-20 16:38:30 -07001627//structure for stats that may be reset, like the ones in sta descriptor
1628//The stats are saved into here before reset. It should be tANI_U32 aligned.
1629typedef struct _sPermStaStats
1630{
1631 //tANI_U32 sentAesBlksUcastHi;
1632 //tANI_U32 sentAesBlksUcastLo;
1633 //tANI_U32 recvAesBlksUcastHi;
1634 //tANI_U32 recvAesBlksUcastLo;
1635 tANI_U32 aesFormatErrorUcastCnts;
1636 tANI_U32 aesReplaysUcast;
1637 tANI_U32 aesDecryptErrUcast;
1638 tANI_U32 singleRetryPkts;
1639 tANI_U32 failedTxPkts;
1640 tANI_U32 ackTimeouts;
1641 tANI_U32 multiRetryPkts;
1642 tANI_U32 fragTxCntsHi;
1643 tANI_U32 fragTxCntsLo;
1644 tANI_U32 transmittedPktsHi;
1645 tANI_U32 transmittedPktsLo;
1646
1647 // titan 3c stats
1648 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1649 tANI_U32 chunksTxCntLo;
1650 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1651 tANI_U32 compPktRxCntLo;
1652 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1653 tANI_U32 expanPktRxCntLo;
1654}tPermanentStaStats;
1655
Jeff Johnson295189b2012-06-20 16:38:30 -07001656
1657
1658
1659/// Definition for Disassociation response
1660typedef struct sSirSmeDisassocRsp
1661{
1662 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1663 tANI_U16 length;
1664 tANI_U8 sessionId; // Session ID
1665 tANI_U16 transactionId; // Transaction ID for cmd
1666 tSirResultCodes statusCode;
1667 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001668 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001669 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001670}
Jeff Johnson295189b2012-06-20 16:38:30 -07001671__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001672 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1673
1674/// Definition for Disassociation indication from peer
1675typedef struct sSirSmeDisassocInd
1676{
1677 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1678 tANI_U16 length;
1679 tANI_U8 sessionId; // Session Identifier
1680 tANI_U16 transactionId; // Transaction Identifier with PE
1681 tSirResultCodes statusCode;
1682 tSirMacAddr bssId;
1683 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001684 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001685 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001686 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001687 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001688} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1689
1690/// Definition for Disassociation confirm
1691/// MAC --->
1692typedef struct sSirSmeDisassocCnf
1693{
1694 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1695 tANI_U16 length;
1696 tSirResultCodes statusCode;
1697 tSirMacAddr bssId;
1698 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001699 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001700} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1701
1702/// Definition for Deauthetication request
1703typedef struct sSirSmeDeauthReq
1704{
1705 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1706 tANI_U16 length;
1707 tANI_U8 sessionId; // Session ID
1708 tANI_U16 transactionId; // Transaction ID for cmd
1709 tSirMacAddr bssId; // AP BSSID
1710 tSirMacAddr peerMacAddr;
1711 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001712} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1713
1714/// Definition for Deauthetication response
1715typedef struct sSirSmeDeauthRsp
1716{
1717 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1718 tANI_U16 length;
1719 tANI_U8 sessionId; // Session ID
1720 tANI_U16 transactionId; // Transaction ID for cmd
1721 tSirResultCodes statusCode;
1722 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001723} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1724
1725/// Definition for Deauthetication indication from peer
1726typedef struct sSirSmeDeauthInd
1727{
1728 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1729 tANI_U16 length;
1730 tANI_U8 sessionId; //Added for BT-AMP
1731 tANI_U16 transactionId; //Added for BT-AMP
1732 tSirResultCodes statusCode;
1733 tSirMacAddr bssId;// AP BSSID
1734 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001735
Jeff Johnson295189b2012-06-20 16:38:30 -07001736 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001737 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001738 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001739} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1740
1741/// Definition for Deauthentication confirm
1742/// MAC --->
1743typedef struct sSirSmeDeauthCnf
1744{
1745 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1746 tANI_U16 length;
1747 tSirResultCodes statusCode;
1748 tSirMacAddr bssId; // AP BSSID
1749 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001750 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001751} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1752
Hanumantha Reddy Pothula1b6eb2f2015-11-30 20:50:23 +05301753typedef struct sSirSmeDisConDoneInd
1754{
1755 tANI_U16 messageType;
1756 tANI_U16 length;
1757 tANI_U8 sessionId;
1758 tSirResultCodes reasonCode;
1759 tSirMacAddr peerMacAddr;
1760}tSirSmeDisConDoneInd, *tpSirSmeDisConDoneInd;
1761
Jeff Johnson295189b2012-06-20 16:38:30 -07001762/// Definition for stop BSS request message
1763typedef struct sSirSmeStopBssReq
1764{
1765 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1766 tANI_U16 length;
1767 tANI_U8 sessionId; //Session ID
1768 tANI_U16 transactionId; //tranSaction ID for cmd
1769 tSirResultCodes reasonCode;
1770 tSirMacAddr bssId; //Self BSSID
1771} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1772
1773/// Definition for stop BSS response message
1774typedef struct sSirSmeStopBssRsp
1775{
1776 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1777 tANI_U16 length;
1778 tSirResultCodes statusCode;
1779 tANI_U8 sessionId; // Session ID
1780 tANI_U16 transactionId; // Transaction ID for cmd
1781} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1782
Jeff Johnson295189b2012-06-20 16:38:30 -07001783
1784
1785/// Definition for Channel Switch indication for station
1786/// MAC --->
1787typedef struct sSirSmeSwitchChannelInd
1788{
1789 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1790 tANI_U16 length;
1791 tANI_U8 sessionId;
1792 tANI_U16 newChannelId;
1793 tSirMacAddr bssId; // BSSID
1794} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1795
1796/// Definition for ULA complete indication message
1797typedef struct sirUlaCompleteInd
1798{
1799 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1800 tANI_U16 length;
1801 tSirResultCodes statusCode;
1802 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001803} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1804
1805/// Definition for ULA complete confirmation message
1806typedef struct sirUlaCompleteCnf
1807{
1808 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1809 tANI_U16 length;
1810 tSirResultCodes statusCode;
1811 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001812} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1813
1814/// Definition for Neighbor BSS indication
1815/// MAC --->
1816/// MAC reports this each time a new I/BSS is detected
1817typedef struct sSirSmeNeighborBssInd
1818{
1819 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1820 tANI_U16 length;
1821 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001822 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001823} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1824
1825/// Definition for MIC failure indication
1826/// MAC --->
1827/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1828typedef struct sSirSmeMicFailureInd
1829{
1830 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1831 tANI_U16 length;
1832 tANI_U8 sessionId;
1833 tSirMacAddr bssId; // BSSID
1834 tSirMicFailureInfo info;
1835} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1836
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05301837typedef struct sSirSmeLostLinkParamsInd
1838{
1839 tANI_U16 messageType;
1840 tANI_U16 length;
1841 tANI_U8 sessionId;
1842 tSirLostLinkParamsInfo info;
1843} tSirSmeLostLinkParamsInd, *tpSirSmeLostLinkParamsInd;
1844
1845
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001846typedef struct sSirSmeMissedBeaconInd
1847{
1848 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1849 tANI_U16 length;
1850 tANI_U8 bssIdx;
1851} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001852
1853/// Definition for Set Context request
1854/// ---> MAC
1855typedef struct sSirSmeSetContextReq
1856{
1857 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1858 tANI_U16 length;
1859 tANI_U8 sessionId; //Session ID
1860 tANI_U16 transactionId; //Transaction ID for cmd
1861 tSirMacAddr peerMacAddr;
1862 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001863 // TBD Following QOS fields to be uncommented
1864 //tAniBool qosInfoPresent;
1865 //tSirQos qos;
1866 tSirKeyMaterial keyMaterial;
1867} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1868
1869/// Definition for Set Context response
1870/// MAC --->
1871typedef struct sSirSmeSetContextRsp
1872{
1873 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1874 tANI_U16 length;
1875 tANI_U8 sessionId; // Session ID
1876 tANI_U16 transactionId; // Transaction ID for cmd
1877 tSirResultCodes statusCode;
1878 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001879} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1880
1881/// Definition for Remove Key Context request
1882/// ---> MAC
1883typedef struct sSirSmeRemoveKeyReq
1884{
1885 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1886 tANI_U16 length;
1887 tANI_U8 sessionId; // Session ID
1888 tANI_U16 transactionId; // Transaction ID for cmd
1889 tSirMacAddr bssId; // BSSID
1890 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001891 tANI_U8 edType;
1892 tANI_U8 wepType;
1893 tANI_U8 keyId;
1894 tANI_BOOLEAN unicast;
1895} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1896
1897/// Definition for Remove Key Context response
1898/// MAC --->
1899typedef struct sSirSmeRemoveKeyRsp
1900{
1901 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1902 tANI_U16 length;
1903 tANI_U8 sessionId; // Session ID
1904 tANI_U16 transactionId; // Transaction ID for cmd
1905 tSirResultCodes statusCode;
1906 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001907} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1908
1909/// Definition for Set Power request
1910/// ---> MAC
1911typedef struct sSirSmeSetPowerReq
1912{
1913 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1914 tANI_U16 length;
1915 tANI_U16 transactionId; // Transaction ID for cmd
1916 tANI_S8 powerLevel;
1917} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1918
1919/// Definition for Set Power response
1920/// MAC --->
1921typedef struct sSirSmeSetPowerRsp
1922{
1923 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1924 tANI_U16 length;
1925 tSirResultCodes statusCode;
1926 tANI_U16 transactionId; // Transaction ID for cmd
1927} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1928
Jeff Johnson295189b2012-06-20 16:38:30 -07001929
1930/// Definition for Link Test Start response
1931/// MAC --->
1932typedef struct sSirSmeLinkTestStartRsp
1933{
1934 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1935 tANI_U16 length;
1936 tSirMacAddr peerMacAddr;
1937 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001938} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1939
1940/// Definition for Link Test Stop response
1941/// WSM ---> MAC
1942typedef struct sSirSmeLinkTestStopRsp
1943{
1944 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1945 tANI_U16 length;
1946 tSirMacAddr peerMacAddr;
1947 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001948} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1949
1950/// Definition for kick starting DFS measurements
1951typedef struct sSirSmeDFSreq
1952{
1953 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1954 tANI_U16 length;
1955 tANI_U16 transactionId; // Transaction ID for cmd
1956} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1957
1958/// Definition for response message to previously
1959/// issued DFS request
1960typedef struct sSirSmeDFSrsp
1961{
1962 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1963 tANI_U16 length;
1964 tSirResultCodes statusCode;
1965 tANI_U16 transactionId; // Transaction ID for cmd
1966 tANI_U32 dfsReport[1];
1967} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1968
1969/// Statistic definitions
1970//=============================================================
1971// Per STA statistic structure; This same struct will be used for Aggregate
1972// STA stats as well.
1973
1974// Clear radio stats and clear per sta stats
1975typedef enum
1976{
1977 eANI_CLEAR_ALL_STATS, // Clears all stats
1978 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1979 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1980 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1981 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1982 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1983
1984 // Used to distinguish between per sta to security stats.
1985 // Used only by AP, FW just returns the same parameter as it received.
1986 eANI_LINK_STATS, // Get Per STA stats
1987 eANI_SECURITY_STATS, // Get Per STA security stats
1988
1989 eANI_CLEAR_STAT_TYPES_END
1990} tAniStatSubTypes;
1991
1992typedef struct sAniTxCtrs
1993{
1994 // add the rate counters here
1995 tANI_U32 tx1Mbps;
1996 tANI_U32 tx2Mbps;
1997 tANI_U32 tx5_5Mbps;
1998 tANI_U32 tx6Mbps;
1999 tANI_U32 tx9Mbps;
2000 tANI_U32 tx11Mbps;
2001 tANI_U32 tx12Mbps;
2002 tANI_U32 tx18Mbps;
2003 tANI_U32 tx24Mbps;
2004 tANI_U32 tx36Mbps;
2005 tANI_U32 tx48Mbps;
2006 tANI_U32 tx54Mbps;
2007 tANI_U32 tx72Mbps;
2008 tANI_U32 tx96Mbps;
2009 tANI_U32 tx108Mbps;
2010
2011 // tx path radio counts
2012 tANI_U32 txFragHi;
2013 tANI_U32 txFragLo;
2014 tANI_U32 txFrameHi;
2015 tANI_U32 txFrameLo;
2016 tANI_U32 txMulticastFrameHi;
2017 tANI_U32 txMulticastFrameLo;
2018 tANI_U32 txFailedHi;
2019 tANI_U32 txFailedLo;
2020 tANI_U32 multipleRetryHi;
2021 tANI_U32 multipleRetryLo;
2022 tANI_U32 singleRetryHi;
2023 tANI_U32 singleRetryLo;
2024 tANI_U32 ackFailureHi;
2025 tANI_U32 ackFailureLo;
2026 tANI_U32 xmitBeacons;
2027
2028 // titan 3c stats
2029 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
2030 tANI_U32 txCbEscPktCntLo;
2031 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
2032 tANI_U32 txChunksCntLo;
2033 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
2034 tANI_U32 txCompPktCntLo;
2035 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
2036 tANI_U32 tx50PerCompPktCntLo;
2037 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
2038 tANI_U32 txExpanPktCntLo;
2039} tAniTxCtrs, *tpAniTxCtrs;
2040
2041typedef struct sAniRxCtrs
2042{
2043 // receive frame rate counters
2044 tANI_U32 rx1Mbps;
2045 tANI_U32 rx2Mbps;
2046 tANI_U32 rx5_5Mbps;
2047 tANI_U32 rx6Mbps;
2048 tANI_U32 rx9Mbps;
2049 tANI_U32 rx11Mbps;
2050 tANI_U32 rx12Mbps;
2051 tANI_U32 rx18Mbps;
2052 tANI_U32 rx24Mbps;
2053 tANI_U32 rx36Mbps;
2054 tANI_U32 rx48Mbps;
2055 tANI_U32 rx54Mbps;
2056 tANI_U32 rx72Mbps;
2057 tANI_U32 rx96Mbps;
2058 tANI_U32 rx108Mbps;
2059
2060 // receive size counters; 'Lte' = Less than or equal to
2061 tANI_U32 rxLte64;
2062 tANI_U32 rxLte128Gt64;
2063 tANI_U32 rxLte256Gt128;
2064 tANI_U32 rxLte512Gt256;
2065 tANI_U32 rxLte1kGt512;
2066 tANI_U32 rxLte1518Gt1k;
2067 tANI_U32 rxLte2kGt1518;
2068 tANI_U32 rxLte4kGt2k;
2069
2070 // rx radio stats
2071 tANI_U32 rxFrag;
2072 tANI_U32 rxFrame;
2073 tANI_U32 fcsError;
2074 tANI_U32 rxMulticast;
2075 tANI_U32 duplicate;
2076 tANI_U32 rtsSuccess;
2077 tANI_U32 rtsFailed;
2078 tANI_U32 wepUndecryptables;
2079 tANI_U32 drops;
2080 tANI_U32 aesFormatErrorUcastCnts;
2081 tANI_U32 aesReplaysUcast;
2082 tANI_U32 aesDecryptErrUcast;
2083
2084 // titan 3c stats
2085 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
2086 tANI_U32 rxDecompPktCntLo;
2087 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
2088 tANI_U32 rxCompPktCntLo;
2089 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
2090 tANI_U32 rxExpanPktCntLo;
2091} tAniRxCtrs, *tpAniRxCtrs;
2092
2093// Radio stats
2094typedef struct sAniRadioStats
2095{
2096 tAniTxCtrs tx;
2097 tAniRxCtrs rx;
2098} tAniRadioStats, *tpAniRadioStats;
2099
2100// Get Radio Stats request structure
2101// This structure shall be used for both Radio stats and Aggregate stats
2102// A valid request must contain entire structure with/without valid fields.
2103// Based on the request type, the valid fields will be checked.
2104typedef struct sAniGetStatsReq
2105{
2106 // Common for all types are requests
2107 tANI_U16 msgType; // message type is same as the request type
2108 tANI_U16 msgLen; // length of the entire request
2109 tANI_U8 sessionId; //Session ID
2110 tANI_U16 transactionId;
2111 tSirMacAddr bssId; //BSSID
2112 // only used for clear stats and per sta stats clear
2113 tAniStatSubTypes stat; // Clears the stats of the described types.
2114 tANI_U32 staId; // Per STA stats request must contain valid
2115 // values
2116 tANI_U8 macAddr[6];
2117} tAniGetStatsReq, *tpAniGetStatsReq;
2118
2119// Get Radio Stats response struct
2120typedef struct sAniGetRadioStatsRsp
2121{
2122 tANI_U16 type; // message type is same as the request type
2123 tANI_U16 msgLen; // length of the entire request
2124 tANI_U32 rc;
2125 tANI_U16 transactionId;
2126 tAniRadioStats radio;
2127} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2128
2129// Per Sta stats response struct
2130typedef struct sAniGetPerStaStatsRsp
2131{
2132 tANI_U16 type; // message type is same as the request type
2133 tANI_U16 msgLen; // length of the entire request
2134 tANI_U32 rc;
2135 tANI_U16 transactionId;
2136 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2137 tAniStaStatStruct sta;
2138 tANI_U32 staId;
2139 tANI_U8 macAddr[6];
2140} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2141
2142// Get Aggregate stats
2143typedef struct sAniGetAggrStaStatsRsp
2144{
2145 tANI_U16 type; // message type is same as the request type
2146 tANI_U16 msgLen; // length of the entire request
2147 tANI_U32 rc;
2148 tANI_U16 transactionId;
2149 tAniStaStatStruct sta;
2150} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2151
2152// Clear stats request and response structure. 'rc' field is unused in
2153// request and this field is used in response field.
2154typedef struct sAniClearStatsRsp
2155{
2156 tANI_U16 type; // message type is same as the request type
2157 tANI_U16 msgLen; // length of the entire request
2158 tANI_U32 rc; // return code - will be filled by FW on
2159 // response.
2160 // Same transaction ID will be returned by the FW
2161 tANI_U16 transactionId;
2162 tAniStatSubTypes stat; // Clears the stats of the described types.
2163 tANI_U32 staId; // Applicable only to PER STA stats clearing
2164 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2165} tAniClearStatsRsp, *tpAniClearStatsRsp;
2166
2167typedef struct sAniGetGlobalStatsRsp
2168{
2169 tANI_U16 type; // message type is same as the request type
2170 tANI_U16 msgLen; // length of the entire request
2171 tANI_U32 rc;
2172 tANI_U16 transactionId;
2173 tAniGlobalStatStruct global;
2174} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2175
2176typedef struct sAniGetStatSummaryRsp
2177{
2178 tANI_U16 type; // message type is same as the request type
2179 tANI_U16 msgLen; // length of the entire request --Why?
2180 tANI_U32 rc;
2181 tANI_U16 transactionId;
2182 tAniStatSummaryStruct stat;
2183} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2184
2185//***************************************************************
2186
2187
2188/*******************PE Statistics*************************/
2189typedef enum
2190{
2191 PE_SUMMARY_STATS_INFO = 0x00000001,
2192 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2193 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2194 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2195 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
Sushant Kaushik33200572015-08-05 16:46:20 +05302196 PE_PER_STA_STATS_INFO = 0x00000020,
2197 PE_PER_TX_PKT_STATS_INFO = 0x00000040,
Jeff Johnson295189b2012-06-20 16:38:30 -07002198}ePEStatsMask;
2199
2200/*
2201 * tpAniGetPEStatsReq is tied to
2202 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2203 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2204 */
2205typedef struct sAniGetPEStatsReq
2206{
2207 // Common for all types are requests
2208 tANI_U16 msgType; // message type is same as the request type
2209 tANI_U16 msgLen; // length of the entire request
2210 tANI_U32 staId; // Per STA stats request must contain valid
2211 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2212} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2213
2214/*
2215 * tpAniGetPEStatsRsp is tied to
2216 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2217 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2218 */
2219typedef struct sAniGetPEStatsRsp
2220{
2221 // Common for all types are responses
2222 tANI_U16 msgType; // message type is same as the request type
2223 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2224 tANI_U8 sessionId;
2225 tANI_U32 rc; //success/failure
2226 tANI_U32 staId; // Per STA stats request must contain valid
2227 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2228/**********************************************************************************************
2229 //void *pStatsBuf;
2230 The Stats buffer starts here and can be an aggregate of more than one statistics
2231 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2232 intentionally and the src code that uses this structure should take that into account.
2233**********************************************************************************************/
2234} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2235
2236typedef struct sAniGetRssiReq
2237{
2238 // Common for all types are requests
2239 tANI_U16 msgType; // message type is same as the request type
2240 tANI_U16 msgLen; // length of the entire request
2241 tANI_U8 sessionId;
2242 tANI_U8 staId;
2243 void *rssiCallback;
2244 void *pDevContext; //device context
2245 void *pVosContext; //voss context
2246
2247} tAniGetRssiReq, *tpAniGetRssiReq;
2248
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302249typedef struct sAniGetSnrReq
2250{
2251 // Common for all types are requests
2252 tANI_U16 msgType; // message type is same as the request type
2253 tANI_U16 msgLen; // length of the entire request
2254 tANI_U8 sessionId;
2255 tANI_U8 staId;
2256 void *snrCallback;
2257 void *pDevContext; //device context
2258} tAniGetSnrReq, *tpAniGetSnrReq;
2259
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002260#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002261typedef struct sAniGetRoamRssiRsp
2262{
2263 // Common for all types are responses
2264 tANI_U16 msgType; // message type is same as the request type
2265 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2266 tANI_U8 sessionId;
2267 tANI_U32 rc; //success/failure
2268 tANI_U32 staId; // Per STA stats request must contain valid
2269 tANI_S8 rssi;
2270 void *rssiReq; //rssi request backup
2271
2272} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2273
2274#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002275
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002276#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002277
2278typedef struct sSirTsmIE
2279{
2280 tANI_U8 tsid;
2281 tANI_U8 state;
2282 tANI_U16 msmt_interval;
2283} tSirTsmIE, *tpSirTsmIE;
2284
2285typedef struct sSirSmeTsmIEInd
2286{
2287 tSirTsmIE tsmIe;
2288 tANI_U8 sessionId;
2289} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2290
2291
2292typedef struct sAniTrafStrmMetrics
2293{
2294 tANI_U16 UplinkPktQueueDly;
2295 tANI_U16 UplinkPktQueueDlyHist[4];
2296 tANI_U32 UplinkPktTxDly;
2297 tANI_U16 UplinkPktLoss;
2298 tANI_U16 UplinkPktCount;
2299 tANI_U8 RoamingCount;
2300 tANI_U16 RoamingDly;
2301} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2302
2303typedef struct sAniGetTsmStatsReq
2304{
2305 // Common for all types are requests
2306 tANI_U16 msgType; // message type is same as the request type
2307 tANI_U16 msgLen; // length of the entire request
2308 tANI_U8 staId;
2309 tANI_U8 tid; // traffic id
2310 tSirMacAddr bssId;
2311 void *tsmStatsCallback;
2312 void *pDevContext; //device context
2313 void *pVosContext; //voss context
2314} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2315
2316typedef struct sAniGetTsmStatsRsp
2317{
2318 // Common for all types are responses
2319 tANI_U16 msgType; // message type is same as the request type
2320 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2321 tANI_U8 sessionId;
2322 tANI_U32 rc; //success/failure
2323 tANI_U32 staId; // Per STA stats request must contain valid
2324 tAniTrafStrmMetrics tsmMetrics;
2325 void *tsmStatsReq; //tsm stats request backup
2326} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002327
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002328typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002329{
2330 tBcnReportFields bcnReportFields;
2331 tANI_U8 ieLen;
2332 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002333} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002334
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002335typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002336{
2337 tANI_U16 measurementToken;
2338 tANI_U8 flag; /* Flag to report measurement done and more data */
2339 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002340 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2341} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002342
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002343#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002344
Jeff Johnson295189b2012-06-20 16:38:30 -07002345/* Change country code request MSG structure */
2346typedef struct sAniChangeCountryCodeReq
2347{
2348 // Common for all types are requests
2349 tANI_U16 msgType; // message type is same as the request type
2350 tANI_U16 msgLen; // length of the entire request
2351 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302352 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302353 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002354 void *changeCCCallback;
2355 void *pDevContext; //device context
2356 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002357
Jeff Johnson295189b2012-06-20 16:38:30 -07002358} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2359
Amar Singhal0d15bd52013-10-12 23:13:13 -07002360/* generic country code change request MSG structure */
2361typedef struct sAniGenericChangeCountryCodeReq
2362{
2363 // Common for all types are requests
2364 tANI_U16 msgType; // message type is same as the request type
2365 tANI_U16 msgLen; // length of the entire request
2366 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2367 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002368} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2369
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302370typedef struct sAniDHCPStopInd
2371{
2372 tANI_U16 msgType; // message type is same as the request type
2373 tANI_U16 msgLen; // length of the entire request
2374 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2375 tSirMacAddr macAddr;
2376
2377} tAniDHCPInd, *tpAniDHCPInd;
2378
Abhishek Singh00b71972016-01-07 10:51:04 +05302379#ifdef WLAN_FEATURE_RMC
2380typedef struct sAniTXFailMonitorInd
2381{
2382 tANI_U16 msgType; // message type is same as the request type
2383 tANI_U16 msgLen; // length of the entire request
2384 tANI_U8 tx_fail_count;
2385 void *txFailIndCallback;
2386} tAniTXFailMonitorInd, *tpAniTXFailMonitorInd;
2387#endif /* WLAN_FEATURE_RMC */
2388
Jeff Johnson295189b2012-06-20 16:38:30 -07002389typedef struct sAniSummaryStatsInfo
2390{
2391 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2392 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2393 // station successfully transmitted after more than one retransmission attempt
2394
2395 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2396 //(with and without retries, including multi-cast, broadcast)
2397 //tANI_U32 tx_fail_cnt;
2398 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2399 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2400 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2401 //(after appropriate filter rules including multi-cast, broadcast)
2402 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2403 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2404 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2405 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2406 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2407 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2408 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2409 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2410 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2411 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2412 //to provide this.
2413#if 0
2414 //providing the following stats, in case of wrap around for tx_byte_cnt
2415 tANI_U32 tx_unicast_lower_byte_cnt;
2416 tANI_U32 tx_unicast_upper_byte_cnt;
2417 tANI_U32 tx_multicast_lower_byte_cnt;
2418 tANI_U32 tx_multicast_upper_byte_cnt;
2419 tANI_U32 tx_broadcast_lower_byte_cnt;
2420 tANI_U32 tx_broadcast_upper_byte_cnt;
2421#endif
2422
2423}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2424
2425typedef enum eTxRateInfo
2426{
2427 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2428 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2429 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2430 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002431 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2432 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2433 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2434 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002435} tTxrateinfoflags;
2436
2437typedef struct sAniGlobalClassAStatsInfo
2438{
2439 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2440 //or MMPDU frames
2441 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2442 //or MMPDU frames when a promiscuous packet filter was enabled
2443 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2444 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2445 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2446 //to a supported rate and the order shall be the same as the supporteRates parameter.
2447 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2448 //for eg: if it is 10.5dBm, the value would be 105
2449 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2450 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2451 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2452 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2453 //500 kbit/sec, for the most
2454 //recently transmitted frame
2455 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2456 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2457 //HT40 rates; short and long guard interval
2458
2459}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2460
2461
2462typedef struct sAniGlobalSecurityStats
2463{
2464 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2465 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2466 //is enabled
2467 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2468 //because of MIC failures
2469 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2470 //because of a TKIP ICV error
2471 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2472 //invalid AES-CCMP format
2473 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2474 //the AES-CCMP replay protection procedure
2475 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2476 //errors detected by the AES-CCMP decryption algorithm
2477 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2478 //not available on the 802.11 station
2479 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2480 //because of a WEP ICV error
2481 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2482 //decrypted
2483 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2484
2485}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2486
2487typedef struct sAniGlobalClassBStatsInfo
2488{
2489 tAniGlobalSecurityStats ucStats;
2490 tAniGlobalSecurityStats mcbcStats;
2491}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2492
2493typedef struct sAniGlobalClassCStatsInfo
2494{
2495 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2496 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2497 //address 1 field
2498 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2499 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2500 //primary channel
2501 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2502 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2503 //when an A-MPDU is received
2504 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2505 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2506 //decoded correctly
2507
2508}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2509
2510typedef struct sAniPerStaStatsInfo
2511{
2512 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2513 //through a received 802.11 ACK frame
2514 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2515 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2516 //is transmitted
2517
2518}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2519
Sushant Kaushik33200572015-08-05 16:46:20 +05302520typedef struct sAniPerTxPktStatsInfo
2521{
2522 tANI_U32 lastTxRate; // 802.11 data rate at which the last data frame is transmitted.
Sushant Kaushik3d5c1e62015-10-07 12:05:33 +05302523 tANI_U32 txAvgRetry; // Average number of retries per 10 packets.
Sushant Kaushik33200572015-08-05 16:46:20 +05302524}tAniPerTxPktStatsInfo, *tpAniPerTxPktStatsInfo;
2525
2526
Jeff Johnson295189b2012-06-20 16:38:30 -07002527/**********************PE Statistics end*************************/
2528
2529
2530
2531typedef struct sSirRSSIThresholds
2532{
2533#ifdef ANI_BIG_BYTE_ENDIAN
2534 tANI_S8 ucRssiThreshold1 : 8;
2535 tANI_S8 ucRssiThreshold2 : 8;
2536 tANI_S8 ucRssiThreshold3 : 8;
2537 tANI_U8 bRssiThres1PosNotify : 1;
2538 tANI_U8 bRssiThres1NegNotify : 1;
2539 tANI_U8 bRssiThres2PosNotify : 1;
2540 tANI_U8 bRssiThres2NegNotify : 1;
2541 tANI_U8 bRssiThres3PosNotify : 1;
2542 tANI_U8 bRssiThres3NegNotify : 1;
2543 tANI_U8 bReserved10 : 2;
2544#else
2545 tANI_U8 bReserved10 : 2;
2546 tANI_U8 bRssiThres3NegNotify : 1;
2547 tANI_U8 bRssiThres3PosNotify : 1;
2548 tANI_U8 bRssiThres2NegNotify : 1;
2549 tANI_U8 bRssiThres2PosNotify : 1;
2550 tANI_U8 bRssiThres1NegNotify : 1;
2551 tANI_U8 bRssiThres1PosNotify : 1;
2552 tANI_S8 ucRssiThreshold3 : 8;
2553 tANI_S8 ucRssiThreshold2 : 8;
2554 tANI_S8 ucRssiThreshold1 : 8;
2555#endif
2556
2557}tSirRSSIThresholds, *tpSirRSSIThresholds;
2558
2559typedef struct sSirRSSINotification
2560{
2561#ifdef ANI_BIG_BYTE_ENDIAN
2562 tANI_U32 bRssiThres1PosCross : 1;
2563 tANI_U32 bRssiThres1NegCross : 1;
2564 tANI_U32 bRssiThres2PosCross : 1;
2565 tANI_U32 bRssiThres2NegCross : 1;
2566 tANI_U32 bRssiThres3PosCross : 1;
2567 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002568 v_S7_t avgRssi : 8;
2569 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002570#else
Srinivasdaaec712012-12-12 15:59:44 -08002571 tANI_U32 bReserved : 18;
2572 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002573 tANI_U32 bRssiThres3NegCross : 1;
2574 tANI_U32 bRssiThres3PosCross : 1;
2575 tANI_U32 bRssiThres2NegCross : 1;
2576 tANI_U32 bRssiThres2PosCross : 1;
2577 tANI_U32 bRssiThres1NegCross : 1;
2578 tANI_U32 bRssiThres1PosCross : 1;
2579#endif
2580
2581}tSirRSSINotification, *tpSirRSSINotification;
2582
Viral Modid86bde22012-12-10 13:09:21 -08002583
2584typedef struct sSirP2PNoaStart
2585{
2586 tANI_U32 status;
2587 tANI_U32 bssIdx;
2588} tSirP2PNoaStart, *tpSirP2PNoaStart;
2589
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302590typedef struct sSirTdlsInd
2591{
2592 tANI_U16 status;
2593 tANI_U16 assocId;
2594 tANI_U16 staIdx;
2595 tANI_U16 reasonCode;
2596} tSirTdlsInd, *tpSirTdlsInd;
2597
Jeff Johnson295189b2012-06-20 16:38:30 -07002598typedef struct sSirP2PNoaAttr
2599{
2600#ifdef ANI_BIG_BYTE_ENDIAN
2601 tANI_U32 index :8;
2602 tANI_U32 oppPsFlag :1;
2603 tANI_U32 ctWin :7;
2604 tANI_U32 rsvd1: 16;
2605#else
2606 tANI_U32 rsvd1: 16;
2607 tANI_U32 ctWin :7;
2608 tANI_U32 oppPsFlag :1;
2609 tANI_U32 index :8;
2610#endif
2611
2612#ifdef ANI_BIG_BYTE_ENDIAN
2613 tANI_U32 uNoa1IntervalCnt:8;
2614 tANI_U32 rsvd2:24;
2615#else
2616 tANI_U32 rsvd2:24;
2617 tANI_U32 uNoa1IntervalCnt:8;
2618#endif
2619 tANI_U32 uNoa1Duration;
2620 tANI_U32 uNoa1Interval;
2621 tANI_U32 uNoa1StartTime;
2622
2623#ifdef ANI_BIG_BYTE_ENDIAN
2624 tANI_U32 uNoa2IntervalCnt:8;
2625 tANI_U32 rsvd3:24;
2626#else
2627 tANI_U32 rsvd3:24;
2628 tANI_U32 uNoa2IntervalCnt:8;
2629#endif
2630 tANI_U32 uNoa2Duration;
2631 tANI_U32 uNoa2Interval;
2632 tANI_U32 uNoa2StartTime;
2633} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002634
2635typedef __ani_attr_pre_packed struct sSirTclasInfo
2636{
2637 tSirMacTclasIE tclas;
2638 tANI_U8 version; // applies only for classifier type ip
2639 __ani_attr_pre_packed union {
2640 tSirMacTclasParamEthernet eth;
2641 tSirMacTclasParamIPv4 ipv4;
2642 tSirMacTclasParamIPv6 ipv6;
2643 tSirMacTclasParam8021dq t8021dq;
2644 }__ani_attr_packed tclasParams;
2645} __ani_attr_packed tSirTclasInfo;
2646
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002647
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002648#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002649#define TSRS_11AG_RATE_6MBPS 0xC
2650#define TSRS_11B_RATE_5_5MBPS 0xB
2651
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002652typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002653{
2654 tANI_U8 tsid;
2655 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002656} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002657
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002658typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002659{
2660 tANI_U8 tsid;
2661 tANI_U8 state;
2662 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002663} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002664
2665typedef struct sTSMStats
2666{
2667 tANI_U8 tid;
2668 tSirMacAddr bssId;
2669 tTrafStrmMetrics tsmMetrics;
2670} tTSMStats, *tpTSMStats;
2671
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002672typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002673{
2674 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002675 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002676 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002677} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002678
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002679typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002680{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002681#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2682 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002683#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002684 tEseTSMContext tsm;
2685} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002686
2687
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002688#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002689
2690
Jeff Johnson295189b2012-06-20 16:38:30 -07002691typedef struct sSirAddtsReqInfo
2692{
2693 tANI_U8 dialogToken;
2694 tSirMacTspecIE tspec;
2695
2696 tANI_U8 numTclas; // number of Tclas elements
2697 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2698 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002699#if defined(FEATURE_WLAN_ESE)
2700 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002701 tANI_U8 tsrsPresent:1;
2702#endif
2703 tANI_U8 wmeTspecPresent:1;
2704 tANI_U8 wsmTspecPresent:1;
2705 tANI_U8 lleTspecPresent:1;
2706 tANI_U8 tclasProcPresent:1;
2707} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2708
2709typedef struct sSirAddtsRspInfo
2710{
2711 tANI_U8 dialogToken;
2712 tSirMacStatusCodes status;
2713 tSirMacTsDelayIE delay;
2714
2715 tSirMacTspecIE tspec;
2716 tANI_U8 numTclas; // number of Tclas elements
2717 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2718 tANI_U8 tclasProc;
2719 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002720#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2721 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002722 tANI_U8 tsmPresent:1;
2723#endif
2724 tANI_U8 wmeTspecPresent:1;
2725 tANI_U8 wsmTspecPresent:1;
2726 tANI_U8 lleTspecPresent:1;
2727 tANI_U8 tclasProcPresent:1;
2728 tANI_U8 schedulePresent:1;
2729} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2730
2731typedef struct sSirDeltsReqInfo
2732{
2733 tSirMacTSInfo tsinfo;
2734 tSirMacTspecIE tspec;
2735 tANI_U8 wmeTspecPresent:1;
2736 tANI_U8 wsmTspecPresent:1;
2737 tANI_U8 lleTspecPresent:1;
2738} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2739
2740/// Add a tspec as defined
2741typedef struct sSirAddtsReq
2742{
2743 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2744 tANI_U16 length;
2745 tANI_U8 sessionId; //Session ID
2746 tANI_U16 transactionId;
2747 tSirMacAddr bssId; //BSSID
2748 tANI_U32 timeout; // in ms
2749 tANI_U8 rspReqd;
2750 tSirAddtsReqInfo req;
2751} tSirAddtsReq, *tpSirAddtsReq;
2752
2753typedef struct sSirAddtsRsp
2754{
2755 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2756 tANI_U16 length;
2757 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2758 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2759 tANI_U32 rc; // return code
2760 tSirAddtsRspInfo rsp;
2761} tSirAddtsRsp, *tpSirAddtsRsp;
2762
2763typedef struct sSirDeltsReq
2764{
2765 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2766 tANI_U16 length;
2767 tANI_U8 sessionId;//Session ID
2768 tANI_U16 transactionId;
2769 tSirMacAddr bssId; //BSSID
2770 tANI_U16 aid; // use 0 if macAddr is being specified
2771 tANI_U8 macAddr[6]; // only on AP to specify the STA
2772 tANI_U8 rspReqd;
2773 tSirDeltsReqInfo req;
2774} tSirDeltsReq, *tpSirDeltsReq;
2775
2776typedef struct sSirDeltsRsp
2777{
2778 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2779 tANI_U16 length;
2780 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2781 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2782 tANI_U32 rc;
2783 tANI_U16 aid; // use 0 if macAddr is being specified
2784 tANI_U8 macAddr[6]; // only on AP to specify the STA
2785 tSirDeltsReqInfo rsp;
2786} tSirDeltsRsp, *tpSirDeltsRsp;
2787
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002788#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002789
2790#define SIR_QOS_NUM_TSPEC_MAX 2
2791#define SIR_QOS_NUM_AC_MAX 4
2792
2793typedef struct sSirAggrQosReqInfo
2794{
2795 tANI_U16 tspecIdx;
2796 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2797}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2798
2799typedef struct sSirAggrQosReq
2800{
2801 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2802 tANI_U16 length;
2803 tANI_U8 sessionId; //Session ID
2804 tANI_U16 transactionId;
2805 tSirMacAddr bssId; //BSSID
2806 tANI_U32 timeout; // in ms
2807 tANI_U8 rspReqd;
2808 tSirAggrQosReqInfo aggrInfo;
2809}tSirAggrQosReq, *tpSirAggrQosReq;
2810
2811typedef struct sSirAggrQosRspInfo
2812{
2813 tANI_U16 tspecIdx;
2814 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2815} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2816
2817typedef struct sSirAggrQosRsp
2818{
2819 tANI_U16 messageType;
2820 tANI_U16 length;
2821 tANI_U8 sessionId;
2822 tSirAggrQosRspInfo aggrInfo;
2823} tSirAggrQosRsp, *tpSirAggrQosRsp;
2824
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002825#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002826
2827typedef struct sSirSetTxPowerReq
2828{
schang86c22c42013-03-13 18:41:24 -07002829 tANI_U16 messageType;
2830 tANI_U16 length;
2831 tSirMacAddr bssId;
2832 tANI_U8 mwPower;
2833 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002834} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2835
2836typedef struct sSirSetTxPowerRsp
2837{
2838 tANI_U16 messageType;
2839 tANI_U16 length;
2840 tANI_U32 status;
2841} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2842
2843typedef struct sSirGetTxPowerReq
2844{
2845 tANI_U16 messageType;
2846 tANI_U16 length;
2847 tANI_U16 staid;
2848} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2849
2850typedef struct sSirGetTxPowerRsp
2851{
2852 tANI_U16 messageType;
2853 tANI_U16 length; // length of the entire request
2854 tANI_U32 power; // units of milliwatts
2855 tANI_U32 status;
2856} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2857
2858
2859typedef tANI_U32 tSirMacNoise[3];
2860
2861typedef struct sSirGetNoiseRsp
2862{
2863 tANI_U16 messageType;
2864 tANI_U16 length;
2865 tSirMacNoise noise;
2866} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2867
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002868typedef struct sSirQosMapSet
2869{
2870 tANI_U8 present;
2871 tANI_U8 num_dscp_exceptions;
2872 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002873 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002874} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002875
2876//
2877// PMC --> PE --> HAL
2878// Power save configuration parameters
2879//
2880typedef struct sSirPowerSaveCfg
2881{
2882 tANI_U16 listenInterval;
2883
2884 /* Number of consecutive missed beacons before
2885 * hardware generates an interrupt to wake up
2886 * the host. In units of listen interval.
2887 */
2888 tANI_U32 HeartBeatCount;
2889
2890 /* specifies which beacons are to be forwarded
2891 * to host when beacon filtering is enabled.
2892 * In units of listen interval.
2893 */
2894 tANI_U32 nthBeaconFilter;
2895
2896 /* Maximum number of PS-Poll send before
2897 * firmware sends data null with PM set to 0.
2898 */
2899 tANI_U32 maxPsPoll;
2900
2901 /* If the average RSSI value falls below the
2902 * minRssiThreshold, then FW will send an
2903 * interrupt to wake up the host.
2904 */
2905 tANI_U32 minRssiThreshold;
2906
2907 /* Number of beacons for which firmware will
2908 * collect the RSSI values and compute the average.
2909 */
2910 tANI_U8 numBeaconPerRssiAverage;
2911
2912 /* FW collects the RSSI stats for this period
2913 * in BMPS mode.
2914 */
2915 tANI_U8 rssiFilterPeriod;
2916
2917 // Enabling/disabling broadcast frame filter feature
2918 tANI_U8 broadcastFrameFilter;
2919
2920 // Enabling/disabling the ignore DTIM feature
2921 tANI_U8 ignoreDtim;
2922
2923 /* The following configuration parameters are kept
2924 * in order to be backward compatible for Gen5.
2925 * These will NOT be used for Gen6 Libra chip
2926 */
2927 tBeaconForwarding beaconFwd;
2928 tANI_U16 nthBeaconFwd;
2929 tANI_U8 fEnablePwrSaveImmediately;
2930 tANI_U8 fPSPoll;
2931
2932 // Enabling/disabling Beacon Early Termination feature
2933 tANI_U8 fEnableBeaconEarlyTermination;
2934 tANI_U8 bcnEarlyTermWakeInterval;
2935
2936}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2937
2938/* Reason code for requesting Full Power. This reason code is used by
2939 any module requesting full power from PMC and also by PE when it
2940 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2941typedef enum eRequestFullPowerReason
2942{
2943 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2944 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2945 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2946 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2947 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2948 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2949 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2950 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2951 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2952 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002953#ifdef FEATURE_WLAN_TDLS
2954 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2955#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002956 eSME_REASON_OTHER /* No specific reason. General reason code */
2957} tRequestFullPowerReason, tExitBmpsReason;
2958
2959
2960
2961//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2962typedef struct sExitBmpsInfo
2963{
2964 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2965}tExitBmpsInfo, *tpExitBmpsInfo;
2966
2967
2968// MAC SW --> SME
2969// Message indicating to SME to exit BMPS sleep mode
2970typedef struct sSirSmeExitBmpsInd
2971{
2972 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2973 tANI_U16 mesgLen;
2974 tSirResultCodes statusCode;
2975 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2976
2977} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2978
2979
2980//
2981// HDD -> LIM
2982// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2983// tSirMsgQ.reserved = 0
2984// tSirMsgQ.body = instance of tDelBAParams
2985//
2986typedef struct sSmeDelBAPeerInd
2987{
2988 // Message Type
2989 tANI_U16 mesgType;
2990
2991 tSirMacAddr bssId;//BSSID
2992
2993 // Message Length
2994 tANI_U16 mesgLen;
2995
2996 // Station Index
2997 tANI_U16 staIdx;
2998
2999 // TID for which the BA session is being deleted
3000 tANI_U8 baTID;
3001
3002 // DELBA direction
3003 // eBA_INITIATOR - Originator
3004 // eBA_RECEIPIENT - Recipient
3005 tANI_U8 baDirection;
3006} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
3007
3008typedef struct sSmeIbssPeerInd
3009{
3010 tANI_U16 mesgType;
3011 tANI_U16 mesgLen;
3012 tANI_U8 sessionId;
3013
3014 tSirMacAddr peerAddr;
3015 tANI_U16 staId;
3016
3017 /*The DPU signatures will be sent eventually to TL to help it determine the
3018 association to which a packet belongs to*/
3019 /*Unicast DPU signature*/
3020 tANI_U8 ucastSig;
3021
3022 /*Broadcast DPU signature*/
3023 tANI_U8 bcastSig;
3024
3025 //Beacon will be appended for new Peer indication.
3026}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
3027
Ravi Joshid2ca7c42013-07-23 08:37:49 -07003028typedef struct sSirIbssPeerInactivityInd
3029{
3030 tANI_U8 bssIdx;
3031 tANI_U8 staIdx;
3032 tSirMacAddr peerAddr;
3033}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
3034
3035
Jeff Johnson295189b2012-06-20 16:38:30 -07003036typedef struct sLimScanChn
3037{
3038 tANI_U16 numTimeScan; //how many time this channel is scan
3039 tANI_U8 channelId;
3040}tLimScanChn;
3041
3042typedef struct sSmeGetScanChnRsp
3043{
3044 // Message Type
3045 tANI_U16 mesgType;
3046 // Message Length
3047 tANI_U16 mesgLen;
3048 tANI_U8 sessionId;
3049 tANI_U8 numChn;
3050 tLimScanChn scanChn[1];
3051} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
3052
3053typedef struct sLimScanChnInfo
3054{
3055 tANI_U8 numChnInfo; //number of channels in scanChn
3056 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
3057}tLimScanChnInfo;
3058
Jeff Johnson295189b2012-06-20 16:38:30 -07003059typedef struct sSirSmeGetAssocSTAsReq
3060{
3061 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
3062 tANI_U16 length;
3063 tSirMacAddr bssId; // BSSID
3064 tANI_U16 modId;
3065 void *pUsrContext;
3066 void *pSapEventCallback;
3067 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
3068} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07003069
3070typedef struct sSmeMaxAssocInd
3071{
3072 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
3073 tANI_U16 mesgLen;
3074 tANI_U8 sessionId;
3075 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
3076} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
3077
3078/*--------------------------------------------------------------------*/
3079/* BootLoader message definition */
3080/*--------------------------------------------------------------------*/
3081
3082/*--------------------------------------------------------------------*/
3083/* FW image size */
3084/*--------------------------------------------------------------------*/
3085#define SIR_FW_IMAGE_SIZE 146332
3086
3087
3088#define SIR_BOOT_MODULE_ID 1
3089
3090#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
3091#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
3092#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
3093#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
3094#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
3095#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
3096#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
3097
3098/*--------------------------------------------------------------------*/
3099/* Bootloader message syntax */
3100/*--------------------------------------------------------------------*/
3101
3102// Message header
3103#define SIR_BOOT_MB_HEADER 0
3104#define SIR_BOOT_MB_HEADER2 1
3105
3106#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
3107#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
3108
3109// BOOT_SETUP_IND parameter indices
3110#define SIR_BOOT_SETUP_IND_MBADDR 2
3111#define SIR_BOOT_SETUP_IND_MBSIZE 3
3112#define SIR_BOOT_SETUP_IND_MEMOPT 4
3113#define SIR_BOOT_SETUP_IND_LEN \
3114 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
3115
3116// BOOT_POST_RESULT_IND parameter indices
3117#define SIR_BOOT_POST_RESULT_IND_RES 2
3118#define SIR_BOOT_POST_RESULT_IND_LEN \
3119 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
3120
3121#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
3122#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
3123#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
3124#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
3125
3126
3127// BOOT_DNLD_RESULT_IND parameter indices
3128#define SIR_BOOT_DNLD_RESULT_IND_RES 2
3129#define SIR_BOOT_DNLD_RESULT_IND_LEN \
3130 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3131
3132#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3133#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3134#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3135
3136// BOOT_DNLD_DEV_REQ
3137#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3138#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3139#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3140 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3141
3142// BOOT_DNLD_DEV_RSP
3143#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3144#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3145 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3146
3147#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3148#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3149
3150// BOOT_DNLD_REQ
3151#define SIR_BOOT_DNLD_REQ_OFFSET 2
3152#define SIR_BOOT_DNLD_REQ_WRADDR 3
3153#define SIR_BOOT_DNLD_REQ_SIZE 4
3154#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3155
3156// BOOT_DNLD_RSP
3157#define SIR_BOOT_DNLD_RSP_SIZE 2
3158#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3159
Jeff Johnson295189b2012-06-20 16:38:30 -07003160
3161// board capabilities fields are defined here.
3162typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3163{
3164#ifndef ANI_LITTLE_BIT_ENDIAN
3165 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3166 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3167 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3168 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3169 tANI_U32 rsvd1:2;
3170 // (productId derives sub-category in the following three families)
3171 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3172 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3173 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3174 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3175 tANI_U32 bbChipVer:4; // Baseband chip version
3176 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3177 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3178 tANI_U32 nReceivers:2; // 0 based.
3179 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3180 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3181 tANI_U32 rsvd:1;
3182 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3183#else
3184
3185 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3186 tANI_U32 rsvd:1;
3187 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3188 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3189 tANI_U32 nReceivers:2; // 0 based.
3190 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3191 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3192 tANI_U32 bbChipVer:4; // Baseband chip version
3193 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3194 // (productId derives sub-category in the following three families)
3195 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3196 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3197 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3198 tANI_U32 rsvd1:2;
3199 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3200 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3201 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3202 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3203#endif
3204} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3205
3206# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3207# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3208
3209# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3210# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3211
3212# define ANI_BCAP_SDRAM_MASK 0x4
3213# define ANI_BCAP_SDRAM_OFFSET 2
3214
3215# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3216# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3217
3218# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3219# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3220
3221# define ANI_BCAP_RADIO_ON_MASK 0xC0
3222# define ANI_BCAP_RADIO_ON_OFFSET 6
3223
3224# define ANI_BCAP_LO_TYPE_MASK 0x300
3225# define ANI_BCAP_LO_TYPE_OFFSET 8
3226
3227# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3228# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3229
3230# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3231# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3232
3233# define ANI_BCAP_RADIO_OFF 0
3234# define ANI_BCAP_RADIO_ON 1
3235# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3236
3237
3238/// WOW related structures
3239// SME -> PE <-> HAL
3240#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3241#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3242
3243// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3244// SME/HDD maintains the list of the BCAST wake-up patterns.
3245// This is a pass through message for PE
3246typedef struct sSirWowlAddBcastPtrn
3247{
3248 tANI_U8 ucPatternId; // Pattern ID
3249 // Pattern byte offset from beginning of the 802.11 packet to start of the
3250 // wake-up pattern
3251 tANI_U8 ucPatternByteOffset;
3252 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3253 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3254 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3255 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3256 // Extra pattern data beyond 128 bytes
3257 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3258 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003259 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003260} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3261
3262
3263// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3264// SME/HDD maintains the list of the BCAST wake-up patterns.
3265// This is a pass through message for PE
3266typedef struct sSirWowlDelBcastPtrn
3267{
3268 /* Pattern ID of the wakeup pattern to be deleted */
3269 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003270 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003271}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3272
3273
3274// SME->PE: Enter WOWLAN parameters
3275typedef struct sSirSmeWowlEnterParams
3276{
3277 /* Enables/disables magic packet filtering */
3278 tANI_U8 ucMagicPktEnable;
3279
3280 /* Magic pattern */
3281 tSirMacAddr magicPtrn;
3282
3283 /* Enables/disables packet pattern filtering */
3284 tANI_U8 ucPatternFilteringEnable;
3285
3286#ifdef WLAN_WAKEUP_EVENTS
3287 /* This configuration directs the WoW packet filtering to look for EAP-ID
3288 * requests embedded in EAPOL frames and use this as a wake source.
3289 */
3290 tANI_U8 ucWoWEAPIDRequestEnable;
3291
3292 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3293 * requests and use this as a wake source.
3294 */
3295 tANI_U8 ucWoWEAPOL4WayEnable;
3296
3297 /* This configuration allows a host wakeup on an network scan offload match.
3298 */
3299 tANI_U8 ucWowNetScanOffloadMatch;
3300
3301 /* This configuration allows a host wakeup on any GTK rekeying error.
3302 */
3303 tANI_U8 ucWowGTKRekeyError;
3304
3305 /* This configuration allows a host wakeup on BSS connection loss.
3306 */
3307 tANI_U8 ucWoWBSSConnLoss;
3308#endif // WLAN_WAKEUP_EVENTS
3309
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003310 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003311} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3312
3313
3314// PE<->HAL: Enter WOWLAN parameters
3315typedef struct sSirHalWowlEnterParams
3316{
3317 /* Enables/disables magic packet filtering */
3318 tANI_U8 ucMagicPktEnable;
3319
3320 /* Magic pattern */
3321 tSirMacAddr magicPtrn;
3322
3323 /* Enables/disables packet pattern filtering in firmware.
3324 Enabling this flag enables broadcast pattern matching
3325 in Firmware. If unicast pattern matching is also desired,
3326 ucUcastPatternFilteringEnable flag must be set tot true
3327 as well
3328 */
3329 tANI_U8 ucPatternFilteringEnable;
3330
3331 /* Enables/disables unicast packet pattern filtering.
3332 This flag specifies whether we want to do pattern match
3333 on unicast packets as well and not just broadcast packets.
3334 This flag has no effect if the ucPatternFilteringEnable
3335 (main controlling flag) is set to false
3336 */
3337 tANI_U8 ucUcastPatternFilteringEnable;
3338
3339 /* This configuration is valid only when magicPktEnable=1.
3340 * It requests hardware to wake up when it receives the
3341 * Channel Switch Action Frame.
3342 */
3343 tANI_U8 ucWowChnlSwitchRcv;
3344
3345 /* This configuration is valid only when magicPktEnable=1.
3346 * It requests hardware to wake up when it receives the
3347 * Deauthentication Frame.
3348 */
3349 tANI_U8 ucWowDeauthRcv;
3350
3351 /* This configuration is valid only when magicPktEnable=1.
3352 * It requests hardware to wake up when it receives the
3353 * Disassociation Frame.
3354 */
3355 tANI_U8 ucWowDisassocRcv;
3356
3357 /* This configuration is valid only when magicPktEnable=1.
3358 * It requests hardware to wake up when it has missed
3359 * consecutive beacons. This is a hardware register
3360 * configuration (NOT a firmware configuration).
3361 */
3362 tANI_U8 ucWowMaxMissedBeacons;
3363
3364 /* This configuration is valid only when magicPktEnable=1.
3365 * This is a timeout value in units of microsec. It requests
3366 * hardware to unconditionally wake up after it has stayed
3367 * in WoWLAN mode for some time. Set 0 to disable this feature.
3368 */
3369 tANI_U8 ucWowMaxSleepUsec;
3370
3371#ifdef WLAN_WAKEUP_EVENTS
3372 /* This configuration directs the WoW packet filtering to look for EAP-ID
3373 * requests embedded in EAPOL frames and use this as a wake source.
3374 */
3375 tANI_U8 ucWoWEAPIDRequestEnable;
3376
3377 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3378 * requests and use this as a wake source.
3379 */
3380 tANI_U8 ucWoWEAPOL4WayEnable;
3381
3382 /* This configuration allows a host wakeup on an network scan offload match.
3383 */
3384 tANI_U8 ucWowNetScanOffloadMatch;
3385
3386 /* This configuration allows a host wakeup on any GTK rekeying error.
3387 */
3388 tANI_U8 ucWowGTKRekeyError;
3389
3390 /* This configuration allows a host wakeup on BSS connection loss.
3391 */
3392 tANI_U8 ucWoWBSSConnLoss;
3393#endif // WLAN_WAKEUP_EVENTS
3394
3395 /* Status code to be filled by HAL when it sends
3396 * SIR_HAL_WOWL_ENTER_RSP to PE.
3397 */
3398 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003399
3400 /*BSSID to find the current session
3401 */
3402 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003403} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3404
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003405// PE<->HAL: Exit WOWLAN parameters
3406typedef struct sSirHalWowlExitParams
3407{
3408 /* Status code to be filled by HAL when it sends
3409 * SIR_HAL_WOWL_EXIT_RSP to PE.
3410 */
3411 eHalStatus status;
3412
3413 /*BSSIDX to find the current session
3414 */
3415 tANI_U8 bssIdx;
3416} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3417
Jeff Johnson295189b2012-06-20 16:38:30 -07003418
3419#define SIR_MAX_NAME_SIZE 64
3420#define SIR_MAX_TEXT_SIZE 32
3421
3422typedef struct sSirName {
3423 v_U8_t num_name;
3424 v_U8_t name[SIR_MAX_NAME_SIZE];
3425} tSirName;
3426
3427typedef struct sSirText {
3428 v_U8_t num_text;
3429 v_U8_t text[SIR_MAX_TEXT_SIZE];
3430} tSirText;
3431
3432
3433#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3434#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3435#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3436#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3437#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3438#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3439#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3440#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3441#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3442#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3443#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3444#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3445#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3446#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3447#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3448#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3449
3450
3451typedef struct sSirWPSProbeRspIE {
3452 v_U32_t FieldPresent;
3453 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3454 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3455 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3456 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3457 v_U16_t DevicePasswordID; // Device Password ID
3458 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3459 v_U8_t ResponseType; // Response type
3460 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3461 tSirName Manufacture;
3462 tSirText ModelName;
3463 tSirText ModelNumber;
3464 tSirText SerialNumber;
3465 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3466 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3467 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3468 tSirText DeviceName;
3469 v_U16_t ConfigMethod; // Configuaration method
3470 v_U8_t RFBand; // RF bands available on the AP
3471} tSirWPSProbeRspIE;
3472
3473#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3474#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3475#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3476#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3477#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3478#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3479#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3480#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3481
3482typedef struct sSirWPSBeaconIE {
3483 v_U32_t FieldPresent;
3484 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3485 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3486 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3487 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3488 v_U16_t DevicePasswordID; // Device Password ID
3489 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3490 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3491 v_U8_t RFBand; // RF bands available on the AP
3492} tSirWPSBeaconIE;
3493
3494#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3495#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3496
3497typedef struct sSirWPSAssocRspIE {
3498 v_U32_t FieldPresent;
3499 v_U32_t Version;
3500 v_U8_t ResposeType;
3501} tSirWPSAssocRspIE;
3502
3503typedef struct sSirAPWPSIEs {
3504 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3505 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3506 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3507} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3508
3509typedef struct sSirUpdateAPWPSIEsReq
3510{
3511 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3512 tANI_U16 length;
3513 tANI_U16 transactionId; //Transaction ID for cmd
3514 tSirMacAddr bssId; // BSSID
3515 tANI_U8 sessionId; //Session ID
3516 tSirAPWPSIEs APWPSIEs;
3517} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3518
3519typedef struct sSirUpdateParams
3520{
3521 tANI_U16 messageType;
3522 tANI_U16 length;
3523 tANI_U8 sessionId; // Session ID
3524 tANI_U8 ssidHidden; // Hide SSID
3525} tSirUpdateParams, *tpSirUpdateParams;
3526
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003527//Beacon Interval
3528typedef struct sSirChangeBIParams
3529{
3530 tANI_U16 messageType;
3531 tANI_U16 length;
3532 tANI_U16 beaconInterval; // Beacon Interval
3533 tSirMacAddr bssId;
3534 tANI_U8 sessionId; // Session ID
3535} tSirChangeBIParams, *tpSirChangeBIParams;
3536
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303537#ifdef WLAN_FEATURE_AP_HT40_24G
3538typedef struct sSirSetHT2040Mode
3539{
3540 tANI_U16 messageType;
3541 tANI_U16 length;
3542 tANI_U8 cbMode;
3543 tSirMacAddr bssId;
3544 tANI_U8 sessionId; // Session ID
3545} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -08003546
3547typedef struct sSirHT2040CoexInfoInd
3548{
3549 tANI_U16 messageType; // eWNI_SME_2040_COEX_IND
3550 tANI_U16 length;
3551 tANI_U8 sessionId;
3552 tANI_U8 HT40MHzIntolerant;
3553 tANI_U8 HT20MHzBssWidthReq;
3554 tANI_U8 channel_num;
3555 tANI_U8 HT2040BssIntoChanReport [1]; //variable
3556}tSirHT2040CoexInfoInd, *tpSirHT2040CoexInfoInd;
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303557#endif
3558
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303559typedef struct sSirOBSSHT40Param
3560{
3561 tANI_U16 OBSSScanPassiveDwellTime;
3562 tANI_U16 OBSSScanActiveDwellTime;
3563 tANI_U16 BSSChannelWidthTriggerScanInterval;
3564 tANI_U16 OBSSScanPassiveTotalPerChannel;
3565 tANI_U16 OBSSScanActiveTotalPerChannel;
3566 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3567 tANI_U16 OBSSScanActivityThreshold;
3568}tSirOBSSHT40Param, *tpOBSSHT40Param;
3569
Jeff Johnson295189b2012-06-20 16:38:30 -07003570#define SIR_WPS_UUID_LEN 16
3571#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3572
3573typedef struct sSirWPSPBCSession {
3574 struct sSirWPSPBCSession *next;
3575 tSirMacAddr addr;
3576 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3577 tANI_TIMESTAMP timestamp;
3578} tSirWPSPBCSession;
3579
3580typedef struct sSirSmeGetWPSPBCSessionsReq
3581{
3582 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3583 tANI_U16 length;
3584 void *pUsrContext;
3585 void *pSapEventCallback;
3586 tSirMacAddr bssId; // BSSID
3587 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3588} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3589
3590typedef struct sSirWPSPBCProbeReq
3591{
3592 tSirMacAddr peerMacAddr;
3593 tANI_U16 probeReqIELen;
3594 tANI_U8 probeReqIE[512];
3595} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3596
3597// probereq from peer, when wsc is enabled
3598typedef struct sSirSmeProbeReqInd
3599{
3600 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3601 tANI_U16 length;
3602 tANI_U8 sessionId;
3603 tSirMacAddr bssId;
3604 tSirWPSPBCProbeReq WPSPBCProbeReq;
3605} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3606
3607typedef struct sSirUpdateAPWPARSNIEsReq
3608{
3609 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3610 tANI_U16 length;
3611 tANI_U16 transactionId; //Transaction ID for cmd
3612 tSirMacAddr bssId; // BSSID
3613 tANI_U8 sessionId; //Session ID
3614 tSirRSNie APWPARSNIEs;
3615} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3616
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003617#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003618#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003619#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3620#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3621#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3622#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3623#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3624#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3625#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003626
3627/*Adaptive Thresholds to be used for FW based scanning*/
3628#define LFR_SENSITIVITY_THR_1MBPS -89
3629#define LFR_LOOKUP_THR_1MBPS -78
3630#define LFR_SENSITIVITY_THR_2MBPS -87
3631#define LFR_LOOKUP_THR_2MBPS -78
3632#define LFR_SENSITIVITY_THR_5_5MBPS -86
3633#define LFR_LOOKUP_THR_5_5MBPS -77
3634#define LFR_SENSITIVITY_THR_11MBPS -85
3635#define LFR_LOOKUP_THR_11MBPS -76
3636#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3637#define LFR_LOOKUP_THR_6MBPS_2G -78
3638#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3639#define LFR_LOOKUP_THR_6MBPS_5G -78
3640#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3641#define LFR_LOOKUP_THR_12MBPS_2G -78
3642#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3643#define LFR_LOOKUP_THR_12MBPS_5G -76
3644#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3645#define LFR_LOOKUP_THR_24MBPS_2G -76
3646#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3647#define LFR_LOOKUP_THR_24MBPS_5G -74
3648#define LFR_SENSITIVITY_THR_DEFAULT 0
3649#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003650#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003651
3652// SME -> HAL - This is the host offload request.
3653#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3654#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3655#define SIR_IPV6_NS_OFFLOAD 2
3656#define SIR_OFFLOAD_DISABLE 0
3657#define SIR_OFFLOAD_ENABLE 1
3658#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303659#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003660#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303661#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003662
3663#ifdef WLAN_NS_OFFLOAD
3664typedef struct sSirNsOffloadReq
3665{
3666 tANI_U8 srcIPv6Addr[16];
3667 tANI_U8 selfIPv6Addr[16];
3668 //Only support 2 possible Network Advertisement IPv6 address
3669 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3670 tANI_U8 selfMacAddr[6];
3671 tANI_U8 srcIPv6AddrValid;
3672 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303673 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003674} tSirNsOffloadReq, *tpSirNsOffloadReq;
3675#endif //WLAN_NS_OFFLOAD
3676
3677typedef struct sSirHostOffloadReq
3678{
3679 tANI_U8 offloadType;
3680 tANI_U8 enableOrDisable;
3681 union
3682 {
3683 tANI_U8 hostIpv4Addr [4];
3684 tANI_U8 hostIpv6Addr [16];
3685 } params;
3686#ifdef WLAN_NS_OFFLOAD
3687 tSirNsOffloadReq nsOffloadInfo;
3688#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003689 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003690} tSirHostOffloadReq, *tpSirHostOffloadReq;
3691
3692/* Packet Types. */
3693#define SIR_KEEP_ALIVE_NULL_PKT 1
3694#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3695
3696/* Enable or disable offload. */
3697#define SIR_KEEP_ALIVE_DISABLE 0
3698#define SIR_KEEP_ALIVE_ENABLE 1
3699
3700/* Keep Alive request. */
3701typedef struct sSirKeepAliveReq
3702{
3703 v_U8_t packetType;
3704 v_U32_t timePeriod;
3705 tSirIpv4Addr hostIpv4Addr;
3706 tSirIpv4Addr destIpv4Addr;
3707 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003708 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003709} tSirKeepAliveReq, *tpSirKeepAliveReq;
3710
3711typedef struct sSirSmeAddStaSelfReq
3712{
3713 tANI_U16 mesgType;
3714 tANI_U16 mesgLen;
3715 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003716 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003717}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3718
3719typedef struct sSirSmeDelStaSelfReq
3720{
3721 tANI_U16 mesgType;
3722 tANI_U16 mesgLen;
3723 tSirMacAddr selfMacAddr;
3724}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3725
3726typedef struct sSirSmeAddStaSelfRsp
3727{
3728 tANI_U16 mesgType;
3729 tANI_U16 mesgLen;
3730 tANI_U16 status;
3731 tSirMacAddr selfMacAddr;
3732}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3733
3734typedef struct sSirSmeDelStaSelfRsp
3735{
3736 tANI_U16 mesgType;
3737 tANI_U16 mesgLen;
3738 tANI_U16 status;
3739 tSirMacAddr selfMacAddr;
3740}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3741
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303742typedef enum DFSChanScanType
3743{
3744 DFS_CHNL_SCAN_DISABLED,
3745 DFS_CHNL_SCAN_ENABLED_NORMAL,
3746 DFS_CHNL_SCAN_ENABLED_ACTIVE
3747}eDFSChanScanType;
3748
Jeff Johnson295189b2012-06-20 16:38:30 -07003749/* Coex Indication defines -
3750 should match WLAN_COEX_IND_DATA_SIZE
3751 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3752 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3753#define SIR_COEX_IND_DATA_SIZE (4)
3754#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3755#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003756#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3757#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003758#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3759#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Kanchanapally, Vidyullatha23cea3c2014-11-04 13:05:20 +05303760#define SIR_COEX_IND_TYPE_ENABLE_UAPSD (6)
3761#define SIR_COEX_IND_TYPE_DISABLE_UAPSD (7)
c_hpothub3458992014-09-19 19:58:57 +05303762#define SIR_COEX_IND_TYPE_CXM_FEATURES_NOTIFICATION (8)
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303763#define SIR_COEX_IND_TYPE_TDLS_ENABLE (6)
3764#define SIR_COEX_IND_TYPE_TDLS_DISABLE (7)
Abhishek Singh8a3e4dc2017-01-02 10:39:18 +05303765#define SIR_COEX_IND_TYPE_HID_CONNECTED_WLAN_CONNECTED_IN_2p4 (9)
3766#define SIR_COEX_IND_TYPE_HID_DISCONNECTED_WLAN_CONNECTED_IN_2p4 (10)
Jeff Johnson295189b2012-06-20 16:38:30 -07003767
3768typedef struct sSirSmeCoexInd
3769{
3770 tANI_U16 mesgType;
3771 tANI_U16 mesgLen;
3772 tANI_U32 coexIndType;
3773 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3774}tSirSmeCoexInd, *tpSirSmeCoexInd;
3775
Jeff Johnson295189b2012-06-20 16:38:30 -07003776typedef struct sSirSmeMgmtFrameInd
3777{
Abhishek Singh7d624e12015-11-30 14:29:27 +05303778 tANI_U16 frameLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303779 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003780 tANI_U8 sessionId;
3781 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303782 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003783 tANI_U8 frameBuf[1]; //variable
3784}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003785
Chet Lanctot186b5732013-03-18 10:26:30 -07003786#ifdef WLAN_FEATURE_11W
3787typedef struct sSirSmeUnprotMgmtFrameInd
3788{
3789 tANI_U8 sessionId;
3790 tANI_U8 frameType;
3791 tANI_U8 frameLen;
3792 tANI_U8 frameBuf[1]; //variable
3793}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3794#endif
3795
Jeff Johnson295189b2012-06-20 16:38:30 -07003796#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3797 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3798 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3799 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3800#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3801 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3802
3803/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003804typedef struct sSirNoAParam
3805{
3806 tANI_U8 ctWindow:7;
3807 tANI_U8 OppPS:1;
3808 tANI_U8 count;
3809 tANI_U32 duration;
3810 tANI_U32 interval;
3811 tANI_U32 singleNoADuration;
3812 tANI_U8 psSelection;
3813}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003814
Kapil Gupta2b44acb2016-12-30 16:49:51 +05303815typedef void(*wlan_suspend_req_cb)(void *ptr, VOS_STATUS status);
3816
Jeff Johnson295189b2012-06-20 16:38:30 -07003817typedef struct sSirWlanSuspendParam
3818{
3819 tANI_U8 configuredMcstBcstFilterSetting;
Kapil Gupta2b44acb2016-12-30 16:49:51 +05303820 wlan_suspend_req_cb wlan_sus_callback;
3821 void *context;
Jeff Johnson295189b2012-06-20 16:38:30 -07003822}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3823
3824typedef struct sSirWlanResumeParam
3825{
3826 tANI_U8 configuredMcstBcstFilterSetting;
3827}tSirWlanResumeParam,*tpSirWlanResumeParam;
3828
3829typedef struct sSirWlanSetRxpFilters
3830{
3831 tANI_U8 configuredMcstBcstFilterSetting;
3832 tANI_U8 setMcstBcstFilter;
3833}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003834
mukul sharma6b53e202016-11-23 19:29:18 +05303835
3836typedef struct sSirUpdateCfgIntParam
3837{
3838 tANI_U32 cfgId;
3839}tSirUpdateCfgIntParam,*tpSirUpdateCfgIntParam;
3840
c_manjeecfd1efb2015-09-25 19:32:34 +05303841typedef struct
3842{
3843 //FW mail box address
3844 uint64 logMailBoxAddr;
3845 tANI_U32 status;
3846 //Logging mail box version
3847 tANI_U8 logMailBoxVer;
3848 //Qshrink is enabled
3849 tANI_U8 logCompressEnabled;
3850 /* used to tell fwr mem dump size */
3851 tANI_U32 fw_mem_dump_max_size;
3852 //Reserved for future purpose
3853 tANI_U32 reserved1;
3854 tANI_U32 reserved2;
3855}tAniLoggingInitRsp, *tpAniLoggingInitRsp;
3856
Anurag Chouhan6ee81542017-02-09 18:09:27 +05303857/**
3858 * struct rsp_stats - arp packet stats
3859 * @status: success or failure
3860 * @tx_fw_cnt: tx packets count
3861 * @tx_ack_cnt: tx acknowledgement count
3862 */
3863typedef struct {
3864 uint32_t status;
3865 uint16_t dad;
3866 uint16_t tx_fw_cnt;
3867 uint16_t tx_ack_cnt;
3868 uint16_t rx_fw_cnt;
3869} rsp_stats;
3870
3871typedef void(*setArpStatsReqCb)(void *data, VOS_STATUS rsp);
3872
3873/**
3874 * struct setArpStatsParams - set/reset arp stats
3875 * @flag: enable/disable stats
3876 * @pkt_type: type of packet(1 - arp)
3877 * @ip_addr: subnet ipv4 address in case of encrypted packets
3878 * @rsp_cb_fn: FW response callback api
3879 * @data_ctx: parameter for callback api
3880 */
3881typedef struct {
3882 uint8_t flag;
3883 uint8_t pkt_type;
3884 uint32_t ip_addr;
3885 setArpStatsReqCb rsp_cb_fn;
3886 void *data_ctx;
3887} setArpStatsParams, *psetArpStatsParams;
3888
3889typedef void(*getArpStatsReqCb)(void *data, rsp_stats *rsp);
3890/**
3891 * struct getArpStatsParams - get arp stats from firmware
3892 * @pkt_type: packet type(1 - ARP)
3893 * @get_rsp_cb_fn: FW response callback api
3894 * @data_ctx: parameter for callback api
3895 */
3896typedef struct {
3897 uint8_t pkt_type;
3898 getArpStatsReqCb get_rsp_cb_fn;
3899 void *data_ctx;
3900} getArpStatsParams, *pgetArpStatsParams;
3901
3902
c_manjeecfd1efb2015-09-25 19:32:34 +05303903typedef void(*FWLoggingInitReqCb)(void *fwlogInitCbContext, tAniLoggingInitRsp *pRsp);
Siddharth Bhal64246172015-02-27 01:04:37 +05303904typedef void ( *tGetFrameLogCallback) (void *pContext);
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303905typedef void(*RssiMonitorReqCb)(void *rssiMonitorCbContext, VOS_STATUS status);
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05303906typedef void(*pktFilterReqCb)(void *data, tANI_U32 status);
Anurag Chouhan83026002016-12-13 22:46:21 +05303907typedef void(*dhcp_offload_req_cb)(void *rssiMonitorCbContext,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303908 VOS_STATUS status);
3909typedef void(*mdns_enable_req_cb)(void *mdns_enable_cb_context,
3910 VOS_STATUS status);
3911typedef void(*mdns_fqdn_req_cb)(void *mdns_fqdn_cb_context, VOS_STATUS status);
3912typedef void(*mdns_resp_req_cb)(void *mdns_resp_cb_context, VOS_STATUS status);
Siddharth Bhal64246172015-02-27 01:04:37 +05303913
3914typedef struct sAniGetFrameLogReq
3915{
3916 tANI_U16 msgType;
3917 tANI_U16 msgLen;
Siddharth Bhal64246172015-02-27 01:04:37 +05303918 tANI_U8 getFrameLogCmdFlag;
Siddharth Bhal64246172015-02-27 01:04:37 +05303919} tAniGetFrameLogReq, *tpAniGetFrameLogReq;
3920
Abhishek Singh99a31be2015-12-10 10:37:44 +05303921/**
3922 * struct s_ani_set_tx_max_pwr - Req params to set max tx power
3923 * @bssid: bssid to set the power cap for
3924 * @self_mac_addr:self mac address
3925 * @power: power to set in dB
3926 */
3927struct s_ani_set_tx_max_pwr
3928{
3929 tSirMacAddr bssid;
3930 tSirMacAddr self_sta_mac_addr;
3931 tPowerdBm power;
3932};
3933
3934
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303935
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303936typedef struct sSirFWLoggingInitParam
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303937{
3938 tANI_U8 enableFlag;
3939 tANI_U8 frameType;
3940 tANI_U8 frameSize;
3941 tANI_U8 bufferMode;
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303942 tANI_U8 continuousFrameLogging;
3943 tANI_U8 minLogBufferSize;
3944 tANI_U8 maxLogBufferSize;
3945 FWLoggingInitReqCb fwlogInitCallback;
3946 void *fwlogInitCbContext;
3947}tSirFWLoggingInitParam,*tpSirFWLoggingInitParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003948
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +05303949/**
3950 * struct sir_allowed_action_frames - Parameters to set Allowed action frames
3951 * @bitmask: Bits to convey the allowed action frames
3952 * @reserved: For future use
3953 */
3954struct sir_allowed_action_frames {
3955 uint32_t bitmask;
3956 uint32_t reserved;
3957};
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303958
3959/*
3960 * struct rssi_monitor_req - rssi monitoring
3961 * @request_id: request id
3962 * @session_id: session id
3963 * @min_rssi: minimum rssi
3964 * @max_rssi: maximum rssi
3965 * @control: flag to indicate start or stop
3966 */
3967typedef struct sSirRssiMonitorReq
3968{
3969 tANI_U32 requestId;
3970 tANI_U32 sessionId;
3971 tANI_S8 minRssi;
3972 tANI_S8 maxRssi;
3973 tANI_U8 currentBssId[6];
3974 RssiMonitorReqCb rssiMonitorCallback;
3975 void *rssiMonitorCbContext;
3976}tSirRssiMonitorReq, *tpSirRssiMonitorReq;
3977
3978
3979/**
3980 * struct rssi_breach_event - rssi breached event structure
3981 * @request_id: request id
3982 * @curr_rssi: current rssi
3983 * @curr_bssid: current bssid
3984 */
3985struct rssi_breach_event {
3986 tANI_U32 request_id;
3987 v_MACADDR_t curr_bssid;
3988 tANI_S8 curr_rssi;
3989};
3990
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303991typedef struct sSirFatalEventLogsReqParam
3992{
3993 tANI_U32 reason_code;
3994}tSirFatalEventLogsReqParam, *tpSirFatalEventLogsReqParam;
3995
Jeff Johnson295189b2012-06-20 16:38:30 -07003996#ifdef FEATURE_WLAN_SCAN_PNO
3997//
3998// PNO Messages
3999//
4000
4001// Set PNO
4002#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05304003#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07004004#define SIR_PNO_MAX_SUPP_NETWORKS 16
4005#define SIR_PNO_MAX_SCAN_TIMERS 10
4006
4007/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
4008#define SIR_PNO_MAX_PB_REQ_SIZE 450
4009
4010#define SIR_PNO_24G_DEFAULT_CH 1
4011#define SIR_PNO_5G_DEFAULT_CH 36
4012
4013typedef enum
4014{
4015 SIR_PNO_MODE_IMMEDIATE,
4016 SIR_PNO_MODE_ON_SUSPEND,
4017 SIR_PNO_MODE_ON_RESUME,
4018 SIR_PNO_MODE_MAX
4019} eSirPNOMode;
4020
4021typedef struct
4022{
4023 tSirMacSSid ssId;
4024 tANI_U32 authentication;
4025 tANI_U32 encryption;
4026 tANI_U32 bcastNetwType;
4027 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05304028 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07004029 tANI_U8 rssiThreshold;
4030} tSirNetworkType;
4031
4032typedef struct
4033{
4034 tANI_U32 uTimerValue;
4035 tANI_U32 uTimerRepeat;
4036}tSirScanTimer;
4037
4038typedef struct
4039{
4040 tANI_U8 ucScanTimersCount;
4041 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
4042} tSirScanTimersType;
4043
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05304044/*Pref Net Req status */
4045typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
4046
4047
Jeff Johnson295189b2012-06-20 16:38:30 -07004048typedef struct sSirPNOScanReq
4049{
4050 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05304051 PNOReqStatusCb statusCallback;
4052 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07004053 eSirPNOMode modePNO;
4054 tANI_U8 ucNetworksCount;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304055 tSirNetworkType *aNetworks;
Jeff Johnson295189b2012-06-20 16:38:30 -07004056 tSirScanTimersType scanTimers;
4057
4058 /*added by SME*/
4059 tANI_U16 us24GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304060 tANI_U8 *p24GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07004061 tANI_U16 us5GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304062 tANI_U8 *p5GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07004063} tSirPNOScanReq, *tpSirPNOScanReq;
4064
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004065typedef struct sSirSetRSSIFilterReq
4066{
4067 tANI_U8 rssiThreshold;
4068} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
4069
4070
4071// Update Scan Params
4072typedef struct {
4073 tANI_U8 b11dEnabled;
4074 tANI_U8 b11dResolved;
4075 tANI_U8 ucChannelCount;
4076 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
4077 tANI_U16 usPassiveMinChTime;
4078 tANI_U16 usPassiveMaxChTime;
4079 tANI_U16 usActiveMinChTime;
4080 tANI_U16 usActiveMaxChTime;
4081 tANI_U8 ucCBState;
4082} tSirUpdateScanParams, * tpSirUpdateScanParams;
4083
4084// Preferred Network Found Indication
4085typedef struct
4086{
4087 tANI_U16 mesgType;
4088 tANI_U16 mesgLen;
4089 /* Network that was found with the highest RSSI*/
4090 tSirMacSSid ssId;
4091 /* Indicates the RSSI */
4092 tANI_U8 rssi;
4093 /* Length of the beacon or probe response
4094 * corresponding to the candidate found by PNO */
4095 tANI_U32 frameLength;
4096 /* Index to memory location where the contents of
4097 * beacon or probe response frame will be copied */
4098 tANI_U8 data[1];
4099} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
4100#endif //FEATURE_WLAN_SCAN_PNO
4101
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004102#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Kapil Gupta04ab1992016-06-26 13:36:51 +05304103#define SIR_PER_ROAM_MAX_AP_CNT 20
Kapil Guptac69c28a2016-08-25 14:11:17 +05304104#define SIR_PER_ROAM_MAX_CANDIDATE_CNT 32
Kapil Gupta04ab1992016-06-26 13:36:51 +05304105typedef struct __attribute__((packed))
4106{
4107 tANI_U8 channelNumber;
4108 tANI_U8 channelCCA;
4109 tANI_U8 otherApCount;
4110 tANI_S8 otherApRssi[SIR_PER_ROAM_MAX_AP_CNT];
4111} tSirCandidateChanInfo, * tpSirCandidateChanInfo;
4112
4113typedef struct sPERRoamScanStart
4114{
4115 tANI_U16 msgType;
4116 tANI_U16 msgLen;
4117 tANI_U8 start;
4118} tPERRoamScanStart, *tpPERRoamScanStart;
4119
4120typedef struct sSirRoamAPInfo
4121{
4122 tSirMacAddr bssAddr;
4123 unsigned int timeStamp;
4124} tSirRoamAPInfo, *tpSirRoamAPInfo;
4125
4126typedef struct __attribute__((packed))
4127{
4128 tANI_U32 candidateCount;
4129 tSirCandidateChanInfo channelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
4130} tSirPerRoamScanResult, * tpSirPerRoamScanResult;
4131
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004132typedef struct
4133{
4134 tSirMacSSid ssId;
4135 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
4136 tANI_U32 authentication;
4137 tANI_U8 encryption;
4138 tANI_U8 mcencryption;
4139 tANI_U8 ChannelCount;
4140 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
4141
4142} tSirRoamNetworkType;
4143
4144typedef struct SirMobilityDomainInfo
4145{
4146 tANI_U8 mdiePresent;
4147 tANI_U16 mobilityDomain;
4148} tSirMobilityDomainInfo;
4149
4150typedef struct sSirRoamOffloadScanReq
4151{
4152 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08004153 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004154 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08004155 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004156 tANI_U8 RoamRssiDiff;
4157 tANI_U8 ChannelCacheType;
4158 tANI_U8 Command;
4159 tANI_U8 StartScanReason;
4160 tANI_U16 NeighborScanTimerPeriod;
4161 tANI_U16 NeighborRoamScanRefreshPeriod;
4162 tANI_U16 NeighborScanChannelMinTime;
4163 tANI_U16 NeighborScanChannelMaxTime;
4164 tANI_U16 EmptyRefreshScanPeriod;
4165 tANI_U8 ValidChannelCount;
4166 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08004167 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004168 tANI_U16 us24GProbeTemplateLen;
4169 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4170 tANI_U16 us5GProbeTemplateLen;
4171 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07004172 tANI_U8 nProbes;
4173 tANI_U16 HomeAwayTime;
Sreelakshmi Konamki70bfdaf2017-05-29 18:47:29 +05304174 tANI_U8 WeakZoneRssiThresholdForRoam;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004175 tSirRoamNetworkType ConnectedNetwork;
4176 tSirMobilityDomainInfo MDID;
4177} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304178
4179/**
4180 * struct sSirPERRoamOffloadScanReq - Offload PER config params
4181 * @sessionId: session id
4182 * @rateUpThreshold: rate at which to stop monitoring the rate
4183 * @rateDownThreshold: rate at which to start monitoring
4184 * @isPERRoamCCAEnabled: CCA sensing is enabled or disabled
4185 * @waitPeriodForNextPERScan: time to wait before start monitoring again once a
4186 * scan has been triggered
4187 * @PERtimerThreshold: time to collect stats to trigger roam scan
4188 * @PERroamTriggerPercent: minimum percentage of packets needs to be below
4189 * rateDownThreshold to trigger a roam scan
4190 */
4191typedef struct sSirPERRoamOffloadScanReq
4192{
4193 tANI_U16 sessionId;
4194 tANI_U16 rateUpThreshold;
4195 tANI_U16 rateDownThreshold;
4196 tANI_U16 isPERRoamCCAEnabled;
4197 tANI_U32 waitPeriodForNextPERScan;
4198 tANI_U32 PERtimerThreshold;
4199 tANI_U32 PERroamTriggerPercent;
Kapil Guptac69c28a2016-08-25 14:11:17 +05304200 tANI_S16 PERRoamFullScanThreshold;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304201} tSirPERRoamOffloadScanReq, *tpSirPERRoamOffloadScanReq;
4202
4203typedef struct sSirPERRoamTriggerScanReq
4204{
4205 tANI_BOOLEAN roamScanReq;
4206} tSirPERRoamTriggerScanReq, *tpSirPERRoamTriggerScanReq;
4207
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004208#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07004209
4210#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
4211
4212//Power Parameters Type
4213typedef enum
4214{
4215 eSIR_IGNORE_DTIM = 1,
4216 eSIR_LISTEN_INTERVAL = 2,
4217 eSIR_MCAST_BCAST_FILTER = 3,
4218 eSIR_ENABLE_BET = 4,
4219 eSIR_BET_INTERVAL = 5
4220}tPowerParamType;
4221
4222//Power Parameters Value s
4223typedef struct
4224{
4225 /* Ignore DTIM */
4226 tANI_U32 uIgnoreDTIM;
4227
4228 /* DTIM Period */
4229 tANI_U32 uDTIMPeriod;
4230
4231 /* Listen Interval */
4232 tANI_U32 uListenInterval;
4233
4234 /* Broadcast Multicas Filter */
4235 tANI_U32 uBcastMcastFilter;
4236
4237 /* Beacon Early Termination */
4238 tANI_U32 uEnableBET;
4239
4240 /* Beacon Early Termination Interval */
4241 tANI_U32 uBETInterval;
4242
Yue Mac24062f2013-05-13 17:01:29 -07004243 /* MAX LI for modulated DTIM */
4244 tANI_U32 uMaxLIModulatedDTIM;
4245
Jeff Johnson295189b2012-06-20 16:38:30 -07004246}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
4247
4248typedef struct sSirTxPerTrackingParam
4249{
4250 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
4251 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
4252 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 */
4253 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
4254}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
4255
4256#ifdef WLAN_FEATURE_PACKET_FILTERING
4257/*---------------------------------------------------------------------------
4258 Packet Filtering Parameters
4259---------------------------------------------------------------------------*/
4260#define SIR_IPV4_ADDR_LEN 4
4261#define SIR_MAC_ADDR_LEN 6
4262#define SIR_MAX_FILTER_TEST_DATA_LEN 8
4263#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
4264#define SIR_MAX_NUM_FILTERS 20
4265#define SIR_MAX_NUM_TESTS_PER_FILTER 10
4266
4267//
4268// Receive Filter Parameters
4269//
4270typedef enum
4271{
4272 SIR_RCV_FILTER_TYPE_INVALID,
4273 SIR_RCV_FILTER_TYPE_FILTER_PKT,
4274 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
4275 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4276}eSirReceivePacketFilterType;
4277
4278typedef enum
4279{
4280 SIR_FILTER_HDR_TYPE_INVALID,
4281 SIR_FILTER_HDR_TYPE_MAC,
4282 SIR_FILTER_HDR_TYPE_ARP,
4283 SIR_FILTER_HDR_TYPE_IPV4,
4284 SIR_FILTER_HDR_TYPE_IPV6,
4285 SIR_FILTER_HDR_TYPE_UDP,
4286 SIR_FILTER_HDR_TYPE_MAX
4287}eSirRcvPktFltProtocolType;
4288
4289typedef enum
4290{
4291 SIR_FILTER_CMP_TYPE_INVALID,
4292 SIR_FILTER_CMP_TYPE_EQUAL,
4293 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
4294 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
4295 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
4296 SIR_FILTER_CMP_TYPE_MAX
4297}eSirRcvPktFltCmpFlagType;
4298
4299typedef struct sSirRcvPktFilterFieldParams
4300{
4301 eSirRcvPktFltProtocolType protocolLayer;
4302 eSirRcvPktFltCmpFlagType cmpFlag;
4303 /* Length of the data to compare */
4304 tANI_U16 dataLength;
4305 /* from start of the respective frame header */
4306 tANI_U8 dataOffset;
4307 /* Reserved field */
4308 tANI_U8 reserved;
4309 /* Data to compare */
4310 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
4311 /* Mask to be applied on the received packet data before compare */
4312 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
4313}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
4314
4315typedef struct sSirRcvPktFilterCfg
4316{
4317 tANI_U8 filterId;
4318 eSirReceivePacketFilterType filterType;
4319 tANI_U32 numFieldParams;
4320 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07004321 tSirMacAddr selfMacAddr;
4322 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004323 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07004324}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
4325
4326//
4327// Filter Packet Match Count Parameters
4328//
4329typedef struct sSirRcvFltPktMatchCnt
4330{
4331 tANI_U8 filterId;
4332 tANI_U32 matchCnt;
4333} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
4334
4335typedef struct sSirRcvFltPktMatchRsp
4336{
4337 tANI_U16 mesgType;
4338 tANI_U16 mesgLen;
4339
4340 /* Success or Failure */
4341 tANI_U32 status;
4342 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004343 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004344} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
4345
4346//
4347// Receive Filter Clear Parameters
4348//
4349typedef struct sSirRcvFltPktClearParam
4350{
4351 tANI_U32 status; /* only valid for response message */
4352 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07004353 tSirMacAddr selfMacAddr;
4354 tSirMacAddr bssId;
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05304355 pktFilterReqCb pktFilterCallback;
4356 void *cbCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07004357}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
4358
4359//
4360// Multicast Address List Parameters
4361//
4362typedef struct sSirRcvFltMcAddrList
4363{
4364 tANI_U32 ulMulticastAddrCnt;
4365 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07004366 tSirMacAddr selfMacAddr;
4367 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004368} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
4369#endif // WLAN_FEATURE_PACKET_FILTERING
4370
4371//
4372// Generic version information
4373//
4374typedef struct
4375{
4376 tANI_U8 revision;
4377 tANI_U8 version;
4378 tANI_U8 minor;
4379 tANI_U8 major;
4380} tSirVersionType;
4381
4382typedef struct sAniBtAmpLogLinkReq
4383{
4384 // Common for all types are requests
4385 tANI_U16 msgType; // message type is same as the request type
4386 tANI_U16 msgLen; // length of the entire request
4387 tANI_U8 sessionId; //sme Session Id
4388 void *btampHandle; //AMP context
4389
4390} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
4391
4392#ifdef WLAN_FEATURE_GTK_OFFLOAD
4393/*---------------------------------------------------------------------------
4394* WDA_GTK_OFFLOAD_REQ
4395*--------------------------------------------------------------------------*/
4396typedef struct
4397{
4398 tANI_U32 ulFlags; /* optional flags */
4399 tANI_U8 aKCK[16]; /* Key confirmation key */
4400 tANI_U8 aKEK[16]; /* key encryption key */
4401 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004402 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004403} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4404
4405/*---------------------------------------------------------------------------
4406* WDA_GTK_OFFLOAD_GETINFO_REQ
4407*--------------------------------------------------------------------------*/
4408typedef struct
4409{
4410 tANI_U16 mesgType;
4411 tANI_U16 mesgLen;
4412
4413 tANI_U32 ulStatus; /* success or failure */
4414 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4415 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4416 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4417 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004418 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004419} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4420#endif // WLAN_FEATURE_GTK_OFFLOAD
4421
4422#ifdef WLAN_WAKEUP_EVENTS
4423/*---------------------------------------------------------------------------
4424 tSirWakeReasonInd
4425---------------------------------------------------------------------------*/
4426typedef struct
4427{
4428 tANI_U16 mesgType;
4429 tANI_U16 mesgLen;
4430 tANI_U32 ulReason; /* see tWakeReasonType */
4431 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4432 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4433 HAL truncates the data (i.e. data packets) this length
4434 will be less than the actual length */
4435 tANI_U32 ulActualDataLen; /* actual length of data */
4436 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4437 see specific wake type */
4438} tSirWakeReasonInd, *tpSirWakeReasonInd;
4439#endif // WLAN_WAKEUP_EVENTS
4440
4441/*---------------------------------------------------------------------------
4442 sAniSetTmLevelReq
4443---------------------------------------------------------------------------*/
4444typedef struct sAniSetTmLevelReq
4445{
4446 tANI_U16 tmMode;
4447 tANI_U16 newTmLevel;
4448} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4449
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004450#ifdef FEATURE_WLAN_TDLS
4451/* TDLS Request struct SME-->PE */
4452typedef struct sSirTdlsSendMgmtReq
4453{
4454 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4455 tANI_U16 length;
4456 tANI_U8 sessionId; // Session ID
4457 tANI_U16 transactionId; // Transaction ID for cmd
4458 tANI_U8 reqType;
4459 tANI_U8 dialog;
4460 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004461 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304462 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004463 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4464 tSirMacAddr peerMac;
4465 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4466} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004467
4468typedef enum TdlsAddOper
4469{
4470 TDLS_OPER_NONE,
4471 TDLS_OPER_ADD,
4472 TDLS_OPER_UPDATE
4473} eTdlsAddOper;
4474
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004475/* TDLS Request struct SME-->PE */
4476typedef struct sSirTdlsAddStaReq
4477{
4478 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4479 tANI_U16 length;
4480 tANI_U8 sessionId; // Session ID
4481 tANI_U16 transactionId; // Transaction ID for cmd
4482 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004483 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004484 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004485 tANI_U16 capability;
4486 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4487 tANI_U8 supported_rates_length;
4488 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004489 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004490 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004491 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004492 tSirVHTCap vhtCap;
4493 tANI_U8 uapsd_queues;
4494 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004495} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004496
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004497/* TDLS Response struct PE-->SME */
4498typedef struct sSirTdlsAddStaRsp
4499{
4500 tANI_U16 messageType;
4501 tANI_U16 length;
4502 tSirResultCodes statusCode;
4503 tSirMacAddr peerMac;
4504 tANI_U8 sessionId; // Session ID
4505 tANI_U16 staId ;
4506 tANI_U16 staType ;
4507 tANI_U8 ucastSig;
4508 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004509 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004510} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304511
4512/* TDLS Request struct SME-->PE */
4513typedef struct
4514{
4515 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4516 tANI_U16 length;
4517 tANI_U8 sessionId; // Session ID
4518 tANI_U16 transactionId; // Transaction ID for cmd
4519 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4520 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4521 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304522 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304523 tANI_U8 isResponder; // Is Peer a responder.
4524 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4525 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304526 tANI_U8 supportedChannelsLen;
4527 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4528 tANI_U8 supportedOperClassesLen;
4529 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304530}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4531
4532/* TDLS Request struct SME-->PE */
4533typedef struct
4534{
4535 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4536 tANI_U16 length;
4537 tANI_U8 sessionId; // Session ID
4538 tANI_U16 transactionId; // Transaction ID for cmd
4539 tSirResultCodes statusCode;
4540 tSirMacAddr peerMac;
Masti, Narayanraddif10fd792015-12-15 15:01:01 +05304541 tANI_U16 sta_idx;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304542}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4543
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004544/* TDLS Request struct SME-->PE */
4545typedef struct sSirTdlsDelStaReq
4546{
4547 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4548 tANI_U16 length;
4549 tANI_U8 sessionId; // Session ID
4550 tANI_U16 transactionId; // Transaction ID for cmd
4551 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4552 tSirMacAddr peerMac;
4553} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4554/* TDLS Response struct PE-->SME */
4555typedef struct sSirTdlsDelStaRsp
4556{
4557 tANI_U16 messageType;
4558 tANI_U16 length;
4559 tANI_U8 sessionId; // Session ID
4560 tSirResultCodes statusCode;
4561 tSirMacAddr peerMac;
4562 tANI_U16 staId;
4563} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004564/* TDLS Delete Indication struct PE-->SME */
4565typedef struct sSirTdlsDelStaInd
4566{
4567 tANI_U16 messageType;
4568 tANI_U16 length;
4569 tANI_U8 sessionId; // Session ID
4570 tSirMacAddr peerMac;
4571 tANI_U16 staId;
4572 tANI_U16 reasonCode;
4573} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004574typedef struct sSirTdlsDelAllPeerInd
4575{
4576 tANI_U16 messageType;
4577 tANI_U16 length;
4578 tANI_U8 sessionId; // Session ID
4579} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004580typedef struct sSirMgmtTxCompletionInd
4581{
4582 tANI_U16 messageType;
4583 tANI_U16 length;
4584 tANI_U8 sessionId; // Session ID
4585 tANI_U32 txCompleteStatus;
4586} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Atul Mittalc0f739f2014-07-31 13:47:47 +05304587
4588//tdlsoffchan
4589/* TDLS Channel Switch struct SME-->PE */
4590typedef struct
4591{
4592 tANI_U16 messageType; //eWNI_SME_TDLS_CHANNEL_SWITCH_REQ
4593 tANI_U16 length;
4594 tANI_U8 sessionId; // Session ID
4595 tANI_U16 transactionId; // Transaction ID for cmd
4596 tANI_U8 tdlsOffCh; // Target Off Channel
4597 tANI_U8 tdlsOffChBwOffset;// Target Off Channel Bandwidth offset
4598 tANI_U8 tdlsSwMode; // TDLS Off Channel Mode
4599 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4600 tSirMacAddr peerMac;
4601}tSirTdlsChanSwitch, *tpSirTdlsChanSwitch;
4602
Atul Mittal60bd4292014-08-14 12:19:27 +05304603/* TDLS Resp struct */
4604typedef struct
4605{
4606 tANI_U16 messageType; // eWNI_SME_TDLS_CHANNEL_SWITCH_RSP
4607 tANI_U16 length;
4608 tANI_U8 sessionId; // Session ID
4609 tANI_U16 transactionId; // Transaction ID for cmd
4610 tSirResultCodes statusCode;
4611 tSirMacAddr peerMac;
Masti, Narayanraddi36c67622016-01-06 16:07:34 +05304612 tANI_U16 sta_idx;
Atul Mittal60bd4292014-08-14 12:19:27 +05304613}tSirTdlsChanSwitchReqRsp, *tpSirTdlsChanSwitchReqRsp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004614#endif /* FEATURE_WLAN_TDLS */
4615
Yathish9f22e662012-12-10 14:21:35 -08004616typedef struct sSirActiveModeSetBcnFilterReq
4617{
4618 tANI_U16 messageType;
4619 tANI_U16 length;
4620 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304621 tSirMacAddr bssid;
Yathish9f22e662012-12-10 14:21:35 -08004622} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4623
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304624typedef enum
4625{
4626 HT40_OBSS_SCAN_PARAM_START,
4627 HT40_OBSS_SCAN_PARAM_UPDATE
4628}tHT40OBssScanCmdType;
4629
4630typedef struct sSirSmeHT40StopOBSSScanInd
4631{
4632 tANI_U16 messageType;
4633 tANI_U16 length;
4634 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304635 tSirMacAddr bssid;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304636} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4637
4638typedef struct sSirSmeHT40OBSSScanInd
4639{
4640 tANI_U16 messageType;
4641 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304642 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304643} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4644
4645typedef struct sSirHT40OBSSScanInd
4646{
4647 tHT40OBssScanCmdType cmdType;
4648 tSirScanType scanType;
4649 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4650 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4651 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4652 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4653 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4654 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4655 tANI_U16 OBSSScanActivityThreshold;
4656 tANI_U8 selfStaIdx;
4657 tANI_U8 bssIdx;
4658 tANI_U8 fortyMHZIntolerent;
4659 tANI_U8 channelCount;
4660 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4661 tANI_U8 currentOperatingClass;
4662 tANI_U16 ieFieldLen;
4663 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4664} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4665
4666
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304667//Reset AP Caps Changed
4668typedef struct sSirResetAPCapsChange
4669{
4670 tANI_U16 messageType;
4671 tANI_U16 length;
4672 tSirMacAddr bssId;
4673} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004674/// Definition for Candidate found indication from FW
4675typedef struct sSirSmeCandidateFoundInd
4676{
4677 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4678 tANI_U16 length;
4679 tANI_U8 sessionId; // Session Identifier
4680} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004681
Chet Lanctot186b5732013-03-18 10:26:30 -07004682#ifdef WLAN_FEATURE_11W
4683typedef struct sSirWlanExcludeUnencryptParam
4684{
4685 tANI_BOOLEAN excludeUnencrypt;
4686 tSirMacAddr bssId;
4687}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4688#endif
4689
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004690typedef struct sAniHandoffReq
4691{
4692 // Common for all types are requests
4693 tANI_U16 msgType; // message type is same as the request type
4694 tANI_U16 msgLen; // length of the entire request
4695 tANI_U8 sessionId;
4696 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4697 tANI_U8 channel;
Selvaraj, Sridhar3714c4d2016-06-22 15:19:12 +05304698#ifndef QCA_WIFI_ISOC
4699 tANI_U8 handoff_src;
4700#endif
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004701} tAniHandoffReq, *tpAniHandoffReq;
4702
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304703typedef struct sSirScanOffloadReq {
4704 tANI_U8 sessionId;
4705 tSirMacAddr bssId;
4706 tANI_U8 numSsid;
4707 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4708 tANI_U8 hiddenSsid;
4709 tSirMacAddr selfMacAddr;
4710 tSirBssType bssType;
4711 tANI_U8 dot11mode;
4712 tSirScanType scanType;
4713 tANI_U32 minChannelTime;
4714 tANI_U32 maxChannelTime;
4715 tANI_BOOLEAN p2pSearch;
4716 tANI_U16 uIEFieldLen;
4717 tANI_U16 uIEFieldOffset;
4718 tSirChannelList channelList;
4719 /*-----------------------------
4720 sSirScanOffloadReq....
4721 -----------------------------
4722 uIEFieldLen
4723 -----------------------------
4724 uIEFieldOffset ----+
4725 ----------------------------- |
4726 channelList.numChannels |
4727 ----------------------------- |
4728 ... variable size up to |
4729 channelNumber[numChannels-1] |
4730 This can be zero, if |
4731 numChannel is zero. |
4732 ----------------------------- <--+
4733 ... variable size uIEField
4734 up to uIEFieldLen (can be 0)
4735 -----------------------------*/
4736} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304737
4738typedef enum sSirScanEventType {
4739 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4740 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4741 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4742 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4743 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4744 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4745 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4746 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4747 SCAN_EVENT_MAX=0x8000
4748} tSirScanEventType;
4749
4750typedef struct sSirScanOffloadEvent{
4751 tSirScanEventType event;
4752 tSirResultCodes reasonCode;
4753 tANI_U32 chanFreq;
4754 tANI_U32 requestor;
4755 tANI_U32 scanId;
4756} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4757
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304758typedef struct sSirUpdateChanParam
4759{
4760 tANI_U8 chanId;
4761 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004762 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304763} tSirUpdateChanParam, *tpSirUpdateChanParam;
4764
4765typedef struct sSirUpdateChan
4766{
Sachin Ahujacb64fc82015-01-12 17:01:05 +05304767 tANI_U8 regId;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304768 tANI_U8 numChan;
4769 tSirUpdateChanParam chanParam[1];
4770} tSirUpdateChanList, *tpSirUpdateChanList;
4771
Leo Chang9056f462013-08-01 19:21:11 -07004772#ifdef FEATURE_WLAN_LPHB
4773#define SIR_LPHB_FILTER_LEN 64
4774
4775typedef enum
4776{
4777 LPHB_SET_EN_PARAMS_INDID,
4778 LPHB_SET_TCP_PARAMS_INDID,
4779 LPHB_SET_TCP_PKT_FILTER_INDID,
4780 LPHB_SET_UDP_PARAMS_INDID,
4781 LPHB_SET_UDP_PKT_FILTER_INDID,
4782 LPHB_SET_NETWORK_INFO_INDID,
4783} LPHBIndType;
4784
4785typedef struct sSirLPHBEnableStruct
4786{
4787 v_U8_t enable;
4788 v_U8_t item;
4789 v_U8_t session;
4790} tSirLPHBEnableStruct;
4791
4792typedef struct sSirLPHBTcpParamStruct
4793{
4794 v_U32_t srv_ip;
4795 v_U32_t dev_ip;
4796 v_U16_t src_port;
4797 v_U16_t dst_port;
4798 v_U16_t timeout;
4799 v_U8_t session;
4800 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004801 uint16 timePeriodSec; // in seconds
4802 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004803} tSirLPHBTcpParamStruct;
4804
4805typedef struct sSirLPHBTcpFilterStruct
4806{
4807 v_U16_t length;
4808 v_U8_t offset;
4809 v_U8_t session;
4810 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4811} tSirLPHBTcpFilterStruct;
4812
4813typedef struct sSirLPHBUdpParamStruct
4814{
4815 v_U32_t srv_ip;
4816 v_U32_t dev_ip;
4817 v_U16_t src_port;
4818 v_U16_t dst_port;
4819 v_U16_t interval;
4820 v_U16_t timeout;
4821 v_U8_t session;
4822 tSirMacAddr gateway_mac;
4823} tSirLPHBUdpParamStruct;
4824
4825typedef struct sSirLPHBUdpFilterStruct
4826{
4827 v_U16_t length;
4828 v_U8_t offset;
4829 v_U8_t session;
4830 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4831} tSirLPHBUdpFilterStruct;
4832
4833typedef struct sSirLPHBReq
4834{
4835 v_U16_t cmd;
4836 v_U16_t dummy;
4837 union
4838 {
4839 tSirLPHBEnableStruct lphbEnableReq;
4840 tSirLPHBTcpParamStruct lphbTcpParamReq;
4841 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4842 tSirLPHBUdpParamStruct lphbUdpParamReq;
4843 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4844 } params;
4845} tSirLPHBReq;
4846
Leo Changd9df8aa2013-09-26 13:32:26 -07004847typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004848{
4849 v_U8_t sessionIdx;
4850 v_U8_t protocolType; /*TCP or UDP*/
4851 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004852} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004853#endif /* FEATURE_WLAN_LPHB */
4854
Yue Mab9c86f42013-08-14 15:59:08 -07004855typedef struct sSirAddPeriodicTxPtrn
4856{
4857 /* MAC Address for the adapter */
4858 tSirMacAddr macAddress;
4859
4860 tANI_U8 ucPtrnId; // Pattern ID
4861 tANI_U16 ucPtrnSize; // Pattern size
4862 tANI_U32 usPtrnIntervalMs; // In msec
4863 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4864} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4865
4866typedef struct sSirDelPeriodicTxPtrn
4867{
4868 /* MAC Address for the adapter */
4869 tSirMacAddr macAddress;
4870
4871 /* Bitmap of pattern IDs that need to be deleted */
4872 tANI_U32 ucPatternIdBitmap;
4873} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4874
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004875typedef struct sSirRateUpdateInd
4876{
4877 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4878 * param.
4879 */
4880 tANI_S32 ucastDataRate;
4881
4882 /* TX flag to differentiate between HT20, HT40 etc */
4883 tTxrateinfoflags ucastDataRateTxFlag;
4884
4885 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4886 tSirMacAddr bssid;
4887
4888 /*
4889 * 0 implies MCAST RA, positive value implies fixed rate,
4890 * -1 implies ignore this param
4891 */
Abhishek Singh00b71972016-01-07 10:51:04 +05304892 tANI_S32 rmcDataRate;//unit Mbpsx10
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004893
4894 /* TX flag to differentiate between HT20, HT40 etc */
Abhishek Singh00b71972016-01-07 10:51:04 +05304895 tTxrateinfoflags rmcDataRateTxFlag;
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004896
4897 /*
4898 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4899 * 0 implies ignore
4900 */
4901 tANI_U32 mcastDataRate24GHz;
4902
4903 /* TX flag to differentiate between HT20, HT40 etc */
4904 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4905
4906 /*
4907 * MCAST(or BCAST) fixed data rate in 5 GHz,
4908 * unit Mbpsx10, 0 implies ignore
4909 */
4910 tANI_U32 mcastDataRate5GHz;
4911
4912 /* TX flag to differentiate between HT20, HT40 etc */
4913 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4914
4915} tSirRateUpdateInd, *tpSirRateUpdateInd;
4916
Abhishek Singh00b71972016-01-07 10:51:04 +05304917#ifdef WLAN_FEATURE_RMC
4918
4919#define SIR_RMC_NUM_MAX_RULERS 8 /* HAL_NUM_MAX_RULERS */
4920typedef struct sSirSetRMCReq
4921{
4922 tANI_U16 msgType;
4923 tANI_U16 msgLen;
4924 tSirMacAddr mcastTransmitter;
4925} tSirSetRMCReq, *tpSirSetRMCReq;
4926
4927typedef struct sSirRMCInfo
4928{
4929 tANI_U32 dialogToken;
4930 tANI_U8 action;
4931 tSirMacAddr mcastRuler;
4932} tSirRMCInfo, *tpSirRMCInfo;
4933
4934typedef struct sSirRmcRulerSelectInd
4935{
4936 tANI_U16 status;
4937 tSirMacAddr mcastTransmitter;
4938 tSirMacAddr mcastGroup;
4939 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4940} tSirRmcRulerSelectInd, *tpSirRmcRulerSelectInd;
4941
4942typedef struct sSirRmcBecomeRulerInd
4943{
4944 tANI_U16 status;
4945 tSirMacAddr mcastTransmitter;
4946 tSirMacAddr mcastGroup;
4947} tSirRmcBecomeRulerInd, *tpSirRmcBecomeRulerInd;
4948
4949typedef struct sSirRmcRulerReq
4950{
4951 // Common for all types are requests
4952 tANI_U16 msgType; // message type is same as the request type
4953 tANI_U16 msgLen; // length of the entire request
4954 tANI_U8 cmd; // tRulerReqCmdType
4955 tSirMacAddr mcastTransmitter;
4956 tSirMacAddr mcastGroup;
4957 tSirMacAddr blacklist[SIR_RMC_NUM_MAX_RULERS];
4958} tSirRmcRulerReq, *tpSirRmcRulerReq;
4959
4960typedef struct sSirRmcUpdateInd
4961{
4962 // Common for all types are requests
4963 tANI_U16 msgType; // message type is same as the request type
4964 tANI_U16 msgLen; // length of the entire request
4965 tANI_U8 indication; // trulerUpdateIndType
4966 tANI_U8 role; // tRoleType
4967 tSirMacAddr mcastTransmitter;
4968 tSirMacAddr mcastGroup;
4969 tSirMacAddr mcastRuler;
4970 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4971} tSirRmcUpdateInd, *tpSirRmcUpdateInd;
4972
4973/*---------------------------------------------------------------------------
4974* tSirIbssGetPeerInfoReqParams
4975*--------------------------------------------------------------------------*/
4976typedef struct
4977{
4978 tANI_BOOLEAN allPeerInfoReqd; // If set, all IBSS peers stats are reported
4979 tANI_U8 staIdx; // If allPeerInfoReqd is not set, only stats
4980 // of peer with staIdx is reported
4981}tSirIbssGetPeerInfoReqParams, *tpSirIbssGetPeerInfoReqParams;
4982
4983/*---------------------------------------------------------------------------
4984* tSirIbssGetPeerInfoParams
4985*--------------------------------------------------------------------------*/
4986typedef struct
4987{
4988 tANI_U8 staIdx; //StaIdx
4989 tANI_U32 txRate; //Tx Rate
4990 tANI_U32 mcsIndex; //MCS Index
4991 tANI_U32 txRateFlags; //TxRate Flags
4992 tANI_S8 rssi; //RSSI
4993}tSirIbssPeerInfoParams;
4994
4995typedef struct
4996{
4997 tANI_U32 status;
4998 tANI_U8 numPeers;
4999 tSirIbssPeerInfoParams peerInfoParams[32];
5000}tSirPeerInfoRspParams, *tpSirIbssPeerInfoRspParams;
5001
5002/*---------------------------------------------------------------------------
5003* tSirIbssGetPeerInfoRspParams
5004*--------------------------------------------------------------------------*/
5005typedef struct
5006{
5007 tANI_U16 mesgType;
5008 tANI_U16 mesgLen;
5009 tSirPeerInfoRspParams ibssPeerInfoRspParams;
5010} tSirIbssGetPeerInfoRspParams, *tpSirIbssGetPeerInfoRspParams;
5011#endif /* WLAN_FEATURE_RMC */
5012
Rajeev79dbe4c2013-10-05 11:03:42 +05305013#ifdef FEATURE_WLAN_BATCH_SCAN
5014// Set batch scan resposne from FW
5015typedef struct
5016{
5017 /*maximum number of scans which FW can cache*/
5018 tANI_U32 nScansToBatch;
5019} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
5020
5021// Set batch scan request to FW
5022typedef struct
5023{
5024 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
5025 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
5026 tANI_U32 bestNetwork; /* best networks in terms of rssi */
5027 tANI_U8 rfBand; /* band to scan :
5028 0 ->both Band, 1->2.4Ghz Only
5029 and 2-> 5GHz Only */
5030 tANI_U32 rtt; /* set if required to do RTT it is not
5031 supported in current version */
5032} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
5033
5034
5035// Stop batch scan request to FW
5036typedef struct
5037{
5038 tANI_U32 param;
5039} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
5040
5041// Trigger batch scan result indication to FW
5042typedef struct
5043{
5044 tANI_U32 param;
5045} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
5046
5047// Batch scan result indication from FW
5048typedef PACKED_PRE struct PACKED_POST
5049{
5050 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08005051 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05305052 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05305053 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05305054 /*Timestamp when Network was found. Used to calculate age based on timestamp
5055 in GET_RSP msg header */
5056 tANI_U32 timestamp;
5057} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
5058
5059typedef PACKED_PRE struct PACKED_POST
5060{
5061 tANI_U32 scanId; /* Scan List ID. */
5062 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
5063 tANI_U32 numNetworksInScanList;
5064 /*Variable data ptr: Number of AP in Scan List*/
5065 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
5066 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
5067 tANI_U8 scanList[1];
5068} tSirBatchScanList, *tpSirBatchScanList;
5069
5070typedef PACKED_PRE struct PACKED_POST
5071{
5072 tANI_U32 timestamp;
5073 tANI_U32 numScanLists;
5074 boolean isLastResult;
5075 /* Variable Data ptr: Number of Scan Lists*/
5076 /* following isLastResult is data of type tSirBatchScanList
5077 * of sizeof(tSirBatchScanList) * numScanLists*/
5078 tANI_U8 scanResults[1];
5079} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
5080
5081#endif // FEATURE_WLAN_BATCH_SCAN
5082
Leo Chang0b0e45a2013-12-15 15:18:55 -08005083#ifdef FEATURE_WLAN_CH_AVOID
Abhishek Singhe34eb552015-06-18 10:12:15 +05305084#define SIR_CH_AVOID_MAX_RANGE 15
Leo Chang0b0e45a2013-12-15 15:18:55 -08005085
5086typedef struct sSirChAvoidFreqType
5087{
5088 tANI_U32 startFreq;
5089 tANI_U32 endFreq;
5090} tSirChAvoidFreqType;
5091
5092typedef struct sSirChAvoidIndType
5093{
5094 tANI_U32 avoidRangeCount;
5095 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
5096} tSirChAvoidIndType;
5097#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05305098
c_hpothu92367912014-05-01 15:18:17 +05305099typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
5100 VOS_STATUS status, void *data);
Abhishek Singh08aa7762014-12-16 13:59:03 +05305101typedef void (*tSirFWStatsCallback)(VOS_STATUS status,
5102 tSirFwStatsResult *fwStatsRsp, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05305103typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind);
5104
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305105typedef void (*tAntennaDivSelCB)(int antennaId, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05305106
5107/**
5108 * struct sir_sme_mgmt_frame_cb_req - Register a
5109 * management frame callback req
5110 * @message_type: message id
5111 * @length: msg length
5112 * @callback: callback for management frame indication
5113 */
5114struct sir_sme_mgmt_frame_cb_req
5115{
5116 tANI_U16 message_type;
5117 tANI_U16 length;
5118 sir_mgmt_frame_ind_callback callback;
5119};
5120
c_hpothu92367912014-05-01 15:18:17 +05305121typedef PACKED_PRE struct PACKED_POST
5122{
5123 tANI_U32 msgLen;
5124 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
5125 void *callback;
5126 void *data;
5127}tSirBcnMissRateReq;
5128
5129typedef PACKED_PRE struct PACKED_POST
5130{
5131 pGetBcnMissRateCB callback;
5132 void *data;
5133}tSirBcnMissRateInfo;
5134
Sunil Duttc69bccb2014-05-26 21:30:20 +05305135#ifdef WLAN_FEATURE_LINK_LAYER_STATS
5136
5137typedef struct
5138{
5139 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305140 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305141 u32 mpduSizeThreshold;
5142 u32 aggressiveStatisticsGathering;
5143}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
5144
5145typedef struct
5146{
5147 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305148 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305149 u32 paramIdMask;
5150}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
5151
5152typedef struct
5153{
5154 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305155 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305156 u32 statsClearReqMask;
5157 u8 stopReq;
5158}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
5159
Abhishek Singh3ae443b2014-10-08 11:49:27 +05305160typedef PACKED_PRE struct PACKED_POST
5161{
5162 u32 stats;
5163 tSirFWStatsCallback callback;
5164 void *data;
5165}tSirFWStatsGetReq;
5166
5167typedef PACKED_PRE struct PACKED_POST
5168{
5169 tSirFWStatsCallback callback;
5170 void *data;
5171}tSirFWStatsInfo;
5172
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305173typedef PACKED_PRE struct PACKED_POST
5174{
5175 tANI_U16 status;
5176 tANI_U32 selectedAntennaId;
5177 tANI_U32 reserved;
5178} tSirAntennaDivSelRsp, *tpSirntennaDivSelRsp;
5179
5180typedef PACKED_PRE struct PACKED_POST
5181{
5182 tAntennaDivSelCB callback;
5183 void *data;
5184 tANI_U32 reserved;
5185}tSirAntennaDiversitySelectionReq;
5186
5187typedef PACKED_PRE struct PACKED_POST
5188{
5189 tAntennaDivSelCB callback;
5190 void *data;
5191}tSirAntennaDiversitySelectionInfo;
5192
Sunil Duttc69bccb2014-05-26 21:30:20 +05305193/*---------------------------------------------------------------------------
5194 WLAN_HAL_LL_NOTIFY_STATS
5195---------------------------------------------------------------------------*/
5196
5197
5198/******************************LINK LAYER Statistics**********************/
5199
5200typedef int tSirWifiRadio;
5201typedef int tSirWifiChannel;
5202typedef int tSirwifiTxRate;
5203
5204/* channel operating width */
5205typedef PACKED_PRE enum PACKED_POST
5206{
5207 WIFI_CHAN_WIDTH_20 = 0,
5208 WIFI_CHAN_WIDTH_40 = 1,
5209 WIFI_CHAN_WIDTH_80 = 2,
5210 WIFI_CHAN_WIDTH_160 = 3,
5211 WIFI_CHAN_WIDTH_80P80 = 4,
5212 WIFI_CHAN_WIDTH_5 = 5,
5213 WIFI_CHAN_WIDTH_10 = 6,
5214} tSirWifiChannelWidth;
5215
5216typedef PACKED_PRE enum PACKED_POST
5217{
5218 WIFI_DISCONNECTED = 0,
5219 WIFI_AUTHENTICATING = 1,
5220 WIFI_ASSOCIATING = 2,
5221 WIFI_ASSOCIATED = 3,
5222 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
5223 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
5224} tSirWifiConnectionState;
5225
5226typedef PACKED_PRE enum PACKED_POST
5227{
5228 WIFI_ROAMING_IDLE = 0,
5229 WIFI_ROAMING_ACTIVE = 1,
5230} tSirWifiRoamState;
5231
5232typedef PACKED_PRE enum PACKED_POST
5233{
Dino Myclec8f3f332014-07-21 16:48:27 +05305234 WIFI_INTERFACE_UNKNOWN = -1,
Sunil Duttc69bccb2014-05-26 21:30:20 +05305235 WIFI_INTERFACE_STA = 0,
5236 WIFI_INTERFACE_SOFTAP = 1,
5237 WIFI_INTERFACE_IBSS = 2,
5238 WIFI_INTERFACE_P2P_CLIENT = 3,
5239 WIFI_INTERFACE_P2P_GO = 4,
5240 WIFI_INTERFACE_NAN = 5,
5241 WIFI_INTERFACE_MESH = 6,
5242 } tSirWifiInterfaceMode;
5243
5244// set for QOS association
5245#define WIFI_CAPABILITY_QOS 0x00000001
5246// set for protected association (802.11 beacon frame control protected bit set)
5247#define WIFI_CAPABILITY_PROTECTED 0x00000002
5248// set if 802.11 Extended Capabilities element interworking bit is set
5249#define WIFI_CAPABILITY_INTERWORKING 0x00000004
5250// set for HS20 association
5251#define WIFI_CAPABILITY_HS20 0x00000008
5252// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
5253#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
5254// set is 802.11 Country Element is present
5255#define WIFI_CAPABILITY_COUNTRY 0x00000020
5256
5257typedef PACKED_PRE struct PACKED_POST
5258{
5259 /*tSirWifiInterfaceMode*/
5260 // interface mode
Dino Myclec8f3f332014-07-21 16:48:27 +05305261 tANI_S8 mode;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305262 // interface mac address (self)
5263 tSirMacAddr macAddr;
5264 /*tSirWifiConnectionState*/
5265 // connection state (valid for STA, CLI only)
5266 tANI_U8 state;
5267 /*tSirWifiRoamState*/
5268 // roaming state
5269 tANI_U8 roaming;
5270 // WIFI_CAPABILITY_XXX (self)
5271 tANI_U32 capabilities;
5272 // null terminated SSID
5273 tANI_U8 ssid[33];
5274 // bssid
5275 tSirMacAddr bssid;
5276 // country string advertised by AP
5277 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
5278 // country string for this association
5279 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
5280} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
5281
5282/* channel information */
5283typedef PACKED_PRE struct PACKED_POST
5284{
5285 // channel width (20, 40, 80, 80+80, 160)
5286 tSirWifiChannelWidth width;
5287 // primary 20 MHz channel
5288 tSirWifiChannel centerFreq;
5289 // center frequency (MHz) first segment
5290 tSirWifiChannel centerFreq0;
5291 // center frequency (MHz) second segment
5292 tSirWifiChannel centerFreq1;
5293} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
5294
5295/* wifi rate info */
5296typedef PACKED_PRE struct PACKED_POST
5297{
5298 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
5299 tANI_U32 preamble :3;
5300 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
5301 tANI_U32 nss :2;
5302 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
5303 tANI_U32 bw :3;
5304 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
5305 // HT/VHT it would be mcs index
5306 tANI_U32 rateMcsIdx :8;
5307 // reserved
5308 tANI_U32 reserved :16;
5309 // units of 100 Kbps
5310 tANI_U32 bitrate;
5311} tSirWifiRate, *tpSirWifiRate;
5312
5313/* channel statistics */
5314typedef PACKED_PRE struct PACKED_POST
5315{
5316 // channel
5317 tSirWifiChannelInfo channel;
5318 // msecs the radio is awake (32 bits number accruing over time)
5319 tANI_U32 onTime;
5320 // msecs the CCA register is busy (32 bits number accruing over time)
5321 tANI_U32 ccaBusyTime;
5322} tSirWifiChannelStats, *tpSirWifiChannelStats;
5323
5324/* radio statistics */
5325typedef PACKED_PRE struct PACKED_POST
5326{
5327 // wifi radio (if multiple radio supported)
5328 tSirWifiRadio radio;
5329 // msecs the radio is awake (32 bits number accruing over time)
5330 tANI_U32 onTime;
5331 /* msecs the radio is transmitting
5332 * (32 bits number accruing over time)
5333 */
5334 tANI_U32 txTime;
5335 /* msecs the radio is in active receive
5336 *(32 bits number accruing over time)
5337 */
5338 tANI_U32 rxTime;
5339 /* msecs the radio is awake due to all scan
5340 * (32 bits number accruing over time)
5341 */
5342 tANI_U32 onTimeScan;
5343 /* msecs the radio is awake due to NAN
5344 * (32 bits number accruing over time)
5345 */
5346 tANI_U32 onTimeNbd;
Dino Mycle2c198072014-06-10 10:15:52 +05305347 /* msecs the radio is awake due to EXTScan
Sunil Duttc69bccb2014-05-26 21:30:20 +05305348 * (32 bits number accruing over time)
5349 */
Dino Mycle2c198072014-06-10 10:15:52 +05305350 tANI_U32 onTimeEXTScan;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305351 /* msecs the radio is awake due to roam?scan
5352 * (32 bits number accruing over time)
5353 */
5354 tANI_U32 onTimeRoamScan;
5355 /* msecs the radio is awake due to PNO scan
5356 * (32 bits number accruing over time)
5357 */
5358 tANI_U32 onTimePnoScan;
5359 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
5360 * (32 bits number accruing over time)
5361 */
5362 tANI_U32 onTimeHs20;
5363 // number of channels
5364 tANI_U32 numChannels;
5365 // channel statistics tSirWifiChannelStats
5366 tSirWifiChannelStats channels[1];
5367} tSirWifiRadioStat, *tpSirWifiRadioStat;
5368
5369/* per rate statistics */
5370typedef PACKED_PRE struct PACKED_POST
5371{
5372 // rate information
5373 tSirWifiRate rate;
5374 // number of successfully transmitted data pkts (ACK rcvd)
5375 tANI_U32 txMpdu;
5376 // number of received data pkts
5377 tANI_U32 rxMpdu;
5378 // number of data packet losses (no ACK)
5379 tANI_U32 mpduLost;
5380 // total number of data pkt retries *
5381 tANI_U32 retries;
5382 // number of short data pkt retries
5383 tANI_U32 retriesShort;
5384 // number of long data pkt retries
5385 tANI_U32 retriesLong;
5386} tSirWifiRateStat, *tpSirWifiRateStat;
5387
5388/* access categories */
5389typedef PACKED_PRE enum PACKED_POST
5390{
5391 WIFI_AC_VO = 0,
5392 WIFI_AC_VI = 1,
5393 WIFI_AC_BE = 2,
5394 WIFI_AC_BK = 3,
5395 WIFI_AC_MAX = 4,
5396} tSirWifiTrafficAc;
5397
5398/* wifi peer type */
5399typedef PACKED_PRE enum PACKED_POST
5400{
5401 WIFI_PEER_STA,
5402 WIFI_PEER_AP,
5403 WIFI_PEER_P2P_GO,
5404 WIFI_PEER_P2P_CLIENT,
5405 WIFI_PEER_NAN,
5406 WIFI_PEER_TDLS,
5407 WIFI_PEER_INVALID,
5408} tSirWifiPeerType;
5409
5410/* per peer statistics */
5411typedef PACKED_PRE struct PACKED_POST
5412{
5413 // peer type (AP, TDLS, GO etc.)
5414 tSirWifiPeerType type;
5415 // mac address
5416 tSirMacAddr peerMacAddress;
5417 // peer WIFI_CAPABILITY_XXX
5418 tANI_U32 capabilities;
5419 // number of rates
5420 tANI_U32 numRate;
5421 // per rate statistics, number of entries = num_rate
5422 tSirWifiRateStat rateStats[1];
5423} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5424
5425/* per access category statistics */
5426typedef PACKED_PRE struct PACKED_POST
5427{
5428 /*tSirWifiTrafficAc*/
5429 // access category (VI, VO, BE, BK)
5430 tANI_U8 ac;
5431 // number of successfully transmitted unicast data pkts (ACK rcvd)
5432 tANI_U32 txMpdu;
5433 // number of received unicast mpdus
5434 tANI_U32 rxMpdu;
5435 // number of succesfully transmitted multicast data packets
5436 // STA case: implies ACK received from AP for the unicast
5437 // packet in which mcast pkt was sent
5438 tANI_U32 txMcast;
5439 // number of received multicast data packets
5440 tANI_U32 rxMcast;
5441 // number of received unicast a-mpdus
5442 tANI_U32 rxAmpdu;
5443 // number of transmitted unicast a-mpdus
5444 tANI_U32 txAmpdu;
5445 // number of data pkt losses (no ACK)
5446 tANI_U32 mpduLost;
5447 // total number of data pkt retries
5448 tANI_U32 retries;
5449 // number of short data pkt retries
5450 tANI_U32 retriesShort;
5451 // number of long data pkt retries
5452 tANI_U32 retriesLong;
5453 // data pkt min contention time (usecs)
5454 tANI_U32 contentionTimeMin;
5455 // data pkt max contention time (usecs)
5456 tANI_U32 contentionTimeMax;
5457 // data pkt avg contention time (usecs)
5458 tANI_U32 contentionTimeAvg;
5459 // num of data pkts used for contention statistics
5460 tANI_U32 contentionNumSamples;
5461} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5462
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305463#ifdef FEATURE_EXT_LL_STAT
5464typedef PACKED_PRE struct PACKED_POST
5465{
5466 /* Average Beacon spread offset is the averaged
5467 * time delay between TBTT and beacon TSF
5468 */
5469 tANI_U64 avg_bcn_spread;
5470 /* Average number of frames received from AP after
5471 * receiving the ACK for a frame with PM=1
5472 */
5473 tANI_U32 avg_rx_frms_leaked;
5474 /* Rx leak watch window currently in force to minimize data loss
5475 * because of leaky AP. Rx leak window is the time driver waits
5476 * before shutting down the radio or switching the channel and
5477 * after receiving an ACK for a data frame with PM bit set)
5478 */
5479 tANI_U32 rx_leak_window;
5480
5481 /* Takes value of 1 if AP leaks packets after sending
5482 * an ACK for PM=1 otherwise 0
5483 */
5484 tANI_U32 is_leaky_ap;
5485
5486} tSirWifiIfaceLeakyApStat, *tpSirWifiIfaceLeakyApStat;
5487#endif
5488
Sunil Duttc69bccb2014-05-26 21:30:20 +05305489/* Interface statistics - corresponding to 2nd most
5490 * LSB in wifi statistics bitmap for getting statistics
5491 */
5492typedef PACKED_PRE struct PACKED_POST
5493{
5494 // current state of the interface
5495 tSirWifiInterfaceInfo info;
5496 // access point beacon received count from connected AP
5497 tANI_U32 beaconRx;
5498 // access point mgmt frames received count from
5499 // connected AP (including Beacon)
5500 tANI_U32 mgmtRx;
5501 // action frames received count
5502 tANI_U32 mgmtActionRx;
5503 // action frames transmit count
5504 tANI_U32 mgmtActionTx;
5505 // access Point Beacon and Management frames RSSI (averaged)
Dino Mycle3b9536d2014-07-09 22:05:24 +05305506 tANI_S32 rssiMgmt;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305507 // access Point Data Frames RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305508 tANI_S32 rssiData;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305509 // access Point ACK RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305510 tANI_S32 rssiAck;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305511 // per ac data packet statistics
5512 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305513#ifdef FEATURE_EXT_LL_STAT
5514 //Leaky Ap Stats
5515 tSirWifiIfaceLeakyApStat leakyApStat;
5516#endif
Sunil Duttc69bccb2014-05-26 21:30:20 +05305517} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5518
5519/* Peer statistics - corresponding to 3rd most LSB in
5520 * wifi statistics bitmap for getting statistics
5521 */
5522typedef PACKED_PRE struct PACKED_POST
5523{
5524 // number of peers
5525 tANI_U32 numPeers;
5526 // per peer statistics
5527 tSirWifiPeerInfo peerInfo[1];
5528} tSirWifiPeerStat, *tpSirWifiPeerStat;
5529
5530/* wifi statistics bitmap for getting statistics */
5531#define WMI_LINK_STATS_RADIO 0x00000001
5532#define WMI_LINK_STATS_IFACE 0x00000002
5533#define WMI_LINK_STATS_ALL_PEER 0x00000004
5534#define WMI_LINK_STATS_PER_PEER 0x00000008
5535
5536/* wifi statistics bitmap for clearing statistics */
5537// all radio statistics
5538#define WIFI_STATS_RADIO 0x00000001
5539// cca_busy_time (within radio statistics)
5540#define WIFI_STATS_RADIO_CCA 0x00000002
5541// all channel statistics (within radio statistics)
5542#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5543// all scan statistics (within radio statistics)
5544#define WIFI_STATS_RADIO_SCAN 0x00000008
5545// all interface statistics
5546#define WIFI_STATS_IFACE 0x00000010
5547// all tx rate statistics (within interface statistics)
5548#define WIFI_STATS_IFACE_TXRATE 0x00000020
5549// all ac statistics (within interface statistics)
5550#define WIFI_STATS_IFACE_AC 0x00000040
5551// all contention (min, max, avg) statistics (within ac statistics)
5552#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5553
5554typedef PACKED_PRE struct PACKED_POST
5555{
5556 tANI_U32 paramId;
5557 tANI_U8 ifaceId;
5558 tANI_U32 respId;
5559 tANI_U32 moreResultToFollow;
5560 tANI_U8 result[1];
5561} tSirLLStatsResults, *tpSirLLStatsResults;
5562
5563#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5564
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05305565
5566
Dino Mycle2c198072014-06-10 10:15:52 +05305567#ifdef WLAN_FEATURE_EXTSCAN
5568
5569typedef enum
5570{
5571 WIFI_BAND_UNSPECIFIED,
5572 WIFI_BAND_BG = 1, // 2.4 GHz
5573 WIFI_BAND_A = 2, // 5 GHz without DFS
5574 WIFI_BAND_ABG = 3, // 2.4 GHz + 5 GHz; no DFS
5575 WIFI_BAND_A_DFS_ONLY = 4, // 5 GHz DFS only
5576 // 5 is reserved
5577 WIFI_BAND_A_WITH_DFS = 6, // 5 GHz with DFS
5578 WIFI_BAND_ABG_WITH_DFS = 7, // 2.4 GHz + 5 GHz with DFS
5579
5580 /* Keep it last */
5581 WIFI_BAND_MAX
5582} tWifiBand;
5583
5584/* wifi scan related events */
5585typedef enum
5586{
5587 WIFI_SCAN_BUFFER_FULL,
5588 WIFI_SCAN_COMPLETE,
5589} tWifiScanEventType;
5590
5591typedef struct
5592{
5593 tSirMacAddr bssid; // AP BSSID
5594 tANI_S32 low; // low threshold
5595 tANI_S32 high; // high threshold
Dino Mycle2c198072014-06-10 10:15:52 +05305596} tSirAPThresholdParam, *tpSirAPThresholdParam;
5597
5598typedef struct
5599{
5600 tANI_U32 requestId;
5601 tANI_U8 sessionId;
5602} tSirGetEXTScanCapabilitiesReqParams, *tpSirGetEXTScanCapabilitiesReqParams;
5603
5604typedef struct
5605{
5606 tANI_U32 requestId;
5607 tANI_U32 status;
5608
5609 tANI_U32 scanCacheSize;
5610 tANI_U32 scanBuckets;
5611 tANI_U32 maxApPerScan;
5612 tANI_U32 maxRssiSampleSize;
5613 tANI_U32 maxScanReportingThreshold;
5614
5615 tANI_U32 maxHotlistAPs;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305616 tANI_U32 maxHotlistSSIDs;
Dino Mycle2c198072014-06-10 10:15:52 +05305617
5618 tANI_U32 maxBsidHistoryEntries;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305619
Dino Mycle2c198072014-06-10 10:15:52 +05305620} tSirEXTScanCapabilitiesEvent, *tpSirEXTScanCapabilitiesEvent;
5621
5622/* WLAN_HAL_EXT_SCAN_RESULT_IND */
5623typedef struct
5624{
5625 tANI_U32 requestId;
5626 tANI_U8 sessionId;
5627
5628 /*
5629 * 1 return cached results and flush it
5630 * 0 return cached results and do not flush
5631 */
5632 tANI_BOOLEAN flush;
5633} tSirEXTScanGetCachedResultsReqParams, *tpSirEXTScanGetCachedResultsReqParams;
5634
5635typedef PACKED_PRE struct PACKED_POST
5636{
5637 tANI_U32 requestId;
5638 tANI_U32 status;
5639} tSirEXTScanGetCachedResultsRspParams, *tpSirEXTScanGetCachedResultsRspParams;
5640
5641typedef PACKED_PRE struct PACKED_POST
5642{
5643 tANI_U64 ts; // time of discovery
5644 tANI_U8 ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; // null terminated SSID
5645 tSirMacAddr bssid; // BSSID
5646 tANI_U32 channel; // channel frequency in MHz
5647 tANI_S32 rssi; // RSSI in dBm
5648 tANI_U32 rtt; // RTT in nanoseconds
5649 tANI_U32 rtt_sd; // standard deviation in rtt
5650 tANI_U16 beaconPeriod; // period advertised in the beacon
5651 tANI_U16 capability; // capabilities advertised in the beacon
5652} tSirWifiScanResult, *tpSirWifiScanResult;
5653
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305654/**
5655 * struct tExtscanCachedScanResult - extscan cached scan result
5656 * @scan_id: a unique identifier for the scan unit
5657 * @flags: a bitmask with additional information about scan
5658 * @num_results: number of bssids retrieved by the scan
5659 * @ap: wifi scan bssid results info
5660 */
5661
5662typedef PACKED_PRE struct PACKED_POST
5663{
5664 tANI_U16 scan_id;
5665 tANI_U8 flags;
5666 tANI_U8 num_results;
5667
5668 tSirWifiScanResult ap[32];
5669} tExtscanCachedScanResult, *tpExtscanCachedScanResult;
5670
Dino Mycle2c198072014-06-10 10:15:52 +05305671/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
5672
5673typedef PACKED_PRE struct PACKED_POST
5674{
5675 tANI_U32 requestId;
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305676 tANI_BOOLEAN bss_found;
5677 tANI_U32 numHotlistBss; // numbers of APs
5678
5679 /*
5680 * 0 for last fragment
5681 * 1 still more fragment(s) coming
5682 */
5683 tANI_BOOLEAN moreData;
5684 tSirWifiScanResult bssHotlist[1];
5685} tSirEXTScanHotlistMatch, *tpSirEXTScanHotlistMatch;
5686
Anurag Chouhan83026002016-12-13 22:46:21 +05305687#ifdef DHCP_SERVER_OFFLOAD
5688/**
5689 * sir_dhcp_srv_offload_info_t - dhcp server offload info
5690 * @bssidx: bss index
5691 * @dhcp_srv_offload_enabled: enable or disable
5692 * @dhcp_client_num: number of clients supported
5693 * @dhcp_srv_ip: server ip address
5694 * @start_lsb: lsb of start address of dhcp pool
5695 */
5696typedef struct
5697{
5698 tANI_U8 bssidx;
5699 tANI_U32 dhcp_srv_offload_enabled;
5700 tANI_U32 dhcp_client_num;
5701 tANI_U32 dhcp_srv_ip;
5702 tANI_U32 start_lsb;
5703 dhcp_offload_req_cb dhcp_offload_callback;
5704 void *dhcp_server_offload_cb_context;
5705} sir_dhcp_srv_offload_info_t, *sir_dhcp_srv_offload_info;
5706#endif /* DHCP_SERVER_OFFLOAD */
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305707
Anurag Chouhan0b29de02016-12-16 13:18:40 +05305708#ifdef MDNS_OFFLOAD
5709#define MAX_MDNS_FQDN_LEN 64
5710#define MAX_MDNS_RESP_LEN 512
5711
5712typedef struct
5713{
5714 tANI_U8 bss_idx;
5715 tANI_U32 enable;
5716 mdns_enable_req_cb mdns_enable_callback;
5717 void *mdns_enable_cb_context;
5718} sir_mdns_offload_info_t, *sir_mdns_offload_info;
5719
5720typedef struct
5721{
5722 tANI_U8 bss_idx;
5723 tANI_U32 fqdn_type;
5724 tANI_U32 fqdn_len;
5725 tANI_U8 fqdn_data[MAX_MDNS_FQDN_LEN];
5726 mdns_fqdn_req_cb mdns_fqdn_callback;
5727 void *mdns_fqdn_cb_context;
5728
5729} sir_mdns_fqdn_info_t, *sir_mdns_fqdn_info;
5730
5731typedef struct
5732{
5733 tANI_U8 bss_idx;
5734 tANI_U32 resourceRecord_count;
5735 tANI_U32 resp_len;
5736 tANI_U8 resp_data[MAX_MDNS_RESP_LEN];
5737 mdns_resp_req_cb mdns_resp_callback;
5738 void *mdns_resp_cb_context;
5739} sir_mdns_resp_info_t, *sir_mdns_resp_info;
5740
5741typedef struct
5742{
5743 tANI_U8 bss_idx;
5744} sir_get_mdns_stats_info_t, *sir_get_mdns_stats_info;
5745#endif /* MDNS_OFFLOAD */
5746
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305747typedef PACKED_PRE struct PACKED_POST
5748{
5749 tANI_U32 requestId;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305750 /*
5751 * It gives number of scan ids
5752 */
5753 tANI_U32 scanResultSize;
Dino Mycle2c198072014-06-10 10:15:52 +05305754
5755 /*
5756 * 0 for last fragment
5757 * 1 still more fragment(s) coming
5758 */
5759 tANI_BOOLEAN moreData;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305760 tANI_U8 result[1];
Dino Mycle2c198072014-06-10 10:15:52 +05305761} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
5762
5763typedef PACKED_PRE struct PACKED_POST
5764{
5765 tANI_U8 elemId; // Element Identifier
5766 tANI_U8 ieLength; // length of IE data
5767 tANI_U8 *IEs; // IEs
5768} tSirInformationElement, *tpSirInformationElement;
5769
5770/* Reported when each probe response is received, if reportEvents
5771* enabled in tSirWifiScanCmdReqParams */
5772typedef struct
5773{
5774 tANI_U32 requestId;
5775
5776 /*
5777 * 0 for last fragment
5778 * 1 still more fragment(s) coming
5779 */
5780 tANI_BOOLEAN moreData;
5781 tSirWifiScanResult ap; // only 1 AP info for now
5782 tANI_U32 ieLength;
5783 tSirInformationElement *ie;
5784} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
5785
5786
5787typedef struct
5788{
5789 tANI_U32 channel; // frequency
5790 tANI_U32 dwellTimeMs; // dwell time hint
5791 tANI_U8 passive; // 0 => active,
5792 // 1 => passive scan; ignored for DFS
5793 tANI_U8 chnlClass;
5794} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
5795
5796typedef struct
5797{
5798 tANI_U8 bucket; // bucket index, 0 based
5799 tWifiBand band; // when UNSPECIFIED, use channel list
5800
5801 /*
5802 * desired period, in millisecond; if this is too
5803 * low, the firmware should choose to generate results as fast as
5804 * it can instead of failing the command byte
5805 */
5806 tANI_U32 period;
5807
5808 /*
5809 * 0 => normal reporting (reporting rssi history
5810 * only, when rssi history buffer is % full)
5811 * 1 => same as 0 + report a scan completion event after scanning
5812 * this bucket
5813 * 2 => same as 1 + forward scan results (beacons/probe responses + IEs)
5814 * in real time to HAL
5815 */
5816 tANI_U8 reportEvents;
5817
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305818 tANI_U32 max_period;
5819 tANI_U32 exponent;
5820 tANI_U32 step_count;
5821
Dino Mycle2c198072014-06-10 10:15:52 +05305822 tANI_U8 numChannels;
5823
5824 /*
5825 * channels to scan; these may include DFS channels
5826 */
5827 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
5828} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
5829
5830typedef struct
5831{
5832 tANI_U32 requestId;
5833 tANI_U8 sessionId;
5834 tANI_U32 basePeriod; // base timer period
5835 tANI_U32 maxAPperScan;
5836
5837 /* in %, when buffer is this much full, wake up host */
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305838 tANI_U32 reportThresholdPercent;
5839 tANI_U32 reportThresholdNumScans;
Dino Mycle2c198072014-06-10 10:15:52 +05305840
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305841 tANI_U32 homeAwayTime; //in units of milliseconds
5842
5843 tANI_U8 numBuckets;
Dino Mycle2c198072014-06-10 10:15:52 +05305844 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
5845} tSirEXTScanStartReqParams, *tpSirEXTScanStartReqParams;
5846
5847typedef PACKED_PRE struct PACKED_POST
5848{
5849 tANI_U32 requestId;
5850 tANI_U32 status;
5851} tSirEXTScanStartRspParams, *tpSirEXTScanStartRspParams;
5852
5853typedef struct
5854{
5855 tANI_U32 requestId;
5856 tANI_U8 sessionId;
5857} tSirEXTScanStopReqParams, *tpSirEXTScanStopReqParams;
5858
5859typedef PACKED_PRE struct PACKED_POST
5860{
5861 tANI_U32 requestId;
5862 tANI_U32 status;
5863} tSirEXTScanStopRspParams, *tpSirEXTScanStopRspParams;
5864
5865typedef struct
5866{
5867 tANI_U32 requestId;
5868 tANI_U8 sessionId; // session Id mapped to vdev_id
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305869 tANI_U32 lostBssidSampleSize;
5870 tANI_U32 numBssid; // number of hotlist APs
Dino Mycle2c198072014-06-10 10:15:52 +05305871 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; // hotlist APs
5872} tSirEXTScanSetBssidHotListReqParams, *tpSirEXTScanSetBssidHotListReqParams;
5873
5874typedef PACKED_PRE struct PACKED_POST
5875{
5876 tANI_U32 requestId;
5877 tANI_U32 status;
5878} tSirEXTScanSetBssidHotListRspParams, *tpSirEXTScanSetBssidHotListRspParams;
5879
5880typedef struct
5881{
5882 tANI_U32 requestId;
5883 tANI_U8 sessionId;
5884} tSirEXTScanResetBssidHotlistReqParams, *tpSirEXTScanResetBssidHotlistReqParams;
5885
5886typedef PACKED_PRE struct PACKED_POST
5887{
5888 tANI_U32 requestId;
5889 tANI_U32 status;
5890} tSirEXTScanResetBssidHotlistRspParams, *tpSirEXTScanResetBssidHotlistRspParams;
5891
Dino Mycle2c198072014-06-10 10:15:52 +05305892/*---------------------------------------------------------------------------
5893 * * WLAN_HAL_EXTSCAN_RESULT_AVAILABLE_IND
5894 * *-------------------------------------------------------------------------*/
5895typedef PACKED_PRE struct PACKED_POST
5896{
5897 tANI_U32 requestId;
5898 tANI_U32 numResultsAvailable;
5899} tSirEXTScanResultsAvailableIndParams,
5900 *tpSirEXTScanResultsAvailableIndParams;
5901
5902typedef PACKED_PRE struct PACKED_POST
5903{
5904 tANI_U8 scanEventType;
5905 tANI_U32 status;
5906} tSirEXTScanOnScanEventIndParams,
5907 *tpSirEXTScanOnScanEventIndParams;
5908
5909/*---------------------------------------------------------------------------
5910 * * WLAN_HAL_EXTSCAN_PROGRESS_IND
5911 * *-------------------------------------------------------------------------*/
5912
5913typedef PACKED_PRE enum PACKED_POST
5914{
5915 WLAN_HAL_EXTSCAN_BUFFER_FULL,
5916 WLAN_HAL_EXTSCAN_COMPLETE,
5917}tSirEXTScanProgressEventType;
5918
5919typedef PACKED_PRE struct PACKED_POST
5920{
5921 tANI_U32 requestId;
5922 tANI_U32 status;
5923 tSirEXTScanProgressEventType extScanEventType;
5924}tSirEXTScanProgressIndParams,
5925 *tpSirEXTScanProgressIndParams;
5926
Padma, Santhosh Kumarc1f7f052015-08-26 12:29:01 +05305927typedef PACKED_PRE struct PACKED_POST
5928{
5929 tANI_BOOLEAN pause; // 1 -> pause, 0 -> unpause
5930 tANI_U32 reserved; //reserved for future use
5931}tSirHighPriorityDataInfoInd, *tpSirHighPriorityDataInfoInd;
Dino Mycle2c198072014-06-10 10:15:52 +05305932
5933#endif /* WLAN_FEATURE_EXTSCAN */
5934
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +05305935typedef struct
5936{
5937 tANI_U16 messageType;
5938 tANI_U16 length;
5939 tSirMacAddr macAddr;
Rajeev Kumar Sirasanagandla2bb30b82019-01-07 22:30:16 +05305940 bool spoof_mac_oui;
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +05305941} tSirSpoofMacAddrReq, *tpSirSpoofMacAddrReq;
5942
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05305943typedef struct
5944{
5945 //BIT order is most likely little endian.
5946 //This structure is for netowkr-order byte array (or big-endian byte order)
5947#ifndef WLAN_PAL_BIG_ENDIAN_BIT
5948 tANI_U8 protVer :2;
5949 tANI_U8 type :2;
5950 tANI_U8 subType :4;
5951
5952 tANI_U8 toDS :1;
5953 tANI_U8 fromDS :1;
5954 tANI_U8 moreFrag :1;
5955 tANI_U8 retry :1;
5956 tANI_U8 powerMgmt :1;
5957 tANI_U8 moreData :1;
5958 tANI_U8 wep :1;
5959 tANI_U8 order :1;
5960
5961#else
5962
5963 tANI_U8 subType :4;
5964 tANI_U8 type :2;
5965 tANI_U8 protVer :2;
5966
5967 tANI_U8 order :1;
5968 tANI_U8 wep :1;
5969 tANI_U8 moreData :1;
5970 tANI_U8 powerMgmt :1;
5971 tANI_U8 retry :1;
5972 tANI_U8 moreFrag :1;
5973 tANI_U8 fromDS :1;
5974 tANI_U8 toDS :1;
5975
5976#endif
5977
5978} tSirFC;
5979
5980typedef struct
5981{
5982 /* Frame control field */
5983 tSirFC frameCtrl;
5984 /* Duration ID */
5985 tANI_U16 usDurationId;
5986 /* Address 1 field */
5987 tSirMacAddr vA1;
5988 /* Address 2 field */
5989 tSirMacAddr vA2;
5990 /* Address 3 field */
5991 tSirMacAddr vA3;
5992 /* Sequence control field */
5993 tANI_U16 sSeqCtrl;
5994 /* Optional A4 address */
5995 tSirMacAddr optvA4;
5996 /* Optional QOS control field */
5997 tANI_U16 usQosCtrl;
5998}tSir80211Header;
5999// Definition for Encryption Keys
6000//typedef struct sSirKeys
6001typedef struct
6002{
6003 tANI_U8 keyId;
6004 tANI_U8 unicast; // 0 for multicast
6005 tAniKeyDirection keyDirection;
6006 tANI_U8 keyRsc[WLAN_MAX_KEY_RSC_LEN]; // Usage is unknown
6007 tANI_U8 paeRole; // =1 for authenticator,
6008 // =0 for supplicant
6009 tANI_U16 keyLength;
6010 tANI_U8 key[SIR_MAC_MAX_KEY_LENGTH];
6011} tMacKeys, *tpMacKeys;
6012
6013typedef enum
6014{
6015 eMAC_WEP_STATIC,
6016 eMAC_WEP_DYNAMIC,
6017} tMacWepType;
6018
6019/*
6020 * This is used by PE to configure the key information on a given station.
6021 * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
6022 * a preconfigured key from a BSS the station assoicated with; otherwise
6023 * a new key descriptor is created based on the key field.
6024 */
6025//typedef struct
6026typedef struct
6027{
6028 tANI_U16 staIdx;
6029 tAniEdType encType; // Encryption/Decryption type
6030 tMacWepType wepType; // valid only for WEP
6031 tANI_U8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
6032 tMacKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
6033 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
6034 tANI_U8 sessionId; // PE session id for PE<->HAL interface
6035} tSirSetStaKeyParams, *tpSirSetStaKeyParams;
6036
6037//typedef struct
6038typedef struct
6039{
6040 tSirSetStaKeyParams keyParams;
6041 tANI_U8 pn[6];
6042}tSirencConfigParams;
6043
6044typedef struct
6045{
6046 tANI_U16 length;
6047 tANI_U8 data[WLAN_DISA_MAX_PAYLOAD_SIZE];
6048}tSirpayload;
6049
6050typedef struct
6051{
6052 tSir80211Header macHeader;
6053 tSirencConfigParams encParams;
6054 tSirpayload data;
6055}tSirpkt80211;
6056
6057typedef struct
6058{
6059 tANI_U32 status;
6060 tSirpayload encryptedPayload;
6061} tSetEncryptedDataRspParams, *tpSetEncryptedDataRspParams;
6062
6063typedef struct
6064{
6065 tANI_U16 mesgType;
6066 tANI_U16 mesgLen;
6067 tSetEncryptedDataRspParams encryptedDataRsp;
6068} tSirEncryptedDataRspParams, *tpSirEncryptedDataRspParams;
c_hpothua3d45d52015-01-05 14:11:17 +05306069
6070typedef enum eSirAbortScanStatus
6071{
6072 eSIR_ABORT_ACTIVE_SCAN_LIST_EMPTY,
6073 eSIR_ABORT_ACTIVE_SCAN_LIST_NOT_EMPTY,
6074 eSIR_ABORT_SCAN_FAILURE
6075}tSirAbortScanStatus;
6076
Masti, Narayanraddi4b359dd2015-02-03 15:49:29 +05306077/* Max number of rates allowed in Supported Rates IE */
6078#define MAX_NUM_SUPPORTED_RATES (8)
6079
Girish Gowlia95daca2015-02-04 20:31:31 +05306080typedef struct sSirSmeUpdateMaxRateParams
6081{
6082 tANI_U32 maxRateFlag;
6083 tANI_U8 smeSessionId;
6084}tSirSmeUpdateMaxRateParams, *tpSirSmeUpdateMaxRateParams;
6085
Srinivas Dasari32a79262015-02-19 13:04:49 +05306086typedef struct
6087{
6088 tANI_U32 event_data_len;
6089 tANI_U8 event_data[1];
6090} tSirNanEvent, *tpSirNanEvent;
Ganesh Kondabattinib18b3292015-03-16 16:59:26 +05306091
6092typedef struct
6093{
6094 tANI_U32 txCompleteStatus;
6095 tANI_U32 txBdToken;
6096}tSirTxBdStatus, *tpSirTxBdStatus;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05306097
6098/* enable or disable 20_40 BSS Coexistence IE in TDLS frames*/
6099typedef struct
6100{
6101 // Common for all types are requests
6102 tANI_U16 msgType; // message type is same as the request type
6103 tANI_U16 msgLen; // length of the entire request
6104 tANI_U8 SetTdls2040BSSCoex; //enabled or disabled
6105} tAniSetTdls2040BSSCoex, *tpAniSetTdls2040BSSCoex;
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05306106
Sushant Kaushik8e644982015-09-23 12:18:54 +05306107/**
6108 * struct sir_wifi_start_log - Structure to store the params sent to start/
6109 * stop logging
6110 * @ringId: Attribute which indicates the type of logging like per packet
6111 * statistics, connectivity etc.
6112 * @verboseLevel: Verbose level which can be 0,1,2,3
6113 * @flag: Flag field for future use
6114 */
6115typedef struct sir_wifi_start_log {
6116 tANI_U32 ringId;
6117 tANI_U32 verboseLevel;
6118 tANI_U32 flag;
6119}tAniWifiStartLog, *tpAniWifiStartLog;
6120
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05306121typedef struct
6122{
6123 tANI_U16 mesgType;
6124 tANI_U16 mesgLen;
6125 tSirMacAddr bssid;
6126}tSirDelAllTdlsPeers, *ptSirDelAllTdlsPeers;
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306127
Hanumanth Reddy Pothulab8be9ab2018-04-12 20:03:05 +05306128typedef void (*tSirMonModeCb)(void *context);
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306129typedef struct
6130{
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306131 void *data;
Hanumanth Reddy Pothulab8be9ab2018-04-12 20:03:05 +05306132 void *context;
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306133 tSirMonModeCb callback;
6134}tSirMonModeReq, *ptSirMonModeReq;
c_manjeecfd1efb2015-09-25 19:32:34 +05306135
6136/**
6137 * struct tAniFwrDumpRsp - firmware dump response details.
6138 *
6139 * This structure is used to store the firmware dump
6140 * response from the firmware.
6141 */
6142typedef struct
6143{
6144 tANI_U32 dump_status;
6145}tAniFwrDumpRsp, *tpAniFwrDumpRsp;
6146
6147typedef void (*FWMemDumpReqCb)(void *fwMemDumpReqContext, tAniFwrDumpRsp *dump_rsp);
6148
6149/**
6150 * struct tAniFwrDumpReq - firmware memory dump request details.
6151.*.@FWMemDumpReqCb - Associated Callback
6152 *.@fwMemDumpReqContext - Callback context
6153 * @reserved - reserved field 1.
6154 *
6155 * This structure carries information about the firmware
6156 * memory dump request.
6157 */
6158typedef struct
6159{
6160 FWMemDumpReqCb fwMemDumpReqCallback;
6161 void * fwMemDumpReqContext;
6162 tANI_U32 reserved1;
6163}tAniFwrDumpReq, *tpAniFwrDumpReq;
6164
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05306165/**
6166* struct tSetWifiConfigParams - Structure to store the wificonfig related params
6167* @paramType: 1. Average Stats factor 2. Guard type
6168* @paramvalue: Value to be set in the firmware.
6169* @bssId: macaddr of the connected BssId
6170*/
6171typedef struct
6172{
6173 tANI_U8 paramType;
6174 tANI_U8 sessionId;
6175 tANI_U32 paramValue;
6176 tSirMacAddr bssId;
6177} tSetWifiConfigParams, *tpSetWifiConfigParams;
6178
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306179typedef struct {
6180 tANI_U8 param;
6181 tANI_U32 value;
6182} tModifyRoamParamsReqParams, * tpModifyRoamParamsReqParams;
6183
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306184#ifdef SAP_AUTH_OFFLOAD
6185/* 80211 Pre-Share Key length */
6186#define SIR_PSK_MAX_LEN 64
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306187
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306188/**
6189 * enum tSirSecurityType - definition for Software AP Auth Offload
6190 * Security Type
6191 * @eSIR_OFFLOAD_NONE: None type security
6192 * @eSIR_OFFLOAD_WPA2PSK_CCMP: WPA2-PSK
6193 */
6194enum tSirSecurityType
6195{
6196 eSIR_OFFLOAD_NONE,
6197 eSIR_OFFLOAD_WPA2PSK_CCMP,
6198};
6199
6200/**
6201 * struct tSirSapOffloadInfo - Structure to store sap offload related params.
6202 * @macAddr: Self mac address
6203 * @sap_auth_offload_enable: tell if sap auth offload is enabled or not.
6204 * @sap_auth_offload_sec_type: tells security type
6205 * 0 - none
6206 * 1 - WPA1-PSK
6207 * @key_len: psk key length
6208 * @key: psk key.
6209 */
6210struct tSirSapOffloadInfo
6211{
6212 tSirMacAddr macAddr;
6213 bool sap_auth_offload_enable;
6214 uint32_t sap_auth_offload_sec_type;
6215 uint32_t key_len;
6216 uint8_t key[SIR_PSK_MAX_LEN];
6217};
Agrawal Ashisha8e8a722016-10-18 19:07:45 +05306218
6219typedef PACKED_PRE struct PACKED_POST
6220{
6221 /** staId returned from firmware for each STA association to SAP */
6222 tANI_U8 staIdx;
6223 /** bssIdx on which the STA is added */
6224 tANI_U8 bssIdx;
6225 /** DPU desc index of this station */
6226 tANI_U8 dpuIndex;
6227 /** Bcast DPU index of this station */
6228 tANI_U8 bcastDpuIndex;
6229 /** Bcast DPU Management index of this station */
6230 tANI_U8 bcastMgmtDpuIdx;
6231
6232 tANI_U8 ucUcastSig;
6233
6234 tANI_U8 ucBcastSig;
6235
6236 tANI_U8 ucMgmtSig;
6237 /** aid (association id) of this station */
6238 tANI_U32 assoc_id;
6239 /** peer station's mac addr */
6240 tSirMacAddr peer_macaddr;
6241 /** length of association request frame */
6242 tANI_U32 data_len;
6243 /* Following this structure is the byte stream of a whole
6244 * association request frame of length data_len
6245 */
6246 tANI_U8 bufp[1];
6247} tSapOfldAddStaIndMsg, *tpSapOfldAddStaIndMsg;
6248
6249typedef enum
6250{
6251 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
6252 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
6253} eSapOfldDelStaFlags;
6254
6255typedef PACKED_PRE struct PACKED_POST
6256{
6257 tANI_U32 staIdx;
6258 /** bssIdx on which the STA is added */
6259 tANI_U32 bssIdx;
6260 /** aid (association id) of this station */
6261 tANI_U32 assoc_id;
6262 /** peer station's mac addr */
6263 tSirMacAddr peer_macaddr;
6264 /** disassociation reason */
6265 tANI_U32 reason;
6266 /** flags - wmi_sap_ofl_del_sta_flags */
6267 tANI_U32 flags;
6268} tSapOfldDelStaIndMsg, *tpSapOfldDelStaIndMsg;
6269
6270typedef enum
6271{
6272 SAP_OFFLOAD_ADD_STA_IND = 0x00,
6273 SAP_OFFLOAD_DEL_STA_IND = 0x01,
6274} eSapOfldIndType;
6275
6276typedef PACKED_PRE struct PACKED_POST
6277{
6278 /* indType will be from eSapOfldIndType */
6279 tANI_U32 indType;
6280 /* size of this array will be depend on the indication type.
6281 * Indication type can be either ADD_STA_IND or DEL_STA_IND.
6282 * If indication type is ADD_STA_IND, size of this indication
6283 * array will be sizeof(tSapOfldDelStaIndMsg)
6284 * and if indication type is DEL_STA_IND, size of this indication
6285 * arrary will be sizeof(tSapOfldAddStaIndMsg)
6286 */
6287 tANI_U8 indication[1];
6288} tSapOfldInd;
6289
6290typedef PACKED_PRE struct PACKED_POST
6291{
6292 tANI_U32 num_indications;
6293 /* size of this array will be depend on the number of indications.*/
6294 tSapOfldInd indications[1];
6295}tSapOfldIndications;
6296
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306297#endif /* SAP_AUTH_OFFLOAD */
Agrawal Ashisha8e8a722016-10-18 19:07:45 +05306298
Manjeet Singh3ed79242017-01-11 19:04:32 +05306299/**
6300 * struct stsf - the basic stsf structure
6301 *
6302 * @session_id: session id from adapter
6303 * @set_req: set/get request flag.
6304 * @tsf_low: low 32bits of tsf
6305 * @tsf_high: high 32bits of tsf
6306 *
6307 * driver use this struct to store the tsf info
6308 */
6309struct stsf {
6310 uint32_t session_id;
6311 bool set_tsf_req;
6312 uint32_t tsf_low;
6313 uint32_t tsf_high;
6314 bool tsf_req_status;
6315};
6316
6317typedef int(*tsf_rsp_cb)(void *tsf_ctx, struct stsf *pTsf);
6318
6319/**
6320 * struct tCapTsfParams - capture tsf request
6321 * @bss_idx: bss index, SAP/STA
6322 * @session_id: adapter session id
6323 * @bssid: bssid for SAP/STA
6324 * @tsf_rsp_cb_func : handler for tsf rsp from fw
6325 * @tsf_rsp_cb_ctx : hdd ctx for tsf rsp handler
6326 */
6327typedef struct {
6328 tANI_U8 bss_idx;
6329 tANI_U8 session_id;
6330 tSirMacAddr bssid;
6331 tsf_rsp_cb tsf_rsp_cb_func;
6332 void * tsf_rsp_cb_ctx;
6333}tSirCapTsfParams,*tpSirCapTsfParams;
6334
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05306335#ifdef WLAN_FEATURE_LFR_MBB
6336
6337/**
6338 * enum csr_roam_op_code - Operation to be done by the callback.
6339 * @SIR_ROAMING_DEREGISTER_STA: Deregister the old STA after roaming.
6340 * @SIR_STOP_ROAM_OFFLOAD_SCAN : sends RSO stop
6341 * @SIR_PREPARE_REASSOC_REQ: prepares reassoc request
6342 */
6343enum csr_roam_op_code {
6344 SIR_ROAMING_DEREGISTER_STA,
6345 SIR_STOP_ROAM_OFFLOAD_SCAN,
6346 SIR_PREPARE_REASSOC_REQ,
6347};
Padma, Santhosh Kumar9f729552017-01-09 14:06:30 +05306348
6349/**
6350 * enum sir_roam_cleanup_type - Type of cleanup needs to be performed.
6351 * @SIR_MBB_DISCONNECTED: Entire CSR cleanup for connected AP
6352 * needs to be performed
6353 * @SIR_MBB_CONNECTED: No need to perform CSR cleanup for connected AP.
6354 */
6355enum sir_roam_cleanup_type {
6356 SIR_MBB_DISCONNECTED,
6357 SIR_MBB_CONNECTED,
6358};
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05306359#endif
6360
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05306361/**
6362 * struct tDelBaParams - Del BA Session req
6363 * @session_id: adapter session id
6364 */
6365typedef struct {
6366 tANI_U8 session_id;
6367}tDelBaParams,*ptDelBaParams;
Abhishek Singh02605092017-10-25 14:06:12 +05306368
6369/**
6370 * struct sir_ecsa_ie_req - structure to send req to include ECSA IE in beacon
6371 * @type: type of msg
6372 * @len: length of msg
6373 * @new_chan: new channel to which switch is requested
6374 * @cb_mode:cbmode of the new channel
6375 * @bssid: bssid of the AP
6376 */
6377struct sir_ecsa_ie_req {
6378 uint16_t type;
6379 uint16_t len;
6380 uint8_t new_chan;
6381 uint8_t cb_mode;
6382 uint8_t bssid[VOS_MAC_ADDR_SIZE];
6383};
6384
Abhishek Singh550aa8c2017-10-30 17:34:53 +05306385/**
6386 * struct sir_ecsa_ie_complete_ind - structure to send indication that ECSA IE
6387 * TX completion in beacon
6388 * @session_id: session on which ECSA IE was sent
6389 */
6390struct sir_ecsa_ie_complete_ind {
6391 uint8_t session_id;
6392};
6393
6394/**
6395 * struct sir_channel_chanege_req - structure to send channel change req to LIM
6396 * @type: type of msg
6397 * @len: length of msg
6398 * @new_chan: new channel to which switch is requested
6399 * @cb_mode:cbmode of the new channel
6400 * @bssid: bssid of the AP
6401 * @dot11mode: new dot11 mode
6402 * @operational_rateset: new rate set
6403 * @extended_rateset: new extended rate set
6404 */
6405struct sir_channel_chanege_req {
6406 uint16_t type;
6407 uint16_t len;
6408 uint8_t new_chan;
6409 uint8_t cb_mode;
6410 uint8_t bssid[VOS_MAC_ADDR_SIZE];
6411 uint32_t dot11mode;
6412 tSirMacRateSet operational_rateset;
6413 tSirMacRateSet extended_rateset;
6414};
6415
6416/**
6417 * struct sir_channel_chanege_rsp - structure for channel change resp from LIM
6418 * @sme_session_id: sme session on which channel was changed
6419 * @new_channel: new channel to which channel is changed
6420 * @status:status of channel change
6421 */
6422struct sir_channel_chanege_rsp {
6423 uint8_t sme_session_id;
6424 uint8_t new_channel;
6425 VOS_STATUS status;
6426};
6427
Abhishek Singh39ae47e2017-10-30 17:39:50 +05306428/**
6429 * struct ecsa_frame_params - ecsa frame params
6430 * @switch_mode: switch mode of channel change
6431 * @op_class: new channel op class
6432 * @new_channel: new channel to shift
6433 * @switch_count: channel switch count
6434 */
6435struct ecsa_frame_params {
6436 uint8_t switch_mode;
6437 uint8_t op_class;
6438 uint8_t new_channel;
6439 uint8_t switch_count;
6440};
6441
Rajeev Kumar Sirasanagandla4c068d42019-02-22 21:39:36 +05306442typedef void (*sir_feature_caps_cb)(void *user_data);
6443
6444/**
6445 * struct sir_feature_caps_params - Feature capability request
6446 * @feature_caps_cb: HDD callback to be invoked from WDA
6447 * @user_data: associated user-data with feature_caps_cb callback
6448 */
6449struct sir_feature_caps_params {
6450 sir_feature_caps_cb feature_caps_cb;
6451 void *user_data;
6452};
6453
Abhinav Kumard6d8dd22019-08-05 12:38:50 +05306454/**
6455 * struct sae_info - SAE info used for commit/confirm messages
6456 * @msg_type: Message type
6457 * @msg_len: length of message
6458 * @vdev_id: vdev id
6459 * @peer_mac_addr: peer MAC address
6460 * @ssid: SSID
6461 */
6462struct sir_sae_info {
6463 uint16_t msg_type;
6464 uint16_t msg_len;
6465 uint32_t vdev_id;
6466 v_MACADDR_t peer_mac_addr;
6467 tSirMacSSid ssid;
6468};
6469
Abhinav Kumard9664da2019-08-05 17:11:25 +05306470/**
6471 * struct sir_sae_msg - SAE msg used for message posting
6472 * @message_type: message type
6473 * @length: message length
6474 * @session_id: SME session id
6475 * @sae_status: SAE status, 0: Success, Non-zero: Failure.
6476 */
6477struct sir_sae_msg {
6478 uint16_t message_type;
6479 uint16_t length;
6480 uint16_t session_id;
6481 uint8_t sae_status;
6482};
Jeff Johnson295189b2012-06-20 16:38:30 -07006483#endif /* __SIR_API_H */