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