blob: 3161471d22b18d5688d0190df27b0fc1e3ea839f [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhishek Singh8a3e4dc2017-01-02 10:39:18 +05302 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
Jeff Johnson295189b2012-06-20 16:38:30 -070021
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam842dad02014-02-18 18:44:02 -080026 */
27
28
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Kiet Lam842dad02014-02-18 18:44:02 -080031/*
Jeff Johnson295189b2012-06-20 16:38:30 -070032 * This file sirApi.h contains definitions exported by
33 * Sirius software.
34 * Author: Chandra Modumudi
35 * Date: 04/16/2002
36 * History:-
37 * Date Modified by Modification Information
38 * --------------------------------------------------------------------
39 */
40
41#ifndef __SIR_API_H
42#define __SIR_API_H
43
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +053044/* Take care to avoid redefinition of this type, if it is */
45/* already defined in "halWmmApi.h" */
46#if !defined(_HALMAC_WMM_API_H)
47typedef struct sAniSirGlobal *tpAniSirGlobal;
48#endif
49
50
Jeff Johnson295189b2012-06-20 16:38:30 -070051#include "sirTypes.h"
52#include "sirMacProtDef.h"
53#include "aniSystemDefs.h"
Jeff Johnsone7245742012-09-05 17:12:55 -070054#include "sirParams.h"
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +053055#include <dot11f.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070056
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080057#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
58#include "eseGlobal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070059#endif
60
61/// Maximum number of STAs allowed in the BSS
62#define SIR_MAX_NUM_STA 256
63
64/// Maximum number of Neighbors reported by STA for LB feature
65#define SIR_MAX_NUM_NEIGHBOR_BSS 3
66
67/// Maximum number of Neighbors reported by STA for LB feature
68#define SIR_MAX_NUM_ALTERNATE_RADIOS 5
69
70/// Maximum size of SCAN_RSP message
71#define SIR_MAX_SCAN_RSP_MSG_LENGTH 2600
72
73/// Start of Sirius software/Host driver message types
74#define SIR_HAL_HOST_MSG_START 0x1000
75
76/// Power save level definitions
77#define SIR_MAX_POWER_SAVE 3
78#define SIR_INTERMEDIATE_POWER_SAVE 4
79#define SIR_NO_POWER_SAVE 5
80
81/// Max supported channel list
82#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
83
84/// Maximum DTIM Factor
85#define SIR_MAX_DTIM_FACTOR 32
86
87#define SIR_MDIE_SIZE 3
88
Gopichand Nakkalad492d202013-05-10 02:50:47 +053089/* Max number of channels are 165, but to access 165th element of array,
90 *array of 166 is required.
91 */
92#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -080093#define SIR_BCN_REPORT_MAX_BSS_DESC 4
Gopichand Nakkalad492d202013-05-10 02:50:47 +053094
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;
916
917 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
918 /* This MUST be the last field of the structure */
919
920
Jeff Johnson295189b2012-06-20 16:38:30 -0700921 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700922 tANI_U16 uIEFieldLen;
923 tANI_U16 uIEFieldOffset;
924
925 //channelList MUST be the last field of this structure
926 tSirChannelList channelList;
927 /*-----------------------------
928 tSirSmeScanReq....
929 -----------------------------
930 uIEFiledLen
931 -----------------------------
932 uIEFiledOffset ----+
933 ----------------------------- |
934 channelList.numChannels |
935 ----------------------------- |
936 ... variable size up to |
937 channelNumber[numChannels-1] |
938 This can be zero, if |
939 numChannel is zero. |
940 ----------------------------- <--+
941 ... variable size uIEFiled
942 up to uIEFieldLen (can be 0)
943 -----------------------------*/
944} tSirSmeScanReq, *tpSirSmeScanReq;
945
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530946typedef struct sSirSmeScanAbortReq
947{
948 tANI_U16 type;
949 tANI_U16 msgLen;
950 tANI_U8 sessionId;
951} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
952
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530953typedef struct sSirSmeScanChanReq
954{
955 tANI_U16 type;
956 tANI_U16 msgLen;
957 tANI_U8 sessionId;
958 tANI_U16 transcationId;
959} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
960
Jeff Johnsone7245742012-09-05 17:12:55 -0700961#ifdef FEATURE_OEM_DATA_SUPPORT
962
963#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800964#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700965#endif
966#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800967#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700968#endif
969
970typedef struct sSirOemDataReq
971{
972 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
Siddharth Bhal88aa5322014-06-19 14:27:15 +0530973 tANI_U16 messageLen;
Jeff Johnsone7245742012-09-05 17:12:55 -0700974 tSirMacAddr selfMacAddr;
975 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
976} tSirOemDataReq, *tpSirOemDataReq;
977
978typedef struct sSirOemDataRsp
979{
980 tANI_U16 messageType;
981 tANI_U16 length;
982 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
983} tSirOemDataRsp, *tpSirOemDataRsp;
984
985#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700986
987/// Definition for response message to previously issued scan request
988typedef struct sSirSmeScanRsp
989{
990 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
991 tANI_U16 length;
992 tANI_U8 sessionId;
993 tSirResultCodes statusCode;
994 tANI_U16 transcationId;
995 tSirBssDescription bssDescription[1];
996} tSirSmeScanRsp, *tpSirSmeScanRsp;
997
998/// Sme Req message to set the Background Scan mode
999typedef struct sSirSmeBackgroundScanModeReq
1000{
1001 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
1002 tANI_U16 length;
1003 tSirBackgroundScanMode mode;
1004} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
1005
1006/// Background Scan Statisics
1007typedef struct sSirBackgroundScanInfo {
1008 tANI_U32 numOfScanSuccess;
1009 tANI_U32 numOfScanFailure;
1010 tANI_U32 reserved;
1011} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
1012
1013#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
1014
1015/// Definition for Authentication request
1016typedef struct sSirSmeAuthReq
1017{
1018 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
1019 tANI_U16 length;
1020 tANI_U8 sessionId; // Session ID
1021 tANI_U16 transactionId; // Transaction ID for cmd
1022 tSirMacAddr bssId; // Self BSSID
1023 tSirMacAddr peerMacAddr;
1024 tAniAuthType authType;
1025 tANI_U8 channelNumber;
1026} tSirSmeAuthReq, *tpSirSmeAuthReq;
1027
1028/// Definition for reponse message to previously issued Auth request
1029typedef struct sSirSmeAuthRsp
1030{
1031 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
1032 tANI_U16 length;
1033 tANI_U8 sessionId; // Session ID
1034 tANI_U16 transactionId; // Transaction ID for cmd
1035 tSirMacAddr peerMacAddr;
1036 tAniAuthType authType;
1037 tSirResultCodes statusCode;
1038 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
1039 //Otherwise it holds status code.
1040} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
1041
Jeff Johnson295189b2012-06-20 16:38:30 -07001042
Jeff Johnson295189b2012-06-20 16:38:30 -07001043
Jeff Johnson295189b2012-06-20 16:38:30 -07001044/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
1045typedef struct sJoinReassocInfo
1046{
1047 tAniTitanCBNeighborInfo cbNeighbors;
1048 tAniBool spectrumMgtIndicator;
1049 tSirMacPowerCapInfo powerCap;
1050 tSirSupChnl supportedChannels;
1051} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001052
1053/// Definition for join request
1054/// ---> MAC
1055/// WARNING! If you add a field in JOIN REQ.
1056/// Make sure to add it in REASSOC REQ
1057/// The Serdes function is the same and its
1058/// shared with REASSOC. So if we add a field
1059// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1060typedef struct sSirSmeJoinReq
1061{
1062 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1063 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001064 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001065 tANI_U16 transactionId;
1066 tSirMacSSid ssId;
1067 tSirMacAddr selfMacAddr; // self Mac address
1068 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1069 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001070 tVOS_CON_MODE staPersona; //Persona
Sushant Kaushik74df8db2015-03-11 18:09:05 +05301071 tANI_BOOLEAN bOSENAssociation; //HS2.0
Abhishek Singheef5c992016-01-27 13:41:54 +05301072 tANI_BOOLEAN bWPSAssociation; //WPS
Jeff Johnsone7245742012-09-05 17:12:55 -07001073 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001074
1075 /*This contains the UAPSD Flag for all 4 AC
1076 * B0: AC_VO UAPSD FLAG
1077 * B1: AC_VI UAPSD FLAG
1078 * B2: AC_BK UAPSD FLAG
1079 * B3: AC_BE UASPD FLAG
1080 */
1081 tANI_U8 uapsdPerAcBitmask;
1082
Jeff Johnson295189b2012-06-20 16:38:30 -07001083 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1084 tSirMacRateSet extendedRateSet; // Has 11g rates
Masti, Narayanraddi67ea5912015-01-08 12:34:05 +05301085 tANI_U16 rateBitMap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001086 tSirRSNie rsnIE; // RSN IE to be sent in
1087 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001088#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001089 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1090 // the same. The join will never carry cckm, but will be set to
1091 // 0.
1092#endif
1093
1094 tSirAddie addIEScan; // Additional IE to be sent in
1095 // (unicast) Probe Request at the time of join
1096
1097 tSirAddie addIEAssoc; // Additional IE to be sent in
1098 // (Re) Association Request
1099
1100 tAniEdType UCEncryptionType;
1101
1102 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001103
1104#ifdef WLAN_FEATURE_11W
1105 tAniEdType MgmtEncryptionType;
1106#endif
1107
Jeff Johnson295189b2012-06-20 16:38:30 -07001108#ifdef WLAN_FEATURE_VOWIFI_11R
1109 tAniBool is11Rconnection;
1110#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001111#ifdef FEATURE_WLAN_ESE
1112 tAniBool isESEFeatureIniEnabled;
1113 tAniBool isESEconnection;
1114 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001115#endif
1116
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001117#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001118 tAniBool isFastTransitionEnabled;
1119#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001120#ifdef FEATURE_WLAN_LFR
1121 tAniBool isFastRoamIniFeatureEnabled;
1122#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001123
1124 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001125#ifdef WLAN_FEATURE_11AC
1126 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001127 tANI_U8 txBFCsnValue;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301128 tANI_U8 txMuBformee;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001129#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001130 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301131 tAniBool isWMEenabled;
1132 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001133 tAniTitanCBNeighborInfo cbNeighbors;
1134 tAniBool spectrumMgtIndicator;
1135 tSirMacPowerCapInfo powerCap;
1136 tSirSupChnl supportedChannels;
Abhishek Singhe3beee22017-07-31 15:35:40 +05301137 bool force_24ghz_in_ht20;
Pragaspathi Thilagaraj03e2ab12018-06-22 12:19:48 +05301138 bool force_rsne_override;
Jeff Johnson295189b2012-06-20 16:38:30 -07001139 tSirBssDescription bssDescription;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +05301140 /*
1141 * WARNING: Pls make bssDescription as last variable in struct
1142 * tSirSmeJoinReq as it has ieFields followed after this bss
1143 * description. Adding a variable after this corrupts the ieFields
1144 */
Jeff Johnson295189b2012-06-20 16:38:30 -07001145} tSirSmeJoinReq, *tpSirSmeJoinReq;
1146
1147/// Definition for reponse message to previously issued join request
1148/// MAC --->
1149typedef struct sSirSmeJoinRsp
1150{
1151 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1152 tANI_U16 length;
1153 tANI_U8 sessionId; // Session ID
1154 tANI_U16 transactionId; // Transaction ID for cmd
1155 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001156 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001157 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1158 //Otherwise it holds status code.
1159 tANI_U16 aid;
1160 tANI_U32 beaconLength;
1161 tANI_U32 assocReqLength;
1162 tANI_U32 assocRspLength;
1163#ifdef WLAN_FEATURE_VOWIFI_11R
1164 tANI_U32 parsedRicRspLen;
1165#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001166#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 tANI_U32 tspecIeLen;
1168#endif
1169 tANI_U32 staId;//Station ID for peer
1170
1171 /*The DPU signatures will be sent eventually to TL to help it determine the
1172 association to which a packet belongs to*/
1173 /*Unicast DPU signature*/
1174 tANI_U8 ucastSig;
1175
1176 /*Broadcast DPU signature*/
1177 tANI_U8 bcastSig;
1178
c_hpothu44ff4e02014-05-08 00:13:57 +05301179 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1180 tANI_U32 maxRateFlags;
1181
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +05301182 tDot11fIEHTCaps ht_caps;
1183 tDot11fIEVHTCaps vht_caps;
1184 tDot11fIEHTInfo ht_operation;
1185 tDot11fIEVHTOperation vht_operation;
1186 tDot11fIEhs20vendor_ie hs20vendor_ie;
1187
Jeff Johnson295189b2012-06-20 16:38:30 -07001188 tANI_U8 frames[ 1 ];
1189} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1190
1191/// Definition for Authentication indication from peer
1192typedef struct sSirSmeAuthInd
1193{
1194 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1195 tANI_U16 length;
1196 tANI_U8 sessionId;
1197 tSirMacAddr bssId; // Self BSSID
1198 tSirMacAddr peerMacAddr;
1199 tAniAuthType authType;
1200} tSirSmeAuthInd, *tpSirSmeAuthInd;
1201
1202/// probereq from peer, when wsc is enabled
1203typedef struct sSirSmeProbereq
1204{
1205 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1206 tANI_U16 length;
1207 tANI_U8 sessionId;
1208 tSirMacAddr peerMacAddr;
1209 tANI_U16 devicePasswdId;
1210} tSirSmeProbeReq, *tpSirSmeProbeReq;
1211
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +05301212typedef struct sSirSmeChanInfo
1213{
1214 /* channel id */
1215 tANI_U8 chan_id;
1216 /* channel info described below */
1217 tANI_U32 info;
1218}tSirSmeChanInfo, *tpSirSmeChanInfo;
1219
1220
Jeff Johnson295189b2012-06-20 16:38:30 -07001221/// Definition for Association indication from peer
1222/// MAC --->
1223typedef struct sSirSmeAssocInd
1224{
1225 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1226 tANI_U16 length;
1227 tANI_U8 sessionId;
1228 tSirMacAddr peerMacAddr;
1229 tANI_U16 aid;
1230 tSirMacAddr bssId; // Self BSSID
1231 tANI_U16 staId; // Station ID for peer
1232 tANI_U8 uniSig; // DPU signature for unicast packets
1233 tANI_U8 bcastSig; // DPU signature for broadcast packets
1234 tAniAuthType authType;
1235 tAniSSID ssId; // SSID used by STA to associate
1236 tSirRSNie rsnIE;// RSN IE received from peer
1237 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1238
Jeff Johnson295189b2012-06-20 16:38:30 -07001239 // powerCap & supportedChannels are present only when
1240 // spectrumMgtIndicator flag is set
1241 tAniBool spectrumMgtIndicator;
1242 tSirMacPowerCapInfo powerCap;
1243 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001244 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +05301245#ifdef WLAN_FEATURE_AP_HT40_24G
1246 tAniBool HT40MHzIntoEnabledSta; /* if present - STA Enable 40 MHz Intolerant */
1247#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001248 tAniBool reassocReq;
1249 // Required for indicating the frames to upper layer
1250 tANI_U32 beaconLength;
1251 tANI_U8* beaconPtr;
1252 tANI_U32 assocReqLength;
1253 tANI_U8* assocReqPtr;
Deepthi Gowriae6a1662015-10-12 12:59:37 +05301254 uint32_t rate_flags;
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +05301255 tSirSmeChanInfo chan_info;
1256 tSirMacHTChannelWidth ch_width;
1257 tDot11fIEHTCaps HTCaps;
1258 tDot11fIEVHTCaps VHTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -07001259} tSirSmeAssocInd, *tpSirSmeAssocInd;
1260
1261
1262/// Definition for Association confirm
1263/// ---> MAC
1264typedef struct sSirSmeAssocCnf
1265{
1266 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1267 tANI_U16 length;
1268 tSirResultCodes statusCode;
1269 tSirMacAddr bssId; // Self BSSID
1270 tSirMacAddr peerMacAddr;
1271 tANI_U16 aid;
1272 tSirMacAddr alternateBssId;
1273 tANI_U8 alternateChannelId;
1274} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1275
Jeff Johnson295189b2012-06-20 16:38:30 -07001276/// Definition for Reassociation indication from peer
1277typedef struct sSirSmeReassocInd
1278{
1279 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1280 tANI_U16 length;
1281 tANI_U8 sessionId; // Session ID
1282 tSirMacAddr peerMacAddr;
1283 tSirMacAddr oldMacAddr;
1284 tANI_U16 aid;
1285 tSirMacAddr bssId; // Self BSSID
1286 tANI_U16 staId; // Station ID for peer
1287 tAniAuthType authType;
1288 tAniSSID ssId; // SSID used by STA to reassociate
1289 tSirRSNie rsnIE; // RSN IE received from peer
1290
1291 tSirAddie addIE; // Additional IE received from peer
1292
Jeff Johnson295189b2012-06-20 16:38:30 -07001293 // powerCap & supportedChannels are present only when
1294 // spectrumMgtIndicator flag is set
1295 tAniBool spectrumMgtIndicator;
1296 tSirMacPowerCapInfo powerCap;
1297 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001298 // Required for indicating the frames to upper layer
1299 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1300 tANI_U32 beaconLength;
1301 tANI_U8* beaconPtr;
1302 tANI_U32 assocReqLength;
1303 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001304} tSirSmeReassocInd, *tpSirSmeReassocInd;
1305
1306/// Definition for Reassociation confirm
1307/// ---> MAC
1308typedef struct sSirSmeReassocCnf
1309{
1310 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1311 tANI_U16 length;
1312 tSirResultCodes statusCode;
1313 tSirMacAddr bssId; // Self BSSID
1314 tSirMacAddr peerMacAddr;
1315 tANI_U16 aid;
1316 tSirMacAddr alternateBssId;
1317 tANI_U8 alternateChannelId;
1318} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1319
Jeff Johnson295189b2012-06-20 16:38:30 -07001320
1321/// Enum definition for Wireless medium status change codes
1322typedef enum eSirSmeStatusChangeCode
1323{
1324 eSIR_SME_DEAUTH_FROM_PEER,
1325 eSIR_SME_DISASSOC_FROM_PEER,
1326 eSIR_SME_LOST_LINK_WITH_PEER,
1327 eSIR_SME_CHANNEL_SWITCH,
1328 eSIR_SME_JOINED_NEW_BSS,
1329 eSIR_SME_LEAVING_BSS,
1330 eSIR_SME_IBSS_ACTIVE,
1331 eSIR_SME_IBSS_INACTIVE,
1332 eSIR_SME_IBSS_PEER_DEPARTED,
1333 eSIR_SME_RADAR_DETECTED,
1334 eSIR_SME_IBSS_NEW_PEER,
1335 eSIR_SME_AP_CAPS_CHANGED,
1336 eSIR_SME_BACKGROUND_SCAN_FAIL,
1337 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1338 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1339} tSirSmeStatusChangeCode;
1340
1341typedef struct sSirSmeNewBssInfo
1342{
1343 tSirMacAddr bssId;
1344 tANI_U8 channelNumber;
1345 tANI_U8 reserved;
1346 tSirMacSSid ssId;
1347} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1348
1349typedef struct sSirSmeApNewCaps
1350{
1351 tANI_U16 capabilityInfo;
1352 tSirMacAddr bssId;
1353 tANI_U8 channelId;
1354 tANI_U8 reserved[3];
1355 tSirMacSSid ssId;
1356} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1357
1358/**
1359 * Table below indicates what information is passed for each of
1360 * the Wireless Media status change notifications:
1361 *
1362 * Status Change code Status change info
1363 * ----------------------------------------------------------------------
1364 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1365 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1366 * eSIR_SME_LOST_LINK_WITH_PEER None
1367 * eSIR_SME_CHANNEL_SWITCH New channel number
1368 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1369 * eSIR_SME_LEAVING_BSS None
1370 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1371 * IBSS apart from this STA that
1372 * started IBSS
1373 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1374 * in IBSS
1375 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1376 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1377 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1378 * that STA is currently associated with
1379 * have changed.
1380 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1381 */
1382
1383/// Definition for Wireless medium status change notification
1384typedef struct sSirSmeWmStatusChangeNtf
1385{
1386 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1387 tANI_U16 length;
1388 tANI_U8 sessionId; // Session ID
1389 tSirSmeStatusChangeCode statusChangeCode;
1390 tSirMacAddr bssId; // Self BSSID
1391 union
1392 {
1393 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1394 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1395 // none for eSIR_SME_LOST_LINK_WITH_PEER
1396 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1397 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1398 // none for eSIR_SME_LEAVING_BSS
1399 // none for eSIR_SME_IBSS_ACTIVE
1400 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001401 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1402 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1403 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1404 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001405 } statusChangeInfo;
1406} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1407
1408/// Definition for Disassociation request
1409typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001410__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001411struct sSirSmeDisassocReq
1412{
1413 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1414 tANI_U16 length;
1415 tANI_U8 sessionId; // Session ID
1416 tANI_U16 transactionId; // Transaction ID for cmd
1417 tSirMacAddr bssId; // Peer BSSID
1418 tSirMacAddr peerMacAddr;
1419 tANI_U16 reasonCode;
1420 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1421 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001422}
Jeff Johnson295189b2012-06-20 16:38:30 -07001423__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001424tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1425
1426/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001427typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1428{
1429 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1430 tANI_U16 length;
1431 tANI_U8 sessionId; // Session ID
1432 tANI_U16 transactionId; // Transaction ID for cmd
1433 tSirMacAddr bssId; // Peer BSSID
1434 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1435} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001436
1437typedef struct sAni64BitCounters
1438{
1439 tANI_U32 Hi;
1440 tANI_U32 Lo;
1441}tAni64BitCounters, *tpAni64BitCounters;
1442
1443typedef struct sAniSecurityStat
1444{
1445 tAni64BitCounters txBlks;
1446 tAni64BitCounters rxBlks;
1447 tAni64BitCounters formatErrorCnt;
1448 tAni64BitCounters decryptErr;
1449 tAni64BitCounters protExclCnt;
1450 tAni64BitCounters unDecryptableCnt;
1451 tAni64BitCounters decryptOkCnt;
1452
1453}tAniSecurityStat, *tpAniSecurityStat;
1454
1455typedef struct sAniTxRxCounters
1456{
1457 tANI_U32 txFrames; // Incremented for every packet tx
1458 tANI_U32 rxFrames;
1459 tANI_U32 nRcvBytes;
1460 tANI_U32 nXmitBytes;
1461}tAniTxRxCounters, *tpAniTxRxCounters;
1462
1463typedef struct sAniTxRxStats
1464{
1465 tAni64BitCounters txFrames;
1466 tAni64BitCounters rxFrames;
1467 tAni64BitCounters nRcvBytes;
1468 tAni64BitCounters nXmitBytes;
1469
1470}tAniTxRxStats,*tpAniTxRxStats;
1471
1472typedef struct sAniSecStats
1473{
1474 tAniSecurityStat aes;
1475 tAni64BitCounters aesReplays;
1476 tAniSecurityStat tkip;
1477 tAni64BitCounters tkipReplays;
1478 tAni64BitCounters tkipMicError;
1479
1480 tAniSecurityStat wep;
1481#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1482 tAniSecurityStat wpi;
1483 tAni64BitCounters wpiReplays;
1484 tAni64BitCounters wpiMicError;
1485#endif
1486}tAniSecStats, *tpAniSecStats;
1487
1488#define SIR_MAX_RX_CHAINS 3
1489
1490typedef struct sAniStaStatStruct
1491{
1492 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1493 * These are kept as it is, since WSM is using this structure.
1494 * These elements can be removed whenever WSM is updated.
1495 * Phystats is used to hold phystats from BD.
1496 */
1497 tANI_U32 sentAesBlksUcastHi;
1498 tANI_U32 sentAesBlksUcastLo;
1499 tANI_U32 recvAesBlksUcastHi;
1500 tANI_U32 recvAesBlksUcastLo;
1501 tANI_U32 aesFormatErrorUcastCnts;
1502 tANI_U32 aesReplaysUcast;
1503 tANI_U32 aesDecryptErrUcast;
1504 tANI_U32 singleRetryPkts;
1505 tANI_U32 failedTxPkts;
1506 tANI_U32 ackTimeouts;
1507 tANI_U32 multiRetryPkts;
1508 tANI_U32 fragTxCntsHi;
1509 tANI_U32 fragTxCntsLo;
1510 tANI_U32 transmittedPktsHi;
1511 tANI_U32 transmittedPktsLo;
1512 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1513 tANI_U32 phyStatLo; //This is only for private use.
1514
1515 tANI_U32 uplinkRssi;
1516 tANI_U32 uplinkSinr;
1517 tANI_U32 uplinkRate;
1518 tANI_U32 downlinkRssi;
1519 tANI_U32 downlinkSinr;
1520 tANI_U32 downlinkRate;
1521 tANI_U32 nRcvBytes;
1522 tANI_U32 nXmitBytes;
1523
1524 // titan 3c stats
1525 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1526 tANI_U32 chunksTxCntLo;
1527 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1528 tANI_U32 compPktRxCntLo;
1529 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1530 tANI_U32 expanPktRxCntLo;
1531
1532
1533 /* Following elements are valid and filled in correctly. They have valid values.
1534 */
1535
1536 //Unicast frames and bytes.
1537 tAniTxRxStats ucStats;
1538
1539 //Broadcast frames and bytes.
1540 tAniTxRxStats bcStats;
1541
1542 //Multicast frames and bytes.
1543 tAniTxRxStats mcStats;
1544
1545 tANI_U32 currentTxRate;
1546 tANI_U32 currentRxRate; //Rate in 100Kbps
1547
1548 tANI_U32 maxTxRate;
1549 tANI_U32 maxRxRate;
1550
1551 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1552
1553
1554 tAniSecStats securityStats;
1555
1556 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1557 tANI_U8 currentTxRateIdx;
1558
1559} tAniStaStatStruct, *tpAniStaStatStruct;
1560
1561//Statistics that are not maintained per stations.
1562typedef struct sAniGlobalStatStruct
1563{
1564 tAni64BitCounters txError;
1565 tAni64BitCounters rxError;
1566 tAni64BitCounters rxDropNoBuffer;
1567 tAni64BitCounters rxDropDup;
1568 tAni64BitCounters rxCRCError;
1569
1570 tAni64BitCounters singleRetryPkts;
1571 tAni64BitCounters failedTxPkts;
1572 tAni64BitCounters ackTimeouts;
1573 tAni64BitCounters multiRetryPkts;
1574 tAni64BitCounters fragTxCnts;
1575 tAni64BitCounters fragRxCnts;
1576
1577 tAni64BitCounters txRTSSuccess;
1578 tAni64BitCounters txCTSSuccess;
1579 tAni64BitCounters rxRTSSuccess;
1580 tAni64BitCounters rxCTSSuccess;
1581
1582 tAniSecStats securityStats;
1583
1584 tAniTxRxStats mcStats;
1585 tAniTxRxStats bcStats;
1586
1587}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1588
1589typedef enum sPacketType
1590{
1591 ePACKET_TYPE_UNKNOWN,
1592 ePACKET_TYPE_11A,
1593 ePACKET_TYPE_11G,
1594 ePACKET_TYPE_11B,
1595 ePACKET_TYPE_11N
1596
1597}tPacketType, *tpPacketType;
1598
1599typedef struct sAniStatSummaryStruct
1600{
1601 tAniTxRxStats uc; //Unicast counters.
1602 tAniTxRxStats bc; //Broadcast counters.
1603 tAniTxRxStats mc; //Multicast counters.
1604 tAni64BitCounters txError;
1605 tAni64BitCounters rxError;
1606 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1607 tANI_U32 rxRate; // Rx rate of the last received packet.
1608 tANI_U32 txRate;
1609 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1610 tANI_U16 txMCSId;
1611 tPacketType rxPacketType;
1612 tPacketType txPacketType;
1613 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1614}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1615
Jeff Johnson295189b2012-06-20 16:38:30 -07001616//structure for stats that may be reset, like the ones in sta descriptor
1617//The stats are saved into here before reset. It should be tANI_U32 aligned.
1618typedef struct _sPermStaStats
1619{
1620 //tANI_U32 sentAesBlksUcastHi;
1621 //tANI_U32 sentAesBlksUcastLo;
1622 //tANI_U32 recvAesBlksUcastHi;
1623 //tANI_U32 recvAesBlksUcastLo;
1624 tANI_U32 aesFormatErrorUcastCnts;
1625 tANI_U32 aesReplaysUcast;
1626 tANI_U32 aesDecryptErrUcast;
1627 tANI_U32 singleRetryPkts;
1628 tANI_U32 failedTxPkts;
1629 tANI_U32 ackTimeouts;
1630 tANI_U32 multiRetryPkts;
1631 tANI_U32 fragTxCntsHi;
1632 tANI_U32 fragTxCntsLo;
1633 tANI_U32 transmittedPktsHi;
1634 tANI_U32 transmittedPktsLo;
1635
1636 // titan 3c stats
1637 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1638 tANI_U32 chunksTxCntLo;
1639 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1640 tANI_U32 compPktRxCntLo;
1641 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1642 tANI_U32 expanPktRxCntLo;
1643}tPermanentStaStats;
1644
Jeff Johnson295189b2012-06-20 16:38:30 -07001645
1646
1647
1648/// Definition for Disassociation response
1649typedef struct sSirSmeDisassocRsp
1650{
1651 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1652 tANI_U16 length;
1653 tANI_U8 sessionId; // Session ID
1654 tANI_U16 transactionId; // Transaction ID for cmd
1655 tSirResultCodes statusCode;
1656 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001657 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001658 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001659}
Jeff Johnson295189b2012-06-20 16:38:30 -07001660__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001661 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1662
1663/// Definition for Disassociation indication from peer
1664typedef struct sSirSmeDisassocInd
1665{
1666 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1667 tANI_U16 length;
1668 tANI_U8 sessionId; // Session Identifier
1669 tANI_U16 transactionId; // Transaction Identifier with PE
1670 tSirResultCodes statusCode;
1671 tSirMacAddr bssId;
1672 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001673 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001674 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001675 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001676 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001677} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1678
1679/// Definition for Disassociation confirm
1680/// MAC --->
1681typedef struct sSirSmeDisassocCnf
1682{
1683 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1684 tANI_U16 length;
1685 tSirResultCodes statusCode;
1686 tSirMacAddr bssId;
1687 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001688 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001689} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1690
1691/// Definition for Deauthetication request
1692typedef struct sSirSmeDeauthReq
1693{
1694 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1695 tANI_U16 length;
1696 tANI_U8 sessionId; // Session ID
1697 tANI_U16 transactionId; // Transaction ID for cmd
1698 tSirMacAddr bssId; // AP BSSID
1699 tSirMacAddr peerMacAddr;
1700 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001701} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1702
1703/// Definition for Deauthetication response
1704typedef struct sSirSmeDeauthRsp
1705{
1706 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1707 tANI_U16 length;
1708 tANI_U8 sessionId; // Session ID
1709 tANI_U16 transactionId; // Transaction ID for cmd
1710 tSirResultCodes statusCode;
1711 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001712} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1713
1714/// Definition for Deauthetication indication from peer
1715typedef struct sSirSmeDeauthInd
1716{
1717 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1718 tANI_U16 length;
1719 tANI_U8 sessionId; //Added for BT-AMP
1720 tANI_U16 transactionId; //Added for BT-AMP
1721 tSirResultCodes statusCode;
1722 tSirMacAddr bssId;// AP BSSID
1723 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001724
Jeff Johnson295189b2012-06-20 16:38:30 -07001725 tANI_U16 staId;
Wu Gao742b7352015-10-16 19:10:40 +08001726 tANI_U16 assocId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001727 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001728} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1729
1730/// Definition for Deauthentication confirm
1731/// MAC --->
1732typedef struct sSirSmeDeauthCnf
1733{
1734 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1735 tANI_U16 length;
1736 tSirResultCodes statusCode;
1737 tSirMacAddr bssId; // AP BSSID
1738 tSirMacAddr peerMacAddr;
Wu Gao742b7352015-10-16 19:10:40 +08001739 tANI_U16 assocId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001740} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1741
Hanumantha Reddy Pothula1b6eb2f2015-11-30 20:50:23 +05301742typedef struct sSirSmeDisConDoneInd
1743{
1744 tANI_U16 messageType;
1745 tANI_U16 length;
1746 tANI_U8 sessionId;
1747 tSirResultCodes reasonCode;
1748 tSirMacAddr peerMacAddr;
1749}tSirSmeDisConDoneInd, *tpSirSmeDisConDoneInd;
1750
Jeff Johnson295189b2012-06-20 16:38:30 -07001751/// Definition for stop BSS request message
1752typedef struct sSirSmeStopBssReq
1753{
1754 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1755 tANI_U16 length;
1756 tANI_U8 sessionId; //Session ID
1757 tANI_U16 transactionId; //tranSaction ID for cmd
1758 tSirResultCodes reasonCode;
1759 tSirMacAddr bssId; //Self BSSID
1760} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1761
1762/// Definition for stop BSS response message
1763typedef struct sSirSmeStopBssRsp
1764{
1765 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1766 tANI_U16 length;
1767 tSirResultCodes statusCode;
1768 tANI_U8 sessionId; // Session ID
1769 tANI_U16 transactionId; // Transaction ID for cmd
1770} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1771
Jeff Johnson295189b2012-06-20 16:38:30 -07001772
1773
1774/// Definition for Channel Switch indication for station
1775/// MAC --->
1776typedef struct sSirSmeSwitchChannelInd
1777{
1778 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1779 tANI_U16 length;
1780 tANI_U8 sessionId;
1781 tANI_U16 newChannelId;
1782 tSirMacAddr bssId; // BSSID
1783} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1784
1785/// Definition for ULA complete indication message
1786typedef struct sirUlaCompleteInd
1787{
1788 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1789 tANI_U16 length;
1790 tSirResultCodes statusCode;
1791 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001792} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1793
1794/// Definition for ULA complete confirmation message
1795typedef struct sirUlaCompleteCnf
1796{
1797 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1798 tANI_U16 length;
1799 tSirResultCodes statusCode;
1800 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001801} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1802
1803/// Definition for Neighbor BSS indication
1804/// MAC --->
1805/// MAC reports this each time a new I/BSS is detected
1806typedef struct sSirSmeNeighborBssInd
1807{
1808 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1809 tANI_U16 length;
1810 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001811 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001812} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1813
1814/// Definition for MIC failure indication
1815/// MAC --->
1816/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1817typedef struct sSirSmeMicFailureInd
1818{
1819 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1820 tANI_U16 length;
1821 tANI_U8 sessionId;
1822 tSirMacAddr bssId; // BSSID
1823 tSirMicFailureInfo info;
1824} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1825
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05301826typedef struct sSirSmeLostLinkParamsInd
1827{
1828 tANI_U16 messageType;
1829 tANI_U16 length;
1830 tANI_U8 sessionId;
1831 tSirLostLinkParamsInfo info;
1832} tSirSmeLostLinkParamsInd, *tpSirSmeLostLinkParamsInd;
1833
1834
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001835typedef struct sSirSmeMissedBeaconInd
1836{
1837 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1838 tANI_U16 length;
1839 tANI_U8 bssIdx;
1840} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001841
1842/// Definition for Set Context request
1843/// ---> MAC
1844typedef struct sSirSmeSetContextReq
1845{
1846 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1847 tANI_U16 length;
1848 tANI_U8 sessionId; //Session ID
1849 tANI_U16 transactionId; //Transaction ID for cmd
1850 tSirMacAddr peerMacAddr;
1851 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001852 // TBD Following QOS fields to be uncommented
1853 //tAniBool qosInfoPresent;
1854 //tSirQos qos;
1855 tSirKeyMaterial keyMaterial;
1856} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1857
1858/// Definition for Set Context response
1859/// MAC --->
1860typedef struct sSirSmeSetContextRsp
1861{
1862 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1863 tANI_U16 length;
1864 tANI_U8 sessionId; // Session ID
1865 tANI_U16 transactionId; // Transaction ID for cmd
1866 tSirResultCodes statusCode;
1867 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001868} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1869
1870/// Definition for Remove Key Context request
1871/// ---> MAC
1872typedef struct sSirSmeRemoveKeyReq
1873{
1874 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1875 tANI_U16 length;
1876 tANI_U8 sessionId; // Session ID
1877 tANI_U16 transactionId; // Transaction ID for cmd
1878 tSirMacAddr bssId; // BSSID
1879 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001880 tANI_U8 edType;
1881 tANI_U8 wepType;
1882 tANI_U8 keyId;
1883 tANI_BOOLEAN unicast;
1884} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1885
1886/// Definition for Remove Key Context response
1887/// MAC --->
1888typedef struct sSirSmeRemoveKeyRsp
1889{
1890 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1891 tANI_U16 length;
1892 tANI_U8 sessionId; // Session ID
1893 tANI_U16 transactionId; // Transaction ID for cmd
1894 tSirResultCodes statusCode;
1895 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001896} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1897
1898/// Definition for Set Power request
1899/// ---> MAC
1900typedef struct sSirSmeSetPowerReq
1901{
1902 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1903 tANI_U16 length;
1904 tANI_U16 transactionId; // Transaction ID for cmd
1905 tANI_S8 powerLevel;
1906} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1907
1908/// Definition for Set Power response
1909/// MAC --->
1910typedef struct sSirSmeSetPowerRsp
1911{
1912 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1913 tANI_U16 length;
1914 tSirResultCodes statusCode;
1915 tANI_U16 transactionId; // Transaction ID for cmd
1916} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1917
Jeff Johnson295189b2012-06-20 16:38:30 -07001918
1919/// Definition for Link Test Start response
1920/// MAC --->
1921typedef struct sSirSmeLinkTestStartRsp
1922{
1923 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1924 tANI_U16 length;
1925 tSirMacAddr peerMacAddr;
1926 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001927} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1928
1929/// Definition for Link Test Stop response
1930/// WSM ---> MAC
1931typedef struct sSirSmeLinkTestStopRsp
1932{
1933 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1934 tANI_U16 length;
1935 tSirMacAddr peerMacAddr;
1936 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001937} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1938
1939/// Definition for kick starting DFS measurements
1940typedef struct sSirSmeDFSreq
1941{
1942 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1943 tANI_U16 length;
1944 tANI_U16 transactionId; // Transaction ID for cmd
1945} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1946
1947/// Definition for response message to previously
1948/// issued DFS request
1949typedef struct sSirSmeDFSrsp
1950{
1951 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1952 tANI_U16 length;
1953 tSirResultCodes statusCode;
1954 tANI_U16 transactionId; // Transaction ID for cmd
1955 tANI_U32 dfsReport[1];
1956} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1957
1958/// Statistic definitions
1959//=============================================================
1960// Per STA statistic structure; This same struct will be used for Aggregate
1961// STA stats as well.
1962
1963// Clear radio stats and clear per sta stats
1964typedef enum
1965{
1966 eANI_CLEAR_ALL_STATS, // Clears all stats
1967 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1968 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1969 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1970 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1971 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1972
1973 // Used to distinguish between per sta to security stats.
1974 // Used only by AP, FW just returns the same parameter as it received.
1975 eANI_LINK_STATS, // Get Per STA stats
1976 eANI_SECURITY_STATS, // Get Per STA security stats
1977
1978 eANI_CLEAR_STAT_TYPES_END
1979} tAniStatSubTypes;
1980
1981typedef struct sAniTxCtrs
1982{
1983 // add the rate counters here
1984 tANI_U32 tx1Mbps;
1985 tANI_U32 tx2Mbps;
1986 tANI_U32 tx5_5Mbps;
1987 tANI_U32 tx6Mbps;
1988 tANI_U32 tx9Mbps;
1989 tANI_U32 tx11Mbps;
1990 tANI_U32 tx12Mbps;
1991 tANI_U32 tx18Mbps;
1992 tANI_U32 tx24Mbps;
1993 tANI_U32 tx36Mbps;
1994 tANI_U32 tx48Mbps;
1995 tANI_U32 tx54Mbps;
1996 tANI_U32 tx72Mbps;
1997 tANI_U32 tx96Mbps;
1998 tANI_U32 tx108Mbps;
1999
2000 // tx path radio counts
2001 tANI_U32 txFragHi;
2002 tANI_U32 txFragLo;
2003 tANI_U32 txFrameHi;
2004 tANI_U32 txFrameLo;
2005 tANI_U32 txMulticastFrameHi;
2006 tANI_U32 txMulticastFrameLo;
2007 tANI_U32 txFailedHi;
2008 tANI_U32 txFailedLo;
2009 tANI_U32 multipleRetryHi;
2010 tANI_U32 multipleRetryLo;
2011 tANI_U32 singleRetryHi;
2012 tANI_U32 singleRetryLo;
2013 tANI_U32 ackFailureHi;
2014 tANI_U32 ackFailureLo;
2015 tANI_U32 xmitBeacons;
2016
2017 // titan 3c stats
2018 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
2019 tANI_U32 txCbEscPktCntLo;
2020 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
2021 tANI_U32 txChunksCntLo;
2022 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
2023 tANI_U32 txCompPktCntLo;
2024 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
2025 tANI_U32 tx50PerCompPktCntLo;
2026 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
2027 tANI_U32 txExpanPktCntLo;
2028} tAniTxCtrs, *tpAniTxCtrs;
2029
2030typedef struct sAniRxCtrs
2031{
2032 // receive frame rate counters
2033 tANI_U32 rx1Mbps;
2034 tANI_U32 rx2Mbps;
2035 tANI_U32 rx5_5Mbps;
2036 tANI_U32 rx6Mbps;
2037 tANI_U32 rx9Mbps;
2038 tANI_U32 rx11Mbps;
2039 tANI_U32 rx12Mbps;
2040 tANI_U32 rx18Mbps;
2041 tANI_U32 rx24Mbps;
2042 tANI_U32 rx36Mbps;
2043 tANI_U32 rx48Mbps;
2044 tANI_U32 rx54Mbps;
2045 tANI_U32 rx72Mbps;
2046 tANI_U32 rx96Mbps;
2047 tANI_U32 rx108Mbps;
2048
2049 // receive size counters; 'Lte' = Less than or equal to
2050 tANI_U32 rxLte64;
2051 tANI_U32 rxLte128Gt64;
2052 tANI_U32 rxLte256Gt128;
2053 tANI_U32 rxLte512Gt256;
2054 tANI_U32 rxLte1kGt512;
2055 tANI_U32 rxLte1518Gt1k;
2056 tANI_U32 rxLte2kGt1518;
2057 tANI_U32 rxLte4kGt2k;
2058
2059 // rx radio stats
2060 tANI_U32 rxFrag;
2061 tANI_U32 rxFrame;
2062 tANI_U32 fcsError;
2063 tANI_U32 rxMulticast;
2064 tANI_U32 duplicate;
2065 tANI_U32 rtsSuccess;
2066 tANI_U32 rtsFailed;
2067 tANI_U32 wepUndecryptables;
2068 tANI_U32 drops;
2069 tANI_U32 aesFormatErrorUcastCnts;
2070 tANI_U32 aesReplaysUcast;
2071 tANI_U32 aesDecryptErrUcast;
2072
2073 // titan 3c stats
2074 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
2075 tANI_U32 rxDecompPktCntLo;
2076 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
2077 tANI_U32 rxCompPktCntLo;
2078 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
2079 tANI_U32 rxExpanPktCntLo;
2080} tAniRxCtrs, *tpAniRxCtrs;
2081
2082// Radio stats
2083typedef struct sAniRadioStats
2084{
2085 tAniTxCtrs tx;
2086 tAniRxCtrs rx;
2087} tAniRadioStats, *tpAniRadioStats;
2088
2089// Get Radio Stats request structure
2090// This structure shall be used for both Radio stats and Aggregate stats
2091// A valid request must contain entire structure with/without valid fields.
2092// Based on the request type, the valid fields will be checked.
2093typedef struct sAniGetStatsReq
2094{
2095 // Common for all types are requests
2096 tANI_U16 msgType; // message type is same as the request type
2097 tANI_U16 msgLen; // length of the entire request
2098 tANI_U8 sessionId; //Session ID
2099 tANI_U16 transactionId;
2100 tSirMacAddr bssId; //BSSID
2101 // only used for clear stats and per sta stats clear
2102 tAniStatSubTypes stat; // Clears the stats of the described types.
2103 tANI_U32 staId; // Per STA stats request must contain valid
2104 // values
2105 tANI_U8 macAddr[6];
2106} tAniGetStatsReq, *tpAniGetStatsReq;
2107
2108// Get Radio Stats response struct
2109typedef struct sAniGetRadioStatsRsp
2110{
2111 tANI_U16 type; // message type is same as the request type
2112 tANI_U16 msgLen; // length of the entire request
2113 tANI_U32 rc;
2114 tANI_U16 transactionId;
2115 tAniRadioStats radio;
2116} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2117
2118// Per Sta stats response struct
2119typedef struct sAniGetPerStaStatsRsp
2120{
2121 tANI_U16 type; // message type is same as the request type
2122 tANI_U16 msgLen; // length of the entire request
2123 tANI_U32 rc;
2124 tANI_U16 transactionId;
2125 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2126 tAniStaStatStruct sta;
2127 tANI_U32 staId;
2128 tANI_U8 macAddr[6];
2129} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2130
2131// Get Aggregate stats
2132typedef struct sAniGetAggrStaStatsRsp
2133{
2134 tANI_U16 type; // message type is same as the request type
2135 tANI_U16 msgLen; // length of the entire request
2136 tANI_U32 rc;
2137 tANI_U16 transactionId;
2138 tAniStaStatStruct sta;
2139} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2140
2141// Clear stats request and response structure. 'rc' field is unused in
2142// request and this field is used in response field.
2143typedef struct sAniClearStatsRsp
2144{
2145 tANI_U16 type; // message type is same as the request type
2146 tANI_U16 msgLen; // length of the entire request
2147 tANI_U32 rc; // return code - will be filled by FW on
2148 // response.
2149 // Same transaction ID will be returned by the FW
2150 tANI_U16 transactionId;
2151 tAniStatSubTypes stat; // Clears the stats of the described types.
2152 tANI_U32 staId; // Applicable only to PER STA stats clearing
2153 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2154} tAniClearStatsRsp, *tpAniClearStatsRsp;
2155
2156typedef struct sAniGetGlobalStatsRsp
2157{
2158 tANI_U16 type; // message type is same as the request type
2159 tANI_U16 msgLen; // length of the entire request
2160 tANI_U32 rc;
2161 tANI_U16 transactionId;
2162 tAniGlobalStatStruct global;
2163} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2164
2165typedef struct sAniGetStatSummaryRsp
2166{
2167 tANI_U16 type; // message type is same as the request type
2168 tANI_U16 msgLen; // length of the entire request --Why?
2169 tANI_U32 rc;
2170 tANI_U16 transactionId;
2171 tAniStatSummaryStruct stat;
2172} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2173
2174//***************************************************************
2175
2176
2177/*******************PE Statistics*************************/
2178typedef enum
2179{
2180 PE_SUMMARY_STATS_INFO = 0x00000001,
2181 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2182 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2183 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2184 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
Sushant Kaushik33200572015-08-05 16:46:20 +05302185 PE_PER_STA_STATS_INFO = 0x00000020,
2186 PE_PER_TX_PKT_STATS_INFO = 0x00000040,
Jeff Johnson295189b2012-06-20 16:38:30 -07002187}ePEStatsMask;
2188
2189/*
2190 * tpAniGetPEStatsReq is tied to
2191 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2192 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2193 */
2194typedef struct sAniGetPEStatsReq
2195{
2196 // Common for all types are requests
2197 tANI_U16 msgType; // message type is same as the request type
2198 tANI_U16 msgLen; // length of the entire request
2199 tANI_U32 staId; // Per STA stats request must contain valid
2200 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2201} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2202
2203/*
2204 * tpAniGetPEStatsRsp is tied to
2205 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2206 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2207 */
2208typedef struct sAniGetPEStatsRsp
2209{
2210 // Common for all types are responses
2211 tANI_U16 msgType; // message type is same as the request type
2212 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2213 tANI_U8 sessionId;
2214 tANI_U32 rc; //success/failure
2215 tANI_U32 staId; // Per STA stats request must contain valid
2216 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2217/**********************************************************************************************
2218 //void *pStatsBuf;
2219 The Stats buffer starts here and can be an aggregate of more than one statistics
2220 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2221 intentionally and the src code that uses this structure should take that into account.
2222**********************************************************************************************/
2223} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2224
2225typedef struct sAniGetRssiReq
2226{
2227 // Common for all types are requests
2228 tANI_U16 msgType; // message type is same as the request type
2229 tANI_U16 msgLen; // length of the entire request
2230 tANI_U8 sessionId;
2231 tANI_U8 staId;
2232 void *rssiCallback;
2233 void *pDevContext; //device context
2234 void *pVosContext; //voss context
2235
2236} tAniGetRssiReq, *tpAniGetRssiReq;
2237
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302238typedef struct sAniGetSnrReq
2239{
2240 // Common for all types are requests
2241 tANI_U16 msgType; // message type is same as the request type
2242 tANI_U16 msgLen; // length of the entire request
2243 tANI_U8 sessionId;
2244 tANI_U8 staId;
2245 void *snrCallback;
2246 void *pDevContext; //device context
2247} tAniGetSnrReq, *tpAniGetSnrReq;
2248
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002249#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002250typedef struct sAniGetRoamRssiRsp
2251{
2252 // Common for all types are responses
2253 tANI_U16 msgType; // message type is same as the request type
2254 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2255 tANI_U8 sessionId;
2256 tANI_U32 rc; //success/failure
2257 tANI_U32 staId; // Per STA stats request must contain valid
2258 tANI_S8 rssi;
2259 void *rssiReq; //rssi request backup
2260
2261} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2262
2263#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002264
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002265#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002266
2267typedef struct sSirTsmIE
2268{
2269 tANI_U8 tsid;
2270 tANI_U8 state;
2271 tANI_U16 msmt_interval;
2272} tSirTsmIE, *tpSirTsmIE;
2273
2274typedef struct sSirSmeTsmIEInd
2275{
2276 tSirTsmIE tsmIe;
2277 tANI_U8 sessionId;
2278} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2279
2280
2281typedef struct sAniTrafStrmMetrics
2282{
2283 tANI_U16 UplinkPktQueueDly;
2284 tANI_U16 UplinkPktQueueDlyHist[4];
2285 tANI_U32 UplinkPktTxDly;
2286 tANI_U16 UplinkPktLoss;
2287 tANI_U16 UplinkPktCount;
2288 tANI_U8 RoamingCount;
2289 tANI_U16 RoamingDly;
2290} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2291
2292typedef struct sAniGetTsmStatsReq
2293{
2294 // Common for all types are requests
2295 tANI_U16 msgType; // message type is same as the request type
2296 tANI_U16 msgLen; // length of the entire request
2297 tANI_U8 staId;
2298 tANI_U8 tid; // traffic id
2299 tSirMacAddr bssId;
2300 void *tsmStatsCallback;
2301 void *pDevContext; //device context
2302 void *pVosContext; //voss context
2303} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2304
2305typedef struct sAniGetTsmStatsRsp
2306{
2307 // Common for all types are responses
2308 tANI_U16 msgType; // message type is same as the request type
2309 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2310 tANI_U8 sessionId;
2311 tANI_U32 rc; //success/failure
2312 tANI_U32 staId; // Per STA stats request must contain valid
2313 tAniTrafStrmMetrics tsmMetrics;
2314 void *tsmStatsReq; //tsm stats request backup
2315} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002316
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002317typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002318{
2319 tBcnReportFields bcnReportFields;
2320 tANI_U8 ieLen;
2321 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002322} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002323
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002324typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002325{
2326 tANI_U16 measurementToken;
2327 tANI_U8 flag; /* Flag to report measurement done and more data */
2328 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002329 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2330} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002331
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002332#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002333
Jeff Johnson295189b2012-06-20 16:38:30 -07002334/* Change country code request MSG structure */
2335typedef struct sAniChangeCountryCodeReq
2336{
2337 // Common for all types are requests
2338 tANI_U16 msgType; // message type is same as the request type
2339 tANI_U16 msgLen; // length of the entire request
2340 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302341 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302342 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002343 void *changeCCCallback;
2344 void *pDevContext; //device context
2345 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002346
Jeff Johnson295189b2012-06-20 16:38:30 -07002347} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2348
Amar Singhal0d15bd52013-10-12 23:13:13 -07002349/* generic country code change request MSG structure */
2350typedef struct sAniGenericChangeCountryCodeReq
2351{
2352 // Common for all types are requests
2353 tANI_U16 msgType; // message type is same as the request type
2354 tANI_U16 msgLen; // length of the entire request
2355 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2356 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002357} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2358
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302359typedef struct sAniDHCPStopInd
2360{
2361 tANI_U16 msgType; // message type is same as the request type
2362 tANI_U16 msgLen; // length of the entire request
2363 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2364 tSirMacAddr macAddr;
2365
2366} tAniDHCPInd, *tpAniDHCPInd;
2367
Abhishek Singh00b71972016-01-07 10:51:04 +05302368#ifdef WLAN_FEATURE_RMC
2369typedef struct sAniTXFailMonitorInd
2370{
2371 tANI_U16 msgType; // message type is same as the request type
2372 tANI_U16 msgLen; // length of the entire request
2373 tANI_U8 tx_fail_count;
2374 void *txFailIndCallback;
2375} tAniTXFailMonitorInd, *tpAniTXFailMonitorInd;
2376#endif /* WLAN_FEATURE_RMC */
2377
Jeff Johnson295189b2012-06-20 16:38:30 -07002378typedef struct sAniSummaryStatsInfo
2379{
2380 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2381 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2382 // station successfully transmitted after more than one retransmission attempt
2383
2384 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2385 //(with and without retries, including multi-cast, broadcast)
2386 //tANI_U32 tx_fail_cnt;
2387 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2388 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2389 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2390 //(after appropriate filter rules including multi-cast, broadcast)
2391 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2392 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2393 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2394 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2395 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2396 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2397 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2398 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2399 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2400 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2401 //to provide this.
2402#if 0
2403 //providing the following stats, in case of wrap around for tx_byte_cnt
2404 tANI_U32 tx_unicast_lower_byte_cnt;
2405 tANI_U32 tx_unicast_upper_byte_cnt;
2406 tANI_U32 tx_multicast_lower_byte_cnt;
2407 tANI_U32 tx_multicast_upper_byte_cnt;
2408 tANI_U32 tx_broadcast_lower_byte_cnt;
2409 tANI_U32 tx_broadcast_upper_byte_cnt;
2410#endif
2411
2412}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2413
2414typedef enum eTxRateInfo
2415{
2416 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2417 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2418 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2419 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002420 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2421 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2422 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2423 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002424} tTxrateinfoflags;
2425
2426typedef struct sAniGlobalClassAStatsInfo
2427{
2428 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2429 //or MMPDU frames
2430 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2431 //or MMPDU frames when a promiscuous packet filter was enabled
2432 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2433 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2434 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2435 //to a supported rate and the order shall be the same as the supporteRates parameter.
2436 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2437 //for eg: if it is 10.5dBm, the value would be 105
2438 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2439 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2440 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2441 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2442 //500 kbit/sec, for the most
2443 //recently transmitted frame
2444 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2445 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2446 //HT40 rates; short and long guard interval
2447
2448}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2449
2450
2451typedef struct sAniGlobalSecurityStats
2452{
2453 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2454 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2455 //is enabled
2456 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2457 //because of MIC failures
2458 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2459 //because of a TKIP ICV error
2460 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2461 //invalid AES-CCMP format
2462 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2463 //the AES-CCMP replay protection procedure
2464 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2465 //errors detected by the AES-CCMP decryption algorithm
2466 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2467 //not available on the 802.11 station
2468 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2469 //because of a WEP ICV error
2470 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2471 //decrypted
2472 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2473
2474}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2475
2476typedef struct sAniGlobalClassBStatsInfo
2477{
2478 tAniGlobalSecurityStats ucStats;
2479 tAniGlobalSecurityStats mcbcStats;
2480}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2481
2482typedef struct sAniGlobalClassCStatsInfo
2483{
2484 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2485 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2486 //address 1 field
2487 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2488 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2489 //primary channel
2490 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2491 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2492 //when an A-MPDU is received
2493 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2494 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2495 //decoded correctly
2496
2497}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2498
2499typedef struct sAniPerStaStatsInfo
2500{
2501 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2502 //through a received 802.11 ACK frame
2503 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2504 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2505 //is transmitted
2506
2507}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2508
Sushant Kaushik33200572015-08-05 16:46:20 +05302509typedef struct sAniPerTxPktStatsInfo
2510{
2511 tANI_U32 lastTxRate; // 802.11 data rate at which the last data frame is transmitted.
Sushant Kaushik3d5c1e62015-10-07 12:05:33 +05302512 tANI_U32 txAvgRetry; // Average number of retries per 10 packets.
Sushant Kaushik33200572015-08-05 16:46:20 +05302513}tAniPerTxPktStatsInfo, *tpAniPerTxPktStatsInfo;
2514
2515
Jeff Johnson295189b2012-06-20 16:38:30 -07002516/**********************PE Statistics end*************************/
2517
2518
2519
2520typedef struct sSirRSSIThresholds
2521{
2522#ifdef ANI_BIG_BYTE_ENDIAN
2523 tANI_S8 ucRssiThreshold1 : 8;
2524 tANI_S8 ucRssiThreshold2 : 8;
2525 tANI_S8 ucRssiThreshold3 : 8;
2526 tANI_U8 bRssiThres1PosNotify : 1;
2527 tANI_U8 bRssiThres1NegNotify : 1;
2528 tANI_U8 bRssiThres2PosNotify : 1;
2529 tANI_U8 bRssiThres2NegNotify : 1;
2530 tANI_U8 bRssiThres3PosNotify : 1;
2531 tANI_U8 bRssiThres3NegNotify : 1;
2532 tANI_U8 bReserved10 : 2;
2533#else
2534 tANI_U8 bReserved10 : 2;
2535 tANI_U8 bRssiThres3NegNotify : 1;
2536 tANI_U8 bRssiThres3PosNotify : 1;
2537 tANI_U8 bRssiThres2NegNotify : 1;
2538 tANI_U8 bRssiThres2PosNotify : 1;
2539 tANI_U8 bRssiThres1NegNotify : 1;
2540 tANI_U8 bRssiThres1PosNotify : 1;
2541 tANI_S8 ucRssiThreshold3 : 8;
2542 tANI_S8 ucRssiThreshold2 : 8;
2543 tANI_S8 ucRssiThreshold1 : 8;
2544#endif
2545
2546}tSirRSSIThresholds, *tpSirRSSIThresholds;
2547
2548typedef struct sSirRSSINotification
2549{
2550#ifdef ANI_BIG_BYTE_ENDIAN
2551 tANI_U32 bRssiThres1PosCross : 1;
2552 tANI_U32 bRssiThres1NegCross : 1;
2553 tANI_U32 bRssiThres2PosCross : 1;
2554 tANI_U32 bRssiThres2NegCross : 1;
2555 tANI_U32 bRssiThres3PosCross : 1;
2556 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002557 v_S7_t avgRssi : 8;
2558 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002559#else
Srinivasdaaec712012-12-12 15:59:44 -08002560 tANI_U32 bReserved : 18;
2561 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002562 tANI_U32 bRssiThres3NegCross : 1;
2563 tANI_U32 bRssiThres3PosCross : 1;
2564 tANI_U32 bRssiThres2NegCross : 1;
2565 tANI_U32 bRssiThres2PosCross : 1;
2566 tANI_U32 bRssiThres1NegCross : 1;
2567 tANI_U32 bRssiThres1PosCross : 1;
2568#endif
2569
2570}tSirRSSINotification, *tpSirRSSINotification;
2571
Viral Modid86bde22012-12-10 13:09:21 -08002572
2573typedef struct sSirP2PNoaStart
2574{
2575 tANI_U32 status;
2576 tANI_U32 bssIdx;
2577} tSirP2PNoaStart, *tpSirP2PNoaStart;
2578
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302579typedef struct sSirTdlsInd
2580{
2581 tANI_U16 status;
2582 tANI_U16 assocId;
2583 tANI_U16 staIdx;
2584 tANI_U16 reasonCode;
2585} tSirTdlsInd, *tpSirTdlsInd;
2586
Jeff Johnson295189b2012-06-20 16:38:30 -07002587typedef struct sSirP2PNoaAttr
2588{
2589#ifdef ANI_BIG_BYTE_ENDIAN
2590 tANI_U32 index :8;
2591 tANI_U32 oppPsFlag :1;
2592 tANI_U32 ctWin :7;
2593 tANI_U32 rsvd1: 16;
2594#else
2595 tANI_U32 rsvd1: 16;
2596 tANI_U32 ctWin :7;
2597 tANI_U32 oppPsFlag :1;
2598 tANI_U32 index :8;
2599#endif
2600
2601#ifdef ANI_BIG_BYTE_ENDIAN
2602 tANI_U32 uNoa1IntervalCnt:8;
2603 tANI_U32 rsvd2:24;
2604#else
2605 tANI_U32 rsvd2:24;
2606 tANI_U32 uNoa1IntervalCnt:8;
2607#endif
2608 tANI_U32 uNoa1Duration;
2609 tANI_U32 uNoa1Interval;
2610 tANI_U32 uNoa1StartTime;
2611
2612#ifdef ANI_BIG_BYTE_ENDIAN
2613 tANI_U32 uNoa2IntervalCnt:8;
2614 tANI_U32 rsvd3:24;
2615#else
2616 tANI_U32 rsvd3:24;
2617 tANI_U32 uNoa2IntervalCnt:8;
2618#endif
2619 tANI_U32 uNoa2Duration;
2620 tANI_U32 uNoa2Interval;
2621 tANI_U32 uNoa2StartTime;
2622} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002623
2624typedef __ani_attr_pre_packed struct sSirTclasInfo
2625{
2626 tSirMacTclasIE tclas;
2627 tANI_U8 version; // applies only for classifier type ip
2628 __ani_attr_pre_packed union {
2629 tSirMacTclasParamEthernet eth;
2630 tSirMacTclasParamIPv4 ipv4;
2631 tSirMacTclasParamIPv6 ipv6;
2632 tSirMacTclasParam8021dq t8021dq;
2633 }__ani_attr_packed tclasParams;
2634} __ani_attr_packed tSirTclasInfo;
2635
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002636
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002637#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002638#define TSRS_11AG_RATE_6MBPS 0xC
2639#define TSRS_11B_RATE_5_5MBPS 0xB
2640
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002641typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002642{
2643 tANI_U8 tsid;
2644 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002645} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002646
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002647typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002648{
2649 tANI_U8 tsid;
2650 tANI_U8 state;
2651 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002652} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002653
2654typedef struct sTSMStats
2655{
2656 tANI_U8 tid;
2657 tSirMacAddr bssId;
2658 tTrafStrmMetrics tsmMetrics;
2659} tTSMStats, *tpTSMStats;
2660
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002661typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002662{
2663 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002664 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002665 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002666} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002667
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002668typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002669{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002670#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2671 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002672#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002673 tEseTSMContext tsm;
2674} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002675
2676
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002677#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002678
2679
Jeff Johnson295189b2012-06-20 16:38:30 -07002680typedef struct sSirAddtsReqInfo
2681{
2682 tANI_U8 dialogToken;
2683 tSirMacTspecIE tspec;
2684
2685 tANI_U8 numTclas; // number of Tclas elements
2686 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2687 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002688#if defined(FEATURE_WLAN_ESE)
2689 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002690 tANI_U8 tsrsPresent:1;
2691#endif
2692 tANI_U8 wmeTspecPresent:1;
2693 tANI_U8 wsmTspecPresent:1;
2694 tANI_U8 lleTspecPresent:1;
2695 tANI_U8 tclasProcPresent:1;
2696} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2697
2698typedef struct sSirAddtsRspInfo
2699{
2700 tANI_U8 dialogToken;
2701 tSirMacStatusCodes status;
2702 tSirMacTsDelayIE delay;
2703
2704 tSirMacTspecIE tspec;
2705 tANI_U8 numTclas; // number of Tclas elements
2706 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2707 tANI_U8 tclasProc;
2708 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002709#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2710 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002711 tANI_U8 tsmPresent:1;
2712#endif
2713 tANI_U8 wmeTspecPresent:1;
2714 tANI_U8 wsmTspecPresent:1;
2715 tANI_U8 lleTspecPresent:1;
2716 tANI_U8 tclasProcPresent:1;
2717 tANI_U8 schedulePresent:1;
2718} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2719
2720typedef struct sSirDeltsReqInfo
2721{
2722 tSirMacTSInfo tsinfo;
2723 tSirMacTspecIE tspec;
2724 tANI_U8 wmeTspecPresent:1;
2725 tANI_U8 wsmTspecPresent:1;
2726 tANI_U8 lleTspecPresent:1;
2727} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2728
2729/// Add a tspec as defined
2730typedef struct sSirAddtsReq
2731{
2732 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2733 tANI_U16 length;
2734 tANI_U8 sessionId; //Session ID
2735 tANI_U16 transactionId;
2736 tSirMacAddr bssId; //BSSID
2737 tANI_U32 timeout; // in ms
2738 tANI_U8 rspReqd;
2739 tSirAddtsReqInfo req;
2740} tSirAddtsReq, *tpSirAddtsReq;
2741
2742typedef struct sSirAddtsRsp
2743{
2744 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2745 tANI_U16 length;
2746 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2747 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2748 tANI_U32 rc; // return code
2749 tSirAddtsRspInfo rsp;
2750} tSirAddtsRsp, *tpSirAddtsRsp;
2751
2752typedef struct sSirDeltsReq
2753{
2754 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2755 tANI_U16 length;
2756 tANI_U8 sessionId;//Session ID
2757 tANI_U16 transactionId;
2758 tSirMacAddr bssId; //BSSID
2759 tANI_U16 aid; // use 0 if macAddr is being specified
2760 tANI_U8 macAddr[6]; // only on AP to specify the STA
2761 tANI_U8 rspReqd;
2762 tSirDeltsReqInfo req;
2763} tSirDeltsReq, *tpSirDeltsReq;
2764
2765typedef struct sSirDeltsRsp
2766{
2767 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2768 tANI_U16 length;
2769 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2770 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2771 tANI_U32 rc;
2772 tANI_U16 aid; // use 0 if macAddr is being specified
2773 tANI_U8 macAddr[6]; // only on AP to specify the STA
2774 tSirDeltsReqInfo rsp;
2775} tSirDeltsRsp, *tpSirDeltsRsp;
2776
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002777#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002778
2779#define SIR_QOS_NUM_TSPEC_MAX 2
2780#define SIR_QOS_NUM_AC_MAX 4
2781
2782typedef struct sSirAggrQosReqInfo
2783{
2784 tANI_U16 tspecIdx;
2785 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2786}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2787
2788typedef struct sSirAggrQosReq
2789{
2790 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2791 tANI_U16 length;
2792 tANI_U8 sessionId; //Session ID
2793 tANI_U16 transactionId;
2794 tSirMacAddr bssId; //BSSID
2795 tANI_U32 timeout; // in ms
2796 tANI_U8 rspReqd;
2797 tSirAggrQosReqInfo aggrInfo;
2798}tSirAggrQosReq, *tpSirAggrQosReq;
2799
2800typedef struct sSirAggrQosRspInfo
2801{
2802 tANI_U16 tspecIdx;
2803 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2804} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2805
2806typedef struct sSirAggrQosRsp
2807{
2808 tANI_U16 messageType;
2809 tANI_U16 length;
2810 tANI_U8 sessionId;
2811 tSirAggrQosRspInfo aggrInfo;
2812} tSirAggrQosRsp, *tpSirAggrQosRsp;
2813
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002814#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002815
2816typedef struct sSirSetTxPowerReq
2817{
schang86c22c42013-03-13 18:41:24 -07002818 tANI_U16 messageType;
2819 tANI_U16 length;
2820 tSirMacAddr bssId;
2821 tANI_U8 mwPower;
2822 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002823} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2824
2825typedef struct sSirSetTxPowerRsp
2826{
2827 tANI_U16 messageType;
2828 tANI_U16 length;
2829 tANI_U32 status;
2830} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2831
2832typedef struct sSirGetTxPowerReq
2833{
2834 tANI_U16 messageType;
2835 tANI_U16 length;
2836 tANI_U16 staid;
2837} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2838
2839typedef struct sSirGetTxPowerRsp
2840{
2841 tANI_U16 messageType;
2842 tANI_U16 length; // length of the entire request
2843 tANI_U32 power; // units of milliwatts
2844 tANI_U32 status;
2845} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2846
2847
2848typedef tANI_U32 tSirMacNoise[3];
2849
2850typedef struct sSirGetNoiseRsp
2851{
2852 tANI_U16 messageType;
2853 tANI_U16 length;
2854 tSirMacNoise noise;
2855} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2856
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002857typedef struct sSirQosMapSet
2858{
2859 tANI_U8 present;
2860 tANI_U8 num_dscp_exceptions;
2861 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002862 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002863} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002864
2865//
2866// PMC --> PE --> HAL
2867// Power save configuration parameters
2868//
2869typedef struct sSirPowerSaveCfg
2870{
2871 tANI_U16 listenInterval;
2872
2873 /* Number of consecutive missed beacons before
2874 * hardware generates an interrupt to wake up
2875 * the host. In units of listen interval.
2876 */
2877 tANI_U32 HeartBeatCount;
2878
2879 /* specifies which beacons are to be forwarded
2880 * to host when beacon filtering is enabled.
2881 * In units of listen interval.
2882 */
2883 tANI_U32 nthBeaconFilter;
2884
2885 /* Maximum number of PS-Poll send before
2886 * firmware sends data null with PM set to 0.
2887 */
2888 tANI_U32 maxPsPoll;
2889
2890 /* If the average RSSI value falls below the
2891 * minRssiThreshold, then FW will send an
2892 * interrupt to wake up the host.
2893 */
2894 tANI_U32 minRssiThreshold;
2895
2896 /* Number of beacons for which firmware will
2897 * collect the RSSI values and compute the average.
2898 */
2899 tANI_U8 numBeaconPerRssiAverage;
2900
2901 /* FW collects the RSSI stats for this period
2902 * in BMPS mode.
2903 */
2904 tANI_U8 rssiFilterPeriod;
2905
2906 // Enabling/disabling broadcast frame filter feature
2907 tANI_U8 broadcastFrameFilter;
2908
2909 // Enabling/disabling the ignore DTIM feature
2910 tANI_U8 ignoreDtim;
2911
2912 /* The following configuration parameters are kept
2913 * in order to be backward compatible for Gen5.
2914 * These will NOT be used for Gen6 Libra chip
2915 */
2916 tBeaconForwarding beaconFwd;
2917 tANI_U16 nthBeaconFwd;
2918 tANI_U8 fEnablePwrSaveImmediately;
2919 tANI_U8 fPSPoll;
2920
2921 // Enabling/disabling Beacon Early Termination feature
2922 tANI_U8 fEnableBeaconEarlyTermination;
2923 tANI_U8 bcnEarlyTermWakeInterval;
2924
2925}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2926
2927/* Reason code for requesting Full Power. This reason code is used by
2928 any module requesting full power from PMC and also by PE when it
2929 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2930typedef enum eRequestFullPowerReason
2931{
2932 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2933 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2934 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2935 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2936 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2937 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2938 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2939 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2940 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2941 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002942#ifdef FEATURE_WLAN_TDLS
2943 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2944#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002945 eSME_REASON_OTHER /* No specific reason. General reason code */
2946} tRequestFullPowerReason, tExitBmpsReason;
2947
2948
2949
2950//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2951typedef struct sExitBmpsInfo
2952{
2953 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2954}tExitBmpsInfo, *tpExitBmpsInfo;
2955
2956
2957// MAC SW --> SME
2958// Message indicating to SME to exit BMPS sleep mode
2959typedef struct sSirSmeExitBmpsInd
2960{
2961 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2962 tANI_U16 mesgLen;
2963 tSirResultCodes statusCode;
2964 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2965
2966} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2967
2968
2969//
2970// HDD -> LIM
2971// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2972// tSirMsgQ.reserved = 0
2973// tSirMsgQ.body = instance of tDelBAParams
2974//
2975typedef struct sSmeDelBAPeerInd
2976{
2977 // Message Type
2978 tANI_U16 mesgType;
2979
2980 tSirMacAddr bssId;//BSSID
2981
2982 // Message Length
2983 tANI_U16 mesgLen;
2984
2985 // Station Index
2986 tANI_U16 staIdx;
2987
2988 // TID for which the BA session is being deleted
2989 tANI_U8 baTID;
2990
2991 // DELBA direction
2992 // eBA_INITIATOR - Originator
2993 // eBA_RECEIPIENT - Recipient
2994 tANI_U8 baDirection;
2995} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2996
2997typedef struct sSmeIbssPeerInd
2998{
2999 tANI_U16 mesgType;
3000 tANI_U16 mesgLen;
3001 tANI_U8 sessionId;
3002
3003 tSirMacAddr peerAddr;
3004 tANI_U16 staId;
3005
3006 /*The DPU signatures will be sent eventually to TL to help it determine the
3007 association to which a packet belongs to*/
3008 /*Unicast DPU signature*/
3009 tANI_U8 ucastSig;
3010
3011 /*Broadcast DPU signature*/
3012 tANI_U8 bcastSig;
3013
3014 //Beacon will be appended for new Peer indication.
3015}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
3016
Ravi Joshid2ca7c42013-07-23 08:37:49 -07003017typedef struct sSirIbssPeerInactivityInd
3018{
3019 tANI_U8 bssIdx;
3020 tANI_U8 staIdx;
3021 tSirMacAddr peerAddr;
3022}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
3023
3024
Jeff Johnson295189b2012-06-20 16:38:30 -07003025typedef struct sLimScanChn
3026{
3027 tANI_U16 numTimeScan; //how many time this channel is scan
3028 tANI_U8 channelId;
3029}tLimScanChn;
3030
3031typedef struct sSmeGetScanChnRsp
3032{
3033 // Message Type
3034 tANI_U16 mesgType;
3035 // Message Length
3036 tANI_U16 mesgLen;
3037 tANI_U8 sessionId;
3038 tANI_U8 numChn;
3039 tLimScanChn scanChn[1];
3040} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
3041
3042typedef struct sLimScanChnInfo
3043{
3044 tANI_U8 numChnInfo; //number of channels in scanChn
3045 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
3046}tLimScanChnInfo;
3047
Jeff Johnson295189b2012-06-20 16:38:30 -07003048typedef struct sSirSmeGetAssocSTAsReq
3049{
3050 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
3051 tANI_U16 length;
3052 tSirMacAddr bssId; // BSSID
3053 tANI_U16 modId;
3054 void *pUsrContext;
3055 void *pSapEventCallback;
3056 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
3057} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07003058
3059typedef struct sSmeMaxAssocInd
3060{
3061 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
3062 tANI_U16 mesgLen;
3063 tANI_U8 sessionId;
3064 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
3065} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
3066
3067/*--------------------------------------------------------------------*/
3068/* BootLoader message definition */
3069/*--------------------------------------------------------------------*/
3070
3071/*--------------------------------------------------------------------*/
3072/* FW image size */
3073/*--------------------------------------------------------------------*/
3074#define SIR_FW_IMAGE_SIZE 146332
3075
3076
3077#define SIR_BOOT_MODULE_ID 1
3078
3079#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
3080#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
3081#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
3082#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
3083#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
3084#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
3085#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
3086
3087/*--------------------------------------------------------------------*/
3088/* Bootloader message syntax */
3089/*--------------------------------------------------------------------*/
3090
3091// Message header
3092#define SIR_BOOT_MB_HEADER 0
3093#define SIR_BOOT_MB_HEADER2 1
3094
3095#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
3096#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
3097
3098// BOOT_SETUP_IND parameter indices
3099#define SIR_BOOT_SETUP_IND_MBADDR 2
3100#define SIR_BOOT_SETUP_IND_MBSIZE 3
3101#define SIR_BOOT_SETUP_IND_MEMOPT 4
3102#define SIR_BOOT_SETUP_IND_LEN \
3103 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
3104
3105// BOOT_POST_RESULT_IND parameter indices
3106#define SIR_BOOT_POST_RESULT_IND_RES 2
3107#define SIR_BOOT_POST_RESULT_IND_LEN \
3108 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
3109
3110#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
3111#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
3112#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
3113#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
3114
3115
3116// BOOT_DNLD_RESULT_IND parameter indices
3117#define SIR_BOOT_DNLD_RESULT_IND_RES 2
3118#define SIR_BOOT_DNLD_RESULT_IND_LEN \
3119 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3120
3121#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3122#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3123#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3124
3125// BOOT_DNLD_DEV_REQ
3126#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3127#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3128#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3129 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3130
3131// BOOT_DNLD_DEV_RSP
3132#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3133#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3134 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3135
3136#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3137#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3138
3139// BOOT_DNLD_REQ
3140#define SIR_BOOT_DNLD_REQ_OFFSET 2
3141#define SIR_BOOT_DNLD_REQ_WRADDR 3
3142#define SIR_BOOT_DNLD_REQ_SIZE 4
3143#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3144
3145// BOOT_DNLD_RSP
3146#define SIR_BOOT_DNLD_RSP_SIZE 2
3147#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3148
Jeff Johnson295189b2012-06-20 16:38:30 -07003149
3150// board capabilities fields are defined here.
3151typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3152{
3153#ifndef ANI_LITTLE_BIT_ENDIAN
3154 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3155 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3156 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3157 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3158 tANI_U32 rsvd1:2;
3159 // (productId derives sub-category in the following three families)
3160 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3161 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3162 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3163 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3164 tANI_U32 bbChipVer:4; // Baseband chip version
3165 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3166 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3167 tANI_U32 nReceivers:2; // 0 based.
3168 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3169 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3170 tANI_U32 rsvd:1;
3171 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3172#else
3173
3174 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3175 tANI_U32 rsvd:1;
3176 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3177 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3178 tANI_U32 nReceivers:2; // 0 based.
3179 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3180 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3181 tANI_U32 bbChipVer:4; // Baseband chip version
3182 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3183 // (productId derives sub-category in the following three families)
3184 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3185 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3186 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3187 tANI_U32 rsvd1:2;
3188 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3189 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3190 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3191 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3192#endif
3193} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3194
3195# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3196# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3197
3198# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3199# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3200
3201# define ANI_BCAP_SDRAM_MASK 0x4
3202# define ANI_BCAP_SDRAM_OFFSET 2
3203
3204# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3205# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3206
3207# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3208# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3209
3210# define ANI_BCAP_RADIO_ON_MASK 0xC0
3211# define ANI_BCAP_RADIO_ON_OFFSET 6
3212
3213# define ANI_BCAP_LO_TYPE_MASK 0x300
3214# define ANI_BCAP_LO_TYPE_OFFSET 8
3215
3216# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3217# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3218
3219# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3220# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3221
3222# define ANI_BCAP_RADIO_OFF 0
3223# define ANI_BCAP_RADIO_ON 1
3224# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3225
3226
3227/// WOW related structures
3228// SME -> PE <-> HAL
3229#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3230#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3231
3232// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3233// SME/HDD maintains the list of the BCAST wake-up patterns.
3234// This is a pass through message for PE
3235typedef struct sSirWowlAddBcastPtrn
3236{
3237 tANI_U8 ucPatternId; // Pattern ID
3238 // Pattern byte offset from beginning of the 802.11 packet to start of the
3239 // wake-up pattern
3240 tANI_U8 ucPatternByteOffset;
3241 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3242 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3243 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3244 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3245 // Extra pattern data beyond 128 bytes
3246 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3247 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003248 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003249} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3250
3251
3252// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3253// SME/HDD maintains the list of the BCAST wake-up patterns.
3254// This is a pass through message for PE
3255typedef struct sSirWowlDelBcastPtrn
3256{
3257 /* Pattern ID of the wakeup pattern to be deleted */
3258 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003259 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003260}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3261
3262
3263// SME->PE: Enter WOWLAN parameters
3264typedef struct sSirSmeWowlEnterParams
3265{
3266 /* Enables/disables magic packet filtering */
3267 tANI_U8 ucMagicPktEnable;
3268
3269 /* Magic pattern */
3270 tSirMacAddr magicPtrn;
3271
3272 /* Enables/disables packet pattern filtering */
3273 tANI_U8 ucPatternFilteringEnable;
3274
3275#ifdef WLAN_WAKEUP_EVENTS
3276 /* This configuration directs the WoW packet filtering to look for EAP-ID
3277 * requests embedded in EAPOL frames and use this as a wake source.
3278 */
3279 tANI_U8 ucWoWEAPIDRequestEnable;
3280
3281 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3282 * requests and use this as a wake source.
3283 */
3284 tANI_U8 ucWoWEAPOL4WayEnable;
3285
3286 /* This configuration allows a host wakeup on an network scan offload match.
3287 */
3288 tANI_U8 ucWowNetScanOffloadMatch;
3289
3290 /* This configuration allows a host wakeup on any GTK rekeying error.
3291 */
3292 tANI_U8 ucWowGTKRekeyError;
3293
3294 /* This configuration allows a host wakeup on BSS connection loss.
3295 */
3296 tANI_U8 ucWoWBSSConnLoss;
3297#endif // WLAN_WAKEUP_EVENTS
3298
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003299 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003300} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3301
3302
3303// PE<->HAL: Enter WOWLAN parameters
3304typedef struct sSirHalWowlEnterParams
3305{
3306 /* Enables/disables magic packet filtering */
3307 tANI_U8 ucMagicPktEnable;
3308
3309 /* Magic pattern */
3310 tSirMacAddr magicPtrn;
3311
3312 /* Enables/disables packet pattern filtering in firmware.
3313 Enabling this flag enables broadcast pattern matching
3314 in Firmware. If unicast pattern matching is also desired,
3315 ucUcastPatternFilteringEnable flag must be set tot true
3316 as well
3317 */
3318 tANI_U8 ucPatternFilteringEnable;
3319
3320 /* Enables/disables unicast packet pattern filtering.
3321 This flag specifies whether we want to do pattern match
3322 on unicast packets as well and not just broadcast packets.
3323 This flag has no effect if the ucPatternFilteringEnable
3324 (main controlling flag) is set to false
3325 */
3326 tANI_U8 ucUcastPatternFilteringEnable;
3327
3328 /* This configuration is valid only when magicPktEnable=1.
3329 * It requests hardware to wake up when it receives the
3330 * Channel Switch Action Frame.
3331 */
3332 tANI_U8 ucWowChnlSwitchRcv;
3333
3334 /* This configuration is valid only when magicPktEnable=1.
3335 * It requests hardware to wake up when it receives the
3336 * Deauthentication Frame.
3337 */
3338 tANI_U8 ucWowDeauthRcv;
3339
3340 /* This configuration is valid only when magicPktEnable=1.
3341 * It requests hardware to wake up when it receives the
3342 * Disassociation Frame.
3343 */
3344 tANI_U8 ucWowDisassocRcv;
3345
3346 /* This configuration is valid only when magicPktEnable=1.
3347 * It requests hardware to wake up when it has missed
3348 * consecutive beacons. This is a hardware register
3349 * configuration (NOT a firmware configuration).
3350 */
3351 tANI_U8 ucWowMaxMissedBeacons;
3352
3353 /* This configuration is valid only when magicPktEnable=1.
3354 * This is a timeout value in units of microsec. It requests
3355 * hardware to unconditionally wake up after it has stayed
3356 * in WoWLAN mode for some time. Set 0 to disable this feature.
3357 */
3358 tANI_U8 ucWowMaxSleepUsec;
3359
3360#ifdef WLAN_WAKEUP_EVENTS
3361 /* This configuration directs the WoW packet filtering to look for EAP-ID
3362 * requests embedded in EAPOL frames and use this as a wake source.
3363 */
3364 tANI_U8 ucWoWEAPIDRequestEnable;
3365
3366 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3367 * requests and use this as a wake source.
3368 */
3369 tANI_U8 ucWoWEAPOL4WayEnable;
3370
3371 /* This configuration allows a host wakeup on an network scan offload match.
3372 */
3373 tANI_U8 ucWowNetScanOffloadMatch;
3374
3375 /* This configuration allows a host wakeup on any GTK rekeying error.
3376 */
3377 tANI_U8 ucWowGTKRekeyError;
3378
3379 /* This configuration allows a host wakeup on BSS connection loss.
3380 */
3381 tANI_U8 ucWoWBSSConnLoss;
3382#endif // WLAN_WAKEUP_EVENTS
3383
3384 /* Status code to be filled by HAL when it sends
3385 * SIR_HAL_WOWL_ENTER_RSP to PE.
3386 */
3387 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003388
3389 /*BSSID to find the current session
3390 */
3391 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003392} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3393
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003394// PE<->HAL: Exit WOWLAN parameters
3395typedef struct sSirHalWowlExitParams
3396{
3397 /* Status code to be filled by HAL when it sends
3398 * SIR_HAL_WOWL_EXIT_RSP to PE.
3399 */
3400 eHalStatus status;
3401
3402 /*BSSIDX to find the current session
3403 */
3404 tANI_U8 bssIdx;
3405} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3406
Jeff Johnson295189b2012-06-20 16:38:30 -07003407
3408#define SIR_MAX_NAME_SIZE 64
3409#define SIR_MAX_TEXT_SIZE 32
3410
3411typedef struct sSirName {
3412 v_U8_t num_name;
3413 v_U8_t name[SIR_MAX_NAME_SIZE];
3414} tSirName;
3415
3416typedef struct sSirText {
3417 v_U8_t num_text;
3418 v_U8_t text[SIR_MAX_TEXT_SIZE];
3419} tSirText;
3420
3421
3422#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3423#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3424#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3425#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3426#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3427#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3428#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3429#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3430#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3431#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3432#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3433#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3434#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3435#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3436#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3437#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3438
3439
3440typedef struct sSirWPSProbeRspIE {
3441 v_U32_t FieldPresent;
3442 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3443 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3444 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3445 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3446 v_U16_t DevicePasswordID; // Device Password ID
3447 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3448 v_U8_t ResponseType; // Response type
3449 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3450 tSirName Manufacture;
3451 tSirText ModelName;
3452 tSirText ModelNumber;
3453 tSirText SerialNumber;
3454 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3455 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3456 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3457 tSirText DeviceName;
3458 v_U16_t ConfigMethod; // Configuaration method
3459 v_U8_t RFBand; // RF bands available on the AP
3460} tSirWPSProbeRspIE;
3461
3462#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3463#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3464#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3465#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3466#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3467#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3468#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3469#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3470
3471typedef struct sSirWPSBeaconIE {
3472 v_U32_t FieldPresent;
3473 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3474 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3475 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3476 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3477 v_U16_t DevicePasswordID; // Device Password ID
3478 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3479 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3480 v_U8_t RFBand; // RF bands available on the AP
3481} tSirWPSBeaconIE;
3482
3483#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3484#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3485
3486typedef struct sSirWPSAssocRspIE {
3487 v_U32_t FieldPresent;
3488 v_U32_t Version;
3489 v_U8_t ResposeType;
3490} tSirWPSAssocRspIE;
3491
3492typedef struct sSirAPWPSIEs {
3493 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3494 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3495 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3496} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3497
3498typedef struct sSirUpdateAPWPSIEsReq
3499{
3500 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3501 tANI_U16 length;
3502 tANI_U16 transactionId; //Transaction ID for cmd
3503 tSirMacAddr bssId; // BSSID
3504 tANI_U8 sessionId; //Session ID
3505 tSirAPWPSIEs APWPSIEs;
3506} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3507
3508typedef struct sSirUpdateParams
3509{
3510 tANI_U16 messageType;
3511 tANI_U16 length;
3512 tANI_U8 sessionId; // Session ID
3513 tANI_U8 ssidHidden; // Hide SSID
3514} tSirUpdateParams, *tpSirUpdateParams;
3515
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003516//Beacon Interval
3517typedef struct sSirChangeBIParams
3518{
3519 tANI_U16 messageType;
3520 tANI_U16 length;
3521 tANI_U16 beaconInterval; // Beacon Interval
3522 tSirMacAddr bssId;
3523 tANI_U8 sessionId; // Session ID
3524} tSirChangeBIParams, *tpSirChangeBIParams;
3525
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303526#ifdef WLAN_FEATURE_AP_HT40_24G
3527typedef struct sSirSetHT2040Mode
3528{
3529 tANI_U16 messageType;
3530 tANI_U16 length;
3531 tANI_U8 cbMode;
3532 tSirMacAddr bssId;
3533 tANI_U8 sessionId; // Session ID
3534} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -08003535
3536typedef struct sSirHT2040CoexInfoInd
3537{
3538 tANI_U16 messageType; // eWNI_SME_2040_COEX_IND
3539 tANI_U16 length;
3540 tANI_U8 sessionId;
3541 tANI_U8 HT40MHzIntolerant;
3542 tANI_U8 HT20MHzBssWidthReq;
3543 tANI_U8 channel_num;
3544 tANI_U8 HT2040BssIntoChanReport [1]; //variable
3545}tSirHT2040CoexInfoInd, *tpSirHT2040CoexInfoInd;
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303546#endif
3547
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303548typedef struct sSirOBSSHT40Param
3549{
3550 tANI_U16 OBSSScanPassiveDwellTime;
3551 tANI_U16 OBSSScanActiveDwellTime;
3552 tANI_U16 BSSChannelWidthTriggerScanInterval;
3553 tANI_U16 OBSSScanPassiveTotalPerChannel;
3554 tANI_U16 OBSSScanActiveTotalPerChannel;
3555 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3556 tANI_U16 OBSSScanActivityThreshold;
3557}tSirOBSSHT40Param, *tpOBSSHT40Param;
3558
Jeff Johnson295189b2012-06-20 16:38:30 -07003559#define SIR_WPS_UUID_LEN 16
3560#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3561
3562typedef struct sSirWPSPBCSession {
3563 struct sSirWPSPBCSession *next;
3564 tSirMacAddr addr;
3565 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3566 tANI_TIMESTAMP timestamp;
3567} tSirWPSPBCSession;
3568
3569typedef struct sSirSmeGetWPSPBCSessionsReq
3570{
3571 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3572 tANI_U16 length;
3573 void *pUsrContext;
3574 void *pSapEventCallback;
3575 tSirMacAddr bssId; // BSSID
3576 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3577} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3578
3579typedef struct sSirWPSPBCProbeReq
3580{
3581 tSirMacAddr peerMacAddr;
3582 tANI_U16 probeReqIELen;
3583 tANI_U8 probeReqIE[512];
3584} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3585
3586// probereq from peer, when wsc is enabled
3587typedef struct sSirSmeProbeReqInd
3588{
3589 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3590 tANI_U16 length;
3591 tANI_U8 sessionId;
3592 tSirMacAddr bssId;
3593 tSirWPSPBCProbeReq WPSPBCProbeReq;
3594} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3595
3596typedef struct sSirUpdateAPWPARSNIEsReq
3597{
3598 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3599 tANI_U16 length;
3600 tANI_U16 transactionId; //Transaction ID for cmd
3601 tSirMacAddr bssId; // BSSID
3602 tANI_U8 sessionId; //Session ID
3603 tSirRSNie APWPARSNIEs;
3604} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3605
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003606#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003607#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003608#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3609#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3610#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3611#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3612#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3613#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3614#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003615
3616/*Adaptive Thresholds to be used for FW based scanning*/
3617#define LFR_SENSITIVITY_THR_1MBPS -89
3618#define LFR_LOOKUP_THR_1MBPS -78
3619#define LFR_SENSITIVITY_THR_2MBPS -87
3620#define LFR_LOOKUP_THR_2MBPS -78
3621#define LFR_SENSITIVITY_THR_5_5MBPS -86
3622#define LFR_LOOKUP_THR_5_5MBPS -77
3623#define LFR_SENSITIVITY_THR_11MBPS -85
3624#define LFR_LOOKUP_THR_11MBPS -76
3625#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3626#define LFR_LOOKUP_THR_6MBPS_2G -78
3627#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3628#define LFR_LOOKUP_THR_6MBPS_5G -78
3629#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3630#define LFR_LOOKUP_THR_12MBPS_2G -78
3631#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3632#define LFR_LOOKUP_THR_12MBPS_5G -76
3633#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3634#define LFR_LOOKUP_THR_24MBPS_2G -76
3635#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3636#define LFR_LOOKUP_THR_24MBPS_5G -74
3637#define LFR_SENSITIVITY_THR_DEFAULT 0
3638#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003639#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003640
3641// SME -> HAL - This is the host offload request.
3642#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3643#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3644#define SIR_IPV6_NS_OFFLOAD 2
3645#define SIR_OFFLOAD_DISABLE 0
3646#define SIR_OFFLOAD_ENABLE 1
3647#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303648#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003649#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303650#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003651
3652#ifdef WLAN_NS_OFFLOAD
3653typedef struct sSirNsOffloadReq
3654{
3655 tANI_U8 srcIPv6Addr[16];
3656 tANI_U8 selfIPv6Addr[16];
3657 //Only support 2 possible Network Advertisement IPv6 address
3658 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3659 tANI_U8 selfMacAddr[6];
3660 tANI_U8 srcIPv6AddrValid;
3661 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303662 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003663} tSirNsOffloadReq, *tpSirNsOffloadReq;
3664#endif //WLAN_NS_OFFLOAD
3665
3666typedef struct sSirHostOffloadReq
3667{
3668 tANI_U8 offloadType;
3669 tANI_U8 enableOrDisable;
3670 union
3671 {
3672 tANI_U8 hostIpv4Addr [4];
3673 tANI_U8 hostIpv6Addr [16];
3674 } params;
3675#ifdef WLAN_NS_OFFLOAD
3676 tSirNsOffloadReq nsOffloadInfo;
3677#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003678 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003679} tSirHostOffloadReq, *tpSirHostOffloadReq;
3680
3681/* Packet Types. */
3682#define SIR_KEEP_ALIVE_NULL_PKT 1
3683#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3684
3685/* Enable or disable offload. */
3686#define SIR_KEEP_ALIVE_DISABLE 0
3687#define SIR_KEEP_ALIVE_ENABLE 1
3688
3689/* Keep Alive request. */
3690typedef struct sSirKeepAliveReq
3691{
3692 v_U8_t packetType;
3693 v_U32_t timePeriod;
3694 tSirIpv4Addr hostIpv4Addr;
3695 tSirIpv4Addr destIpv4Addr;
3696 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003697 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003698} tSirKeepAliveReq, *tpSirKeepAliveReq;
3699
3700typedef struct sSirSmeAddStaSelfReq
3701{
3702 tANI_U16 mesgType;
3703 tANI_U16 mesgLen;
3704 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003705 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003706}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3707
3708typedef struct sSirSmeDelStaSelfReq
3709{
3710 tANI_U16 mesgType;
3711 tANI_U16 mesgLen;
3712 tSirMacAddr selfMacAddr;
3713}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3714
3715typedef struct sSirSmeAddStaSelfRsp
3716{
3717 tANI_U16 mesgType;
3718 tANI_U16 mesgLen;
3719 tANI_U16 status;
3720 tSirMacAddr selfMacAddr;
3721}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3722
3723typedef struct sSirSmeDelStaSelfRsp
3724{
3725 tANI_U16 mesgType;
3726 tANI_U16 mesgLen;
3727 tANI_U16 status;
3728 tSirMacAddr selfMacAddr;
3729}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3730
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303731typedef enum DFSChanScanType
3732{
3733 DFS_CHNL_SCAN_DISABLED,
3734 DFS_CHNL_SCAN_ENABLED_NORMAL,
3735 DFS_CHNL_SCAN_ENABLED_ACTIVE
3736}eDFSChanScanType;
3737
Jeff Johnson295189b2012-06-20 16:38:30 -07003738/* Coex Indication defines -
3739 should match WLAN_COEX_IND_DATA_SIZE
3740 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3741 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3742#define SIR_COEX_IND_DATA_SIZE (4)
3743#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3744#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003745#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3746#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003747#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3748#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Kanchanapally, Vidyullatha23cea3c2014-11-04 13:05:20 +05303749#define SIR_COEX_IND_TYPE_ENABLE_UAPSD (6)
3750#define SIR_COEX_IND_TYPE_DISABLE_UAPSD (7)
c_hpothub3458992014-09-19 19:58:57 +05303751#define SIR_COEX_IND_TYPE_CXM_FEATURES_NOTIFICATION (8)
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303752#define SIR_COEX_IND_TYPE_TDLS_ENABLE (6)
3753#define SIR_COEX_IND_TYPE_TDLS_DISABLE (7)
Abhishek Singh8a3e4dc2017-01-02 10:39:18 +05303754#define SIR_COEX_IND_TYPE_HID_CONNECTED_WLAN_CONNECTED_IN_2p4 (9)
3755#define SIR_COEX_IND_TYPE_HID_DISCONNECTED_WLAN_CONNECTED_IN_2p4 (10)
Jeff Johnson295189b2012-06-20 16:38:30 -07003756
3757typedef struct sSirSmeCoexInd
3758{
3759 tANI_U16 mesgType;
3760 tANI_U16 mesgLen;
3761 tANI_U32 coexIndType;
3762 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3763}tSirSmeCoexInd, *tpSirSmeCoexInd;
3764
Jeff Johnson295189b2012-06-20 16:38:30 -07003765typedef struct sSirSmeMgmtFrameInd
3766{
Abhishek Singh7d624e12015-11-30 14:29:27 +05303767 tANI_U16 frameLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303768 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003769 tANI_U8 sessionId;
3770 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303771 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003772 tANI_U8 frameBuf[1]; //variable
3773}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003774
Chet Lanctot186b5732013-03-18 10:26:30 -07003775#ifdef WLAN_FEATURE_11W
3776typedef struct sSirSmeUnprotMgmtFrameInd
3777{
3778 tANI_U8 sessionId;
3779 tANI_U8 frameType;
3780 tANI_U8 frameLen;
3781 tANI_U8 frameBuf[1]; //variable
3782}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3783#endif
3784
Jeff Johnson295189b2012-06-20 16:38:30 -07003785#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3786 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3787 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3788 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3789#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3790 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3791
3792/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003793typedef struct sSirNoAParam
3794{
3795 tANI_U8 ctWindow:7;
3796 tANI_U8 OppPS:1;
3797 tANI_U8 count;
3798 tANI_U32 duration;
3799 tANI_U32 interval;
3800 tANI_U32 singleNoADuration;
3801 tANI_U8 psSelection;
3802}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003803
Kapil Gupta2b44acb2016-12-30 16:49:51 +05303804typedef void(*wlan_suspend_req_cb)(void *ptr, VOS_STATUS status);
3805
Jeff Johnson295189b2012-06-20 16:38:30 -07003806typedef struct sSirWlanSuspendParam
3807{
3808 tANI_U8 configuredMcstBcstFilterSetting;
Kapil Gupta2b44acb2016-12-30 16:49:51 +05303809 wlan_suspend_req_cb wlan_sus_callback;
3810 void *context;
Jeff Johnson295189b2012-06-20 16:38:30 -07003811}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3812
3813typedef struct sSirWlanResumeParam
3814{
3815 tANI_U8 configuredMcstBcstFilterSetting;
3816}tSirWlanResumeParam,*tpSirWlanResumeParam;
3817
3818typedef struct sSirWlanSetRxpFilters
3819{
3820 tANI_U8 configuredMcstBcstFilterSetting;
3821 tANI_U8 setMcstBcstFilter;
3822}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003823
mukul sharma6b53e202016-11-23 19:29:18 +05303824
3825typedef struct sSirUpdateCfgIntParam
3826{
3827 tANI_U32 cfgId;
3828}tSirUpdateCfgIntParam,*tpSirUpdateCfgIntParam;
3829
c_manjeecfd1efb2015-09-25 19:32:34 +05303830typedef struct
3831{
3832 //FW mail box address
3833 uint64 logMailBoxAddr;
3834 tANI_U32 status;
3835 //Logging mail box version
3836 tANI_U8 logMailBoxVer;
3837 //Qshrink is enabled
3838 tANI_U8 logCompressEnabled;
3839 /* used to tell fwr mem dump size */
3840 tANI_U32 fw_mem_dump_max_size;
3841 //Reserved for future purpose
3842 tANI_U32 reserved1;
3843 tANI_U32 reserved2;
3844}tAniLoggingInitRsp, *tpAniLoggingInitRsp;
3845
Anurag Chouhan6ee81542017-02-09 18:09:27 +05303846/**
3847 * struct rsp_stats - arp packet stats
3848 * @status: success or failure
3849 * @tx_fw_cnt: tx packets count
3850 * @tx_ack_cnt: tx acknowledgement count
3851 */
3852typedef struct {
3853 uint32_t status;
3854 uint16_t dad;
3855 uint16_t tx_fw_cnt;
3856 uint16_t tx_ack_cnt;
3857 uint16_t rx_fw_cnt;
3858} rsp_stats;
3859
3860typedef void(*setArpStatsReqCb)(void *data, VOS_STATUS rsp);
3861
3862/**
3863 * struct setArpStatsParams - set/reset arp stats
3864 * @flag: enable/disable stats
3865 * @pkt_type: type of packet(1 - arp)
3866 * @ip_addr: subnet ipv4 address in case of encrypted packets
3867 * @rsp_cb_fn: FW response callback api
3868 * @data_ctx: parameter for callback api
3869 */
3870typedef struct {
3871 uint8_t flag;
3872 uint8_t pkt_type;
3873 uint32_t ip_addr;
3874 setArpStatsReqCb rsp_cb_fn;
3875 void *data_ctx;
3876} setArpStatsParams, *psetArpStatsParams;
3877
3878typedef void(*getArpStatsReqCb)(void *data, rsp_stats *rsp);
3879/**
3880 * struct getArpStatsParams - get arp stats from firmware
3881 * @pkt_type: packet type(1 - ARP)
3882 * @get_rsp_cb_fn: FW response callback api
3883 * @data_ctx: parameter for callback api
3884 */
3885typedef struct {
3886 uint8_t pkt_type;
3887 getArpStatsReqCb get_rsp_cb_fn;
3888 void *data_ctx;
3889} getArpStatsParams, *pgetArpStatsParams;
3890
3891
c_manjeecfd1efb2015-09-25 19:32:34 +05303892typedef void(*FWLoggingInitReqCb)(void *fwlogInitCbContext, tAniLoggingInitRsp *pRsp);
Siddharth Bhal64246172015-02-27 01:04:37 +05303893typedef void ( *tGetFrameLogCallback) (void *pContext);
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303894typedef void(*RssiMonitorReqCb)(void *rssiMonitorCbContext, VOS_STATUS status);
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05303895typedef void(*pktFilterReqCb)(void *data, tANI_U32 status);
Anurag Chouhan83026002016-12-13 22:46:21 +05303896typedef void(*dhcp_offload_req_cb)(void *rssiMonitorCbContext,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303897 VOS_STATUS status);
3898typedef void(*mdns_enable_req_cb)(void *mdns_enable_cb_context,
3899 VOS_STATUS status);
3900typedef void(*mdns_fqdn_req_cb)(void *mdns_fqdn_cb_context, VOS_STATUS status);
3901typedef void(*mdns_resp_req_cb)(void *mdns_resp_cb_context, VOS_STATUS status);
Siddharth Bhal64246172015-02-27 01:04:37 +05303902
3903typedef struct sAniGetFrameLogReq
3904{
3905 tANI_U16 msgType;
3906 tANI_U16 msgLen;
Siddharth Bhal64246172015-02-27 01:04:37 +05303907 tANI_U8 getFrameLogCmdFlag;
Siddharth Bhal64246172015-02-27 01:04:37 +05303908} tAniGetFrameLogReq, *tpAniGetFrameLogReq;
3909
Abhishek Singh99a31be2015-12-10 10:37:44 +05303910/**
3911 * struct s_ani_set_tx_max_pwr - Req params to set max tx power
3912 * @bssid: bssid to set the power cap for
3913 * @self_mac_addr:self mac address
3914 * @power: power to set in dB
3915 */
3916struct s_ani_set_tx_max_pwr
3917{
3918 tSirMacAddr bssid;
3919 tSirMacAddr self_sta_mac_addr;
3920 tPowerdBm power;
3921};
3922
3923
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303924
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303925typedef struct sSirFWLoggingInitParam
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05303926{
3927 tANI_U8 enableFlag;
3928 tANI_U8 frameType;
3929 tANI_U8 frameSize;
3930 tANI_U8 bufferMode;
Siddharth Bhald1be97f2015-05-27 22:39:59 +05303931 tANI_U8 continuousFrameLogging;
3932 tANI_U8 minLogBufferSize;
3933 tANI_U8 maxLogBufferSize;
3934 FWLoggingInitReqCb fwlogInitCallback;
3935 void *fwlogInitCbContext;
3936}tSirFWLoggingInitParam,*tpSirFWLoggingInitParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003937
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +05303938/**
3939 * struct sir_allowed_action_frames - Parameters to set Allowed action frames
3940 * @bitmask: Bits to convey the allowed action frames
3941 * @reserved: For future use
3942 */
3943struct sir_allowed_action_frames {
3944 uint32_t bitmask;
3945 uint32_t reserved;
3946};
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303947
3948/*
3949 * struct rssi_monitor_req - rssi monitoring
3950 * @request_id: request id
3951 * @session_id: session id
3952 * @min_rssi: minimum rssi
3953 * @max_rssi: maximum rssi
3954 * @control: flag to indicate start or stop
3955 */
3956typedef struct sSirRssiMonitorReq
3957{
3958 tANI_U32 requestId;
3959 tANI_U32 sessionId;
3960 tANI_S8 minRssi;
3961 tANI_S8 maxRssi;
3962 tANI_U8 currentBssId[6];
3963 RssiMonitorReqCb rssiMonitorCallback;
3964 void *rssiMonitorCbContext;
3965}tSirRssiMonitorReq, *tpSirRssiMonitorReq;
3966
3967
3968/**
3969 * struct rssi_breach_event - rssi breached event structure
3970 * @request_id: request id
3971 * @curr_rssi: current rssi
3972 * @curr_bssid: current bssid
3973 */
3974struct rssi_breach_event {
3975 tANI_U32 request_id;
3976 v_MACADDR_t curr_bssid;
3977 tANI_S8 curr_rssi;
3978};
3979
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303980typedef struct sSirFatalEventLogsReqParam
3981{
3982 tANI_U32 reason_code;
3983}tSirFatalEventLogsReqParam, *tpSirFatalEventLogsReqParam;
3984
Jeff Johnson295189b2012-06-20 16:38:30 -07003985#ifdef FEATURE_WLAN_SCAN_PNO
3986//
3987// PNO Messages
3988//
3989
3990// Set PNO
3991#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303992#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003993#define SIR_PNO_MAX_SUPP_NETWORKS 16
3994#define SIR_PNO_MAX_SCAN_TIMERS 10
3995
3996/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3997#define SIR_PNO_MAX_PB_REQ_SIZE 450
3998
3999#define SIR_PNO_24G_DEFAULT_CH 1
4000#define SIR_PNO_5G_DEFAULT_CH 36
4001
4002typedef enum
4003{
4004 SIR_PNO_MODE_IMMEDIATE,
4005 SIR_PNO_MODE_ON_SUSPEND,
4006 SIR_PNO_MODE_ON_RESUME,
4007 SIR_PNO_MODE_MAX
4008} eSirPNOMode;
4009
4010typedef struct
4011{
4012 tSirMacSSid ssId;
4013 tANI_U32 authentication;
4014 tANI_U32 encryption;
4015 tANI_U32 bcastNetwType;
4016 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05304017 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07004018 tANI_U8 rssiThreshold;
4019} tSirNetworkType;
4020
4021typedef struct
4022{
4023 tANI_U32 uTimerValue;
4024 tANI_U32 uTimerRepeat;
4025}tSirScanTimer;
4026
4027typedef struct
4028{
4029 tANI_U8 ucScanTimersCount;
4030 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
4031} tSirScanTimersType;
4032
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05304033/*Pref Net Req status */
4034typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
4035
4036
Jeff Johnson295189b2012-06-20 16:38:30 -07004037typedef struct sSirPNOScanReq
4038{
4039 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05304040 PNOReqStatusCb statusCallback;
4041 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07004042 eSirPNOMode modePNO;
4043 tANI_U8 ucNetworksCount;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304044 tSirNetworkType *aNetworks;
Jeff Johnson295189b2012-06-20 16:38:30 -07004045 tSirScanTimersType scanTimers;
4046
4047 /*added by SME*/
4048 tANI_U16 us24GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304049 tANI_U8 *p24GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07004050 tANI_U16 us5GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05304051 tANI_U8 *p5GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07004052} tSirPNOScanReq, *tpSirPNOScanReq;
4053
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004054typedef struct sSirSetRSSIFilterReq
4055{
4056 tANI_U8 rssiThreshold;
4057} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
4058
4059
4060// Update Scan Params
4061typedef struct {
4062 tANI_U8 b11dEnabled;
4063 tANI_U8 b11dResolved;
4064 tANI_U8 ucChannelCount;
4065 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
4066 tANI_U16 usPassiveMinChTime;
4067 tANI_U16 usPassiveMaxChTime;
4068 tANI_U16 usActiveMinChTime;
4069 tANI_U16 usActiveMaxChTime;
4070 tANI_U8 ucCBState;
4071} tSirUpdateScanParams, * tpSirUpdateScanParams;
4072
4073// Preferred Network Found Indication
4074typedef struct
4075{
4076 tANI_U16 mesgType;
4077 tANI_U16 mesgLen;
4078 /* Network that was found with the highest RSSI*/
4079 tSirMacSSid ssId;
4080 /* Indicates the RSSI */
4081 tANI_U8 rssi;
4082 /* Length of the beacon or probe response
4083 * corresponding to the candidate found by PNO */
4084 tANI_U32 frameLength;
4085 /* Index to memory location where the contents of
4086 * beacon or probe response frame will be copied */
4087 tANI_U8 data[1];
4088} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
4089#endif //FEATURE_WLAN_SCAN_PNO
4090
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004091#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Kapil Gupta04ab1992016-06-26 13:36:51 +05304092#define SIR_PER_ROAM_MAX_AP_CNT 20
Kapil Guptac69c28a2016-08-25 14:11:17 +05304093#define SIR_PER_ROAM_MAX_CANDIDATE_CNT 32
Kapil Gupta04ab1992016-06-26 13:36:51 +05304094typedef struct __attribute__((packed))
4095{
4096 tANI_U8 channelNumber;
4097 tANI_U8 channelCCA;
4098 tANI_U8 otherApCount;
4099 tANI_S8 otherApRssi[SIR_PER_ROAM_MAX_AP_CNT];
4100} tSirCandidateChanInfo, * tpSirCandidateChanInfo;
4101
4102typedef struct sPERRoamScanStart
4103{
4104 tANI_U16 msgType;
4105 tANI_U16 msgLen;
4106 tANI_U8 start;
4107} tPERRoamScanStart, *tpPERRoamScanStart;
4108
4109typedef struct sSirRoamAPInfo
4110{
4111 tSirMacAddr bssAddr;
4112 unsigned int timeStamp;
4113} tSirRoamAPInfo, *tpSirRoamAPInfo;
4114
4115typedef struct __attribute__((packed))
4116{
4117 tANI_U32 candidateCount;
4118 tSirCandidateChanInfo channelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
4119} tSirPerRoamScanResult, * tpSirPerRoamScanResult;
4120
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004121typedef struct
4122{
4123 tSirMacSSid ssId;
4124 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
4125 tANI_U32 authentication;
4126 tANI_U8 encryption;
4127 tANI_U8 mcencryption;
4128 tANI_U8 ChannelCount;
4129 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
4130
4131} tSirRoamNetworkType;
4132
4133typedef struct SirMobilityDomainInfo
4134{
4135 tANI_U8 mdiePresent;
4136 tANI_U16 mobilityDomain;
4137} tSirMobilityDomainInfo;
4138
4139typedef struct sSirRoamOffloadScanReq
4140{
4141 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08004142 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004143 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08004144 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004145 tANI_U8 RoamRssiDiff;
4146 tANI_U8 ChannelCacheType;
4147 tANI_U8 Command;
4148 tANI_U8 StartScanReason;
4149 tANI_U16 NeighborScanTimerPeriod;
4150 tANI_U16 NeighborRoamScanRefreshPeriod;
4151 tANI_U16 NeighborScanChannelMinTime;
4152 tANI_U16 NeighborScanChannelMaxTime;
4153 tANI_U16 EmptyRefreshScanPeriod;
4154 tANI_U8 ValidChannelCount;
4155 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08004156 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004157 tANI_U16 us24GProbeTemplateLen;
4158 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4159 tANI_U16 us5GProbeTemplateLen;
4160 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07004161 tANI_U8 nProbes;
4162 tANI_U16 HomeAwayTime;
Sreelakshmi Konamki70bfdaf2017-05-29 18:47:29 +05304163 tANI_U8 WeakZoneRssiThresholdForRoam;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004164 tSirRoamNetworkType ConnectedNetwork;
4165 tSirMobilityDomainInfo MDID;
4166} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304167
4168/**
4169 * struct sSirPERRoamOffloadScanReq - Offload PER config params
4170 * @sessionId: session id
4171 * @rateUpThreshold: rate at which to stop monitoring the rate
4172 * @rateDownThreshold: rate at which to start monitoring
4173 * @isPERRoamCCAEnabled: CCA sensing is enabled or disabled
4174 * @waitPeriodForNextPERScan: time to wait before start monitoring again once a
4175 * scan has been triggered
4176 * @PERtimerThreshold: time to collect stats to trigger roam scan
4177 * @PERroamTriggerPercent: minimum percentage of packets needs to be below
4178 * rateDownThreshold to trigger a roam scan
4179 */
4180typedef struct sSirPERRoamOffloadScanReq
4181{
4182 tANI_U16 sessionId;
4183 tANI_U16 rateUpThreshold;
4184 tANI_U16 rateDownThreshold;
4185 tANI_U16 isPERRoamCCAEnabled;
4186 tANI_U32 waitPeriodForNextPERScan;
4187 tANI_U32 PERtimerThreshold;
4188 tANI_U32 PERroamTriggerPercent;
Kapil Guptac69c28a2016-08-25 14:11:17 +05304189 tANI_S16 PERRoamFullScanThreshold;
Kapil Gupta04ab1992016-06-26 13:36:51 +05304190} tSirPERRoamOffloadScanReq, *tpSirPERRoamOffloadScanReq;
4191
4192typedef struct sSirPERRoamTriggerScanReq
4193{
4194 tANI_BOOLEAN roamScanReq;
4195} tSirPERRoamTriggerScanReq, *tpSirPERRoamTriggerScanReq;
4196
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08004197#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07004198
4199#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
4200
4201//Power Parameters Type
4202typedef enum
4203{
4204 eSIR_IGNORE_DTIM = 1,
4205 eSIR_LISTEN_INTERVAL = 2,
4206 eSIR_MCAST_BCAST_FILTER = 3,
4207 eSIR_ENABLE_BET = 4,
4208 eSIR_BET_INTERVAL = 5
4209}tPowerParamType;
4210
4211//Power Parameters Value s
4212typedef struct
4213{
4214 /* Ignore DTIM */
4215 tANI_U32 uIgnoreDTIM;
4216
4217 /* DTIM Period */
4218 tANI_U32 uDTIMPeriod;
4219
4220 /* Listen Interval */
4221 tANI_U32 uListenInterval;
4222
4223 /* Broadcast Multicas Filter */
4224 tANI_U32 uBcastMcastFilter;
4225
4226 /* Beacon Early Termination */
4227 tANI_U32 uEnableBET;
4228
4229 /* Beacon Early Termination Interval */
4230 tANI_U32 uBETInterval;
4231
Yue Mac24062f2013-05-13 17:01:29 -07004232 /* MAX LI for modulated DTIM */
4233 tANI_U32 uMaxLIModulatedDTIM;
4234
Jeff Johnson295189b2012-06-20 16:38:30 -07004235}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
4236
4237typedef struct sSirTxPerTrackingParam
4238{
4239 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
4240 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
4241 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 */
4242 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
4243}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
4244
4245#ifdef WLAN_FEATURE_PACKET_FILTERING
4246/*---------------------------------------------------------------------------
4247 Packet Filtering Parameters
4248---------------------------------------------------------------------------*/
4249#define SIR_IPV4_ADDR_LEN 4
4250#define SIR_MAC_ADDR_LEN 6
4251#define SIR_MAX_FILTER_TEST_DATA_LEN 8
4252#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
4253#define SIR_MAX_NUM_FILTERS 20
4254#define SIR_MAX_NUM_TESTS_PER_FILTER 10
4255
4256//
4257// Receive Filter Parameters
4258//
4259typedef enum
4260{
4261 SIR_RCV_FILTER_TYPE_INVALID,
4262 SIR_RCV_FILTER_TYPE_FILTER_PKT,
4263 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
4264 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4265}eSirReceivePacketFilterType;
4266
4267typedef enum
4268{
4269 SIR_FILTER_HDR_TYPE_INVALID,
4270 SIR_FILTER_HDR_TYPE_MAC,
4271 SIR_FILTER_HDR_TYPE_ARP,
4272 SIR_FILTER_HDR_TYPE_IPV4,
4273 SIR_FILTER_HDR_TYPE_IPV6,
4274 SIR_FILTER_HDR_TYPE_UDP,
4275 SIR_FILTER_HDR_TYPE_MAX
4276}eSirRcvPktFltProtocolType;
4277
4278typedef enum
4279{
4280 SIR_FILTER_CMP_TYPE_INVALID,
4281 SIR_FILTER_CMP_TYPE_EQUAL,
4282 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
4283 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
4284 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
4285 SIR_FILTER_CMP_TYPE_MAX
4286}eSirRcvPktFltCmpFlagType;
4287
4288typedef struct sSirRcvPktFilterFieldParams
4289{
4290 eSirRcvPktFltProtocolType protocolLayer;
4291 eSirRcvPktFltCmpFlagType cmpFlag;
4292 /* Length of the data to compare */
4293 tANI_U16 dataLength;
4294 /* from start of the respective frame header */
4295 tANI_U8 dataOffset;
4296 /* Reserved field */
4297 tANI_U8 reserved;
4298 /* Data to compare */
4299 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
4300 /* Mask to be applied on the received packet data before compare */
4301 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
4302}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
4303
4304typedef struct sSirRcvPktFilterCfg
4305{
4306 tANI_U8 filterId;
4307 eSirReceivePacketFilterType filterType;
4308 tANI_U32 numFieldParams;
4309 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07004310 tSirMacAddr selfMacAddr;
4311 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004312 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07004313}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
4314
4315//
4316// Filter Packet Match Count Parameters
4317//
4318typedef struct sSirRcvFltPktMatchCnt
4319{
4320 tANI_U8 filterId;
4321 tANI_U32 matchCnt;
4322} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
4323
4324typedef struct sSirRcvFltPktMatchRsp
4325{
4326 tANI_U16 mesgType;
4327 tANI_U16 mesgLen;
4328
4329 /* Success or Failure */
4330 tANI_U32 status;
4331 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004332 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004333} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
4334
4335//
4336// Receive Filter Clear Parameters
4337//
4338typedef struct sSirRcvFltPktClearParam
4339{
4340 tANI_U32 status; /* only valid for response message */
4341 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07004342 tSirMacAddr selfMacAddr;
4343 tSirMacAddr bssId;
Hanumanth Reddy Pothula73010b92016-11-01 16:16:58 +05304344 pktFilterReqCb pktFilterCallback;
4345 void *cbCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07004346}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
4347
4348//
4349// Multicast Address List Parameters
4350//
4351typedef struct sSirRcvFltMcAddrList
4352{
4353 tANI_U32 ulMulticastAddrCnt;
4354 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07004355 tSirMacAddr selfMacAddr;
4356 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004357} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
4358#endif // WLAN_FEATURE_PACKET_FILTERING
4359
4360//
4361// Generic version information
4362//
4363typedef struct
4364{
4365 tANI_U8 revision;
4366 tANI_U8 version;
4367 tANI_U8 minor;
4368 tANI_U8 major;
4369} tSirVersionType;
4370
4371typedef struct sAniBtAmpLogLinkReq
4372{
4373 // Common for all types are requests
4374 tANI_U16 msgType; // message type is same as the request type
4375 tANI_U16 msgLen; // length of the entire request
4376 tANI_U8 sessionId; //sme Session Id
4377 void *btampHandle; //AMP context
4378
4379} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
4380
4381#ifdef WLAN_FEATURE_GTK_OFFLOAD
4382/*---------------------------------------------------------------------------
4383* WDA_GTK_OFFLOAD_REQ
4384*--------------------------------------------------------------------------*/
4385typedef struct
4386{
4387 tANI_U32 ulFlags; /* optional flags */
4388 tANI_U8 aKCK[16]; /* Key confirmation key */
4389 tANI_U8 aKEK[16]; /* key encryption key */
4390 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004391 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004392} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4393
4394/*---------------------------------------------------------------------------
4395* WDA_GTK_OFFLOAD_GETINFO_REQ
4396*--------------------------------------------------------------------------*/
4397typedef struct
4398{
4399 tANI_U16 mesgType;
4400 tANI_U16 mesgLen;
4401
4402 tANI_U32 ulStatus; /* success or failure */
4403 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4404 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4405 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4406 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004407 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004408} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4409#endif // WLAN_FEATURE_GTK_OFFLOAD
4410
4411#ifdef WLAN_WAKEUP_EVENTS
4412/*---------------------------------------------------------------------------
4413 tSirWakeReasonInd
4414---------------------------------------------------------------------------*/
4415typedef struct
4416{
4417 tANI_U16 mesgType;
4418 tANI_U16 mesgLen;
4419 tANI_U32 ulReason; /* see tWakeReasonType */
4420 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4421 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4422 HAL truncates the data (i.e. data packets) this length
4423 will be less than the actual length */
4424 tANI_U32 ulActualDataLen; /* actual length of data */
4425 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4426 see specific wake type */
4427} tSirWakeReasonInd, *tpSirWakeReasonInd;
4428#endif // WLAN_WAKEUP_EVENTS
4429
4430/*---------------------------------------------------------------------------
4431 sAniSetTmLevelReq
4432---------------------------------------------------------------------------*/
4433typedef struct sAniSetTmLevelReq
4434{
4435 tANI_U16 tmMode;
4436 tANI_U16 newTmLevel;
4437} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4438
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004439#ifdef FEATURE_WLAN_TDLS
4440/* TDLS Request struct SME-->PE */
4441typedef struct sSirTdlsSendMgmtReq
4442{
4443 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4444 tANI_U16 length;
4445 tANI_U8 sessionId; // Session ID
4446 tANI_U16 transactionId; // Transaction ID for cmd
4447 tANI_U8 reqType;
4448 tANI_U8 dialog;
4449 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004450 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304451 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004452 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4453 tSirMacAddr peerMac;
4454 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4455} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004456
4457typedef enum TdlsAddOper
4458{
4459 TDLS_OPER_NONE,
4460 TDLS_OPER_ADD,
4461 TDLS_OPER_UPDATE
4462} eTdlsAddOper;
4463
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004464/* TDLS Request struct SME-->PE */
4465typedef struct sSirTdlsAddStaReq
4466{
4467 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4468 tANI_U16 length;
4469 tANI_U8 sessionId; // Session ID
4470 tANI_U16 transactionId; // Transaction ID for cmd
4471 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004472 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004473 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004474 tANI_U16 capability;
4475 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4476 tANI_U8 supported_rates_length;
4477 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004478 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004479 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004480 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004481 tSirVHTCap vhtCap;
4482 tANI_U8 uapsd_queues;
4483 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004484} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004485
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004486/* TDLS Response struct PE-->SME */
4487typedef struct sSirTdlsAddStaRsp
4488{
4489 tANI_U16 messageType;
4490 tANI_U16 length;
4491 tSirResultCodes statusCode;
4492 tSirMacAddr peerMac;
4493 tANI_U8 sessionId; // Session ID
4494 tANI_U16 staId ;
4495 tANI_U16 staType ;
4496 tANI_U8 ucastSig;
4497 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004498 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004499} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304500
4501/* TDLS Request struct SME-->PE */
4502typedef struct
4503{
4504 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4505 tANI_U16 length;
4506 tANI_U8 sessionId; // Session ID
4507 tANI_U16 transactionId; // Transaction ID for cmd
4508 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4509 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4510 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304511 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304512 tANI_U8 isResponder; // Is Peer a responder.
4513 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4514 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304515 tANI_U8 supportedChannelsLen;
4516 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4517 tANI_U8 supportedOperClassesLen;
4518 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304519}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4520
4521/* TDLS Request struct SME-->PE */
4522typedef struct
4523{
4524 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4525 tANI_U16 length;
4526 tANI_U8 sessionId; // Session ID
4527 tANI_U16 transactionId; // Transaction ID for cmd
4528 tSirResultCodes statusCode;
4529 tSirMacAddr peerMac;
Masti, Narayanraddif10fd792015-12-15 15:01:01 +05304530 tANI_U16 sta_idx;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304531}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4532
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004533/* TDLS Request struct SME-->PE */
4534typedef struct sSirTdlsDelStaReq
4535{
4536 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4537 tANI_U16 length;
4538 tANI_U8 sessionId; // Session ID
4539 tANI_U16 transactionId; // Transaction ID for cmd
4540 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4541 tSirMacAddr peerMac;
4542} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4543/* TDLS Response struct PE-->SME */
4544typedef struct sSirTdlsDelStaRsp
4545{
4546 tANI_U16 messageType;
4547 tANI_U16 length;
4548 tANI_U8 sessionId; // Session ID
4549 tSirResultCodes statusCode;
4550 tSirMacAddr peerMac;
4551 tANI_U16 staId;
4552} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004553/* TDLS Delete Indication struct PE-->SME */
4554typedef struct sSirTdlsDelStaInd
4555{
4556 tANI_U16 messageType;
4557 tANI_U16 length;
4558 tANI_U8 sessionId; // Session ID
4559 tSirMacAddr peerMac;
4560 tANI_U16 staId;
4561 tANI_U16 reasonCode;
4562} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004563typedef struct sSirTdlsDelAllPeerInd
4564{
4565 tANI_U16 messageType;
4566 tANI_U16 length;
4567 tANI_U8 sessionId; // Session ID
4568} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004569typedef struct sSirMgmtTxCompletionInd
4570{
4571 tANI_U16 messageType;
4572 tANI_U16 length;
4573 tANI_U8 sessionId; // Session ID
4574 tANI_U32 txCompleteStatus;
4575} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Atul Mittalc0f739f2014-07-31 13:47:47 +05304576
4577//tdlsoffchan
4578/* TDLS Channel Switch struct SME-->PE */
4579typedef struct
4580{
4581 tANI_U16 messageType; //eWNI_SME_TDLS_CHANNEL_SWITCH_REQ
4582 tANI_U16 length;
4583 tANI_U8 sessionId; // Session ID
4584 tANI_U16 transactionId; // Transaction ID for cmd
4585 tANI_U8 tdlsOffCh; // Target Off Channel
4586 tANI_U8 tdlsOffChBwOffset;// Target Off Channel Bandwidth offset
4587 tANI_U8 tdlsSwMode; // TDLS Off Channel Mode
4588 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4589 tSirMacAddr peerMac;
4590}tSirTdlsChanSwitch, *tpSirTdlsChanSwitch;
4591
Atul Mittal60bd4292014-08-14 12:19:27 +05304592/* TDLS Resp struct */
4593typedef struct
4594{
4595 tANI_U16 messageType; // eWNI_SME_TDLS_CHANNEL_SWITCH_RSP
4596 tANI_U16 length;
4597 tANI_U8 sessionId; // Session ID
4598 tANI_U16 transactionId; // Transaction ID for cmd
4599 tSirResultCodes statusCode;
4600 tSirMacAddr peerMac;
Masti, Narayanraddi36c67622016-01-06 16:07:34 +05304601 tANI_U16 sta_idx;
Atul Mittal60bd4292014-08-14 12:19:27 +05304602}tSirTdlsChanSwitchReqRsp, *tpSirTdlsChanSwitchReqRsp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004603#endif /* FEATURE_WLAN_TDLS */
4604
Yathish9f22e662012-12-10 14:21:35 -08004605typedef struct sSirActiveModeSetBcnFilterReq
4606{
4607 tANI_U16 messageType;
4608 tANI_U16 length;
4609 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304610 tSirMacAddr bssid;
Yathish9f22e662012-12-10 14:21:35 -08004611} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4612
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304613typedef enum
4614{
4615 HT40_OBSS_SCAN_PARAM_START,
4616 HT40_OBSS_SCAN_PARAM_UPDATE
4617}tHT40OBssScanCmdType;
4618
4619typedef struct sSirSmeHT40StopOBSSScanInd
4620{
4621 tANI_U16 messageType;
4622 tANI_U16 length;
4623 tANI_U8 seesionId;
Sreelakshmi Konamkidb3f75a2016-05-26 15:41:04 +05304624 tSirMacAddr bssid;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304625} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4626
4627typedef struct sSirSmeHT40OBSSScanInd
4628{
4629 tANI_U16 messageType;
4630 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304631 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304632} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4633
4634typedef struct sSirHT40OBSSScanInd
4635{
4636 tHT40OBssScanCmdType cmdType;
4637 tSirScanType scanType;
4638 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4639 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4640 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4641 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4642 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4643 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4644 tANI_U16 OBSSScanActivityThreshold;
4645 tANI_U8 selfStaIdx;
4646 tANI_U8 bssIdx;
4647 tANI_U8 fortyMHZIntolerent;
4648 tANI_U8 channelCount;
4649 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4650 tANI_U8 currentOperatingClass;
4651 tANI_U16 ieFieldLen;
4652 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4653} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4654
4655
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304656//Reset AP Caps Changed
4657typedef struct sSirResetAPCapsChange
4658{
4659 tANI_U16 messageType;
4660 tANI_U16 length;
4661 tSirMacAddr bssId;
4662} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004663/// Definition for Candidate found indication from FW
4664typedef struct sSirSmeCandidateFoundInd
4665{
4666 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4667 tANI_U16 length;
4668 tANI_U8 sessionId; // Session Identifier
4669} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004670
Chet Lanctot186b5732013-03-18 10:26:30 -07004671#ifdef WLAN_FEATURE_11W
4672typedef struct sSirWlanExcludeUnencryptParam
4673{
4674 tANI_BOOLEAN excludeUnencrypt;
4675 tSirMacAddr bssId;
4676}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4677#endif
4678
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004679typedef struct sAniHandoffReq
4680{
4681 // Common for all types are requests
4682 tANI_U16 msgType; // message type is same as the request type
4683 tANI_U16 msgLen; // length of the entire request
4684 tANI_U8 sessionId;
4685 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4686 tANI_U8 channel;
Selvaraj, Sridhar3714c4d2016-06-22 15:19:12 +05304687#ifndef QCA_WIFI_ISOC
4688 tANI_U8 handoff_src;
4689#endif
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004690} tAniHandoffReq, *tpAniHandoffReq;
4691
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304692typedef struct sSirScanOffloadReq {
4693 tANI_U8 sessionId;
4694 tSirMacAddr bssId;
4695 tANI_U8 numSsid;
4696 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4697 tANI_U8 hiddenSsid;
4698 tSirMacAddr selfMacAddr;
4699 tSirBssType bssType;
4700 tANI_U8 dot11mode;
4701 tSirScanType scanType;
4702 tANI_U32 minChannelTime;
4703 tANI_U32 maxChannelTime;
4704 tANI_BOOLEAN p2pSearch;
4705 tANI_U16 uIEFieldLen;
4706 tANI_U16 uIEFieldOffset;
4707 tSirChannelList channelList;
4708 /*-----------------------------
4709 sSirScanOffloadReq....
4710 -----------------------------
4711 uIEFieldLen
4712 -----------------------------
4713 uIEFieldOffset ----+
4714 ----------------------------- |
4715 channelList.numChannels |
4716 ----------------------------- |
4717 ... variable size up to |
4718 channelNumber[numChannels-1] |
4719 This can be zero, if |
4720 numChannel is zero. |
4721 ----------------------------- <--+
4722 ... variable size uIEField
4723 up to uIEFieldLen (can be 0)
4724 -----------------------------*/
4725} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304726
4727typedef enum sSirScanEventType {
4728 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4729 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4730 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4731 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4732 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4733 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4734 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4735 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4736 SCAN_EVENT_MAX=0x8000
4737} tSirScanEventType;
4738
4739typedef struct sSirScanOffloadEvent{
4740 tSirScanEventType event;
4741 tSirResultCodes reasonCode;
4742 tANI_U32 chanFreq;
4743 tANI_U32 requestor;
4744 tANI_U32 scanId;
4745} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4746
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304747typedef struct sSirUpdateChanParam
4748{
4749 tANI_U8 chanId;
4750 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004751 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304752} tSirUpdateChanParam, *tpSirUpdateChanParam;
4753
4754typedef struct sSirUpdateChan
4755{
Sachin Ahujacb64fc82015-01-12 17:01:05 +05304756 tANI_U8 regId;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304757 tANI_U8 numChan;
4758 tSirUpdateChanParam chanParam[1];
4759} tSirUpdateChanList, *tpSirUpdateChanList;
4760
Leo Chang9056f462013-08-01 19:21:11 -07004761#ifdef FEATURE_WLAN_LPHB
4762#define SIR_LPHB_FILTER_LEN 64
4763
4764typedef enum
4765{
4766 LPHB_SET_EN_PARAMS_INDID,
4767 LPHB_SET_TCP_PARAMS_INDID,
4768 LPHB_SET_TCP_PKT_FILTER_INDID,
4769 LPHB_SET_UDP_PARAMS_INDID,
4770 LPHB_SET_UDP_PKT_FILTER_INDID,
4771 LPHB_SET_NETWORK_INFO_INDID,
4772} LPHBIndType;
4773
4774typedef struct sSirLPHBEnableStruct
4775{
4776 v_U8_t enable;
4777 v_U8_t item;
4778 v_U8_t session;
4779} tSirLPHBEnableStruct;
4780
4781typedef struct sSirLPHBTcpParamStruct
4782{
4783 v_U32_t srv_ip;
4784 v_U32_t dev_ip;
4785 v_U16_t src_port;
4786 v_U16_t dst_port;
4787 v_U16_t timeout;
4788 v_U8_t session;
4789 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004790 uint16 timePeriodSec; // in seconds
4791 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004792} tSirLPHBTcpParamStruct;
4793
4794typedef struct sSirLPHBTcpFilterStruct
4795{
4796 v_U16_t length;
4797 v_U8_t offset;
4798 v_U8_t session;
4799 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4800} tSirLPHBTcpFilterStruct;
4801
4802typedef struct sSirLPHBUdpParamStruct
4803{
4804 v_U32_t srv_ip;
4805 v_U32_t dev_ip;
4806 v_U16_t src_port;
4807 v_U16_t dst_port;
4808 v_U16_t interval;
4809 v_U16_t timeout;
4810 v_U8_t session;
4811 tSirMacAddr gateway_mac;
4812} tSirLPHBUdpParamStruct;
4813
4814typedef struct sSirLPHBUdpFilterStruct
4815{
4816 v_U16_t length;
4817 v_U8_t offset;
4818 v_U8_t session;
4819 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4820} tSirLPHBUdpFilterStruct;
4821
4822typedef struct sSirLPHBReq
4823{
4824 v_U16_t cmd;
4825 v_U16_t dummy;
4826 union
4827 {
4828 tSirLPHBEnableStruct lphbEnableReq;
4829 tSirLPHBTcpParamStruct lphbTcpParamReq;
4830 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4831 tSirLPHBUdpParamStruct lphbUdpParamReq;
4832 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4833 } params;
4834} tSirLPHBReq;
4835
Leo Changd9df8aa2013-09-26 13:32:26 -07004836typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004837{
4838 v_U8_t sessionIdx;
4839 v_U8_t protocolType; /*TCP or UDP*/
4840 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004841} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004842#endif /* FEATURE_WLAN_LPHB */
4843
Yue Mab9c86f42013-08-14 15:59:08 -07004844typedef struct sSirAddPeriodicTxPtrn
4845{
4846 /* MAC Address for the adapter */
4847 tSirMacAddr macAddress;
4848
4849 tANI_U8 ucPtrnId; // Pattern ID
4850 tANI_U16 ucPtrnSize; // Pattern size
4851 tANI_U32 usPtrnIntervalMs; // In msec
4852 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4853} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4854
4855typedef struct sSirDelPeriodicTxPtrn
4856{
4857 /* MAC Address for the adapter */
4858 tSirMacAddr macAddress;
4859
4860 /* Bitmap of pattern IDs that need to be deleted */
4861 tANI_U32 ucPatternIdBitmap;
4862} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4863
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004864typedef struct sSirRateUpdateInd
4865{
4866 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4867 * param.
4868 */
4869 tANI_S32 ucastDataRate;
4870
4871 /* TX flag to differentiate between HT20, HT40 etc */
4872 tTxrateinfoflags ucastDataRateTxFlag;
4873
4874 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4875 tSirMacAddr bssid;
4876
4877 /*
4878 * 0 implies MCAST RA, positive value implies fixed rate,
4879 * -1 implies ignore this param
4880 */
Abhishek Singh00b71972016-01-07 10:51:04 +05304881 tANI_S32 rmcDataRate;//unit Mbpsx10
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004882
4883 /* TX flag to differentiate between HT20, HT40 etc */
Abhishek Singh00b71972016-01-07 10:51:04 +05304884 tTxrateinfoflags rmcDataRateTxFlag;
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004885
4886 /*
4887 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4888 * 0 implies ignore
4889 */
4890 tANI_U32 mcastDataRate24GHz;
4891
4892 /* TX flag to differentiate between HT20, HT40 etc */
4893 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4894
4895 /*
4896 * MCAST(or BCAST) fixed data rate in 5 GHz,
4897 * unit Mbpsx10, 0 implies ignore
4898 */
4899 tANI_U32 mcastDataRate5GHz;
4900
4901 /* TX flag to differentiate between HT20, HT40 etc */
4902 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4903
4904} tSirRateUpdateInd, *tpSirRateUpdateInd;
4905
Abhishek Singh00b71972016-01-07 10:51:04 +05304906#ifdef WLAN_FEATURE_RMC
4907
4908#define SIR_RMC_NUM_MAX_RULERS 8 /* HAL_NUM_MAX_RULERS */
4909typedef struct sSirSetRMCReq
4910{
4911 tANI_U16 msgType;
4912 tANI_U16 msgLen;
4913 tSirMacAddr mcastTransmitter;
4914} tSirSetRMCReq, *tpSirSetRMCReq;
4915
4916typedef struct sSirRMCInfo
4917{
4918 tANI_U32 dialogToken;
4919 tANI_U8 action;
4920 tSirMacAddr mcastRuler;
4921} tSirRMCInfo, *tpSirRMCInfo;
4922
4923typedef struct sSirRmcRulerSelectInd
4924{
4925 tANI_U16 status;
4926 tSirMacAddr mcastTransmitter;
4927 tSirMacAddr mcastGroup;
4928 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4929} tSirRmcRulerSelectInd, *tpSirRmcRulerSelectInd;
4930
4931typedef struct sSirRmcBecomeRulerInd
4932{
4933 tANI_U16 status;
4934 tSirMacAddr mcastTransmitter;
4935 tSirMacAddr mcastGroup;
4936} tSirRmcBecomeRulerInd, *tpSirRmcBecomeRulerInd;
4937
4938typedef struct sSirRmcRulerReq
4939{
4940 // Common for all types are requests
4941 tANI_U16 msgType; // message type is same as the request type
4942 tANI_U16 msgLen; // length of the entire request
4943 tANI_U8 cmd; // tRulerReqCmdType
4944 tSirMacAddr mcastTransmitter;
4945 tSirMacAddr mcastGroup;
4946 tSirMacAddr blacklist[SIR_RMC_NUM_MAX_RULERS];
4947} tSirRmcRulerReq, *tpSirRmcRulerReq;
4948
4949typedef struct sSirRmcUpdateInd
4950{
4951 // Common for all types are requests
4952 tANI_U16 msgType; // message type is same as the request type
4953 tANI_U16 msgLen; // length of the entire request
4954 tANI_U8 indication; // trulerUpdateIndType
4955 tANI_U8 role; // tRoleType
4956 tSirMacAddr mcastTransmitter;
4957 tSirMacAddr mcastGroup;
4958 tSirMacAddr mcastRuler;
4959 tSirMacAddr ruler[SIR_RMC_NUM_MAX_RULERS];
4960} tSirRmcUpdateInd, *tpSirRmcUpdateInd;
4961
4962/*---------------------------------------------------------------------------
4963* tSirIbssGetPeerInfoReqParams
4964*--------------------------------------------------------------------------*/
4965typedef struct
4966{
4967 tANI_BOOLEAN allPeerInfoReqd; // If set, all IBSS peers stats are reported
4968 tANI_U8 staIdx; // If allPeerInfoReqd is not set, only stats
4969 // of peer with staIdx is reported
4970}tSirIbssGetPeerInfoReqParams, *tpSirIbssGetPeerInfoReqParams;
4971
4972/*---------------------------------------------------------------------------
4973* tSirIbssGetPeerInfoParams
4974*--------------------------------------------------------------------------*/
4975typedef struct
4976{
4977 tANI_U8 staIdx; //StaIdx
4978 tANI_U32 txRate; //Tx Rate
4979 tANI_U32 mcsIndex; //MCS Index
4980 tANI_U32 txRateFlags; //TxRate Flags
4981 tANI_S8 rssi; //RSSI
4982}tSirIbssPeerInfoParams;
4983
4984typedef struct
4985{
4986 tANI_U32 status;
4987 tANI_U8 numPeers;
4988 tSirIbssPeerInfoParams peerInfoParams[32];
4989}tSirPeerInfoRspParams, *tpSirIbssPeerInfoRspParams;
4990
4991/*---------------------------------------------------------------------------
4992* tSirIbssGetPeerInfoRspParams
4993*--------------------------------------------------------------------------*/
4994typedef struct
4995{
4996 tANI_U16 mesgType;
4997 tANI_U16 mesgLen;
4998 tSirPeerInfoRspParams ibssPeerInfoRspParams;
4999} tSirIbssGetPeerInfoRspParams, *tpSirIbssGetPeerInfoRspParams;
5000#endif /* WLAN_FEATURE_RMC */
5001
Rajeev79dbe4c2013-10-05 11:03:42 +05305002#ifdef FEATURE_WLAN_BATCH_SCAN
5003// Set batch scan resposne from FW
5004typedef struct
5005{
5006 /*maximum number of scans which FW can cache*/
5007 tANI_U32 nScansToBatch;
5008} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
5009
5010// Set batch scan request to FW
5011typedef struct
5012{
5013 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
5014 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
5015 tANI_U32 bestNetwork; /* best networks in terms of rssi */
5016 tANI_U8 rfBand; /* band to scan :
5017 0 ->both Band, 1->2.4Ghz Only
5018 and 2-> 5GHz Only */
5019 tANI_U32 rtt; /* set if required to do RTT it is not
5020 supported in current version */
5021} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
5022
5023
5024// Stop batch scan request to FW
5025typedef struct
5026{
5027 tANI_U32 param;
5028} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
5029
5030// Trigger batch scan result indication to FW
5031typedef struct
5032{
5033 tANI_U32 param;
5034} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
5035
5036// Batch scan result indication from FW
5037typedef PACKED_PRE struct PACKED_POST
5038{
5039 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08005040 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05305041 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05305042 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05305043 /*Timestamp when Network was found. Used to calculate age based on timestamp
5044 in GET_RSP msg header */
5045 tANI_U32 timestamp;
5046} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
5047
5048typedef PACKED_PRE struct PACKED_POST
5049{
5050 tANI_U32 scanId; /* Scan List ID. */
5051 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
5052 tANI_U32 numNetworksInScanList;
5053 /*Variable data ptr: Number of AP in Scan List*/
5054 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
5055 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
5056 tANI_U8 scanList[1];
5057} tSirBatchScanList, *tpSirBatchScanList;
5058
5059typedef PACKED_PRE struct PACKED_POST
5060{
5061 tANI_U32 timestamp;
5062 tANI_U32 numScanLists;
5063 boolean isLastResult;
5064 /* Variable Data ptr: Number of Scan Lists*/
5065 /* following isLastResult is data of type tSirBatchScanList
5066 * of sizeof(tSirBatchScanList) * numScanLists*/
5067 tANI_U8 scanResults[1];
5068} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
5069
5070#endif // FEATURE_WLAN_BATCH_SCAN
5071
Leo Chang0b0e45a2013-12-15 15:18:55 -08005072#ifdef FEATURE_WLAN_CH_AVOID
Abhishek Singhe34eb552015-06-18 10:12:15 +05305073#define SIR_CH_AVOID_MAX_RANGE 15
Leo Chang0b0e45a2013-12-15 15:18:55 -08005074
5075typedef struct sSirChAvoidFreqType
5076{
5077 tANI_U32 startFreq;
5078 tANI_U32 endFreq;
5079} tSirChAvoidFreqType;
5080
5081typedef struct sSirChAvoidIndType
5082{
5083 tANI_U32 avoidRangeCount;
5084 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
5085} tSirChAvoidIndType;
5086#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05305087
c_hpothu92367912014-05-01 15:18:17 +05305088typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
5089 VOS_STATUS status, void *data);
Abhishek Singh08aa7762014-12-16 13:59:03 +05305090typedef void (*tSirFWStatsCallback)(VOS_STATUS status,
5091 tSirFwStatsResult *fwStatsRsp, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05305092typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind);
5093
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305094typedef void (*tAntennaDivSelCB)(int antennaId, void *pContext);
Abhishek Singh7d624e12015-11-30 14:29:27 +05305095
5096/**
5097 * struct sir_sme_mgmt_frame_cb_req - Register a
5098 * management frame callback req
5099 * @message_type: message id
5100 * @length: msg length
5101 * @callback: callback for management frame indication
5102 */
5103struct sir_sme_mgmt_frame_cb_req
5104{
5105 tANI_U16 message_type;
5106 tANI_U16 length;
5107 sir_mgmt_frame_ind_callback callback;
5108};
5109
c_hpothu92367912014-05-01 15:18:17 +05305110typedef PACKED_PRE struct PACKED_POST
5111{
5112 tANI_U32 msgLen;
5113 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
5114 void *callback;
5115 void *data;
5116}tSirBcnMissRateReq;
5117
5118typedef PACKED_PRE struct PACKED_POST
5119{
5120 pGetBcnMissRateCB callback;
5121 void *data;
5122}tSirBcnMissRateInfo;
5123
Sunil Duttc69bccb2014-05-26 21:30:20 +05305124#ifdef WLAN_FEATURE_LINK_LAYER_STATS
5125
5126typedef struct
5127{
5128 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305129 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305130 u32 mpduSizeThreshold;
5131 u32 aggressiveStatisticsGathering;
5132}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
5133
5134typedef struct
5135{
5136 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305137 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305138 u32 paramIdMask;
5139}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
5140
5141typedef struct
5142{
5143 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05305144 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305145 u32 statsClearReqMask;
5146 u8 stopReq;
5147}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
5148
Abhishek Singh3ae443b2014-10-08 11:49:27 +05305149typedef PACKED_PRE struct PACKED_POST
5150{
5151 u32 stats;
5152 tSirFWStatsCallback callback;
5153 void *data;
5154}tSirFWStatsGetReq;
5155
5156typedef PACKED_PRE struct PACKED_POST
5157{
5158 tSirFWStatsCallback callback;
5159 void *data;
5160}tSirFWStatsInfo;
5161
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05305162typedef PACKED_PRE struct PACKED_POST
5163{
5164 tANI_U16 status;
5165 tANI_U32 selectedAntennaId;
5166 tANI_U32 reserved;
5167} tSirAntennaDivSelRsp, *tpSirntennaDivSelRsp;
5168
5169typedef PACKED_PRE struct PACKED_POST
5170{
5171 tAntennaDivSelCB callback;
5172 void *data;
5173 tANI_U32 reserved;
5174}tSirAntennaDiversitySelectionReq;
5175
5176typedef PACKED_PRE struct PACKED_POST
5177{
5178 tAntennaDivSelCB callback;
5179 void *data;
5180}tSirAntennaDiversitySelectionInfo;
5181
Sunil Duttc69bccb2014-05-26 21:30:20 +05305182/*---------------------------------------------------------------------------
5183 WLAN_HAL_LL_NOTIFY_STATS
5184---------------------------------------------------------------------------*/
5185
5186
5187/******************************LINK LAYER Statistics**********************/
5188
5189typedef int tSirWifiRadio;
5190typedef int tSirWifiChannel;
5191typedef int tSirwifiTxRate;
5192
5193/* channel operating width */
5194typedef PACKED_PRE enum PACKED_POST
5195{
5196 WIFI_CHAN_WIDTH_20 = 0,
5197 WIFI_CHAN_WIDTH_40 = 1,
5198 WIFI_CHAN_WIDTH_80 = 2,
5199 WIFI_CHAN_WIDTH_160 = 3,
5200 WIFI_CHAN_WIDTH_80P80 = 4,
5201 WIFI_CHAN_WIDTH_5 = 5,
5202 WIFI_CHAN_WIDTH_10 = 6,
5203} tSirWifiChannelWidth;
5204
5205typedef PACKED_PRE enum PACKED_POST
5206{
5207 WIFI_DISCONNECTED = 0,
5208 WIFI_AUTHENTICATING = 1,
5209 WIFI_ASSOCIATING = 2,
5210 WIFI_ASSOCIATED = 3,
5211 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
5212 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
5213} tSirWifiConnectionState;
5214
5215typedef PACKED_PRE enum PACKED_POST
5216{
5217 WIFI_ROAMING_IDLE = 0,
5218 WIFI_ROAMING_ACTIVE = 1,
5219} tSirWifiRoamState;
5220
5221typedef PACKED_PRE enum PACKED_POST
5222{
Dino Myclec8f3f332014-07-21 16:48:27 +05305223 WIFI_INTERFACE_UNKNOWN = -1,
Sunil Duttc69bccb2014-05-26 21:30:20 +05305224 WIFI_INTERFACE_STA = 0,
5225 WIFI_INTERFACE_SOFTAP = 1,
5226 WIFI_INTERFACE_IBSS = 2,
5227 WIFI_INTERFACE_P2P_CLIENT = 3,
5228 WIFI_INTERFACE_P2P_GO = 4,
5229 WIFI_INTERFACE_NAN = 5,
5230 WIFI_INTERFACE_MESH = 6,
5231 } tSirWifiInterfaceMode;
5232
5233// set for QOS association
5234#define WIFI_CAPABILITY_QOS 0x00000001
5235// set for protected association (802.11 beacon frame control protected bit set)
5236#define WIFI_CAPABILITY_PROTECTED 0x00000002
5237// set if 802.11 Extended Capabilities element interworking bit is set
5238#define WIFI_CAPABILITY_INTERWORKING 0x00000004
5239// set for HS20 association
5240#define WIFI_CAPABILITY_HS20 0x00000008
5241// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
5242#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
5243// set is 802.11 Country Element is present
5244#define WIFI_CAPABILITY_COUNTRY 0x00000020
5245
5246typedef PACKED_PRE struct PACKED_POST
5247{
5248 /*tSirWifiInterfaceMode*/
5249 // interface mode
Dino Myclec8f3f332014-07-21 16:48:27 +05305250 tANI_S8 mode;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305251 // interface mac address (self)
5252 tSirMacAddr macAddr;
5253 /*tSirWifiConnectionState*/
5254 // connection state (valid for STA, CLI only)
5255 tANI_U8 state;
5256 /*tSirWifiRoamState*/
5257 // roaming state
5258 tANI_U8 roaming;
5259 // WIFI_CAPABILITY_XXX (self)
5260 tANI_U32 capabilities;
5261 // null terminated SSID
5262 tANI_U8 ssid[33];
5263 // bssid
5264 tSirMacAddr bssid;
5265 // country string advertised by AP
5266 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
5267 // country string for this association
5268 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
5269} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
5270
5271/* channel information */
5272typedef PACKED_PRE struct PACKED_POST
5273{
5274 // channel width (20, 40, 80, 80+80, 160)
5275 tSirWifiChannelWidth width;
5276 // primary 20 MHz channel
5277 tSirWifiChannel centerFreq;
5278 // center frequency (MHz) first segment
5279 tSirWifiChannel centerFreq0;
5280 // center frequency (MHz) second segment
5281 tSirWifiChannel centerFreq1;
5282} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
5283
5284/* wifi rate info */
5285typedef PACKED_PRE struct PACKED_POST
5286{
5287 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
5288 tANI_U32 preamble :3;
5289 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
5290 tANI_U32 nss :2;
5291 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
5292 tANI_U32 bw :3;
5293 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
5294 // HT/VHT it would be mcs index
5295 tANI_U32 rateMcsIdx :8;
5296 // reserved
5297 tANI_U32 reserved :16;
5298 // units of 100 Kbps
5299 tANI_U32 bitrate;
5300} tSirWifiRate, *tpSirWifiRate;
5301
5302/* channel statistics */
5303typedef PACKED_PRE struct PACKED_POST
5304{
5305 // channel
5306 tSirWifiChannelInfo channel;
5307 // msecs the radio is awake (32 bits number accruing over time)
5308 tANI_U32 onTime;
5309 // msecs the CCA register is busy (32 bits number accruing over time)
5310 tANI_U32 ccaBusyTime;
5311} tSirWifiChannelStats, *tpSirWifiChannelStats;
5312
5313/* radio statistics */
5314typedef PACKED_PRE struct PACKED_POST
5315{
5316 // wifi radio (if multiple radio supported)
5317 tSirWifiRadio radio;
5318 // msecs the radio is awake (32 bits number accruing over time)
5319 tANI_U32 onTime;
5320 /* msecs the radio is transmitting
5321 * (32 bits number accruing over time)
5322 */
5323 tANI_U32 txTime;
5324 /* msecs the radio is in active receive
5325 *(32 bits number accruing over time)
5326 */
5327 tANI_U32 rxTime;
5328 /* msecs the radio is awake due to all scan
5329 * (32 bits number accruing over time)
5330 */
5331 tANI_U32 onTimeScan;
5332 /* msecs the radio is awake due to NAN
5333 * (32 bits number accruing over time)
5334 */
5335 tANI_U32 onTimeNbd;
Dino Mycle2c198072014-06-10 10:15:52 +05305336 /* msecs the radio is awake due to EXTScan
Sunil Duttc69bccb2014-05-26 21:30:20 +05305337 * (32 bits number accruing over time)
5338 */
Dino Mycle2c198072014-06-10 10:15:52 +05305339 tANI_U32 onTimeEXTScan;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305340 /* msecs the radio is awake due to roam?scan
5341 * (32 bits number accruing over time)
5342 */
5343 tANI_U32 onTimeRoamScan;
5344 /* msecs the radio is awake due to PNO scan
5345 * (32 bits number accruing over time)
5346 */
5347 tANI_U32 onTimePnoScan;
5348 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
5349 * (32 bits number accruing over time)
5350 */
5351 tANI_U32 onTimeHs20;
5352 // number of channels
5353 tANI_U32 numChannels;
5354 // channel statistics tSirWifiChannelStats
5355 tSirWifiChannelStats channels[1];
5356} tSirWifiRadioStat, *tpSirWifiRadioStat;
5357
5358/* per rate statistics */
5359typedef PACKED_PRE struct PACKED_POST
5360{
5361 // rate information
5362 tSirWifiRate rate;
5363 // number of successfully transmitted data pkts (ACK rcvd)
5364 tANI_U32 txMpdu;
5365 // number of received data pkts
5366 tANI_U32 rxMpdu;
5367 // number of data packet losses (no ACK)
5368 tANI_U32 mpduLost;
5369 // total number of data pkt retries *
5370 tANI_U32 retries;
5371 // number of short data pkt retries
5372 tANI_U32 retriesShort;
5373 // number of long data pkt retries
5374 tANI_U32 retriesLong;
5375} tSirWifiRateStat, *tpSirWifiRateStat;
5376
5377/* access categories */
5378typedef PACKED_PRE enum PACKED_POST
5379{
5380 WIFI_AC_VO = 0,
5381 WIFI_AC_VI = 1,
5382 WIFI_AC_BE = 2,
5383 WIFI_AC_BK = 3,
5384 WIFI_AC_MAX = 4,
5385} tSirWifiTrafficAc;
5386
5387/* wifi peer type */
5388typedef PACKED_PRE enum PACKED_POST
5389{
5390 WIFI_PEER_STA,
5391 WIFI_PEER_AP,
5392 WIFI_PEER_P2P_GO,
5393 WIFI_PEER_P2P_CLIENT,
5394 WIFI_PEER_NAN,
5395 WIFI_PEER_TDLS,
5396 WIFI_PEER_INVALID,
5397} tSirWifiPeerType;
5398
5399/* per peer statistics */
5400typedef PACKED_PRE struct PACKED_POST
5401{
5402 // peer type (AP, TDLS, GO etc.)
5403 tSirWifiPeerType type;
5404 // mac address
5405 tSirMacAddr peerMacAddress;
5406 // peer WIFI_CAPABILITY_XXX
5407 tANI_U32 capabilities;
5408 // number of rates
5409 tANI_U32 numRate;
5410 // per rate statistics, number of entries = num_rate
5411 tSirWifiRateStat rateStats[1];
5412} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5413
5414/* per access category statistics */
5415typedef PACKED_PRE struct PACKED_POST
5416{
5417 /*tSirWifiTrafficAc*/
5418 // access category (VI, VO, BE, BK)
5419 tANI_U8 ac;
5420 // number of successfully transmitted unicast data pkts (ACK rcvd)
5421 tANI_U32 txMpdu;
5422 // number of received unicast mpdus
5423 tANI_U32 rxMpdu;
5424 // number of succesfully transmitted multicast data packets
5425 // STA case: implies ACK received from AP for the unicast
5426 // packet in which mcast pkt was sent
5427 tANI_U32 txMcast;
5428 // number of received multicast data packets
5429 tANI_U32 rxMcast;
5430 // number of received unicast a-mpdus
5431 tANI_U32 rxAmpdu;
5432 // number of transmitted unicast a-mpdus
5433 tANI_U32 txAmpdu;
5434 // number of data pkt losses (no ACK)
5435 tANI_U32 mpduLost;
5436 // total number of data pkt retries
5437 tANI_U32 retries;
5438 // number of short data pkt retries
5439 tANI_U32 retriesShort;
5440 // number of long data pkt retries
5441 tANI_U32 retriesLong;
5442 // data pkt min contention time (usecs)
5443 tANI_U32 contentionTimeMin;
5444 // data pkt max contention time (usecs)
5445 tANI_U32 contentionTimeMax;
5446 // data pkt avg contention time (usecs)
5447 tANI_U32 contentionTimeAvg;
5448 // num of data pkts used for contention statistics
5449 tANI_U32 contentionNumSamples;
5450} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5451
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305452#ifdef FEATURE_EXT_LL_STAT
5453typedef PACKED_PRE struct PACKED_POST
5454{
5455 /* Average Beacon spread offset is the averaged
5456 * time delay between TBTT and beacon TSF
5457 */
5458 tANI_U64 avg_bcn_spread;
5459 /* Average number of frames received from AP after
5460 * receiving the ACK for a frame with PM=1
5461 */
5462 tANI_U32 avg_rx_frms_leaked;
5463 /* Rx leak watch window currently in force to minimize data loss
5464 * because of leaky AP. Rx leak window is the time driver waits
5465 * before shutting down the radio or switching the channel and
5466 * after receiving an ACK for a data frame with PM bit set)
5467 */
5468 tANI_U32 rx_leak_window;
5469
5470 /* Takes value of 1 if AP leaks packets after sending
5471 * an ACK for PM=1 otherwise 0
5472 */
5473 tANI_U32 is_leaky_ap;
5474
5475} tSirWifiIfaceLeakyApStat, *tpSirWifiIfaceLeakyApStat;
5476#endif
5477
Sunil Duttc69bccb2014-05-26 21:30:20 +05305478/* Interface statistics - corresponding to 2nd most
5479 * LSB in wifi statistics bitmap for getting statistics
5480 */
5481typedef PACKED_PRE struct PACKED_POST
5482{
5483 // current state of the interface
5484 tSirWifiInterfaceInfo info;
5485 // access point beacon received count from connected AP
5486 tANI_U32 beaconRx;
5487 // access point mgmt frames received count from
5488 // connected AP (including Beacon)
5489 tANI_U32 mgmtRx;
5490 // action frames received count
5491 tANI_U32 mgmtActionRx;
5492 // action frames transmit count
5493 tANI_U32 mgmtActionTx;
5494 // access Point Beacon and Management frames RSSI (averaged)
Dino Mycle3b9536d2014-07-09 22:05:24 +05305495 tANI_S32 rssiMgmt;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305496 // access Point Data Frames RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305497 tANI_S32 rssiData;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305498 // access Point ACK RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305499 tANI_S32 rssiAck;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305500 // per ac data packet statistics
5501 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
Mukul Sharmaf1bd9322015-10-20 16:03:42 +05305502#ifdef FEATURE_EXT_LL_STAT
5503 //Leaky Ap Stats
5504 tSirWifiIfaceLeakyApStat leakyApStat;
5505#endif
Sunil Duttc69bccb2014-05-26 21:30:20 +05305506} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5507
5508/* Peer statistics - corresponding to 3rd most LSB in
5509 * wifi statistics bitmap for getting statistics
5510 */
5511typedef PACKED_PRE struct PACKED_POST
5512{
5513 // number of peers
5514 tANI_U32 numPeers;
5515 // per peer statistics
5516 tSirWifiPeerInfo peerInfo[1];
5517} tSirWifiPeerStat, *tpSirWifiPeerStat;
5518
5519/* wifi statistics bitmap for getting statistics */
5520#define WMI_LINK_STATS_RADIO 0x00000001
5521#define WMI_LINK_STATS_IFACE 0x00000002
5522#define WMI_LINK_STATS_ALL_PEER 0x00000004
5523#define WMI_LINK_STATS_PER_PEER 0x00000008
5524
5525/* wifi statistics bitmap for clearing statistics */
5526// all radio statistics
5527#define WIFI_STATS_RADIO 0x00000001
5528// cca_busy_time (within radio statistics)
5529#define WIFI_STATS_RADIO_CCA 0x00000002
5530// all channel statistics (within radio statistics)
5531#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5532// all scan statistics (within radio statistics)
5533#define WIFI_STATS_RADIO_SCAN 0x00000008
5534// all interface statistics
5535#define WIFI_STATS_IFACE 0x00000010
5536// all tx rate statistics (within interface statistics)
5537#define WIFI_STATS_IFACE_TXRATE 0x00000020
5538// all ac statistics (within interface statistics)
5539#define WIFI_STATS_IFACE_AC 0x00000040
5540// all contention (min, max, avg) statistics (within ac statistics)
5541#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5542
5543typedef PACKED_PRE struct PACKED_POST
5544{
5545 tANI_U32 paramId;
5546 tANI_U8 ifaceId;
5547 tANI_U32 respId;
5548 tANI_U32 moreResultToFollow;
5549 tANI_U8 result[1];
5550} tSirLLStatsResults, *tpSirLLStatsResults;
5551
5552#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5553
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05305554
5555
Dino Mycle2c198072014-06-10 10:15:52 +05305556#ifdef WLAN_FEATURE_EXTSCAN
5557
5558typedef enum
5559{
5560 WIFI_BAND_UNSPECIFIED,
5561 WIFI_BAND_BG = 1, // 2.4 GHz
5562 WIFI_BAND_A = 2, // 5 GHz without DFS
5563 WIFI_BAND_ABG = 3, // 2.4 GHz + 5 GHz; no DFS
5564 WIFI_BAND_A_DFS_ONLY = 4, // 5 GHz DFS only
5565 // 5 is reserved
5566 WIFI_BAND_A_WITH_DFS = 6, // 5 GHz with DFS
5567 WIFI_BAND_ABG_WITH_DFS = 7, // 2.4 GHz + 5 GHz with DFS
5568
5569 /* Keep it last */
5570 WIFI_BAND_MAX
5571} tWifiBand;
5572
5573/* wifi scan related events */
5574typedef enum
5575{
5576 WIFI_SCAN_BUFFER_FULL,
5577 WIFI_SCAN_COMPLETE,
5578} tWifiScanEventType;
5579
5580typedef struct
5581{
5582 tSirMacAddr bssid; // AP BSSID
5583 tANI_S32 low; // low threshold
5584 tANI_S32 high; // high threshold
Dino Mycle2c198072014-06-10 10:15:52 +05305585} tSirAPThresholdParam, *tpSirAPThresholdParam;
5586
5587typedef struct
5588{
5589 tANI_U32 requestId;
5590 tANI_U8 sessionId;
5591} tSirGetEXTScanCapabilitiesReqParams, *tpSirGetEXTScanCapabilitiesReqParams;
5592
5593typedef struct
5594{
5595 tANI_U32 requestId;
5596 tANI_U32 status;
5597
5598 tANI_U32 scanCacheSize;
5599 tANI_U32 scanBuckets;
5600 tANI_U32 maxApPerScan;
5601 tANI_U32 maxRssiSampleSize;
5602 tANI_U32 maxScanReportingThreshold;
5603
5604 tANI_U32 maxHotlistAPs;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305605 tANI_U32 maxHotlistSSIDs;
Dino Mycle2c198072014-06-10 10:15:52 +05305606
5607 tANI_U32 maxBsidHistoryEntries;
Padma, Santhosh Kumara1aa4a32015-06-19 19:00:46 +05305608
Dino Mycle2c198072014-06-10 10:15:52 +05305609} tSirEXTScanCapabilitiesEvent, *tpSirEXTScanCapabilitiesEvent;
5610
5611/* WLAN_HAL_EXT_SCAN_RESULT_IND */
5612typedef struct
5613{
5614 tANI_U32 requestId;
5615 tANI_U8 sessionId;
5616
5617 /*
5618 * 1 return cached results and flush it
5619 * 0 return cached results and do not flush
5620 */
5621 tANI_BOOLEAN flush;
5622} tSirEXTScanGetCachedResultsReqParams, *tpSirEXTScanGetCachedResultsReqParams;
5623
5624typedef PACKED_PRE struct PACKED_POST
5625{
5626 tANI_U32 requestId;
5627 tANI_U32 status;
5628} tSirEXTScanGetCachedResultsRspParams, *tpSirEXTScanGetCachedResultsRspParams;
5629
5630typedef PACKED_PRE struct PACKED_POST
5631{
5632 tANI_U64 ts; // time of discovery
5633 tANI_U8 ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; // null terminated SSID
5634 tSirMacAddr bssid; // BSSID
5635 tANI_U32 channel; // channel frequency in MHz
5636 tANI_S32 rssi; // RSSI in dBm
5637 tANI_U32 rtt; // RTT in nanoseconds
5638 tANI_U32 rtt_sd; // standard deviation in rtt
5639 tANI_U16 beaconPeriod; // period advertised in the beacon
5640 tANI_U16 capability; // capabilities advertised in the beacon
5641} tSirWifiScanResult, *tpSirWifiScanResult;
5642
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305643/**
5644 * struct tExtscanCachedScanResult - extscan cached scan result
5645 * @scan_id: a unique identifier for the scan unit
5646 * @flags: a bitmask with additional information about scan
5647 * @num_results: number of bssids retrieved by the scan
5648 * @ap: wifi scan bssid results info
5649 */
5650
5651typedef PACKED_PRE struct PACKED_POST
5652{
5653 tANI_U16 scan_id;
5654 tANI_U8 flags;
5655 tANI_U8 num_results;
5656
5657 tSirWifiScanResult ap[32];
5658} tExtscanCachedScanResult, *tpExtscanCachedScanResult;
5659
Dino Mycle2c198072014-06-10 10:15:52 +05305660/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
5661
5662typedef PACKED_PRE struct PACKED_POST
5663{
5664 tANI_U32 requestId;
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305665 tANI_BOOLEAN bss_found;
5666 tANI_U32 numHotlistBss; // numbers of APs
5667
5668 /*
5669 * 0 for last fragment
5670 * 1 still more fragment(s) coming
5671 */
5672 tANI_BOOLEAN moreData;
5673 tSirWifiScanResult bssHotlist[1];
5674} tSirEXTScanHotlistMatch, *tpSirEXTScanHotlistMatch;
5675
Anurag Chouhan83026002016-12-13 22:46:21 +05305676#ifdef DHCP_SERVER_OFFLOAD
5677/**
5678 * sir_dhcp_srv_offload_info_t - dhcp server offload info
5679 * @bssidx: bss index
5680 * @dhcp_srv_offload_enabled: enable or disable
5681 * @dhcp_client_num: number of clients supported
5682 * @dhcp_srv_ip: server ip address
5683 * @start_lsb: lsb of start address of dhcp pool
5684 */
5685typedef struct
5686{
5687 tANI_U8 bssidx;
5688 tANI_U32 dhcp_srv_offload_enabled;
5689 tANI_U32 dhcp_client_num;
5690 tANI_U32 dhcp_srv_ip;
5691 tANI_U32 start_lsb;
5692 dhcp_offload_req_cb dhcp_offload_callback;
5693 void *dhcp_server_offload_cb_context;
5694} sir_dhcp_srv_offload_info_t, *sir_dhcp_srv_offload_info;
5695#endif /* DHCP_SERVER_OFFLOAD */
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305696
Anurag Chouhan0b29de02016-12-16 13:18:40 +05305697#ifdef MDNS_OFFLOAD
5698#define MAX_MDNS_FQDN_LEN 64
5699#define MAX_MDNS_RESP_LEN 512
5700
5701typedef struct
5702{
5703 tANI_U8 bss_idx;
5704 tANI_U32 enable;
5705 mdns_enable_req_cb mdns_enable_callback;
5706 void *mdns_enable_cb_context;
5707} sir_mdns_offload_info_t, *sir_mdns_offload_info;
5708
5709typedef struct
5710{
5711 tANI_U8 bss_idx;
5712 tANI_U32 fqdn_type;
5713 tANI_U32 fqdn_len;
5714 tANI_U8 fqdn_data[MAX_MDNS_FQDN_LEN];
5715 mdns_fqdn_req_cb mdns_fqdn_callback;
5716 void *mdns_fqdn_cb_context;
5717
5718} sir_mdns_fqdn_info_t, *sir_mdns_fqdn_info;
5719
5720typedef struct
5721{
5722 tANI_U8 bss_idx;
5723 tANI_U32 resourceRecord_count;
5724 tANI_U32 resp_len;
5725 tANI_U8 resp_data[MAX_MDNS_RESP_LEN];
5726 mdns_resp_req_cb mdns_resp_callback;
5727 void *mdns_resp_cb_context;
5728} sir_mdns_resp_info_t, *sir_mdns_resp_info;
5729
5730typedef struct
5731{
5732 tANI_U8 bss_idx;
5733} sir_get_mdns_stats_info_t, *sir_get_mdns_stats_info;
5734#endif /* MDNS_OFFLOAD */
5735
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305736typedef PACKED_PRE struct PACKED_POST
5737{
5738 tANI_U32 requestId;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305739 /*
5740 * It gives number of scan ids
5741 */
5742 tANI_U32 scanResultSize;
Dino Mycle2c198072014-06-10 10:15:52 +05305743
5744 /*
5745 * 0 for last fragment
5746 * 1 still more fragment(s) coming
5747 */
5748 tANI_BOOLEAN moreData;
Padma, Santhosh Kumare1b8a942015-08-25 12:44:24 +05305749 tANI_U8 result[1];
Dino Mycle2c198072014-06-10 10:15:52 +05305750} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
5751
5752typedef PACKED_PRE struct PACKED_POST
5753{
5754 tANI_U8 elemId; // Element Identifier
5755 tANI_U8 ieLength; // length of IE data
5756 tANI_U8 *IEs; // IEs
5757} tSirInformationElement, *tpSirInformationElement;
5758
5759/* Reported when each probe response is received, if reportEvents
5760* enabled in tSirWifiScanCmdReqParams */
5761typedef struct
5762{
5763 tANI_U32 requestId;
5764
5765 /*
5766 * 0 for last fragment
5767 * 1 still more fragment(s) coming
5768 */
5769 tANI_BOOLEAN moreData;
5770 tSirWifiScanResult ap; // only 1 AP info for now
5771 tANI_U32 ieLength;
5772 tSirInformationElement *ie;
5773} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
5774
5775
5776typedef struct
5777{
5778 tANI_U32 channel; // frequency
5779 tANI_U32 dwellTimeMs; // dwell time hint
5780 tANI_U8 passive; // 0 => active,
5781 // 1 => passive scan; ignored for DFS
5782 tANI_U8 chnlClass;
5783} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
5784
5785typedef struct
5786{
5787 tANI_U8 bucket; // bucket index, 0 based
5788 tWifiBand band; // when UNSPECIFIED, use channel list
5789
5790 /*
5791 * desired period, in millisecond; if this is too
5792 * low, the firmware should choose to generate results as fast as
5793 * it can instead of failing the command byte
5794 */
5795 tANI_U32 period;
5796
5797 /*
5798 * 0 => normal reporting (reporting rssi history
5799 * only, when rssi history buffer is % full)
5800 * 1 => same as 0 + report a scan completion event after scanning
5801 * this bucket
5802 * 2 => same as 1 + forward scan results (beacons/probe responses + IEs)
5803 * in real time to HAL
5804 */
5805 tANI_U8 reportEvents;
5806
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305807 tANI_U32 max_period;
5808 tANI_U32 exponent;
5809 tANI_U32 step_count;
5810
Dino Mycle2c198072014-06-10 10:15:52 +05305811 tANI_U8 numChannels;
5812
5813 /*
5814 * channels to scan; these may include DFS channels
5815 */
5816 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
5817} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
5818
5819typedef struct
5820{
5821 tANI_U32 requestId;
5822 tANI_U8 sessionId;
5823 tANI_U32 basePeriod; // base timer period
5824 tANI_U32 maxAPperScan;
5825
5826 /* in %, when buffer is this much full, wake up host */
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305827 tANI_U32 reportThresholdPercent;
5828 tANI_U32 reportThresholdNumScans;
Dino Mycle2c198072014-06-10 10:15:52 +05305829
Padma, Santhosh Kumar7b9190d2015-08-17 17:45:29 +05305830 tANI_U32 homeAwayTime; //in units of milliseconds
5831
5832 tANI_U8 numBuckets;
Dino Mycle2c198072014-06-10 10:15:52 +05305833 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
5834} tSirEXTScanStartReqParams, *tpSirEXTScanStartReqParams;
5835
5836typedef PACKED_PRE struct PACKED_POST
5837{
5838 tANI_U32 requestId;
5839 tANI_U32 status;
5840} tSirEXTScanStartRspParams, *tpSirEXTScanStartRspParams;
5841
5842typedef struct
5843{
5844 tANI_U32 requestId;
5845 tANI_U8 sessionId;
5846} tSirEXTScanStopReqParams, *tpSirEXTScanStopReqParams;
5847
5848typedef PACKED_PRE struct PACKED_POST
5849{
5850 tANI_U32 requestId;
5851 tANI_U32 status;
5852} tSirEXTScanStopRspParams, *tpSirEXTScanStopRspParams;
5853
5854typedef struct
5855{
5856 tANI_U32 requestId;
5857 tANI_U8 sessionId; // session Id mapped to vdev_id
Padma, Santhosh Kumar37f4fd12015-08-19 14:37:37 +05305858 tANI_U32 lostBssidSampleSize;
5859 tANI_U32 numBssid; // number of hotlist APs
Dino Mycle2c198072014-06-10 10:15:52 +05305860 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; // hotlist APs
5861} tSirEXTScanSetBssidHotListReqParams, *tpSirEXTScanSetBssidHotListReqParams;
5862
5863typedef PACKED_PRE struct PACKED_POST
5864{
5865 tANI_U32 requestId;
5866 tANI_U32 status;
5867} tSirEXTScanSetBssidHotListRspParams, *tpSirEXTScanSetBssidHotListRspParams;
5868
5869typedef struct
5870{
5871 tANI_U32 requestId;
5872 tANI_U8 sessionId;
5873} tSirEXTScanResetBssidHotlistReqParams, *tpSirEXTScanResetBssidHotlistReqParams;
5874
5875typedef PACKED_PRE struct PACKED_POST
5876{
5877 tANI_U32 requestId;
5878 tANI_U32 status;
5879} tSirEXTScanResetBssidHotlistRspParams, *tpSirEXTScanResetBssidHotlistRspParams;
5880
Dino Mycle2c198072014-06-10 10:15:52 +05305881/*---------------------------------------------------------------------------
5882 * * WLAN_HAL_EXTSCAN_RESULT_AVAILABLE_IND
5883 * *-------------------------------------------------------------------------*/
5884typedef PACKED_PRE struct PACKED_POST
5885{
5886 tANI_U32 requestId;
5887 tANI_U32 numResultsAvailable;
5888} tSirEXTScanResultsAvailableIndParams,
5889 *tpSirEXTScanResultsAvailableIndParams;
5890
5891typedef PACKED_PRE struct PACKED_POST
5892{
5893 tANI_U8 scanEventType;
5894 tANI_U32 status;
5895} tSirEXTScanOnScanEventIndParams,
5896 *tpSirEXTScanOnScanEventIndParams;
5897
5898/*---------------------------------------------------------------------------
5899 * * WLAN_HAL_EXTSCAN_PROGRESS_IND
5900 * *-------------------------------------------------------------------------*/
5901
5902typedef PACKED_PRE enum PACKED_POST
5903{
5904 WLAN_HAL_EXTSCAN_BUFFER_FULL,
5905 WLAN_HAL_EXTSCAN_COMPLETE,
5906}tSirEXTScanProgressEventType;
5907
5908typedef PACKED_PRE struct PACKED_POST
5909{
5910 tANI_U32 requestId;
5911 tANI_U32 status;
5912 tSirEXTScanProgressEventType extScanEventType;
5913}tSirEXTScanProgressIndParams,
5914 *tpSirEXTScanProgressIndParams;
5915
Padma, Santhosh Kumarc1f7f052015-08-26 12:29:01 +05305916typedef PACKED_PRE struct PACKED_POST
5917{
5918 tANI_BOOLEAN pause; // 1 -> pause, 0 -> unpause
5919 tANI_U32 reserved; //reserved for future use
5920}tSirHighPriorityDataInfoInd, *tpSirHighPriorityDataInfoInd;
Dino Mycle2c198072014-06-10 10:15:52 +05305921
5922#endif /* WLAN_FEATURE_EXTSCAN */
5923
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +05305924typedef struct
5925{
5926 tANI_U16 messageType;
5927 tANI_U16 length;
5928 tSirMacAddr macAddr;
5929} tSirSpoofMacAddrReq, *tpSirSpoofMacAddrReq;
5930
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05305931typedef struct
5932{
5933 //BIT order is most likely little endian.
5934 //This structure is for netowkr-order byte array (or big-endian byte order)
5935#ifndef WLAN_PAL_BIG_ENDIAN_BIT
5936 tANI_U8 protVer :2;
5937 tANI_U8 type :2;
5938 tANI_U8 subType :4;
5939
5940 tANI_U8 toDS :1;
5941 tANI_U8 fromDS :1;
5942 tANI_U8 moreFrag :1;
5943 tANI_U8 retry :1;
5944 tANI_U8 powerMgmt :1;
5945 tANI_U8 moreData :1;
5946 tANI_U8 wep :1;
5947 tANI_U8 order :1;
5948
5949#else
5950
5951 tANI_U8 subType :4;
5952 tANI_U8 type :2;
5953 tANI_U8 protVer :2;
5954
5955 tANI_U8 order :1;
5956 tANI_U8 wep :1;
5957 tANI_U8 moreData :1;
5958 tANI_U8 powerMgmt :1;
5959 tANI_U8 retry :1;
5960 tANI_U8 moreFrag :1;
5961 tANI_U8 fromDS :1;
5962 tANI_U8 toDS :1;
5963
5964#endif
5965
5966} tSirFC;
5967
5968typedef struct
5969{
5970 /* Frame control field */
5971 tSirFC frameCtrl;
5972 /* Duration ID */
5973 tANI_U16 usDurationId;
5974 /* Address 1 field */
5975 tSirMacAddr vA1;
5976 /* Address 2 field */
5977 tSirMacAddr vA2;
5978 /* Address 3 field */
5979 tSirMacAddr vA3;
5980 /* Sequence control field */
5981 tANI_U16 sSeqCtrl;
5982 /* Optional A4 address */
5983 tSirMacAddr optvA4;
5984 /* Optional QOS control field */
5985 tANI_U16 usQosCtrl;
5986}tSir80211Header;
5987// Definition for Encryption Keys
5988//typedef struct sSirKeys
5989typedef struct
5990{
5991 tANI_U8 keyId;
5992 tANI_U8 unicast; // 0 for multicast
5993 tAniKeyDirection keyDirection;
5994 tANI_U8 keyRsc[WLAN_MAX_KEY_RSC_LEN]; // Usage is unknown
5995 tANI_U8 paeRole; // =1 for authenticator,
5996 // =0 for supplicant
5997 tANI_U16 keyLength;
5998 tANI_U8 key[SIR_MAC_MAX_KEY_LENGTH];
5999} tMacKeys, *tpMacKeys;
6000
6001typedef enum
6002{
6003 eMAC_WEP_STATIC,
6004 eMAC_WEP_DYNAMIC,
6005} tMacWepType;
6006
6007/*
6008 * This is used by PE to configure the key information on a given station.
6009 * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
6010 * a preconfigured key from a BSS the station assoicated with; otherwise
6011 * a new key descriptor is created based on the key field.
6012 */
6013//typedef struct
6014typedef struct
6015{
6016 tANI_U16 staIdx;
6017 tAniEdType encType; // Encryption/Decryption type
6018 tMacWepType wepType; // valid only for WEP
6019 tANI_U8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
6020 tMacKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
6021 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
6022 tANI_U8 sessionId; // PE session id for PE<->HAL interface
6023} tSirSetStaKeyParams, *tpSirSetStaKeyParams;
6024
6025//typedef struct
6026typedef struct
6027{
6028 tSirSetStaKeyParams keyParams;
6029 tANI_U8 pn[6];
6030}tSirencConfigParams;
6031
6032typedef struct
6033{
6034 tANI_U16 length;
6035 tANI_U8 data[WLAN_DISA_MAX_PAYLOAD_SIZE];
6036}tSirpayload;
6037
6038typedef struct
6039{
6040 tSir80211Header macHeader;
6041 tSirencConfigParams encParams;
6042 tSirpayload data;
6043}tSirpkt80211;
6044
6045typedef struct
6046{
6047 tANI_U32 status;
6048 tSirpayload encryptedPayload;
6049} tSetEncryptedDataRspParams, *tpSetEncryptedDataRspParams;
6050
6051typedef struct
6052{
6053 tANI_U16 mesgType;
6054 tANI_U16 mesgLen;
6055 tSetEncryptedDataRspParams encryptedDataRsp;
6056} tSirEncryptedDataRspParams, *tpSirEncryptedDataRspParams;
c_hpothua3d45d52015-01-05 14:11:17 +05306057
6058typedef enum eSirAbortScanStatus
6059{
6060 eSIR_ABORT_ACTIVE_SCAN_LIST_EMPTY,
6061 eSIR_ABORT_ACTIVE_SCAN_LIST_NOT_EMPTY,
6062 eSIR_ABORT_SCAN_FAILURE
6063}tSirAbortScanStatus;
6064
Masti, Narayanraddi4b359dd2015-02-03 15:49:29 +05306065/* Max number of rates allowed in Supported Rates IE */
6066#define MAX_NUM_SUPPORTED_RATES (8)
6067
Girish Gowlia95daca2015-02-04 20:31:31 +05306068typedef struct sSirSmeUpdateMaxRateParams
6069{
6070 tANI_U32 maxRateFlag;
6071 tANI_U8 smeSessionId;
6072}tSirSmeUpdateMaxRateParams, *tpSirSmeUpdateMaxRateParams;
6073
Srinivas Dasari32a79262015-02-19 13:04:49 +05306074typedef struct
6075{
6076 tANI_U32 event_data_len;
6077 tANI_U8 event_data[1];
6078} tSirNanEvent, *tpSirNanEvent;
Ganesh Kondabattinib18b3292015-03-16 16:59:26 +05306079
6080typedef struct
6081{
6082 tANI_U32 txCompleteStatus;
6083 tANI_U32 txBdToken;
6084}tSirTxBdStatus, *tpSirTxBdStatus;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05306085
6086/* enable or disable 20_40 BSS Coexistence IE in TDLS frames*/
6087typedef struct
6088{
6089 // Common for all types are requests
6090 tANI_U16 msgType; // message type is same as the request type
6091 tANI_U16 msgLen; // length of the entire request
6092 tANI_U8 SetTdls2040BSSCoex; //enabled or disabled
6093} tAniSetTdls2040BSSCoex, *tpAniSetTdls2040BSSCoex;
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05306094
Sushant Kaushik8e644982015-09-23 12:18:54 +05306095/**
6096 * struct sir_wifi_start_log - Structure to store the params sent to start/
6097 * stop logging
6098 * @ringId: Attribute which indicates the type of logging like per packet
6099 * statistics, connectivity etc.
6100 * @verboseLevel: Verbose level which can be 0,1,2,3
6101 * @flag: Flag field for future use
6102 */
6103typedef struct sir_wifi_start_log {
6104 tANI_U32 ringId;
6105 tANI_U32 verboseLevel;
6106 tANI_U32 flag;
6107}tAniWifiStartLog, *tpAniWifiStartLog;
6108
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05306109typedef struct
6110{
6111 tANI_U16 mesgType;
6112 tANI_U16 mesgLen;
6113 tSirMacAddr bssid;
6114}tSirDelAllTdlsPeers, *ptSirDelAllTdlsPeers;
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306115
Hanumanth Reddy Pothulab8be9ab2018-04-12 20:03:05 +05306116typedef void (*tSirMonModeCb)(void *context);
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306117typedef struct
6118{
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306119 void *data;
Hanumanth Reddy Pothulab8be9ab2018-04-12 20:03:05 +05306120 void *context;
Hanumantha Reddy Pothula91cdd7f2015-09-03 21:25:16 +05306121 tSirMonModeCb callback;
6122}tSirMonModeReq, *ptSirMonModeReq;
c_manjeecfd1efb2015-09-25 19:32:34 +05306123
6124/**
6125 * struct tAniFwrDumpRsp - firmware dump response details.
6126 *
6127 * This structure is used to store the firmware dump
6128 * response from the firmware.
6129 */
6130typedef struct
6131{
6132 tANI_U32 dump_status;
6133}tAniFwrDumpRsp, *tpAniFwrDumpRsp;
6134
6135typedef void (*FWMemDumpReqCb)(void *fwMemDumpReqContext, tAniFwrDumpRsp *dump_rsp);
6136
6137/**
6138 * struct tAniFwrDumpReq - firmware memory dump request details.
6139.*.@FWMemDumpReqCb - Associated Callback
6140 *.@fwMemDumpReqContext - Callback context
6141 * @reserved - reserved field 1.
6142 *
6143 * This structure carries information about the firmware
6144 * memory dump request.
6145 */
6146typedef struct
6147{
6148 FWMemDumpReqCb fwMemDumpReqCallback;
6149 void * fwMemDumpReqContext;
6150 tANI_U32 reserved1;
6151}tAniFwrDumpReq, *tpAniFwrDumpReq;
6152
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05306153/**
6154* struct tSetWifiConfigParams - Structure to store the wificonfig related params
6155* @paramType: 1. Average Stats factor 2. Guard type
6156* @paramvalue: Value to be set in the firmware.
6157* @bssId: macaddr of the connected BssId
6158*/
6159typedef struct
6160{
6161 tANI_U8 paramType;
6162 tANI_U8 sessionId;
6163 tANI_U32 paramValue;
6164 tSirMacAddr bssId;
6165} tSetWifiConfigParams, *tpSetWifiConfigParams;
6166
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306167typedef struct {
6168 tANI_U8 param;
6169 tANI_U32 value;
6170} tModifyRoamParamsReqParams, * tpModifyRoamParamsReqParams;
6171
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306172#ifdef SAP_AUTH_OFFLOAD
6173/* 80211 Pre-Share Key length */
6174#define SIR_PSK_MAX_LEN 64
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05306175
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306176/**
6177 * enum tSirSecurityType - definition for Software AP Auth Offload
6178 * Security Type
6179 * @eSIR_OFFLOAD_NONE: None type security
6180 * @eSIR_OFFLOAD_WPA2PSK_CCMP: WPA2-PSK
6181 */
6182enum tSirSecurityType
6183{
6184 eSIR_OFFLOAD_NONE,
6185 eSIR_OFFLOAD_WPA2PSK_CCMP,
6186};
6187
6188/**
6189 * struct tSirSapOffloadInfo - Structure to store sap offload related params.
6190 * @macAddr: Self mac address
6191 * @sap_auth_offload_enable: tell if sap auth offload is enabled or not.
6192 * @sap_auth_offload_sec_type: tells security type
6193 * 0 - none
6194 * 1 - WPA1-PSK
6195 * @key_len: psk key length
6196 * @key: psk key.
6197 */
6198struct tSirSapOffloadInfo
6199{
6200 tSirMacAddr macAddr;
6201 bool sap_auth_offload_enable;
6202 uint32_t sap_auth_offload_sec_type;
6203 uint32_t key_len;
6204 uint8_t key[SIR_PSK_MAX_LEN];
6205};
Agrawal Ashisha8e8a722016-10-18 19:07:45 +05306206
6207typedef PACKED_PRE struct PACKED_POST
6208{
6209 /** staId returned from firmware for each STA association to SAP */
6210 tANI_U8 staIdx;
6211 /** bssIdx on which the STA is added */
6212 tANI_U8 bssIdx;
6213 /** DPU desc index of this station */
6214 tANI_U8 dpuIndex;
6215 /** Bcast DPU index of this station */
6216 tANI_U8 bcastDpuIndex;
6217 /** Bcast DPU Management index of this station */
6218 tANI_U8 bcastMgmtDpuIdx;
6219
6220 tANI_U8 ucUcastSig;
6221
6222 tANI_U8 ucBcastSig;
6223
6224 tANI_U8 ucMgmtSig;
6225 /** aid (association id) of this station */
6226 tANI_U32 assoc_id;
6227 /** peer station's mac addr */
6228 tSirMacAddr peer_macaddr;
6229 /** length of association request frame */
6230 tANI_U32 data_len;
6231 /* Following this structure is the byte stream of a whole
6232 * association request frame of length data_len
6233 */
6234 tANI_U8 bufp[1];
6235} tSapOfldAddStaIndMsg, *tpSapOfldAddStaIndMsg;
6236
6237typedef enum
6238{
6239 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
6240 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
6241} eSapOfldDelStaFlags;
6242
6243typedef PACKED_PRE struct PACKED_POST
6244{
6245 tANI_U32 staIdx;
6246 /** bssIdx on which the STA is added */
6247 tANI_U32 bssIdx;
6248 /** aid (association id) of this station */
6249 tANI_U32 assoc_id;
6250 /** peer station's mac addr */
6251 tSirMacAddr peer_macaddr;
6252 /** disassociation reason */
6253 tANI_U32 reason;
6254 /** flags - wmi_sap_ofl_del_sta_flags */
6255 tANI_U32 flags;
6256} tSapOfldDelStaIndMsg, *tpSapOfldDelStaIndMsg;
6257
6258typedef enum
6259{
6260 SAP_OFFLOAD_ADD_STA_IND = 0x00,
6261 SAP_OFFLOAD_DEL_STA_IND = 0x01,
6262} eSapOfldIndType;
6263
6264typedef PACKED_PRE struct PACKED_POST
6265{
6266 /* indType will be from eSapOfldIndType */
6267 tANI_U32 indType;
6268 /* size of this array will be depend on the indication type.
6269 * Indication type can be either ADD_STA_IND or DEL_STA_IND.
6270 * If indication type is ADD_STA_IND, size of this indication
6271 * array will be sizeof(tSapOfldDelStaIndMsg)
6272 * and if indication type is DEL_STA_IND, size of this indication
6273 * arrary will be sizeof(tSapOfldAddStaIndMsg)
6274 */
6275 tANI_U8 indication[1];
6276} tSapOfldInd;
6277
6278typedef PACKED_PRE struct PACKED_POST
6279{
6280 tANI_U32 num_indications;
6281 /* size of this array will be depend on the number of indications.*/
6282 tSapOfldInd indications[1];
6283}tSapOfldIndications;
6284
Agrawal Ashish17ef5082016-10-17 18:33:21 +05306285#endif /* SAP_AUTH_OFFLOAD */
Agrawal Ashisha8e8a722016-10-18 19:07:45 +05306286
Manjeet Singh3ed79242017-01-11 19:04:32 +05306287/**
6288 * struct stsf - the basic stsf structure
6289 *
6290 * @session_id: session id from adapter
6291 * @set_req: set/get request flag.
6292 * @tsf_low: low 32bits of tsf
6293 * @tsf_high: high 32bits of tsf
6294 *
6295 * driver use this struct to store the tsf info
6296 */
6297struct stsf {
6298 uint32_t session_id;
6299 bool set_tsf_req;
6300 uint32_t tsf_low;
6301 uint32_t tsf_high;
6302 bool tsf_req_status;
6303};
6304
6305typedef int(*tsf_rsp_cb)(void *tsf_ctx, struct stsf *pTsf);
6306
6307/**
6308 * struct tCapTsfParams - capture tsf request
6309 * @bss_idx: bss index, SAP/STA
6310 * @session_id: adapter session id
6311 * @bssid: bssid for SAP/STA
6312 * @tsf_rsp_cb_func : handler for tsf rsp from fw
6313 * @tsf_rsp_cb_ctx : hdd ctx for tsf rsp handler
6314 */
6315typedef struct {
6316 tANI_U8 bss_idx;
6317 tANI_U8 session_id;
6318 tSirMacAddr bssid;
6319 tsf_rsp_cb tsf_rsp_cb_func;
6320 void * tsf_rsp_cb_ctx;
6321}tSirCapTsfParams,*tpSirCapTsfParams;
6322
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05306323#ifdef WLAN_FEATURE_LFR_MBB
6324
6325/**
6326 * enum csr_roam_op_code - Operation to be done by the callback.
6327 * @SIR_ROAMING_DEREGISTER_STA: Deregister the old STA after roaming.
6328 * @SIR_STOP_ROAM_OFFLOAD_SCAN : sends RSO stop
6329 * @SIR_PREPARE_REASSOC_REQ: prepares reassoc request
6330 */
6331enum csr_roam_op_code {
6332 SIR_ROAMING_DEREGISTER_STA,
6333 SIR_STOP_ROAM_OFFLOAD_SCAN,
6334 SIR_PREPARE_REASSOC_REQ,
6335};
Padma, Santhosh Kumar9f729552017-01-09 14:06:30 +05306336
6337/**
6338 * enum sir_roam_cleanup_type - Type of cleanup needs to be performed.
6339 * @SIR_MBB_DISCONNECTED: Entire CSR cleanup for connected AP
6340 * needs to be performed
6341 * @SIR_MBB_CONNECTED: No need to perform CSR cleanup for connected AP.
6342 */
6343enum sir_roam_cleanup_type {
6344 SIR_MBB_DISCONNECTED,
6345 SIR_MBB_CONNECTED,
6346};
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05306347#endif
6348
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05306349/**
6350 * struct tDelBaParams - Del BA Session req
6351 * @session_id: adapter session id
6352 */
6353typedef struct {
6354 tANI_U8 session_id;
6355}tDelBaParams,*ptDelBaParams;
Abhishek Singh02605092017-10-25 14:06:12 +05306356
6357/**
6358 * struct sir_ecsa_ie_req - structure to send req to include ECSA IE in beacon
6359 * @type: type of msg
6360 * @len: length of msg
6361 * @new_chan: new channel to which switch is requested
6362 * @cb_mode:cbmode of the new channel
6363 * @bssid: bssid of the AP
6364 */
6365struct sir_ecsa_ie_req {
6366 uint16_t type;
6367 uint16_t len;
6368 uint8_t new_chan;
6369 uint8_t cb_mode;
6370 uint8_t bssid[VOS_MAC_ADDR_SIZE];
6371};
6372
Abhishek Singh550aa8c2017-10-30 17:34:53 +05306373/**
6374 * struct sir_ecsa_ie_complete_ind - structure to send indication that ECSA IE
6375 * TX completion in beacon
6376 * @session_id: session on which ECSA IE was sent
6377 */
6378struct sir_ecsa_ie_complete_ind {
6379 uint8_t session_id;
6380};
6381
6382/**
6383 * struct sir_channel_chanege_req - structure to send channel change req to LIM
6384 * @type: type of msg
6385 * @len: length of msg
6386 * @new_chan: new channel to which switch is requested
6387 * @cb_mode:cbmode of the new channel
6388 * @bssid: bssid of the AP
6389 * @dot11mode: new dot11 mode
6390 * @operational_rateset: new rate set
6391 * @extended_rateset: new extended rate set
6392 */
6393struct sir_channel_chanege_req {
6394 uint16_t type;
6395 uint16_t len;
6396 uint8_t new_chan;
6397 uint8_t cb_mode;
6398 uint8_t bssid[VOS_MAC_ADDR_SIZE];
6399 uint32_t dot11mode;
6400 tSirMacRateSet operational_rateset;
6401 tSirMacRateSet extended_rateset;
6402};
6403
6404/**
6405 * struct sir_channel_chanege_rsp - structure for channel change resp from LIM
6406 * @sme_session_id: sme session on which channel was changed
6407 * @new_channel: new channel to which channel is changed
6408 * @status:status of channel change
6409 */
6410struct sir_channel_chanege_rsp {
6411 uint8_t sme_session_id;
6412 uint8_t new_channel;
6413 VOS_STATUS status;
6414};
6415
Abhishek Singh39ae47e2017-10-30 17:39:50 +05306416/**
6417 * struct ecsa_frame_params - ecsa frame params
6418 * @switch_mode: switch mode of channel change
6419 * @op_class: new channel op class
6420 * @new_channel: new channel to shift
6421 * @switch_count: channel switch count
6422 */
6423struct ecsa_frame_params {
6424 uint8_t switch_mode;
6425 uint8_t op_class;
6426 uint8_t new_channel;
6427 uint8_t switch_count;
6428};
6429
Jeff Johnson295189b2012-06-20 16:38:30 -07006430#endif /* __SIR_API_H */