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