blob: a627a09d4785f14408efc0f80ac2e201ec955049 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2012-2015 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 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/*
29 * This file sir_api.h contains definitions exported by
30 * Sirius software.
31 * Author: Chandra Modumudi
32 * Date: 04/16/2002
33 * History:-
34 * Date Modified by Modification Information
35 * --------------------------------------------------------------------
36 */
37
38#ifndef __SIR_API_H
39#define __SIR_API_H
40
41#include "sir_types.h"
42#include "sir_mac_prot_def.h"
43#include "ani_system_defs.h"
44#include "sir_params.h"
45
46#define OFFSET_OF(structType, fldName) (&((structType *)0)->fldName)
47
48/* / Max supported channel list */
49#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
50
51#define SIR_MDIE_ELEMENT_ID 54
52#define SIR_MDIE_SIZE 3
53
54/* Increase dwell time for P2P search in ms */
55#define P2P_SEARCH_DWELL_TIME_INCREASE 20
56#define P2P_SOCIAL_CHANNELS 3
57
58/* Max number of channels are 165, but to access 165th element of array,
59 *array of 166 is required.
60 */
61#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
62#define SIR_BCN_REPORT_MAX_BSS_DESC 4
63
64#define SIR_NUM_11B_RATES 4 /* 1,2,5.5,11 */
65#define SIR_NUM_11A_RATES 8 /* 6,9,12,18,24,36,48,54 */
66
67#define SIR_PM_SLEEP_MODE 0
68#define SIR_PM_ACTIVE_MODE 1
69
70/* hidden SSID options */
71#define SIR_SCAN_NO_HIDDEN_SSID 0
72#define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1
73
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080074#define SIR_IPV4_ADDR_LEN 4
75
76typedef uint8_t tSirIpv4Addr[SIR_IPV4_ADDR_LEN];
77
78#define SIR_VERSION_STRING_LEN 64
79typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
80
81/* Periodic Tx pattern offload feature */
82#define PERIODIC_TX_PTRN_MAX_SIZE 1536
83#define MAXNUM_PERIODIC_TX_PTRNS 6
84#define WIFI_SCANNING_MAC_OUI_LENGTH 3
85
86#ifdef FEATURE_WLAN_EXTSCAN
87
88#define WLAN_EXTSCAN_MAX_CHANNELS 36
89#define WLAN_EXTSCAN_MAX_BUCKETS 16
90#define WLAN_EXTSCAN_MAX_HOTLIST_APS 128
91#define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
92#define WLAN_EXTSCAN_MAX_HOTLIST_SSIDS 8
93
94/* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */
95#define MAX_VDEV_SUPPORTED 4
96
Chandrasekaran, Manishekaref70c0d2015-10-20 19:54:55 +053097/**
98 * enum cds_conn_update_reason: Reason for conc connection update
99 * @CDS_UPDATE_REASON_SET_OPER_CHAN: Set probable operating channel
100 * @CDS_UPDATE_REASON_JOIN_IBSS: Join IBSS
101 * @CDS_UPDATE_REASON_UT: Unit test related
102 * @CDS_UPDATE_REASON_START_AP: Start AP
103 * @CDS_UPDATE_REASON_NORMAL_STA: Connection to Normal STA
104 * @CDS_UPDATE_REASON_HIDDEN_STA: Connection to Hidden STA
105 * @CDS_UPDATE_REASON_OPPORTUNISTIC: Opportunistic HW mode update
106 * @CDS_UPDATE_REASON_NSS_UPDATE: NSS update
107 */
108enum cds_conn_update_reason {
109 CDS_UPDATE_REASON_SET_OPER_CHAN,
110 CDS_UPDATE_REASON_JOIN_IBSS,
111 CDS_UPDATE_REASON_UT,
112 CDS_UPDATE_REASON_START_AP,
113 CDS_UPDATE_REASON_NORMAL_STA,
114 CDS_UPDATE_REASON_HIDDEN_STA,
115 CDS_UPDATE_REASON_OPPORTUNISTIC,
116 CDS_UPDATE_REASON_NSS_UPDATE,
117};
118
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800119typedef enum {
120 eSIR_EXTSCAN_INVALID,
121 eSIR_EXTSCAN_START_RSP,
122 eSIR_EXTSCAN_STOP_RSP,
123 eSIR_EXTSCAN_CACHED_RESULTS_RSP,
124 eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP,
125 eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP,
126 eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP,
127 eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP,
128
129 eSIR_EXTSCAN_GET_CAPABILITIES_IND,
130 eSIR_EXTSCAN_HOTLIST_MATCH_IND,
131 eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
132 eSIR_EXTSCAN_CACHED_RESULTS_IND,
133 eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
134 eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND,
135 eSIR_EXTSCAN_FULL_SCAN_RESULT_IND,
136 eSIR_EPNO_NETWORK_FOUND_IND,
137 eSIR_PASSPOINT_NETWORK_FOUND_IND,
138 eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP,
139 eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP,
140 eSIR_EXTSCAN_HOTLIST_SSID_MATCH_IND,
141
142 /* Keep this last */
143 eSIR_EXTSCAN_CALLBACK_TYPE_MAX,
144} tSirExtScanCallbackType;
145
146#endif /* FEATURE_WLAN_EXTSCAN */
147
148#define SIR_KRK_KEY_LEN 16
149#ifdef WLAN_FEATURE_ROAM_OFFLOAD
150#define SIR_BTK_KEY_LEN 32
151#define SIR_KCK_KEY_LEN 16
152#define SIR_KEK_KEY_LEN 16
153#define SIR_REPLAY_CTR_LEN 8
154
155#define SIR_UAPSD_BITOFFSET_ACVO 0
156#define SIR_UAPSD_BITOFFSET_ACVI 1
157#define SIR_UAPSD_BITOFFSET_ACBK 2
158#define SIR_UAPSD_BITOFFSET_ACBE 3
159
160#define SIR_UAPSD_FLAG_ACVO (1 << SIR_UAPSD_BITOFFSET_ACVO)
161#define SIR_UAPSD_FLAG_ACVI (1 << SIR_UAPSD_BITOFFSET_ACVI)
162#define SIR_UAPSD_FLAG_ACBK (1 << SIR_UAPSD_BITOFFSET_ACBK)
163#define SIR_UAPSD_FLAG_ACBE (1 << SIR_UAPSD_BITOFFSET_ACBE)
164#define SIR_UAPSD_GET(ac, mask) (((mask) & (SIR_UAPSD_FLAG_ ## ac)) >> SIR_UAPSD_BITOFFSET_ ## ac)
165#endif
166
167/**
168 * Module ID definitions.
169 */
170enum {
171 SIR_BOOT_MODULE_ID = 1,
172 SIR_HAL_MODULE_ID = 0x10,
173 SIR_CFG_MODULE_ID = 0x12,
174 SIR_LIM_MODULE_ID,
175 SIR_ARQ_MODULE_ID,
176 SIR_SCH_MODULE_ID,
177 SIR_PMM_MODULE_ID,
178 SIR_MNT_MODULE_ID,
179 SIR_DBG_MODULE_ID,
180 SIR_DPH_MODULE_ID,
181 SIR_SYS_MODULE_ID,
182 SIR_SMS_MODULE_ID,
183};
184
185#define SIR_WMA_MODULE_ID SIR_HAL_MODULE_ID
186
187/**
188 * First and last module definition for logging utility
189 *
190 * NOTE: The following definitions need to be updated if
191 * the above list is changed.
192 */
193#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
194#define SIR_LAST_MODULE_ID SIR_SMS_MODULE_ID
195
196/* Type declarations used by Firmware and Host software */
197
198/* Scan type enum used in scan request */
199typedef enum eSirScanType {
200 eSIR_PASSIVE_SCAN,
201 eSIR_ACTIVE_SCAN,
202 eSIR_BEACON_TABLE,
203} tSirScanType;
204
205/* / Result codes Firmware return to Host SW */
206typedef enum eSirResultCodes {
207 eSIR_SME_SUCCESS,
208 eSIR_LOGP_EXCEPTION,
209 eSIR_SME_INVALID_PARAMETERS = 500,
210 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
211 eSIR_SME_RESOURCES_UNAVAILABLE,
212 /* Unable to find a BssDescription */
213 eSIR_SME_SCAN_FAILED,
214 /* matching requested scan criteria */
215 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
216 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
217 eSIR_SME_REFUSED,
218 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
219 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
220 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
221 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
222 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
223 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
224 eSIR_SME_AUTH_REFUSED,
225 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
226 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
227 eSIR_SME_ASSOC_REFUSED,
228 eSIR_SME_REASSOC_REFUSED,
229 /* Recvd Deauth while join/pre-auth */
230 eSIR_SME_DEAUTH_WHILE_JOIN,
231 eSIR_SME_STA_NOT_AUTHENTICATED,
232 eSIR_SME_STA_NOT_ASSOCIATED,
233 eSIR_SME_ALREADY_JOINED_A_BSS,
234 /* Given in SME_SCAN_RSP msg */
235 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW,
236 /* that more SME_SCAN_RSP */
237 /* messages are following. */
238 /* SME_SCAN_RSP message with */
239 /* eSIR_SME_SUCCESS status */
240 /* code is the last one. */
241 /* Sent in SME_JOIN/REASSOC_RSP */
242 eSIR_SME_INVALID_ASSOC_RSP_RXED,
243 /* messages upon receiving */
244 /* invalid Re/Assoc Rsp frame. */
245 /* STOP BSS triggered by MIC failures: MAC software to
246 * disassoc all stations
247 */
248 eSIR_SME_MIC_COUNTER_MEASURES,
249 /* with MIC_FAILURE reason code and perform the stop bss operation */
250 /* didn't get rsp from peer within timeout interval */
251 eSIR_SME_ADDTS_RSP_TIMEOUT,
252 /* didn't get success rsp from HAL */
253 eSIR_SME_ADDTS_RSP_FAILED,
254 /* failed to send ch switch act frm */
255 eSIR_SME_CHANNEL_SWITCH_FAIL,
256 eSIR_SME_INVALID_STATE,
257 /* SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status */
258 eSIR_SME_HAL_SCAN_INIT_FAILED,
259 /* SIR_HAL_END_SCAN_RSP returned failed status */
260 eSIR_SME_HAL_SCAN_END_FAILED,
261 /* SIR_HAL_FINISH_SCAN_RSP returned failed status */
262 eSIR_SME_HAL_SCAN_FINISH_FAILED,
263 /* Failed to send a message to HAL */
264 eSIR_SME_HAL_SEND_MESSAGE_FAIL,
265 /* Failed to stop the bss */
266 eSIR_SME_STOP_BSS_FAILURE,
267 eSIR_SME_WOWL_ENTER_REQ_FAILED,
268 eSIR_SME_WOWL_EXIT_REQ_FAILED,
269#if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \
270 defined(FEATURE_WLAN_LFR)
271 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
272 eSIR_SME_FT_REASSOC_FAILURE,
273#endif
274 eSIR_SME_SEND_ACTION_FAIL,
275 eSIR_SME_DEAUTH_STATUS,
276 eSIR_PNO_SCAN_SUCCESS,
277 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
278} tSirResultCodes;
279
Krishna Kumaar Natarajanf599c6e2015-11-03 11:44:03 -0800280#define RMENABLEDCAP_MAX_LEN 5
281
282struct rrm_config_param {
283 uint8_t rrm_enabled;
284 uint8_t max_randn_interval;
285 uint8_t rm_capability[RMENABLEDCAP_MAX_LEN];
286};
287
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800288/* each station added has a rate mode which specifies the sta attributes */
289typedef enum eStaRateMode {
290 eSTA_TAURUS = 0,
291 eSTA_TITAN,
292 eSTA_POLARIS,
293 eSTA_11b,
294 eSTA_11bg,
295 eSTA_11a,
296 eSTA_11n,
297#ifdef WLAN_FEATURE_11AC
298 eSTA_11ac,
299#endif
300 eSTA_INVALID_RATE_MODE
301} tStaRateMode, *tpStaRateMode;
302
303/*
304 * although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8
305 * bits with MSB=1 for basic rates. change the mask for bit0-7 only so HAL gets
306 * correct basic rates for setting response rates.
307 */
308#define IERATE_BASICRATE_MASK 0x80
309#define IERATE_RATE_MASK 0x7f
310#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
311
312typedef struct sSirSupportedRates {
313 /*
314 * For Self STA Entry: this represents Self Mode.
315 * For Peer Stations, this represents the mode of the peer.
316 * On Station:
317 * --this mode is updated when PE adds the Self Entry.
318 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is
319 * used to indicate the mode of the AP.
320 * ON AP:
321 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for
322 * that BSS is used to indicate the self mode of the AP.
323 * -- OR when a station is associated, PE sends 'ADD_STA' message with
324 * this mode updated.
325 */
326
327 tStaRateMode opRateMode;
328 /*
329 * 11b, 11a and aniLegacyRates are IE rates which gives rate in unit
330 * of 500Kbps
331 */
332 uint16_t llbRates[SIR_NUM_11B_RATES];
333 uint16_t llaRates[SIR_NUM_11A_RATES];
334 /*
335 * 0-76 bits used, remaining reserved
336 * bits 0-15 and 32 should be set.
337 */
338 uint8_t supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
339
340 /*
341 * RX Highest Supported Data Rate defines the highest data
342 * rate that the STA is able to receive, in unites of 1Mbps.
343 * This value is derived from "Supported MCS Set field" inside
344 * the HT capability element.
345 */
346 uint16_t rxHighestDataRate;
347
348#ifdef WLAN_FEATURE_11AC
349 /*Indicates the Maximum MCS that can be received for each number
350 of spacial streams */
351 uint16_t vhtRxMCSMap;
352 /*Indicate the highest VHT data rate that the STA is able to receive */
353 uint16_t vhtRxHighestDataRate;
354 /*Indicates the Maximum MCS that can be transmitted for each number
355 of spacial streams */
356 uint16_t vhtTxMCSMap;
357 /*Indicate the highest VHT data rate that the STA is able to transmit */
358 uint16_t vhtTxHighestDataRate;
359#endif
360} tSirSupportedRates, *tpSirSupportedRates;
361
362typedef enum eSirRFBand {
363 SIR_BAND_UNKNOWN,
364 SIR_BAND_2_4_GHZ,
365 SIR_BAND_5_GHZ,
366} tSirRFBand;
367
368typedef struct sSirRemainOnChnReq {
369 uint16_t messageType;
370 uint16_t length;
371 uint8_t sessionId;
Srinivas Girigowda450f7162015-09-24 10:58:51 -0700372 struct cdf_mac_addr selfMacAddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800373 uint8_t chnNum;
374 uint8_t phyMode;
375 uint32_t duration;
376 uint8_t isProbeRequestAllowed;
377 uint32_t scan_id;
378 uint8_t probeRspIe[1];
379} tSirRemainOnChnReq, *tpSirRemainOnChnReq;
380
381/**
382 * struct sir_roc_rsp - Structure to store the remain on channel response
383 * @message_type: Message Type
384 * @length: Message Length
385 * @session_id: SME session Id
386 * @scan_id : scan identifier
387 * @status: result status
388 */
389struct sir_roc_rsp {
390 uint16_t message_type;
391 uint16_t length;
392 uint8_t session_id;
393 uint32_t scan_id;
394 tSirResultCodes status;
395};
396
397typedef struct sSirRegisterMgmtFrame {
398 uint16_t messageType;
399 uint16_t length;
400 uint8_t sessionId;
401 bool registerFrame;
402 uint16_t frameType;
403 uint16_t matchLen;
404 uint8_t matchData[1];
405} tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
406
407/* / Generic type for sending a response message */
408/* / with result code to host software */
409typedef struct sSirSmeRsp {
410 uint16_t messageType; /* eWNI_SME_*_RSP */
411 uint16_t length;
412 uint8_t sessionId; /* To support BT-AMP */
413 uint16_t transactionId; /* To support BT-AMP */
414 tSirResultCodes statusCode;
415} tSirSmeRsp, *tpSirSmeRsp;
416
417/* / Definition for indicating all modules ready on STA */
418typedef struct sSirSmeReadyReq {
419 uint16_t messageType; /* eWNI_SME_SYS_READY_IND */
420 uint16_t length;
421 uint16_t transactionId;
422 void *add_bssdescr_cb;
423} tSirSmeReadyReq, *tpSirSmeReadyReq;
424
425/**
426 * struct sir_hw_mode - Format of set HW mode
427 * @hw_mode_index: Index of HW mode to be set
428 * @set_hw_mode_cb: HDD set HW mode callback
Chandrasekaran, Manishekaref70c0d2015-10-20 19:54:55 +0530429 * @reason: Reason for HW mode change
430 * @session_id: Session id
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800431 */
432struct sir_hw_mode {
433 uint32_t hw_mode_index;
434 void *set_hw_mode_cb;
Chandrasekaran, Manishekaref70c0d2015-10-20 19:54:55 +0530435 enum cds_conn_update_reason reason;
436 uint32_t session_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800437};
438
439/**
440 * struct s_sir_set_hw_mode - Set HW mode request
441 * @messageType: Message type
442 * @length: Length of the message
443 * @set_hw: Params containing the HW mode index and callback
444 */
445struct s_sir_set_hw_mode {
446 uint16_t messageType;
447 uint16_t length;
448 struct sir_hw_mode set_hw;
449};
450
451/**
452 * struct sir_dual_mac_config - Dual MAC configuration
453 * @scan_config: Scan configuration
454 * @fw_mode_config: FW mode configuration
455 * @set_dual_mac_cb: Callback function to be executed on response to the command
456 */
457struct sir_dual_mac_config {
458 uint32_t scan_config;
459 uint32_t fw_mode_config;
460 void *set_dual_mac_cb;
461};
462
463/**
464 * struct sir_set_dual_mac_cfg - Set Dual mac config request
465 * @message_type: Message type
466 * @length: Length of the message
467 * @set_dual_mac: Params containing the dual mac config and callback
468 */
469struct sir_set_dual_mac_cfg {
470 uint16_t message_type;
471 uint16_t length;
472 struct sir_dual_mac_config set_dual_mac;
473};
474
475/* / BSS type enum used in while scanning/joining etc */
476typedef enum eSirBssType {
477 eSIR_INFRASTRUCTURE_MODE,
478 eSIR_INFRA_AP_MODE, /* Added for softAP support */
479 eSIR_IBSS_MODE,
480 eSIR_BTAMP_STA_MODE, /* Added for BT-AMP support */
481 eSIR_BTAMP_AP_MODE, /* Added for BT-AMP support */
482 eSIR_AUTO_MODE,
483 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
484} tSirBssType;
485
486/* / Power Capability info used in 11H */
487typedef struct sSirMacPowerCapInfo {
488 uint8_t minTxPower;
489 uint8_t maxTxPower;
490} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
491
492/* / Supported Channel info used in 11H */
493typedef struct sSirSupChnl {
494 uint8_t numChnl;
495 uint8_t channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
496} tSirSupChnl, *tpSirSupChnl;
497
498typedef enum eSirNwType {
499 eSIR_11A_NW_TYPE,
500 eSIR_11B_NW_TYPE,
501 eSIR_11G_NW_TYPE,
502 eSIR_11N_NW_TYPE,
503#ifdef WLAN_FEATURE_11AC
504 eSIR_11AC_NW_TYPE,
505#endif
506 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
507} tSirNwType;
508
509/* / Definition for new iBss peer info */
510typedef struct sSirNewIbssPeerInfo {
Srinivas Girigowdafd061522015-09-24 12:31:51 -0700511 struct cdf_mac_addr peerAddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800512 uint16_t aid;
513} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
514
515/* HT configuration values */
516typedef struct sSirHtConfig {
517 /* Enable/Disable receiving LDPC coded packets */
518 uint32_t ht_rx_ldpc:1;
519 /* Enable/Disable TX STBC */
520 uint32_t ht_tx_stbc:1;
521 /* Enable/Disable RX STBC */
522 uint32_t ht_rx_stbc:2;
523 /* Enable/Disable SGI */
524 uint32_t ht_sgi:1;
525 uint32_t unused:27;
526} cdf_packed tSirHTConfig, *tpSirHTConfig;
527
528typedef struct sSirAddIeParams {
529 uint16_t probeRespDataLen;
530 uint8_t *probeRespData_buff;
531 uint16_t assocRespDataLen;
532 uint8_t *assocRespData_buff;
533 uint16_t probeRespBCNDataLen;
534 uint8_t *probeRespBCNData_buff;
535} tSirAddIeParams, *tpSirAddIeParams;
536
537/* / Definition for kick starting BSS */
538/* / ---> MAC */
539/**
540 * Usage of ssId, numSSID & ssIdList:
541 * ---------------------------------
542 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
543 * feature is enabled.
544 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
545 * and interpret the SSID list from numSSID & ssIdList.
546 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
547 * specified in the ssId field and it is expected that
548 * application will set numSSID to one (only one SSID present
549 * in the list) and SSID in the list is same as ssId field.
550 * 4. Application will always set numSSID >= 1.
551 */
552/* ***** NOTE: Please make sure all codes are updated if inserting field into
553 * this structure..********** */
554typedef struct sSirSmeStartBssReq {
555 uint16_t messageType; /* eWNI_SME_START_BSS_REQ */
556 uint16_t length;
557 uint8_t sessionId; /* Added for BT-AMP Support */
558 uint16_t transactionId; /* Added for BT-AMP Support */
Srinivas Girigowdad8af4a62015-11-18 16:51:16 -0800559 struct cdf_mac_addr bssid; /* Added for BT-AMP Support */
560 struct cdf_mac_addr self_macaddr; /* Added for BT-AMP Support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800561 uint16_t beaconInterval; /* Added for BT-AMP Support */
562 uint8_t dot11mode;
563#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
564 uint8_t cc_switch_mode;
565#endif
566 tSirBssType bssType;
567 tSirMacSSid ssId;
568 uint8_t channelId;
569 ePhyChanBondState cbMode;
570 uint8_t vht_channel_width;
571 uint8_t center_freq_seg0;
572 uint8_t center_freq_seg1;
573 uint8_t sec_ch_offset;
574
575 uint8_t privacy;
576 uint8_t apUapsdEnable;
577 uint8_t ssidHidden;
578 bool fwdWPSPBCProbeReq;
579 bool protEnabled;
580 bool obssProtEnabled;
581 uint16_t ht_capab;
582 tAniAuthType authType;
583 uint32_t dtimPeriod;
584 uint8_t wps_state;
585 uint8_t isCoalesingInIBSSAllowed; /* Coalesing on/off knob */
586 tCDF_CON_MODE bssPersona;
587
588 uint8_t txLdpcIniFeatureEnabled;
589
590 tSirRSNie rsnIE; /* RSN IE to be sent in */
591 /* Beacon and Probe */
592 /* Response frames */
593 tSirNwType nwType; /* Indicates 11a/b/g */
594 tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */
595 tSirMacRateSet extendedRateSet; /* Has 11g rates */
596 tSirHTConfig htConfig;
597
598#ifdef WLAN_FEATURE_11W
599 bool pmfCapable;
600 bool pmfRequired;
601#endif
602
603 tSirAddIeParams addIeParams;
604
605 bool obssEnabled;
606 uint8_t sap_dot11mc;
607
608} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
609
610#define GET_IE_LEN_IN_BSS(lenInBss) (lenInBss + sizeof(lenInBss) - \
611 ((uintptr_t)OFFSET_OF(tSirBssDescription,\
612 ieFields)))
613
614#define WSCIE_PROBE_RSP_LEN (317 + 2)
615
616typedef struct sSirBssDescription {
617 /* offset of the ieFields from bssId. */
618 uint16_t length;
619 tSirMacAddr bssId;
620 v_TIME_t scanSysTimeMsec;
621 uint32_t timeStamp[2];
622 uint16_t beaconInterval;
623 uint16_t capabilityInfo;
624 tSirNwType nwType; /* Indicates 11a/b/g */
625 uint8_t reserved_padding0;
626 int8_t rssi;
627 int8_t sinr;
628 /* channelId what peer sent in beacon/probersp. */
629 uint8_t channelId;
630 /* channelId on which we are parked at. */
631 /* used only in scan case. */
632 uint8_t channelIdSelf;
633 uint8_t sSirBssDescriptionRsvd[3];
634 /* base on a tick count. It is a time stamp, not a relative time. */
635 uint32_t nReceivedTime;
636#if defined WLAN_FEATURE_VOWIFI
637 uint32_t parentTSF;
638 uint32_t startTSF[2];
639#endif
640#ifdef WLAN_FEATURE_VOWIFI_11R
641 uint8_t mdiePresent;
642 /* MDIE for 11r, picked from the beacons */
643 uint8_t mdie[SIR_MDIE_SIZE];
644#endif
645#ifdef FEATURE_WLAN_ESE
646 uint16_t QBSSLoad_present;
647 uint16_t QBSSLoad_avail;
648 /* To achieve 8-byte alignment with ESE enabled */
649 uint32_t reservedPadding5;
650#endif
651 /* Please keep the structure 4 bytes aligned above the ieFields */
652
653 /* whether it is from a probe rsp */
654 uint8_t fProbeRsp;
655 uint8_t reservedPadding1;
656 uint8_t reservedPadding2;
657 uint8_t reservedPadding3;
658 uint32_t WscIeLen;
659 uint8_t WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
660 uint8_t reservedPadding4;
661 uint32_t tsf_delta;
662
663 uint32_t ieFields[1];
664} tSirBssDescription, *tpSirBssDescription;
665
666#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
667typedef struct sSirSmeHTProfile {
668 uint8_t dot11mode;
669 uint8_t htCapability;
670 uint8_t htSupportedChannelWidthSet;
671 uint8_t htRecommendedTxWidthSet;
672 ePhyChanBondState htSecondaryChannelOffset;
673#ifdef WLAN_FEATURE_11AC
674 uint8_t vhtCapability;
675 uint8_t vhtTxChannelWidthSet;
676 uint8_t apCenterChan;
677 uint8_t apChanWidth;
678#endif
679} tSirSmeHTProfile;
680#endif
681/* / Definition for response message to previously */
682/* / issued start BSS request */
683/* / MAC ---> */
684typedef struct sSirSmeStartBssRsp {
685 uint16_t messageType; /* eWNI_SME_START_BSS_RSP */
686 uint16_t length;
687 uint8_t sessionId;
688 uint16_t transactionId; /* transaction ID for cmd */
689 tSirResultCodes statusCode;
690 tSirBssType bssType; /* Add new type for WDS mode */
691 uint16_t beaconInterval; /* Beacon Interval for both type */
692 uint32_t staId; /* Staion ID for Self */
693#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
694 tSirSmeHTProfile HTProfile;
695#endif
696 tSirBssDescription bssDescription; /* Peer BSS description */
697} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
698
699typedef struct sSirChannelList {
700 uint8_t numChannels;
701 uint8_t channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
702} tSirChannelList, *tpSirChannelList;
703
704typedef struct sSirDFSChannelList {
705 uint32_t timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
706
707} tSirDFSChannelList, *tpSirDFSChannelList;
708
709#ifdef FEATURE_WLAN_ESE
710typedef struct sTspecInfo {
711 uint8_t valid;
712 tSirMacTspecIE tspec;
713} tTspecInfo;
714
715#define SIR_ESE_MAX_TSPEC_IES 4
716typedef struct sESETspecTspecInfo {
717 uint8_t numTspecs;
718 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
719} tESETspecInfo;
720#endif
721
722/* / Two Background Scan mode */
723typedef enum eSirBackgroundScanMode {
724 eSIR_ROAMING_SCAN = 2,
725} tSirBackgroundScanMode;
726
727/* / Two types of traffic check */
728typedef enum eSirLinkTrafficCheck {
729 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
730 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
731 eSIR_CHECK_ROAMING_SCAN = 2,
732} tSirLinkTrafficCheck;
733
734#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
735#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
736#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
737#define SIR_SCAN_MAX_NUM_SSID 0x0A
738#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
739#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
740
741/* / Definition for scan request */
742typedef struct sSirSmeScanReq {
743 uint16_t messageType; /* eWNI_SME_SCAN_REQ */
744 uint16_t length;
745 uint8_t sessionId; /* Session ID */
746 uint16_t transactionId; /* Transaction ID for cmd */
Srinivas Girigowda2c6bf002015-09-24 11:43:31 -0700747 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800748 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
Srinivas Girigowda2c6bf002015-09-24 11:43:31 -0700749 struct cdf_mac_addr selfMacAddr; /* Added For BT-AMP Support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800750 tSirBssType bssType;
751 uint8_t dot11mode;
752 tSirScanType scanType;
753 uint32_t scan_id;
754 /**
755 * minChannelTime. Not used if scanType is passive.
756 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
757 * 11k measurements set this to 0 to user only single duration for scan.
758 * <valid timeout> - Timeout value used for min channel timeout.
759 */
760 uint32_t minChannelTime;
761 /**
762 * maxChannelTime.
763 * 0x0 - Invalid. In case of active scan.
764 * In case of passive scan, MAX( maxChannelTime,
765 * WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
766 */
767 uint32_t maxChannelTime;
768 /**
769 * returnAfterFirstMatch can take following values:
770 * 0x00 - Return SCAN_RSP message after complete channel scan
771 * 0x01 - Return SCAN_RSP message after collecting BSS description
772 * that matches scan criteria.
773 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
774 * 5 GHz band channels
775 * 0x80 - Return after collecting first 11d IE from 5 GHz band
776 * channels
777 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
778 * band channels
779 *
780 * Values of 0xC0, 0x80 & 0x40 are to be used by
781 * Roaming/application when 11d is enabled.
782 */
783 /* in units of milliseconds, ignored when not connected */
784 uint32_t restTime;
785 uint8_t returnAfterFirstMatch;
786
787 /**
788 * returnUniqueResults can take following values:
789 * 0 - Collect & report all received BSS descriptions from same BSS.
790 * 1 - Collect & report unique BSS description from same BSS.
791 */
792 uint8_t returnUniqueResults;
793
794 /**
795 * returnFreshResults can take following values:
796 * 0x00 - Return background scan results.
797 * 0x80 - Return & purge background scan results
798 * 0x01 - Trigger fresh scan instead of returning background scan
799 * results.
800 * 0x81 - Trigger fresh scan instead of returning background scan
801 * results and purge background scan results.
802 */
803 uint8_t returnFreshResults;
804
805 /* backgroundScanMode can take following values:
806 * 0x0 - agressive scan
807 * 0x1 - normal scan where HAL will check for link traffic
808 * prior to proceeding with the scan
809 */
810 tSirBackgroundScanMode backgroundScanMode;
811
812 uint8_t hiddenSsid;
813
814 /* Number of SSIDs to scan */
815 uint8_t numSsid;
816
817 /* channelList has to be the last member of this structure. Check
818 * tSirChannelList for the reason. This MUST be the last field of the
819 * structure
820 */
821
822 bool p2pSearch;
823 uint16_t uIEFieldLen;
824 uint16_t uIEFieldOffset;
825
826 /* channelList MUST be the last field of this structure */
827 tSirChannelList channelList;
828 /*-----------------------------
829 tSirSmeScanReq....
830 -----------------------------
831 uIEFiledLen
832 -----------------------------
833 uIEFiledOffset ----+
834 ----------------------------- |
835 channelList.numChannels |
836 ----------------------------- |
837 ... variable size up to |
838 channelNumber[numChannels-1] |
839 This can be zero, if |
840 numChannel is zero. |
841 ----------------------------- <--+
842 ... variable size uIEFiled
843 up to uIEFieldLen (can be 0)
844 -----------------------------*/
845} tSirSmeScanReq, *tpSirSmeScanReq;
846
847typedef struct sSirSmeScanAbortReq {
848 uint16_t type;
849 uint16_t msgLen;
850 uint8_t sessionId;
851 uint32_t scan_id;
852} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
853
854typedef struct sSirSmeScanChanReq {
855 uint16_t type;
856 uint16_t msgLen;
857 uint8_t sessionId;
858 uint16_t transcationId;
859} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
860
861#ifdef FEATURE_OEM_DATA_SUPPORT
862
863#ifndef OEM_DATA_REQ_SIZE
864#define OEM_DATA_REQ_SIZE 280
865#endif
866#ifndef OEM_DATA_RSP_SIZE
867#define OEM_DATA_RSP_SIZE 1724
868#endif
869
870typedef struct sSirOemDataReq {
871 uint16_t messageType; /* eWNI_SME_OEM_DATA_REQ */
872 uint16_t messageLen;
Srinivas Girigowda0ee66862015-09-24 14:03:29 -0700873 struct cdf_mac_addr selfMacAddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800874 uint8_t oemDataReq[OEM_DATA_REQ_SIZE];
875} tSirOemDataReq, *tpSirOemDataReq;
876
877typedef struct sSirOemDataRsp {
878 uint16_t messageType;
879 uint16_t length;
880 uint8_t oemDataRsp[OEM_DATA_RSP_SIZE];
881} tSirOemDataRsp, *tpSirOemDataRsp;
882
883#endif /* FEATURE_OEM_DATA_SUPPORT */
884
885/* / Definition for response message to previously issued scan request */
886typedef struct sSirSmeScanRsp {
887 uint16_t messageType; /* eWNI_SME_SCAN_RSP */
888 uint16_t length;
889 uint8_t sessionId;
890 tSirResultCodes statusCode;
891 uint16_t transcationId;
892 uint32_t scan_id;
893} tSirSmeScanRsp, *tpSirSmeScanRsp;
894
895/* / Definition for join request */
896/* / ---> MAC */
897/* / WARNING! If you add a field in JOIN REQ. */
898/* / Make sure to add it in REASSOC REQ */
899/* / The Serdes function is the same and its */
900/* / shared with REASSOC. So if we add a field */
901/* here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC. */
902typedef struct sSirSmeJoinReq {
903 uint16_t messageType; /* eWNI_SME_JOIN_REQ */
904 uint16_t length;
905 uint8_t sessionId;
906 uint16_t transactionId;
907 tSirMacSSid ssId;
908 tSirMacAddr selfMacAddr; /* self Mac address */
909 tSirBssType bsstype; /* add new type for BT-AMP STA and AP Modules */
910 uint8_t dot11mode; /* to support BT-AMP */
911#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
912 uint8_t cc_switch_mode;
913#endif
914 tCDF_CON_MODE staPersona; /* Persona */
915 ePhyChanBondState cbMode; /* Pass CB mode value in Join. */
916
917 /*This contains the UAPSD Flag for all 4 AC
918 * B0: AC_VO UAPSD FLAG
919 * B1: AC_VI UAPSD FLAG
920 * B2: AC_BK UAPSD FLAG
921 * B3: AC_BE UASPD FLAG
922 */
923 uint8_t uapsdPerAcBitmask;
924
925 tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */
926 tSirMacRateSet extendedRateSet; /* Has 11g rates */
927 tSirRSNie rsnIE; /* RSN IE to be sent in */
928 /* (Re) Association Request */
929#ifdef FEATURE_WLAN_ESE
930 /* CCMK IE to be included as handler for join and reassoc is */
931 tSirCCKMie cckmIE;
932 /* the same. The join will never carry cckm, but will be set to */
933 /* 0. */
934#endif
935
936 tSirAddie addIEScan; /* Additional IE to be sent in */
937 /* (unicast) Probe Request at the time of join */
938
939 tSirAddie addIEAssoc; /* Additional IE to be sent in */
940 /* (Re) Association Request */
941
942 tAniEdType UCEncryptionType;
943
944 tAniEdType MCEncryptionType;
945
946#ifdef WLAN_FEATURE_11W
947 tAniEdType MgmtEncryptionType;
948#endif
949
950#ifdef WLAN_FEATURE_VOWIFI_11R
951 tAniBool is11Rconnection;
952#endif
953#ifdef FEATURE_WLAN_ESE
954 tAniBool isESEFeatureIniEnabled;
955 tAniBool isESEconnection;
956 tESETspecInfo eseTspecInfo;
957#endif
958
959#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
960 tAniBool isFastTransitionEnabled;
961#endif
962#ifdef FEATURE_WLAN_LFR
963 tAniBool isFastRoamIniFeatureEnabled;
964#endif
965
966 uint8_t txLdpcIniFeatureEnabled;
967 tSirHTConfig htConfig;
968#ifdef WLAN_FEATURE_11AC
969 uint8_t txBFIniFeatureEnabled;
970 uint8_t txBFCsnValue;
971 uint8_t txMuBformee;
972 uint8_t enableVhtpAid;
973 uint8_t enableVhtGid;
974#endif
975 uint8_t enableAmpduPs;
976 uint8_t enableHtSmps;
977 uint8_t htSmps;
978
979 uint8_t isAmsduSupportInAMPDU;
980 tAniBool isWMEenabled;
981 tAniBool isQosEnabled;
982 tAniBool isOSENConnection;
Krishna Kumaar Natarajanf599c6e2015-11-03 11:44:03 -0800983 struct rrm_config_param rrm_config;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800984 tAniBool spectrumMgtIndicator;
985 tSirMacPowerCapInfo powerCap;
986 tSirSupChnl supportedChannels;
987 tSirBssDescription bssDescription;
988
989} tSirSmeJoinReq, *tpSirSmeJoinReq;
990
991/* / Definition for reponse message to previously issued join request */
992/* / MAC ---> */
993typedef struct sSirSmeJoinRsp {
994 uint16_t messageType; /* eWNI_SME_JOIN_RSP */
995 uint16_t length;
996 uint8_t sessionId; /* Session ID */
997 uint16_t transactionId; /* Transaction ID for cmd */
998 tSirResultCodes statusCode;
999 tAniAuthType authType;
1000 uint32_t vht_channel_width;
1001 /* It holds reasonCode when join fails due to deauth/disassoc frame.
1002 * Otherwise it holds status code.
1003 */
1004 uint16_t protStatusCode;
1005 uint16_t aid;
1006 uint32_t beaconLength;
1007 uint32_t assocReqLength;
1008 uint32_t assocRspLength;
1009#ifdef WLAN_FEATURE_VOWIFI_11R
1010 uint32_t parsedRicRspLen;
1011#endif
1012#ifdef FEATURE_WLAN_ESE
1013 uint32_t tspecIeLen;
1014#endif
1015 uint32_t staId; /* Station ID for peer */
1016
1017 /* The DPU signatures will be sent eventually to TL to help it determine
1018 * the association to which a packet belongs to
1019 * Unicast DPU signature
1020 */
1021 uint8_t ucastSig;
1022
1023 /*Broadcast DPU signature */
1024 uint8_t bcastSig;
1025
1026 /*Timing measurement capability */
1027 uint8_t timingMeasCap;
1028
1029#ifdef FEATURE_WLAN_TDLS
1030 /* TDLS prohibited and TDLS channel switch prohibited are set as
1031 * per ExtCap IE in received assoc/re-assoc response from AP
1032 */
1033 bool tdls_prohibited;
1034 bool tdls_chan_swit_prohibited;
1035#endif
Kanchanapally, Vidyullathae3062812015-05-22 17:28:57 +05301036 uint8_t nss;
1037 uint32_t max_rate_flags;
1038
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001039#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
1040 tSirSmeHTProfile HTProfile;
1041#endif
1042 uint8_t frames[1];
1043} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1044
1045/* / probereq from peer, when wsc is enabled */
1046typedef struct sSirSmeProbereq {
1047 uint16_t messageType;
1048 uint16_t length;
1049 uint8_t sessionId;
Srinivas Girigowda37eeeb02015-11-18 17:00:40 -08001050 struct cdf_mac_addr peer_macaddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001051 uint16_t devicePasswdId;
1052} tSirSmeProbeReq, *tpSirSmeProbeReq;
1053
1054typedef struct sSirSmeChanInfo {
1055 uint8_t chan_id;
1056 uint32_t mhz;
1057 uint32_t band_center_freq1;
1058 uint32_t band_center_freq2;
1059 uint32_t info;
1060 uint32_t reg_info_1;
1061 uint32_t reg_info_2;
Kanchanapally, Vidyullathae3062812015-05-22 17:28:57 +05301062 uint8_t nss;
1063 uint32_t rate_flags;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001064} tSirSmeChanInfo, *tpSirSmeChanInfo;
Kanchanapally, Vidyullathae3062812015-05-22 17:28:57 +05301065
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001066/* / Definition for Association indication from peer */
1067/* / MAC ---> */
1068typedef struct sSirSmeAssocInd {
1069 uint16_t messageType; /* eWNI_SME_ASSOC_IND */
1070 uint16_t length;
1071 uint8_t sessionId;
1072 tSirMacAddr peerMacAddr;
1073 uint16_t aid;
1074 tSirMacAddr bssId; /* Self BSSID */
1075 uint16_t staId; /* Station ID for peer */
1076 uint8_t uniSig; /* DPU signature for unicast packets */
1077 uint8_t bcastSig; /* DPU signature for broadcast packets */
1078 tAniAuthType authType;
1079 tAniSSID ssId; /* SSID used by STA to associate */
1080 tSirWAPIie wapiIE; /* WAPI IE received from peer */
1081 tSirRSNie rsnIE; /* RSN IE received from peer */
1082 /* Additional IE received from peer, which possibly include
1083 * WSC IE and/or P2P IE
1084 */
1085 tSirAddie addIE;
1086
1087 /* powerCap & supportedChannels are present only when */
1088 /* spectrumMgtIndicator flag is set */
1089 tAniBool spectrumMgtIndicator;
1090 tSirMacPowerCapInfo powerCap;
1091 tSirSupChnl supportedChannels;
1092 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1093 tAniBool reassocReq;
1094 /* Required for indicating the frames to upper layer */
1095 uint32_t beaconLength;
1096 uint8_t *beaconPtr;
1097 uint32_t assocReqLength;
1098 uint8_t *assocReqPtr;
1099
1100 /* Timing measurement capability */
1101 uint8_t timingMeasCap;
1102 tSirSmeChanInfo chan_info;
1103} tSirSmeAssocInd, *tpSirSmeAssocInd;
1104
1105/* / Definition for Association confirm */
1106/* / ---> MAC */
1107typedef struct sSirSmeAssocCnf {
1108 uint16_t messageType; /* eWNI_SME_ASSOC_CNF */
1109 uint16_t length;
1110 tSirResultCodes statusCode;
1111 tSirMacAddr bssId; /* Self BSSID */
1112 tSirMacAddr peerMacAddr;
1113 uint16_t aid;
1114 tSirMacAddr alternateBssId;
1115 uint8_t alternateChannelId;
1116} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1117
1118/* / Enum definition for Wireless medium status change codes */
1119typedef enum eSirSmeStatusChangeCode {
1120 eSIR_SME_DEAUTH_FROM_PEER,
1121 eSIR_SME_DISASSOC_FROM_PEER,
1122 eSIR_SME_LOST_LINK_WITH_PEER,
1123 eSIR_SME_CHANNEL_SWITCH,
1124 eSIR_SME_JOINED_NEW_BSS,
1125 eSIR_SME_LEAVING_BSS,
1126 eSIR_SME_IBSS_ACTIVE,
1127 eSIR_SME_IBSS_INACTIVE,
1128 eSIR_SME_IBSS_PEER_DEPARTED,
1129 eSIR_SME_RADAR_DETECTED,
1130 eSIR_SME_IBSS_NEW_PEER,
1131 eSIR_SME_AP_CAPS_CHANGED,
1132} tSirSmeStatusChangeCode;
1133
1134typedef struct sSirSmeNewBssInfo {
Srinivas Girigowda065e7772015-09-24 14:23:01 -07001135 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001136 uint8_t channelNumber;
1137 uint8_t reserved;
1138 tSirMacSSid ssId;
1139} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1140
1141typedef struct sSirSmeApNewCaps {
1142 uint16_t capabilityInfo;
Srinivas Girigowda26ebb192015-09-24 15:12:09 -07001143 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001144 uint8_t channelId;
1145 uint8_t reserved[3];
1146 tSirMacSSid ssId;
1147} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1148
1149/**
1150 * Table below indicates what information is passed for each of
1151 * the Wireless Media status change notifications:
1152 *
1153 * Status Change code Status change info
1154 * ----------------------------------------------------------------------
1155 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1156 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1157 * eSIR_SME_LOST_LINK_WITH_PEER None
1158 * eSIR_SME_CHANNEL_SWITCH New channel number
1159 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1160 * eSIR_SME_LEAVING_BSS None
1161 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1162 * IBSS apart from this STA that
1163 * started IBSS
1164 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1165 * in IBSS
1166 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1167 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1168 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1169 * that STA is currently associated with
1170 * have changed.
1171 */
1172
1173/* / Definition for Wireless medium status change notification */
1174typedef struct sSirSmeWmStatusChangeNtf {
1175 uint16_t messageType; /* eWNI_SME_WM_STATUS_CHANGE_NTF */
1176 uint16_t length;
1177 uint8_t sessionId; /* Session ID */
1178 tSirSmeStatusChangeCode statusChangeCode;
Srinivas Girigowdaa1f8bac2015-09-24 15:21:36 -07001179 struct cdf_mac_addr bssid; /* Self BSSID */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001180 union {
1181 uint16_t deAuthReasonCode; /* eSIR_SME_DEAUTH_FROM_PEER */
1182 /* eSIR_SME_DISASSOC_FROM_PEER */
1183 uint16_t disassocReasonCode;
1184 /* none for eSIR_SME_LOST_LINK_WITH_PEER */
1185 uint8_t newChannelId; /* eSIR_SME_CHANNEL_SWITCH */
1186 tSirSmeNewBssInfo newBssInfo; /* eSIR_SME_JOINED_NEW_BSS */
1187 /* none for eSIR_SME_LEAVING_BSS */
1188 /* none for eSIR_SME_IBSS_ACTIVE */
1189 /* none for eSIR_SME_IBSS_INACTIVE */
1190 /* eSIR_SME_IBSS_NEW_PEER */
1191 tSirNewIbssPeerInfo newIbssPeerInfo;
1192 tSirSmeApNewCaps apNewCaps; /* eSIR_SME_AP_CAPS_CHANGED */
1193 } statusChangeInfo;
1194} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1195
1196/* Definition for Disassociation request */
1197typedef struct sSirSmeDisassocReq {
1198 uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */
1199 uint16_t length;
1200 uint8_t sessionId; /* Session ID */
1201 uint16_t transactionId; /* Transaction ID for cmd */
1202 tSirMacAddr bssId; /* Peer BSSID */
1203 tSirMacAddr peerMacAddr;
1204 uint16_t reasonCode;
1205 /* This flag tells LIM whether to send the disassoc OTA or not */
1206 /* This will be set in while handing off from one AP to other */
1207 uint8_t doNotSendOverTheAir;
1208} cdf_packed tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1209
1210/* / Definition for Tkip countermeasures request */
1211typedef struct sSirSmeTkipCntrMeasReq {
1212 uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */
1213 uint16_t length;
1214 uint8_t sessionId; /* Session ID */
1215 uint16_t transactionId; /* Transaction ID for cmd */
Srinivas Girigowdac8b79e42015-09-24 15:57:40 -07001216 struct cdf_mac_addr bssId; /* Peer BSSID */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001217 bool bEnable; /* Start/stop countermeasures */
1218} cdf_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
1219
1220typedef struct sAni64BitCounters {
1221 uint32_t Hi;
1222 uint32_t Lo;
1223} tAni64BitCounters, *tpAni64BitCounters;
1224
1225typedef struct sAniSecurityStat {
1226 tAni64BitCounters txBlks;
1227 tAni64BitCounters rxBlks;
1228 tAni64BitCounters formatErrorCnt;
1229 tAni64BitCounters decryptErr;
1230 tAni64BitCounters protExclCnt;
1231 tAni64BitCounters unDecryptableCnt;
1232 tAni64BitCounters decryptOkCnt;
1233
1234} tAniSecurityStat, *tpAniSecurityStat;
1235
1236typedef struct sAniTxRxStats {
1237 tAni64BitCounters txFrames;
1238 tAni64BitCounters rxFrames;
1239 tAni64BitCounters nRcvBytes;
1240 tAni64BitCounters nXmitBytes;
1241
1242} tAniTxRxStats, *tpAniTxRxStats;
1243
1244typedef struct sAniSecStats {
1245 tAniSecurityStat aes;
1246 tAni64BitCounters aesReplays;
1247 tAniSecurityStat tkip;
1248 tAni64BitCounters tkipReplays;
1249 tAni64BitCounters tkipMicError;
1250
1251 tAniSecurityStat wep;
1252#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1253 tAniSecurityStat wpi;
1254 tAni64BitCounters wpiReplays;
1255 tAni64BitCounters wpiMicError;
1256#endif
1257} tAniSecStats, *tpAniSecStats;
1258
1259#define SIR_MAX_RX_CHAINS 3
1260
1261typedef struct sAniStaStatStruct {
1262 /* following statistic elements till expandPktRxCntLo are not filled
1263 * with valid data. These are kept as it is, since WSM is using this
1264 * structure. These elements can be removed whenever WSM is updated.
1265 * Phystats is used to hold phystats from BD.
1266 */
1267 uint32_t sentAesBlksUcastHi;
1268 uint32_t sentAesBlksUcastLo;
1269 uint32_t recvAesBlksUcastHi;
1270 uint32_t recvAesBlksUcastLo;
1271 uint32_t aesFormatErrorUcastCnts;
1272 uint32_t aesReplaysUcast;
1273 uint32_t aesDecryptErrUcast;
1274 uint32_t singleRetryPkts;
1275 uint32_t failedTxPkts;
1276 uint32_t ackTimeouts;
1277 uint32_t multiRetryPkts;
1278 uint32_t fragTxCntsHi;
1279 uint32_t fragTxCntsLo;
1280 uint32_t transmittedPktsHi;
1281 uint32_t transmittedPktsLo;
1282 uint32_t phyStatHi; /* These are used to fill in the phystats. */
1283 uint32_t phyStatLo; /* This is only for private use. */
1284
1285 uint32_t uplinkRssi;
1286 uint32_t uplinkSinr;
1287 uint32_t uplinkRate;
1288 uint32_t downlinkRssi;
1289 uint32_t downlinkSinr;
1290 uint32_t downlinkRate;
1291 uint32_t nRcvBytes;
1292 uint32_t nXmitBytes;
1293
1294 /*
1295 * Following elements are valid and filled in correctly. They have
1296 * valid values.
1297 */
1298
1299 /* Unicast frames and bytes. */
1300 tAniTxRxStats ucStats;
1301
1302 /* Broadcast frames and bytes. */
1303 tAniTxRxStats bcStats;
1304
1305 /* Multicast frames and bytes. */
1306 tAniTxRxStats mcStats;
1307
1308 uint32_t currentTxRate;
1309 uint32_t currentRxRate; /* Rate in 100Kbps */
1310
1311 uint32_t maxTxRate;
1312 uint32_t maxRxRate;
1313
1314 int8_t rssi[SIR_MAX_RX_CHAINS];
1315
1316 tAniSecStats securityStats;
1317
1318 uint8_t currentRxRateIdx; /* This the softmac rate Index. */
1319 uint8_t currentTxRateIdx;
1320
1321} tAniStaStatStruct, *tpAniStaStatStruct;
1322
1323typedef enum sPacketType {
1324 ePACKET_TYPE_UNKNOWN,
1325 ePACKET_TYPE_11A,
1326 ePACKET_TYPE_11G,
1327 ePACKET_TYPE_11B,
1328 ePACKET_TYPE_11N
1329} tPacketType, *tpPacketType;
1330
1331/* / Definition for Disassociation response */
1332typedef struct sSirSmeDisassocRsp {
1333 uint16_t messageType; /* eWNI_SME_DISASSOC_RSP */
1334 uint16_t length;
1335 uint8_t sessionId; /* Session ID */
1336 uint16_t transactionId; /* Transaction ID for cmd */
1337 tSirResultCodes statusCode;
1338 tSirMacAddr peerMacAddr;
1339 tAniStaStatStruct perStaStats; /* STA stats */
1340 uint16_t staId;
1341} cdf_packed tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1342
1343/* / Definition for Disassociation indication from peer */
1344typedef struct sSirSmeDisassocInd {
1345 uint16_t messageType; /* eWNI_SME_DISASSOC_IND */
1346 uint16_t length;
1347 uint8_t sessionId; /* Session Identifier */
1348 uint16_t transactionId; /* Transaction Identifier with PE */
1349 tSirResultCodes statusCode;
1350 tSirMacAddr bssId;
1351 tSirMacAddr peerMacAddr;
1352 tAniStaStatStruct perStaStats; /* STA stats */
1353 uint16_t staId;
1354 uint32_t reasonCode;
1355} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1356
1357/* / Definition for Disassociation confirm */
1358/* / MAC ---> */
1359typedef struct sSirSmeDisassocCnf {
1360 uint16_t messageType; /* eWNI_SME_DISASSOC_CNF */
1361 uint16_t length;
1362 tSirResultCodes statusCode;
1363 tSirMacAddr bssId;
1364 tSirMacAddr peerMacAddr;
1365} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf,
1366 tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1367
1368/* / Definition for Deauthetication request */
1369typedef struct sSirSmeDeauthReq {
1370 uint16_t messageType; /* eWNI_SME_DEAUTH_REQ */
1371 uint16_t length;
1372 uint8_t sessionId; /* Session ID */
1373 uint16_t transactionId; /* Transaction ID for cmd */
1374 tSirMacAddr bssId; /* AP BSSID */
1375 tSirMacAddr peerMacAddr;
1376 uint16_t reasonCode;
1377} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1378
1379/* / Definition for Deauthetication response */
1380typedef struct sSirSmeDeauthRsp {
1381 uint16_t messageType; /* eWNI_SME_DEAUTH_RSP */
1382 uint16_t length;
1383 uint8_t sessionId; /* Session ID */
1384 uint16_t transactionId; /* Transaction ID for cmd */
1385 tSirResultCodes statusCode;
1386 tSirMacAddr peerMacAddr;
1387} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1388
1389/* / Definition for Deauthetication indication from peer */
1390typedef struct sSirSmeDeauthInd {
1391 uint16_t messageType; /* eWNI_SME_DEAUTH_IND */
1392 uint16_t length;
1393 uint8_t sessionId; /* Added for BT-AMP */
1394 uint16_t transactionId; /* Added for BT-AMP */
1395 tSirResultCodes statusCode;
1396 tSirMacAddr bssId; /* AP BSSID */
1397 tSirMacAddr peerMacAddr;
1398
1399 uint16_t staId;
1400 uint32_t reasonCode;
1401} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1402
1403/* / Definition for stop BSS request message */
1404typedef struct sSirSmeStopBssReq {
1405 uint16_t messageType; /* eWNI_SME_STOP_BSS_REQ */
1406 uint16_t length;
1407 uint8_t sessionId; /* Session ID */
1408 uint16_t transactionId; /* tranSaction ID for cmd */
1409 tSirResultCodes reasonCode;
1410 tSirMacAddr bssId; /* Self BSSID */
1411} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1412
1413/* / Definition for stop BSS response message */
1414typedef struct sSirSmeStopBssRsp {
1415 uint16_t messageType; /* eWNI_SME_STOP_BSS_RSP */
1416 uint16_t length;
1417 tSirResultCodes statusCode;
1418 uint8_t sessionId; /* Session ID */
1419 uint16_t transactionId; /* Transaction ID for cmd */
1420} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1421
1422/* / Definition for Channel Switch indication for station */
1423/* / MAC ---> */
1424typedef struct sSirSmeSwitchChannelInd {
1425 uint16_t messageType; /* eWNI_SME_SWITCH_CHL_IND */
1426 uint16_t length;
1427 uint8_t sessionId;
1428 uint16_t newChannelId;
1429 tSirMacAddr bssId; /* BSSID */
1430} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1431
1432/* / Definition for Neighbor BSS indication */
1433/* / MAC ---> */
1434/* / MAC reports this each time a new I/BSS is detected */
1435typedef struct sSirSmeNeighborBssInd {
1436 uint16_t messageType; /* eWNI_SME_NEIGHBOR_BSS_IND */
1437 uint16_t length;
1438 uint8_t sessionId;
1439 tSirBssDescription bssDescription[1];
1440} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1441
1442/* / Definition for MIC failure indication */
1443/* / MAC ---> */
1444/* / MAC reports this each time a MIC failure occures on Rx TKIP packet */
1445typedef struct sSirSmeMicFailureInd {
1446 uint16_t messageType; /* eWNI_SME_MIC_FAILURE_IND */
1447 uint16_t length;
1448 uint8_t sessionId;
Srinivas Girigowda37c133b2015-09-24 16:14:15 -07001449 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001450 tSirMicFailureInfo info;
1451} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1452
1453typedef struct sSirSmeMissedBeaconInd {
1454 uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */
1455 uint16_t length;
1456 uint8_t bssIdx;
1457} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
1458
1459/* / Definition for Set Context request */
1460/* / ---> MAC */
1461typedef struct sSirSmeSetContextReq {
1462 uint16_t messageType; /* eWNI_SME_SET_CONTEXT_REQ */
1463 uint16_t length;
1464 uint8_t sessionId; /* Session ID */
1465 uint16_t transactionId; /* Transaction ID for cmd */
1466 tSirMacAddr peerMacAddr;
1467 tSirMacAddr bssId; /* BSSID */
1468 tSirKeyMaterial keyMaterial;
1469} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1470
1471/* / Definition for Set Context response */
1472/* / MAC ---> */
1473typedef struct sSirSmeSetContextRsp {
1474 uint16_t messageType; /* eWNI_SME_SET_CONTEXT_RSP */
1475 uint16_t length;
1476 uint8_t sessionId; /* Session ID */
1477 uint16_t transactionId; /* Transaction ID for cmd */
1478 tSirResultCodes statusCode;
1479 tSirMacAddr peerMacAddr;
1480} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1481
1482/* / Statistic definitions */
1483/* ============================================================= */
1484/* Per STA statistic structure; This same struct will be used for Aggregate */
1485/* STA stats as well. */
1486
1487/* Clear radio stats and clear per sta stats */
1488typedef enum {
1489 eANI_CLEAR_ALL_STATS, /* Clears all stats */
1490 eANI_CLEAR_RX_STATS, /* Clears RX stats of the radio interface */
1491 eANI_CLEAR_TX_STATS, /* Clears TX stats of the radio interface */
1492 eANI_CLEAR_RADIO_STATS, /* Clears all the radio stats */
1493 eANI_CLEAR_PER_STA_STATS, /* Clears Per STA stats */
1494 eANI_CLEAR_AGGR_PER_STA_STATS, /* Clears aggregate stats */
1495
1496 /* Used to distinguish between per sta to security stats. */
1497 /* Used only by AP, FW just returns the same param as it received. */
1498 eANI_LINK_STATS, /* Get Per STA stats */
1499 eANI_SECURITY_STATS, /* Get Per STA security stats */
1500
1501 eANI_CLEAR_STAT_TYPES_END
1502} tAniStatSubTypes;
1503
1504typedef struct sAniTxCtrs {
1505 /* add the rate counters here */
1506 uint32_t tx1Mbps;
1507 uint32_t tx2Mbps;
1508 uint32_t tx5_5Mbps;
1509 uint32_t tx6Mbps;
1510 uint32_t tx9Mbps;
1511 uint32_t tx11Mbps;
1512 uint32_t tx12Mbps;
1513 uint32_t tx18Mbps;
1514 uint32_t tx24Mbps;
1515 uint32_t tx36Mbps;
1516 uint32_t tx48Mbps;
1517 uint32_t tx54Mbps;
1518 uint32_t tx72Mbps;
1519 uint32_t tx96Mbps;
1520 uint32_t tx108Mbps;
1521
1522 /* tx path radio counts */
1523 uint32_t txFragHi;
1524 uint32_t txFragLo;
1525 uint32_t txFrameHi;
1526 uint32_t txFrameLo;
1527 uint32_t txMulticastFrameHi;
1528 uint32_t txMulticastFrameLo;
1529 uint32_t txFailedHi;
1530 uint32_t txFailedLo;
1531 uint32_t multipleRetryHi;
1532 uint32_t multipleRetryLo;
1533 uint32_t singleRetryHi;
1534 uint32_t singleRetryLo;
1535 uint32_t ackFailureHi;
1536 uint32_t ackFailureLo;
1537 uint32_t xmitBeacons;
1538} tAniTxCtrs, *tpAniTxCtrs;
1539
1540typedef struct sAniRxCtrs {
1541 /* receive frame rate counters */
1542 uint32_t rx1Mbps;
1543 uint32_t rx2Mbps;
1544 uint32_t rx5_5Mbps;
1545 uint32_t rx6Mbps;
1546 uint32_t rx9Mbps;
1547 uint32_t rx11Mbps;
1548 uint32_t rx12Mbps;
1549 uint32_t rx18Mbps;
1550 uint32_t rx24Mbps;
1551 uint32_t rx36Mbps;
1552 uint32_t rx48Mbps;
1553 uint32_t rx54Mbps;
1554 uint32_t rx72Mbps;
1555 uint32_t rx96Mbps;
1556 uint32_t rx108Mbps;
1557
1558 /* receive size counters; 'Lte' = Less than or equal to */
1559 uint32_t rxLte64;
1560 uint32_t rxLte128Gt64;
1561 uint32_t rxLte256Gt128;
1562 uint32_t rxLte512Gt256;
1563 uint32_t rxLte1kGt512;
1564 uint32_t rxLte1518Gt1k;
1565 uint32_t rxLte2kGt1518;
1566 uint32_t rxLte4kGt2k;
1567
1568 /* rx radio stats */
1569 uint32_t rxFrag;
1570 uint32_t rxFrame;
1571 uint32_t fcsError;
1572 uint32_t rxMulticast;
1573 uint32_t duplicate;
1574 uint32_t rtsSuccess;
1575 uint32_t rtsFailed;
1576 uint32_t wepUndecryptables;
1577 uint32_t drops;
1578 uint32_t aesFormatErrorUcastCnts;
1579 uint32_t aesReplaysUcast;
1580 uint32_t aesDecryptErrUcast;
1581} tAniRxCtrs, *tpAniRxCtrs;
1582
1583/* Get Radio Stats request structure */
1584/* This structure shall be used for both Radio stats and Aggregate stats */
1585/* A valid request must contain entire structure with/without valid fields. */
1586/* Based on the request type, the valid fields will be checked. */
1587typedef struct sAniGetStatsReq {
1588 /* Common for all types are requests */
1589 uint16_t msgType; /* message type is same as the request type */
1590 uint16_t msgLen; /* length of the entire request */
1591 uint8_t sessionId; /* Session ID */
1592 uint16_t transactionId;
1593 tSirMacAddr bssId; /* BSSID */
1594 /* only used for clear stats and per sta stats clear */
1595 tAniStatSubTypes stat; /* Clears the stats of the described types. */
1596 uint32_t staId; /* Per STA stats request must contain valid */
1597 /* values */
1598 tSirMacAddr macAddr;
1599} tAniGetStatsReq, *tpAniGetStatsReq;
1600
1601/* *************************************************************** */
1602
1603/*******************PE Statistics*************************/
1604
1605/*
1606 * tpAniGetPEStatsReq is tied to
1607 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
1608 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
1609 */
1610typedef struct sAniGetPEStatsReq {
1611 /* Common for all types are requests */
1612 uint16_t msgType; /* message type is same as the request type */
1613 uint16_t msgLen; /* length of the entire request */
1614 uint32_t staId; /* Per STA stats request must contain valid */
1615 /* categories of stats requested. look at ePEStatsMask */
1616 uint32_t statsMask;
1617 uint8_t sessionId;
1618} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
1619
1620/*
1621 * tpAniGetPEStatsRsp is tied to
1622 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
1623 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
1624 */
1625typedef struct sAniGetPEStatsRsp {
1626 /* Common for all types are responses */
1627 uint16_t msgType; /* message type is same as the request type */
1628 /* length of the entire request, includes the pStatsBuf length too */
1629 uint16_t msgLen;
1630 uint8_t sessionId;
1631 uint32_t rc; /* success/failure */
1632 uint32_t staId; /* Per STA stats request must contain valid */
1633 /* categories of stats requested. look at ePEStatsMask */
1634 uint32_t statsMask;
1635 /* void *pStatsBuf; */
1636 /*
1637 * The Stats buffer starts here and can be an aggregate of more than one
1638 * statistics structure depending on statsMask. The void pointer
1639 * "pStatsBuf" is commented out intentionally and the src code that uses
1640 * this structure should take that into account.
1641 */
1642} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
1643
1644typedef struct sAniGetRssiReq {
1645 /* Common for all types are requests */
1646 uint16_t msgType; /* message type is same as the request type */
1647 uint16_t msgLen; /* length of the entire request */
1648 uint8_t sessionId;
1649 uint8_t staId;
1650 int8_t lastRSSI; /* in case of error, return last RSSI */
1651 void *rssiCallback;
1652 void *pDevContext; /* device context */
1653 void *p_cds_context; /* cds context */
1654
1655} tAniGetRssiReq, *tpAniGetRssiReq;
1656
1657typedef struct sAniGetSnrReq {
1658 /* Common for all types are requests */
1659 uint16_t msgType; /* message type is same as the request type */
1660 uint16_t msgLen; /* length of the entire request */
1661 uint8_t sessionId;
1662 uint8_t staId;
1663 void *snrCallback;
1664 void *pDevContext; /* device context */
1665 int8_t snr;
1666} tAniGetSnrReq, *tpAniGetSnrReq;
1667
1668#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
1669typedef struct sSirTsmIE {
1670 uint8_t tsid;
1671 uint8_t state;
1672 uint16_t msmt_interval;
1673} tSirTsmIE, *tpSirTsmIE;
1674typedef struct sSirSmeTsmIEInd {
1675 tSirTsmIE tsmIe;
1676 uint8_t sessionId;
1677} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
1678typedef struct sAniTrafStrmMetrics {
1679 uint16_t UplinkPktQueueDly;
1680 uint16_t UplinkPktQueueDlyHist[4];
1681 uint32_t UplinkPktTxDly;
1682 uint16_t UplinkPktLoss;
1683 uint16_t UplinkPktCount;
1684 uint8_t RoamingCount;
1685 uint16_t RoamingDly;
1686} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
Srinivas Girigowda4962a562015-09-24 16:19:14 -07001687
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001688typedef struct sAniGetTsmStatsReq {
1689 /* Common for all types are requests */
1690 uint16_t msgType; /* message type is same as the request type */
1691 uint16_t msgLen; /* length of the entire request */
1692 uint8_t staId;
1693 uint8_t tid; /* traffic id */
Srinivas Girigowda4962a562015-09-24 16:19:14 -07001694 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001695 void *tsmStatsCallback;
1696 void *pDevContext; /* device context */
1697 void *p_cds_context; /* cds context */
1698} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
Srinivas Girigowda4962a562015-09-24 16:19:14 -07001699
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001700typedef struct sAniGetTsmStatsRsp {
1701 /* Common for all types are responses */
1702 uint16_t msgType; /*
1703 * message type is same as
1704 * the request type
1705 */
1706 uint16_t msgLen; /*
1707 * length of the entire request,
1708 * includes the pStatsBuf length too
1709 */
1710 uint8_t sessionId;
1711 uint32_t rc; /* success/failure */
1712 uint32_t staId; /*
1713 * Per STA stats request must
1714 * contain valid
1715 */
1716 tAniTrafStrmMetrics tsmMetrics;
1717 void *tsmStatsReq; /* tsm stats request backup */
1718} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
1719
1720typedef struct sSirEseBcnReportBssInfo {
1721 tBcnReportFields bcnReportFields;
1722 uint8_t ieLen;
1723 uint8_t *pBuf;
1724} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
1725
1726typedef struct sSirEseBcnReportRsp {
1727 uint16_t measurementToken;
1728 uint8_t flag; /* Flag to report measurement done and more data */
1729 uint8_t numBss;
1730 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
1731} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
1732
1733#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
1734
1735/* Change country code request MSG structure */
1736typedef struct sAniChangeCountryCodeReq {
1737 /* Common for all types are requests */
1738 uint16_t msgType; /* message type is same as the request type */
1739 uint16_t msgLen; /* length of the entire request */
1740 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; /* 3 char country code */
1741 tAniBool countryFromUserSpace;
1742 tAniBool sendRegHint; /* true if we want to send hint to NL80211 */
1743 void *changeCCCallback;
1744 void *pDevContext; /* device context */
1745 void *p_cds_context; /* cds context */
1746
1747} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
1748
1749/**
1750 * struct ani_scan_req - Scan request
1751 * @msg_type: Message type
1752 * @msg_len: Message Length
1753 * @session_id: SME session Id
1754 * @scan_param: scan request parameter
1755 * @callback: call back function for scan result
1756 * @ctx: Global context
1757 *
1758 * Scan request message structure
1759 */
1760struct ani_scan_req {
1761 /* message type is same as the request type */
1762 uint16_t msg_type;
1763 /* length of the entire request */
1764 uint16_t msg_len;
1765 uint16_t session_id;
1766 void *scan_param;
1767 void *callback;
1768 void *ctx;
1769};
1770
1771/**
1772 * struct ani_roc_req - Remain on channel request
1773 * @msg_type: Message type
1774 * @msg_len: Message Length
1775 * @session_id: SME session Id
1776 * @channel: channel number
1777 * @callback: call back function for scan result
1778 * @duration: Roc duration
1779 * @is_p2pprobe_allowed : flag for p2p probe request
1780 * @ctx: Global context
1781 * @scan_id: Scan Identifier
1782 *
1783 * Remain on channel request message structure
1784 */
1785struct ani_roc_req {
1786 /* message type is same as the request type */
1787 uint16_t msg_type;
1788 /* length of the entire request */
1789 uint16_t msg_len;
1790 uint16_t session_id;
1791 uint8_t channel;
1792 uint32_t duration;
1793 uint8_t is_p2pprobe_allowed;
1794 void *callback;
1795 void *ctx;
1796 uint32_t scan_id;
1797};
1798
1799/* generic country code change request MSG structure */
1800typedef struct sAniGenericChangeCountryCodeReq {
1801 /* Common for all types are requests */
1802 uint16_t msgType; /* message type is same as the request type */
1803 uint16_t msgLen; /* length of the entire request */
1804 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; /* 3 char country code */
1805 uint16_t domain_index;
1806} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
1807
Srinivas Girigowda296105a2015-09-24 16:31:16 -07001808/**
1809 * struct sAniDHCPStopInd - DHCP Stop indication message
1810 * @msgType: message type is same as the request type
1811 * @msgLen: length of the entire request
1812 * @device_mode: Mode of the device(ex:STA, AP)
1813 * @adapterMacAddr: MAC address of the adapter
1814 * @peerMacAddr: MAC address of the connected peer
1815 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001816typedef struct sAniDHCPStopInd {
Srinivas Girigowda296105a2015-09-24 16:31:16 -07001817 uint16_t msgType;
1818 uint16_t msgLen;
1819 uint8_t device_mode;
1820 struct cdf_mac_addr adapterMacAddr;
1821 struct cdf_mac_addr peerMacAddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001822} tAniDHCPInd, *tpAniDHCPInd;
1823
1824typedef enum eTxRateInfo {
1825 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
1826 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
1827 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
1828 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
1829 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
1830 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
1831 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
1832 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
1833} tTxrateinfoflags;
1834
1835/**********************PE Statistics end*************************/
1836
1837typedef struct sSirP2PNoaStart {
1838 uint32_t status;
1839 uint32_t bssIdx;
1840} tSirP2PNoaStart, *tpSirP2PNoaStart;
1841
1842typedef struct sSirTdlsInd {
1843 uint16_t status;
1844 uint16_t assocId;
1845 uint16_t staIdx;
1846 uint16_t reasonCode;
1847} tSirTdlsInd, *tpSirTdlsInd;
1848
1849typedef struct sSirP2PNoaAttr {
1850#ifdef ANI_BIG_BYTE_ENDIAN
1851 uint32_t index:8;
1852 uint32_t oppPsFlag:1;
1853 uint32_t ctWin:7;
1854 uint32_t rsvd1:16;
1855#else
1856 uint32_t rsvd1:16;
1857 uint32_t ctWin:7;
1858 uint32_t oppPsFlag:1;
1859 uint32_t index:8;
1860#endif
1861
1862#ifdef ANI_BIG_BYTE_ENDIAN
1863 uint32_t uNoa1IntervalCnt:8;
1864 uint32_t rsvd2:24;
1865#else
1866 uint32_t rsvd2:24;
1867 uint32_t uNoa1IntervalCnt:8;
1868#endif
1869 uint32_t uNoa1Duration;
1870 uint32_t uNoa1Interval;
1871 uint32_t uNoa1StartTime;
1872
1873#ifdef ANI_BIG_BYTE_ENDIAN
1874 uint32_t uNoa2IntervalCnt:8;
1875 uint32_t rsvd3:24;
1876#else
1877 uint32_t rsvd3:24;
1878 uint32_t uNoa2IntervalCnt:8;
1879#endif
1880 uint32_t uNoa2Duration;
1881 uint32_t uNoa2Interval;
1882 uint32_t uNoa2StartTime;
1883} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
1884
1885typedef struct sSirTclasInfo {
1886 tSirMacTclasIE tclas;
1887 uint8_t version; /* applies only for classifier type ip */
1888 union {
1889 tSirMacTclasParamEthernet eth;
1890 tSirMacTclasParamIPv4 ipv4;
1891 tSirMacTclasParamIPv6 ipv6;
1892 tSirMacTclasParam8021dq t8021dq;
1893 } cdf_packed tclasParams;
1894} cdf_packed tSirTclasInfo;
1895
1896#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
1897#define TSRS_11AG_RATE_6MBPS 0xC
1898#define TSRS_11B_RATE_5_5MBPS 0xB
1899typedef struct sSirMacESETSRSIE {
1900 uint8_t tsid;
1901 uint8_t rates[8];
1902} tSirMacESETSRSIE;
1903typedef struct sSirMacESETSMIE {
1904 uint8_t tsid;
1905 uint8_t state;
1906 uint16_t msmt_interval;
1907} tSirMacESETSMIE;
1908typedef struct sTSMStats {
1909 uint8_t tid;
Srinivas Girigowda9d6a6db2015-11-18 21:31:17 -08001910 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001911 tTrafStrmMetrics tsmMetrics;
1912} tTSMStats, *tpTSMStats;
1913typedef struct sEseTSMContext {
1914 uint8_t tid;
1915 tSirMacESETSMIE tsmInfo;
1916 tTrafStrmMetrics tsmMetrics;
1917} tEseTSMContext, *tpEseTSMContext;
1918typedef struct sEsePEContext {
1919 tEseTSMContext tsm;
1920} tEsePEContext, *tpEsePEContext;
1921#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
1922
1923typedef struct sSirAddtsReqInfo {
1924 uint8_t dialogToken;
1925 tSirMacTspecIE tspec;
1926
1927 uint8_t numTclas; /* number of Tclas elements */
1928 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
1929 uint8_t tclasProc;
1930#if defined(FEATURE_WLAN_ESE)
1931 tSirMacESETSRSIE tsrsIE;
1932 uint8_t tsrsPresent:1;
1933#endif
1934 uint8_t wmeTspecPresent:1;
1935 uint8_t wsmTspecPresent:1;
1936 uint8_t lleTspecPresent:1;
1937 uint8_t tclasProcPresent:1;
1938} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
1939
1940typedef struct sSirAddtsRspInfo {
1941 uint8_t dialogToken;
1942 tSirMacStatusCodes status;
1943 tSirMacTsDelayIE delay;
1944
1945 tSirMacTspecIE tspec;
1946 uint8_t numTclas; /* number of Tclas elements */
1947 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
1948 uint8_t tclasProc;
1949 tSirMacScheduleIE schedule;
1950#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
1951 tSirMacESETSMIE tsmIE;
1952 uint8_t tsmPresent:1;
1953#endif
1954 uint8_t wmeTspecPresent:1;
1955 uint8_t wsmTspecPresent:1;
1956 uint8_t lleTspecPresent:1;
1957 uint8_t tclasProcPresent:1;
1958 uint8_t schedulePresent:1;
1959} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
1960
1961typedef struct sSirDeltsReqInfo {
1962 tSirMacTSInfo tsinfo;
1963 tSirMacTspecIE tspec;
1964 uint8_t wmeTspecPresent:1;
1965 uint8_t wsmTspecPresent:1;
1966 uint8_t lleTspecPresent:1;
1967} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
1968
1969/* / Add a tspec as defined */
1970typedef struct sSirAddtsReq {
1971 uint16_t messageType; /* eWNI_SME_ADDTS_REQ */
1972 uint16_t length;
1973 uint8_t sessionId; /* Session ID */
1974 uint16_t transactionId;
1975 tSirMacAddr bssId; /* BSSID */
1976 uint32_t timeout; /* in ms */
1977 uint8_t rspReqd;
1978 tSirAddtsReqInfo req;
1979} tSirAddtsReq, *tpSirAddtsReq;
1980
1981typedef struct sSirAddtsRsp {
1982 uint16_t messageType; /* eWNI_SME_ADDTS_RSP */
1983 uint16_t length;
1984 uint8_t sessionId; /* sme sessionId Added for BT-AMP support */
1985 uint16_t transactionId; /* sme transaction Id - for BT-AMP Support */
1986 uint32_t rc; /* return code */
1987 tSirAddtsRspInfo rsp;
1988} tSirAddtsRsp, *tpSirAddtsRsp;
1989
1990typedef struct sSirDeltsReq {
1991 uint16_t messageType; /* eWNI_SME_DELTS_REQ */
1992 uint16_t length;
1993 uint8_t sessionId; /* Session ID */
1994 uint16_t transactionId;
1995 tSirMacAddr bssId; /* BSSID */
1996 uint16_t aid; /* use 0 if macAddr is being specified */
1997 tSirMacAddr macAddr; /* only on AP to specify the STA */
1998 uint8_t rspReqd;
1999 tSirDeltsReqInfo req;
2000} tSirDeltsReq, *tpSirDeltsReq;
2001
2002typedef struct sSirDeltsRsp {
2003 uint16_t messageType; /* eWNI_SME_DELTS_RSP */
2004 uint16_t length;
2005 uint8_t sessionId; /* sme sessionId Added for BT-AMP support */
2006 uint16_t transactionId; /* sme transaction Id - for BT-AMP Support */
2007 uint32_t rc;
2008 uint16_t aid; /* use 0 if macAddr is being specified */
2009 tSirMacAddr macAddr; /* only on AP to specify the STA */
2010 tSirDeltsReqInfo rsp;
2011} tSirDeltsRsp, *tpSirDeltsRsp;
2012
2013#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
2014typedef struct sSirPlmReq {
2015 uint16_t diag_token; /* Dialog token */
2016 uint16_t meas_token; /* measurement token */
2017 uint16_t numBursts; /* total number of bursts */
2018 uint16_t burstInt; /* burst interval in seconds */
2019 uint16_t measDuration; /* in TU's,STA goes off-ch */
2020 /* no of times the STA should cycle through PLM ch list */
2021 uint8_t burstLen;
2022 tPowerdBm desiredTxPwr; /* desired tx power */
Srinivas Girigowda5146dee2015-11-18 21:46:48 -08002023 struct cdf_mac_addr mac_addr; /* MC dest addr */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002024 /* no of channels */
2025 uint8_t plmNumCh;
2026 /* channel numbers */
2027 uint8_t plmChList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
2028 uint8_t sessionId;
2029 bool enable;
2030} tSirPlmReq, *tpSirPlmReq;
2031#endif
2032
2033#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
2034
2035#define SIR_QOS_NUM_AC_MAX 4
2036
2037typedef struct sSirAggrQosReqInfo {
2038 uint16_t tspecIdx;
2039 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
2040} tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
2041
2042typedef struct sSirAggrQosReq {
2043 uint16_t messageType; /* eWNI_SME_ADDTS_REQ */
2044 uint16_t length;
2045 uint8_t sessionId; /* Session ID */
2046 uint16_t transactionId;
2047 tSirMacAddr bssId; /* BSSID */
2048 uint32_t timeout; /* in ms */
2049 uint8_t rspReqd;
2050 tSirAggrQosReqInfo aggrInfo;
2051} tSirAggrQosReq, *tpSirAggrQosReq;
2052
2053typedef struct sSirAggrQosRspInfo {
2054 uint16_t tspecIdx;
2055 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2056} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2057
2058typedef struct sSirAggrQosRsp {
2059 uint16_t messageType;
2060 uint16_t length;
2061 uint8_t sessionId;
2062 tSirAggrQosRspInfo aggrInfo;
2063} tSirAggrQosRsp, *tpSirAggrQosRsp;
2064
2065#endif /*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE */
2066
2067typedef struct sSirQosMapSet {
2068 uint8_t present;
2069 uint8_t num_dscp_exceptions;
2070 uint8_t dscp_exceptions[21][2];
2071 uint8_t dscp_range[8][2];
2072} tSirQosMapSet, *tpSirQosMapSet;
2073
2074typedef struct sSmeIbssPeerInd {
2075 uint16_t mesgType;
2076 uint16_t mesgLen;
2077 uint8_t sessionId;
2078
2079 tSirMacAddr peerAddr;
2080 uint16_t staId;
2081
2082 /*
2083 * The DPU signatures will be sent eventually to TL to help it determine
2084 * the association to which a packet belongs to
2085 */
2086 /* Unicast DPU signature */
2087 uint8_t ucastSig;
2088
2089 /*Broadcast DPU signature */
2090 uint8_t bcastSig;
2091
2092 /* Beacon will be appended for new Peer indication. */
2093} tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2094
2095typedef struct sSirIbssPeerInactivityInd {
2096 uint8_t bssIdx;
2097 uint8_t staIdx;
2098 tSirMacAddr peerAddr;
2099} tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2100
2101typedef struct sLimScanChn {
2102 uint16_t numTimeScan; /* how many time this channel is scan */
2103 uint8_t channelId;
2104} tLimScanChn;
2105
2106typedef struct sSmeGetScanChnRsp {
2107 /* Message Type */
2108 uint16_t mesgType;
2109 /* Message Length */
2110 uint16_t mesgLen;
2111 uint8_t sessionId;
2112 uint8_t numChn;
2113 tLimScanChn scanChn[1];
2114} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2115
2116typedef struct sLimScanChnInfo {
2117 uint8_t numChnInfo; /* number of channels in scanChn */
2118 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2119} tLimScanChnInfo;
2120
2121typedef struct sSirSmeGetAssocSTAsReq {
2122 uint16_t messageType; /* eWNI_SME_GET_ASSOC_STAS_REQ */
2123 uint16_t length;
2124 tSirMacAddr bssId; /* BSSID */
2125 uint16_t modId;
2126 void *pUsrContext;
2127 void *pSapEventCallback;
2128 /* Pointer to allocated mem passed in wlansap_get_assoc_stations API */
2129 void *pAssocStasArray;
2130} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
2131
2132typedef struct sSmeMaxAssocInd {
2133 uint16_t mesgType; /* eWNI_SME_MAX_ASSOC_EXCEEDED */
2134 uint16_t mesgLen;
2135 uint8_t sessionId;
2136 /* the new peer that got rejected max assoc limit reached */
2137 tSirMacAddr peerMac;
2138} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2139
2140typedef struct sSmeCsaOffloadInd {
2141 uint16_t mesgType; /* eWNI_SME_CSA_OFFLOAD_EVENT */
2142 uint16_t mesgLen;
2143 tSirMacAddr bssId; /* BSSID */
2144} tSmeCsaOffloadInd, *tpSmeCsaOffloadInd;
2145
2146/* WOW related structures */
2147#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 146
2148
2149/**
2150 * struct wow_add_pattern - wow pattern add structure
2151 * @pattern_id: pattern id
2152 * @pattern_byte_offset: pattern byte offset from beginning of the 802.11
2153 * packet to start of the wake-up pattern
2154 * @pattern_size: pattern size
2155 * @pattern: pattern byte stream
2156 * @pattern_mask_size: pattern mask size
2157 * @pattern_mask: pattern mask
2158 * @session_id: session id
2159 */
2160struct wow_add_pattern {
2161 uint8_t pattern_id;
2162 uint8_t pattern_byte_offset;
2163 uint8_t pattern_size;
2164 uint8_t pattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE];
2165 uint8_t pattern_mask_size;
2166 uint8_t pattern_mask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE];
2167 uint8_t session_id;
2168};
2169
2170/**
2171 * struct wow_delete_patern - wow pattern delete structure
2172 * @pattern_id: pattern id of wake up pattern to be deleted
2173 * @session_id: session id
2174 */
2175struct wow_delete_pattern {
2176 uint8_t pattern_id;
2177 uint8_t session_id;
2178};
2179
2180/* SME->PE: Enter WOWLAN parameters */
2181typedef struct sSirSmeWowlEnterParams {
2182 uint8_t sessionId;
2183
2184 /* Enables/disables magic packet filtering */
2185 uint8_t ucMagicPktEnable;
2186
2187 /* Magic pattern */
2188 tSirMacAddr magicPtrn;
2189
2190 /* Enables/disables packet pattern filtering */
2191 uint8_t ucPatternFilteringEnable;
2192
2193#ifdef WLAN_WAKEUP_EVENTS
2194 /*
2195 * This configuration directs the WoW packet filtering to look at EAP-ID
2196 * requests embedded in EAPOL frames and use this as a wake source.
2197 */
2198 uint8_t ucWoWEAPIDRequestEnable;
2199
2200 /*
2201 * This configuration directs the WoW packet filtering to look for
2202 * EAPOL-4WAY requests and use this as a wake source.
2203 */
2204 uint8_t ucWoWEAPOL4WayEnable;
2205
2206 /*
2207 * This configuration allows a host wakeup on an network scan
2208 * offload match.
2209 */
2210 uint8_t ucWowNetScanOffloadMatch;
2211
2212 /* This configuration allows a host wakeup on any GTK rekeying error.
2213 */
2214 uint8_t ucWowGTKRekeyError;
2215
2216 /* This configuration allows a host wakeup on BSS connection loss.
2217 */
2218 uint8_t ucWoWBSSConnLoss;
2219#endif /* WLAN_WAKEUP_EVENTS */
2220
2221 tSirMacAddr bssId;
2222} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
2223
2224/* PE<->HAL: Enter WOWLAN parameters */
2225typedef struct sSirHalWowlEnterParams {
2226 uint8_t sessionId;
2227
2228 /* Enables/disables magic packet filtering */
2229 uint8_t ucMagicPktEnable;
2230
2231 /* Magic pattern */
2232 tSirMacAddr magicPtrn;
2233
2234 /* Enables/disables packet pattern filtering in firmware.
2235 Enabling this flag enables broadcast pattern matching
2236 in Firmware. If unicast pattern matching is also desired,
2237 ucUcastPatternFilteringEnable flag must be set tot true
2238 as well
2239 */
2240 uint8_t ucPatternFilteringEnable;
2241
2242 /* Enables/disables unicast packet pattern filtering.
2243 This flag specifies whether we want to do pattern match
2244 on unicast packets as well and not just broadcast packets.
2245 This flag has no effect if the ucPatternFilteringEnable
2246 (main controlling flag) is set to false
2247 */
2248 uint8_t ucUcastPatternFilteringEnable;
2249
2250 /* This configuration is valid only when magicPktEnable=1.
2251 * It requests hardware to wake up when it receives the
2252 * Channel Switch Action Frame.
2253 */
2254 uint8_t ucWowChnlSwitchRcv;
2255
2256 /* This configuration is valid only when magicPktEnable=1.
2257 * It requests hardware to wake up when it receives the
2258 * Deauthentication Frame.
2259 */
2260 uint8_t ucWowDeauthRcv;
2261
2262 /* This configuration is valid only when magicPktEnable=1.
2263 * It requests hardware to wake up when it receives the
2264 * Disassociation Frame.
2265 */
2266 uint8_t ucWowDisassocRcv;
2267
2268 /* This configuration is valid only when magicPktEnable=1.
2269 * It requests hardware to wake up when it has missed
2270 * consecutive beacons. This is a hardware register
2271 * configuration (NOT a firmware configuration).
2272 */
2273 uint8_t ucWowMaxMissedBeacons;
2274
2275 /* This configuration is valid only when magicPktEnable=1.
2276 * This is a timeout value in units of microsec. It requests
2277 * hardware to unconditionally wake up after it has stayed
2278 * in WoWLAN mode for some time. Set 0 to disable this feature.
2279 */
2280 uint8_t ucWowMaxSleepUsec;
2281
2282#ifdef WLAN_WAKEUP_EVENTS
2283 /* This config directs the WoW pkt filtering to look for EAP-ID
2284 * requests embedded in EAPOL frames and use this as a wake source.
2285 */
2286 uint8_t ucWoWEAPIDRequestEnable;
2287
2288 /* This config directs the WoW pkt filtering to look for EAPOL-4WAY
2289 * requests and use this as a wake source.
2290 */
2291 uint8_t ucWoWEAPOL4WayEnable;
2292
2293 /* This config allows a host wakeup on an network scan offload match.
2294 */
2295 uint8_t ucWowNetScanOffloadMatch;
2296
2297 /* This configuration allows a host wakeup on any GTK rekeying error.
2298 */
2299 uint8_t ucWowGTKRekeyError;
2300
2301 /* This configuration allows a host wakeup on BSS connection loss.
2302 */
2303 uint8_t ucWoWBSSConnLoss;
2304#endif /* WLAN_WAKEUP_EVENTS */
2305
2306 /* Status code to be filled by HAL when it sends
2307 * SIR_HAL_WOWL_ENTER_RSP to PE.
2308 */
2309 CDF_STATUS status;
2310
2311 /*BSSID to find the current session
2312 */
2313 uint8_t bssIdx;
2314} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
2315
2316/* SME->PE: Exit WOWLAN parameters */
2317typedef struct sSirSmeWowlExitParams {
2318 uint8_t sessionId;
2319
2320} tSirSmeWowlExitParams, *tpSirSmeWowlExitParams;
2321
2322/* PE<->HAL: Exit WOWLAN parameters */
2323typedef struct sSirHalWowlExitParams {
2324 uint8_t sessionId;
2325
2326 /* Status code to be filled by HAL when it sends
2327 * SIR_HAL_WOWL_EXIT_RSP to PE.
2328 */
2329 CDF_STATUS status;
2330
2331 /*BSSIDX to find the current session
2332 */
2333 uint8_t bssIdx;
2334} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
2335
2336#define SIR_MAX_NAME_SIZE 64
2337#define SIR_MAX_TEXT_SIZE 32
2338
2339typedef struct sSirName {
2340 uint8_t num_name;
2341 uint8_t name[SIR_MAX_NAME_SIZE];
2342} tSirName;
2343
2344typedef struct sSirText {
2345 uint8_t num_text;
2346 uint8_t text[SIR_MAX_TEXT_SIZE];
2347} tSirText;
2348
2349#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
2350#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
2351#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
2352#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
2353#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
2354#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
2355#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
2356#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
2357#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
2358#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
2359#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
2360#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
2361#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
2362#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
2363#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
2364#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
2365
2366typedef struct sSirWPSProbeRspIE {
2367 uint32_t FieldPresent;
2368 uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */
2369 uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */
2370 bool APSetupLocked; /* Must be included if value is true */
2371 /*
2372 * BOOL: indicates if the user has recently activated a Registrar to
2373 * add an Enrollee.
2374 */
2375 bool SelectedRegistra;
2376 uint16_t DevicePasswordID; /* Device Password ID */
2377 /* Selected Registrar config method */
2378 uint16_t SelectedRegistraCfgMethod;
2379 uint8_t ResponseType; /* Response type */
2380 uint8_t UUID_E[16]; /* Unique identifier of the AP. */
2381 tSirName Manufacture;
2382 tSirText ModelName;
2383 tSirText ModelNumber;
2384 tSirText SerialNumber;
2385 /* Device Category ID: 1Computer, 2Input Device, ... */
2386 uint32_t PrimaryDeviceCategory;
2387 /* Vendor specific OUI for Device Sub Category */
2388 uint8_t PrimaryDeviceOUI[4];
2389 /*
2390 Device Sub Category ID: 1-PC, 2-Server if Device Category ID
2391 * is computer
2392 */
2393 uint32_t DeviceSubCategory;
2394 tSirText DeviceName;
2395 uint16_t ConfigMethod; /* Configuaration method */
2396 uint8_t RFBand; /* RF bands available on the AP */
2397} tSirWPSProbeRspIE;
2398
2399#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
2400#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
2401#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
2402#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
2403#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
2404#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
2405#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
2406#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
2407#define SIR_WPS_UUID_LEN 16
2408
2409typedef struct sSirWPSBeaconIE {
2410 uint32_t FieldPresent;
2411 uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */
2412 uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */
2413 bool APSetupLocked; /* Must be included if value is true */
2414 /*
2415 * BOOL: indicates if the user has recently activated a Registrar to
2416 * add an Enrollee.
2417 */
2418 bool SelectedRegistra;
2419 uint16_t DevicePasswordID; /* Device Password ID */
2420 /* Selected Registrar config method */
2421 uint16_t SelectedRegistraCfgMethod;
2422 uint8_t UUID_E[SIR_WPS_UUID_LEN]; /* Unique identifier of the AP. */
2423 uint8_t RFBand; /* RF bands available on the AP */
2424} tSirWPSBeaconIE;
2425
2426#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
2427#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
2428
2429typedef struct sSirWPSAssocRspIE {
2430 uint32_t FieldPresent;
2431 uint32_t Version;
2432 uint8_t ResposeType;
2433} tSirWPSAssocRspIE;
2434
2435typedef struct sSirAPWPSIEs {
2436 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE */
2437 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE */
2438 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE */
2439} tSirAPWPSIEs, *tpSiriAPWPSIEs;
2440
2441typedef struct sSirUpdateAPWPSIEsReq {
2442 uint16_t messageType; /* eWNI_SME_UPDATE_APWPSIE_REQ */
2443 uint16_t length;
2444 uint16_t transactionId; /* Transaction ID for cmd */
2445 tSirMacAddr bssId; /* BSSID */
2446 uint8_t sessionId; /* Session ID */
2447 tSirAPWPSIEs APWPSIEs;
2448} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
2449
2450typedef struct sSirUpdateParams {
2451 uint16_t messageType;
2452 uint16_t length;
2453 uint8_t sessionId; /* Session ID */
2454 uint8_t ssidHidden; /* Hide SSID */
2455} tSirUpdateParams, *tpSirUpdateParams;
2456
2457/* Beacon Interval */
2458typedef struct sSirChangeBIParams {
2459 uint16_t messageType;
2460 uint16_t length;
2461 uint16_t beaconInterval; /* Beacon Interval */
2462 tSirMacAddr bssId;
2463 uint8_t sessionId; /* Session ID */
2464} tSirChangeBIParams, *tpSirChangeBIParams;
2465
2466#ifdef QCA_HT_2040_COEX
2467typedef struct sSirSetHT2040Mode {
2468 uint16_t messageType;
2469 uint16_t length;
2470 uint8_t cbMode;
2471 bool obssEnabled;
2472 tSirMacAddr bssId;
2473 uint8_t sessionId; /* Session ID */
2474} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
2475#endif
2476
2477#define SIR_WPS_PBC_WALK_TIME 120 /* 120 Second */
2478
2479typedef struct sSirWPSPBCSession {
2480 struct sSirWPSPBCSession *next;
Srinivas Girigowda419e36b2015-11-24 15:39:54 -08002481 struct cdf_mac_addr addr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002482 uint8_t uuid_e[SIR_WPS_UUID_LEN];
2483 uint32_t timestamp;
2484} tSirWPSPBCSession;
2485
2486typedef struct sSirSmeGetWPSPBCSessionsReq {
2487 uint16_t messageType; /* eWNI_SME_GET_WPSPBC_SESSION_REQ */
2488 uint16_t length;
2489 void *pUsrContext;
2490 void *pSapEventCallback;
Srinivas Girigowdaedcfab92015-11-24 15:21:41 -08002491 struct cdf_mac_addr bssid; /* BSSID */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002492 /* MAC Address of STA in WPS Session to be removed */
Srinivas Girigowdaedcfab92015-11-24 15:21:41 -08002493 struct cdf_mac_addr remove_mac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002494} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
2495
2496typedef struct sSirWPSPBCProbeReq {
Srinivas Girigowdaaab80e72015-11-24 14:30:37 -08002497 struct cdf_mac_addr peer_macaddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002498 uint16_t probeReqIELen;
2499 uint8_t probeReqIE[512];
2500} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
2501
2502/* probereq from peer, when wsc is enabled */
2503typedef struct sSirSmeProbeReqInd {
2504 uint16_t messageType; /* eWNI_SME_WPS_PBC_PROBE_REQ_IND */
2505 uint16_t length;
2506 uint8_t sessionId;
Srinivas Girigowdad6673be2015-11-24 14:18:13 -08002507 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002508 tSirWPSPBCProbeReq WPSPBCProbeReq;
2509} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
2510
2511typedef struct sSirUpdateAPWPARSNIEsReq {
2512 uint16_t messageType; /* eWNI_SME_SET_APWPARSNIEs_REQ */
2513 uint16_t length;
2514 uint16_t transactionId; /* Transaction ID for cmd */
Srinivas Girigowdaeba9ca52015-11-24 14:09:39 -08002515 struct cdf_mac_addr bssid; /* BSSID */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002516 uint8_t sessionId; /* Session ID */
2517 tSirRSNie APWPARSNIEs;
2518} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
2519
2520#define SIR_ROAM_MAX_CHANNELS 80
2521#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
2522/* Occupied channel list remains static */
2523#define CHANNEL_LIST_STATIC 1
2524/* Occupied channel list can be learnt after init */
2525#define CHANNEL_LIST_DYNAMIC_INIT 2
2526/* Occupied channel list can be learnt after flush */
2527#define CHANNEL_LIST_DYNAMIC_FLUSH 3
2528/* Occupied channel list can be learnt after update */
2529#define CHANNEL_LIST_DYNAMIC_UPDATE 4
2530#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
2531#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
2532#define SIR_ROAM_SCAN_RESERVED_BYTES 61
2533
2534#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2535#define SIR_ROAM_SCAN_PSK_SIZE 32
2536#define SIR_ROAM_R0KH_ID_MAX_LEN 48
2537#endif
2538/* SME -> HAL - This is the host offload request. */
2539#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
2540#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
2541#define SIR_IPV6_NS_OFFLOAD 2
2542#define SIR_OFFLOAD_DISABLE 0
2543#define SIR_OFFLOAD_ENABLE 1
2544#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
2545#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
2546#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
2547#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
2548
2549#ifdef WLAN_NS_OFFLOAD
2550typedef struct sSirNsOffloadReq {
Srinivas Girigowdac79a7102015-12-08 15:18:26 -08002551 uint8_t srcIPv6Addr[SIR_MAC_IPV6_ADDR_LEN];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002552 uint8_t selfIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN];
2553 uint8_t targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN];
2554 tSirMacAddr selfMacAddr;
2555 uint8_t srcIPv6AddrValid;
2556 uint8_t targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
2557 uint8_t slotIdx;
2558} tSirNsOffloadReq, *tpSirNsOffloadReq;
2559#endif /* WLAN_NS_OFFLOAD */
2560
2561typedef struct sSirHostOffloadReq {
2562 uint8_t offloadType;
2563 uint8_t enableOrDisable;
2564 uint32_t num_ns_offload_count;
2565 union {
Srinivas Girigowdac79a7102015-12-08 15:18:26 -08002566 uint8_t hostIpv4Addr[SIR_IPV4_ADDR_LEN];
2567 uint8_t hostIpv6Addr[SIR_MAC_IPV6_ADDR_LEN];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002568 } params;
2569#ifdef WLAN_NS_OFFLOAD
2570 tSirNsOffloadReq nsOffloadInfo;
2571#endif /* WLAN_NS_OFFLOAD */
Srinivas Girigowdab084b552015-11-24 12:39:12 -08002572 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002573} tSirHostOffloadReq, *tpSirHostOffloadReq;
2574
2575/* Packet Types. */
2576#define SIR_KEEP_ALIVE_NULL_PKT 1
2577#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
2578
2579/* Keep Alive request. */
2580typedef struct sSirKeepAliveReq {
2581 uint8_t packetType;
2582 uint32_t timePeriod;
2583 tSirIpv4Addr hostIpv4Addr;
2584 tSirIpv4Addr destIpv4Addr;
Srinivas Girigowda9c330a92015-11-24 12:28:25 -08002585 struct cdf_mac_addr dest_macaddr;
2586 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002587 uint8_t sessionId;
2588} tSirKeepAliveReq, *tpSirKeepAliveReq;
2589
2590typedef struct sSirSmeMgmtFrameInd {
2591 uint16_t mesgType;
2592 uint16_t mesgLen;
2593 uint32_t rxChan;
2594 uint8_t sessionId;
2595 uint8_t frameType;
2596 int8_t rxRssi;
2597 uint8_t frameBuf[1]; /* variable */
2598} tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
2599
2600#ifdef WLAN_FEATURE_11W
2601typedef struct sSirSmeUnprotMgmtFrameInd {
2602 uint8_t sessionId;
2603 uint8_t frameType;
2604 uint8_t frameLen;
2605 uint8_t frameBuf[1]; /* variable */
2606} tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
2607#endif
2608
2609#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
2610 ((eSME_LINK_DISCONNECTED_BY_HDD == (eReason)) || \
2611 (eSME_LINK_DISCONNECTED_BY_OTHER == (eReason)))
2612#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
2613 ((eSME_LINK_DISCONNECTED_BY_HDD == (eReason)) || \
2614 (eSME_FULL_PWR_NEEDED_BY_HDD == (eReason)))
2615
2616/* P2P Power Save Related */
2617typedef struct sSirNoAParam {
2618 uint8_t ctWindow:7;
2619 uint8_t OppPS:1;
2620 uint8_t count;
2621 uint32_t duration;
2622 uint32_t interval;
2623 uint32_t singleNoADuration;
2624 uint8_t psSelection;
2625} tSirNoAParam, *tpSirNoAParam;
2626
2627typedef struct sSirWlanSuspendParam {
2628 uint8_t configuredMcstBcstFilterSetting;
2629 uint8_t sessionId;
2630 uint8_t connectedState;
2631} tSirWlanSuspendParam, *tpSirWlanSuspendParam;
2632
2633typedef struct sSirWlanResumeParam {
2634 uint8_t configuredMcstBcstFilterSetting;
2635} tSirWlanResumeParam, *tpSirWlanResumeParam;
2636
2637#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
2638
2639typedef enum ext_wow_type {
2640 EXT_WOW_TYPE_APP_TYPE1, /* wow type: only enable wakeup for app type1 */
2641 EXT_WOW_TYPE_APP_TYPE2, /* wow type: only enable wakeup for app type2 */
2642 EXT_WOW_TYPE_APP_TYPE1_2, /* wow type: enable wakeup for app type1&2 */
2643} EXT_WOW_TYPE;
2644
2645typedef struct {
2646 uint8_t vdev_id;
2647 EXT_WOW_TYPE type;
2648 uint32_t wakeup_pin_num;
2649} tSirExtWoWParams, *tpSirExtWoWParams;
2650
2651typedef struct {
2652 uint8_t vdev_id;
Srinivas Girigowda04209912015-11-24 12:11:13 -08002653 struct cdf_mac_addr wakee_mac_addr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002654 uint8_t identification_id[8];
2655 uint8_t password[16];
2656 uint32_t id_length;
2657 uint32_t pass_length;
2658} tSirAppType1Params, *tpSirAppType1Params;
2659
2660typedef struct {
2661 uint8_t vdev_id;
2662
2663 uint8_t rc4_key[16];
2664 uint32_t rc4_key_len;
2665
2666 /** ip header parameter */
2667 uint32_t ip_id; /* NC id */
2668 uint32_t ip_device_ip; /* NC IP address */
2669 uint32_t ip_server_ip; /* Push server IP address */
2670
2671 /** tcp header parameter */
2672 uint16_t tcp_src_port; /* NC TCP port */
2673 uint16_t tcp_dst_port; /* Push server TCP port */
2674 uint32_t tcp_seq;
2675 uint32_t tcp_ack_seq;
2676
2677 uint32_t keepalive_init; /* Initial ping interval */
2678 uint32_t keepalive_min; /* Minimum ping interval */
2679 uint32_t keepalive_max; /* Maximum ping interval */
2680 uint32_t keepalive_inc; /* Increment of ping interval */
2681
Srinivas Girigowda04209912015-11-24 12:11:13 -08002682 struct cdf_mac_addr gateway_mac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002683 uint32_t tcp_tx_timeout_val;
2684 uint32_t tcp_rx_timeout_val;
2685} tSirAppType2Params, *tpSirAppType2Params;
2686#endif
2687
2688typedef struct sSirWlanSetRxpFilters {
2689 uint8_t configuredMcstBcstFilterSetting;
2690 uint8_t setMcstBcstFilter;
2691} tSirWlanSetRxpFilters, *tpSirWlanSetRxpFilters;
2692
2693
2694#define ANI_MAX_IBSS_ROUTE_TABLE_ENTRY 100
2695
2696typedef struct sAniDestIpNextHopMacPair {
2697 uint8_t destIpv4Addr[CDF_IPV4_ADDR_SIZE];
2698 uint8_t nextHopMacAddr[CDF_MAC_ADDR_SIZE];
2699} tAniDestIpNextHopMacPair;
2700
2701typedef struct sAniIbssRouteTable {
2702 uint8_t sessionId;
2703 uint16_t numEntries;
2704 tAniDestIpNextHopMacPair destIpNextHopPair[1];
2705} tAniIbssRouteTable;
2706
2707#ifdef FEATURE_WLAN_SCAN_PNO
2708/* */
2709/* PNO Messages */
2710/* */
2711
2712
2713/* Set PNO */
2714#define SIR_PNO_MAX_NETW_CHANNELS 26
2715#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
2716#define SIR_PNO_MAX_SUPP_NETWORKS 16
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002717
2718/*
2719 * size based of dot11 declaration without extra IEs as we will not carry those
2720 * for PNO
2721 */
2722#define SIR_PNO_MAX_PB_REQ_SIZE 450
2723
2724#define SIR_PNO_24G_DEFAULT_CH 1
2725#define SIR_PNO_5G_DEFAULT_CH 36
2726
2727typedef enum {
2728 SIR_PNO_MODE_IMMEDIATE,
2729 SIR_PNO_MODE_ON_SUSPEND,
2730 SIR_PNO_MODE_ON_RESUME,
2731 SIR_PNO_MODE_MAX
2732} eSirPNOMode;
2733
2734typedef struct {
2735 tSirMacSSid ssId;
2736 uint32_t authentication;
2737 uint32_t encryption;
2738 uint32_t bcastNetwType;
2739 uint8_t ucChannelCount;
2740 uint8_t aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
2741 int32_t rssiThreshold;
2742} tSirNetworkType;
2743
Srinivas Girigowdabdc98162015-09-17 11:06:07 -07002744/**
2745 * struct sSirPNOScanReq - PNO Scan request structure
2746 * @enable: flag to enable or disable
2747 * @modePNO: PNO Mode
2748 * @ucNetworksCount: Number of networks
2749 * @aNetworks: Preferred network list
2750 * @sessionId: Session identifier
2751 * @fast_scan_period: Fast Scan period
2752 * @slow_scan_period: Slow scan period
2753 * @fast_scan_max_cycles: Fast scan max cycles
2754 * @us24GProbeTemplateLen: 2.4G probe template length
2755 * @p24GProbeTemplate: 2.4G probe template
2756 * @us5GProbeTemplateLen: 5G probe template length
2757 * @p5GProbeTemplate: 5G probe template
2758 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002759typedef struct sSirPNOScanReq {
2760 uint8_t enable;
2761 eSirPNOMode modePNO;
2762 uint8_t ucNetworksCount;
2763 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002764 uint8_t sessionId;
Srinivas Girigowdabdc98162015-09-17 11:06:07 -07002765 uint32_t fast_scan_period;
2766 uint32_t slow_scan_period;
2767 uint8_t fast_scan_max_cycles;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002768
Naveen Rawatcf7d2d52015-11-13 06:57:32 -08002769 uint32_t active_min_time;
2770 uint32_t active_max_time;
2771 uint32_t passive_min_time;
2772 uint32_t passive_max_time;
2773
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002774 uint16_t us24GProbeTemplateLen;
2775 uint8_t p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
2776 uint16_t us5GProbeTemplateLen;
2777 uint8_t p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -07002778#ifdef FEATURE_WLAN_SCAN_PNO
2779 bool pno_channel_prediction;
2780 uint8_t top_k_num_of_channels;
2781 uint8_t stationary_thresh;
2782 uint32_t channel_prediction_full_scan;
2783#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002784} tSirPNOScanReq, *tpSirPNOScanReq;
2785
2786/* Preferred Network Found Indication */
2787typedef struct {
2788 uint16_t mesgType;
2789 uint16_t mesgLen;
2790 /* Network that was found with the highest RSSI */
2791 tSirMacSSid ssId;
2792 /* Indicates the RSSI */
2793 uint8_t rssi;
2794 /* Length of the beacon or probe response
2795 * corresponding to the candidate found by PNO */
2796 uint32_t frameLength;
2797 uint8_t sessionId;
2798 /* Index to memory location where the contents of
2799 * beacon or probe response frame will be copied */
2800 uint8_t data[1];
2801} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
2802#endif /* FEATURE_WLAN_SCAN_PNO */
2803
2804#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2805typedef struct {
2806 uint8_t acvo_uapsd:1;
2807 uint8_t acvi_uapsd:1;
2808 uint8_t acbk_uapsd:1;
2809 uint8_t acbe_uapsd:1;
2810 uint8_t reserved:4;
2811} tSirAcUapsd, *tpSirAcUapsd;
2812#endif
2813
2814typedef struct {
2815 tSirMacSSid ssId;
2816 uint8_t currAPbssid[CDF_MAC_ADDR_SIZE];
2817 uint32_t authentication;
2818 uint8_t encryption;
2819 uint8_t mcencryption;
2820 uint8_t ChannelCount;
2821 uint8_t ChannelCache[SIR_ROAM_MAX_CHANNELS];
2822#ifdef WLAN_FEATURE_11W
2823 bool mfp_enabled;
2824#endif
2825
2826} tSirRoamNetworkType;
2827
2828typedef struct SirMobilityDomainInfo {
2829 uint8_t mdiePresent;
2830 uint16_t mobilityDomain;
2831} tSirMobilityDomainInfo;
2832
2833typedef enum {
2834 SIR_ROAMING_DFS_CHANNEL_DISABLED = 0,
2835 SIR_ROAMING_DFS_CHANNEL_ENABLED_NORMAL = 1,
2836 SIR_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE = 2
2837} eSirDFSRoamScanMode;
2838#define MAX_SSID_ALLOWED_LIST 4
2839#define MAX_BSSID_AVOID_LIST 16
2840#define MAX_BSSID_FAVORED 16
2841/**
2842 * struct roam_ext_params - Structure holding roaming parameters
2843 * @num_bssid_avoid_list: The number of BSSID's that we should
2844 * avoid connecting to. It is like a
2845 * blacklist of BSSID's.
2846 * @num_ssid_allowed_list: The number of SSID profiles that are
2847 * in the Whitelist. When roaming, we
2848 * consider the BSSID's with this SSID
2849 * also for roaming apart from the connected one's
2850 * @num_bssid_favored: Number of BSSID's which have a preference over
2851 * others
2852 * @ssid_allowed_list: Whitelist SSID's
2853 * @bssid_avoid_list: Blacklist SSID's
2854 * @bssid_favored: Favorable BSSID's
2855 * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
2856 * @raise_rssi_thresh_5g: The RSSI threshold below which the
2857 * raise_factor_5g (boost factor) should be
2858 * applied.
2859 * @drop_rssi_thresh_5g: The RSSI threshold beyond which the
2860 * drop_factor_5g (penalty factor) should be
2861 * applied
2862 * @raise_rssi_type_5g: Algorithm to apply the boost factor
2863 * @raise_factor_5g: Boost factor
2864 * @drop_rssi_type_5g: Algorithm to apply the penalty factor
2865 * @drop_factor_5g: Penalty factor
2866 * @max_raise_rssi_5g: Maximum amount of Boost that can added
2867 * @max_drop_rssi_5g: Maximum amount of penalty that can be subtracted
2868 * @good_rssi_threshold: The Lookup UP threshold beyond which roaming
2869 * scan should be performed.
2870 * @rssi_diff: RSSI difference for the AP to be better over the
2871 * current AP to avoid ping pong effects
2872 * @good_rssi_roam: Lazy Roam
2873 * @is_5g_pref_enabled: 5GHz BSSID preference feature enable/disable.
2874 *
2875 * This structure holds all the key parameters related to
2876 * initial connection and also roaming connections.
2877 * */
2878struct roam_ext_params {
2879 uint8_t num_bssid_avoid_list;
2880 uint8_t num_ssid_allowed_list;
2881 uint8_t num_bssid_favored;
2882 tSirMacSSid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
Srinivas Girigowdab0532392015-11-24 11:50:16 -08002883 struct cdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
2884 struct cdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002885 uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
2886 int raise_rssi_thresh_5g;
2887 int drop_rssi_thresh_5g;
2888 uint8_t raise_rssi_type_5g;
2889 uint8_t raise_factor_5g;
2890 uint8_t drop_rssi_type_5g;
2891 uint8_t drop_factor_5g;
2892 int max_raise_rssi_5g;
2893 int max_drop_rssi_5g;
2894 int alert_rssi_threshold;
2895 int rssi_diff;
2896 int good_rssi_roam;
2897 bool is_5g_pref_enabled;
2898};
2899
2900typedef struct sSirRoamOffloadScanReq {
2901 bool RoamScanOffloadEnabled;
2902 bool MAWCEnabled;
2903 int8_t LookupThreshold;
2904 uint8_t delay_before_vdev_stop;
2905 uint8_t OpportunisticScanThresholdDiff;
2906 uint8_t RoamRescanRssiDiff;
2907 uint8_t RoamRssiDiff;
2908 uint8_t ChannelCacheType;
2909 uint8_t Command;
2910 uint8_t reason;
2911 uint16_t NeighborScanTimerPeriod;
2912 uint16_t NeighborRoamScanRefreshPeriod;
2913 uint16_t NeighborScanChannelMinTime;
2914 uint16_t NeighborScanChannelMaxTime;
2915 uint16_t EmptyRefreshScanPeriod;
2916 uint8_t ValidChannelCount;
2917 uint8_t ValidChannelList[SIR_ROAM_MAX_CHANNELS];
2918 bool IsESEAssoc;
2919 uint16_t us24GProbeTemplateLen;
2920 uint8_t p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
2921 uint16_t us5GProbeTemplateLen;
2922 uint8_t p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
2923 uint8_t ReservedBytes[SIR_ROAM_SCAN_RESERVED_BYTES];
2924 /*ReservedBytes is to add any further params in future
2925 without changing the interface params on Host
2926 and firmware.The firmware right now checks
2927 if the size of this structure matches and then
2928 proceeds with the processing of the command.
2929 So, in future, if there is any need to add
2930 more params, pick the memory from reserved
2931 bytes and keep deducting the reserved bytes
2932 by the amount of bytes picked. */
2933 uint8_t nProbes;
2934 uint16_t HomeAwayTime;
2935 tSirRoamNetworkType ConnectedNetwork;
2936 tSirMobilityDomainInfo MDID;
2937 uint8_t sessionId;
2938 uint8_t RoamBmissFirstBcnt;
2939 uint8_t RoamBmissFinalBcnt;
2940 uint8_t RoamBeaconRssiWeight;
2941 eSirDFSRoamScanMode allowDFSChannelRoam;
2942#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2943 uint8_t RoamOffloadEnabled;
2944 uint8_t PSK_PMK[SIR_ROAM_SCAN_PSK_SIZE];
2945 uint32_t pmk_len;
2946 uint8_t Prefer5GHz;
2947 uint8_t RoamRssiCatGap;
2948 uint8_t Select5GHzMargin;
2949 uint8_t KRK[SIR_KRK_KEY_LEN];
2950 uint8_t BTK[SIR_BTK_KEY_LEN];
2951 uint32_t ReassocFailureTimeout;
2952 tSirAcUapsd AcUapsd;
2953 uint8_t R0KH_ID[SIR_ROAM_R0KH_ID_MAX_LEN];
2954 uint32_t R0KH_ID_Length;
2955 uint8_t RoamKeyMgmtOffloadEnabled;
2956#endif
2957 struct roam_ext_params roam_params;
2958 uint8_t middle_of_roaming;
2959 uint32_t hi_rssi_scan_max_count;
2960 uint32_t hi_rssi_scan_rssi_delta;
2961 uint32_t hi_rssi_scan_delay;
2962 int32_t hi_rssi_scan_rssi_ub;
Varun Reddy Yeturu05186292015-09-28 17:12:33 -07002963 uint8_t early_stop_scan_enable;
2964 int8_t early_stop_scan_min_threshold;
2965 int8_t early_stop_scan_max_threshold;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002966} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
2967
2968typedef struct sSirRoamOffloadScanRsp {
2969 uint8_t sessionId;
2970 uint32_t reason;
2971} tSirRoamOffloadScanRsp, *tpSirRoamOffloadScanRsp;
2972
2973
2974#ifdef WLAN_FEATURE_PACKET_FILTERING
2975/*---------------------------------------------------------------------------
2976 Packet Filtering Parameters
2977 ---------------------------------------------------------------------------*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002978#define SIR_MAX_FILTER_TEST_DATA_LEN 8
2979#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
2980#define SIR_MAX_NUM_FILTERS 20
2981#define SIR_MAX_NUM_TESTS_PER_FILTER 10
2982
2983/* */
2984/* Receive Filter Parameters */
2985/* */
2986typedef enum {
2987 SIR_RCV_FILTER_TYPE_INVALID,
2988 SIR_RCV_FILTER_TYPE_FILTER_PKT,
2989 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
2990 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
2991} eSirReceivePacketFilterType;
2992
2993typedef enum {
2994 SIR_FILTER_HDR_TYPE_INVALID,
2995 SIR_FILTER_HDR_TYPE_MAC,
2996 SIR_FILTER_HDR_TYPE_ARP,
2997 SIR_FILTER_HDR_TYPE_IPV4,
2998 SIR_FILTER_HDR_TYPE_IPV6,
2999 SIR_FILTER_HDR_TYPE_UDP,
3000 SIR_FILTER_HDR_TYPE_MAX
3001} eSirRcvPktFltProtocolType;
3002
3003typedef enum {
3004 SIR_FILTER_CMP_TYPE_INVALID,
3005 SIR_FILTER_CMP_TYPE_EQUAL,
3006 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
3007 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
3008 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
3009 SIR_FILTER_CMP_TYPE_MAX
3010} eSirRcvPktFltCmpFlagType;
3011
3012typedef struct sSirRcvPktFilterFieldParams {
3013 eSirRcvPktFltProtocolType protocolLayer;
3014 eSirRcvPktFltCmpFlagType cmpFlag;
3015 /* Length of the data to compare */
3016 uint16_t dataLength;
3017 /* from start of the respective frame header */
3018 uint8_t dataOffset;
3019 /* Reserved field */
3020 uint8_t reserved;
3021 /* Data to compare */
3022 uint8_t compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
3023 /* Mask to be applied on the received packet data before compare */
3024 uint8_t dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
3025} tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
3026
3027typedef struct sSirRcvPktFilterCfg {
3028 uint8_t filterId;
3029 eSirReceivePacketFilterType filterType;
3030 uint32_t numFieldParams;
3031 uint32_t coalesceTime;
Srinivas Girigowda98530492015-11-20 17:39:24 -08003032 struct cdf_mac_addr self_macaddr;
3033 struct cdf_mac_addr bssid; /* Bssid of the connected AP */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003034 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
3035} tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
3036
3037/* */
3038/* Filter Packet Match Count Parameters */
3039/* */
3040typedef struct sSirRcvFltPktMatchCnt {
3041 uint8_t filterId;
3042 uint32_t matchCnt;
3043} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
3044
3045typedef struct sSirRcvFltPktMatchRsp {
3046 uint16_t mesgType;
3047 uint16_t mesgLen;
3048
3049 /* Success or Failure */
3050 uint32_t status;
3051 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
Srinivas Girigowda98530492015-11-20 17:39:24 -08003052 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003053} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
3054
3055/* */
3056/* Receive Filter Clear Parameters */
3057/* */
3058typedef struct sSirRcvFltPktClearParam {
3059 uint32_t status; /* only valid for response message */
3060 uint8_t filterId;
Srinivas Girigowda98530492015-11-20 17:39:24 -08003061 struct cdf_mac_addr self_macaddr;
3062 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003063} tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
3064
3065/* */
3066/* Multicast Address List Parameters */
3067/* */
3068typedef struct sSirRcvFltMcAddrList {
3069 uint32_t ulMulticastAddrCnt;
Srinivas Girigowda98530492015-11-20 17:39:24 -08003070 struct cdf_mac_addr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
3071 struct cdf_mac_addr self_macaddr;
3072 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003073 uint8_t action;
3074} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3075#endif /* WLAN_FEATURE_PACKET_FILTERING */
3076
3077/* */
3078/* Generic version information */
3079/* */
3080typedef struct {
3081 uint8_t revision;
3082 uint8_t version;
3083 uint8_t minor;
3084 uint8_t major;
3085} tSirVersionType;
3086
3087#ifdef WLAN_FEATURE_GTK_OFFLOAD
3088/*---------------------------------------------------------------------------
3089* WMA_GTK_OFFLOAD_REQ
3090*--------------------------------------------------------------------------*/
3091typedef struct {
3092 uint32_t ulFlags; /* optional flags */
3093 uint8_t aKCK[16]; /* Key confirmation key */
3094 uint8_t aKEK[16]; /* key encryption key */
3095 uint64_t ullKeyReplayCounter; /* replay counter */
Srinivas Girigowda2213b1d2015-11-20 17:10:11 -08003096 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003097} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3098
Srinivas Girigowda2213b1d2015-11-20 17:10:11 -08003099/*---------------------------------------------------------------------------
3100* WMA_GTK_OFFLOAD_GETINFO_REQ
3101*--------------------------------------------------------------------------*/
3102typedef struct {
3103 uint16_t mesgType;
3104 uint16_t mesgLen;
3105
3106 uint32_t ulStatus; /* success or failure */
3107 uint64_t ullKeyReplayCounter; /* current replay counter value */
3108 uint32_t ulTotalRekeyCount; /* total rekey attempts */
3109 uint32_t ulGTKRekeyCount; /* successful GTK rekeys */
3110 uint32_t ulIGTKRekeyCount; /* successful iGTK rekeys */
3111 struct cdf_mac_addr bssid;
3112} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
3113#endif /* WLAN_FEATURE_GTK_OFFLOAD */
3114
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003115/**
3116 * struct sir_wifi_start_log - Structure to store the params sent to start/
3117 * stop logging
3118 * @name: Attribute which indicates the type of logging like per packet
3119 * statistics, connectivity etc.
3120 * @verbose_level: Verbose level which can be 0,1,2,3
3121 * @flag: Flag field for future use
3122 */
3123struct sir_wifi_start_log {
3124 uint32_t ring_id;
3125 uint32_t verbose_level;
3126 uint32_t flag;
3127};
3128
3129/**
3130 * enum hw_mode_ss_config - Possible spatial stream configuration
3131 * @SS_0x0: Unused Tx and Rx of MAC
3132 * @SS_1x1: 1 Tx SS and 1 Rx SS
3133 * @SS_2x2: 2 Tx SS and 2 Rx SS
3134 * @SS_3x3: 3 Tx SS and 3 Rx SS
3135 * @SS_4x4: 4 Tx SS and 4 Rx SS
3136 *
3137 * Note: Right now only 1x1 and 2x2 are being supported. Other modes should
3138 * be added when supported. Asymmetric configuration like 1x2, 2x1 are also
3139 * not supported now. But, they are still valid. Right now, Tx/Rx SS support is
3140 * 4 bits long. So, we can go upto 15x15
3141 */
3142enum hw_mode_ss_config {
3143 HW_MODE_SS_0x0,
3144 HW_MODE_SS_1x1,
3145 HW_MODE_SS_2x2,
3146 HW_MODE_SS_3x3,
3147 HW_MODE_SS_4x4,
3148};
3149
3150/**
3151 * enum hw_mode_bandwidth - bandwidth of wifi channel.
3152 *
3153 * @HW_MODE_5_MHZ: 5 Mhz bandwidth
3154 * @HW_MODE_10_MHZ: 10 Mhz bandwidth
3155 * @HW_MODE_20_MHZ: 20 Mhz bandwidth
3156 * @HW_MODE_40_MHZ: 40 Mhz bandwidth
3157 * @HW_MODE_80_MHZ: 80 Mhz bandwidth
3158 * @HW_MODE_80_PLUS_80_MHZ: 80 Mhz plus 80 Mhz bandwidth
3159 * @HW_MODE_160_MHZ: 160 Mhz bandwidth
3160 * @HW_MODE_MAX_BANDWIDTH: Max place holder
3161 *
3162 * These are generic IDs that identify the various roles
3163 * in the software system
3164 */
3165enum hw_mode_bandwidth {
3166 HW_MODE_BW_NONE,
3167 HW_MODE_5_MHZ,
3168 HW_MODE_10_MHZ,
3169 HW_MODE_20_MHZ,
3170 HW_MODE_40_MHZ,
3171 HW_MODE_80_MHZ,
3172 HW_MODE_80_PLUS_80_MHZ,
3173 HW_MODE_160_MHZ,
3174 HW_MODE_MAX_BANDWIDTH
3175};
3176
3177/**
3178 * enum hw_mode_dbs_capab - DBS HW mode capability
3179 * @HW_MODE_DBS_NONE: Non DBS capable
3180 * @HW_MODE_DBS: DFS capable
3181 */
3182enum hw_mode_dbs_capab {
3183 HW_MODE_DBS_NONE,
3184 HW_MODE_DBS,
3185};
3186
3187/**
3188 * enum hw_mode_agile_dfs_capab - Agile DFS HW mode capability
3189 * @HW_MODE_AGILE_DFS_NONE: Non Agile DFS capable
3190 * @HW_MODE_AGILE_DFS: Agile DFS capable
3191 */
3192enum hw_mode_agile_dfs_capab {
3193 HW_MODE_AGILE_DFS_NONE,
3194 HW_MODE_AGILE_DFS,
3195};
3196
3197/**
3198 * enum set_hw_mode_status - Status of set HW mode command
3199 * @SET_HW_MODE_STATUS_OK: command successful
3200 * @SET_HW_MODE_STATUS_EINVAL: Requested invalid hw_mode
3201 * @SET_HW_MODE_STATUS_ECANCELED: HW mode change cancelled
3202 * @SET_HW_MODE_STATUS_ENOTSUP: HW mode not supported
3203 * @SET_HW_MODE_STATUS_EHARDWARE: HW mode change prevented by hardware
3204 * @SET_HW_MODE_STATUS_EPENDING: HW mode change is pending
3205 * @SET_HW_MODE_STATUS_ECOEX: HW mode change conflict with Coex
3206 */
3207enum set_hw_mode_status {
3208 SET_HW_MODE_STATUS_OK,
3209 SET_HW_MODE_STATUS_EINVAL,
3210 SET_HW_MODE_STATUS_ECANCELED,
3211 SET_HW_MODE_STATUS_ENOTSUP,
3212 SET_HW_MODE_STATUS_EHARDWARE,
3213 SET_HW_MODE_STATUS_EPENDING,
3214 SET_HW_MODE_STATUS_ECOEX,
3215};
3216
3217/**
3218 * struct sir_pcl_list - Format of PCL
3219 * @pcl_list: List of preferred channels
3220 * @pcl_len: Number of channels in the PCL
3221 */
3222struct sir_pcl_list {
3223 uint8_t pcl_list[128];
3224 uint32_t pcl_len;
3225};
3226
3227/**
3228 * struct sir_hw_mode_params - HW mode params
3229 * @mac0_tx_ss: MAC0 Tx spatial stream
3230 * @mac0_rx_ss: MAC0 Rx spatial stream
3231 * @mac1_tx_ss: MAC1 Tx spatial stream
3232 * @mac1_rx_ss: MAC1 Rx spatial stream
3233 * @mac0_bw: MAC0 bandwidth
3234 * @mac1_bw: MAC1 bandwidth
3235 * @dbs_cap: DBS capabality
3236 * @agile_dfs_cap: Agile DFS capabality
3237 */
3238struct sir_hw_mode_params {
3239 uint8_t mac0_tx_ss;
3240 uint8_t mac0_rx_ss;
3241 uint8_t mac1_tx_ss;
3242 uint8_t mac1_rx_ss;
3243 uint8_t mac0_bw;
3244 uint8_t mac1_bw;
3245 uint8_t dbs_cap;
3246 uint8_t agile_dfs_cap;
3247};
3248
3249/**
3250 * struct sir_vdev_mac_map - vdev id-mac id map
3251 * @vdev_id: VDEV id
3252 * @mac_id: MAC id
3253 */
3254struct sir_vdev_mac_map {
3255 uint32_t vdev_id;
3256 uint32_t mac_id;
3257};
3258
3259/**
3260 * struct sir_set_hw_mode_resp - HW mode response
3261 * @status: Status
3262 * @cfgd_hw_mode_index: Configured HW mode index
3263 * @num_vdev_mac_entries: Number of vdev-mac id entries
3264 * @vdev_mac_map: vdev id-mac id map
3265 */
3266struct sir_set_hw_mode_resp {
3267 uint32_t status;
3268 uint32_t cfgd_hw_mode_index;
3269 uint32_t num_vdev_mac_entries;
3270 struct sir_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
3271};
3272
3273/**
3274 * struct sir_hw_mode_trans_ind - HW mode transition indication
3275 * @old_hw_mode_index: Index of old HW mode
3276 * @new_hw_mode_index: Index of new HW mode
3277 * @num_vdev_mac_entries: Number of vdev-mac id entries
3278 * @vdev_mac_map: vdev id-mac id map
3279 */
3280struct sir_hw_mode_trans_ind {
3281 uint32_t old_hw_mode_index;
3282 uint32_t new_hw_mode_index;
3283 uint32_t num_vdev_mac_entries;
3284 struct sir_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
3285};
3286
3287/**
3288 * struct sir_dual_mac_config_resp - Dual MAC config response
3289 * @status: Status of setting the dual mac configuration
3290 */
3291struct sir_dual_mac_config_resp {
3292 uint32_t status;
3293};
3294
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003295#ifdef WLAN_WAKEUP_EVENTS
3296/*---------------------------------------------------------------------------
3297 tSirWakeReasonInd
3298 ---------------------------------------------------------------------------*/
3299typedef struct {
3300 uint16_t mesgType;
3301 uint16_t mesgLen;
3302 uint32_t ulReason; /* see tWakeReasonType */
3303 uint32_t ulReasonArg; /* argument specific to the reason type */
3304 /* length of optional data stored in this message, in case
3305 * HAL truncates the data (i.e. data packets) this length
3306 * will be less than the actual length
3307 */
3308 uint32_t ulStoredDataLen;
3309 uint32_t ulActualDataLen; /* actual length of data */
3310 /* variable length start of data (length == storedDataLen)
3311 * see specific wake type
3312 */
3313 uint8_t aDataStart[1];
3314} tSirWakeReasonInd, *tpSirWakeReasonInd;
3315#endif /* WLAN_WAKEUP_EVENTS */
3316
3317/*---------------------------------------------------------------------------
3318 sAniSetTmLevelReq
3319 ---------------------------------------------------------------------------*/
3320typedef struct sAniSetTmLevelReq {
3321 uint16_t tmMode;
3322 uint16_t newTmLevel;
3323} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
3324
3325#ifdef FEATURE_WLAN_TDLS
3326/* TDLS Request struct SME-->PE */
3327typedef struct sSirTdlsSendMgmtReq {
3328 uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */
3329 uint16_t length;
3330 uint8_t sessionId; /* Session ID */
3331 uint16_t transactionId; /* Transaction ID for cmd */
3332 uint8_t reqType;
3333 uint8_t dialog;
3334 uint16_t statusCode;
3335 uint8_t responder;
3336 uint32_t peerCapability;
3337 /* For multi-session, for PE to locate peSession ID */
3338 tSirMacAddr bssid;
3339 tSirMacAddr peerMac;
3340 /* Variable lenght. Dont add any field after this. */
3341 uint8_t addIe[1];
3342} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq;
3343
3344typedef enum TdlsAddOper {
3345 TDLS_OPER_NONE,
3346 TDLS_OPER_ADD,
3347 TDLS_OPER_UPDATE
3348} eTdlsAddOper;
3349
3350/* TDLS Request struct SME-->PE */
3351typedef struct sSirTdlsAddStaReq {
3352 uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */
3353 uint16_t length;
3354 uint8_t sessionId; /* Session ID */
3355 uint16_t transactionId; /* Transaction ID for cmd */
3356 /* For multi-session, for PE to locate peSession ID */
Srinivas Girigowdaa35f1092015-11-19 19:38:00 -08003357 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003358 eTdlsAddOper tdlsAddOper;
Srinivas Girigowdaa35f1092015-11-19 19:38:00 -08003359 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003360 uint16_t capability;
3361 uint8_t extn_capability[SIR_MAC_MAX_EXTN_CAP];
3362 uint8_t supported_rates_length;
3363 uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES];
3364 uint8_t htcap_present;
3365 tSirHTCap htCap;
3366 uint8_t vhtcap_present;
3367 tSirVHTCap vhtCap;
3368 uint8_t uapsd_queues;
3369 uint8_t max_sp;
3370} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq;
3371
3372/* TDLS Response struct PE-->SME */
3373typedef struct sSirTdlsAddStaRsp {
3374 uint16_t messageType;
3375 uint16_t length;
3376 tSirResultCodes statusCode;
Srinivas Girigowdaa35f1092015-11-19 19:38:00 -08003377 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003378 uint8_t sessionId; /* Session ID */
3379 uint16_t staId;
3380 uint16_t staType;
3381 uint8_t ucastSig;
3382 uint8_t bcastSig;
3383 eTdlsAddOper tdlsAddOper;
3384} tSirTdlsAddStaRsp;
3385
3386/* TDLS Request struct SME-->PE */
3387typedef struct {
3388 uint16_t messageType; /* eWNI_SME_TDLS_LINK_ESTABLISH_REQ */
3389 uint16_t length;
3390 uint8_t sessionId; /* Session ID */
3391 uint16_t transactionId; /* Transaction ID for cmd */
3392 uint8_t uapsdQueues; /* Peer's uapsd Queues Information */
3393 uint8_t maxSp; /* Peer's Supported Maximum Service Period */
3394 uint8_t isBufSta; /* Does Peer Support as Buffer Station. */
3395 /* Does Peer Support as TDLS Off Channel. */
3396 uint8_t isOffChannelSupported;
3397 uint8_t isResponder; /* Is Peer a responder. */
3398 /* For multi-session, for PE to locate peSession ID */
Srinivas Girigowda2e602872015-11-20 20:58:13 -08003399 struct cdf_mac_addr bssid;
3400 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003401 uint8_t supportedChannelsLen;
3402 uint8_t supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
3403 uint8_t supportedOperClassesLen;
3404 uint8_t supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
3405} tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
3406
3407/* TDLS Request struct SME-->PE */
3408typedef struct {
3409 uint16_t messageType; /* eWNI_SME_TDLS_LINK_ESTABLISH_RSP */
3410 uint16_t length;
3411 uint8_t sessionId; /* Session ID */
3412 uint16_t transactionId; /* Transaction ID for cmd */
3413 tSirResultCodes statusCode;
Srinivas Girigowda2e602872015-11-20 20:58:13 -08003414 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003415} tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
3416
3417/* TDLS Request struct SME-->PE */
3418typedef struct sSirTdlsDelStaReq {
3419 uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */
3420 uint16_t length;
3421 uint8_t sessionId; /* Session ID */
3422 uint16_t transactionId; /* Transaction ID for cmd */
3423 /* For multi-session, for PE to locate peSession ID */
Srinivas Girigowda84f42922015-11-19 16:28:05 -08003424 struct cdf_mac_addr bssid;
3425 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003426} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq;
3427/* TDLS Response struct PE-->SME */
3428typedef struct sSirTdlsDelStaRsp {
3429 uint16_t messageType;
3430 uint16_t length;
3431 uint8_t sessionId; /* Session ID */
3432 tSirResultCodes statusCode;
Srinivas Girigowda84f42922015-11-19 16:28:05 -08003433 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003434 uint16_t staId;
3435} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
3436/* TDLS Delete Indication struct PE-->SME */
3437typedef struct sSirTdlsDelStaInd {
3438 uint16_t messageType;
3439 uint16_t length;
3440 uint8_t sessionId; /* Session ID */
Srinivas Girigowda84f42922015-11-19 16:28:05 -08003441 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003442 uint16_t staId;
3443 uint16_t reasonCode;
3444} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
3445typedef struct sSirTdlsDelAllPeerInd {
3446 uint16_t messageType;
3447 uint16_t length;
3448 uint8_t sessionId; /* Session ID */
3449} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003450typedef struct sSirMgmtTxCompletionInd {
3451 uint16_t messageType;
3452 uint16_t length;
3453 uint8_t sessionId; /* Session ID */
3454 uint32_t txCompleteStatus;
3455} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
3456
3457typedef struct sSirTdlsEventnotify {
3458 uint8_t sessionId;
Srinivas Girigowda4f593792015-11-19 15:33:42 -08003459 struct cdf_mac_addr peermac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003460 uint16_t messageType;
3461 uint32_t peer_reason;
3462} tSirTdlsEventnotify;
3463#endif /* FEATURE_WLAN_TDLS */
3464
3465typedef struct sSirActiveModeSetBcnFilterReq {
3466 uint16_t messageType;
3467 uint16_t length;
3468 uint8_t seesionId;
3469} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
3470
3471/* Reset AP Caps Changed */
3472typedef struct sSirResetAPCapsChange {
3473 uint16_t messageType;
3474 uint16_t length;
Srinivas Girigowda40567b92015-09-24 15:17:25 -07003475 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003476} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
3477
3478/* / Definition for Candidate found indication from FW */
3479typedef struct sSirSmeCandidateFoundInd {
3480 uint16_t messageType; /* eWNI_SME_CANDIDATE_FOUND_IND */
3481 uint16_t length;
3482 uint8_t sessionId; /* Session Identifier */
3483} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
3484
3485#ifdef WLAN_FEATURE_11W
3486typedef struct sSirWlanExcludeUnencryptParam {
3487 bool excludeUnencrypt;
Srinivas Girigowdaa6a1d202015-11-19 15:10:27 -08003488 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003489} tSirWlanExcludeUnencryptParam, *tpSirWlanExcludeUnencryptParam;
3490#endif
3491
3492typedef enum {
3493 P2P_SCAN_TYPE_SEARCH = 1, /* P2P Search */
3494 P2P_SCAN_TYPE_LISTEN /* P2P Listen */
3495} tSirP2pScanType;
3496
3497typedef struct sAniHandoffReq {
3498 /* Common for all types are requests */
3499 uint16_t msgType; /* message type is same as the request type */
3500 uint16_t msgLen; /* length of the entire request */
3501 uint8_t sessionId;
3502 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3503 uint8_t channel;
3504 uint8_t handoff_src;
3505} tAniHandoffReq, *tpAniHandoffReq;
3506
3507typedef struct sSirScanOffloadReq {
3508 uint8_t sessionId;
Srinivas Girigowdaa5bf5432015-09-24 11:20:22 -07003509 struct cdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003510 uint8_t numSsid;
3511 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
3512 uint8_t hiddenSsid;
Srinivas Girigowdaa5bf5432015-09-24 11:20:22 -07003513 struct cdf_mac_addr selfMacAddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003514 tSirBssType bssType;
3515 uint8_t dot11mode;
3516 tSirScanType scanType;
3517 uint32_t minChannelTime;
3518 uint32_t maxChannelTime;
3519 uint32_t scan_id;
3520 /* in units of milliseconds, ignored when not connected */
3521 uint32_t restTime;
3522 tSirP2pScanType p2pScanType;
3523 uint16_t uIEFieldLen;
3524 uint16_t uIEFieldOffset;
3525 tSirChannelList channelList;
3526 /*-----------------------------
3527 sSirScanOffloadReq....
3528 -----------------------------
3529 uIEFieldLen
3530 -----------------------------
3531 uIEFieldOffset ----+
3532 ----------------------------- |
3533 channelList.numChannels |
3534 ----------------------------- |
3535 ... variable size up to |
3536 channelNumber[numChannels-1] |
3537 This can be zero, if |
3538 numChannel is zero. |
3539 ----------------------------- <--+
3540 ... variable size uIEField
3541 up to uIEFieldLen (can be 0)
3542 -----------------------------*/
3543} tSirScanOffloadReq, *tpSirScanOffloadReq;
3544
3545typedef enum sSirScanEventType {
3546 SCAN_EVENT_STARTED = 0x1, /* Scan command accepted by FW */
3547 SCAN_EVENT_COMPLETED = 0x2, /* Scan has been completed by FW */
3548 SCAN_EVENT_BSS_CHANNEL = 0x4, /* FW is going to move to HOME ch */
3549 SCAN_EVENT_FOREIGN_CHANNEL = 0x8, /* FW going to move to FORIEGN ch */
3550 SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
3551 SCAN_EVENT_PREEMPTED = 0x20, /* preempted by high priority scan */
3552 SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
3553 SCAN_EVENT_RESTARTED = 0x80, /*scan restarted */
3554 SCAN_EVENT_MAX = 0x8000
3555} tSirScanEventType;
3556
3557typedef struct sSirScanOffloadEvent {
3558 tSirScanEventType event;
3559 tSirResultCodes reasonCode;
3560 uint32_t chanFreq;
3561 uint32_t requestor;
3562 uint32_t scanId;
3563 tSirP2pScanType p2pScanType;
3564 uint8_t sessionId;
3565} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
3566
3567/**
3568 * struct sSirUpdateChanParam - channel parameters
3569 * @chanId: ID of the channel
3570 * @pwr: power level
3571 * @dfsSet: is dfs supported or not
3572 * @half_rate: is the channel operating at 10MHz
3573 * @quarter_rate: is the channel operating at 5MHz
3574 */
3575typedef struct sSirUpdateChanParam {
3576 uint8_t chanId;
3577 uint8_t pwr;
3578 bool dfsSet;
3579 bool half_rate;
3580 bool quarter_rate;
3581} tSirUpdateChanParam, *tpSirUpdateChanParam;
3582
3583typedef struct sSirUpdateChan {
3584 uint8_t numChan;
3585 tSirUpdateChanParam chanParam[1];
3586} tSirUpdateChanList, *tpSirUpdateChanList;
3587
3588typedef enum eSirAddonPsReq {
3589 eSIR_ADDON_NOTHING,
3590 eSIR_ADDON_ENABLE_UAPSD,
3591 eSIR_ADDON_DISABLE_UAPSD
3592} tSirAddonPsReq;
3593
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003594#ifdef FEATURE_WLAN_LPHB
3595#define SIR_LPHB_FILTER_LEN 64
3596
3597typedef enum {
3598 LPHB_SET_EN_PARAMS_INDID,
3599 LPHB_SET_TCP_PARAMS_INDID,
3600 LPHB_SET_TCP_PKT_FILTER_INDID,
3601 LPHB_SET_UDP_PARAMS_INDID,
3602 LPHB_SET_UDP_PKT_FILTER_INDID,
3603 LPHB_SET_NETWORK_INFO_INDID,
3604} LPHBIndType;
3605
3606typedef struct sSirLPHBEnableStruct {
3607 uint8_t enable;
3608 uint8_t item;
3609 uint8_t session;
3610} tSirLPHBEnableStruct;
3611
3612typedef struct sSirLPHBTcpParamStruct {
3613 uint32_t srv_ip;
3614 uint32_t dev_ip;
3615 uint16_t src_port;
3616 uint16_t dst_port;
3617 uint16_t timeout;
3618 uint8_t session;
Srinivas Girigowda9dc32cf2015-11-19 14:47:04 -08003619 struct cdf_mac_addr gateway_mac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003620 uint16_t timePeriodSec; /* in seconds */
3621 uint32_t tcpSn;
3622} tSirLPHBTcpParamStruct;
3623
3624typedef struct sSirLPHBTcpFilterStruct {
3625 uint16_t length;
3626 uint8_t offset;
3627 uint8_t session;
3628 uint8_t filter[SIR_LPHB_FILTER_LEN];
3629} tSirLPHBTcpFilterStruct;
3630
3631typedef struct sSirLPHBUdpParamStruct {
3632 uint32_t srv_ip;
3633 uint32_t dev_ip;
3634 uint16_t src_port;
3635 uint16_t dst_port;
3636 uint16_t interval;
3637 uint16_t timeout;
3638 uint8_t session;
Srinivas Girigowda9eddfda2015-11-19 14:38:02 -08003639 struct cdf_mac_addr gateway_mac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003640} tSirLPHBUdpParamStruct;
3641
3642typedef struct sSirLPHBUdpFilterStruct {
3643 uint16_t length;
3644 uint8_t offset;
3645 uint8_t session;
3646 uint8_t filter[SIR_LPHB_FILTER_LEN];
3647} tSirLPHBUdpFilterStruct;
3648
3649typedef struct sSirLPHBReq {
3650 uint16_t cmd;
3651 uint16_t dummy;
3652 union {
3653 tSirLPHBEnableStruct lphbEnableReq;
3654 tSirLPHBTcpParamStruct lphbTcpParamReq;
3655 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
3656 tSirLPHBUdpParamStruct lphbUdpParamReq;
3657 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
3658 } params;
3659} tSirLPHBReq;
3660
3661typedef struct sSirLPHBInd {
3662 uint8_t sessionIdx;
3663 uint8_t protocolType; /*TCP or UDP */
3664 uint8_t eventReason;
3665} tSirLPHBInd;
3666#endif /* FEATURE_WLAN_LPHB */
3667
3668#ifdef FEATURE_WLAN_CH_AVOID
3669typedef struct sSirChAvoidUpdateReq {
3670 uint32_t reserved_param;
3671} tSirChAvoidUpdateReq;
3672#endif /* FEATURE_WLAN_CH_AVOID */
3673
3674typedef struct sSirLinkSpeedInfo {
3675 /* MAC Address for the peer */
Srinivas Girigowdadccab9a2015-11-19 14:31:14 -08003676 struct cdf_mac_addr peer_macaddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003677 uint32_t estLinkSpeed; /* Linkspeed from firmware */
3678} tSirLinkSpeedInfo, *tpSirLinkSpeedInfo;
3679
3680typedef struct sSirAddPeriodicTxPtrn {
3681 /* MAC Address for the adapter */
Srinivas Girigowda31896552015-11-18 22:59:52 -08003682 struct cdf_mac_addr mac_address;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003683 uint8_t ucPtrnId; /* Pattern ID */
3684 uint16_t ucPtrnSize; /* Pattern size */
3685 uint32_t usPtrnIntervalMs; /* In msec */
3686 uint8_t ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; /* Pattern buffer */
3687} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
3688
3689typedef struct sSirDelPeriodicTxPtrn {
3690 /* MAC Address for the adapter */
Srinivas Girigowdaa5bba7a2015-11-18 22:44:36 -08003691 struct cdf_mac_addr mac_address;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003692 /* Bitmap of pattern IDs that need to be deleted */
3693 uint32_t ucPatternIdBitmap;
3694 uint8_t ucPtrnId; /* Pattern ID */
3695} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
3696
3697typedef struct {
3698 uint16_t mesgType;
3699 uint16_t mesgLen;
3700 bool suspended;
3701} tSirReadyToSuspendInd, *tpSirReadyToSuspendInd;
3702#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
3703typedef struct {
3704 uint16_t mesgType;
3705 uint16_t mesgLen;
3706 bool status;
3707} tSirReadyToExtWoWInd, *tpSirReadyToExtWoWInd;
3708#endif
3709typedef struct sSirRateUpdateInd {
3710 uint8_t nss; /* 0: 1x1, 1: 2x2 */
Srinivas Girigowdaafede182015-11-18 22:36:12 -08003711 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003712 tCDF_CON_MODE dev_mode;
3713 int32_t bcastDataRate; /* bcast rate unit Mbpsx10, -1:not used */
3714 /*
3715 * 0 implies RA, positive value implies fixed rate, -1 implies ignore
3716 * this param.
3717 */
3718 int32_t ucastDataRate;
3719
3720 /* TX flag to differentiate between HT20, HT40 etc */
3721 tTxrateinfoflags ucastDataRateTxFlag;
3722
3723 /*
3724 * 0 implies MCAST RA, positive value implies fixed rate,
3725 * -1 implies ignore this param
3726 */
3727 int32_t reliableMcastDataRate; /* unit Mbpsx10 */
3728
3729 /* TX flag to differentiate between HT20, HT40 etc */
3730 tTxrateinfoflags reliableMcastDataRateTxFlag;
3731
3732 /*
3733 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
3734 * 0 implies ignore
3735 */
3736 uint32_t mcastDataRate24GHz;
3737
3738 /* TX flag to differentiate between HT20, HT40 etc */
3739 tTxrateinfoflags mcastDataRate24GHzTxFlag;
3740
3741 /*
3742 * MCAST(or BCAST) fixed data rate in 5 GHz,
3743 * unit Mbpsx10, 0 implies ignore
3744 */
3745 uint32_t mcastDataRate5GHz;
3746
3747 /* TX flag to differentiate between HT20, HT40 etc */
3748 tTxrateinfoflags mcastDataRate5GHzTxFlag;
3749
3750} tSirRateUpdateInd, *tpSirRateUpdateInd;
3751
3752#if defined(FEATURE_WLAN_CH_AVOID) || defined(FEATURE_WLAN_FORCE_SAP_SCC)
3753#define SIR_CH_AVOID_MAX_RANGE 4
3754
3755typedef struct sSirChAvoidFreqType {
3756 uint32_t start_freq;
3757 uint32_t end_freq;
3758} tSirChAvoidFreqType;
3759
3760typedef struct sSirChAvoidIndType {
3761 uint32_t avoid_range_count;
3762 tSirChAvoidFreqType avoid_freq_range[SIR_CH_AVOID_MAX_RANGE];
3763} tSirChAvoidIndType;
3764#endif /* FEATURE_WLAN_CH_AVOID || FEATURE_WLAN_FORCE_SAP_SCC */
3765
3766#define SIR_DFS_MAX_20M_SUB_CH 8
3767
3768typedef struct sSirSmeDfsChannelList {
3769 uint32_t nchannels;
3770 /* Ch num including bonded channels on which the RADAR is present */
3771 uint8_t channels[SIR_DFS_MAX_20M_SUB_CH];
3772} tSirSmeDfsChannelList, *tpSirSmeDfsChannelList;
3773
3774typedef struct sSirSmeDfsEventInd {
3775 uint32_t sessionId;
3776 tSirSmeDfsChannelList chan_list;
3777 uint32_t dfs_radar_status;
3778 int use_nol;
3779} tSirSmeDfsEventInd, *tpSirSmeDfsEventInd;
3780
3781typedef struct sSirChanChangeRequest {
3782 uint16_t messageType;
3783 uint16_t messageLen;
3784 uint8_t targetChannel;
3785 uint8_t cbMode;
3786 uint8_t channel_width;
3787 uint8_t center_freq_seg_0;
3788 uint8_t center_freq_seg_1;
3789 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3790 uint32_t dot11mode;
3791 tSirMacRateSet operational_rateset;
3792 tSirMacRateSet extended_rateset;
3793} tSirChanChangeRequest, *tpSirChanChangeRequest;
3794
3795typedef struct sSirChanChangeResponse {
3796 uint8_t sessionId;
3797 uint8_t newChannelNumber;
3798 uint8_t channelChangeStatus;
3799 ePhyChanBondState secondaryChannelOffset;
3800} tSirChanChangeResponse, *tpSirChanChangeResponse;
3801
3802typedef struct sSirStartBeaconIndication {
3803 uint16_t messageType;
3804 uint16_t messageLen;
3805 uint8_t beaconStartStatus;
3806 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3807} tSirStartBeaconIndication, *tpSirStartBeaconIndication;
3808
3809/* additional IE type */
3810typedef enum tUpdateIEsType {
3811 eUPDATE_IE_NONE,
3812 eUPDATE_IE_PROBE_BCN,
3813 eUPDATE_IE_PROBE_RESP,
3814 eUPDATE_IE_ASSOC_RESP,
3815
3816 /* Add type above this line */
3817 /* this is used to reset all buffer */
3818 eUPDATE_IE_ALL,
3819 eUPDATE_IE_MAX
3820} eUpdateIEsType;
3821
3822/* Modify particular IE in addition IE for prob resp Bcn */
3823typedef struct sSirModifyIE {
Srinivas Girigowda34b634c2015-11-18 22:22:01 -08003824 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003825 uint16_t smeSessionId;
3826 bool notify;
3827 uint8_t ieID;
3828 uint8_t ieIDLen; /*ie length as per spec */
3829 uint16_t ieBufferlength;
3830 uint8_t *pIEBuffer;
3831
3832} tSirModifyIE, *tpSirModifyIE;
3833
3834/* Message format for Update IE message sent to PE */
3835typedef struct sSirModifyIEsInd {
3836 uint16_t msgType;
3837 uint16_t msgLen;
3838 tSirModifyIE modifyIE;
3839 eUpdateIEsType updateType;
3840} tSirModifyIEsInd, *tpSirModifyIEsInd;
3841
3842/* Message format for Update IE message sent to PE */
3843typedef struct sSirUpdateIE {
Srinivas Girigowda8b983962015-11-18 22:14:34 -08003844 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003845 uint16_t smeSessionId;
3846 bool append;
3847 bool notify;
3848 uint16_t ieBufferlength;
3849 uint8_t *pAdditionIEBuffer;
3850} tSirUpdateIE, *tpSirUpdateIE;
3851
3852/* Message format for Update IE message sent to PE */
3853typedef struct sSirUpdateIEsInd {
3854 uint16_t msgType;
3855 uint16_t msgLen;
3856 tSirUpdateIE updateIE;
3857 eUpdateIEsType updateType;
3858} tSirUpdateIEsInd, *tpSirUpdateIEsInd;
3859
3860/* Message format for requesting channel switch announcement to lower layers */
3861typedef struct sSirDfsCsaIeRequest {
3862 uint16_t msgType;
3863 uint16_t msgLen;
3864 uint8_t targetChannel;
3865 uint8_t csaIeRequired;
3866 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3867 uint8_t ch_bandwidth;
3868} tSirDfsCsaIeRequest, *tpSirDfsCsaIeRequest;
3869
3870/* Indication from lower layer indicating the completion of first beacon send
3871 * after the beacon template update
3872 */
3873typedef struct sSirFirstBeaconTxCompleteInd {
3874 uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */
3875 uint16_t length;
3876 uint8_t bssIdx;
3877} tSirFirstBeaconTxCompleteInd, *tpSirFirstBeaconTxCompleteInd;
3878
3879typedef struct sSirSmeCSAIeTxCompleteRsp {
3880 uint8_t sessionId;
3881 uint8_t chanSwIeTxStatus;
3882} tSirSmeCSAIeTxCompleteRsp, *tpSirSmeCSAIeTxCompleteRsp;
3883
3884/* Thermal Mitigation*/
3885
3886typedef struct {
3887 uint16_t minTempThreshold;
3888 uint16_t maxTempThreshold;
3889} t_thermal_level_info, *tp_thermal_level_info;
3890
3891typedef enum {
3892 WLAN_WMA_THERMAL_LEVEL_0,
3893 WLAN_WMA_THERMAL_LEVEL_1,
3894 WLAN_WMA_THERMAL_LEVEL_2,
3895 WLAN_WMA_THERMAL_LEVEL_3,
3896 WLAN_WMA_MAX_THERMAL_LEVELS
3897} t_thermal_level;
3898
3899typedef struct {
3900 /* Array of thermal levels */
3901 t_thermal_level_info thermalLevels[WLAN_WMA_MAX_THERMAL_LEVELS];
3902 uint8_t thermalCurrLevel;
3903 uint8_t thermalMgmtEnabled;
3904 uint32_t throttlePeriod;
3905} t_thermal_mgmt, *tp_thermal_mgmt;
3906
3907typedef struct sSirTxPowerLimit {
3908 /* Thermal limits for 2g and 5g */
3909 uint32_t txPower2g;
3910 uint32_t txPower5g;
3911} tSirTxPowerLimit;
3912
3913/* notify MODEM power state to FW */
3914typedef struct {
3915 uint32_t param;
3916} tSirModemPowerStateInd, *tpSirModemPowerStateInd;
3917
3918#ifdef WLAN_FEATURE_STATS_EXT
3919typedef struct {
3920 uint32_t vdev_id;
3921 uint32_t event_data_len;
3922 uint8_t event_data[];
3923} tSirStatsExtEvent, *tpSirStatsExtEvent;
3924#endif
3925
3926#ifdef WLAN_FEATURE_NAN
3927typedef struct {
3928 uint32_t event_data_len;
3929 uint8_t event_data[];
3930} tSirNanEvent, *tpSirNanEvent;
3931#endif
3932#ifdef WLAN_FEATURE_ROAM_OFFLOAD
3933typedef struct sSirSmeRoamOffloadSynchInd {
3934 uint16_t messageType; /*eWNI_SME_ROAM_OFFLOAD_SYNCH_IND */
3935 uint16_t length;
3936 uint16_t beaconProbeRespOffset;
3937 uint16_t beaconProbeRespLength;
3938 uint16_t reassocRespOffset;
3939 uint16_t reassocRespLength;
3940 uint8_t isBeacon;
3941 uint8_t roamedVdevId;
Srinivas Girigowda198b2032015-11-24 11:37:34 -08003942 struct cdf_mac_addr bssid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003943 int8_t txMgmtPower;
3944 uint32_t authStatus;
3945 uint8_t rssi;
3946 uint8_t roamReason;
3947 uint32_t chan_freq;
3948 uint8_t kck[SIR_KCK_KEY_LEN];
3949 uint8_t kek[SIR_KEK_KEY_LEN];
3950 uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
3951 tpSirBssDescription bss_desc_ptr;
3952} roam_offload_synch_ind;
3953
3954typedef struct sSirSmeRoamOffloadSynchCnf {
3955 uint8_t sessionId;
3956} tSirSmeRoamOffloadSynchCnf, *tpSirSmeRoamOffloadSynchCnf;
3957
3958typedef struct sSirSmeHOFailureInd {
3959 uint8_t sessionId;
3960} tSirSmeHOFailureInd, *tpSirSmeHOFailureInd;
3961
3962struct roam_offload_synch_fail {
3963 uint8_t session_id;
3964};
3965
3966#endif
3967
3968#ifdef FEATURE_WLAN_EXTSCAN
3969
3970/**
3971 * typedef enum wifi_scan_flags - wifi scan flags
3972 * @WIFI_SCAN_FLAG_INTERRUPTED: Indicates that scan results are not complete
3973 * because probes were not sent on some channels
3974 */
3975typedef enum {
3976 WIFI_SCAN_FLAG_INTERRUPTED = 1,
3977} wifi_scan_flags;
3978
3979typedef enum {
3980 WIFI_BAND_UNSPECIFIED,
3981 WIFI_BAND_BG = 1, /* 2.4 GHz */
3982 WIFI_BAND_A = 2, /* 5 GHz without DFS */
3983 WIFI_BAND_ABG = 3, /* 2.4 GHz + 5 GHz; no DFS */
3984 WIFI_BAND_A_DFS_ONLY = 4, /* 5 GHz DFS only */
3985 /* 5 is reserved */
3986 WIFI_BAND_A_WITH_DFS = 6, /* 5 GHz with DFS */
3987 WIFI_BAND_ABG_WITH_DFS = 7, /* 2.4 GHz + 5 GHz with DFS */
3988
3989 /* Keep it last */
3990 WIFI_BAND_MAX
3991} tWifiBand;
3992
3993/* wifi scan related events */
3994typedef enum {
3995 WIFI_SCAN_BUFFER_FULL,
3996 WIFI_SCAN_COMPLETE,
3997} tWifiScanEventType;
3998
3999/**
4000 * enum extscan_configuration_flags - extscan config flags
4001 * @EXTSCAN_LP_EXTENDED_BATCHING: extended batching
4002 */
4003enum extscan_configuration_flags {
4004 EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
4005};
4006
4007typedef struct {
4008 struct cdf_mac_addr bssid;
4009
4010 /* Low threshold */
4011 int32_t low;
4012
4013 /* High threshold */
4014 int32_t high;
4015} tSirAPThresholdParam, *tpSirAPThresholdParam;
4016
4017typedef struct {
4018 uint32_t requestId;
4019 uint8_t sessionId;
4020} tSirGetExtScanCapabilitiesReqParams, *tpSirGetExtScanCapabilitiesReqParams;
4021
4022/**
4023 * struct ext_scan_capabilities_response - extscan capabilities response data
4024 * @requestId: request identifier
4025 * @status: status
4026 * @max_scan_cache_size: total space allocated for scan (in bytes)
4027 * @max_scan_buckets: maximum number of channel buckets
4028 * @max_ap_cache_per_scan: maximum number of APs that can be stored per scan
4029 * @max_rssi_sample_size: number of RSSI samples used for averaging RSSI
4030 * @ax_scan_reporting_threshold: max possible report_threshold
4031 * @max_hotlist_bssids: maximum number of entries for hotlist APs
4032 * @max_significant_wifi_change_aps: maximum number of entries for
4033 * significant wifi change APs
4034 * @max_bssid_history_entries: number of BSSID/RSSI entries that device can hold
4035 * @max_hotlist_ssids: maximum number of entries for hotlist SSIDs
4036 * @max_number_epno_networks: max number of epno entries
4037 * @max_number_epno_networks_by_ssid: max number of epno entries
4038 * if ssid is specified, that is, epno entries for
4039 * which an exact match is required,
4040 * or entries corresponding to hidden ssids
4041 * @max_number_of_white_listed_ssid: max number of white listed SSIDs
4042 */
4043struct ext_scan_capabilities_response {
4044 uint32_t requestId;
4045 uint32_t status;
4046
4047 uint32_t max_scan_cache_size;
4048 uint32_t max_scan_buckets;
4049 uint32_t max_ap_cache_per_scan;
4050 uint32_t max_rssi_sample_size;
4051 uint32_t max_scan_reporting_threshold;
4052
4053 uint32_t max_hotlist_bssids;
4054 uint32_t max_significant_wifi_change_aps;
4055
4056 uint32_t max_bssid_history_entries;
4057 uint32_t max_hotlist_ssids;
4058 uint32_t max_number_epno_networks;
4059 uint32_t max_number_epno_networks_by_ssid;
4060 uint32_t max_number_of_white_listed_ssid;
4061};
4062
4063typedef struct {
4064 uint32_t requestId;
4065 uint8_t sessionId;
4066
4067 /*
4068 * 1 - return cached results and flush it
4069 * 0 - return cached results and do not flush
4070 */
4071 bool flush;
4072} tSirExtScanGetCachedResultsReqParams, *tpSirExtScanGetCachedResultsReqParams;
4073
4074typedef struct {
4075 uint32_t requestId;
4076 uint32_t status;
4077} tSirExtScanGetCachedResultsRspParams, *tpSirExtScanGetCachedResultsRspParams;
4078
4079typedef struct {
4080 /* Time of discovery */
4081 uint64_t ts;
4082
4083 /* Null terminated SSID */
4084 uint8_t ssid[SIR_MAC_MAX_SSID_LENGTH + 1];
4085
4086 struct cdf_mac_addr bssid;
4087
4088 /* Frequency in MHz */
4089 uint32_t channel;
4090
4091 /* RSSI in dBm */
4092 int32_t rssi;
4093
4094 /* RTT in nanoseconds */
4095 uint32_t rtt;
4096
4097 /* Standard deviation in rtt */
4098 uint32_t rtt_sd;
4099
4100 /* Period advertised in the beacon */
4101 uint16_t beaconPeriod;
4102
4103 /* Capabilities advertised in the beacon */
4104 uint16_t capability;
4105
4106 uint16_t ieLength;
4107
4108 uint8_t ieData[];
4109} tSirWifiScanResult, *tpSirWifiScanResult;
4110
4111/**
4112 * struct extscan_hotlist_match - extscan hotlist match
4113 * @requestId: request identifier
4114 * @numOfAps: number of bssids retrieved by the scan
4115 * @moreData: 0 - for last fragment
4116 * 1 - still more fragment(s) coming
4117 * @ap: wifi scan result
4118 */
4119struct extscan_hotlist_match {
4120 uint32_t requestId;
4121 bool moreData;
4122 bool ap_found;
4123 uint32_t numOfAps;
4124 tSirWifiScanResult ap[];
4125};
4126
4127/**
4128 * struct extscan_cached_scan_result - extscan cached scan result
4129 * @scan_id: a unique identifier for the scan unit
4130 * @flags: a bitmask with additional information about scan
4131 * @num_results: number of bssids retrieved by the scan
4132 * @ap: wifi scan bssid results info
4133 */
4134struct extscan_cached_scan_result {
4135 uint32_t scan_id;
4136 uint32_t flags;
4137 uint32_t num_results;
4138 tSirWifiScanResult *ap;
4139};
4140
4141/**
4142 * struct tSirWifiScanResultEvent - wifi scan result event
4143 * @requestId: request identifier
4144 * @ap_found: flag to indicate ap found or not
4145 * true: AP was found
4146 * false: AP was lost
4147 * @numOfAps: number of aps
4148 * @moreData: more data
4149 * @ap: bssid information
4150 *
4151 */
4152typedef struct {
4153 uint32_t requestId;
4154 bool ap_found;
4155 uint32_t numOfAps;
4156 bool moreData;
4157 tSirWifiScanResult ap[];
4158} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
4159
4160/**
4161 * struct extscan_cached_scan_results - extscan cached scan results
4162 * @request_id: request identifier
4163 * @more_data: 0 - for last fragment
4164 * 1 - still more fragment(s) coming
4165 * @num_scan_ids: number of scan ids
4166 * @result: wifi scan result
4167 */
4168struct extscan_cached_scan_results {
4169 uint32_t request_id;
4170 bool more_data;
4171 uint32_t num_scan_ids;
4172 struct extscan_cached_scan_result *result;
4173};
4174
4175
4176/**
4177 * struct tSirWifiFullScanResultEvent - extscan full scan event
4178 * @request_id: request identifier
4179 * @moreData: 0 - for last fragment
4180 * 1 - still more fragment(s) coming
4181 * @ap: bssid info
4182 *
4183 * Reported when each probe response is received, if reportEvents
4184 * enabled in tSirWifiScanCmdReqParams
4185 */
4186typedef struct {
4187 uint32_t requestId;
4188 bool moreData;
4189 tSirWifiScanResult ap;
4190} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
4191
4192/**
4193 * struct pno_match_found - epno match found
4194 * @request_id: request identifier
4195 * @moreData: 0 - for last fragment
4196 * 1 - still more fragment(s) coming
4197 * @num_results: number of bssids, driver sends this event to upper layer
4198 * for every beacon, hence %num_results is always set to 1.
4199 * @ap: bssid info
4200 *
4201 * Reported when each beacon probe response is received with
4202 * epno match found tag.
4203 */
4204struct pno_match_found {
4205 uint32_t request_id;
4206 bool more_data;
4207 uint32_t num_results;
4208 tSirWifiScanResult ap[];
4209};
4210
4211typedef struct {
4212 /* Frequency in MHz */
4213 uint32_t channel;
4214
4215 uint32_t dwellTimeMs;
4216
4217 /* 0 => active
4218 1 => passive scan; ignored for DFS */
4219 bool passive;
4220
4221 uint8_t chnlClass;
4222} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
4223
4224/**
4225 * struct tSirWifiScanBucketSpec - wifi scan bucket spec
4226 * @bucket: bucket identifier
4227 * @band: wifi band
4228 * @period: Desired period, in millisecond; if this is too
4229 * low, the firmware should choose to generate results as fast as
4230 * it can instead of failing the command byte
4231 * for exponential backoff bucket this is the min_period
4232 * @reportEvents: 0 => normal reporting (reporting rssi history
4233 * only, when rssi history buffer is % full)
4234 * 1 => same as 0 + report a scan completion event after scanning
4235 * this bucket
4236 * 2 => same as 1 + forward scan results
4237 * (beacons/probe responses + IEs) in real time to HAL
4238 * @max_period: if max_period is non zero or different than period,
4239 * then this bucket is an exponential backoff bucket and
4240 * the scan period will grow exponentially as per formula:
4241 * actual_period(N) = period ^ (N/(step_count+1)) to a
4242 * maximum period of max_period
4243 * @exponent: for exponential back off bucket: multiplier:
4244 * new_period = old_period * exponent
4245 * @step_count: for exponential back off bucket, number of scans performed
4246 * at a given period and until the exponent is applied
4247 * @numChannels: channels to scan; these may include DFS channels
4248 * Note that a given channel may appear in multiple buckets
4249 * @min_dwell_time_active: per bucket minimum active dwell time
4250 * @max_dwell_time_active: per bucket maximum active dwell time
4251 * @min_dwell_time_passive: per bucket minimum passive dwell time
4252 * @max_dwell_time_passive: per bucket maximum passive dwell time
4253 * @channels: Channel list
4254 */
4255typedef struct {
4256 uint8_t bucket;
4257 tWifiBand band;
4258 uint32_t period;
4259 uint32_t reportEvents;
4260 uint32_t max_period;
4261 uint32_t exponent;
4262 uint32_t step_count;
4263 uint32_t numChannels;
4264
4265 uint32_t min_dwell_time_active;
4266 uint32_t max_dwell_time_active;
4267 uint32_t min_dwell_time_passive;
4268 uint32_t max_dwell_time_passive;
4269 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
4270} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
4271
4272/**
4273 * struct tSirWifiScanCmdReqParams - wifi scan command request params
4274 * @basePeriod: base timer period
4275 * @maxAPperScan: max ap per scan
4276 * @report_threshold_percent: report threshold
4277 * in %, when buffer is this much full, wake up host
4278 * @report_threshold_num_scans: report threshold number of scans
4279 * in number of scans, wake up host after these many scans
4280 * @requestId: request id
4281 * @sessionId: session id
4282 * @numBuckets: number of buckets
4283 * @min_dwell_time_active: per bucket minimum active dwell time
4284 * @max_dwell_time_active: per bucket maximum active dwell time
4285 * @min_dwell_time_passive: per bucket minimum passive dwell time
4286 * @max_dwell_time_passive: per bucket maximum passive dwell time
4287 * @configuration_flags: configuration flags
4288 * @buckets: buckets array
4289 */
4290typedef struct {
4291 uint32_t basePeriod;
4292 uint32_t maxAPperScan;
4293
4294 uint32_t report_threshold_percent;
4295 uint32_t report_threshold_num_scans;
4296
4297 uint32_t requestId;
4298 uint8_t sessionId;
4299 uint32_t numBuckets;
4300
4301 uint32_t min_dwell_time_active;
4302 uint32_t max_dwell_time_active;
4303 uint32_t min_dwell_time_passive;
4304 uint32_t max_dwell_time_passive;
4305 uint32_t configuration_flags;
4306 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
4307} tSirWifiScanCmdReqParams, *tpSirWifiScanCmdReqParams;
4308
4309/**
4310 * struct sir_extscan_generic_response -
4311 * Generic ExtScan Response structure
4312 * @request_id: ID of the request
4313 * @status: operation status returned by firmware
4314 */
4315struct sir_extscan_generic_response {
4316 uint32_t request_id;
4317 uint32_t status;
4318};
4319
4320typedef struct {
4321 uint32_t requestId;
4322 uint8_t sessionId;
4323} tSirExtScanStopReqParams, *tpSirExtScanStopReqParams;
4324
4325/**
4326 * struct tSirExtScanSetBssidHotListReqParams - set hotlist request
4327 * @requestId: request identifier
4328 * @sessionId: session identifier
4329 * @lost_ap_sample_size: number of samples to confirm AP loss
4330 * @numAp: Number of hotlist APs
4331 * @ap: hotlist APs
4332 */
4333typedef struct {
4334 uint32_t requestId;
4335 uint8_t sessionId;
4336
4337 uint32_t lost_ap_sample_size;
4338 uint32_t numAp;
4339 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS];
4340} tSirExtScanSetBssidHotListReqParams, *tpSirExtScanSetBssidHotListReqParams;
4341
4342typedef struct {
4343 uint32_t requestId;
4344 uint8_t sessionId;
4345} tSirExtScanResetBssidHotlistReqParams,
4346*tpSirExtScanResetBssidHotlistReqParams;
4347
4348/**
4349 * struct sir_ssid_hotlist_param - param for SSID Hotlist
4350 * @ssid: SSID which is being hotlisted
4351 * @band: Band in which the given SSID should be scanned
4352 * @rssi_low: Low bound on RSSI
4353 * @rssi_high: High bound on RSSI
4354 */
4355struct sir_ssid_hotlist_param {
4356 tSirMacSSid ssid;
4357 uint8_t band;
4358 int32_t rssi_low;
4359 int32_t rssi_high;
4360};
4361
4362/**
4363 * struct sir_set_ssid_hotlist_request - set SSID hotlist request struct
4364 * @request_id: ID of the request
4365 * @session_id: ID of the session
4366 * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
4367 * must not be seen in order to consider the SSID "lost"
4368 * @ssid_count: Number of valid entries in the @ssids array
4369 * @ssids: Array that defines the SSIDs that are in the hotlist
4370 */
4371struct sir_set_ssid_hotlist_request {
4372 uint32_t request_id;
4373 uint8_t session_id;
4374 uint32_t lost_ssid_sample_size;
4375 uint32_t ssid_count;
4376 struct sir_ssid_hotlist_param ssids[WLAN_EXTSCAN_MAX_HOTLIST_SSIDS];
4377};
4378
4379typedef struct {
4380 uint32_t requestId;
4381 uint8_t sessionId;
4382
4383 /* Number of samples for averaging RSSI */
4384 uint32_t rssiSampleSize;
4385
4386 /* Number of missed samples to confirm AP loss */
4387 uint32_t lostApSampleSize;
4388
4389 /* Number of APs breaching threshold required for firmware
4390 * to generate event
4391 */
4392 uint32_t minBreaching;
4393
4394 uint32_t numAp;
4395 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
4396} tSirExtScanSetSigChangeReqParams, *tpSirExtScanSetSigChangeReqParams;
4397
4398typedef struct {
4399 struct cdf_mac_addr bssid;
4400 uint32_t channel;
4401 uint32_t numOfRssi;
4402
4403 /* Rssi history in db */
4404 int32_t rssi[];
4405} tSirWifiSignificantChange, *tpSirWifiSignificantChange;
4406
4407typedef struct {
4408 uint32_t requestId;
4409
4410 bool moreData;
4411 uint32_t numResults;
4412 tSirWifiSignificantChange ap[];
4413} tSirWifiSignificantChangeEvent, *tpSirWifiSignificantChangeEvent;
4414
4415typedef struct {
4416 uint32_t requestId;
4417 uint8_t sessionId;
4418} tSirExtScanResetSignificantChangeReqParams,
4419*tpSirExtScanResetSignificantChangeReqParams;
4420
4421typedef struct {
4422 uint32_t requestId;
4423 uint32_t numResultsAvailable;
4424} tSirExtScanResultsAvailableIndParams, *tpSirExtScanResultsAvailableIndParams;
4425
4426typedef struct {
4427 uint32_t requestId;
4428 uint32_t status;
4429 uint8_t scanEventType;
4430} tSirExtScanOnScanEventIndParams, *tpSirExtScanOnScanEventIndParams;
4431
4432/**
4433 * struct wifi_epno_network - enhanced pno network block
4434 * @ssid: ssid
4435 * @rssi_threshold: threshold for considering this SSID as found, required
4436 * granularity for this threshold is 4dBm to 8dBm
4437 * @flags: WIFI_PNO_FLAG_XXX
4438 * @auth_bit_field: auth bit field for matching WPA IE
4439 */
4440struct wifi_epno_network {
4441 tSirMacSSid ssid;
4442 int8_t rssi_threshold;
4443 uint8_t flags;
4444 uint8_t auth_bit_field;
4445};
4446
4447/**
4448 * struct wifi_epno_params - enhanced pno network params
4449 * @num_networks: number of ssids
4450 * @networks: PNO networks
4451 */
4452struct wifi_epno_params {
4453 uint32_t request_id;
4454 uint32_t session_id;
4455 uint32_t num_networks;
4456 struct wifi_epno_network networks[];
4457};
4458
4459#define SIR_PASSPOINT_REALM_LEN 256
4460#define SIR_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
4461#define SIR_PASSPOINT_PLMN_LEN 3
4462/**
4463 * struct wifi_passpoint_network - passpoint network block
4464 * @id: identifier of this network block
4465 * @realm: null terminated UTF8 encoded realm, 0 if unspecified
4466 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
4467 * @plmn: mcc/mnc combination as per rules, 0s if unspecified
4468 */
4469struct wifi_passpoint_network {
4470 uint32_t id;
4471 uint8_t realm[SIR_PASSPOINT_REALM_LEN];
4472 int64_t roaming_consortium_ids[SIR_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
4473 uint8_t plmn[SIR_PASSPOINT_PLMN_LEN];
4474};
4475
4476/**
4477 * struct wifi_passpoint_req - passpoint request
4478 * @request_id: request identifier
4479 * @num_networks: number of networks
4480 * @networks: passpoint networks
4481 */
4482struct wifi_passpoint_req {
4483 uint32_t request_id;
4484 uint32_t session_id;
4485 uint32_t num_networks;
4486 struct wifi_passpoint_network networks[];
4487};
4488
4489/**
4490 * struct wifi_passpoint_match - wifi passpoint network match
4491 * @id: network block identifier for the matched network
4492 * @anqp_len: length of ANQP blob
4493 * @ap: scan result, with channel and beacon information
4494 * @anqp: ANQP data, in the information_element format
4495 */
4496struct wifi_passpoint_match {
4497 uint32_t request_id;
4498 uint32_t id;
4499 uint32_t anqp_len;
4500 tSirWifiScanResult ap;
4501 uint8_t anqp[];
4502};
4503#endif /* FEATURE_WLAN_EXTSCAN */
4504
4505#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
4506typedef struct {
4507 uint32_t timer_val;
4508} tSirAutoShutdownCmdParams;
4509
4510typedef struct {
4511 uint32_t shutdown_reason;
4512} tSirAutoShutdownEvtParams;
4513#endif
4514
4515#ifdef WLAN_FEATURE_LINK_LAYER_STATS
4516
4517typedef struct {
4518 uint32_t reqId;
4519 uint8_t staId;
4520 uint32_t mpduSizeThreshold;
4521 uint32_t aggressiveStatisticsGathering;
4522} tSirLLStatsSetReq, *tpSirLLStatsSetReq;
4523
4524typedef struct {
4525 uint32_t reqId;
4526 uint8_t staId;
4527 uint32_t paramIdMask;
4528} tSirLLStatsGetReq, *tpSirLLStatsGetReq;
4529
4530typedef struct {
4531 uint32_t reqId;
4532 uint8_t staId;
4533 uint32_t statsClearReqMask;
4534 uint8_t stopReq;
4535} tSirLLStatsClearReq, *tpSirLLStatsClearReq;
4536
4537typedef struct {
4538 uint8_t oui[WIFI_SCANNING_MAC_OUI_LENGTH];
4539} tSirScanMacOui, *tpSirScanMacOui;
4540
4541enum {
4542 SIR_AP_RX_DATA_OFFLOAD = 0x00,
4543 SIR_STA_RX_DATA_OFFLOAD = 0x01,
4544};
4545
4546struct sir_ipa_offload_enable_disable {
4547 uint32_t offload_type;
4548 uint32_t vdev_id;
4549 uint32_t enable;
4550};
4551
4552/*---------------------------------------------------------------------------
4553 WLAN_HAL_LL_NOTIFY_STATS
4554 ---------------------------------------------------------------------------*/
4555
4556/******************************LINK LAYER Statistics**********************/
4557
4558typedef int tSirWifiRadio;
4559typedef int tSirWifiChannel;
4560typedef int tSirwifiTxRate;
4561
4562/* channel operating width */
4563typedef enum {
4564 WIFI_CHAN_WIDTH_20 = 0,
4565 WIFI_CHAN_WIDTH_40 = 1,
4566 WIFI_CHAN_WIDTH_80 = 2,
4567 WIFI_CHAN_WIDTH_160 = 3,
4568 WIFI_CHAN_WIDTH_80P80 = 4,
4569 WIFI_CHAN_WIDTH_5 = 5,
4570 WIFI_CHAN_WIDTH_10 = 6,
4571} tSirWifiChannelWidth;
4572
4573typedef enum {
4574 WIFI_DISCONNECTED = 0,
4575 WIFI_AUTHENTICATING = 1,
4576 WIFI_ASSOCIATING = 2,
4577 WIFI_ASSOCIATED = 3,
4578 WIFI_EAPOL_STARTED = 4, /* if done by firmware/driver */
4579 WIFI_EAPOL_COMPLETED = 5, /* if done by firmware/driver */
4580} tSirWifiConnectionState;
4581
4582typedef enum {
4583 WIFI_ROAMING_IDLE = 0,
4584 WIFI_ROAMING_ACTIVE = 1,
4585} tSirWifiRoamState;
4586
4587typedef enum {
4588 WIFI_INTERFACE_STA = 0,
4589 WIFI_INTERFACE_SOFTAP = 1,
4590 WIFI_INTERFACE_IBSS = 2,
4591 WIFI_INTERFACE_P2P_CLIENT = 3,
4592 WIFI_INTERFACE_P2P_GO = 4,
4593 WIFI_INTERFACE_NAN = 5,
4594 WIFI_INTERFACE_MESH = 6,
4595} tSirWifiInterfaceMode;
4596
4597/* set for QOS association */
4598#define WIFI_CAPABILITY_QOS 0x00000001
4599/* set for protected assoc (802.11 beacon frame control protected bit set) */
4600#define WIFI_CAPABILITY_PROTECTED 0x00000002
4601/* set if 802.11 Extended Capabilities element interworking bit is set */
4602#define WIFI_CAPABILITY_INTERWORKING 0x00000004
4603/* set for HS20 association */
4604#define WIFI_CAPABILITY_HS20 0x00000008
4605/* set is 802.11 Extended Capabilities element UTF-8 SSID bit is set */
4606#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
4607/* set is 802.11 Country Element is present */
4608#define WIFI_CAPABILITY_COUNTRY 0x00000020
4609
4610typedef struct {
4611 /* tSirWifiInterfaceMode */
4612 /* interface mode */
4613 uint8_t mode;
4614 /* interface mac address (self) */
4615 struct cdf_mac_addr macAddr;
4616 /* tSirWifiConnectionState */
4617 /* connection state (valid for STA, CLI only) */
4618 uint8_t state;
4619 /* tSirWifiRoamState */
4620 /* roaming state */
4621 uint32_t roaming;
4622 /* WIFI_CAPABILITY_XXX (self) */
4623 uint32_t capabilities;
4624 /* null terminated SSID */
4625 uint8_t ssid[33];
4626 /* bssid */
4627 struct cdf_mac_addr bssid;
4628 /* country string advertised by AP */
4629 uint8_t apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
4630 /* country string for this association */
4631 uint8_t countryStr[WNI_CFG_COUNTRY_CODE_LEN];
4632} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
4633
4634/* channel information */
4635typedef struct {
4636 /* channel width (20, 40, 80, 80+80, 160) */
4637 tSirWifiChannelWidth width;
4638 /* primary 20 MHz channel */
4639 tSirWifiChannel centerFreq;
4640 /* center frequency (MHz) first segment */
4641 tSirWifiChannel centerFreq0;
4642 /* center frequency (MHz) second segment */
4643 tSirWifiChannel centerFreq1;
4644} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
4645
4646/* wifi rate info */
4647typedef struct {
4648 /* 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved */
4649 uint32_t preamble:3;
4650 /* 0:1x1, 1:2x2, 3:3x3, 4:4x4 */
4651 uint32_t nss:2;
4652 /* 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */
4653 uint32_t bw:3;
4654 /* OFDM/CCK rate code would be as per ieee std in units of 0.5mbps */
4655 /* HT/VHT it would be mcs index */
4656 uint32_t rateMcsIdx:8;
4657 /* reserved */
4658 uint32_t reserved:16;
4659 /* units of 100 Kbps */
4660 uint32_t bitrate;
4661} tSirWifiRate, *tpSirWifiRate;
4662
4663/* channel statistics */
4664typedef struct {
4665 /* channel */
4666 tSirWifiChannelInfo channel;
4667 /* msecs the radio is awake (32 bits number accruing over time) */
4668 uint32_t onTime;
4669 /* msecs the CCA register is busy (32 bits number accruing over time) */
4670 uint32_t ccaBusyTime;
4671} tSirWifiChannelStats, *tpSirWifiChannelStats;
4672
4673/* radio statistics */
4674typedef struct {
4675 /* wifi radio (if multiple radio supported) */
4676 tSirWifiRadio radio;
4677 /* msecs the radio is awake (32 bits number accruing over time) */
4678 uint32_t onTime;
4679 /* msecs the radio is transmitting
4680 * (32 bits number accruing over time)
4681 */
4682 uint32_t txTime;
4683 /* msecs the radio is in active receive
4684 *(32 bits number accruing over time)
4685 */
4686 uint32_t rxTime;
4687 /* msecs the radio is awake due to all scan
4688 * (32 bits number accruing over time)
4689 */
4690 uint32_t onTimeScan;
4691 /* msecs the radio is awake due to NAN
4692 * (32 bits number accruing over time)
4693 */
4694 uint32_t onTimeNbd;
4695 /* msecs the radio is awake due to Gscan
4696 * (32 bits number accruing over time)
4697 */
4698 uint32_t onTimeGscan;
4699 /* msecs the radio is awake due to roam?scan
4700 * (32 bits number accruing over time)
4701 */
4702 uint32_t onTimeRoamScan;
4703 /* msecs the radio is awake due to PNO scan
4704 * (32 bits number accruing over time)
4705 */
4706 uint32_t onTimePnoScan;
4707 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
4708 * (32 bits number accruing over time)
4709 */
4710 uint32_t onTimeHs20;
4711 /* number of channels */
4712 uint32_t numChannels;
4713 /* channel statistics tSirWifiChannelStats */
4714 tSirWifiChannelStats channels[0];
4715} tSirWifiRadioStat, *tpSirWifiRadioStat;
4716
4717/* per rate statistics */
4718typedef struct {
4719 /* rate information */
4720 tSirWifiRate rate;
4721 /* number of successfully transmitted data pkts (ACK rcvd) */
4722 uint32_t txMpdu;
4723 /* number of received data pkts */
4724 uint32_t rxMpdu;
4725 /* number of data packet losses (no ACK) */
4726 uint32_t mpduLost;
4727 /* total number of data pkt retries * */
4728 uint32_t retries;
4729 /* number of short data pkt retries */
4730 uint32_t retriesShort;
4731 /* number of long data pkt retries */
4732 uint32_t retriesLong;
4733} tSirWifiRateStat, *tpSirWifiRateStat;
4734
4735/* access categories */
4736typedef enum {
4737 WIFI_AC_VO = 0,
4738 WIFI_AC_VI = 1,
4739 WIFI_AC_BE = 2,
4740 WIFI_AC_BK = 3,
4741 WIFI_AC_MAX = 4,
4742} tSirWifiTrafficAc;
4743
4744/* wifi peer type */
4745typedef enum {
4746 WIFI_PEER_STA,
4747 WIFI_PEER_AP,
4748 WIFI_PEER_P2P_GO,
4749 WIFI_PEER_P2P_CLIENT,
4750 WIFI_PEER_NAN,
4751 WIFI_PEER_TDLS,
4752 WIFI_PEER_INVALID,
4753} tSirWifiPeerType;
4754
4755/* per peer statistics */
4756typedef struct {
4757 /* peer type (AP, TDLS, GO etc.) */
4758 tSirWifiPeerType type;
4759 /* mac address */
4760 struct cdf_mac_addr peerMacAddress;
4761 /* peer WIFI_CAPABILITY_XXX */
4762 uint32_t capabilities;
4763 /* number of rates */
4764 uint32_t numRate;
4765 /* per rate statistics, number of entries = num_rate */
4766 tSirWifiRateStat rateStats[0];
4767} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
4768
4769/* per access category statistics */
4770typedef struct {
4771 /* tSirWifiTrafficAc */
4772 /* access category (VI, VO, BE, BK) */
4773 uint32_t ac;
4774 /* number of successfully transmitted unicast data pkts (ACK rcvd) */
4775 uint32_t txMpdu;
4776 /* number of received unicast mpdus */
4777 uint32_t rxMpdu;
4778 /* number of succesfully transmitted multicast data packets */
4779 /* STA case: implies ACK received from AP for the unicast */
4780 /* packet in which mcast pkt was sent */
4781 uint32_t txMcast;
4782 /* number of received multicast data packets */
4783 uint32_t rxMcast;
4784 /* number of received unicast a-mpdus */
4785 uint32_t rxAmpdu;
4786 /* number of transmitted unicast a-mpdus */
4787 uint32_t txAmpdu;
4788 /* number of data pkt losses (no ACK) */
4789 uint32_t mpduLost;
4790 /* total number of data pkt retries */
4791 uint32_t retries;
4792 /* number of short data pkt retries */
4793 uint32_t retriesShort;
4794 /* number of long data pkt retries */
4795 uint32_t retriesLong;
4796 /* data pkt min contention time (usecs) */
4797 uint32_t contentionTimeMin;
4798 /* data pkt max contention time (usecs) */
4799 uint32_t contentionTimeMax;
4800 /* data pkt avg contention time (usecs) */
4801 uint32_t contentionTimeAvg;
4802 /* num of data pkts used for contention statistics */
4803 uint32_t contentionNumSamples;
4804} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
4805
4806/* Interface statistics - corresponding to 2nd most
4807 * LSB in wifi statistics bitmap for getting statistics
4808 */
4809typedef struct {
4810 /* current state of the interface */
4811 tSirWifiInterfaceInfo info;
4812 /* access point beacon received count from connected AP */
4813 uint32_t beaconRx;
4814 /* access point mgmt frames received count from */
4815 /* connected AP (including Beacon) */
4816 uint32_t mgmtRx;
4817 /* action frames received count */
4818 uint32_t mgmtActionRx;
4819 /* action frames transmit count */
4820 uint32_t mgmtActionTx;
4821 /* access Point Beacon and Management frames RSSI (averaged) */
4822 uint32_t rssiMgmt;
4823 /* access Point Data Frames RSSI (averaged) from connected AP */
4824 uint32_t rssiData;
4825 /* access Point ACK RSSI (averaged) from connected AP */
4826 uint32_t rssiAck;
4827 /* number of peers */
4828 uint32_t num_peers;
4829 /*
4830 * Indicates how many peer_stats events will be sent depending on the
4831 * num_peers.
4832 */
4833 uint32_t num_peer_events;
4834 /* number of ac */
4835 uint32_t num_ac;
4836 /* Roaming Stat */
4837 uint32_t roam_state;
4838 /*
4839 * Average Beacon spread offset is the averaged time delay between TBTT
4840 * and beacon TSF. Upper 32 bits of averaged 64 bit beacon spread offset
4841 */
4842 uint32_t avg_bcn_spread_offset_high;
4843 /* Lower 32 bits of averaged 64 bit beacon spread offset */
4844 uint32_t avg_bcn_spread_offset_low;
4845 /*
4846 * Takes value of 1 if AP leaks packets after sending an ACK for PM=1
4847 * otherwise 0
4848 */
4849 uint32_t is_leaky_ap;
4850 /*
4851 * Average number of frames received from AP after receiving the ACK
4852 * for a frame with PM = 1
4853 */
4854 uint32_t avg_rx_frms_leaked;
4855 /*
4856 * Rx leak watch window currently in force to minimize data loss
4857 * because of leaky AP. Rx leak window is the
4858 * time driver waits before shutting down the radio or switching
4859 * the channel and after receiving an ACK for
4860 * a data frame with PM bit set.
4861 */
4862 uint32_t rx_leak_window;
4863 /* per ac data packet statistics */
4864 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
4865} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
4866
4867/* Peer statistics - corresponding to 3rd most LSB in
4868 * wifi statistics bitmap for getting statistics
4869 */
4870typedef struct {
4871 /* number of peers */
4872 uint32_t numPeers;
4873 /* per peer statistics */
4874 tSirWifiPeerInfo peerInfo[0];
4875} tSirWifiPeerStat, *tpSirWifiPeerStat;
4876
4877/* wifi statistics bitmap for getting statistics */
4878#define WMI_LINK_STATS_RADIO 0x00000001
4879#define WMI_LINK_STATS_IFACE 0x00000002
4880#define WMI_LINK_STATS_ALL_PEER 0x00000004
4881#define WMI_LINK_STATS_PER_PEER 0x00000008
4882
4883/* wifi statistics bitmap for clearing statistics */
4884/* all radio statistics */
4885#define WIFI_STATS_RADIO 0x00000001
4886/* cca_busy_time (within radio statistics) */
4887#define WIFI_STATS_RADIO_CCA 0x00000002
4888/* all channel statistics (within radio statistics) */
4889#define WIFI_STATS_RADIO_CHANNELS 0x00000004
4890/* all scan statistics (within radio statistics) */
4891#define WIFI_STATS_RADIO_SCAN 0x00000008
4892/* all interface statistics */
4893#define WIFI_STATS_IFACE 0x00000010
4894/* all tx rate statistics (within interface statistics) */
4895#define WIFI_STATS_IFACE_TXRATE 0x00000020
4896/* all ac statistics (within interface statistics) */
4897#define WIFI_STATS_IFACE_AC 0x00000040
4898/* all contention (min, max, avg) statistics (within ac statistics) */
4899#define WIFI_STATS_IFACE_CONTENTION 0x00000080
4900
4901typedef struct {
4902 uint32_t paramId;
4903 uint8_t ifaceId;
4904 uint32_t rspId;
4905 uint32_t moreResultToFollow;
4906 union {
4907 uint32_t num_peers;
4908 uint32_t num_radio;
4909 };
4910
4911 uint32_t peer_event_number;
4912 /* Variable length field - Do not add anything after this */
4913 uint8_t results[0];
4914} tSirLLStatsResults, *tpSirLLStatsResults;
4915
4916#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
4917
4918typedef struct sAniGetLinkStatus {
4919 uint16_t msgType; /* message type is same as the request type */
4920 uint16_t msgLen; /* length of the entire request */
4921 uint8_t linkStatus;
4922 uint8_t sessionId;
4923} tAniGetLinkStatus, *tpAniGetLinkStatus;
4924
4925#ifdef DHCP_SERVER_OFFLOAD
4926typedef struct {
4927 uint32_t vdev_id;
4928 uint32_t dhcpSrvOffloadEnabled;
4929 uint32_t dhcpClientNum;
4930 uint32_t dhcpSrvIP;
4931} tSirDhcpSrvOffloadInfo, *tpSirDhcpSrvOffloadInfo;
4932#endif /* DHCP_SERVER_OFFLOAD */
4933#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
4934typedef struct {
4935 uint32_t reqId;
4936 /* pattern identifier. 0: disconnected 1: connected */
4937 uint32_t pattern_id;
4938 uint32_t led_x0; /* led flashing parameter0 */
4939 uint32_t led_x1; /* led flashing parameter1 */
4940} tSirLedFlashingReq, *tpSirLedFlashingReq;
4941#endif
4942/* find the size of given member within a structure */
4943#ifndef member_size
4944#define member_size(type, member) (sizeof(((type *)0)->member))
4945#endif
4946
4947#define RTT_INVALID 0x00
4948#define RTT_TIMING_MEAS_CAPABILITY 0x01
4949#define RTT_FINE_TIME_MEAS_INITIATOR_CAPABILITY 0x02
4950#define RTT_FINE_TIME_MEAS_RESPONDER_CAPABILITY 0x03
4951
4952/**
4953 * enum fine_time_meas_mask - bit mask to identify device's
4954 * fine timing measurement capability
4955 * @FINE_TIME_MEAS_STA_INITIATOR - STA role, Initiator capability is supported
4956 * @FINE_TIME_MEAS_STA_RESPONDER - STA role, Responder capability is supported
4957 * @FINE_TIME_MEAS_P2PCLI_INITIATOR - P2P-CLI supports initiator capability
4958 * @FINE_TIME_MEAS_P2PCLI_RESPONDER - P2P-CLI supports responder capability
4959 * @FINE_TIME_MEAS_P2PGO_INITIATOR - P2P-GO supports initiator capability
4960 * @FINE_TIME_MEAS_P2PGO_RESPONDER - P2P-GO supports responder capability
4961 * @FINE_TIME_MEAS_SAP_INITIATOR - SAP role, Initiator capability is supported
4962 * @FINE_TIME_MEAS_SAP_RESPONDER - SAP role, Responder capability is supported
4963 */
4964enum fine_time_meas_mask {
4965 FINE_TIME_MEAS_STA_INITIATOR = (1 << (0)),
4966 FINE_TIME_MEAS_STA_RESPONDER = (1 << (1)),
4967 FINE_TIME_MEAS_P2PCLI_INITIATOR = (1 << (2)),
4968 FINE_TIME_MEAS_P2PCLI_RESPONDER = (1 << (3)),
4969 FINE_TIME_MEAS_P2PGO_INITIATOR = (1 << (4)),
4970 FINE_TIME_MEAS_P2PGO_RESPONDER = (1 << (5)),
4971 FINE_TIME_MEAS_SAP_INITIATOR = (1 << (6)),
4972 FINE_TIME_MEAS_SAP_RESPONDER = (1 << (7)),
4973};
4974
4975/* number of neighbor reports that we can handle in Neighbor Report Response */
4976#define MAX_SUPPORTED_NEIGHBOR_RPT 15
4977
4978/**
4979 * struct sir_stats_avg_factor
4980 * @vdev_id: session id
4981 * @stats_avg_factor: average factor
4982 */
4983struct sir_stats_avg_factor {
4984 uint8_t vdev_id;
4985 uint16_t stats_avg_factor;
4986};
4987
4988/**
4989 * struct sir_guard_time_request
4990 * @vdev_id: session id
4991 * @guard_time: guard time
4992 */
4993struct sir_guard_time_request {
4994 uint8_t vdev_id;
4995 uint32_t guard_time;
4996};
4997
4998/* Max number of rates allowed in Supported Rates IE */
4999#define MAX_NUM_SUPPORTED_RATES (8)
5000
5001/*
5002 * struct rssi_monitor_req - rssi monitoring
5003 * @request_id: request id
5004 * @session_id: session id
5005 * @min_rssi: minimum rssi
5006 * @max_rssi: maximum rssi
5007 * @control: flag to indicate start or stop
5008 */
5009struct rssi_monitor_req {
5010 uint32_t request_id;
5011 uint32_t session_id;
5012 int8_t min_rssi;
5013 int8_t max_rssi;
5014 bool control;
5015};
5016
5017/**
5018 * struct rssi_breach_event - rssi breached event structure
5019 * @request_id: request id
5020 * @session_id: session id
5021 * @curr_rssi: current rssi
5022 * @curr_bssid: current bssid
5023 */
5024struct rssi_breach_event {
5025 uint32_t request_id;
5026 uint32_t session_id;
5027 int8_t curr_rssi;
5028 struct cdf_mac_addr curr_bssid;
5029};
5030
5031#define MAX_NUM_FW_SEGMENTS 4
5032
5033/**
5034 * struct fw_dump_seg_req - individual segment details
5035 * @seg_id - segment id.
5036 * @seg_start_addr_lo - lower address of the segment.
5037 * @seg_start_addr_hi - higher address of the segment.
5038 * @seg_length - length of the segment.
5039 * @dst_addr_lo - lower address of the destination buffer.
5040 * @dst_addr_hi - higher address of the destination buffer.
5041 *
5042 * This structure carries the information to firmware about the
5043 * individual segments. This structure is part of firmware memory
5044 * dump request.
5045 */
5046struct fw_dump_seg_req {
5047 uint8_t seg_id;
5048 uint32_t seg_start_addr_lo;
5049 uint32_t seg_start_addr_hi;
5050 uint32_t seg_length;
5051 uint32_t dst_addr_lo;
5052 uint32_t dst_addr_hi;
5053};
5054
5055/**
5056 * struct fw_dump_req - firmware memory dump request details.
5057 * @request_id - request id.
5058 * @num_seg - requested number of segments.
5059 * @fw_dump_seg_req - individual segment information.
5060 *
5061 * This structure carries information about the firmware
5062 * memory dump request.
5063 */
5064struct fw_dump_req {
5065 uint32_t request_id;
5066 uint32_t num_seg;
5067 struct fw_dump_seg_req segment[MAX_NUM_FW_SEGMENTS];
5068};
5069
5070/**
5071 * struct fw_dump_rsp - firmware dump response details.
5072 * @request_id - request id.
5073 * @dump_complete - copy completion status.
5074 *
5075 * This structure is used to store the firmware dump copy complete
5076 * response from the firmware.
5077 */
5078struct fw_dump_rsp {
5079 uint32_t request_id;
5080 uint32_t dump_complete;
5081};
5082
5083/**
5084 * struct vdev_ie_info - IE info
5085 * @vdev_id - vdev for which the IE is being sent
5086 * @ie_id - ID of the IE
5087 * @length - length of the IE data
5088 * @data - IE data
5089 *
5090 * This structure is used to store the IE information.
5091 */
5092struct vdev_ie_info {
5093 uint32_t vdev_id;
5094 uint32_t ie_id;
5095 uint32_t length;
5096 uint8_t *data;
5097};
5098
5099/**
5100 * struct send_extcap_ie - used to pass send_extcap_ie msg from SME to PE
5101 * @type - MSG type
5102 * @length - length of the message
5103 * @seesion_id - session_id for which the message is intended for
5104 *
5105 * This structure is used to pass send_extcap_ie msg from SME to PE
5106 */
5107struct send_extcap_ie {
5108 uint16_t msg_type; /* eWNI_SME_SET_IE_REQ */
5109 uint16_t length;
5110 uint8_t session_id;
5111};
5112
5113typedef void (*hw_mode_cb)(uint32_t status, uint32_t cfgd_hw_mode_index,
5114 uint32_t num_vdev_mac_entries,
5115 struct sir_vdev_mac_map *vdev_mac_map);
5116typedef void (*hw_mode_transition_cb)(uint32_t old_hw_mode_index,
5117 uint32_t new_hw_mode_index,
5118 uint32_t num_vdev_mac_entries,
5119 struct sir_vdev_mac_map *vdev_mac_map);
5120typedef void (*dual_mac_cb)(uint32_t status, uint32_t scan_config,
5121 uint32_t fw_mode_config);
5122
5123/**
5124 * struct sir_nss_update_request
5125 * @msgType: nss update msg type
5126 * @msgLen: length of the msg
5127 * @new_nss: new spatial stream value
5128 * @vdev_id: session id
5129 */
5130struct sir_nss_update_request {
5131 uint16_t msgType;
5132 uint16_t msgLen;
5133 uint8_t new_nss;
5134 uint32_t vdev_id;
5135};
5136
5137/**
5138 * struct sir_beacon_tx_complete_rsp
5139 *
5140 * @session_id: session for which beacon update happened
5141 * @tx_status: status of the beacon tx from FW
5142 */
5143struct sir_beacon_tx_complete_rsp {
5144 uint8_t session_id;
5145 uint8_t tx_status;
5146};
5147
5148typedef void (*nss_update_cb)(void *context, uint8_t tx_status, uint8_t vdev_id,
5149 uint8_t next_action);
5150
5151/**
5152 * OCB structures
5153 */
5154
5155#define NUM_AC (4)
5156#define OCB_CHANNEL_MAX (5)
5157
5158struct sir_qos_params {
5159 uint8_t aifsn;
5160 uint8_t cwmin;
5161 uint8_t cwmax;
5162};
5163
5164/**
5165 * struct sir_ocb_set_config_response
5166 * @status: response status
5167 */
5168struct sir_ocb_set_config_response {
5169 uint8_t status;
5170};
5171
5172/** Callback for the dcc_stats_event */
5173typedef void (*dcc_stats_event_callback_t)(void *hdd_ctx, uint32_t vdev_id,
5174 uint32_t num_channels, uint32_t stats_per_channel_array_len,
5175 const void *stats_per_channel_array);
5176
5177/**
5178 * struct sir_ocb_config_channel
5179 * @chan_freq: frequency of the channel
5180 * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
5181 * @mac_address: MAC address assigned to this channel
5182 * @qos_params: QoS parameters
5183 * @max_pwr: maximum transmit power of the channel (dBm)
5184 * @min_pwr: minimum transmit power of the channel (dBm)
5185 * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
5186 * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
5187 */
5188struct sir_ocb_config_channel {
5189 uint32_t chan_freq;
5190 uint32_t bandwidth;
Srinivas Girigowda117e7fb2015-11-16 12:33:45 -08005191 struct cdf_mac_addr mac_address;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005192 struct sir_qos_params qos_params[MAX_NUM_AC];
5193 uint32_t max_pwr;
5194 uint32_t min_pwr;
5195 uint8_t reg_pwr;
5196 uint8_t antenna_max;
5197 uint16_t flags;
5198};
5199
5200/**
5201 * OCB_CHANNEL_FLAG_NO_RX_HDR - Don't add the RX stats header to packets
5202 * received on this channel.
5203 */
5204#define OCB_CHANNEL_FLAG_DISABLE_RX_STATS_HDR (1 << 0)
5205
5206/**
5207 * struct sir_ocb_config_sched
5208 * @chan_freq: frequency of the channel
5209 * @total_duration: duration of the schedule
5210 * @guard_interval: guard interval on the start of the schedule
5211 */
5212struct sir_ocb_config_sched {
5213 uint32_t chan_freq;
5214 uint32_t total_duration;
5215 uint32_t guard_interval;
5216};
5217
5218/**
5219 * struct sir_ocb_config
5220 * @session_id: session id
5221 * @channel_count: number of channels
5222 * @schedule_size: size of the channel schedule
5223 * @flags: reserved
5224 * @channels: array of OCB channels
5225 * @schedule: array of OCB schedule elements
5226 * @dcc_ndl_chan_list_len: size of the ndl_chan array
5227 * @dcc_ndl_chan_list: array of dcc channel info
5228 * @dcc_ndl_active_state_list_len: size of the active state array
5229 * @dcc_ndl_active_state_list: array of active states
5230 * @adapter: the OCB adapter
5231 * @dcc_stats_callback: callback for the response event
5232 */
5233struct sir_ocb_config {
5234 uint8_t session_id;
5235 uint32_t channel_count;
5236 uint32_t schedule_size;
5237 uint32_t flags;
5238 struct sir_ocb_config_channel *channels;
5239 struct sir_ocb_config_sched *schedule;
5240 uint32_t dcc_ndl_chan_list_len;
5241 void *dcc_ndl_chan_list;
5242 uint32_t dcc_ndl_active_state_list_len;
5243 void *dcc_ndl_active_state_list;
5244};
5245
5246/* The size of the utc time in bytes. */
5247#define SIZE_UTC_TIME (10)
5248/* The size of the utc time error in bytes. */
5249#define SIZE_UTC_TIME_ERROR (5)
5250
5251/**
5252 * struct sir_ocb_utc
5253 * @vdev_id: session id
5254 * @utc_time: number of nanoseconds from Jan 1st 1958
5255 * @time_error: the error in the UTC time. All 1's for unknown
5256 */
5257struct sir_ocb_utc {
5258 uint32_t vdev_id;
5259 uint8_t utc_time[SIZE_UTC_TIME];
5260 uint8_t time_error[SIZE_UTC_TIME_ERROR];
5261};
5262
5263/**
5264 * struct sir_ocb_timing_advert
5265 * @vdev_id: session id
5266 * @chan_freq: frequency on which to advertise
5267 * @repeat_rate: the number of times it will send TA in 5 seconds
5268 * @timestamp_offset: offset of the timestamp field in the TA frame
5269 * @time_value_offset: offset of the time_value field in the TA frame
5270 * @template_length: size in bytes of the TA frame
5271 * @template_value: the TA frame
5272 */
5273struct sir_ocb_timing_advert {
5274 uint32_t vdev_id;
5275 uint32_t chan_freq;
5276 uint32_t repeat_rate;
5277 uint32_t timestamp_offset;
5278 uint32_t time_value_offset;
5279 uint32_t template_length;
5280 uint8_t *template_value;
5281};
5282
5283/**
5284 * struct sir_ocb_get_tsf_timer_response
5285 * @vdev_id: session id
5286 * @timer_high: higher 32-bits of the timer
5287 * @timer_low: lower 32-bits of the timer
5288 */
5289struct sir_ocb_get_tsf_timer_response {
5290 uint32_t vdev_id;
5291 uint32_t timer_high;
5292 uint32_t timer_low;
5293};
5294
5295/**
5296 * struct sir_ocb_get_tsf_timer
5297 * @vdev_id: session id
5298 */
5299struct sir_ocb_get_tsf_timer {
5300 uint32_t vdev_id;
5301};
5302
5303/**
5304 * struct sir_dcc_get_stats_response
5305 * @vdev_id: session id
5306 * @num_channels: number of dcc channels
5307 * @channel_stats_array_len: size in bytes of the stats array
5308 * @channel_stats_array: the stats array
5309 */
5310struct sir_dcc_get_stats_response {
5311 uint32_t vdev_id;
5312 uint32_t num_channels;
5313 uint32_t channel_stats_array_len;
5314 void *channel_stats_array;
5315};
5316
5317/**
5318 * struct sir_dcc_get_stats
5319 * @vdev_id: session id
5320 * @channel_count: number of dcc channels
5321 * @request_array_len: size in bytes of the request array
5322 * @request_array: the request array
5323 */
5324struct sir_dcc_get_stats {
5325 uint32_t vdev_id;
5326 uint32_t channel_count;
5327 uint32_t request_array_len;
5328 void *request_array;
5329};
5330
5331/**
5332 * struct sir_dcc_clear_stats
5333 * @vdev_id: session id
5334 * @dcc_stats_bitmap: bitmap of clear option
5335 */
5336struct sir_dcc_clear_stats {
5337 uint32_t vdev_id;
5338 uint32_t dcc_stats_bitmap;
5339};
5340
5341/**
5342 * struct sir_dcc_update_ndl_response
5343 * @vdev_id: session id
5344 * @status: response status
5345 */
5346struct sir_dcc_update_ndl_response {
5347 uint32_t vdev_id;
5348 uint32_t status;
5349};
5350
5351/**
5352 * struct sir_dcc_update_ndl
5353 * @vdev_id: session id
5354 * @channel_count: number of channels to be updated
5355 * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
5356 * @dcc_ndl_chan_list: the ndl_chan array
5357 * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
5358 * @dcc_ndl_active_state_list: the active state array
5359 */
5360struct sir_dcc_update_ndl {
5361 uint32_t vdev_id;
5362 uint32_t channel_count;
5363 uint32_t dcc_ndl_chan_list_len;
5364 void *dcc_ndl_chan_list;
5365 uint32_t dcc_ndl_active_state_list_len;
5366 void *dcc_ndl_active_state_list;
5367};
5368
5369/**
5370 * enum powersave_qpower_mode: QPOWER modes
5371 * @QPOWER_DISABLED: Qpower is disabled
5372 * @QPOWER_ENABLED: Qpower is enabled
5373 * @QPOWER_DUTY_CYCLING: Qpower is enabled with duty cycling
5374 */
5375enum powersave_qpower_mode {
5376 QPOWER_DISABLED = 0,
5377 QPOWER_ENABLED = 1,
5378 QPOWER_DUTY_CYCLING = 2
5379};
5380
5381/**
5382 * enum powersave_qpower_mode: powersave_mode
5383 * @PS_NOT_SUPPORTED: Power save is not supported
5384 * @PS_LEGACY_NODEEPSLEEP: Legacy power save enabled and deep sleep disabled
5385 * @PS_QPOWER_NODEEPSLEEP: QPOWER enabled and deep sleep disabled
5386 * @PS_LEGACY_DEEPSLEEP: Legacy power save enabled and deep sleep enabled
5387 * @PS_QPOWER_DEEPSLEEP: QPOWER enabled and deep sleep enabled
5388 * @PS_DUTY_CYCLING_QPOWER: QPOWER enabled in duty cycling mode
5389 */
5390enum powersave_mode {
5391 PS_NOT_SUPPORTED = 0,
5392 PS_LEGACY_NODEEPSLEEP = 1,
5393 PS_QPOWER_NODEEPSLEEP = 2,
5394 PS_LEGACY_DEEPSLEEP = 3,
5395 PS_QPOWER_DEEPSLEEP = 4,
5396 PS_DUTY_CYCLING_QPOWER = 5
5397};
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08005398#ifdef FEATURE_LFR_SUBNET_DETECTION
5399/**
5400 * struct gateway_param_update_req - gateway parameter update request
5401 * @request_id: request id
5402 * @session_id: session id
5403 * @max_retries: Max ARP/NS retry attempts
5404 * @timeout: Retry interval
5405 * @ipv4_addr_type: on ipv4 network
5406 * @ipv6_addr_type: on ipv6 network
5407 * @gw_mac_addr: gateway mac addr
5408 * @ipv4_addr: ipv4 addr
5409 * @ipv6_addr: ipv6 addr
5410 */
5411struct gateway_param_update_req {
5412 uint32_t request_id;
5413 uint32_t session_id;
5414 uint32_t max_retries;
5415 uint32_t timeout;
5416 uint32_t ipv4_addr_type;
5417 uint32_t ipv6_addr_type;
5418 struct cdf_mac_addr gw_mac_addr;
5419 uint8_t ipv4_addr[CDF_IPV4_ADDR_SIZE];
5420 uint8_t ipv6_addr[CDF_IPV6_ADDR_SIZE];
5421};
5422#else
5423struct gateway_param_update_req;
5424#endif /* FEATURE_LFR_SUBNET_DETECTION */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005425
Abhishek Singh518323d2015-10-19 17:42:01 +05305426/**
5427 * struct sir_sme_ext_change_chan_req - channel change request
5428 * @message_type: message id
5429 * @length: msg length
5430 * @new_channel: new channel
5431 * @session_id: session id
5432 */
5433struct sir_sme_ext_cng_chan_req {
5434 uint16_t message_type; /* eWNI_SME_EXT_CHANGE_CHANNEL */
5435 uint16_t length;
5436 uint32_t new_channel;
5437 uint8_t session_id;
5438};
5439
5440/**
5441 * struct sir_sme_ext_change_chan_ind.
5442 * @session_id: session id
5443 * @new_channel: new channel to change
5444 */
5445struct sir_sme_ext_cng_chan_ind {
5446 uint8_t session_id;
5447 uint8_t new_channel;
5448};
5449
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005450#endif /* __SIR_API_H */