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