blob: 36e9748cab12cea97740afa56cc9bfcb713224e9 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
3 *
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
145#define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
146#define WLAN_EXTSCAN_MAX_RSSI_SAMPLE_SIZE 8
147#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,
Leela Venkata Kiran Kumar Reddy Chirala45f184c2014-02-14 15:08:21 -0800179 SIR_CFG_MODULE_ID = 0x12,
Jeff Johnson295189b2012-06-20 16:38:30 -0700180 SIR_LIM_MODULE_ID,
181 SIR_ARQ_MODULE_ID,
182 SIR_SCH_MODULE_ID,
183 SIR_PMM_MODULE_ID,
184 SIR_MNT_MODULE_ID,
185 SIR_DBG_MODULE_ID,
186 SIR_DPH_MODULE_ID,
187 SIR_SYS_MODULE_ID,
188 SIR_SMS_MODULE_ID,
189
190 SIR_PHY_MODULE_ID = 0x20,
191
192
193 // Add any modules above this line
194 SIR_DVT_MODULE_ID
195};
196
197#define SIR_WDA_MODULE_ID SIR_HAL_MODULE_ID
198
199/**
200 * First and last module definition for logging utility
201 *
202 * NOTE: The following definitions need to be updated if
203 * the above list is changed.
204 */
205#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
206#define SIR_LAST_MODULE_ID SIR_DVT_MODULE_ID
207
208
209// Type declarations used by Firmware and Host software
210
211// Scan type enum used in scan request
212typedef enum eSirScanType
213{
214 eSIR_PASSIVE_SCAN,
215 eSIR_ACTIVE_SCAN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800216 eSIR_BEACON_TABLE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700217} tSirScanType;
218
Jeff Johnson295189b2012-06-20 16:38:30 -0700219typedef enum eSirResultCodes
220{
221 eSIR_SME_SUCCESS,
222
223 eSIR_EOF_SOF_EXCEPTION,
224 eSIR_BMU_EXCEPTION,
225 eSIR_LOW_PDU_EXCEPTION,
226 eSIR_USER_TRIG_RESET,
227 eSIR_LOGP_EXCEPTION,
228 eSIR_CP_EXCEPTION,
229 eSIR_STOP_BSS,
230 eSIR_AHB_HANG_EXCEPTION,
231 eSIR_DPU_EXCEPTION,
232 eSIR_RPE_EXCEPTION,
233 eSIR_TPE_EXCEPTION,
234 eSIR_DXE_EXCEPTION,
235 eSIR_RXP_EXCEPTION,
236 eSIR_MCPU_EXCEPTION,
237 eSIR_MCU_EXCEPTION,
238 eSIR_MTU_EXCEPTION,
239 eSIR_MIF_EXCEPTION,
240 eSIR_FW_EXCEPTION,
241 eSIR_PS_MUTEX_READ_EXCEPTION,
242 eSIR_PHY_HANG_EXCEPTION,
243 eSIR_MAILBOX_SANITY_CHK_FAILED,
244 eSIR_RADIO_HW_SWITCH_STATUS_IS_OFF, // Only where this switch is present
245 eSIR_CFB_FLAG_STUCK_EXCEPTION,
246
247 eSIR_SME_BASIC_RATES_NOT_SUPPORTED_STATUS=30,
248
249 eSIR_SME_INVALID_PARAMETERS=500,
250 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
251 eSIR_SME_RESOURCES_UNAVAILABLE,
252 eSIR_SME_SCAN_FAILED, // Unable to find a BssDescription
253 // matching requested scan criteria
254 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
255 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
256 eSIR_SME_REFUSED,
c_hpothua9dc89c2014-03-22 19:22:31 +0530257 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700258 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
259 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
260 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
261 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
262 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
263 eSIR_SME_AUTH_REFUSED,
264 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
265 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
266 eSIR_SME_ASSOC_REFUSED,
267 eSIR_SME_REASSOC_REFUSED,
268 eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication.
269 eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining.
270 eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate.
271 eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate
272 eSIR_SME_STA_NOT_AUTHENTICATED,
273 eSIR_SME_STA_NOT_ASSOCIATED,
274 eSIR_SME_STA_DISASSOCIATED,
275 eSIR_SME_ALREADY_JOINED_A_BSS,
276 eSIR_ULA_COMPLETED,
277 eSIR_ULA_FAILURE,
278 eSIR_SME_LINK_ESTABLISHED,
279 eSIR_SME_UNABLE_TO_PERFORM_MEASUREMENTS,
280 eSIR_SME_UNABLE_TO_PERFORM_DFS,
281 eSIR_SME_DFS_FAILED,
282 eSIR_SME_TRANSFER_STA, // To be used when STA need to be LB'ed
283 eSIR_SME_INVALID_LINK_TEST_PARAMETERS,// Given in LINK_TEST_START_RSP
284 eSIR_SME_LINK_TEST_MAX_EXCEEDED, // Given in LINK_TEST_START_RSP
285 eSIR_SME_UNSUPPORTED_RATE, // Given in LINK_TEST_RSP if peer does
286 // support requested rate in
287 // LINK_TEST_REQ
288 eSIR_SME_LINK_TEST_TIMEOUT, // Given in LINK_TEST_IND if peer does
289 // not respond before next test packet
290 // is sent
291 eSIR_SME_LINK_TEST_COMPLETE, // Given in LINK_TEST_IND at the end
292 // of link test
293 eSIR_SME_LINK_TEST_INVALID_STATE, // Given in LINK_TEST_START_RSP
294 eSIR_SME_LINK_TEST_TERMINATE, // Given in LINK_TEST_START_RSP
295 eSIR_SME_LINK_TEST_INVALID_ADDRESS, // Given in LINK_TEST_STOP_RSP
296 eSIR_SME_POLARIS_RESET, // Given in SME_STOP_BSS_REQ
297 eSIR_SME_SETCONTEXT_FAILED, // Given in SME_SETCONTEXT_REQ when
298 // unable to plumb down keys
299 eSIR_SME_BSS_RESTART, // Given in SME_STOP_BSS_REQ
300
301 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, // Given in SME_SCAN_RSP message
302 // that more SME_SCAN_RSP
303 // messages are following.
304 // SME_SCAN_RSP message with
305 // eSIR_SME_SUCCESS status
306 // code is the last one.
307 eSIR_SME_INVALID_ASSOC_RSP_RXED, // Sent in SME_JOIN/REASSOC_RSP
308 // messages upon receiving
309 // invalid Re/Assoc Rsp frame.
310 eSIR_SME_MIC_COUNTER_MEASURES, // STOP BSS triggered by MIC failures: MAC software to disassoc all stations
311 // with MIC_FAILURE reason code and perform the stop bss operation
312 eSIR_SME_ADDTS_RSP_TIMEOUT, // didn't get response from peer within
313 // timeout interval
314 eSIR_SME_ADDTS_RSP_FAILED, // didn't get success response from HAL
315 eSIR_SME_RECEIVED,
316 // TBA - TSPEC related Result Codes
317
318 eSIR_SME_CHANNEL_SWITCH_FAIL, // failed to send out Channel Switch Action Frame
319 eSIR_SME_INVALID_STA_ROLE,
320 eSIR_SME_INVALID_STATE,
321#ifdef GEN4_SCAN
322 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
323 eSIR_SME_HAL_SCAN_INIT_FAILED, // SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status
324 eSIR_SME_HAL_SCAN_START_FAILED, // SIR_HAL_START_SCAN_RSP returned failed status
325 eSIR_SME_HAL_SCAN_END_FAILED, // SIR_HAL_END_SCAN_RSP returned failed status
326 eSIR_SME_HAL_SCAN_FINISH_FAILED, // SIR_HAL_FINISH_SCAN_RSP returned failed status
327 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
328#else // GEN4_SCAN
329 eSIR_SME_CHANNEL_SWITCH_DISABLED, // either 11h is disabled or channelSwitch is currently active
330 eSIR_SME_HAL_SEND_MESSAGE_FAIL, // Failed to send a message to HAL
331#endif // GEN4_SCAN
Jeff Johnsone7245742012-09-05 17:12:55 -0700332#ifdef FEATURE_OEM_DATA_SUPPORT
333 eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
334#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700335 eSIR_SME_STOP_BSS_FAILURE, // Failed to stop the bss
336 eSIR_SME_STA_ASSOCIATED,
337 eSIR_SME_INVALID_PMM_STATE,
338 eSIR_SME_CANNOT_ENTER_IMPS,
339 eSIR_SME_IMPS_REQ_FAILED,
340 eSIR_SME_BMPS_REQ_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700341 eSIR_SME_BMPS_REQ_REJECT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700342 eSIR_SME_UAPSD_REQ_FAILED,
Kanchanapally, Vidyullatha2ed7bde2014-12-29 12:18:36 +0530343 eSIR_SME_UAPSD_REQ_INVALID,
Jeff Johnson295189b2012-06-20 16:38:30 -0700344 eSIR_SME_WOWL_ENTER_REQ_FAILED,
345 eSIR_SME_WOWL_EXIT_REQ_FAILED,
346#if defined WLAN_FEATURE_VOWIFI_11R
347 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
348 eSIR_SME_FT_REASSOC_FAILURE,
349#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700350 eSIR_SME_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700351#ifdef WLAN_FEATURE_PACKET_FILTERING
352 eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
353#endif // WLAN_FEATURE_PACKET_FILTERING
354
355#ifdef WLAN_FEATURE_GTK_OFFLOAD
356 eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
357#endif // WLAN_FEATURE_GTK_OFFLOAD
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800358 eSIR_SME_DEAUTH_STATUS,
Jeff Johnson295189b2012-06-20 16:38:30 -0700359 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
360} tSirResultCodes;
361
Jeff Johnson295189b2012-06-20 16:38:30 -0700362/* each station added has a rate mode which specifies the sta attributes */
363typedef enum eStaRateMode {
364 eSTA_TAURUS = 0,
365 eSTA_TITAN,
366 eSTA_POLARIS,
367 eSTA_11b,
368 eSTA_11bg,
369 eSTA_11a,
370 eSTA_11n,
Jeff Johnsone7245742012-09-05 17:12:55 -0700371#ifdef WLAN_FEATURE_11AC
372 eSTA_11ac,
373#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700374 eSTA_INVALID_RATE_MODE
375} tStaRateMode, *tpStaRateMode;
376
377//although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 bits with MSB=1 for basic rates.
378//change the mask for bit0-7 only so HAL gets correct basic rates for setting response rates.
379#define IERATE_BASICRATE_MASK 0x80
380#define IERATE_RATE_MASK 0x7f
381#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
382#define ANIENHANCED_TAURUS_RATEMAP_BITOFFSET_START 28
383
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530384const char * lim_BssTypetoString(const v_U8_t bssType);
385const char * lim_ScanTypetoString(const v_U8_t scanType);
386const char * lim_BackgroundScanModetoString(const v_U8_t mode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700387typedef struct sSirSupportedRates {
388 /*
389 * For Self STA Entry: this represents Self Mode.
390 * For Peer Stations, this represents the mode of the peer.
391 * On Station:
392 * --this mode is updated when PE adds the Self Entry.
393 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
394 * ON AP:
395 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
396 * to indicate the self mode of the AP.
397 * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
398 */
399
400 tStaRateMode opRateMode;
401 // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
402 tANI_U16 llbRates[SIR_NUM_11B_RATES];
403 tANI_U16 llaRates[SIR_NUM_11A_RATES];
404 tANI_U16 aniLegacyRates[SIR_NUM_POLARIS_RATES];
405
406 //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
407 //First 26 bits are reserved for those Titan rates and
408 //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
409 tANI_U32 aniEnhancedRateBitmap; //Titan and Taurus Rates
410
411 /*
412 * 0-76 bits used, remaining reserved
413 * bits 0-15 and 32 should be set.
414 */
415 tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
416
417 /*
418 * RX Highest Supported Data Rate defines the highest data
419 * rate that the STA is able to receive, in unites of 1Mbps.
420 * This value is derived from "Supported MCS Set field" inside
421 * the HT capability element.
422 */
423 tANI_U16 rxHighestDataRate;
424
Jeff Johnsone7245742012-09-05 17:12:55 -0700425#ifdef WLAN_FEATURE_11AC
426 /*Indicates the Maximum MCS that can be received for each number
427 of spacial streams */
428 tANI_U16 vhtRxMCSMap;
429 /*Indicate the highest VHT data rate that the STA is able to receive*/
430 tANI_U16 vhtRxHighestDataRate;
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700431 /*Indicates the Maximum MCS that can be transmitted for each number
Jeff Johnsone7245742012-09-05 17:12:55 -0700432 of spacial streams */
433 tANI_U16 vhtTxMCSMap;
434 /*Indicate the highest VHT data rate that the STA is able to transmit*/
435 tANI_U16 vhtTxHighestDataRate;
436#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700437} tSirSupportedRates, *tpSirSupportedRates;
438
439
440typedef enum eSirRFBand
441{
442 SIR_BAND_UNKNOWN,
443 SIR_BAND_2_4_GHZ,
444 SIR_BAND_5_GHZ,
445} tSirRFBand;
446
447
448/*
449* Specifies which beacons are to be indicated upto the host driver when
450* Station is in power save mode.
451*/
452typedef enum eBeaconForwarding
453{
454 ePM_BEACON_FWD_NTH,
455 ePM_BEACON_FWD_TIM,
456 ePM_BEACON_FWD_DTIM,
457 ePM_BEACON_FWD_NONE
458} tBeaconForwarding;
459
460
Jeff Johnson295189b2012-06-20 16:38:30 -0700461typedef struct sSirRemainOnChnReq
462{
463 tANI_U16 messageType;
464 tANI_U16 length;
465 tANI_U8 sessionId;
466 tSirMacAddr selfMacAddr;
467 tANI_U8 chnNum;
468 tANI_U8 phyMode;
469 tANI_U32 duration;
Gopichand Nakkala924e4552013-05-08 19:18:14 +0530470 tANI_U8 isProbeRequestAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700471 tANI_U8 probeRspIe[1];
472}tSirRemainOnChnReq, *tpSirRemainOnChnReq;
473
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530474/* Structure for vendor specific IE of debug marker frame
475 to debug remain on channel issues */
476typedef struct publicVendorSpecific
477{
478 tANI_U8 category;
479 tANI_U8 elementid;
480 tANI_U8 length;
481} publicVendorSpecific;
482
Jeff Johnson295189b2012-06-20 16:38:30 -0700483typedef struct sSirRegisterMgmtFrame
484{
485 tANI_U16 messageType;
486 tANI_U16 length;
487 tANI_U8 sessionId;
488 tANI_BOOLEAN registerFrame;
489 tANI_U16 frameType;
490 tANI_U16 matchLen;
491 tANI_U8 matchData[1];
492}tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
Jeff Johnson295189b2012-06-20 16:38:30 -0700493
494//
Jeff Johnson295189b2012-06-20 16:38:30 -0700495// Identifies the neighbor BSS' that was(were) detected
496// by an STA and reported to the AP
497//
498typedef struct sAniTitanCBNeighborInfo
499{
500 // A BSS was found on the Primary
501 tANI_U8 cbBssFoundPri;
502
503 // A BSS was found on the adjacent Upper Secondary
504 tANI_U8 cbBssFoundSecUp;
505
506 // A BSS was found on the adjacent Lower Secondary
507 tANI_U8 cbBssFoundSecDown;
508
509} tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
510
Jeff Johnson295189b2012-06-20 16:38:30 -0700511/// Generic type for sending a response message
512/// with result code to host software
513typedef struct sSirSmeRsp
514{
515 tANI_U16 messageType; // eWNI_SME_*_RSP
516 tANI_U16 length;
517 tANI_U8 sessionId; // To support BT-AMP
518 tANI_U16 transactionId; // To support BT-AMP
519 tSirResultCodes statusCode;
520} tSirSmeRsp, *tpSirSmeRsp;
521
522/// Definition for kick starting Firmware on STA
523typedef struct sSirSmeStartReq
524{
525 tANI_U16 messageType; // eWNI_SME_START_REQ
526 tANI_U16 length;
527 tANI_U8 sessionId; //Added for BT-AMP Support
528 tANI_U16 transcationId; //Added for BT-AMP Support
529 tSirMacAddr bssId; //Added For BT-AMP Support
530 tANI_U32 roamingAtPolaris;
Jeff Johnson295189b2012-06-20 16:38:30 -0700531 tANI_U32 sendNewBssInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700532} tSirSmeStartReq, *tpSirSmeStartReq;
533
534/// Definition for indicating all modules ready on STA
535typedef struct sSirSmeReadyReq
536{
537 tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
538 tANI_U16 length;
539 tANI_U16 transactionId;
540} tSirSmeReadyReq, *tpSirSmeReadyReq;
541
542/// Definition for response message to previously issued start request
543typedef struct sSirSmeStartRsp
544{
545 tANI_U16 messageType; // eWNI_SME_START_RSP
546 tANI_U16 length;
547 tSirResultCodes statusCode;
548 tANI_U16 transactionId;
549} tSirSmeStartRsp, *tpSirSmeStartRsp;
550
Jeff Johnson295189b2012-06-20 16:38:30 -0700551
552/// Definition for Load structure
553typedef struct sSirLoad
554{
555 tANI_U16 numStas;
556 tANI_U16 channelUtilization;
557} tSirLoad, *tpSirLoad;
558
559/// BSS type enum used in while scanning/joining etc
560typedef enum eSirBssType
561{
562 eSIR_INFRASTRUCTURE_MODE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700563 eSIR_INFRA_AP_MODE, //Added for softAP support
Jeff Johnson295189b2012-06-20 16:38:30 -0700564 eSIR_IBSS_MODE,
565 eSIR_BTAMP_STA_MODE, //Added for BT-AMP support
566 eSIR_BTAMP_AP_MODE, //Added for BT-AMP support
567 eSIR_AUTO_MODE,
568 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
569} tSirBssType;
570
571/// Definition for WDS Information
572typedef struct sSirWdsInfo
573{
574 tANI_U16 wdsLength;
575 tANI_U8 wdsBytes[ANI_WDS_INFO_MAX_LENGTH];
576} tSirWdsInfo, *tpSirWdsInfo;
577
578/// Power Capability info used in 11H
579typedef struct sSirMacPowerCapInfo
580{
581 tANI_U8 minTxPower;
582 tANI_U8 maxTxPower;
583} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
584
585/// Supported Channel info used in 11H
586typedef struct sSirSupChnl
587{
588 tANI_U8 numChnl;
589 tANI_U8 channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
590} tSirSupChnl, *tpSirSupChnl;
591
592typedef enum eSirNwType
593{
594 eSIR_11A_NW_TYPE,
595 eSIR_11B_NW_TYPE,
596 eSIR_11G_NW_TYPE,
597 eSIR_11N_NW_TYPE,
Jeff Johnsone7245742012-09-05 17:12:55 -0700598#ifdef WLAN_FEATURE_11AC
599 eSIR_11AC_NW_TYPE,
600#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700601 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
602} tSirNwType;
603
604/// Definition for new iBss peer info
605typedef struct sSirNewIbssPeerInfo
606{
607 tSirMacAddr peerAddr;
608 tANI_U16 aid;
609} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
610
611/// Definition for Alternate BSS info
612typedef struct sSirAlternateRadioInfo
613{
614 tSirMacAddr bssId;
615 tANI_U8 channelId;
616} tSirAlternateRadioInfo, *tpSirAlternateRadioInfo;
617
618/// Definition for Alternate BSS list
619typedef struct sSirAlternateRadioList
620{
621 tANI_U8 numBss;
622 tSirAlternateRadioInfo alternateRadio[1];
623} tSirAlternateRadioList, *tpSirAlternateRadioList;
624
625/// Definition for kick starting BSS
626/// ---> MAC
627/**
628 * Usage of ssId, numSSID & ssIdList:
629 * ---------------------------------
630 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
631 * feature is enabled.
632 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
633 * and interpret the SSID list from numSSID & ssIdList.
634 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
635 * specified in the ssId field and it is expected that
636 * application will set numSSID to one (only one SSID present
637 * in the list) and SSID in the list is same as ssId field.
638 * 4. Application will always set numSSID >= 1.
639 */
640//*****NOTE: Please make sure all codes are updated if inserting field into this structure..**********
641typedef struct sSirSmeStartBssReq
642{
643 tANI_U16 messageType; // eWNI_SME_START_BSS_REQ
644 tANI_U16 length;
645 tANI_U8 sessionId; //Added for BT-AMP Support
646 tANI_U16 transactionId; //Added for BT-AMP Support
647 tSirMacAddr bssId; //Added for BT-AMP Support
648 tSirMacAddr selfMacAddr; //Added for BT-AMP Support
649 tANI_U16 beaconInterval; //Added for BT-AMP Support
650 tANI_U8 dot11mode;
651 tSirBssType bssType;
652 tSirMacSSid ssId;
653 tANI_U8 channelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700654 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700655
Jeff Johnson295189b2012-06-20 16:38:30 -0700656 tANI_U8 privacy;
657 tANI_U8 apUapsdEnable;
658 tANI_U8 ssidHidden;
659 tANI_BOOLEAN fwdWPSPBCProbeReq;
660 tANI_BOOLEAN protEnabled;
661 tANI_BOOLEAN obssProtEnabled;
662 tANI_U16 ht_capab;
663 tAniAuthType authType;
664 tANI_U32 dtimPeriod;
665 tANI_U8 wps_state;
krunal sonie9002db2013-11-25 14:24:17 -0800666 tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob
Jeff Johnson295189b2012-06-20 16:38:30 -0700667 tVOS_CON_MODE bssPersona;
668
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800669 tANI_U8 txLdpcIniFeatureEnabled;
670
Jeff Johnson295189b2012-06-20 16:38:30 -0700671 tSirRSNie rsnIE; // RSN IE to be sent in
672 // Beacon and Probe
673 // Response frames
674 tSirNwType nwType; // Indicates 11a/b/g
675 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
676 tSirMacRateSet extendedRateSet; // Has 11g rates
677
Chet Lanctot8cecea22014-02-11 19:09:36 -0800678#ifdef WLAN_FEATURE_11W
679 tANI_BOOLEAN pmfCapable;
680 tANI_BOOLEAN pmfRequired;
681#endif
682
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +0530683#ifdef WLAN_FEATURE_AP_HT40_24G
684 tANI_BOOLEAN apHT40_24GEnabled;
685#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700686} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
687
688#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
krunal soni2a6a9062014-02-11 14:14:23 -0800689 ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700690
691#define WSCIE_PROBE_RSP_LEN (317 + 2)
692
693typedef struct sSirBssDescription
694{
695 //offset of the ieFields from bssId.
696 tANI_U16 length;
697 tSirMacAddr bssId;
698 v_TIME_t scanSysTimeMsec;
699 tANI_U32 timeStamp[2];
700 tANI_U16 beaconInterval;
701 tANI_U16 capabilityInfo;
702 tSirNwType nwType; // Indicates 11a/b/g
703 tANI_U8 aniIndicator;
704 tANI_S8 rssi;
705 tANI_S8 sinr;
706 //channelId what peer sent in beacon/probersp.
707 tANI_U8 channelId;
708 //channelId on which we are parked at.
709 //used only in scan case.
710 tANI_U8 channelIdSelf;
711 tANI_U8 sSirBssDescriptionRsvd[3];
Jeff Johnson295189b2012-06-20 16:38:30 -0700712 tANI_TIMESTAMP nReceivedTime; //base on a tick count. It is a time stamp, not a relative time.
713#if defined WLAN_FEATURE_VOWIFI
714 tANI_U32 parentTSF;
715 tANI_U32 startTSF[2];
716#endif
717#ifdef WLAN_FEATURE_VOWIFI_11R
718 tANI_U8 mdiePresent;
719 tANI_U8 mdie[SIR_MDIE_SIZE]; // MDIE for 11r, picked from the beacons
720#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800721#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700722 tANI_U16 QBSSLoad_present;
723 tANI_U16 QBSSLoad_avail;
724#endif
725 // Please keep the structure 4 bytes aligned above the ieFields
726
727 tANI_U8 fProbeRsp; //whether it is from a probe rsp
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700728 tANI_U8 reservedPadding1;
729 tANI_U8 reservedPadding2;
730 tANI_U8 reservedPadding3;
Jeff Johnson295189b2012-06-20 16:38:30 -0700731 tANI_U32 WscIeLen;
732 tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
Madan Mohan Koyyalamudi2a6ba242012-10-31 17:06:19 -0700733 tANI_U8 reservedPadding4;
Prathyusha Kuntupalli7b8f6aa2012-12-10 13:17:35 -0800734
Jeff Johnson295189b2012-06-20 16:38:30 -0700735 tANI_U32 ieFields[1];
736} tSirBssDescription, *tpSirBssDescription;
737
738/// Definition for response message to previously
739/// issued start BSS request
740/// MAC --->
741typedef struct sSirSmeStartBssRsp
742{
743 tANI_U16 messageType; // eWNI_SME_START_BSS_RSP
744 tANI_U16 length;
745 tANI_U8 sessionId;
746 tANI_U16 transactionId;//transaction ID for cmd
747 tSirResultCodes statusCode;
748 tSirBssType bssType;//Add new type for WDS mode
749 tANI_U16 beaconInterval;//Beacon Interval for both type
750 tANI_U32 staId;//Staion ID for Self
751 tSirBssDescription bssDescription;//Peer BSS description
752} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
753
Jeff Johnson295189b2012-06-20 16:38:30 -0700754
755typedef struct sSirChannelList
756{
757 tANI_U8 numChannels;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800758 tANI_U8 channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
Jeff Johnson295189b2012-06-20 16:38:30 -0700759} tSirChannelList, *tpSirChannelList;
760
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530761typedef struct sSirDFSChannelList
762{
763 tANI_U32 timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
764
765} tSirDFSChannelList, *tpSirDFSChannelList;
766
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800767#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700768typedef struct sTspecInfo {
769 tANI_U8 valid;
770 tSirMacTspecIE tspec;
771} tTspecInfo;
772
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800773#define SIR_ESE_MAX_TSPEC_IES 4
774typedef struct sESETspecTspecInfo {
Jeff Johnson295189b2012-06-20 16:38:30 -0700775 tANI_U8 numTspecs;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800776 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
777} tESETspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700778#endif
779
Jeff Johnson295189b2012-06-20 16:38:30 -0700780
781/// Definition for Radar Info
782typedef struct sSirRadarInfo
783{
784 tANI_U8 channelNumber;
785 tANI_U16 radarPulseWidth; // in usecond
786 tANI_U16 numRadarPulse;
787} tSirRadarInfo, *tpSirRadarInfo;
788
789#define SIR_RADAR_INFO_SIZE (sizeof(tANI_U8) + 2 *sizeof(tANI_U16))
790
791/// Two Background Scan mode
792typedef enum eSirBackgroundScanMode
793{
794 eSIR_AGGRESSIVE_BACKGROUND_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700795 eSIR_NORMAL_BACKGROUND_SCAN = 1,
796 eSIR_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700797} tSirBackgroundScanMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700798typedef enum eSirLinkTrafficCheck
799{
800 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
Madan Mohan Koyyalamudi9b876782012-10-11 16:22:51 -0700801 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
802 eSIR_CHECK_ROAMING_SCAN = 2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700803} tSirLinkTrafficCheck;
804
805#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
806#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
807#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
808#define SIR_SCAN_MAX_NUM_SSID 0x09
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700809#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
810#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
Jeff Johnson295189b2012-06-20 16:38:30 -0700811
812/// Definition for scan request
813typedef struct sSirSmeScanReq
814{
815 tANI_U16 messageType; // eWNI_SME_SCAN_REQ
816 tANI_U16 length;
817 tANI_U8 sessionId; // Session ID
818 tANI_U16 transactionId; // Transaction ID for cmd
819 tSirMacAddr bssId;
820 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
821 tSirMacAddr selfMacAddr; //Added For BT-AMP Support
822 tSirBssType bssType;
823 tANI_U8 dot11mode;
824 tSirScanType scanType;
825 /**
826 * minChannelTime. Not used if scanType is passive.
827 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
828 * 11k measurements set this to zero to user only single duration for scan.
829 * <valid timeout> - Timeout value used for min channel timeout.
830 */
831 tANI_U32 minChannelTime;
832 /**
833 * maxChannelTime.
834 * 0x0 - Invalid. In case of active scan.
835 * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
836 *
837 */
838 tANI_U32 maxChannelTime;
839 /**
840 * returnAfterFirstMatch can take following values:
841 * 0x00 - Return SCAN_RSP message after complete channel scan
842 * 0x01 - Return SCAN_RSP message after collecting BSS description
843 * that matches scan criteria.
844 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
845 * 5 GHz band channels
846 * 0x80 - Return after collecting first 11d IE from 5 GHz band
847 * channels
848 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
849 * band channels
850 *
851 * Values of 0xC0, 0x80 & 0x40 are to be used by
852 * Roaming/application when 11d is enabled.
853 */
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800854 tANI_U32 minChannelTimeBtc; //in units of milliseconds
855 tANI_U32 maxChannelTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700856 tANI_U8 returnAfterFirstMatch;
857
858 /**
859 * returnUniqueResults can take following values:
860 * 0 - Collect & report all received BSS descriptions from same BSS.
861 * 1 - Collect & report unique BSS description from same BSS.
862 */
863 tANI_U8 returnUniqueResults;
864
865 /**
866 * returnFreshResults can take following values:
867 * 0x00 - Return background scan results.
868 * 0x80 - Return & purge background scan results
869 * 0x01 - Trigger fresh scan instead of returning background scan
870 * results.
871 * 0x81 - Trigger fresh scan instead of returning background scan
872 * results and purge background scan results.
873 */
874 tANI_U8 returnFreshResults;
875
876 /* backgroundScanMode can take following values:
877 * 0x0 - agressive scan
878 * 0x1 - normal scan where HAL will check for link traffic
879 * prior to proceeding with the scan
880 */
881 tSirBackgroundScanMode backgroundScanMode;
882
883 tANI_U8 hiddenSsid;
884
885 /* Number of SSIDs to scan */
886 tANI_U8 numSsid;
887
888 //channelList has to be the last member of this structure. Check tSirChannelList for the reason.
889 /* This MUST be the last field of the structure */
890
891
Jeff Johnson295189b2012-06-20 16:38:30 -0700892 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700893 tANI_U16 uIEFieldLen;
894 tANI_U16 uIEFieldOffset;
895
896 //channelList MUST be the last field of this structure
897 tSirChannelList channelList;
898 /*-----------------------------
899 tSirSmeScanReq....
900 -----------------------------
901 uIEFiledLen
902 -----------------------------
903 uIEFiledOffset ----+
904 ----------------------------- |
905 channelList.numChannels |
906 ----------------------------- |
907 ... variable size up to |
908 channelNumber[numChannels-1] |
909 This can be zero, if |
910 numChannel is zero. |
911 ----------------------------- <--+
912 ... variable size uIEFiled
913 up to uIEFieldLen (can be 0)
914 -----------------------------*/
915} tSirSmeScanReq, *tpSirSmeScanReq;
916
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530917typedef struct sSirSmeScanAbortReq
918{
919 tANI_U16 type;
920 tANI_U16 msgLen;
921 tANI_U8 sessionId;
922} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
923
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530924typedef struct sSirSmeScanChanReq
925{
926 tANI_U16 type;
927 tANI_U16 msgLen;
928 tANI_U8 sessionId;
929 tANI_U16 transcationId;
930} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
931
Jeff Johnsone7245742012-09-05 17:12:55 -0700932#ifdef FEATURE_OEM_DATA_SUPPORT
933
934#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800935#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700936#endif
937#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800938#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700939#endif
940
941typedef struct sSirOemDataReq
942{
943 tANI_U16 messageType; //eWNI_SME_OEM_DATA_REQ
Siddharth Bhal88aa5322014-06-19 14:27:15 +0530944 tANI_U16 messageLen;
Jeff Johnsone7245742012-09-05 17:12:55 -0700945 tSirMacAddr selfMacAddr;
946 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
947} tSirOemDataReq, *tpSirOemDataReq;
948
949typedef struct sSirOemDataRsp
950{
951 tANI_U16 messageType;
952 tANI_U16 length;
953 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
954} tSirOemDataRsp, *tpSirOemDataRsp;
955
956#endif //FEATURE_OEM_DATA_SUPPORT
Jeff Johnson295189b2012-06-20 16:38:30 -0700957
958/// Definition for response message to previously issued scan request
959typedef struct sSirSmeScanRsp
960{
961 tANI_U16 messageType; // eWNI_SME_SCAN_RSP
962 tANI_U16 length;
963 tANI_U8 sessionId;
964 tSirResultCodes statusCode;
965 tANI_U16 transcationId;
966 tSirBssDescription bssDescription[1];
967} tSirSmeScanRsp, *tpSirSmeScanRsp;
968
969/// Sme Req message to set the Background Scan mode
970typedef struct sSirSmeBackgroundScanModeReq
971{
972 tANI_U16 messageType; // eWNI_SME_BACKGROUND_SCAN_MODE_REQ
973 tANI_U16 length;
974 tSirBackgroundScanMode mode;
975} tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq;
976
977/// Background Scan Statisics
978typedef struct sSirBackgroundScanInfo {
979 tANI_U32 numOfScanSuccess;
980 tANI_U32 numOfScanFailure;
981 tANI_U32 reserved;
982} tSirBackgroundScanInfo, *tpSirBackgroundScanInfo;
983
984#define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32))
985
986/// Definition for Authentication request
987typedef struct sSirSmeAuthReq
988{
989 tANI_U16 messageType; // eWNI_SME_AUTH_REQ
990 tANI_U16 length;
991 tANI_U8 sessionId; // Session ID
992 tANI_U16 transactionId; // Transaction ID for cmd
993 tSirMacAddr bssId; // Self BSSID
994 tSirMacAddr peerMacAddr;
995 tAniAuthType authType;
996 tANI_U8 channelNumber;
997} tSirSmeAuthReq, *tpSirSmeAuthReq;
998
999/// Definition for reponse message to previously issued Auth request
1000typedef struct sSirSmeAuthRsp
1001{
1002 tANI_U16 messageType; // eWNI_SME_AUTH_RSP
1003 tANI_U16 length;
1004 tANI_U8 sessionId; // Session ID
1005 tANI_U16 transactionId; // Transaction ID for cmd
1006 tSirMacAddr peerMacAddr;
1007 tAniAuthType authType;
1008 tSirResultCodes statusCode;
1009 tANI_U16 protStatusCode; //It holds reasonCode when Pre-Auth fails due to deauth frame.
1010 //Otherwise it holds status code.
1011} tSirSmeAuthRsp, *tpSirSmeAuthRsp;
1012
Jeff Johnson295189b2012-06-20 16:38:30 -07001013
Jeff Johnson295189b2012-06-20 16:38:30 -07001014
Jeff Johnson295189b2012-06-20 16:38:30 -07001015/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere.
1016typedef struct sJoinReassocInfo
1017{
1018 tAniTitanCBNeighborInfo cbNeighbors;
1019 tAniBool spectrumMgtIndicator;
1020 tSirMacPowerCapInfo powerCap;
1021 tSirSupChnl supportedChannels;
1022} tJoinReassocInfo, *tpJoinReassocInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001023
1024/// Definition for join request
1025/// ---> MAC
1026/// WARNING! If you add a field in JOIN REQ.
1027/// Make sure to add it in REASSOC REQ
1028/// The Serdes function is the same and its
1029/// shared with REASSOC. So if we add a field
1030// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
1031typedef struct sSirSmeJoinReq
1032{
1033 tANI_U16 messageType; // eWNI_SME_JOIN_REQ
1034 tANI_U16 length;
Jeff Johnsone7245742012-09-05 17:12:55 -07001035 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001036 tANI_U16 transactionId;
1037 tSirMacSSid ssId;
1038 tSirMacAddr selfMacAddr; // self Mac address
1039 tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
1040 tANI_U8 dot11mode; // to support BT-AMP
Jeff Johnsone7245742012-09-05 17:12:55 -07001041 tVOS_CON_MODE staPersona; //Persona
Sushant Kaushik74df8db2015-03-11 18:09:05 +05301042 tANI_BOOLEAN bOSENAssociation; //HS2.0
Jeff Johnsone7245742012-09-05 17:12:55 -07001043 ePhyChanBondState cbMode; // Pass CB mode value in Join.
Jeff Johnson295189b2012-06-20 16:38:30 -07001044
1045 /*This contains the UAPSD Flag for all 4 AC
1046 * B0: AC_VO UAPSD FLAG
1047 * B1: AC_VI UAPSD FLAG
1048 * B2: AC_BK UAPSD FLAG
1049 * B3: AC_BE UASPD FLAG
1050 */
1051 tANI_U8 uapsdPerAcBitmask;
1052
Jeff Johnson295189b2012-06-20 16:38:30 -07001053 tSirMacRateSet operationalRateSet;// Has 11a or 11b rates
1054 tSirMacRateSet extendedRateSet; // Has 11g rates
Masti, Narayanraddi67ea5912015-01-08 12:34:05 +05301055 tANI_U16 rateBitMap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001056 tSirRSNie rsnIE; // RSN IE to be sent in
1057 // (Re) Association Request
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001058#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001059 tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
1060 // the same. The join will never carry cckm, but will be set to
1061 // 0.
1062#endif
1063
1064 tSirAddie addIEScan; // Additional IE to be sent in
1065 // (unicast) Probe Request at the time of join
1066
1067 tSirAddie addIEAssoc; // Additional IE to be sent in
1068 // (Re) Association Request
1069
1070 tAniEdType UCEncryptionType;
1071
1072 tAniEdType MCEncryptionType;
Chet Lanctot186b5732013-03-18 10:26:30 -07001073
1074#ifdef WLAN_FEATURE_11W
1075 tAniEdType MgmtEncryptionType;
1076#endif
1077
Jeff Johnson295189b2012-06-20 16:38:30 -07001078#ifdef WLAN_FEATURE_VOWIFI_11R
1079 tAniBool is11Rconnection;
1080#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001081#ifdef FEATURE_WLAN_ESE
1082 tAniBool isESEFeatureIniEnabled;
1083 tAniBool isESEconnection;
1084 tESETspecInfo eseTspecInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -07001085#endif
1086
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001087#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001088 tAniBool isFastTransitionEnabled;
1089#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001090#ifdef FEATURE_WLAN_LFR
1091 tAniBool isFastRoamIniFeatureEnabled;
1092#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001093
1094 tANI_U8 txLdpcIniFeatureEnabled;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001095#ifdef WLAN_FEATURE_11AC
1096 tANI_U8 txBFIniFeatureEnabled;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001097 tANI_U8 txBFCsnValue;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301098 tANI_U8 txMuBformee;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001099#endif
krunal soni5afa96c2013-09-06 22:19:02 -07001100 tANI_U8 isAmsduSupportInAMPDU;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +05301101 tAniBool isWMEenabled;
1102 tAniBool isQosEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001103 tAniTitanCBNeighborInfo cbNeighbors;
1104 tAniBool spectrumMgtIndicator;
1105 tSirMacPowerCapInfo powerCap;
1106 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001107 tSirBssDescription bssDescription;
Jeff Johnson295189b2012-06-20 16:38:30 -07001108
1109} tSirSmeJoinReq, *tpSirSmeJoinReq;
1110
1111/// Definition for reponse message to previously issued join request
1112/// MAC --->
1113typedef struct sSirSmeJoinRsp
1114{
1115 tANI_U16 messageType; // eWNI_SME_JOIN_RSP
1116 tANI_U16 length;
1117 tANI_U8 sessionId; // Session ID
1118 tANI_U16 transactionId; // Transaction ID for cmd
1119 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001120 tAniAuthType authType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001121 tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
1122 //Otherwise it holds status code.
1123 tANI_U16 aid;
1124 tANI_U32 beaconLength;
1125 tANI_U32 assocReqLength;
1126 tANI_U32 assocRspLength;
1127#ifdef WLAN_FEATURE_VOWIFI_11R
1128 tANI_U32 parsedRicRspLen;
1129#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001130#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -07001131 tANI_U32 tspecIeLen;
1132#endif
1133 tANI_U32 staId;//Station ID for peer
1134
1135 /*The DPU signatures will be sent eventually to TL to help it determine the
1136 association to which a packet belongs to*/
1137 /*Unicast DPU signature*/
1138 tANI_U8 ucastSig;
1139
1140 /*Broadcast DPU signature*/
1141 tANI_U8 bcastSig;
1142
c_hpothu44ff4e02014-05-08 00:13:57 +05301143 /*to report MAX link-speed populate rate-flags from ASSOC RSP frame*/
1144 tANI_U32 maxRateFlags;
1145
Jeff Johnson295189b2012-06-20 16:38:30 -07001146 tANI_U8 frames[ 1 ];
1147} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1148
1149/// Definition for Authentication indication from peer
1150typedef struct sSirSmeAuthInd
1151{
1152 tANI_U16 messageType; // eWNI_SME_AUTH_IND
1153 tANI_U16 length;
1154 tANI_U8 sessionId;
1155 tSirMacAddr bssId; // Self BSSID
1156 tSirMacAddr peerMacAddr;
1157 tAniAuthType authType;
1158} tSirSmeAuthInd, *tpSirSmeAuthInd;
1159
1160/// probereq from peer, when wsc is enabled
1161typedef struct sSirSmeProbereq
1162{
1163 tANI_U16 messageType; // eWNI_SME_PROBE_REQ
1164 tANI_U16 length;
1165 tANI_U8 sessionId;
1166 tSirMacAddr peerMacAddr;
1167 tANI_U16 devicePasswdId;
1168} tSirSmeProbeReq, *tpSirSmeProbeReq;
1169
1170/// Definition for Association indication from peer
1171/// MAC --->
1172typedef struct sSirSmeAssocInd
1173{
1174 tANI_U16 messageType; // eWNI_SME_ASSOC_IND
1175 tANI_U16 length;
1176 tANI_U8 sessionId;
1177 tSirMacAddr peerMacAddr;
1178 tANI_U16 aid;
1179 tSirMacAddr bssId; // Self BSSID
1180 tANI_U16 staId; // Station ID for peer
1181 tANI_U8 uniSig; // DPU signature for unicast packets
1182 tANI_U8 bcastSig; // DPU signature for broadcast packets
1183 tAniAuthType authType;
1184 tAniSSID ssId; // SSID used by STA to associate
1185 tSirRSNie rsnIE;// RSN IE received from peer
1186 tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
1187
Jeff Johnson295189b2012-06-20 16:38:30 -07001188 // powerCap & supportedChannels are present only when
1189 // spectrumMgtIndicator flag is set
1190 tAniBool spectrumMgtIndicator;
1191 tSirMacPowerCapInfo powerCap;
1192 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001193 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +05301194#ifdef WLAN_FEATURE_AP_HT40_24G
1195 tAniBool HT40MHzIntoEnabledSta; /* if present - STA Enable 40 MHz Intolerant */
1196#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001197 tAniBool reassocReq;
1198 // Required for indicating the frames to upper layer
1199 tANI_U32 beaconLength;
1200 tANI_U8* beaconPtr;
1201 tANI_U32 assocReqLength;
1202 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001203} tSirSmeAssocInd, *tpSirSmeAssocInd;
1204
1205
1206/// Definition for Association confirm
1207/// ---> MAC
1208typedef struct sSirSmeAssocCnf
1209{
1210 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1211 tANI_U16 length;
1212 tSirResultCodes statusCode;
1213 tSirMacAddr bssId; // Self BSSID
1214 tSirMacAddr peerMacAddr;
1215 tANI_U16 aid;
1216 tSirMacAddr alternateBssId;
1217 tANI_U8 alternateChannelId;
1218} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1219
Jeff Johnson295189b2012-06-20 16:38:30 -07001220/// Definition for Reassociation indication from peer
1221typedef struct sSirSmeReassocInd
1222{
1223 tANI_U16 messageType; // eWNI_SME_REASSOC_IND
1224 tANI_U16 length;
1225 tANI_U8 sessionId; // Session ID
1226 tSirMacAddr peerMacAddr;
1227 tSirMacAddr oldMacAddr;
1228 tANI_U16 aid;
1229 tSirMacAddr bssId; // Self BSSID
1230 tANI_U16 staId; // Station ID for peer
1231 tAniAuthType authType;
1232 tAniSSID ssId; // SSID used by STA to reassociate
1233 tSirRSNie rsnIE; // RSN IE received from peer
1234
1235 tSirAddie addIE; // Additional IE received from peer
1236
Jeff Johnson295189b2012-06-20 16:38:30 -07001237 // powerCap & supportedChannels are present only when
1238 // spectrumMgtIndicator flag is set
1239 tAniBool spectrumMgtIndicator;
1240 tSirMacPowerCapInfo powerCap;
1241 tSirSupChnl supportedChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001242 // Required for indicating the frames to upper layer
1243 // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
1244 tANI_U32 beaconLength;
1245 tANI_U8* beaconPtr;
1246 tANI_U32 assocReqLength;
1247 tANI_U8* assocReqPtr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001248} tSirSmeReassocInd, *tpSirSmeReassocInd;
1249
1250/// Definition for Reassociation confirm
1251/// ---> MAC
1252typedef struct sSirSmeReassocCnf
1253{
1254 tANI_U16 messageType; // eWNI_SME_REASSOC_CNF
1255 tANI_U16 length;
1256 tSirResultCodes statusCode;
1257 tSirMacAddr bssId; // Self BSSID
1258 tSirMacAddr peerMacAddr;
1259 tANI_U16 aid;
1260 tSirMacAddr alternateBssId;
1261 tANI_U8 alternateChannelId;
1262} tSirSmeReassocCnf, *tpSirSmeReassocCnf;
1263
Jeff Johnson295189b2012-06-20 16:38:30 -07001264
1265/// Enum definition for Wireless medium status change codes
1266typedef enum eSirSmeStatusChangeCode
1267{
1268 eSIR_SME_DEAUTH_FROM_PEER,
1269 eSIR_SME_DISASSOC_FROM_PEER,
1270 eSIR_SME_LOST_LINK_WITH_PEER,
1271 eSIR_SME_CHANNEL_SWITCH,
1272 eSIR_SME_JOINED_NEW_BSS,
1273 eSIR_SME_LEAVING_BSS,
1274 eSIR_SME_IBSS_ACTIVE,
1275 eSIR_SME_IBSS_INACTIVE,
1276 eSIR_SME_IBSS_PEER_DEPARTED,
1277 eSIR_SME_RADAR_DETECTED,
1278 eSIR_SME_IBSS_NEW_PEER,
1279 eSIR_SME_AP_CAPS_CHANGED,
1280 eSIR_SME_BACKGROUND_SCAN_FAIL,
1281 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP,
1282 eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
1283} tSirSmeStatusChangeCode;
1284
1285typedef struct sSirSmeNewBssInfo
1286{
1287 tSirMacAddr bssId;
1288 tANI_U8 channelNumber;
1289 tANI_U8 reserved;
1290 tSirMacSSid ssId;
1291} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1292
1293typedef struct sSirSmeApNewCaps
1294{
1295 tANI_U16 capabilityInfo;
1296 tSirMacAddr bssId;
1297 tANI_U8 channelId;
1298 tANI_U8 reserved[3];
1299 tSirMacSSid ssId;
1300} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1301
1302/**
1303 * Table below indicates what information is passed for each of
1304 * the Wireless Media status change notifications:
1305 *
1306 * Status Change code Status change info
1307 * ----------------------------------------------------------------------
1308 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1309 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1310 * eSIR_SME_LOST_LINK_WITH_PEER None
1311 * eSIR_SME_CHANNEL_SWITCH New channel number
1312 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1313 * eSIR_SME_LEAVING_BSS None
1314 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1315 * IBSS apart from this STA that
1316 * started IBSS
1317 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1318 * in IBSS
1319 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1320 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1321 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1322 * that STA is currently associated with
1323 * have changed.
1324 * eSIR_SME_BACKGROUND_SCAN_FAIL Indicates background scan failure
1325 */
1326
1327/// Definition for Wireless medium status change notification
1328typedef struct sSirSmeWmStatusChangeNtf
1329{
1330 tANI_U16 messageType; // eWNI_SME_WM_STATUS_CHANGE_NTF
1331 tANI_U16 length;
1332 tANI_U8 sessionId; // Session ID
1333 tSirSmeStatusChangeCode statusChangeCode;
1334 tSirMacAddr bssId; // Self BSSID
1335 union
1336 {
1337 tANI_U16 deAuthReasonCode; // eSIR_SME_DEAUTH_FROM_PEER
1338 tANI_U16 disassocReasonCode; // eSIR_SME_DISASSOC_FROM_PEER
1339 // none for eSIR_SME_LOST_LINK_WITH_PEER
1340 tANI_U8 newChannelId; // eSIR_SME_CHANNEL_SWITCH
1341 tSirSmeNewBssInfo newBssInfo; // eSIR_SME_JOINED_NEW_BSS
1342 // none for eSIR_SME_LEAVING_BSS
1343 // none for eSIR_SME_IBSS_ACTIVE
1344 // none for eSIR_SME_IBSS_INACTIVE
Jeff Johnson295189b2012-06-20 16:38:30 -07001345 tSirNewIbssPeerInfo newIbssPeerInfo; // eSIR_SME_IBSS_NEW_PEER
1346 tSirSmeApNewCaps apNewCaps; // eSIR_SME_AP_CAPS_CHANGED
1347 tSirBackgroundScanInfo bkgndScanInfo; // eSIR_SME_BACKGROUND_SCAN_FAIL
1348 tAniTitanCBNeighborInfo cbNeighbors; // eSIR_SME_CB_LEGACY_BSS_FOUND_BY_STA
Jeff Johnson295189b2012-06-20 16:38:30 -07001349 } statusChangeInfo;
1350} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1351
1352/// Definition for Disassociation request
1353typedef
Jeff Johnson295189b2012-06-20 16:38:30 -07001354__ani_attr_pre_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001355struct sSirSmeDisassocReq
1356{
1357 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1358 tANI_U16 length;
1359 tANI_U8 sessionId; // Session ID
1360 tANI_U16 transactionId; // Transaction ID for cmd
1361 tSirMacAddr bssId; // Peer BSSID
1362 tSirMacAddr peerMacAddr;
1363 tANI_U16 reasonCode;
1364 tANI_U8 doNotSendOverTheAir; //This flag tells LIM whether to send the disassoc OTA or not
1365 //This will be set in while handing off from one AP to other
Jeff Johnson295189b2012-06-20 16:38:30 -07001366}
Jeff Johnson295189b2012-06-20 16:38:30 -07001367__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001368tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1369
1370/// Definition for Tkip countermeasures request
Jeff Johnson295189b2012-06-20 16:38:30 -07001371typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
1372{
1373 tANI_U16 messageType; // eWNI_SME_DISASSOC_REQ
1374 tANI_U16 length;
1375 tANI_U8 sessionId; // Session ID
1376 tANI_U16 transactionId; // Transaction ID for cmd
1377 tSirMacAddr bssId; // Peer BSSID
1378 tANI_BOOLEAN bEnable; // Start/stop countermeasures
1379} __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001380
1381typedef struct sAni64BitCounters
1382{
1383 tANI_U32 Hi;
1384 tANI_U32 Lo;
1385}tAni64BitCounters, *tpAni64BitCounters;
1386
1387typedef struct sAniSecurityStat
1388{
1389 tAni64BitCounters txBlks;
1390 tAni64BitCounters rxBlks;
1391 tAni64BitCounters formatErrorCnt;
1392 tAni64BitCounters decryptErr;
1393 tAni64BitCounters protExclCnt;
1394 tAni64BitCounters unDecryptableCnt;
1395 tAni64BitCounters decryptOkCnt;
1396
1397}tAniSecurityStat, *tpAniSecurityStat;
1398
1399typedef struct sAniTxRxCounters
1400{
1401 tANI_U32 txFrames; // Incremented for every packet tx
1402 tANI_U32 rxFrames;
1403 tANI_U32 nRcvBytes;
1404 tANI_U32 nXmitBytes;
1405}tAniTxRxCounters, *tpAniTxRxCounters;
1406
1407typedef struct sAniTxRxStats
1408{
1409 tAni64BitCounters txFrames;
1410 tAni64BitCounters rxFrames;
1411 tAni64BitCounters nRcvBytes;
1412 tAni64BitCounters nXmitBytes;
1413
1414}tAniTxRxStats,*tpAniTxRxStats;
1415
1416typedef struct sAniSecStats
1417{
1418 tAniSecurityStat aes;
1419 tAni64BitCounters aesReplays;
1420 tAniSecurityStat tkip;
1421 tAni64BitCounters tkipReplays;
1422 tAni64BitCounters tkipMicError;
1423
1424 tAniSecurityStat wep;
1425#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1426 tAniSecurityStat wpi;
1427 tAni64BitCounters wpiReplays;
1428 tAni64BitCounters wpiMicError;
1429#endif
1430}tAniSecStats, *tpAniSecStats;
1431
1432#define SIR_MAX_RX_CHAINS 3
1433
1434typedef struct sAniStaStatStruct
1435{
1436 /* following statistic elements till expandPktRxCntLo are not filled with valid data.
1437 * These are kept as it is, since WSM is using this structure.
1438 * These elements can be removed whenever WSM is updated.
1439 * Phystats is used to hold phystats from BD.
1440 */
1441 tANI_U32 sentAesBlksUcastHi;
1442 tANI_U32 sentAesBlksUcastLo;
1443 tANI_U32 recvAesBlksUcastHi;
1444 tANI_U32 recvAesBlksUcastLo;
1445 tANI_U32 aesFormatErrorUcastCnts;
1446 tANI_U32 aesReplaysUcast;
1447 tANI_U32 aesDecryptErrUcast;
1448 tANI_U32 singleRetryPkts;
1449 tANI_U32 failedTxPkts;
1450 tANI_U32 ackTimeouts;
1451 tANI_U32 multiRetryPkts;
1452 tANI_U32 fragTxCntsHi;
1453 tANI_U32 fragTxCntsLo;
1454 tANI_U32 transmittedPktsHi;
1455 tANI_U32 transmittedPktsLo;
1456 tANI_U32 phyStatHi; //These are used to fill in the phystats.
1457 tANI_U32 phyStatLo; //This is only for private use.
1458
1459 tANI_U32 uplinkRssi;
1460 tANI_U32 uplinkSinr;
1461 tANI_U32 uplinkRate;
1462 tANI_U32 downlinkRssi;
1463 tANI_U32 downlinkSinr;
1464 tANI_U32 downlinkRate;
1465 tANI_U32 nRcvBytes;
1466 tANI_U32 nXmitBytes;
1467
1468 // titan 3c stats
1469 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1470 tANI_U32 chunksTxCntLo;
1471 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1472 tANI_U32 compPktRxCntLo;
1473 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1474 tANI_U32 expanPktRxCntLo;
1475
1476
1477 /* Following elements are valid and filled in correctly. They have valid values.
1478 */
1479
1480 //Unicast frames and bytes.
1481 tAniTxRxStats ucStats;
1482
1483 //Broadcast frames and bytes.
1484 tAniTxRxStats bcStats;
1485
1486 //Multicast frames and bytes.
1487 tAniTxRxStats mcStats;
1488
1489 tANI_U32 currentTxRate;
1490 tANI_U32 currentRxRate; //Rate in 100Kbps
1491
1492 tANI_U32 maxTxRate;
1493 tANI_U32 maxRxRate;
1494
1495 tANI_S8 rssi[SIR_MAX_RX_CHAINS];
1496
1497
1498 tAniSecStats securityStats;
1499
1500 tANI_U8 currentRxRateIdx; //This the softmac rate Index.
1501 tANI_U8 currentTxRateIdx;
1502
1503} tAniStaStatStruct, *tpAniStaStatStruct;
1504
1505//Statistics that are not maintained per stations.
1506typedef struct sAniGlobalStatStruct
1507{
1508 tAni64BitCounters txError;
1509 tAni64BitCounters rxError;
1510 tAni64BitCounters rxDropNoBuffer;
1511 tAni64BitCounters rxDropDup;
1512 tAni64BitCounters rxCRCError;
1513
1514 tAni64BitCounters singleRetryPkts;
1515 tAni64BitCounters failedTxPkts;
1516 tAni64BitCounters ackTimeouts;
1517 tAni64BitCounters multiRetryPkts;
1518 tAni64BitCounters fragTxCnts;
1519 tAni64BitCounters fragRxCnts;
1520
1521 tAni64BitCounters txRTSSuccess;
1522 tAni64BitCounters txCTSSuccess;
1523 tAni64BitCounters rxRTSSuccess;
1524 tAni64BitCounters rxCTSSuccess;
1525
1526 tAniSecStats securityStats;
1527
1528 tAniTxRxStats mcStats;
1529 tAniTxRxStats bcStats;
1530
1531}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
1532
1533typedef enum sPacketType
1534{
1535 ePACKET_TYPE_UNKNOWN,
1536 ePACKET_TYPE_11A,
1537 ePACKET_TYPE_11G,
1538 ePACKET_TYPE_11B,
1539 ePACKET_TYPE_11N
1540
1541}tPacketType, *tpPacketType;
1542
1543typedef struct sAniStatSummaryStruct
1544{
1545 tAniTxRxStats uc; //Unicast counters.
1546 tAniTxRxStats bc; //Broadcast counters.
1547 tAniTxRxStats mc; //Multicast counters.
1548 tAni64BitCounters txError;
1549 tAni64BitCounters rxError;
1550 tANI_S8 rssi[SIR_MAX_RX_CHAINS]; //For each chain.
1551 tANI_U32 rxRate; // Rx rate of the last received packet.
1552 tANI_U32 txRate;
1553 tANI_U16 rxMCSId; //MCS index is valid only when packet type is ePACKET_TYPE_11N
1554 tANI_U16 txMCSId;
1555 tPacketType rxPacketType;
1556 tPacketType txPacketType;
1557 tSirMacAddr macAddr; //Mac Address of the station from which above RSSI and rate is from.
1558}tAniStatSummaryStruct,*tpAniStatSummaryStruct;
1559
Jeff Johnson295189b2012-06-20 16:38:30 -07001560//structure for stats that may be reset, like the ones in sta descriptor
1561//The stats are saved into here before reset. It should be tANI_U32 aligned.
1562typedef struct _sPermStaStats
1563{
1564 //tANI_U32 sentAesBlksUcastHi;
1565 //tANI_U32 sentAesBlksUcastLo;
1566 //tANI_U32 recvAesBlksUcastHi;
1567 //tANI_U32 recvAesBlksUcastLo;
1568 tANI_U32 aesFormatErrorUcastCnts;
1569 tANI_U32 aesReplaysUcast;
1570 tANI_U32 aesDecryptErrUcast;
1571 tANI_U32 singleRetryPkts;
1572 tANI_U32 failedTxPkts;
1573 tANI_U32 ackTimeouts;
1574 tANI_U32 multiRetryPkts;
1575 tANI_U32 fragTxCntsHi;
1576 tANI_U32 fragTxCntsLo;
1577 tANI_U32 transmittedPktsHi;
1578 tANI_U32 transmittedPktsLo;
1579
1580 // titan 3c stats
1581 tANI_U32 chunksTxCntHi; // Number of Chunks Transmitted
1582 tANI_U32 chunksTxCntLo;
1583 tANI_U32 compPktRxCntHi; // Number of Packets Received that were actually compressed
1584 tANI_U32 compPktRxCntLo;
1585 tANI_U32 expanPktRxCntHi; // Number of Packets Received that got expanded
1586 tANI_U32 expanPktRxCntLo;
1587}tPermanentStaStats;
1588
Jeff Johnson295189b2012-06-20 16:38:30 -07001589
1590
1591
1592/// Definition for Disassociation response
1593typedef struct sSirSmeDisassocRsp
1594{
1595 tANI_U16 messageType; // eWNI_SME_DISASSOC_RSP
1596 tANI_U16 length;
1597 tANI_U8 sessionId; // Session ID
1598 tANI_U16 transactionId; // Transaction ID for cmd
1599 tSirResultCodes statusCode;
1600 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001601 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001602 tANI_U16 staId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001603}
Jeff Johnson295189b2012-06-20 16:38:30 -07001604__ani_attr_packed
Jeff Johnson295189b2012-06-20 16:38:30 -07001605 tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1606
1607/// Definition for Disassociation indication from peer
1608typedef struct sSirSmeDisassocInd
1609{
1610 tANI_U16 messageType; // eWNI_SME_DISASSOC_IND
1611 tANI_U16 length;
1612 tANI_U8 sessionId; // Session Identifier
1613 tANI_U16 transactionId; // Transaction Identifier with PE
1614 tSirResultCodes statusCode;
1615 tSirMacAddr bssId;
1616 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001617 tAniStaStatStruct perStaStats; // STA stats
Jeff Johnson295189b2012-06-20 16:38:30 -07001618 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001619 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001620} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1621
1622/// Definition for Disassociation confirm
1623/// MAC --->
1624typedef struct sSirSmeDisassocCnf
1625{
1626 tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
1627 tANI_U16 length;
1628 tSirResultCodes statusCode;
1629 tSirMacAddr bssId;
1630 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001631} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
1632
1633/// Definition for Deauthetication request
1634typedef struct sSirSmeDeauthReq
1635{
1636 tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ
1637 tANI_U16 length;
1638 tANI_U8 sessionId; // Session ID
1639 tANI_U16 transactionId; // Transaction ID for cmd
1640 tSirMacAddr bssId; // AP BSSID
1641 tSirMacAddr peerMacAddr;
1642 tANI_U16 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001643} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1644
1645/// Definition for Deauthetication response
1646typedef struct sSirSmeDeauthRsp
1647{
1648 tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP
1649 tANI_U16 length;
1650 tANI_U8 sessionId; // Session ID
1651 tANI_U16 transactionId; // Transaction ID for cmd
1652 tSirResultCodes statusCode;
1653 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001654} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1655
1656/// Definition for Deauthetication indication from peer
1657typedef struct sSirSmeDeauthInd
1658{
1659 tANI_U16 messageType; // eWNI_SME_DEAUTH_IND
1660 tANI_U16 length;
1661 tANI_U8 sessionId; //Added for BT-AMP
1662 tANI_U16 transactionId; //Added for BT-AMP
1663 tSirResultCodes statusCode;
1664 tSirMacAddr bssId;// AP BSSID
1665 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001666
Jeff Johnson295189b2012-06-20 16:38:30 -07001667 tANI_U16 staId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001668 tANI_U32 reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001669} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1670
1671/// Definition for Deauthentication confirm
1672/// MAC --->
1673typedef struct sSirSmeDeauthCnf
1674{
1675 tANI_U16 messageType; // eWNI_SME_DEAUTH_CNF
1676 tANI_U16 length;
1677 tSirResultCodes statusCode;
1678 tSirMacAddr bssId; // AP BSSID
1679 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001680} tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1681
1682/// Definition for stop BSS request message
1683typedef struct sSirSmeStopBssReq
1684{
1685 tANI_U16 messageType; // eWNI_SME_STOP_BSS_REQ
1686 tANI_U16 length;
1687 tANI_U8 sessionId; //Session ID
1688 tANI_U16 transactionId; //tranSaction ID for cmd
1689 tSirResultCodes reasonCode;
1690 tSirMacAddr bssId; //Self BSSID
1691} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1692
1693/// Definition for stop BSS response message
1694typedef struct sSirSmeStopBssRsp
1695{
1696 tANI_U16 messageType; // eWNI_SME_STOP_BSS_RSP
1697 tANI_U16 length;
1698 tSirResultCodes statusCode;
1699 tANI_U8 sessionId; // Session ID
1700 tANI_U16 transactionId; // Transaction ID for cmd
1701} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1702
Jeff Johnson295189b2012-06-20 16:38:30 -07001703
1704
1705/// Definition for Channel Switch indication for station
1706/// MAC --->
1707typedef struct sSirSmeSwitchChannelInd
1708{
1709 tANI_U16 messageType; // eWNI_SME_SWITCH_CHL_REQ
1710 tANI_U16 length;
1711 tANI_U8 sessionId;
1712 tANI_U16 newChannelId;
1713 tSirMacAddr bssId; // BSSID
1714} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1715
1716/// Definition for ULA complete indication message
1717typedef struct sirUlaCompleteInd
1718{
1719 tANI_U16 messageType; // eWNI_ULA_COMPLETE_IND
1720 tANI_U16 length;
1721 tSirResultCodes statusCode;
1722 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001723} tSirUlaCompleteInd, *tpSirUlaCompleteInd;
1724
1725/// Definition for ULA complete confirmation message
1726typedef struct sirUlaCompleteCnf
1727{
1728 tANI_U16 messageType; // eWNI_ULA_COMPLETE_CNF
1729 tANI_U16 length;
1730 tSirResultCodes statusCode;
1731 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001732} tSirUlaCompleteCnf, *tpSirUlaCompleteCnf;
1733
1734/// Definition for Neighbor BSS indication
1735/// MAC --->
1736/// MAC reports this each time a new I/BSS is detected
1737typedef struct sSirSmeNeighborBssInd
1738{
1739 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND
1740 tANI_U16 length;
1741 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -07001742 tSirBssDescription bssDescription[1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001743} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1744
1745/// Definition for MIC failure indication
1746/// MAC --->
1747/// MAC reports this each time a MIC failure occures on Rx TKIP packet
1748typedef struct sSirSmeMicFailureInd
1749{
1750 tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND
1751 tANI_U16 length;
1752 tANI_U8 sessionId;
1753 tSirMacAddr bssId; // BSSID
1754 tSirMicFailureInfo info;
1755} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1756
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -08001757typedef struct sSirSmeMissedBeaconInd
1758{
1759 tANI_U16 messageType; // eWNI_SME_MISSED_BEACON_IND
1760 tANI_U16 length;
1761 tANI_U8 bssIdx;
1762} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07001763
1764/// Definition for Set Context request
1765/// ---> MAC
1766typedef struct sSirSmeSetContextReq
1767{
1768 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_REQ
1769 tANI_U16 length;
1770 tANI_U8 sessionId; //Session ID
1771 tANI_U16 transactionId; //Transaction ID for cmd
1772 tSirMacAddr peerMacAddr;
1773 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07001774 // TBD Following QOS fields to be uncommented
1775 //tAniBool qosInfoPresent;
1776 //tSirQos qos;
1777 tSirKeyMaterial keyMaterial;
1778} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1779
1780/// Definition for Set Context response
1781/// MAC --->
1782typedef struct sSirSmeSetContextRsp
1783{
1784 tANI_U16 messageType; // eWNI_SME_SET_CONTEXT_RSP
1785 tANI_U16 length;
1786 tANI_U8 sessionId; // Session ID
1787 tANI_U16 transactionId; // Transaction ID for cmd
1788 tSirResultCodes statusCode;
1789 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001790} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1791
1792/// Definition for Remove Key Context request
1793/// ---> MAC
1794typedef struct sSirSmeRemoveKeyReq
1795{
1796 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_REQ
1797 tANI_U16 length;
1798 tANI_U8 sessionId; // Session ID
1799 tANI_U16 transactionId; // Transaction ID for cmd
1800 tSirMacAddr bssId; // BSSID
1801 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001802 tANI_U8 edType;
1803 tANI_U8 wepType;
1804 tANI_U8 keyId;
1805 tANI_BOOLEAN unicast;
1806} tSirSmeRemoveKeyReq, *tpSirSmeRemoveKeyReq;
1807
1808/// Definition for Remove Key Context response
1809/// MAC --->
1810typedef struct sSirSmeRemoveKeyRsp
1811{
1812 tANI_U16 messageType; // eWNI_SME_REMOVE_KEY_RSP
1813 tANI_U16 length;
1814 tANI_U8 sessionId; // Session ID
1815 tANI_U16 transactionId; // Transaction ID for cmd
1816 tSirResultCodes statusCode;
1817 tSirMacAddr peerMacAddr;
Jeff Johnson295189b2012-06-20 16:38:30 -07001818} tSirSmeRemoveKeyRsp, *tpSirSmeRemoveKeyRsp;
1819
1820/// Definition for Set Power request
1821/// ---> MAC
1822typedef struct sSirSmeSetPowerReq
1823{
1824 tANI_U16 messageType; // eWNI_SME_SET_POWER_REQ
1825 tANI_U16 length;
1826 tANI_U16 transactionId; // Transaction ID for cmd
1827 tANI_S8 powerLevel;
1828} tSirSmeSetPowerReq, *tpSirSmeSetPowerReq;
1829
1830/// Definition for Set Power response
1831/// MAC --->
1832typedef struct sSirSmeSetPowerRsp
1833{
1834 tANI_U16 messageType; // eWNI_SME_SET_POWER_RSP
1835 tANI_U16 length;
1836 tSirResultCodes statusCode;
1837 tANI_U16 transactionId; // Transaction ID for cmd
1838} tSirSmeSetPowerRsp, *tpSirSmeSetPowerRsp;
1839
Jeff Johnson295189b2012-06-20 16:38:30 -07001840
1841/// Definition for Link Test Start response
1842/// MAC --->
1843typedef struct sSirSmeLinkTestStartRsp
1844{
1845 tANI_U16 messageType; // eWNI_SME_LINK_TEST_START_RSP
1846 tANI_U16 length;
1847 tSirMacAddr peerMacAddr;
1848 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001849} tSirSmeLinkTestStartRsp, *tpSirSmeLinkTestStartRsp;
1850
1851/// Definition for Link Test Stop response
1852/// WSM ---> MAC
1853typedef struct sSirSmeLinkTestStopRsp
1854{
1855 tANI_U16 messageType; // eWNI_SME_LINK_TEST_STOP_RSP
1856 tANI_U16 length;
1857 tSirMacAddr peerMacAddr;
1858 tSirResultCodes statusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001859} tSirSmeLinkTestStopRsp, *tpSirSmeLinkTestStopRsp;
1860
1861/// Definition for kick starting DFS measurements
1862typedef struct sSirSmeDFSreq
1863{
1864 tANI_U16 messageType; // eWNI_SME_DFS_REQ
1865 tANI_U16 length;
1866 tANI_U16 transactionId; // Transaction ID for cmd
1867} tSirSmeDFSrequest, *tpSirSmeDFSrequest;
1868
1869/// Definition for response message to previously
1870/// issued DFS request
1871typedef struct sSirSmeDFSrsp
1872{
1873 tANI_U16 messageType; // eWNI_SME_DFS_RSP
1874 tANI_U16 length;
1875 tSirResultCodes statusCode;
1876 tANI_U16 transactionId; // Transaction ID for cmd
1877 tANI_U32 dfsReport[1];
1878} tSirSmeDFSrsp, *tpSirSmeDFSrsp;
1879
1880/// Statistic definitions
1881//=============================================================
1882// Per STA statistic structure; This same struct will be used for Aggregate
1883// STA stats as well.
1884
1885// Clear radio stats and clear per sta stats
1886typedef enum
1887{
1888 eANI_CLEAR_ALL_STATS, // Clears all stats
1889 eANI_CLEAR_RX_STATS, // Clears RX statistics of the radio interface
1890 eANI_CLEAR_TX_STATS, // Clears TX statistics of the radio interface
1891 eANI_CLEAR_RADIO_STATS, // Clears all the radio stats
1892 eANI_CLEAR_PER_STA_STATS, // Clears Per STA stats
1893 eANI_CLEAR_AGGR_PER_STA_STATS, // Clears aggregate stats
1894
1895 // Used to distinguish between per sta to security stats.
1896 // Used only by AP, FW just returns the same parameter as it received.
1897 eANI_LINK_STATS, // Get Per STA stats
1898 eANI_SECURITY_STATS, // Get Per STA security stats
1899
1900 eANI_CLEAR_STAT_TYPES_END
1901} tAniStatSubTypes;
1902
1903typedef struct sAniTxCtrs
1904{
1905 // add the rate counters here
1906 tANI_U32 tx1Mbps;
1907 tANI_U32 tx2Mbps;
1908 tANI_U32 tx5_5Mbps;
1909 tANI_U32 tx6Mbps;
1910 tANI_U32 tx9Mbps;
1911 tANI_U32 tx11Mbps;
1912 tANI_U32 tx12Mbps;
1913 tANI_U32 tx18Mbps;
1914 tANI_U32 tx24Mbps;
1915 tANI_U32 tx36Mbps;
1916 tANI_U32 tx48Mbps;
1917 tANI_U32 tx54Mbps;
1918 tANI_U32 tx72Mbps;
1919 tANI_U32 tx96Mbps;
1920 tANI_U32 tx108Mbps;
1921
1922 // tx path radio counts
1923 tANI_U32 txFragHi;
1924 tANI_U32 txFragLo;
1925 tANI_U32 txFrameHi;
1926 tANI_U32 txFrameLo;
1927 tANI_U32 txMulticastFrameHi;
1928 tANI_U32 txMulticastFrameLo;
1929 tANI_U32 txFailedHi;
1930 tANI_U32 txFailedLo;
1931 tANI_U32 multipleRetryHi;
1932 tANI_U32 multipleRetryLo;
1933 tANI_U32 singleRetryHi;
1934 tANI_U32 singleRetryLo;
1935 tANI_U32 ackFailureHi;
1936 tANI_U32 ackFailureLo;
1937 tANI_U32 xmitBeacons;
1938
1939 // titan 3c stats
1940 tANI_U32 txCbEscPktCntHi; // Total Number of Channel Bonded/Escort Packet Transmitted
1941 tANI_U32 txCbEscPktCntLo;
1942 tANI_U32 txChunksCntHi; // Total Number of Chunks Transmitted
1943 tANI_U32 txChunksCntLo;
1944 tANI_U32 txCompPktCntHi; // Total Number of Compresssed Packet Transmitted
1945 tANI_U32 txCompPktCntLo;
1946 tANI_U32 tx50PerCompPktCntHi; // Total Number of Packets with 50% or more compression
1947 tANI_U32 tx50PerCompPktCntLo;
1948 tANI_U32 txExpanPktCntHi; // Total Number of Packets Transmitted that got expanded
1949 tANI_U32 txExpanPktCntLo;
1950} tAniTxCtrs, *tpAniTxCtrs;
1951
1952typedef struct sAniRxCtrs
1953{
1954 // receive frame rate counters
1955 tANI_U32 rx1Mbps;
1956 tANI_U32 rx2Mbps;
1957 tANI_U32 rx5_5Mbps;
1958 tANI_U32 rx6Mbps;
1959 tANI_U32 rx9Mbps;
1960 tANI_U32 rx11Mbps;
1961 tANI_U32 rx12Mbps;
1962 tANI_U32 rx18Mbps;
1963 tANI_U32 rx24Mbps;
1964 tANI_U32 rx36Mbps;
1965 tANI_U32 rx48Mbps;
1966 tANI_U32 rx54Mbps;
1967 tANI_U32 rx72Mbps;
1968 tANI_U32 rx96Mbps;
1969 tANI_U32 rx108Mbps;
1970
1971 // receive size counters; 'Lte' = Less than or equal to
1972 tANI_U32 rxLte64;
1973 tANI_U32 rxLte128Gt64;
1974 tANI_U32 rxLte256Gt128;
1975 tANI_U32 rxLte512Gt256;
1976 tANI_U32 rxLte1kGt512;
1977 tANI_U32 rxLte1518Gt1k;
1978 tANI_U32 rxLte2kGt1518;
1979 tANI_U32 rxLte4kGt2k;
1980
1981 // rx radio stats
1982 tANI_U32 rxFrag;
1983 tANI_U32 rxFrame;
1984 tANI_U32 fcsError;
1985 tANI_U32 rxMulticast;
1986 tANI_U32 duplicate;
1987 tANI_U32 rtsSuccess;
1988 tANI_U32 rtsFailed;
1989 tANI_U32 wepUndecryptables;
1990 tANI_U32 drops;
1991 tANI_U32 aesFormatErrorUcastCnts;
1992 tANI_U32 aesReplaysUcast;
1993 tANI_U32 aesDecryptErrUcast;
1994
1995 // titan 3c stats
1996 tANI_U32 rxDecompPktCntHi; // Total Number of Packets that got decompressed
1997 tANI_U32 rxDecompPktCntLo;
1998 tANI_U32 rxCompPktCntHi; // Total Number of Packets received that were actually compressed
1999 tANI_U32 rxCompPktCntLo;
2000 tANI_U32 rxExpanPktCntHi; // Total Number of Packets received that got expanded
2001 tANI_U32 rxExpanPktCntLo;
2002} tAniRxCtrs, *tpAniRxCtrs;
2003
2004// Radio stats
2005typedef struct sAniRadioStats
2006{
2007 tAniTxCtrs tx;
2008 tAniRxCtrs rx;
2009} tAniRadioStats, *tpAniRadioStats;
2010
2011// Get Radio Stats request structure
2012// This structure shall be used for both Radio stats and Aggregate stats
2013// A valid request must contain entire structure with/without valid fields.
2014// Based on the request type, the valid fields will be checked.
2015typedef struct sAniGetStatsReq
2016{
2017 // Common for all types are requests
2018 tANI_U16 msgType; // message type is same as the request type
2019 tANI_U16 msgLen; // length of the entire request
2020 tANI_U8 sessionId; //Session ID
2021 tANI_U16 transactionId;
2022 tSirMacAddr bssId; //BSSID
2023 // only used for clear stats and per sta stats clear
2024 tAniStatSubTypes stat; // Clears the stats of the described types.
2025 tANI_U32 staId; // Per STA stats request must contain valid
2026 // values
2027 tANI_U8 macAddr[6];
2028} tAniGetStatsReq, *tpAniGetStatsReq;
2029
2030// Get Radio Stats response struct
2031typedef struct sAniGetRadioStatsRsp
2032{
2033 tANI_U16 type; // message type is same as the request type
2034 tANI_U16 msgLen; // length of the entire request
2035 tANI_U32 rc;
2036 tANI_U16 transactionId;
2037 tAniRadioStats radio;
2038} tAniGetRadioStatsRsp, *tpAniGetRadioStatsRsp;
2039
2040// Per Sta stats response struct
2041typedef struct sAniGetPerStaStatsRsp
2042{
2043 tANI_U16 type; // message type is same as the request type
2044 tANI_U16 msgLen; // length of the entire request
2045 tANI_U32 rc;
2046 tANI_U16 transactionId;
2047 tAniStatSubTypes stat; // Sub type needed by AP. Returns the same value
2048 tAniStaStatStruct sta;
2049 tANI_U32 staId;
2050 tANI_U8 macAddr[6];
2051} tAniGetPerStaStatsRsp, *tpAniGetPerStaStatsRsp;
2052
2053// Get Aggregate stats
2054typedef struct sAniGetAggrStaStatsRsp
2055{
2056 tANI_U16 type; // message type is same as the request type
2057 tANI_U16 msgLen; // length of the entire request
2058 tANI_U32 rc;
2059 tANI_U16 transactionId;
2060 tAniStaStatStruct sta;
2061} tAniGetAggrStaStatsRsp, *tpAniGetAggrStaStatsRsp;
2062
2063// Clear stats request and response structure. 'rc' field is unused in
2064// request and this field is used in response field.
2065typedef struct sAniClearStatsRsp
2066{
2067 tANI_U16 type; // message type is same as the request type
2068 tANI_U16 msgLen; // length of the entire request
2069 tANI_U32 rc; // return code - will be filled by FW on
2070 // response.
2071 // Same transaction ID will be returned by the FW
2072 tANI_U16 transactionId;
2073 tAniStatSubTypes stat; // Clears the stats of the described types.
2074 tANI_U32 staId; // Applicable only to PER STA stats clearing
2075 tANI_U8 macAddr[6]; // Applicable only to PER STA stats clearing
2076} tAniClearStatsRsp, *tpAniClearStatsRsp;
2077
2078typedef struct sAniGetGlobalStatsRsp
2079{
2080 tANI_U16 type; // message type is same as the request type
2081 tANI_U16 msgLen; // length of the entire request
2082 tANI_U32 rc;
2083 tANI_U16 transactionId;
2084 tAniGlobalStatStruct global;
2085} tAniGetGlobalStatsRsp, *tpAniGetGlobalStatsRsp;
2086
2087typedef struct sAniGetStatSummaryRsp
2088{
2089 tANI_U16 type; // message type is same as the request type
2090 tANI_U16 msgLen; // length of the entire request --Why?
2091 tANI_U32 rc;
2092 tANI_U16 transactionId;
2093 tAniStatSummaryStruct stat;
2094} tAniGetStatSummaryRsp, *tpAniGetStatSummaryRsp;
2095
2096//***************************************************************
2097
2098
2099/*******************PE Statistics*************************/
2100typedef enum
2101{
2102 PE_SUMMARY_STATS_INFO = 0x00000001,
2103 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
2104 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
2105 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
2106 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
2107 PE_PER_STA_STATS_INFO = 0x00000020
2108}ePEStatsMask;
2109
2110/*
2111 * tpAniGetPEStatsReq is tied to
2112 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
2113 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
2114 */
2115typedef struct sAniGetPEStatsReq
2116{
2117 // Common for all types are requests
2118 tANI_U16 msgType; // message type is same as the request type
2119 tANI_U16 msgLen; // length of the entire request
2120 tANI_U32 staId; // Per STA stats request must contain valid
2121 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2122} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
2123
2124/*
2125 * tpAniGetPEStatsRsp is tied to
2126 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
2127 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
2128 */
2129typedef struct sAniGetPEStatsRsp
2130{
2131 // Common for all types are responses
2132 tANI_U16 msgType; // message type is same as the request type
2133 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2134 tANI_U8 sessionId;
2135 tANI_U32 rc; //success/failure
2136 tANI_U32 staId; // Per STA stats request must contain valid
2137 tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
2138/**********************************************************************************************
2139 //void *pStatsBuf;
2140 The Stats buffer starts here and can be an aggregate of more than one statistics
2141 structure depending on statsMask.The void pointer "pStatsBuf" is commented out
2142 intentionally and the src code that uses this structure should take that into account.
2143**********************************************************************************************/
2144} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
2145
2146typedef struct sAniGetRssiReq
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_U8 sessionId;
2152 tANI_U8 staId;
2153 void *rssiCallback;
2154 void *pDevContext; //device context
2155 void *pVosContext; //voss context
2156
2157} tAniGetRssiReq, *tpAniGetRssiReq;
2158
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302159typedef struct sAniGetSnrReq
2160{
2161 // Common for all types are requests
2162 tANI_U16 msgType; // message type is same as the request type
2163 tANI_U16 msgLen; // length of the entire request
2164 tANI_U8 sessionId;
2165 tANI_U8 staId;
2166 void *snrCallback;
2167 void *pDevContext; //device context
2168} tAniGetSnrReq, *tpAniGetSnrReq;
2169
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002170#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08002171typedef struct sAniGetRoamRssiRsp
2172{
2173 // Common for all types are responses
2174 tANI_U16 msgType; // message type is same as the request type
2175 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2176 tANI_U8 sessionId;
2177 tANI_U32 rc; //success/failure
2178 tANI_U32 staId; // Per STA stats request must contain valid
2179 tANI_S8 rssi;
2180 void *rssiReq; //rssi request backup
2181
2182} tAniGetRoamRssiRsp, *tpAniGetRoamRssiRsp;
2183
2184#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002185
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002186#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002187
2188typedef struct sSirTsmIE
2189{
2190 tANI_U8 tsid;
2191 tANI_U8 state;
2192 tANI_U16 msmt_interval;
2193} tSirTsmIE, *tpSirTsmIE;
2194
2195typedef struct sSirSmeTsmIEInd
2196{
2197 tSirTsmIE tsmIe;
2198 tANI_U8 sessionId;
2199} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
2200
2201
2202typedef struct sAniTrafStrmMetrics
2203{
2204 tANI_U16 UplinkPktQueueDly;
2205 tANI_U16 UplinkPktQueueDlyHist[4];
2206 tANI_U32 UplinkPktTxDly;
2207 tANI_U16 UplinkPktLoss;
2208 tANI_U16 UplinkPktCount;
2209 tANI_U8 RoamingCount;
2210 tANI_U16 RoamingDly;
2211} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
2212
2213typedef struct sAniGetTsmStatsReq
2214{
2215 // Common for all types are requests
2216 tANI_U16 msgType; // message type is same as the request type
2217 tANI_U16 msgLen; // length of the entire request
2218 tANI_U8 staId;
2219 tANI_U8 tid; // traffic id
2220 tSirMacAddr bssId;
2221 void *tsmStatsCallback;
2222 void *pDevContext; //device context
2223 void *pVosContext; //voss context
2224} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
2225
2226typedef struct sAniGetTsmStatsRsp
2227{
2228 // Common for all types are responses
2229 tANI_U16 msgType; // message type is same as the request type
2230 tANI_U16 msgLen; // length of the entire request, includes the pStatsBuf length too
2231 tANI_U8 sessionId;
2232 tANI_U32 rc; //success/failure
2233 tANI_U32 staId; // Per STA stats request must contain valid
2234 tAniTrafStrmMetrics tsmMetrics;
2235 void *tsmStatsReq; //tsm stats request backup
2236} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002237
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002238typedef struct sSirEseBcnReportBssInfo
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002239{
2240 tBcnReportFields bcnReportFields;
2241 tANI_U8 ieLen;
2242 tANI_U8 *pBuf;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002243} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002244
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002245typedef struct sSirEseBcnReportRsp
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002246{
2247 tANI_U16 measurementToken;
2248 tANI_U8 flag; /* Flag to report measurement done and more data */
2249 tANI_U8 numBss;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002250 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
2251} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08002252
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002253#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002254
Jeff Johnson295189b2012-06-20 16:38:30 -07002255/* Change country code request MSG structure */
2256typedef struct sAniChangeCountryCodeReq
2257{
2258 // Common for all types are requests
2259 tANI_U16 msgType; // message type is same as the request type
2260 tANI_U16 msgLen; // length of the entire request
2261 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05302262 tAniBool countryFromUserSpace;
Abhishek Singha306a442013-11-07 18:39:01 +05302263 tAniBool sendRegHint; //TRUE if we want to send hint to NL80211
Jeff Johnson295189b2012-06-20 16:38:30 -07002264 void *changeCCCallback;
2265 void *pDevContext; //device context
2266 void *pVosContext; //voss context
Amar Singhal0d15bd52013-10-12 23:13:13 -07002267
Jeff Johnson295189b2012-06-20 16:38:30 -07002268} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
2269
Amar Singhal0d15bd52013-10-12 23:13:13 -07002270/* generic country code change request MSG structure */
2271typedef struct sAniGenericChangeCountryCodeReq
2272{
2273 // Common for all types are requests
2274 tANI_U16 msgType; // message type is same as the request type
2275 tANI_U16 msgLen; // length of the entire request
2276 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //3 char country code
2277 tANI_U16 domain_index;
Amar Singhal0d15bd52013-10-12 23:13:13 -07002278} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
2279
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05302280typedef struct sAniDHCPStopInd
2281{
2282 tANI_U16 msgType; // message type is same as the request type
2283 tANI_U16 msgLen; // length of the entire request
2284 tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
2285 tSirMacAddr macAddr;
2286
2287} tAniDHCPInd, *tpAniDHCPInd;
2288
Jeff Johnson295189b2012-06-20 16:38:30 -07002289typedef struct sAniSummaryStatsInfo
2290{
2291 tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
2292 tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
2293 // station successfully transmitted after more than one retransmission attempt
2294
2295 tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
2296 //(with and without retries, including multi-cast, broadcast)
2297 //tANI_U32 tx_fail_cnt;
2298 //tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
2299 //tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
2300 tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
2301 //(after appropriate filter rules including multi-cast, broadcast)
2302 tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
2303 tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
2304 tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
2305 tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
2306 tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
2307 tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
2308 //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
2309 tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
2310 tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
2311 //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
2312 //to provide this.
2313#if 0
2314 //providing the following stats, in case of wrap around for tx_byte_cnt
2315 tANI_U32 tx_unicast_lower_byte_cnt;
2316 tANI_U32 tx_unicast_upper_byte_cnt;
2317 tANI_U32 tx_multicast_lower_byte_cnt;
2318 tANI_U32 tx_multicast_upper_byte_cnt;
2319 tANI_U32 tx_broadcast_lower_byte_cnt;
2320 tANI_U32 tx_broadcast_upper_byte_cnt;
2321#endif
2322
2323}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
2324
2325typedef enum eTxRateInfo
2326{
2327 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
2328 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
2329 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
2330 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
Leo Chang6f8870f2013-03-26 18:11:36 -07002331 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
2332 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
2333 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
2334 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
Jeff Johnson295189b2012-06-20 16:38:30 -07002335} tTxrateinfoflags;
2336
2337typedef struct sAniGlobalClassAStatsInfo
2338{
2339 tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2340 //or MMPDU frames
2341 tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
2342 //or MMPDU frames when a promiscuous packet filter was enabled
2343 //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
2344 tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
2345 //of 1024 bytes at the antenna connector. Each element of the array shall correspond
2346 //to a supported rate and the order shall be the same as the supporteRates parameter.
2347 tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
2348 //for eg: if it is 10.5dBm, the value would be 105
2349 //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
2350 tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
2351 //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
2352 tANI_U32 tx_rate; //Legacy transmit rate, in units of
2353 //500 kbit/sec, for the most
2354 //recently transmitted frame
2355 tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
2356 tANI_U32 tx_rate_flags; //to differentiate between HT20 and
2357 //HT40 rates; short and long guard interval
2358
2359}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
2360
2361
2362typedef struct sAniGlobalSecurityStats
2363{
2364 tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
2365 //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
2366 //is enabled
2367 tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
2368 //because of MIC failures
2369 tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2370 //because of a TKIP ICV error
2371 tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
2372 //invalid AES-CCMP format
2373 tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
2374 //the AES-CCMP replay protection procedure
2375 tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
2376 //errors detected by the AES-CCMP decryption algorithm
2377 tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
2378 //not available on the 802.11 station
2379 tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
2380 //because of a WEP ICV error
2381 tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
2382 //decrypted
2383 tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
2384
2385}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
2386
2387typedef struct sAniGlobalClassBStatsInfo
2388{
2389 tAniGlobalSecurityStats ucStats;
2390 tAniGlobalSecurityStats mcbcStats;
2391}tAniGlobalClassBStatsInfo, *tpAniGlobalClassBStatsInfo;
2392
2393typedef struct sAniGlobalClassCStatsInfo
2394{
2395 tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
2396 //MAC address in the address 1 field or an A-MSDU frame with a group address in the
2397 //address 1 field
2398 tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
2399 tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
2400 //primary channel
2401 tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
2402 tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
2403 //when an A-MPDU is received
2404 tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
2405 //is the first CRC error in the received AMPDU or when the previous delimiter has been
2406 //decoded correctly
2407
2408}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
2409
2410typedef struct sAniPerStaStatsInfo
2411{
2412 tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
2413 //through a received 802.11 ACK frame
2414 tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
2415 tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
2416 //is transmitted
2417
2418}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
2419
2420/**********************PE Statistics end*************************/
2421
2422
2423
2424typedef struct sSirRSSIThresholds
2425{
2426#ifdef ANI_BIG_BYTE_ENDIAN
2427 tANI_S8 ucRssiThreshold1 : 8;
2428 tANI_S8 ucRssiThreshold2 : 8;
2429 tANI_S8 ucRssiThreshold3 : 8;
2430 tANI_U8 bRssiThres1PosNotify : 1;
2431 tANI_U8 bRssiThres1NegNotify : 1;
2432 tANI_U8 bRssiThres2PosNotify : 1;
2433 tANI_U8 bRssiThres2NegNotify : 1;
2434 tANI_U8 bRssiThres3PosNotify : 1;
2435 tANI_U8 bRssiThres3NegNotify : 1;
2436 tANI_U8 bReserved10 : 2;
2437#else
2438 tANI_U8 bReserved10 : 2;
2439 tANI_U8 bRssiThres3NegNotify : 1;
2440 tANI_U8 bRssiThres3PosNotify : 1;
2441 tANI_U8 bRssiThres2NegNotify : 1;
2442 tANI_U8 bRssiThres2PosNotify : 1;
2443 tANI_U8 bRssiThres1NegNotify : 1;
2444 tANI_U8 bRssiThres1PosNotify : 1;
2445 tANI_S8 ucRssiThreshold3 : 8;
2446 tANI_S8 ucRssiThreshold2 : 8;
2447 tANI_S8 ucRssiThreshold1 : 8;
2448#endif
2449
2450}tSirRSSIThresholds, *tpSirRSSIThresholds;
2451
2452typedef struct sSirRSSINotification
2453{
2454#ifdef ANI_BIG_BYTE_ENDIAN
2455 tANI_U32 bRssiThres1PosCross : 1;
2456 tANI_U32 bRssiThres1NegCross : 1;
2457 tANI_U32 bRssiThres2PosCross : 1;
2458 tANI_U32 bRssiThres2NegCross : 1;
2459 tANI_U32 bRssiThres3PosCross : 1;
2460 tANI_U32 bRssiThres3NegCross : 1;
Srinivasdaaec712012-12-12 15:59:44 -08002461 v_S7_t avgRssi : 8;
2462 tANI_U32 bReserved : 18;
Jeff Johnson295189b2012-06-20 16:38:30 -07002463#else
Srinivasdaaec712012-12-12 15:59:44 -08002464 tANI_U32 bReserved : 18;
2465 v_S7_t avgRssi : 8;
Jeff Johnson295189b2012-06-20 16:38:30 -07002466 tANI_U32 bRssiThres3NegCross : 1;
2467 tANI_U32 bRssiThres3PosCross : 1;
2468 tANI_U32 bRssiThres2NegCross : 1;
2469 tANI_U32 bRssiThres2PosCross : 1;
2470 tANI_U32 bRssiThres1NegCross : 1;
2471 tANI_U32 bRssiThres1PosCross : 1;
2472#endif
2473
2474}tSirRSSINotification, *tpSirRSSINotification;
2475
Viral Modid86bde22012-12-10 13:09:21 -08002476
2477typedef struct sSirP2PNoaStart
2478{
2479 tANI_U32 status;
2480 tANI_U32 bssIdx;
2481} tSirP2PNoaStart, *tpSirP2PNoaStart;
2482
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302483typedef struct sSirTdlsInd
2484{
2485 tANI_U16 status;
2486 tANI_U16 assocId;
2487 tANI_U16 staIdx;
2488 tANI_U16 reasonCode;
2489} tSirTdlsInd, *tpSirTdlsInd;
2490
Jeff Johnson295189b2012-06-20 16:38:30 -07002491typedef struct sSirP2PNoaAttr
2492{
2493#ifdef ANI_BIG_BYTE_ENDIAN
2494 tANI_U32 index :8;
2495 tANI_U32 oppPsFlag :1;
2496 tANI_U32 ctWin :7;
2497 tANI_U32 rsvd1: 16;
2498#else
2499 tANI_U32 rsvd1: 16;
2500 tANI_U32 ctWin :7;
2501 tANI_U32 oppPsFlag :1;
2502 tANI_U32 index :8;
2503#endif
2504
2505#ifdef ANI_BIG_BYTE_ENDIAN
2506 tANI_U32 uNoa1IntervalCnt:8;
2507 tANI_U32 rsvd2:24;
2508#else
2509 tANI_U32 rsvd2:24;
2510 tANI_U32 uNoa1IntervalCnt:8;
2511#endif
2512 tANI_U32 uNoa1Duration;
2513 tANI_U32 uNoa1Interval;
2514 tANI_U32 uNoa1StartTime;
2515
2516#ifdef ANI_BIG_BYTE_ENDIAN
2517 tANI_U32 uNoa2IntervalCnt:8;
2518 tANI_U32 rsvd3:24;
2519#else
2520 tANI_U32 rsvd3:24;
2521 tANI_U32 uNoa2IntervalCnt:8;
2522#endif
2523 tANI_U32 uNoa2Duration;
2524 tANI_U32 uNoa2Interval;
2525 tANI_U32 uNoa2StartTime;
2526} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
Jeff Johnson295189b2012-06-20 16:38:30 -07002527
2528typedef __ani_attr_pre_packed struct sSirTclasInfo
2529{
2530 tSirMacTclasIE tclas;
2531 tANI_U8 version; // applies only for classifier type ip
2532 __ani_attr_pre_packed union {
2533 tSirMacTclasParamEthernet eth;
2534 tSirMacTclasParamIPv4 ipv4;
2535 tSirMacTclasParamIPv6 ipv6;
2536 tSirMacTclasParam8021dq t8021dq;
2537 }__ani_attr_packed tclasParams;
2538} __ani_attr_packed tSirTclasInfo;
2539
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002540
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002541#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002542#define TSRS_11AG_RATE_6MBPS 0xC
2543#define TSRS_11B_RATE_5_5MBPS 0xB
2544
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002545typedef struct sSirMacESETSRSIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002546{
2547 tANI_U8 tsid;
2548 tANI_U8 rates[8];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002549} tSirMacESETSRSIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002550
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002551typedef struct sSirMacESETSMIE
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002552{
2553 tANI_U8 tsid;
2554 tANI_U8 state;
2555 tANI_U16 msmt_interval;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002556} tSirMacESETSMIE;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002557
2558typedef struct sTSMStats
2559{
2560 tANI_U8 tid;
2561 tSirMacAddr bssId;
2562 tTrafStrmMetrics tsmMetrics;
2563} tTSMStats, *tpTSMStats;
2564
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002565typedef struct sEseTSMContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002566{
2567 tANI_U8 tid;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002568 tSirMacESETSMIE tsmInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002569 tTrafStrmMetrics tsmMetrics;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002570} tEseTSMContext, *tpEseTSMContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002571
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002572typedef struct sEsePEContext
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002573{
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002574#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
2575 tEseMeasReq curMeasReq;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002576#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002577 tEseTSMContext tsm;
2578} tEsePEContext, *tpEsePEContext;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002579
2580
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002581#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002582
2583
Jeff Johnson295189b2012-06-20 16:38:30 -07002584typedef struct sSirAddtsReqInfo
2585{
2586 tANI_U8 dialogToken;
2587 tSirMacTspecIE tspec;
2588
2589 tANI_U8 numTclas; // number of Tclas elements
2590 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2591 tANI_U8 tclasProc;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002592#if defined(FEATURE_WLAN_ESE)
2593 tSirMacESETSRSIE tsrsIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002594 tANI_U8 tsrsPresent:1;
2595#endif
2596 tANI_U8 wmeTspecPresent:1;
2597 tANI_U8 wsmTspecPresent:1;
2598 tANI_U8 lleTspecPresent:1;
2599 tANI_U8 tclasProcPresent:1;
2600} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
2601
2602typedef struct sSirAddtsRspInfo
2603{
2604 tANI_U8 dialogToken;
2605 tSirMacStatusCodes status;
2606 tSirMacTsDelayIE delay;
2607
2608 tSirMacTspecIE tspec;
2609 tANI_U8 numTclas; // number of Tclas elements
2610 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
2611 tANI_U8 tclasProc;
2612 tSirMacScheduleIE schedule;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002613#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
2614 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -07002615 tANI_U8 tsmPresent:1;
2616#endif
2617 tANI_U8 wmeTspecPresent:1;
2618 tANI_U8 wsmTspecPresent:1;
2619 tANI_U8 lleTspecPresent:1;
2620 tANI_U8 tclasProcPresent:1;
2621 tANI_U8 schedulePresent:1;
2622} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
2623
2624typedef struct sSirDeltsReqInfo
2625{
2626 tSirMacTSInfo tsinfo;
2627 tSirMacTspecIE tspec;
2628 tANI_U8 wmeTspecPresent:1;
2629 tANI_U8 wsmTspecPresent:1;
2630 tANI_U8 lleTspecPresent:1;
2631} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
2632
2633/// Add a tspec as defined
2634typedef struct sSirAddtsReq
2635{
2636 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2637 tANI_U16 length;
2638 tANI_U8 sessionId; //Session ID
2639 tANI_U16 transactionId;
2640 tSirMacAddr bssId; //BSSID
2641 tANI_U32 timeout; // in ms
2642 tANI_U8 rspReqd;
2643 tSirAddtsReqInfo req;
2644} tSirAddtsReq, *tpSirAddtsReq;
2645
2646typedef struct sSirAddtsRsp
2647{
2648 tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
2649 tANI_U16 length;
2650 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2651 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2652 tANI_U32 rc; // return code
2653 tSirAddtsRspInfo rsp;
2654} tSirAddtsRsp, *tpSirAddtsRsp;
2655
2656typedef struct sSirDeltsReq
2657{
2658 tANI_U16 messageType; // eWNI_SME_DELTS_REQ
2659 tANI_U16 length;
2660 tANI_U8 sessionId;//Session ID
2661 tANI_U16 transactionId;
2662 tSirMacAddr bssId; //BSSID
2663 tANI_U16 aid; // use 0 if macAddr is being specified
2664 tANI_U8 macAddr[6]; // only on AP to specify the STA
2665 tANI_U8 rspReqd;
2666 tSirDeltsReqInfo req;
2667} tSirDeltsReq, *tpSirDeltsReq;
2668
2669typedef struct sSirDeltsRsp
2670{
2671 tANI_U16 messageType; // eWNI_SME_DELTS_RSP
2672 tANI_U16 length;
2673 tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
2674 tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
2675 tANI_U32 rc;
2676 tANI_U16 aid; // use 0 if macAddr is being specified
2677 tANI_U8 macAddr[6]; // only on AP to specify the STA
2678 tSirDeltsReqInfo rsp;
2679} tSirDeltsRsp, *tpSirDeltsRsp;
2680
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002681#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07002682
2683#define SIR_QOS_NUM_TSPEC_MAX 2
2684#define SIR_QOS_NUM_AC_MAX 4
2685
2686typedef struct sSirAggrQosReqInfo
2687{
2688 tANI_U16 tspecIdx;
2689 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2690}tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2691
2692typedef struct sSirAggrQosReq
2693{
2694 tANI_U16 messageType; // eWNI_SME_ADDTS_REQ
2695 tANI_U16 length;
2696 tANI_U8 sessionId; //Session ID
2697 tANI_U16 transactionId;
2698 tSirMacAddr bssId; //BSSID
2699 tANI_U32 timeout; // in ms
2700 tANI_U8 rspReqd;
2701 tSirAggrQosReqInfo aggrInfo;
2702}tSirAggrQosReq, *tpSirAggrQosReq;
2703
2704typedef struct sSirAggrQosRspInfo
2705{
2706 tANI_U16 tspecIdx;
2707 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2708} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2709
2710typedef struct sSirAggrQosRsp
2711{
2712 tANI_U16 messageType;
2713 tANI_U16 length;
2714 tANI_U8 sessionId;
2715 tSirAggrQosRspInfo aggrInfo;
2716} tSirAggrQosRsp, *tpSirAggrQosRsp;
2717
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002718#endif/*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002719
2720typedef struct sSirSetTxPowerReq
2721{
schang86c22c42013-03-13 18:41:24 -07002722 tANI_U16 messageType;
2723 tANI_U16 length;
2724 tSirMacAddr bssId;
2725 tANI_U8 mwPower;
2726 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07002727} tSirSetTxPowerReq, *tpSirSetTxPowerReq;
2728
2729typedef struct sSirSetTxPowerRsp
2730{
2731 tANI_U16 messageType;
2732 tANI_U16 length;
2733 tANI_U32 status;
2734} tSirSetTxPowerRsp, *tpSirSetTxPowerRsp;
2735
2736typedef struct sSirGetTxPowerReq
2737{
2738 tANI_U16 messageType;
2739 tANI_U16 length;
2740 tANI_U16 staid;
2741} tSirGetTxPowerReq, *tpSirGetTxPowerReq;
2742
2743typedef struct sSirGetTxPowerRsp
2744{
2745 tANI_U16 messageType;
2746 tANI_U16 length; // length of the entire request
2747 tANI_U32 power; // units of milliwatts
2748 tANI_U32 status;
2749} tSirGetTxPowerRsp, *tpSirGetTxPowerRsp;
2750
2751
2752typedef tANI_U32 tSirMacNoise[3];
2753
2754typedef struct sSirGetNoiseRsp
2755{
2756 tANI_U16 messageType;
2757 tANI_U16 length;
2758 tSirMacNoise noise;
2759} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
2760
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002761typedef struct sSirQosMapSet
2762{
2763 tANI_U8 present;
2764 tANI_U8 num_dscp_exceptions;
2765 tANI_U8 dscp_exceptions[21][2];
Leela Venkata Kiran Kumar Reddy Chiralafddf3552014-06-11 17:16:30 -07002766 tANI_U8 dscp_range[8][2];
Leela Venkata Kiran Kumar Reddy Chirala8e69fbc2013-10-30 18:51:13 -07002767} tSirQosMapSet, *tpSirQosMapSet;
Jeff Johnson295189b2012-06-20 16:38:30 -07002768
2769//
2770// PMC --> PE --> HAL
2771// Power save configuration parameters
2772//
2773typedef struct sSirPowerSaveCfg
2774{
2775 tANI_U16 listenInterval;
2776
2777 /* Number of consecutive missed beacons before
2778 * hardware generates an interrupt to wake up
2779 * the host. In units of listen interval.
2780 */
2781 tANI_U32 HeartBeatCount;
2782
2783 /* specifies which beacons are to be forwarded
2784 * to host when beacon filtering is enabled.
2785 * In units of listen interval.
2786 */
2787 tANI_U32 nthBeaconFilter;
2788
2789 /* Maximum number of PS-Poll send before
2790 * firmware sends data null with PM set to 0.
2791 */
2792 tANI_U32 maxPsPoll;
2793
2794 /* If the average RSSI value falls below the
2795 * minRssiThreshold, then FW will send an
2796 * interrupt to wake up the host.
2797 */
2798 tANI_U32 minRssiThreshold;
2799
2800 /* Number of beacons for which firmware will
2801 * collect the RSSI values and compute the average.
2802 */
2803 tANI_U8 numBeaconPerRssiAverage;
2804
2805 /* FW collects the RSSI stats for this period
2806 * in BMPS mode.
2807 */
2808 tANI_U8 rssiFilterPeriod;
2809
2810 // Enabling/disabling broadcast frame filter feature
2811 tANI_U8 broadcastFrameFilter;
2812
2813 // Enabling/disabling the ignore DTIM feature
2814 tANI_U8 ignoreDtim;
2815
2816 /* The following configuration parameters are kept
2817 * in order to be backward compatible for Gen5.
2818 * These will NOT be used for Gen6 Libra chip
2819 */
2820 tBeaconForwarding beaconFwd;
2821 tANI_U16 nthBeaconFwd;
2822 tANI_U8 fEnablePwrSaveImmediately;
2823 tANI_U8 fPSPoll;
2824
2825 // Enabling/disabling Beacon Early Termination feature
2826 tANI_U8 fEnableBeaconEarlyTermination;
2827 tANI_U8 bcnEarlyTermWakeInterval;
2828
2829}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
2830
2831/* Reason code for requesting Full Power. This reason code is used by
2832 any module requesting full power from PMC and also by PE when it
2833 sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
2834typedef enum eRequestFullPowerReason
2835{
2836 eSME_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
2837 eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
2838 eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
2839 eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
2840 eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
2841 eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
2842 eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
2843 eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
2844 eSME_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
2845 eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH, /* channel switch request full power*/
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002846#ifdef FEATURE_WLAN_TDLS
2847 eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
2848#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002849 eSME_REASON_OTHER /* No specific reason. General reason code */
2850} tRequestFullPowerReason, tExitBmpsReason;
2851
2852
2853
2854//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message
2855typedef struct sExitBmpsInfo
2856{
2857 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2858}tExitBmpsInfo, *tpExitBmpsInfo;
2859
2860
2861// MAC SW --> SME
2862// Message indicating to SME to exit BMPS sleep mode
2863typedef struct sSirSmeExitBmpsInd
2864{
2865 tANI_U16 mesgType; /* eWNI_PMC_EXIT_BMPS_IND */
2866 tANI_U16 mesgLen;
2867 tSirResultCodes statusCode;
2868 tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */
2869
2870} tSirSmeExitBmpsInd, *tpSirSmeExitBmpsInd;
2871
2872
2873//
2874// HDD -> LIM
2875// tSirMsgQ.type = eWNI_SME_DEL_BA_PEER_IND
2876// tSirMsgQ.reserved = 0
2877// tSirMsgQ.body = instance of tDelBAParams
2878//
2879typedef struct sSmeDelBAPeerInd
2880{
2881 // Message Type
2882 tANI_U16 mesgType;
2883
2884 tSirMacAddr bssId;//BSSID
2885
2886 // Message Length
2887 tANI_U16 mesgLen;
2888
2889 // Station Index
2890 tANI_U16 staIdx;
2891
2892 // TID for which the BA session is being deleted
2893 tANI_U8 baTID;
2894
2895 // DELBA direction
2896 // eBA_INITIATOR - Originator
2897 // eBA_RECEIPIENT - Recipient
2898 tANI_U8 baDirection;
2899} tSmeDelBAPeerInd, *tpSmeDelBAPeerInd;
2900
2901typedef struct sSmeIbssPeerInd
2902{
2903 tANI_U16 mesgType;
2904 tANI_U16 mesgLen;
2905 tANI_U8 sessionId;
2906
2907 tSirMacAddr peerAddr;
2908 tANI_U16 staId;
2909
2910 /*The DPU signatures will be sent eventually to TL to help it determine the
2911 association to which a packet belongs to*/
2912 /*Unicast DPU signature*/
2913 tANI_U8 ucastSig;
2914
2915 /*Broadcast DPU signature*/
2916 tANI_U8 bcastSig;
2917
2918 //Beacon will be appended for new Peer indication.
2919}tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2920
Ravi Joshid2ca7c42013-07-23 08:37:49 -07002921typedef struct sSirIbssPeerInactivityInd
2922{
2923 tANI_U8 bssIdx;
2924 tANI_U8 staIdx;
2925 tSirMacAddr peerAddr;
2926}tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2927
2928
Jeff Johnson295189b2012-06-20 16:38:30 -07002929typedef struct sLimScanChn
2930{
2931 tANI_U16 numTimeScan; //how many time this channel is scan
2932 tANI_U8 channelId;
2933}tLimScanChn;
2934
2935typedef struct sSmeGetScanChnRsp
2936{
2937 // Message Type
2938 tANI_U16 mesgType;
2939 // Message Length
2940 tANI_U16 mesgLen;
2941 tANI_U8 sessionId;
2942 tANI_U8 numChn;
2943 tLimScanChn scanChn[1];
2944} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2945
2946typedef struct sLimScanChnInfo
2947{
2948 tANI_U8 numChnInfo; //number of channels in scanChn
2949 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2950}tLimScanChnInfo;
2951
Jeff Johnson295189b2012-06-20 16:38:30 -07002952typedef struct sSirSmeGetAssocSTAsReq
2953{
2954 tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
2955 tANI_U16 length;
2956 tSirMacAddr bssId; // BSSID
2957 tANI_U16 modId;
2958 void *pUsrContext;
2959 void *pSapEventCallback;
2960 void *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
2961} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07002962
2963typedef struct sSmeMaxAssocInd
2964{
2965 tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
2966 tANI_U16 mesgLen;
2967 tANI_U8 sessionId;
2968 tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
2969} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2970
2971/*--------------------------------------------------------------------*/
2972/* BootLoader message definition */
2973/*--------------------------------------------------------------------*/
2974
2975/*--------------------------------------------------------------------*/
2976/* FW image size */
2977/*--------------------------------------------------------------------*/
2978#define SIR_FW_IMAGE_SIZE 146332
2979
2980
2981#define SIR_BOOT_MODULE_ID 1
2982
2983#define SIR_BOOT_SETUP_IND ((SIR_BOOT_MODULE_ID << 8) | 0x11)
2984#define SIR_BOOT_POST_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x12)
2985#define SIR_BOOT_DNLD_RESULT_IND ((SIR_BOOT_MODULE_ID << 8) | 0x13)
2986#define SIR_BOOT_DNLD_DEV_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x41)
2987#define SIR_BOOT_DNLD_DEV_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x81)
2988#define SIR_BOOT_DNLD_REQ ((SIR_BOOT_MODULE_ID << 8) | 0x42)
2989#define SIR_BOOT_DNLD_RSP ((SIR_BOOT_MODULE_ID << 8) | 0x82)
2990
2991/*--------------------------------------------------------------------*/
2992/* Bootloader message syntax */
2993/*--------------------------------------------------------------------*/
2994
2995// Message header
2996#define SIR_BOOT_MB_HEADER 0
2997#define SIR_BOOT_MB_HEADER2 1
2998
2999#define SIR_BOOT_MSG_HDR_MASK 0xffff0000
3000#define SIR_BOOT_MSG_LEN_MASK 0x0000ffff
3001
3002// BOOT_SETUP_IND parameter indices
3003#define SIR_BOOT_SETUP_IND_MBADDR 2
3004#define SIR_BOOT_SETUP_IND_MBSIZE 3
3005#define SIR_BOOT_SETUP_IND_MEMOPT 4
3006#define SIR_BOOT_SETUP_IND_LEN \
3007 ((SIR_BOOT_SETUP_IND_MEMOPT+1)<<2)
3008
3009// BOOT_POST_RESULT_IND parameter indices
3010#define SIR_BOOT_POST_RESULT_IND_RES 2
3011#define SIR_BOOT_POST_RESULT_IND_LEN \
3012 ((SIR_BOOT_POST_RESULT_IND_RES+1)<<2)
3013
3014#define SIR_BOOT_POST_RESULT_IND_SUCCESS 1
3015#define SIR_BOOT_POST_RESULT_IND_MB_FAILED 2
3016#define SIR_BOOT_POST_RESULT_IND_SDRAM_FAILED 3
3017#define SIR_BOOT_POST_RESULT_IND_ESRAM_FAILED 4
3018
3019
3020// BOOT_DNLD_RESULT_IND parameter indices
3021#define SIR_BOOT_DNLD_RESULT_IND_RES 2
3022#define SIR_BOOT_DNLD_RESULT_IND_LEN \
3023 ((SIR_BOOT_DNLD_RESULT_IND_RES+1)<<2)
3024
3025#define SIR_BOOT_DNLD_RESULT_IND_SUCCESS 1
3026#define SIR_BOOT_DNLD_RESULT_IND_HDR_ERR 2
3027#define SIR_BOOT_DNLD_RESULT_IND_ERR 3
3028
3029// BOOT_DNLD_DEV_REQ
3030#define SIR_BOOT_DNLD_DEV_REQ_SDRAMSIZE 2
3031#define SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE 3
3032#define SIR_BOOT_DNLD_DEV_REQ_LEN \
3033 ((SIR_BOOT_DNLD_DEV_REQ_FLASHSIZE+1)<<2)
3034
3035// BOOT_DNLD_DEV_RSP
3036#define SIR_BOOT_DNLD_DEV_RSP_DEVTYPE 2
3037#define SIR_BOOT_DNLD_DEV_RSP_LEN \
3038 ((SIR_BOOT_DNLD_DEV_RSP_DEVTYPE+1)<<2)
3039
3040#define SIR_BOOT_DNLD_DEV_RSP_SRAM 1
3041#define SIR_BOOT_DNLD_DEV_RSP_FLASH 2
3042
3043// BOOT_DNLD_REQ
3044#define SIR_BOOT_DNLD_REQ_OFFSET 2
3045#define SIR_BOOT_DNLD_REQ_WRADDR 3
3046#define SIR_BOOT_DNLD_REQ_SIZE 4
3047#define SIR_BOOT_DNLD_REQ_LEN ((SIR_BOOT_DNLD_REQ_SIZE+1)<<2)
3048
3049// BOOT_DNLD_RSP
3050#define SIR_BOOT_DNLD_RSP_SIZE 2
3051#define SIR_BOOT_DNLD_RSP_LEN ((SIR_BOOT_DNLD_RSP_SIZE+1)<<2)
3052
Jeff Johnson295189b2012-06-20 16:38:30 -07003053
3054// board capabilities fields are defined here.
3055typedef __ani_attr_pre_packed struct sSirBoardCapabilities
3056{
3057#ifndef ANI_LITTLE_BIT_ENDIAN
3058 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3059 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3060 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3061 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3062 tANI_U32 rsvd1:2;
3063 // (productId derives sub-category in the following three families)
3064 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3065 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3066 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3067 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3068 tANI_U32 bbChipVer:4; // Baseband chip version
3069 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3070 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3071 tANI_U32 nReceivers:2; // 0 based.
3072 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3073 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3074 tANI_U32 rsvd:1;
3075 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3076#else
3077
3078 tANI_U32 extVsIntAnt:1; // 0 = ext antenna, 1 = internal antenna
3079 tANI_U32 rsvd:1;
3080 tANI_U32 sdram:1; // 0 = no SDRAM, 1 = SDRAM
3081 tANI_U32 nTransmitters:1; // 0 = 1 transmitter, 1 = 2 transmitters
3082 tANI_U32 nReceivers:2; // 0 based.
3083 tANI_U32 radioOn:2; // Not supported is 3 or 2, 0 = Off and 1 = On
3084 tANI_U32 loType:2; // 0 = no LO, 1 = SILABS, 2 = ORION
3085 tANI_U32 bbChipVer:4; // Baseband chip version
3086 tANI_U32 bgOnly:1; // 0 - default a/b/g; 1 - b/g only
3087 // (productId derives sub-category in the following three families)
3088 tANI_U32 mpciFamily:1; // 0 - Not MPCI family, 1 - MPCI
3089 tANI_U32 apFamily:1; // 0 - Not AP family, 1 - AP
3090 tANI_U32 cbFamily:1; // 0 - Not CB family, 1 - Cardbus
3091 tANI_U32 rsvd1:2;
3092 tANI_U32 reverseFCS:1; // 0 - Reverse FCS is not supported, 1 - Reverse FCS is supported
3093 tANI_U32 chnlBonding:1; // 0 - Channel Bonding is not supported, 1 - Channel Bonding is supported
3094 tANI_U32 compression:1; // 0 - Compression is not supported, 1 - Compression is supported
3095 tANI_U32 concat:1; // 0 - Concat is not supported, 1 - Concat is supported
3096#endif
3097} __ani_attr_packed tSirBoardCapabilities, *tpSirBoardCapabilities;
3098
3099# define ANI_BCAP_EXT_VS_INT_ANT_MASK 0x1
3100# define ANI_BCAP_EXT_VS_INT_ANT_OFFSET 0
3101
3102# define ANI_BCAP_GAL_ON_BOARD_MASK 0x2
3103# define ANI_BCAP_GAL_ON_BOARD_OFFSET 1
3104
3105# define ANI_BCAP_SDRAM_MASK 0x4
3106# define ANI_BCAP_SDRAM_OFFSET 2
3107
3108# define ANI_BCAP_NUM_TRANSMITTERS_MASK 0x8
3109# define ANI_BCAP_NUM_TRANSMITTERS_OFFSET 3
3110
3111# define ANI_BCAP_NUM_RECEIVERS_MASK 0x30
3112# define ANI_BCAP_NUM_RECEIVERS_OFFSET 4
3113
3114# define ANI_BCAP_RADIO_ON_MASK 0xC0
3115# define ANI_BCAP_RADIO_ON_OFFSET 6
3116
3117# define ANI_BCAP_LO_TYPE_MASK 0x300
3118# define ANI_BCAP_LO_TYPE_OFFSET 8
3119
3120# define ANI_BCAP_BB_CHIP_VER_MASK 0xC00
3121# define ANI_BCAP_BB_CHIP_VER_OFFSET 10
3122
3123# define ANI_BCAP_CYG_DATE_CODE_MASK 0xFF000
3124# define ANI_BCAP_CYG_DATE_CODE_OFFSET 12
3125
3126# define ANI_BCAP_RADIO_OFF 0
3127# define ANI_BCAP_RADIO_ON 1
3128# define ANI_BCAP_RADIO_ON_NOT_SUPPORTED 3
3129
3130
3131/// WOW related structures
3132// SME -> PE <-> HAL
3133#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
3134#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
3135
3136// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
3137// SME/HDD maintains the list of the BCAST wake-up patterns.
3138// This is a pass through message for PE
3139typedef struct sSirWowlAddBcastPtrn
3140{
3141 tANI_U8 ucPatternId; // Pattern ID
3142 // Pattern byte offset from beginning of the 802.11 packet to start of the
3143 // wake-up pattern
3144 tANI_U8 ucPatternByteOffset;
3145 tANI_U8 ucPatternSize; // Non-Zero Pattern size
3146 tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
3147 tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
3148 tANI_U8 ucPatternMask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
3149 // Extra pattern data beyond 128 bytes
3150 tANI_U8 ucPatternExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern
3151 tANI_U8 ucPatternMaskExt[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra Pattern mask
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003152 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003153} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
3154
3155
3156// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
3157// SME/HDD maintains the list of the BCAST wake-up patterns.
3158// This is a pass through message for PE
3159typedef struct sSirWowlDelBcastPtrn
3160{
3161 /* Pattern ID of the wakeup pattern to be deleted */
3162 tANI_U8 ucPatternId;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003163 tSirMacAddr bssId; // BSSID
Jeff Johnson295189b2012-06-20 16:38:30 -07003164}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
3165
3166
3167// SME->PE: Enter WOWLAN parameters
3168typedef struct sSirSmeWowlEnterParams
3169{
3170 /* Enables/disables magic packet filtering */
3171 tANI_U8 ucMagicPktEnable;
3172
3173 /* Magic pattern */
3174 tSirMacAddr magicPtrn;
3175
3176 /* Enables/disables packet pattern filtering */
3177 tANI_U8 ucPatternFilteringEnable;
3178
3179#ifdef WLAN_WAKEUP_EVENTS
3180 /* This configuration directs the WoW packet filtering to look for EAP-ID
3181 * requests embedded in EAPOL frames and use this as a wake source.
3182 */
3183 tANI_U8 ucWoWEAPIDRequestEnable;
3184
3185 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3186 * requests and use this as a wake source.
3187 */
3188 tANI_U8 ucWoWEAPOL4WayEnable;
3189
3190 /* This configuration allows a host wakeup on an network scan offload match.
3191 */
3192 tANI_U8 ucWowNetScanOffloadMatch;
3193
3194 /* This configuration allows a host wakeup on any GTK rekeying error.
3195 */
3196 tANI_U8 ucWowGTKRekeyError;
3197
3198 /* This configuration allows a host wakeup on BSS connection loss.
3199 */
3200 tANI_U8 ucWoWBSSConnLoss;
3201#endif // WLAN_WAKEUP_EVENTS
3202
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003203 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003204} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
3205
3206
3207// PE<->HAL: Enter WOWLAN parameters
3208typedef struct sSirHalWowlEnterParams
3209{
3210 /* Enables/disables magic packet filtering */
3211 tANI_U8 ucMagicPktEnable;
3212
3213 /* Magic pattern */
3214 tSirMacAddr magicPtrn;
3215
3216 /* Enables/disables packet pattern filtering in firmware.
3217 Enabling this flag enables broadcast pattern matching
3218 in Firmware. If unicast pattern matching is also desired,
3219 ucUcastPatternFilteringEnable flag must be set tot true
3220 as well
3221 */
3222 tANI_U8 ucPatternFilteringEnable;
3223
3224 /* Enables/disables unicast packet pattern filtering.
3225 This flag specifies whether we want to do pattern match
3226 on unicast packets as well and not just broadcast packets.
3227 This flag has no effect if the ucPatternFilteringEnable
3228 (main controlling flag) is set to false
3229 */
3230 tANI_U8 ucUcastPatternFilteringEnable;
3231
3232 /* This configuration is valid only when magicPktEnable=1.
3233 * It requests hardware to wake up when it receives the
3234 * Channel Switch Action Frame.
3235 */
3236 tANI_U8 ucWowChnlSwitchRcv;
3237
3238 /* This configuration is valid only when magicPktEnable=1.
3239 * It requests hardware to wake up when it receives the
3240 * Deauthentication Frame.
3241 */
3242 tANI_U8 ucWowDeauthRcv;
3243
3244 /* This configuration is valid only when magicPktEnable=1.
3245 * It requests hardware to wake up when it receives the
3246 * Disassociation Frame.
3247 */
3248 tANI_U8 ucWowDisassocRcv;
3249
3250 /* This configuration is valid only when magicPktEnable=1.
3251 * It requests hardware to wake up when it has missed
3252 * consecutive beacons. This is a hardware register
3253 * configuration (NOT a firmware configuration).
3254 */
3255 tANI_U8 ucWowMaxMissedBeacons;
3256
3257 /* This configuration is valid only when magicPktEnable=1.
3258 * This is a timeout value in units of microsec. It requests
3259 * hardware to unconditionally wake up after it has stayed
3260 * in WoWLAN mode for some time. Set 0 to disable this feature.
3261 */
3262 tANI_U8 ucWowMaxSleepUsec;
3263
3264#ifdef WLAN_WAKEUP_EVENTS
3265 /* This configuration directs the WoW packet filtering to look for EAP-ID
3266 * requests embedded in EAPOL frames and use this as a wake source.
3267 */
3268 tANI_U8 ucWoWEAPIDRequestEnable;
3269
3270 /* This configuration directs the WoW packet filtering to look for EAPOL-4WAY
3271 * requests and use this as a wake source.
3272 */
3273 tANI_U8 ucWoWEAPOL4WayEnable;
3274
3275 /* This configuration allows a host wakeup on an network scan offload match.
3276 */
3277 tANI_U8 ucWowNetScanOffloadMatch;
3278
3279 /* This configuration allows a host wakeup on any GTK rekeying error.
3280 */
3281 tANI_U8 ucWowGTKRekeyError;
3282
3283 /* This configuration allows a host wakeup on BSS connection loss.
3284 */
3285 tANI_U8 ucWoWBSSConnLoss;
3286#endif // WLAN_WAKEUP_EVENTS
3287
3288 /* Status code to be filled by HAL when it sends
3289 * SIR_HAL_WOWL_ENTER_RSP to PE.
3290 */
3291 eHalStatus status;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003292
3293 /*BSSID to find the current session
3294 */
3295 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003296} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
3297
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003298// PE<->HAL: Exit WOWLAN parameters
3299typedef struct sSirHalWowlExitParams
3300{
3301 /* Status code to be filled by HAL when it sends
3302 * SIR_HAL_WOWL_EXIT_RSP to PE.
3303 */
3304 eHalStatus status;
3305
3306 /*BSSIDX to find the current session
3307 */
3308 tANI_U8 bssIdx;
3309} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
3310
Jeff Johnson295189b2012-06-20 16:38:30 -07003311
3312#define SIR_MAX_NAME_SIZE 64
3313#define SIR_MAX_TEXT_SIZE 32
3314
3315typedef struct sSirName {
3316 v_U8_t num_name;
3317 v_U8_t name[SIR_MAX_NAME_SIZE];
3318} tSirName;
3319
3320typedef struct sSirText {
3321 v_U8_t num_text;
3322 v_U8_t text[SIR_MAX_TEXT_SIZE];
3323} tSirText;
3324
3325
3326#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
3327#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
3328#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
3329#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
3330#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
3331#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3332#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
3333#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
3334#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
3335#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
3336#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
3337#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
3338#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
3339#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
3340#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
3341#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
3342
3343
3344typedef struct sSirWPSProbeRspIE {
3345 v_U32_t FieldPresent;
3346 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3347 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3348 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3349 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3350 v_U16_t DevicePasswordID; // Device Password ID
3351 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3352 v_U8_t ResponseType; // Response type
3353 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3354 tSirName Manufacture;
3355 tSirText ModelName;
3356 tSirText ModelNumber;
3357 tSirText SerialNumber;
3358 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
3359 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
3360 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
3361 tSirText DeviceName;
3362 v_U16_t ConfigMethod; // Configuaration method
3363 v_U8_t RFBand; // RF bands available on the AP
3364} tSirWPSProbeRspIE;
3365
3366#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
3367#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
3368#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
3369#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
3370#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
3371#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
3372#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
3373#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
3374
3375typedef struct sSirWPSBeaconIE {
3376 v_U32_t FieldPresent;
3377 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
3378 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
3379 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
3380 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
3381 v_U16_t DevicePasswordID; // Device Password ID
3382 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
3383 v_U8_t UUID_E[16]; // Unique identifier of the AP.
3384 v_U8_t RFBand; // RF bands available on the AP
3385} tSirWPSBeaconIE;
3386
3387#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
3388#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
3389
3390typedef struct sSirWPSAssocRspIE {
3391 v_U32_t FieldPresent;
3392 v_U32_t Version;
3393 v_U8_t ResposeType;
3394} tSirWPSAssocRspIE;
3395
3396typedef struct sSirAPWPSIEs {
3397 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/
3398 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/
3399 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/
3400} tSirAPWPSIEs, *tpSiriAPWPSIEs;
3401
3402typedef struct sSirUpdateAPWPSIEsReq
3403{
3404 tANI_U16 messageType; // eWNI_SME_UPDATE_APWPSIE_REQ
3405 tANI_U16 length;
3406 tANI_U16 transactionId; //Transaction ID for cmd
3407 tSirMacAddr bssId; // BSSID
3408 tANI_U8 sessionId; //Session ID
3409 tSirAPWPSIEs APWPSIEs;
3410} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
3411
3412typedef struct sSirUpdateParams
3413{
3414 tANI_U16 messageType;
3415 tANI_U16 length;
3416 tANI_U8 sessionId; // Session ID
3417 tANI_U8 ssidHidden; // Hide SSID
3418} tSirUpdateParams, *tpSirUpdateParams;
3419
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08003420//Beacon Interval
3421typedef struct sSirChangeBIParams
3422{
3423 tANI_U16 messageType;
3424 tANI_U16 length;
3425 tANI_U16 beaconInterval; // Beacon Interval
3426 tSirMacAddr bssId;
3427 tANI_U8 sessionId; // Session ID
3428} tSirChangeBIParams, *tpSirChangeBIParams;
3429
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303430#ifdef WLAN_FEATURE_AP_HT40_24G
3431typedef struct sSirSetHT2040Mode
3432{
3433 tANI_U16 messageType;
3434 tANI_U16 length;
3435 tANI_U8 cbMode;
3436 tSirMacAddr bssId;
3437 tANI_U8 sessionId; // Session ID
3438} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
Hardik Kantilal Patel81f76342014-11-14 12:45:26 -08003439
3440typedef struct sSirHT2040CoexInfoInd
3441{
3442 tANI_U16 messageType; // eWNI_SME_2040_COEX_IND
3443 tANI_U16 length;
3444 tANI_U8 sessionId;
3445 tANI_U8 HT40MHzIntolerant;
3446 tANI_U8 HT20MHzBssWidthReq;
3447 tANI_U8 channel_num;
3448 tANI_U8 HT2040BssIntoChanReport [1]; //variable
3449}tSirHT2040CoexInfoInd, *tpSirHT2040CoexInfoInd;
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303450#endif
3451
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05303452typedef struct sSirOBSSHT40Param
3453{
3454 tANI_U16 OBSSScanPassiveDwellTime;
3455 tANI_U16 OBSSScanActiveDwellTime;
3456 tANI_U16 BSSChannelWidthTriggerScanInterval;
3457 tANI_U16 OBSSScanPassiveTotalPerChannel;
3458 tANI_U16 OBSSScanActiveTotalPerChannel;
3459 tANI_U16 BSSWidthChannelTransitionDelayFactor;
3460 tANI_U16 OBSSScanActivityThreshold;
3461}tSirOBSSHT40Param, *tpOBSSHT40Param;
3462
Jeff Johnson295189b2012-06-20 16:38:30 -07003463#define SIR_WPS_UUID_LEN 16
3464#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
3465
3466typedef struct sSirWPSPBCSession {
3467 struct sSirWPSPBCSession *next;
3468 tSirMacAddr addr;
3469 tANI_U8 uuid_e[SIR_WPS_UUID_LEN];
3470 tANI_TIMESTAMP timestamp;
3471} tSirWPSPBCSession;
3472
3473typedef struct sSirSmeGetWPSPBCSessionsReq
3474{
3475 tANI_U16 messageType; // eWNI_SME_GET_WPSPBC_SESSION_REQ
3476 tANI_U16 length;
3477 void *pUsrContext;
3478 void *pSapEventCallback;
3479 tSirMacAddr bssId; // BSSID
3480 tSirMacAddr pRemoveMac; // MAC Address of STA in WPS Session to be removed
3481} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
3482
3483typedef struct sSirWPSPBCProbeReq
3484{
3485 tSirMacAddr peerMacAddr;
3486 tANI_U16 probeReqIELen;
3487 tANI_U8 probeReqIE[512];
3488} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
3489
3490// probereq from peer, when wsc is enabled
3491typedef struct sSirSmeProbeReqInd
3492{
3493 tANI_U16 messageType; // eWNI_SME_WPS_PBC_PROBE_REQ_IND
3494 tANI_U16 length;
3495 tANI_U8 sessionId;
3496 tSirMacAddr bssId;
3497 tSirWPSPBCProbeReq WPSPBCProbeReq;
3498} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
3499
3500typedef struct sSirUpdateAPWPARSNIEsReq
3501{
3502 tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
3503 tANI_U16 length;
3504 tANI_U16 transactionId; //Transaction ID for cmd
3505 tSirMacAddr bssId; // BSSID
3506 tANI_U8 sessionId; //Session ID
3507 tSirRSNie APWPARSNIEs;
3508} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
3509
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003510#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Varun Reddy Yeturu52231ea2014-02-06 12:00:56 -08003511#define SIR_ROAM_MAX_CHANNELS 80
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003512#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
3513#define CHANNEL_LIST_STATIC 1 /* Occupied channel list remains static */
3514#define CHANNEL_LIST_DYNAMIC_INIT 2 /* Occupied channel list can be learnt after init */
3515#define CHANNEL_LIST_DYNAMIC_FLUSH 3 /* Occupied channel list can be learnt after flush */
3516#define CHANNEL_LIST_DYNAMIC_UPDATE 4 /* Occupied channel list can be learnt after update */
3517#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
3518#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003519
3520/*Adaptive Thresholds to be used for FW based scanning*/
3521#define LFR_SENSITIVITY_THR_1MBPS -89
3522#define LFR_LOOKUP_THR_1MBPS -78
3523#define LFR_SENSITIVITY_THR_2MBPS -87
3524#define LFR_LOOKUP_THR_2MBPS -78
3525#define LFR_SENSITIVITY_THR_5_5MBPS -86
3526#define LFR_LOOKUP_THR_5_5MBPS -77
3527#define LFR_SENSITIVITY_THR_11MBPS -85
3528#define LFR_LOOKUP_THR_11MBPS -76
3529#define LFR_SENSITIVITY_THR_6MBPS_2G -83
3530#define LFR_LOOKUP_THR_6MBPS_2G -78
3531#define LFR_SENSITIVITY_THR_6MBPS_5G -83
3532#define LFR_LOOKUP_THR_6MBPS_5G -78
3533#define LFR_SENSITIVITY_THR_12MBPS_2G -83
3534#define LFR_LOOKUP_THR_12MBPS_2G -78
3535#define LFR_SENSITIVITY_THR_12MBPS_5G -81
3536#define LFR_LOOKUP_THR_12MBPS_5G -76
3537#define LFR_SENSITIVITY_THR_24MBPS_2G -81
3538#define LFR_LOOKUP_THR_24MBPS_2G -76
3539#define LFR_SENSITIVITY_THR_24MBPS_5G -79
3540#define LFR_LOOKUP_THR_24MBPS_5G -74
3541#define LFR_SENSITIVITY_THR_DEFAULT 0
3542#define LFR_LOOKUP_THR_DEFAULT -78
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003543#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003544
3545// SME -> HAL - This is the host offload request.
3546#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
3547#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3548#define SIR_IPV6_NS_OFFLOAD 2
3549#define SIR_OFFLOAD_DISABLE 0
3550#define SIR_OFFLOAD_ENABLE 1
3551#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303552#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
Jeff Johnson295189b2012-06-20 16:38:30 -07003553#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
Madan Mohan Koyyalamudibadffe72013-09-11 13:09:14 +05303554#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -07003555
3556#ifdef WLAN_NS_OFFLOAD
3557typedef struct sSirNsOffloadReq
3558{
3559 tANI_U8 srcIPv6Addr[16];
3560 tANI_U8 selfIPv6Addr[16];
3561 //Only support 2 possible Network Advertisement IPv6 address
3562 tANI_U8 targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][16];
3563 tANI_U8 selfMacAddr[6];
3564 tANI_U8 srcIPv6AddrValid;
3565 tANI_U8 targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Gopichand Nakkala746a9452013-06-11 12:45:54 +05303566 tANI_U8 slotIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07003567} tSirNsOffloadReq, *tpSirNsOffloadReq;
3568#endif //WLAN_NS_OFFLOAD
3569
3570typedef struct sSirHostOffloadReq
3571{
3572 tANI_U8 offloadType;
3573 tANI_U8 enableOrDisable;
3574 union
3575 {
3576 tANI_U8 hostIpv4Addr [4];
3577 tANI_U8 hostIpv6Addr [16];
3578 } params;
3579#ifdef WLAN_NS_OFFLOAD
3580 tSirNsOffloadReq nsOffloadInfo;
3581#endif //WLAN_NS_OFFLOAD
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003582 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003583} tSirHostOffloadReq, *tpSirHostOffloadReq;
3584
3585/* Packet Types. */
3586#define SIR_KEEP_ALIVE_NULL_PKT 1
3587#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3588
3589/* Enable or disable offload. */
3590#define SIR_KEEP_ALIVE_DISABLE 0
3591#define SIR_KEEP_ALIVE_ENABLE 1
3592
3593/* Keep Alive request. */
3594typedef struct sSirKeepAliveReq
3595{
3596 v_U8_t packetType;
3597 v_U32_t timePeriod;
3598 tSirIpv4Addr hostIpv4Addr;
3599 tSirIpv4Addr destIpv4Addr;
3600 tSirMacAddr destMacAddr;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003601 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07003602} tSirKeepAliveReq, *tpSirKeepAliveReq;
3603
3604typedef struct sSirSmeAddStaSelfReq
3605{
3606 tANI_U16 mesgType;
3607 tANI_U16 mesgLen;
3608 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -07003609 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -07003610}tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
3611
3612typedef struct sSirSmeDelStaSelfReq
3613{
3614 tANI_U16 mesgType;
3615 tANI_U16 mesgLen;
3616 tSirMacAddr selfMacAddr;
3617}tSirSmeDelStaSelfReq, *tpSirSmeDelStaSelfReq;
3618
3619typedef struct sSirSmeAddStaSelfRsp
3620{
3621 tANI_U16 mesgType;
3622 tANI_U16 mesgLen;
3623 tANI_U16 status;
3624 tSirMacAddr selfMacAddr;
3625}tSirSmeAddStaSelfRsp, *tpSirSmeAddStaSelfRsp;
3626
3627typedef struct sSirSmeDelStaSelfRsp
3628{
3629 tANI_U16 mesgType;
3630 tANI_U16 mesgLen;
3631 tANI_U16 status;
3632 tSirMacAddr selfMacAddr;
3633}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
3634
3635/* Coex Indication defines -
3636 should match WLAN_COEX_IND_DATA_SIZE
3637 should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
3638 should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
3639#define SIR_COEX_IND_DATA_SIZE (4)
3640#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3641#define SIR_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08003642#define SIR_COEX_IND_TYPE_SCAN_COMPROMISED (2)
3643#define SIR_COEX_IND_TYPE_SCAN_NOT_COMPROMISED (3)
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07003644#define SIR_COEX_IND_TYPE_DISABLE_AGGREGATION_IN_2p4 (4)
3645#define SIR_COEX_IND_TYPE_ENABLE_AGGREGATION_IN_2p4 (5)
Kanchanapally, Vidyullatha23cea3c2014-11-04 13:05:20 +05303646#define SIR_COEX_IND_TYPE_ENABLE_UAPSD (6)
3647#define SIR_COEX_IND_TYPE_DISABLE_UAPSD (7)
c_hpothub3458992014-09-19 19:58:57 +05303648#define SIR_COEX_IND_TYPE_CXM_FEATURES_NOTIFICATION (8)
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303649#define SIR_COEX_IND_TYPE_TDLS_ENABLE (6)
3650#define SIR_COEX_IND_TYPE_TDLS_DISABLE (7)
Jeff Johnson295189b2012-06-20 16:38:30 -07003651
3652typedef struct sSirSmeCoexInd
3653{
3654 tANI_U16 mesgType;
3655 tANI_U16 mesgLen;
3656 tANI_U32 coexIndType;
3657 tANI_U32 coexIndData[SIR_COEX_IND_DATA_SIZE];
3658}tSirSmeCoexInd, *tpSirSmeCoexInd;
3659
Jeff Johnson295189b2012-06-20 16:38:30 -07003660typedef struct sSirSmeMgmtFrameInd
3661{
3662 tANI_U16 mesgType;
3663 tANI_U16 mesgLen;
Chilam NG571c65a2013-01-19 12:27:36 +05303664 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07003665 tANI_U8 sessionId;
3666 tANI_U8 frameType;
Chilam NG571c65a2013-01-19 12:27:36 +05303667 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07003668 tANI_U8 frameBuf[1]; //variable
3669}tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
Jeff Johnson295189b2012-06-20 16:38:30 -07003670
Chet Lanctot186b5732013-03-18 10:26:30 -07003671#ifdef WLAN_FEATURE_11W
3672typedef struct sSirSmeUnprotMgmtFrameInd
3673{
3674 tANI_U8 sessionId;
3675 tANI_U8 frameType;
3676 tANI_U8 frameLen;
3677 tANI_U8 frameBuf[1]; //variable
3678}tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
3679#endif
3680
Jeff Johnson295189b2012-06-20 16:38:30 -07003681#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
3682 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || \
3683 ( eSME_LINK_DISCONNECTED_BY_OTHER == (eReason) ) || \
3684 (eSME_FULL_PWR_NEEDED_BY_CHANNEL_SWITCH == (eReason)))
3685#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
3686 ( ( eSME_LINK_DISCONNECTED_BY_HDD == (eReason) ) || ( eSME_FULL_PWR_NEEDED_BY_HDD == (eReason) ) )
3687
3688/* P2P Power Save Related */
Jeff Johnson295189b2012-06-20 16:38:30 -07003689typedef struct sSirNoAParam
3690{
3691 tANI_U8 ctWindow:7;
3692 tANI_U8 OppPS:1;
3693 tANI_U8 count;
3694 tANI_U32 duration;
3695 tANI_U32 interval;
3696 tANI_U32 singleNoADuration;
3697 tANI_U8 psSelection;
3698}tSirNoAParam, *tpSirNoAParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07003699
Jeff Johnson295189b2012-06-20 16:38:30 -07003700typedef struct sSirWlanSuspendParam
3701{
3702 tANI_U8 configuredMcstBcstFilterSetting;
3703}tSirWlanSuspendParam,*tpSirWlanSuspendParam;
3704
3705typedef struct sSirWlanResumeParam
3706{
3707 tANI_U8 configuredMcstBcstFilterSetting;
3708}tSirWlanResumeParam,*tpSirWlanResumeParam;
3709
3710typedef struct sSirWlanSetRxpFilters
3711{
3712 tANI_U8 configuredMcstBcstFilterSetting;
3713 tANI_U8 setMcstBcstFilter;
3714}tSirWlanSetRxpFilters,*tpSirWlanSetRxpFilters;
Jeff Johnson295189b2012-06-20 16:38:30 -07003715
3716
3717#ifdef FEATURE_WLAN_SCAN_PNO
3718//
3719// PNO Messages
3720//
3721
3722// Set PNO
3723#define SIR_PNO_MAX_NETW_CHANNELS 26
Pratik Bhalgatd4404592012-11-22 17:49:14 +05303724#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
Jeff Johnson295189b2012-06-20 16:38:30 -07003725#define SIR_PNO_MAX_SUPP_NETWORKS 16
3726#define SIR_PNO_MAX_SCAN_TIMERS 10
3727
3728/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
3729#define SIR_PNO_MAX_PB_REQ_SIZE 450
3730
3731#define SIR_PNO_24G_DEFAULT_CH 1
3732#define SIR_PNO_5G_DEFAULT_CH 36
3733
3734typedef enum
3735{
3736 SIR_PNO_MODE_IMMEDIATE,
3737 SIR_PNO_MODE_ON_SUSPEND,
3738 SIR_PNO_MODE_ON_RESUME,
3739 SIR_PNO_MODE_MAX
3740} eSirPNOMode;
3741
3742typedef struct
3743{
3744 tSirMacSSid ssId;
3745 tANI_U32 authentication;
3746 tANI_U32 encryption;
3747 tANI_U32 bcastNetwType;
3748 tANI_U8 ucChannelCount;
Gopichand Nakkala8e93fde2013-05-10 17:40:12 +05303749 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
Jeff Johnson295189b2012-06-20 16:38:30 -07003750 tANI_U8 rssiThreshold;
3751} tSirNetworkType;
3752
3753typedef struct
3754{
3755 tANI_U32 uTimerValue;
3756 tANI_U32 uTimerRepeat;
3757}tSirScanTimer;
3758
3759typedef struct
3760{
3761 tANI_U8 ucScanTimersCount;
3762 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
3763} tSirScanTimersType;
3764
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303765/*Pref Net Req status */
3766typedef void(*PNOReqStatusCb)(void *callbackContext, VOS_STATUS status);
3767
3768
Jeff Johnson295189b2012-06-20 16:38:30 -07003769typedef struct sSirPNOScanReq
3770{
3771 tANI_U8 enable;
Vinay Krishna Erannaf0e523b2014-03-01 21:00:16 +05303772 PNOReqStatusCb statusCallback;
3773 void *callbackContext;
Jeff Johnson295189b2012-06-20 16:38:30 -07003774 eSirPNOMode modePNO;
3775 tANI_U8 ucNetworksCount;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05303776 tSirNetworkType *aNetworks;
Jeff Johnson295189b2012-06-20 16:38:30 -07003777 tSirScanTimersType scanTimers;
3778
3779 /*added by SME*/
3780 tANI_U16 us24GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05303781 tANI_U8 *p24GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07003782 tANI_U16 us5GProbeTemplateLen;
Hanumantha Reddy Pothulad769f3e2015-02-19 17:00:02 +05303783 tANI_U8 *p5GProbeTemplate;
Jeff Johnson295189b2012-06-20 16:38:30 -07003784} tSirPNOScanReq, *tpSirPNOScanReq;
3785
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003786typedef struct sSirSetRSSIFilterReq
3787{
3788 tANI_U8 rssiThreshold;
3789} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
3790
3791
3792// Update Scan Params
3793typedef struct {
3794 tANI_U8 b11dEnabled;
3795 tANI_U8 b11dResolved;
3796 tANI_U8 ucChannelCount;
3797 tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
3798 tANI_U16 usPassiveMinChTime;
3799 tANI_U16 usPassiveMaxChTime;
3800 tANI_U16 usActiveMinChTime;
3801 tANI_U16 usActiveMaxChTime;
3802 tANI_U8 ucCBState;
3803} tSirUpdateScanParams, * tpSirUpdateScanParams;
3804
3805// Preferred Network Found Indication
3806typedef struct
3807{
3808 tANI_U16 mesgType;
3809 tANI_U16 mesgLen;
3810 /* Network that was found with the highest RSSI*/
3811 tSirMacSSid ssId;
3812 /* Indicates the RSSI */
3813 tANI_U8 rssi;
3814 /* Length of the beacon or probe response
3815 * corresponding to the candidate found by PNO */
3816 tANI_U32 frameLength;
3817 /* Index to memory location where the contents of
3818 * beacon or probe response frame will be copied */
3819 tANI_U8 data[1];
3820} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
3821#endif //FEATURE_WLAN_SCAN_PNO
3822
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003823#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3824typedef struct
3825{
3826 tSirMacSSid ssId;
3827 tANI_U8 currAPbssid[WNI_CFG_BSSID_LEN];
3828 tANI_U32 authentication;
3829 tANI_U8 encryption;
3830 tANI_U8 mcencryption;
3831 tANI_U8 ChannelCount;
3832 tANI_U8 ChannelCache[SIR_ROAM_MAX_CHANNELS];
3833
3834} tSirRoamNetworkType;
3835
3836typedef struct SirMobilityDomainInfo
3837{
3838 tANI_U8 mdiePresent;
3839 tANI_U16 mobilityDomain;
3840} tSirMobilityDomainInfo;
3841
3842typedef struct sSirRoamOffloadScanReq
3843{
3844 eAniBoolean RoamScanOffloadEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003845 eAniBoolean MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003846 tANI_S8 LookupThreshold;
Varun Reddy Yeturu6c5e25c2014-01-09 21:55:37 -08003847 tANI_S8 RxSensitivityThreshold;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003848 tANI_U8 RoamRssiDiff;
3849 tANI_U8 ChannelCacheType;
3850 tANI_U8 Command;
3851 tANI_U8 StartScanReason;
3852 tANI_U16 NeighborScanTimerPeriod;
3853 tANI_U16 NeighborRoamScanRefreshPeriod;
3854 tANI_U16 NeighborScanChannelMinTime;
3855 tANI_U16 NeighborScanChannelMaxTime;
3856 tANI_U16 EmptyRefreshScanPeriod;
3857 tANI_U8 ValidChannelCount;
3858 tANI_U8 ValidChannelList[SIR_ROAM_MAX_CHANNELS];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003859 eAniBoolean IsESEEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003860 tANI_U16 us24GProbeTemplateLen;
3861 tANI_U8 p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
3862 tANI_U16 us5GProbeTemplateLen;
3863 tANI_U8 p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07003864 tANI_U8 nProbes;
3865 tANI_U16 HomeAwayTime;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003866 tSirRoamNetworkType ConnectedNetwork;
3867 tSirMobilityDomainInfo MDID;
3868} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08003869#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Jeff Johnson295189b2012-06-20 16:38:30 -07003870
3871#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
3872
3873//Power Parameters Type
3874typedef enum
3875{
3876 eSIR_IGNORE_DTIM = 1,
3877 eSIR_LISTEN_INTERVAL = 2,
3878 eSIR_MCAST_BCAST_FILTER = 3,
3879 eSIR_ENABLE_BET = 4,
3880 eSIR_BET_INTERVAL = 5
3881}tPowerParamType;
3882
3883//Power Parameters Value s
3884typedef struct
3885{
3886 /* Ignore DTIM */
3887 tANI_U32 uIgnoreDTIM;
3888
3889 /* DTIM Period */
3890 tANI_U32 uDTIMPeriod;
3891
3892 /* Listen Interval */
3893 tANI_U32 uListenInterval;
3894
3895 /* Broadcast Multicas Filter */
3896 tANI_U32 uBcastMcastFilter;
3897
3898 /* Beacon Early Termination */
3899 tANI_U32 uEnableBET;
3900
3901 /* Beacon Early Termination Interval */
3902 tANI_U32 uBETInterval;
3903
Yue Mac24062f2013-05-13 17:01:29 -07003904 /* MAX LI for modulated DTIM */
3905 tANI_U32 uMaxLIModulatedDTIM;
3906
Jeff Johnson295189b2012-06-20 16:38:30 -07003907}tSirSetPowerParamsReq, *tpSirSetPowerParamsReq;
3908
3909typedef struct sSirTxPerTrackingParam
3910{
3911 tANI_U8 ucTxPerTrackingEnable; /* 0: disable, 1:enable */
3912 tANI_U8 ucTxPerTrackingPeriod; /* Check period, unit is sec. Once tx_stat_chk enable, firmware will check PER in this period periodically */
3913 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 */
3914 tANI_U32 uTxPerTrackingWatermark; /* A watermark of check number, once the tx packet exceed this number, we do the check, default is 5 */
3915}tSirTxPerTrackingParam, *tpSirTxPerTrackingParam;
3916
3917#ifdef WLAN_FEATURE_PACKET_FILTERING
3918/*---------------------------------------------------------------------------
3919 Packet Filtering Parameters
3920---------------------------------------------------------------------------*/
3921#define SIR_IPV4_ADDR_LEN 4
3922#define SIR_MAC_ADDR_LEN 6
3923#define SIR_MAX_FILTER_TEST_DATA_LEN 8
3924#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
3925#define SIR_MAX_NUM_FILTERS 20
3926#define SIR_MAX_NUM_TESTS_PER_FILTER 10
3927
3928//
3929// Receive Filter Parameters
3930//
3931typedef enum
3932{
3933 SIR_RCV_FILTER_TYPE_INVALID,
3934 SIR_RCV_FILTER_TYPE_FILTER_PKT,
3935 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
3936 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
3937}eSirReceivePacketFilterType;
3938
3939typedef enum
3940{
3941 SIR_FILTER_HDR_TYPE_INVALID,
3942 SIR_FILTER_HDR_TYPE_MAC,
3943 SIR_FILTER_HDR_TYPE_ARP,
3944 SIR_FILTER_HDR_TYPE_IPV4,
3945 SIR_FILTER_HDR_TYPE_IPV6,
3946 SIR_FILTER_HDR_TYPE_UDP,
3947 SIR_FILTER_HDR_TYPE_MAX
3948}eSirRcvPktFltProtocolType;
3949
3950typedef enum
3951{
3952 SIR_FILTER_CMP_TYPE_INVALID,
3953 SIR_FILTER_CMP_TYPE_EQUAL,
3954 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3955 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3956 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3957 SIR_FILTER_CMP_TYPE_MAX
3958}eSirRcvPktFltCmpFlagType;
3959
3960typedef struct sSirRcvPktFilterFieldParams
3961{
3962 eSirRcvPktFltProtocolType protocolLayer;
3963 eSirRcvPktFltCmpFlagType cmpFlag;
3964 /* Length of the data to compare */
3965 tANI_U16 dataLength;
3966 /* from start of the respective frame header */
3967 tANI_U8 dataOffset;
3968 /* Reserved field */
3969 tANI_U8 reserved;
3970 /* Data to compare */
3971 tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3972 /* Mask to be applied on the received packet data before compare */
3973 tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3974}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3975
3976typedef struct sSirRcvPktFilterCfg
3977{
3978 tANI_U8 filterId;
3979 eSirReceivePacketFilterType filterType;
3980 tANI_U32 numFieldParams;
3981 tANI_U32 coalesceTime;
Jeff Johnsone7245742012-09-05 17:12:55 -07003982 tSirMacAddr selfMacAddr;
3983 tSirMacAddr bssId; //Bssid of the connected AP
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07003984 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
Jeff Johnson295189b2012-06-20 16:38:30 -07003985}tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3986
3987//
3988// Filter Packet Match Count Parameters
3989//
3990typedef struct sSirRcvFltPktMatchCnt
3991{
3992 tANI_U8 filterId;
3993 tANI_U32 matchCnt;
3994} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3995
3996typedef struct sSirRcvFltPktMatchRsp
3997{
3998 tANI_U16 mesgType;
3999 tANI_U16 mesgLen;
4000
4001 /* Success or Failure */
4002 tANI_U32 status;
4003 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004004 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004005} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
4006
4007//
4008// Receive Filter Clear Parameters
4009//
4010typedef struct sSirRcvFltPktClearParam
4011{
4012 tANI_U32 status; /* only valid for response message */
4013 tANI_U8 filterId;
Jeff Johnsone7245742012-09-05 17:12:55 -07004014 tSirMacAddr selfMacAddr;
4015 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004016}tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
4017
4018//
4019// Multicast Address List Parameters
4020//
4021typedef struct sSirRcvFltMcAddrList
4022{
4023 tANI_U32 ulMulticastAddrCnt;
4024 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
Jeff Johnsone7245742012-09-05 17:12:55 -07004025 tSirMacAddr selfMacAddr;
4026 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004027} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
4028#endif // WLAN_FEATURE_PACKET_FILTERING
4029
4030//
4031// Generic version information
4032//
4033typedef struct
4034{
4035 tANI_U8 revision;
4036 tANI_U8 version;
4037 tANI_U8 minor;
4038 tANI_U8 major;
4039} tSirVersionType;
4040
4041typedef struct sAniBtAmpLogLinkReq
4042{
4043 // Common for all types are requests
4044 tANI_U16 msgType; // message type is same as the request type
4045 tANI_U16 msgLen; // length of the entire request
4046 tANI_U8 sessionId; //sme Session Id
4047 void *btampHandle; //AMP context
4048
4049} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
4050
4051#ifdef WLAN_FEATURE_GTK_OFFLOAD
4052/*---------------------------------------------------------------------------
4053* WDA_GTK_OFFLOAD_REQ
4054*--------------------------------------------------------------------------*/
4055typedef struct
4056{
4057 tANI_U32 ulFlags; /* optional flags */
4058 tANI_U8 aKCK[16]; /* Key confirmation key */
4059 tANI_U8 aKEK[16]; /* key encryption key */
4060 tANI_U64 ullKeyReplayCounter; /* replay counter */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004061 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004062} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
4063
4064/*---------------------------------------------------------------------------
4065* WDA_GTK_OFFLOAD_GETINFO_REQ
4066*--------------------------------------------------------------------------*/
4067typedef struct
4068{
4069 tANI_U16 mesgType;
4070 tANI_U16 mesgLen;
4071
4072 tANI_U32 ulStatus; /* success or failure */
4073 tANI_U64 ullKeyReplayCounter; /* current replay counter value */
4074 tANI_U32 ulTotalRekeyCount; /* total rekey attempts */
4075 tANI_U32 ulGTKRekeyCount; /* successful GTK rekeys */
4076 tANI_U32 ulIGTKRekeyCount; /* successful iGTK rekeys */
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07004077 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -07004078} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
4079#endif // WLAN_FEATURE_GTK_OFFLOAD
4080
4081#ifdef WLAN_WAKEUP_EVENTS
4082/*---------------------------------------------------------------------------
4083 tSirWakeReasonInd
4084---------------------------------------------------------------------------*/
4085typedef struct
4086{
4087 tANI_U16 mesgType;
4088 tANI_U16 mesgLen;
4089 tANI_U32 ulReason; /* see tWakeReasonType */
4090 tANI_U32 ulReasonArg; /* argument specific to the reason type */
4091 tANI_U32 ulStoredDataLen; /* length of optional data stored in this message, in case
4092 HAL truncates the data (i.e. data packets) this length
4093 will be less than the actual length */
4094 tANI_U32 ulActualDataLen; /* actual length of data */
4095 tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
4096 see specific wake type */
4097} tSirWakeReasonInd, *tpSirWakeReasonInd;
4098#endif // WLAN_WAKEUP_EVENTS
4099
4100/*---------------------------------------------------------------------------
4101 sAniSetTmLevelReq
4102---------------------------------------------------------------------------*/
4103typedef struct sAniSetTmLevelReq
4104{
4105 tANI_U16 tmMode;
4106 tANI_U16 newTmLevel;
4107} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
4108
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004109#ifdef FEATURE_WLAN_TDLS
4110/* TDLS Request struct SME-->PE */
4111typedef struct sSirTdlsSendMgmtReq
4112{
4113 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4114 tANI_U16 length;
4115 tANI_U8 sessionId; // Session ID
4116 tANI_U16 transactionId; // Transaction ID for cmd
4117 tANI_U8 reqType;
4118 tANI_U8 dialog;
4119 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08004120 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05304121 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004122 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4123 tSirMacAddr peerMac;
4124 tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this.
4125} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004126
4127typedef enum TdlsAddOper
4128{
4129 TDLS_OPER_NONE,
4130 TDLS_OPER_ADD,
4131 TDLS_OPER_UPDATE
4132} eTdlsAddOper;
4133
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004134/* TDLS Request struct SME-->PE */
4135typedef struct sSirTdlsAddStaReq
4136{
4137 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4138 tANI_U16 length;
4139 tANI_U8 sessionId; // Session ID
4140 tANI_U16 transactionId; // Transaction ID for cmd
4141 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004142 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004143 tSirMacAddr peerMac;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004144 tANI_U16 capability;
4145 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
4146 tANI_U8 supported_rates_length;
4147 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -07004148 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004149 tSirHTCap htCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -07004150 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004151 tSirVHTCap vhtCap;
4152 tANI_U8 uapsd_queues;
4153 tANI_U8 max_sp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004154} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq ;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004155
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004156/* TDLS Response struct PE-->SME */
4157typedef struct sSirTdlsAddStaRsp
4158{
4159 tANI_U16 messageType;
4160 tANI_U16 length;
4161 tSirResultCodes statusCode;
4162 tSirMacAddr peerMac;
4163 tANI_U8 sessionId; // Session ID
4164 tANI_U16 staId ;
4165 tANI_U16 staType ;
4166 tANI_U8 ucastSig;
4167 tANI_U8 bcastSig;
Gopichand Nakkala681989c2013-03-06 22:27:48 -08004168 eTdlsAddOper tdlsAddOper;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004169} tSirTdlsAddStaRsp ;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304170
4171/* TDLS Request struct SME-->PE */
4172typedef struct
4173{
4174 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_REQ
4175 tANI_U16 length;
4176 tANI_U8 sessionId; // Session ID
4177 tANI_U16 transactionId; // Transaction ID for cmd
4178 tANI_U8 uapsdQueues; // Peer's uapsd Queues Information
4179 tANI_U8 maxSp; // Peer's Supported Maximum Service Period
4180 tANI_U8 isBufSta; // Does Peer Support as Buffer Station.
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304181 tANI_U8 isOffChannelSupported; // Does Peer Support as TDLS Off Channel.
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304182 tANI_U8 isResponder; // Is Peer a responder.
4183 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4184 tSirMacAddr peerMac;
Naresh Jayarambc62ba42014-02-12 21:39:14 +05304185 tANI_U8 supportedChannelsLen;
4186 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
4187 tANI_U8 supportedOperClassesLen;
4188 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05304189}tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
4190
4191/* TDLS Request struct SME-->PE */
4192typedef struct
4193{
4194 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_ESTABLISH_RSP
4195 tANI_U16 length;
4196 tANI_U8 sessionId; // Session ID
4197 tANI_U16 transactionId; // Transaction ID for cmd
4198 tSirResultCodes statusCode;
4199 tSirMacAddr peerMac;
4200}tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
4201
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004202/* TDLS Request struct SME-->PE */
4203typedef struct sSirTdlsDelStaReq
4204{
4205 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4206 tANI_U16 length;
4207 tANI_U8 sessionId; // Session ID
4208 tANI_U16 transactionId; // Transaction ID for cmd
4209 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4210 tSirMacAddr peerMac;
4211} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq ;
4212/* TDLS Response struct PE-->SME */
4213typedef struct sSirTdlsDelStaRsp
4214{
4215 tANI_U16 messageType;
4216 tANI_U16 length;
4217 tANI_U8 sessionId; // Session ID
4218 tSirResultCodes statusCode;
4219 tSirMacAddr peerMac;
4220 tANI_U16 staId;
4221} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
Hoonki Leee6bfe942013-02-05 15:01:19 -08004222/* TDLS Delete Indication struct PE-->SME */
4223typedef struct sSirTdlsDelStaInd
4224{
4225 tANI_U16 messageType;
4226 tANI_U16 length;
4227 tANI_U8 sessionId; // Session ID
4228 tSirMacAddr peerMac;
4229 tANI_U16 staId;
4230 tANI_U16 reasonCode;
4231} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -08004232typedef struct sSirTdlsDelAllPeerInd
4233{
4234 tANI_U16 messageType;
4235 tANI_U16 length;
4236 tANI_U8 sessionId; // Session ID
4237} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Gopichand Nakkalab977a972013-02-18 19:15:09 -08004238typedef struct sSirMgmtTxCompletionInd
4239{
4240 tANI_U16 messageType;
4241 tANI_U16 length;
4242 tANI_U8 sessionId; // Session ID
4243 tANI_U32 txCompleteStatus;
4244} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
Atul Mittalc0f739f2014-07-31 13:47:47 +05304245
4246//tdlsoffchan
4247/* TDLS Channel Switch struct SME-->PE */
4248typedef struct
4249{
4250 tANI_U16 messageType; //eWNI_SME_TDLS_CHANNEL_SWITCH_REQ
4251 tANI_U16 length;
4252 tANI_U8 sessionId; // Session ID
4253 tANI_U16 transactionId; // Transaction ID for cmd
4254 tANI_U8 tdlsOffCh; // Target Off Channel
4255 tANI_U8 tdlsOffChBwOffset;// Target Off Channel Bandwidth offset
4256 tANI_U8 tdlsSwMode; // TDLS Off Channel Mode
4257 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4258 tSirMacAddr peerMac;
4259}tSirTdlsChanSwitch, *tpSirTdlsChanSwitch;
4260
Atul Mittal60bd4292014-08-14 12:19:27 +05304261/* TDLS Resp struct */
4262typedef struct
4263{
4264 tANI_U16 messageType; // eWNI_SME_TDLS_CHANNEL_SWITCH_RSP
4265 tANI_U16 length;
4266 tANI_U8 sessionId; // Session ID
4267 tANI_U16 transactionId; // Transaction ID for cmd
4268 tSirResultCodes statusCode;
4269 tSirMacAddr peerMac;
4270}tSirTdlsChanSwitchReqRsp, *tpSirTdlsChanSwitchReqRsp;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08004271#endif /* FEATURE_WLAN_TDLS */
4272
4273#ifdef FEATURE_WLAN_TDLS_INTERNAL
4274typedef enum tdlsListType
4275{
4276 TDLS_DIS_LIST,
4277 TDLS_SETUP_LIST
4278}eTdlsListType ;
4279
4280typedef enum tdlsStates
4281{
4282 TDLS_LINK_IDLE_STATE,
4283 TDLS_LINK_DIS_INIT_STATE,
4284 TDLS_LINK_DIS_RSP_WAIT_STATE,
4285 TDLS_DIS_REQ_PROCESS_STATE,
4286 TDLS_DIS_RSP_SENT_WAIT_STATE,
4287 TDLS_DIS_RSP_SENT_DONE_STATE,
4288 TDLS_LINK_DIS_DONE_STATE,
4289 TDLS_LINK_SETUP_START_STATE,
4290 TDLS_LINK_SETUP_WAIT_STATE,
4291 TDLS_LINK_SETUP_RSP_WAIT_STATE,
4292 TDLS_LINK_SETUP_DONE_STATE,
4293 TDLS_LINK_TEARDOWN_START_STATE,
4294 TDLS_LINK_TEARDOWN_DONE_STATE,
4295 TDLS_LINK_SETUP_STATE
4296}eSirTdlsStates ;
4297
4298typedef struct sSirTdlsPeerInfo
4299{
4300 tSirMacAddr peerMac;
4301 tANI_U8 sessionId;
4302 tANI_U8 dialog ;
4303 tSirMacCapabilityInfo capabilityInfo ;
4304 tSirMacRateSet tdlsPeerSuppRates ;
4305 tSirMacRateSet tdlsPeerExtRates ;
4306 //tDot11fIEHTCaps tdlsPeerHtCaps ;
4307 tSirMacHTCapabilityInfo tdlsPeerHtCaps ;
4308 tSirMacHTParametersInfo tdlsPeerHtParams ;
4309 tSirMacExtendedHTCapabilityInfo tdlsPeerHtExtCaps ;
4310 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
4311
4312 //tDot11fIEExtCapability tdlsPeerExtenCaps ;
4313 tSirMacRsnInfo tdlsPeerRsn ;
4314 tANI_U16 tdlsPeerFtIe ;
4315 tANI_U16 tdlsPeerTimeoutIntvl ;
4316 tANI_U16 tdlsPeerSuppChan ;
4317 tANI_U16 tdlsPeerSuppReguClass ;
4318 tANI_S8 tdlsPeerRssi ;
4319 tANI_U16 tdlsPeerState ;
4320 /* flags to indicate optional IE's are in */
4321 tANI_U8 ExtRatesPresent ;
4322 tANI_U8 rsnIePresent ;
4323 tANI_U8 htCapPresent ;
4324 tANI_U8 delStaNeeded ;
4325
4326} tSirTdlsPeerInfo, *tpSirSmeTdlsPeerInfo ;
4327
4328/* TDLS Request struct SME-->PE */
4329typedef struct sSirTdlsDiscoveryReq
4330{
4331 tANI_U16 messageType; // eWNI_SME_TDLS_DISCOVERY_START_REQ
4332 tANI_U16 length;
4333 tANI_U8 sessionId; // Session ID
4334 tANI_U16 transactionId; // Transaction ID for cmd
4335 tANI_U8 reqType;
4336 tANI_U8 dialog;
4337 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4338 tSirMacAddr peerMac;
4339} tSirTdlsDisReq, *tpSirSmeTdlsDisReq ;
4340
4341typedef struct sSirTdlsLinkSetupReq
4342{
4343 tANI_U16 messageType; // eWNI_SME_TDLS_LINK_START_REQ
4344 tANI_U16 length;
4345 tANI_U8 sessionId; // Session ID
4346 tANI_U16 transactionId; // Transaction ID for cmd
4347 tANI_U8 dialog;
4348 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4349 tSirMacAddr peerMac;
4350} tSirTdlsSetupReq, *tpSirSmeTdlsSetupReq ;
4351
4352typedef struct sSirTdlsTeardownReq
4353{
4354 tANI_U16 messageType; // eWNI_SME_TDLS_TEARDOWN_REQ
4355 tANI_U16 length;
4356 tANI_U8 sessionId; // Session ID
4357 tANI_U16 transactionId; // Transaction ID for cmd
4358 tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID
4359 tSirMacAddr peerMac;
4360} tSirTdlsTeardownReq, *tpSirSmeTdlsTeardownReq ;
4361
4362
4363/* TDLS response struct PE-->SME */
4364typedef struct sSirTdlsDiscoveryRsp
4365{
4366 tANI_U16 messageType;
4367 tANI_U16 length;
4368 tSirResultCodes statusCode;
4369 tANI_U16 numDisSta ;
4370 tSirTdlsPeerInfo tdlsDisPeerInfo[0];
4371} tSirTdlsDisRsp, *tpSirSmeTdlsDiscoveryRsp;
4372
4373typedef struct sSirTdlsLinkSetupRsp
4374{
4375 tANI_U16 messageType;
4376 tANI_U16 length;
4377 tSirResultCodes statusCode;
4378 tSirMacAddr peerMac;
4379} tSirTdlsLinksetupRsp ;
4380
4381typedef struct sSirTdlsLinkSetupInd
4382{
4383 tANI_U16 messageType;
4384 tANI_U16 length;
4385 tSirResultCodes statusCode;
4386 tSirMacAddr peerMac;
4387} tSirTdlsLinkSetupInd ;
4388
4389
4390typedef struct sSirTdlsTeardownRsp
4391{
4392 tANI_U16 messageType;
4393 tANI_U16 length;
4394 tSirResultCodes statusCode;
4395 tSirMacAddr peerMac;
4396} tSirTdlsTeardownRsp ;
4397
4398typedef struct sSirTdlsPeerInd
4399{
4400 tANI_U16 messageType;
4401 tANI_U16 length;
4402 tSirMacAddr peerMac;
4403 tANI_U8 sessionId; // Session ID
4404 tANI_U16 staId ;
4405 tANI_U16 staType ;
4406 tANI_U8 ucastSig;
4407 tANI_U8 bcastSig;
4408} tSirTdlsPeerInd ;
4409
4410typedef struct sSirTdlsLinkEstablishInd
4411{
4412 tANI_U16 messageType;
4413 tANI_U16 length;
4414 tANI_U8 bIsResponder; /* if this is 1, self is initiator and peer is reponder */
4415 tANI_U8 linkIdenOffset; /* offset of LinkIdentifierIE.bssid[0] from ptiTemplateBuf */
4416 tANI_U8 ptiBufStatusOffset; /* offset of BufferStatus from ptiTemplateBuf */
4417 tANI_U8 ptiTemplateLen;
4418 tANI_U8 ptiTemplateBuf[64];
4419 tANI_U8 extCapability[8];
4420/* This will be part of PTI template when sent by PE
4421 tANI_U8 linkIdentifier[20];
4422*/
4423} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
4424
4425typedef struct sSirTdlsLinkTeardownInd
4426{
4427 tANI_U16 messageType;
4428 tANI_U16 length;
4429 tANI_U16 staId;
4430} tSirTdlsLinkTeardownInd, *tpSirTdlsLinkTeardownInd;
4431
4432#endif /* FEATURE_WLAN_TDLS_INTERNAL */
4433
Yathish9f22e662012-12-10 14:21:35 -08004434typedef struct sSirActiveModeSetBcnFilterReq
4435{
4436 tANI_U16 messageType;
4437 tANI_U16 length;
4438 tANI_U8 seesionId;
4439} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
4440
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304441typedef enum
4442{
4443 HT40_OBSS_SCAN_PARAM_START,
4444 HT40_OBSS_SCAN_PARAM_UPDATE
4445}tHT40OBssScanCmdType;
4446
4447typedef struct sSirSmeHT40StopOBSSScanInd
4448{
4449 tANI_U16 messageType;
4450 tANI_U16 length;
4451 tANI_U8 seesionId;
4452} tSirSmeHT40OBSSStopScanInd, *tpSirSmeHT40OBSSStopScanInd;
4453
4454typedef struct sSirSmeHT40OBSSScanInd
4455{
4456 tANI_U16 messageType;
4457 tANI_U16 length;
Sandeep Puligilla9f384742014-04-11 02:27:04 +05304458 tSirMacAddr peerMacAddr;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +05304459} tSirSmeHT40OBSSScanInd, *tpSirSmeHT40OBSSScanInd;
4460
4461typedef struct sSirHT40OBSSScanInd
4462{
4463 tHT40OBssScanCmdType cmdType;
4464 tSirScanType scanType;
4465 tANI_U16 OBSSScanPassiveDwellTime; // In TUs
4466 tANI_U16 OBSSScanActiveDwellTime; // In TUs
4467 tANI_U16 BSSChannelWidthTriggerScanInterval; // In seconds
4468 tANI_U16 OBSSScanPassiveTotalPerChannel; // In TU
4469 tANI_U16 OBSSScanActiveTotalPerChannel; // In TUs
4470 tANI_U16 BSSWidthChannelTransitionDelayFactor;
4471 tANI_U16 OBSSScanActivityThreshold;
4472 tANI_U8 selfStaIdx;
4473 tANI_U8 bssIdx;
4474 tANI_U8 fortyMHZIntolerent;
4475 tANI_U8 channelCount;
4476 tANI_U8 channels[SIR_ROAM_MAX_CHANNELS];
4477 tANI_U8 currentOperatingClass;
4478 tANI_U16 ieFieldLen;
4479 tANI_U8 ieField[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
4480} tSirHT40OBSSScanInd, *tpSirHT40OBSSScanInd;
4481
4482
Gopichand Nakkalacca24d12013-03-07 17:05:07 +05304483//Reset AP Caps Changed
4484typedef struct sSirResetAPCapsChange
4485{
4486 tANI_U16 messageType;
4487 tANI_U16 length;
4488 tSirMacAddr bssId;
4489} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07004490/// Definition for Candidate found indication from FW
4491typedef struct sSirSmeCandidateFoundInd
4492{
4493 tANI_U16 messageType; // eWNI_SME_CANDIDATE_FOUND_IND
4494 tANI_U16 length;
4495 tANI_U8 sessionId; // Session Identifier
4496} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
Yathish9f22e662012-12-10 14:21:35 -08004497
Chet Lanctot186b5732013-03-18 10:26:30 -07004498#ifdef WLAN_FEATURE_11W
4499typedef struct sSirWlanExcludeUnencryptParam
4500{
4501 tANI_BOOLEAN excludeUnencrypt;
4502 tSirMacAddr bssId;
4503}tSirWlanExcludeUnencryptParam,*tpSirWlanExcludeUnencryptParam;
4504#endif
4505
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07004506typedef struct sAniHandoffReq
4507{
4508 // Common for all types are requests
4509 tANI_U16 msgType; // message type is same as the request type
4510 tANI_U16 msgLen; // length of the entire request
4511 tANI_U8 sessionId;
4512 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4513 tANI_U8 channel;
4514} tAniHandoffReq, *tpAniHandoffReq;
4515
Ganesh Kondabattinif0fa07c2013-06-11 17:47:49 +05304516typedef struct sSirScanOffloadReq {
4517 tANI_U8 sessionId;
4518 tSirMacAddr bssId;
4519 tANI_U8 numSsid;
4520 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
4521 tANI_U8 hiddenSsid;
4522 tSirMacAddr selfMacAddr;
4523 tSirBssType bssType;
4524 tANI_U8 dot11mode;
4525 tSirScanType scanType;
4526 tANI_U32 minChannelTime;
4527 tANI_U32 maxChannelTime;
4528 tANI_BOOLEAN p2pSearch;
4529 tANI_U16 uIEFieldLen;
4530 tANI_U16 uIEFieldOffset;
4531 tSirChannelList channelList;
4532 /*-----------------------------
4533 sSirScanOffloadReq....
4534 -----------------------------
4535 uIEFieldLen
4536 -----------------------------
4537 uIEFieldOffset ----+
4538 ----------------------------- |
4539 channelList.numChannels |
4540 ----------------------------- |
4541 ... variable size up to |
4542 channelNumber[numChannels-1] |
4543 This can be zero, if |
4544 numChannel is zero. |
4545 ----------------------------- <--+
4546 ... variable size uIEField
4547 up to uIEFieldLen (can be 0)
4548 -----------------------------*/
4549} tSirScanOffloadReq, *tpSirScanOffloadReq;
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05304550
4551typedef enum sSirScanEventType {
4552 SCAN_EVENT_STARTED=0x1, /* Scan command accepted by FW */
4553 SCAN_EVENT_COMPLETED=0x2, /* Scan has been completed by FW */
4554 SCAN_EVENT_BSS_CHANNEL=0x4, /* FW is going to move to HOME channel */
4555 SCAN_EVENT_FOREIGN_CHANNEL = 0x8,/* FW is going to move to FORIEGN channel */
4556 SCAN_EVENT_DEQUEUED=0x10, /* scan request got dequeued */
4557 SCAN_EVENT_PREEMPTED=0x20, /* preempted by other high priority scan */
4558 SCAN_EVENT_START_FAILED=0x40, /* scan start failed */
4559 SCAN_EVENT_RESTARTED=0x80, /*scan restarted*/
4560 SCAN_EVENT_MAX=0x8000
4561} tSirScanEventType;
4562
4563typedef struct sSirScanOffloadEvent{
4564 tSirScanEventType event;
4565 tSirResultCodes reasonCode;
4566 tANI_U32 chanFreq;
4567 tANI_U32 requestor;
4568 tANI_U32 scanId;
4569} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
4570
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304571typedef struct sSirUpdateChanParam
4572{
4573 tANI_U8 chanId;
4574 tANI_U8 pwr;
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08004575 tANI_BOOLEAN dfsSet;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304576} tSirUpdateChanParam, *tpSirUpdateChanParam;
4577
4578typedef struct sSirUpdateChan
4579{
Sachin Ahujacb64fc82015-01-12 17:01:05 +05304580 tANI_U8 regId;
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05304581 tANI_U8 numChan;
4582 tSirUpdateChanParam chanParam[1];
4583} tSirUpdateChanList, *tpSirUpdateChanList;
4584
Leo Chang9056f462013-08-01 19:21:11 -07004585#ifdef FEATURE_WLAN_LPHB
4586#define SIR_LPHB_FILTER_LEN 64
4587
4588typedef enum
4589{
4590 LPHB_SET_EN_PARAMS_INDID,
4591 LPHB_SET_TCP_PARAMS_INDID,
4592 LPHB_SET_TCP_PKT_FILTER_INDID,
4593 LPHB_SET_UDP_PARAMS_INDID,
4594 LPHB_SET_UDP_PKT_FILTER_INDID,
4595 LPHB_SET_NETWORK_INFO_INDID,
4596} LPHBIndType;
4597
4598typedef struct sSirLPHBEnableStruct
4599{
4600 v_U8_t enable;
4601 v_U8_t item;
4602 v_U8_t session;
4603} tSirLPHBEnableStruct;
4604
4605typedef struct sSirLPHBTcpParamStruct
4606{
4607 v_U32_t srv_ip;
4608 v_U32_t dev_ip;
4609 v_U16_t src_port;
4610 v_U16_t dst_port;
4611 v_U16_t timeout;
4612 v_U8_t session;
4613 tSirMacAddr gateway_mac;
Leo Changd9df8aa2013-09-26 13:32:26 -07004614 uint16 timePeriodSec; // in seconds
4615 uint32 tcpSn;
Leo Chang9056f462013-08-01 19:21:11 -07004616} tSirLPHBTcpParamStruct;
4617
4618typedef struct sSirLPHBTcpFilterStruct
4619{
4620 v_U16_t length;
4621 v_U8_t offset;
4622 v_U8_t session;
4623 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4624} tSirLPHBTcpFilterStruct;
4625
4626typedef struct sSirLPHBUdpParamStruct
4627{
4628 v_U32_t srv_ip;
4629 v_U32_t dev_ip;
4630 v_U16_t src_port;
4631 v_U16_t dst_port;
4632 v_U16_t interval;
4633 v_U16_t timeout;
4634 v_U8_t session;
4635 tSirMacAddr gateway_mac;
4636} tSirLPHBUdpParamStruct;
4637
4638typedef struct sSirLPHBUdpFilterStruct
4639{
4640 v_U16_t length;
4641 v_U8_t offset;
4642 v_U8_t session;
4643 v_U8_t filter[SIR_LPHB_FILTER_LEN];
4644} tSirLPHBUdpFilterStruct;
4645
4646typedef struct sSirLPHBReq
4647{
4648 v_U16_t cmd;
4649 v_U16_t dummy;
4650 union
4651 {
4652 tSirLPHBEnableStruct lphbEnableReq;
4653 tSirLPHBTcpParamStruct lphbTcpParamReq;
4654 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
4655 tSirLPHBUdpParamStruct lphbUdpParamReq;
4656 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
4657 } params;
4658} tSirLPHBReq;
4659
Leo Changd9df8aa2013-09-26 13:32:26 -07004660typedef struct sSirLPHBInd
Leo Chang9056f462013-08-01 19:21:11 -07004661{
4662 v_U8_t sessionIdx;
4663 v_U8_t protocolType; /*TCP or UDP*/
4664 v_U8_t eventReason;
Leo Changd9df8aa2013-09-26 13:32:26 -07004665} tSirLPHBInd;
Leo Chang9056f462013-08-01 19:21:11 -07004666#endif /* FEATURE_WLAN_LPHB */
4667
Yue Mab9c86f42013-08-14 15:59:08 -07004668typedef struct sSirAddPeriodicTxPtrn
4669{
4670 /* MAC Address for the adapter */
4671 tSirMacAddr macAddress;
4672
4673 tANI_U8 ucPtrnId; // Pattern ID
4674 tANI_U16 ucPtrnSize; // Pattern size
4675 tANI_U32 usPtrnIntervalMs; // In msec
4676 tANI_U8 ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; // Pattern buffer
4677} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
4678
4679typedef struct sSirDelPeriodicTxPtrn
4680{
4681 /* MAC Address for the adapter */
4682 tSirMacAddr macAddress;
4683
4684 /* Bitmap of pattern IDs that need to be deleted */
4685 tANI_U32 ucPatternIdBitmap;
4686} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
4687
Chittajit Mitraf5413a42013-10-18 14:20:08 -07004688typedef struct sSirRateUpdateInd
4689{
4690 /* 0 implies RA, positive value implies fixed rate, -1 implies ignore this
4691 * param.
4692 */
4693 tANI_S32 ucastDataRate;
4694
4695 /* TX flag to differentiate between HT20, HT40 etc */
4696 tTxrateinfoflags ucastDataRateTxFlag;
4697
4698 /* BSSID - Optional. 00-00-00-00-00-00 implies apply to all BCAST STAs */
4699 tSirMacAddr bssid;
4700
4701 /*
4702 * 0 implies MCAST RA, positive value implies fixed rate,
4703 * -1 implies ignore this param
4704 */
4705 tANI_S32 reliableMcastDataRate;//unit Mbpsx10
4706
4707 /* TX flag to differentiate between HT20, HT40 etc */
4708 tTxrateinfoflags reliableMcastDataRateTxFlag;
4709
4710 /*
4711 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
4712 * 0 implies ignore
4713 */
4714 tANI_U32 mcastDataRate24GHz;
4715
4716 /* TX flag to differentiate between HT20, HT40 etc */
4717 tTxrateinfoflags mcastDataRate24GHzTxFlag;
4718
4719 /*
4720 * MCAST(or BCAST) fixed data rate in 5 GHz,
4721 * unit Mbpsx10, 0 implies ignore
4722 */
4723 tANI_U32 mcastDataRate5GHz;
4724
4725 /* TX flag to differentiate between HT20, HT40 etc */
4726 tTxrateinfoflags mcastDataRate5GHzTxFlag;
4727
4728} tSirRateUpdateInd, *tpSirRateUpdateInd;
4729
Rajeev79dbe4c2013-10-05 11:03:42 +05304730#ifdef FEATURE_WLAN_BATCH_SCAN
4731// Set batch scan resposne from FW
4732typedef struct
4733{
4734 /*maximum number of scans which FW can cache*/
4735 tANI_U32 nScansToBatch;
4736} tSirSetBatchScanRsp, *tpSirSetBatchScanRsp;
4737
4738// Set batch scan request to FW
4739typedef struct
4740{
4741 tANI_U32 scanFrequency; /* how frequent to do scan - default 30Sec*/
4742 tANI_U32 numberOfScansToBatch; /* number of scans to batch */
4743 tANI_U32 bestNetwork; /* best networks in terms of rssi */
4744 tANI_U8 rfBand; /* band to scan :
4745 0 ->both Band, 1->2.4Ghz Only
4746 and 2-> 5GHz Only */
4747 tANI_U32 rtt; /* set if required to do RTT it is not
4748 supported in current version */
4749} tSirSetBatchScanReq, *tpSirSetBatchScanReq;
4750
4751
4752// Stop batch scan request to FW
4753typedef struct
4754{
4755 tANI_U32 param;
4756} tSirStopBatchScanInd, *tpSirStopBatchScanInd;
4757
4758// Trigger batch scan result indication to FW
4759typedef struct
4760{
4761 tANI_U32 param;
4762} tSirTriggerBatchScanResultInd, *tpSirTriggerBatchScanResultInd;
4763
4764// Batch scan result indication from FW
4765typedef PACKED_PRE struct PACKED_POST
4766{
4767 tANI_U8 bssid[6]; /* BSSID */
Rajeev Kumar1f7759a2014-01-23 15:21:47 -08004768 tANI_U8 ssid[33]; /* SSID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304769 tANI_U8 ch; /* Channel */
c_hpothube955202014-05-22 18:07:00 +05304770 tANI_S8 rssi; /* RSSI or Level */
Rajeev79dbe4c2013-10-05 11:03:42 +05304771 /*Timestamp when Network was found. Used to calculate age based on timestamp
4772 in GET_RSP msg header */
4773 tANI_U32 timestamp;
4774} tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo;
4775
4776typedef PACKED_PRE struct PACKED_POST
4777{
4778 tANI_U32 scanId; /* Scan List ID. */
4779 /*No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg*/
4780 tANI_U32 numNetworksInScanList;
4781 /*Variable data ptr: Number of AP in Scan List*/
4782 /*Following numNetworkInScanList is data of type tSirBatchScanNetworkInfo
4783 *of sizeof(tSirBatchScanNetworkInfo) * numNetworkInScanList */
4784 tANI_U8 scanList[1];
4785} tSirBatchScanList, *tpSirBatchScanList;
4786
4787typedef PACKED_PRE struct PACKED_POST
4788{
4789 tANI_U32 timestamp;
4790 tANI_U32 numScanLists;
4791 boolean isLastResult;
4792 /* Variable Data ptr: Number of Scan Lists*/
4793 /* following isLastResult is data of type tSirBatchScanList
4794 * of sizeof(tSirBatchScanList) * numScanLists*/
4795 tANI_U8 scanResults[1];
4796} tSirBatchScanResultIndParam, *tpSirBatchScanResultIndParam;
4797
4798#endif // FEATURE_WLAN_BATCH_SCAN
4799
Leo Chang0b0e45a2013-12-15 15:18:55 -08004800#ifdef FEATURE_WLAN_CH_AVOID
4801#define SIR_CH_AVOID_MAX_RANGE 4
4802
4803typedef struct sSirChAvoidFreqType
4804{
4805 tANI_U32 startFreq;
4806 tANI_U32 endFreq;
4807} tSirChAvoidFreqType;
4808
4809typedef struct sSirChAvoidIndType
4810{
4811 tANI_U32 avoidRangeCount;
4812 tSirChAvoidFreqType avoidFreqRange[SIR_CH_AVOID_MAX_RANGE];
4813} tSirChAvoidIndType;
4814#endif /* FEATURE_WLAN_CH_AVOID */
Rajeev79dbe4c2013-10-05 11:03:42 +05304815
c_hpothu92367912014-05-01 15:18:17 +05304816typedef void (*pGetBcnMissRateCB)( tANI_S32 bcnMissRate,
4817 VOS_STATUS status, void *data);
Abhishek Singh08aa7762014-12-16 13:59:03 +05304818typedef void (*tSirFWStatsCallback)(VOS_STATUS status,
4819 tSirFwStatsResult *fwStatsRsp, void *pContext);
c_hpothu92367912014-05-01 15:18:17 +05304820typedef PACKED_PRE struct PACKED_POST
4821{
4822 tANI_U32 msgLen;
4823 tANI_U8 bssid[WNI_CFG_BSSID_LEN];
4824 void *callback;
4825 void *data;
4826}tSirBcnMissRateReq;
4827
4828typedef PACKED_PRE struct PACKED_POST
4829{
4830 pGetBcnMissRateCB callback;
4831 void *data;
4832}tSirBcnMissRateInfo;
4833
Sunil Duttc69bccb2014-05-26 21:30:20 +05304834#ifdef WLAN_FEATURE_LINK_LAYER_STATS
4835
4836typedef struct
4837{
4838 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05304839 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304840 u32 mpduSizeThreshold;
4841 u32 aggressiveStatisticsGathering;
4842}tSirLLStatsSetReq, *tpSirLLStatsSetReq;
4843
4844typedef struct
4845{
4846 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05304847 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304848 u32 paramIdMask;
4849}tSirLLStatsGetReq, *tpSirLLStatsGetReq;
4850
4851typedef struct
4852{
4853 u32 reqId;
Dino Mycled3d50022014-07-07 12:58:25 +05304854 tSirMacAddr macAddr;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304855 u32 statsClearReqMask;
4856 u8 stopReq;
4857}tSirLLStatsClearReq, *tpSirLLStatsClearReq;
4858
Abhishek Singh3ae443b2014-10-08 11:49:27 +05304859typedef PACKED_PRE struct PACKED_POST
4860{
4861 u32 stats;
4862 tSirFWStatsCallback callback;
4863 void *data;
4864}tSirFWStatsGetReq;
4865
4866typedef PACKED_PRE struct PACKED_POST
4867{
4868 tSirFWStatsCallback callback;
4869 void *data;
4870}tSirFWStatsInfo;
4871
Sunil Duttc69bccb2014-05-26 21:30:20 +05304872/*---------------------------------------------------------------------------
4873 WLAN_HAL_LL_NOTIFY_STATS
4874---------------------------------------------------------------------------*/
4875
4876
4877/******************************LINK LAYER Statistics**********************/
4878
4879typedef int tSirWifiRadio;
4880typedef int tSirWifiChannel;
4881typedef int tSirwifiTxRate;
4882
4883/* channel operating width */
4884typedef PACKED_PRE enum PACKED_POST
4885{
4886 WIFI_CHAN_WIDTH_20 = 0,
4887 WIFI_CHAN_WIDTH_40 = 1,
4888 WIFI_CHAN_WIDTH_80 = 2,
4889 WIFI_CHAN_WIDTH_160 = 3,
4890 WIFI_CHAN_WIDTH_80P80 = 4,
4891 WIFI_CHAN_WIDTH_5 = 5,
4892 WIFI_CHAN_WIDTH_10 = 6,
4893} tSirWifiChannelWidth;
4894
4895typedef PACKED_PRE enum PACKED_POST
4896{
4897 WIFI_DISCONNECTED = 0,
4898 WIFI_AUTHENTICATING = 1,
4899 WIFI_ASSOCIATING = 2,
4900 WIFI_ASSOCIATED = 3,
4901 WIFI_EAPOL_STARTED = 4, // if done by firmware/driver
4902 WIFI_EAPOL_COMPLETED = 5, // if done by firmware/driver
4903} tSirWifiConnectionState;
4904
4905typedef PACKED_PRE enum PACKED_POST
4906{
4907 WIFI_ROAMING_IDLE = 0,
4908 WIFI_ROAMING_ACTIVE = 1,
4909} tSirWifiRoamState;
4910
4911typedef PACKED_PRE enum PACKED_POST
4912{
Dino Myclec8f3f332014-07-21 16:48:27 +05304913 WIFI_INTERFACE_UNKNOWN = -1,
Sunil Duttc69bccb2014-05-26 21:30:20 +05304914 WIFI_INTERFACE_STA = 0,
4915 WIFI_INTERFACE_SOFTAP = 1,
4916 WIFI_INTERFACE_IBSS = 2,
4917 WIFI_INTERFACE_P2P_CLIENT = 3,
4918 WIFI_INTERFACE_P2P_GO = 4,
4919 WIFI_INTERFACE_NAN = 5,
4920 WIFI_INTERFACE_MESH = 6,
4921 } tSirWifiInterfaceMode;
4922
4923// set for QOS association
4924#define WIFI_CAPABILITY_QOS 0x00000001
4925// set for protected association (802.11 beacon frame control protected bit set)
4926#define WIFI_CAPABILITY_PROTECTED 0x00000002
4927// set if 802.11 Extended Capabilities element interworking bit is set
4928#define WIFI_CAPABILITY_INTERWORKING 0x00000004
4929// set for HS20 association
4930#define WIFI_CAPABILITY_HS20 0x00000008
4931// set is 802.11 Extended Capabilities element UTF-8 SSID bit is set
4932#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
4933// set is 802.11 Country Element is present
4934#define WIFI_CAPABILITY_COUNTRY 0x00000020
4935
4936typedef PACKED_PRE struct PACKED_POST
4937{
4938 /*tSirWifiInterfaceMode*/
4939 // interface mode
Dino Myclec8f3f332014-07-21 16:48:27 +05304940 tANI_S8 mode;
Sunil Duttc69bccb2014-05-26 21:30:20 +05304941 // interface mac address (self)
4942 tSirMacAddr macAddr;
4943 /*tSirWifiConnectionState*/
4944 // connection state (valid for STA, CLI only)
4945 tANI_U8 state;
4946 /*tSirWifiRoamState*/
4947 // roaming state
4948 tANI_U8 roaming;
4949 // WIFI_CAPABILITY_XXX (self)
4950 tANI_U32 capabilities;
4951 // null terminated SSID
4952 tANI_U8 ssid[33];
4953 // bssid
4954 tSirMacAddr bssid;
4955 // country string advertised by AP
4956 tANI_U8 apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
4957 // country string for this association
4958 tANI_U8 countryStr[WNI_CFG_COUNTRY_CODE_LEN];
4959} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
4960
4961/* channel information */
4962typedef PACKED_PRE struct PACKED_POST
4963{
4964 // channel width (20, 40, 80, 80+80, 160)
4965 tSirWifiChannelWidth width;
4966 // primary 20 MHz channel
4967 tSirWifiChannel centerFreq;
4968 // center frequency (MHz) first segment
4969 tSirWifiChannel centerFreq0;
4970 // center frequency (MHz) second segment
4971 tSirWifiChannel centerFreq1;
4972} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
4973
4974/* wifi rate info */
4975typedef PACKED_PRE struct PACKED_POST
4976{
4977 // 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved
4978 tANI_U32 preamble :3;
4979 // 0:1x1, 1:2x2, 3:3x3, 4:4x4
4980 tANI_U32 nss :2;
4981 // 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz
4982 tANI_U32 bw :3;
4983 // OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
4984 // HT/VHT it would be mcs index
4985 tANI_U32 rateMcsIdx :8;
4986 // reserved
4987 tANI_U32 reserved :16;
4988 // units of 100 Kbps
4989 tANI_U32 bitrate;
4990} tSirWifiRate, *tpSirWifiRate;
4991
4992/* channel statistics */
4993typedef PACKED_PRE struct PACKED_POST
4994{
4995 // channel
4996 tSirWifiChannelInfo channel;
4997 // msecs the radio is awake (32 bits number accruing over time)
4998 tANI_U32 onTime;
4999 // msecs the CCA register is busy (32 bits number accruing over time)
5000 tANI_U32 ccaBusyTime;
5001} tSirWifiChannelStats, *tpSirWifiChannelStats;
5002
5003/* radio statistics */
5004typedef PACKED_PRE struct PACKED_POST
5005{
5006 // wifi radio (if multiple radio supported)
5007 tSirWifiRadio radio;
5008 // msecs the radio is awake (32 bits number accruing over time)
5009 tANI_U32 onTime;
5010 /* msecs the radio is transmitting
5011 * (32 bits number accruing over time)
5012 */
5013 tANI_U32 txTime;
5014 /* msecs the radio is in active receive
5015 *(32 bits number accruing over time)
5016 */
5017 tANI_U32 rxTime;
5018 /* msecs the radio is awake due to all scan
5019 * (32 bits number accruing over time)
5020 */
5021 tANI_U32 onTimeScan;
5022 /* msecs the radio is awake due to NAN
5023 * (32 bits number accruing over time)
5024 */
5025 tANI_U32 onTimeNbd;
Dino Mycle2c198072014-06-10 10:15:52 +05305026 /* msecs the radio is awake due to EXTScan
Sunil Duttc69bccb2014-05-26 21:30:20 +05305027 * (32 bits number accruing over time)
5028 */
Dino Mycle2c198072014-06-10 10:15:52 +05305029 tANI_U32 onTimeEXTScan;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305030 /* msecs the radio is awake due to roam?scan
5031 * (32 bits number accruing over time)
5032 */
5033 tANI_U32 onTimeRoamScan;
5034 /* msecs the radio is awake due to PNO scan
5035 * (32 bits number accruing over time)
5036 */
5037 tANI_U32 onTimePnoScan;
5038 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
5039 * (32 bits number accruing over time)
5040 */
5041 tANI_U32 onTimeHs20;
5042 // number of channels
5043 tANI_U32 numChannels;
5044 // channel statistics tSirWifiChannelStats
5045 tSirWifiChannelStats channels[1];
5046} tSirWifiRadioStat, *tpSirWifiRadioStat;
5047
5048/* per rate statistics */
5049typedef PACKED_PRE struct PACKED_POST
5050{
5051 // rate information
5052 tSirWifiRate rate;
5053 // number of successfully transmitted data pkts (ACK rcvd)
5054 tANI_U32 txMpdu;
5055 // number of received data pkts
5056 tANI_U32 rxMpdu;
5057 // number of data packet losses (no ACK)
5058 tANI_U32 mpduLost;
5059 // total number of data pkt retries *
5060 tANI_U32 retries;
5061 // number of short data pkt retries
5062 tANI_U32 retriesShort;
5063 // number of long data pkt retries
5064 tANI_U32 retriesLong;
5065} tSirWifiRateStat, *tpSirWifiRateStat;
5066
5067/* access categories */
5068typedef PACKED_PRE enum PACKED_POST
5069{
5070 WIFI_AC_VO = 0,
5071 WIFI_AC_VI = 1,
5072 WIFI_AC_BE = 2,
5073 WIFI_AC_BK = 3,
5074 WIFI_AC_MAX = 4,
5075} tSirWifiTrafficAc;
5076
5077/* wifi peer type */
5078typedef PACKED_PRE enum PACKED_POST
5079{
5080 WIFI_PEER_STA,
5081 WIFI_PEER_AP,
5082 WIFI_PEER_P2P_GO,
5083 WIFI_PEER_P2P_CLIENT,
5084 WIFI_PEER_NAN,
5085 WIFI_PEER_TDLS,
5086 WIFI_PEER_INVALID,
5087} tSirWifiPeerType;
5088
5089/* per peer statistics */
5090typedef PACKED_PRE struct PACKED_POST
5091{
5092 // peer type (AP, TDLS, GO etc.)
5093 tSirWifiPeerType type;
5094 // mac address
5095 tSirMacAddr peerMacAddress;
5096 // peer WIFI_CAPABILITY_XXX
5097 tANI_U32 capabilities;
5098 // number of rates
5099 tANI_U32 numRate;
5100 // per rate statistics, number of entries = num_rate
5101 tSirWifiRateStat rateStats[1];
5102} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
5103
5104/* per access category statistics */
5105typedef PACKED_PRE struct PACKED_POST
5106{
5107 /*tSirWifiTrafficAc*/
5108 // access category (VI, VO, BE, BK)
5109 tANI_U8 ac;
5110 // number of successfully transmitted unicast data pkts (ACK rcvd)
5111 tANI_U32 txMpdu;
5112 // number of received unicast mpdus
5113 tANI_U32 rxMpdu;
5114 // number of succesfully transmitted multicast data packets
5115 // STA case: implies ACK received from AP for the unicast
5116 // packet in which mcast pkt was sent
5117 tANI_U32 txMcast;
5118 // number of received multicast data packets
5119 tANI_U32 rxMcast;
5120 // number of received unicast a-mpdus
5121 tANI_U32 rxAmpdu;
5122 // number of transmitted unicast a-mpdus
5123 tANI_U32 txAmpdu;
5124 // number of data pkt losses (no ACK)
5125 tANI_U32 mpduLost;
5126 // total number of data pkt retries
5127 tANI_U32 retries;
5128 // number of short data pkt retries
5129 tANI_U32 retriesShort;
5130 // number of long data pkt retries
5131 tANI_U32 retriesLong;
5132 // data pkt min contention time (usecs)
5133 tANI_U32 contentionTimeMin;
5134 // data pkt max contention time (usecs)
5135 tANI_U32 contentionTimeMax;
5136 // data pkt avg contention time (usecs)
5137 tANI_U32 contentionTimeAvg;
5138 // num of data pkts used for contention statistics
5139 tANI_U32 contentionNumSamples;
5140} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
5141
5142/* Interface statistics - corresponding to 2nd most
5143 * LSB in wifi statistics bitmap for getting statistics
5144 */
5145typedef PACKED_PRE struct PACKED_POST
5146{
5147 // current state of the interface
5148 tSirWifiInterfaceInfo info;
5149 // access point beacon received count from connected AP
5150 tANI_U32 beaconRx;
5151 // access point mgmt frames received count from
5152 // connected AP (including Beacon)
5153 tANI_U32 mgmtRx;
5154 // action frames received count
5155 tANI_U32 mgmtActionRx;
5156 // action frames transmit count
5157 tANI_U32 mgmtActionTx;
5158 // access Point Beacon and Management frames RSSI (averaged)
Dino Mycle3b9536d2014-07-09 22:05:24 +05305159 tANI_S32 rssiMgmt;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305160 // access Point Data Frames RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305161 tANI_S32 rssiData;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305162 // access Point ACK RSSI (averaged) from connected AP
Dino Mycle3b9536d2014-07-09 22:05:24 +05305163 tANI_S32 rssiAck;
Sunil Duttc69bccb2014-05-26 21:30:20 +05305164 // per ac data packet statistics
5165 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
5166} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
5167
5168/* Peer statistics - corresponding to 3rd most LSB in
5169 * wifi statistics bitmap for getting statistics
5170 */
5171typedef PACKED_PRE struct PACKED_POST
5172{
5173 // number of peers
5174 tANI_U32 numPeers;
5175 // per peer statistics
5176 tSirWifiPeerInfo peerInfo[1];
5177} tSirWifiPeerStat, *tpSirWifiPeerStat;
5178
5179/* wifi statistics bitmap for getting statistics */
5180#define WMI_LINK_STATS_RADIO 0x00000001
5181#define WMI_LINK_STATS_IFACE 0x00000002
5182#define WMI_LINK_STATS_ALL_PEER 0x00000004
5183#define WMI_LINK_STATS_PER_PEER 0x00000008
5184
5185/* wifi statistics bitmap for clearing statistics */
5186// all radio statistics
5187#define WIFI_STATS_RADIO 0x00000001
5188// cca_busy_time (within radio statistics)
5189#define WIFI_STATS_RADIO_CCA 0x00000002
5190// all channel statistics (within radio statistics)
5191#define WIFI_STATS_RADIO_CHANNELS 0x00000004
5192// all scan statistics (within radio statistics)
5193#define WIFI_STATS_RADIO_SCAN 0x00000008
5194// all interface statistics
5195#define WIFI_STATS_IFACE 0x00000010
5196// all tx rate statistics (within interface statistics)
5197#define WIFI_STATS_IFACE_TXRATE 0x00000020
5198// all ac statistics (within interface statistics)
5199#define WIFI_STATS_IFACE_AC 0x00000040
5200// all contention (min, max, avg) statistics (within ac statistics)
5201#define WIFI_STATS_IFACE_CONTENTION 0x00000080
5202
5203typedef PACKED_PRE struct PACKED_POST
5204{
5205 tANI_U32 paramId;
5206 tANI_U8 ifaceId;
5207 tANI_U32 respId;
5208 tANI_U32 moreResultToFollow;
5209 tANI_U8 result[1];
5210} tSirLLStatsResults, *tpSirLLStatsResults;
5211
5212#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
5213
Dino Mycle2c198072014-06-10 10:15:52 +05305214#ifdef WLAN_FEATURE_EXTSCAN
5215
5216typedef enum
5217{
5218 WIFI_BAND_UNSPECIFIED,
5219 WIFI_BAND_BG = 1, // 2.4 GHz
5220 WIFI_BAND_A = 2, // 5 GHz without DFS
5221 WIFI_BAND_ABG = 3, // 2.4 GHz + 5 GHz; no DFS
5222 WIFI_BAND_A_DFS_ONLY = 4, // 5 GHz DFS only
5223 // 5 is reserved
5224 WIFI_BAND_A_WITH_DFS = 6, // 5 GHz with DFS
5225 WIFI_BAND_ABG_WITH_DFS = 7, // 2.4 GHz + 5 GHz with DFS
5226
5227 /* Keep it last */
5228 WIFI_BAND_MAX
5229} tWifiBand;
5230
5231/* wifi scan related events */
5232typedef enum
5233{
5234 WIFI_SCAN_BUFFER_FULL,
5235 WIFI_SCAN_COMPLETE,
5236} tWifiScanEventType;
5237
5238typedef struct
5239{
5240 tSirMacAddr bssid; // AP BSSID
5241 tANI_S32 low; // low threshold
5242 tANI_S32 high; // high threshold
5243 tANI_U32 channel; // channel hint
5244} tSirAPThresholdParam, *tpSirAPThresholdParam;
5245
5246typedef struct
5247{
5248 tANI_U32 requestId;
5249 tANI_U8 sessionId;
5250} tSirGetEXTScanCapabilitiesReqParams, *tpSirGetEXTScanCapabilitiesReqParams;
5251
5252typedef struct
5253{
5254 tANI_U32 requestId;
5255 tANI_U32 status;
5256
5257 tANI_U32 scanCacheSize;
5258 tANI_U32 scanBuckets;
5259 tANI_U32 maxApPerScan;
5260 tANI_U32 maxRssiSampleSize;
5261 tANI_U32 maxScanReportingThreshold;
5262
5263 tANI_U32 maxHotlistAPs;
5264 tANI_U32 maxSignificantWifiChangeAPs;
5265
5266 tANI_U32 maxBsidHistoryEntries;
5267} tSirEXTScanCapabilitiesEvent, *tpSirEXTScanCapabilitiesEvent;
5268
5269/* WLAN_HAL_EXT_SCAN_RESULT_IND */
5270typedef struct
5271{
5272 tANI_U32 requestId;
5273 tANI_U8 sessionId;
5274
5275 /*
5276 * 1 return cached results and flush it
5277 * 0 return cached results and do not flush
5278 */
5279 tANI_BOOLEAN flush;
5280} tSirEXTScanGetCachedResultsReqParams, *tpSirEXTScanGetCachedResultsReqParams;
5281
5282typedef PACKED_PRE struct PACKED_POST
5283{
5284 tANI_U32 requestId;
5285 tANI_U32 status;
5286} tSirEXTScanGetCachedResultsRspParams, *tpSirEXTScanGetCachedResultsRspParams;
5287
5288typedef PACKED_PRE struct PACKED_POST
5289{
5290 tANI_U64 ts; // time of discovery
5291 tANI_U8 ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; // null terminated SSID
5292 tSirMacAddr bssid; // BSSID
5293 tANI_U32 channel; // channel frequency in MHz
5294 tANI_S32 rssi; // RSSI in dBm
5295 tANI_U32 rtt; // RTT in nanoseconds
5296 tANI_U32 rtt_sd; // standard deviation in rtt
5297 tANI_U16 beaconPeriod; // period advertised in the beacon
5298 tANI_U16 capability; // capabilities advertised in the beacon
5299} tSirWifiScanResult, *tpSirWifiScanResult;
5300
5301/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
5302
5303typedef PACKED_PRE struct PACKED_POST
5304{
5305 tANI_U32 requestId;
5306 tANI_U32 numOfAps; // numbers of APs
5307
5308 /*
5309 * 0 for last fragment
5310 * 1 still more fragment(s) coming
5311 */
5312 tANI_BOOLEAN moreData;
5313 tSirWifiScanResult ap[1];
5314} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
5315
5316typedef PACKED_PRE struct PACKED_POST
5317{
5318 tANI_U8 elemId; // Element Identifier
5319 tANI_U8 ieLength; // length of IE data
5320 tANI_U8 *IEs; // IEs
5321} tSirInformationElement, *tpSirInformationElement;
5322
5323/* Reported when each probe response is received, if reportEvents
5324* enabled in tSirWifiScanCmdReqParams */
5325typedef struct
5326{
5327 tANI_U32 requestId;
5328
5329 /*
5330 * 0 for last fragment
5331 * 1 still more fragment(s) coming
5332 */
5333 tANI_BOOLEAN moreData;
5334 tSirWifiScanResult ap; // only 1 AP info for now
5335 tANI_U32 ieLength;
5336 tSirInformationElement *ie;
5337} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
5338
5339
5340typedef struct
5341{
5342 tANI_U32 channel; // frequency
5343 tANI_U32 dwellTimeMs; // dwell time hint
5344 tANI_U8 passive; // 0 => active,
5345 // 1 => passive scan; ignored for DFS
5346 tANI_U8 chnlClass;
5347} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
5348
5349typedef struct
5350{
5351 tANI_U8 bucket; // bucket index, 0 based
5352 tWifiBand band; // when UNSPECIFIED, use channel list
5353
5354 /*
5355 * desired period, in millisecond; if this is too
5356 * low, the firmware should choose to generate results as fast as
5357 * it can instead of failing the command byte
5358 */
5359 tANI_U32 period;
5360
5361 /*
5362 * 0 => normal reporting (reporting rssi history
5363 * only, when rssi history buffer is % full)
5364 * 1 => same as 0 + report a scan completion event after scanning
5365 * this bucket
5366 * 2 => same as 1 + forward scan results (beacons/probe responses + IEs)
5367 * in real time to HAL
5368 */
5369 tANI_U8 reportEvents;
5370
5371 tANI_U8 numChannels;
5372
5373 /*
5374 * channels to scan; these may include DFS channels
5375 */
5376 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
5377} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
5378
5379typedef struct
5380{
5381 tANI_U32 requestId;
5382 tANI_U8 sessionId;
5383 tANI_U32 basePeriod; // base timer period
5384 tANI_U32 maxAPperScan;
5385
5386 /* in %, when buffer is this much full, wake up host */
5387 tANI_U32 reportThreshold;
5388
5389 tANI_U8 numBuckets;
5390 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
5391} tSirEXTScanStartReqParams, *tpSirEXTScanStartReqParams;
5392
5393typedef PACKED_PRE struct PACKED_POST
5394{
5395 tANI_U32 requestId;
5396 tANI_U32 status;
5397} tSirEXTScanStartRspParams, *tpSirEXTScanStartRspParams;
5398
5399typedef struct
5400{
5401 tANI_U32 requestId;
5402 tANI_U8 sessionId;
5403} tSirEXTScanStopReqParams, *tpSirEXTScanStopReqParams;
5404
5405typedef PACKED_PRE struct PACKED_POST
5406{
5407 tANI_U32 requestId;
5408 tANI_U32 status;
5409} tSirEXTScanStopRspParams, *tpSirEXTScanStopRspParams;
5410
5411typedef struct
5412{
5413 tANI_U32 requestId;
5414 tANI_U8 sessionId; // session Id mapped to vdev_id
5415
5416 tANI_U32 numAp; // number of hotlist APs
5417 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; // hotlist APs
5418} tSirEXTScanSetBssidHotListReqParams, *tpSirEXTScanSetBssidHotListReqParams;
5419
5420typedef PACKED_PRE struct PACKED_POST
5421{
5422 tANI_U32 requestId;
5423 tANI_U32 status;
5424} tSirEXTScanSetBssidHotListRspParams, *tpSirEXTScanSetBssidHotListRspParams;
5425
5426typedef struct
5427{
5428 tANI_U32 requestId;
5429 tANI_U8 sessionId;
5430} tSirEXTScanResetBssidHotlistReqParams, *tpSirEXTScanResetBssidHotlistReqParams;
5431
5432typedef PACKED_PRE struct PACKED_POST
5433{
5434 tANI_U32 requestId;
5435 tANI_U32 status;
5436} tSirEXTScanResetBssidHotlistRspParams, *tpSirEXTScanResetBssidHotlistRspParams;
5437
5438typedef struct
5439{
5440 tANI_U32 requestId;
5441 tANI_U8 sessionId;
5442
5443 /* number of samples for averaging RSSI */
5444 tANI_U32 rssiSampleSize;
5445
5446 /* number of missed samples to confirm AP loss */
5447 tANI_U32 lostApSampleSize;
5448
5449 /* number of APs breaching threshold required for firmware
5450 * to generate event
5451 */
5452 tANI_U32 minBreaching;
5453
5454 tANI_U32 numAp;
5455 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
5456} tSirEXTScanSetSignificantChangeReqParams,
5457 *tpSirEXTScanSetSignificantChangeReqParams;
5458
5459typedef PACKED_PRE struct PACKED_POST
5460{
5461 tANI_U32 requestId;
5462 tANI_U32 status;
5463} tSirEXTScanSetSignificantChangeRspParams,
5464 *tpSirEXTScanSetSignificantChangeRspParams;
5465
5466/*---------------------------------------------------------------------------
5467 * WLAN_HAL_SIG_RSSI_RESULT_IND
5468 *-------------------------------------------------------------------------*/
5469
5470typedef PACKED_PRE struct PACKED_POST
5471{
5472 tSirMacAddr bssid; // BSSID
5473 tANI_U32 channel; // channel frequency in MHz
5474 tANI_U8 numRssi; // number of rssi samples
5475 tANI_S32 rssi[WLAN_EXTSCAN_MAX_RSSI_SAMPLE_SIZE]; // RSSI history in db
5476} tSirSigRssiResultParams, *tpSirSigRssiResultParams;
5477
5478typedef PACKED_PRE struct PACKED_POST
5479{
5480 tANI_U32 requestId;
5481 tANI_U32 numSigRssiBss;
5482 tANI_BOOLEAN moreData;
5483 tSirSigRssiResultParams sigRssiResult[1];
5484} tSirWifiSignificantChangeEvent, *tpSirWifiSignificantChangeEvent;
5485
5486typedef struct
5487{
5488 tANI_U32 requestId;
5489 tANI_U8 sessionId;
5490} tSirEXTScanResetSignificantChangeReqParams,
5491 *tpSirEXTScanResetSignificantChangeReqParams;
5492
5493typedef PACKED_PRE struct PACKED_POST
5494{
5495 tANI_U32 requestId;
5496 tANI_U32 status;
5497} tSirEXTScanResetSignificantChangeRspParams,
5498 *tpSirEXTScanResetSignificantChangeRspParams;
5499
5500/*---------------------------------------------------------------------------
5501 * * WLAN_HAL_EXTSCAN_RESULT_AVAILABLE_IND
5502 * *-------------------------------------------------------------------------*/
5503typedef PACKED_PRE struct PACKED_POST
5504{
5505 tANI_U32 requestId;
5506 tANI_U32 numResultsAvailable;
5507} tSirEXTScanResultsAvailableIndParams,
5508 *tpSirEXTScanResultsAvailableIndParams;
5509
5510typedef PACKED_PRE struct PACKED_POST
5511{
5512 tANI_U8 scanEventType;
5513 tANI_U32 status;
5514} tSirEXTScanOnScanEventIndParams,
5515 *tpSirEXTScanOnScanEventIndParams;
5516
5517/*---------------------------------------------------------------------------
5518 * * WLAN_HAL_EXTSCAN_PROGRESS_IND
5519 * *-------------------------------------------------------------------------*/
5520
5521typedef PACKED_PRE enum PACKED_POST
5522{
5523 WLAN_HAL_EXTSCAN_BUFFER_FULL,
5524 WLAN_HAL_EXTSCAN_COMPLETE,
5525}tSirEXTScanProgressEventType;
5526
5527typedef PACKED_PRE struct PACKED_POST
5528{
5529 tANI_U32 requestId;
5530 tANI_U32 status;
5531 tSirEXTScanProgressEventType extScanEventType;
5532}tSirEXTScanProgressIndParams,
5533 *tpSirEXTScanProgressIndParams;
5534
5535
5536
5537#endif /* WLAN_FEATURE_EXTSCAN */
5538
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +05305539typedef struct
5540{
5541 tANI_U16 messageType;
5542 tANI_U16 length;
5543 tSirMacAddr macAddr;
5544} tSirSpoofMacAddrReq, *tpSirSpoofMacAddrReq;
5545
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05305546typedef struct
5547{
5548 //BIT order is most likely little endian.
5549 //This structure is for netowkr-order byte array (or big-endian byte order)
5550#ifndef WLAN_PAL_BIG_ENDIAN_BIT
5551 tANI_U8 protVer :2;
5552 tANI_U8 type :2;
5553 tANI_U8 subType :4;
5554
5555 tANI_U8 toDS :1;
5556 tANI_U8 fromDS :1;
5557 tANI_U8 moreFrag :1;
5558 tANI_U8 retry :1;
5559 tANI_U8 powerMgmt :1;
5560 tANI_U8 moreData :1;
5561 tANI_U8 wep :1;
5562 tANI_U8 order :1;
5563
5564#else
5565
5566 tANI_U8 subType :4;
5567 tANI_U8 type :2;
5568 tANI_U8 protVer :2;
5569
5570 tANI_U8 order :1;
5571 tANI_U8 wep :1;
5572 tANI_U8 moreData :1;
5573 tANI_U8 powerMgmt :1;
5574 tANI_U8 retry :1;
5575 tANI_U8 moreFrag :1;
5576 tANI_U8 fromDS :1;
5577 tANI_U8 toDS :1;
5578
5579#endif
5580
5581} tSirFC;
5582
5583typedef struct
5584{
5585 /* Frame control field */
5586 tSirFC frameCtrl;
5587 /* Duration ID */
5588 tANI_U16 usDurationId;
5589 /* Address 1 field */
5590 tSirMacAddr vA1;
5591 /* Address 2 field */
5592 tSirMacAddr vA2;
5593 /* Address 3 field */
5594 tSirMacAddr vA3;
5595 /* Sequence control field */
5596 tANI_U16 sSeqCtrl;
5597 /* Optional A4 address */
5598 tSirMacAddr optvA4;
5599 /* Optional QOS control field */
5600 tANI_U16 usQosCtrl;
5601}tSir80211Header;
5602// Definition for Encryption Keys
5603//typedef struct sSirKeys
5604typedef struct
5605{
5606 tANI_U8 keyId;
5607 tANI_U8 unicast; // 0 for multicast
5608 tAniKeyDirection keyDirection;
5609 tANI_U8 keyRsc[WLAN_MAX_KEY_RSC_LEN]; // Usage is unknown
5610 tANI_U8 paeRole; // =1 for authenticator,
5611 // =0 for supplicant
5612 tANI_U16 keyLength;
5613 tANI_U8 key[SIR_MAC_MAX_KEY_LENGTH];
5614} tMacKeys, *tpMacKeys;
5615
5616typedef enum
5617{
5618 eMAC_WEP_STATIC,
5619 eMAC_WEP_DYNAMIC,
5620} tMacWepType;
5621
5622/*
5623 * This is used by PE to configure the key information on a given station.
5624 * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
5625 * a preconfigured key from a BSS the station assoicated with; otherwise
5626 * a new key descriptor is created based on the key field.
5627 */
5628//typedef struct
5629typedef struct
5630{
5631 tANI_U16 staIdx;
5632 tAniEdType encType; // Encryption/Decryption type
5633 tMacWepType wepType; // valid only for WEP
5634 tANI_U8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
5635 tMacKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
5636 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
5637 tANI_U8 sessionId; // PE session id for PE<->HAL interface
5638} tSirSetStaKeyParams, *tpSirSetStaKeyParams;
5639
5640//typedef struct
5641typedef struct
5642{
5643 tSirSetStaKeyParams keyParams;
5644 tANI_U8 pn[6];
5645}tSirencConfigParams;
5646
5647typedef struct
5648{
5649 tANI_U16 length;
5650 tANI_U8 data[WLAN_DISA_MAX_PAYLOAD_SIZE];
5651}tSirpayload;
5652
5653typedef struct
5654{
5655 tSir80211Header macHeader;
5656 tSirencConfigParams encParams;
5657 tSirpayload data;
5658}tSirpkt80211;
5659
5660typedef struct
5661{
5662 tANI_U32 status;
5663 tSirpayload encryptedPayload;
5664} tSetEncryptedDataRspParams, *tpSetEncryptedDataRspParams;
5665
5666typedef struct
5667{
5668 tANI_U16 mesgType;
5669 tANI_U16 mesgLen;
5670 tSetEncryptedDataRspParams encryptedDataRsp;
5671} tSirEncryptedDataRspParams, *tpSirEncryptedDataRspParams;
c_hpothua3d45d52015-01-05 14:11:17 +05305672
5673typedef enum eSirAbortScanStatus
5674{
5675 eSIR_ABORT_ACTIVE_SCAN_LIST_EMPTY,
5676 eSIR_ABORT_ACTIVE_SCAN_LIST_NOT_EMPTY,
5677 eSIR_ABORT_SCAN_FAILURE
5678}tSirAbortScanStatus;
5679
Masti, Narayanraddi4b359dd2015-02-03 15:49:29 +05305680/* Max number of rates allowed in Supported Rates IE */
5681#define MAX_NUM_SUPPORTED_RATES (8)
5682
Girish Gowlia95daca2015-02-04 20:31:31 +05305683typedef struct sSirSmeUpdateMaxRateParams
5684{
5685 tANI_U32 maxRateFlag;
5686 tANI_U8 smeSessionId;
5687}tSirSmeUpdateMaxRateParams, *tpSirSmeUpdateMaxRateParams;
5688
Jeff Johnson295189b2012-06-20 16:38:30 -07005689#endif /* __SIR_API_H */