blob: 40242313f10eb6ba0354d71d45817448fd425ef2 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Prashanth Bhatta9e143052015-12-04 11:56:47 -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#if !defined(WLAN_HDD_MAIN_H)
29#define WLAN_HDD_MAIN_H
30/**===========================================================================
31
32 \file WLAN_HDD_MAIN_H.h
33
34 \brief Linux HDD Adapter Type
35
36 ==========================================================================*/
37
38/*---------------------------------------------------------------------------
39 Include files
40 -------------------------------------------------------------------------*/
41
42#include <linux/netdevice.h>
43#include <linux/skbuff.h>
44#include <net/cfg80211.h>
Anurag Chouhanffb21542016-02-17 14:33:03 +053045#include <qdf_list.h>
Anurag Chouhan6d760662016-02-20 16:05:43 +053046#include <qdf_types.h>
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080047#include "sir_mac_prot_def.h"
48#include "csr_api.h"
49#include <wlan_hdd_assoc.h>
50#include <wlan_hdd_wmm.h>
51#include <wlan_hdd_cfg.h>
52#include <linux/spinlock.h>
53#if defined(WLAN_OPEN_SOURCE) && defined(CONFIG_HAS_WAKELOCK)
54#include <linux/wakelock.h>
55#endif
56#include <wlan_hdd_ftm.h>
57#ifdef FEATURE_WLAN_TDLS
58#include "wlan_hdd_tdls.h"
59#endif
Manikandan Mohandcc21ba2016-03-15 14:31:56 -070060#include "wlan_hdd_tsf.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080061#include "wlan_hdd_cfg80211.h"
Anurag Chouhan42958bb2016-02-19 15:43:11 +053062#include <qdf_defer.h>
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080063#ifdef WLAN_FEATURE_MBSSID
64#include "sap_api.h"
65#endif
66#include "ol_txrx_osif_api.h"
67#include "ol_txrx_ctrl_api.h"
68#include <wlan_hdd_lro.h>
Dhanashri Atreb08959a2016-03-01 17:28:03 -080069#include "cdp_txrx_flow_ctrl_legacy.h"
Manjunathappa Prakash3454fd62016-04-01 08:52:06 -070070#include <cdp_txrx_peer_ops.h>
Deepak Dhamdhere5cdce842016-05-31 10:39:12 -070071#include "wlan_hdd_nan_datapath.h"
Deepak Dhamdhere5cdce842016-05-31 10:39:12 -070072
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080073/*---------------------------------------------------------------------------
74 Preprocessor definitions and constants
75 -------------------------------------------------------------------------*/
76/** Number of Tx Queues */
77#ifdef QCA_LL_TX_FLOW_CONTROL_V2
78#define NUM_TX_QUEUES 5
79#else
80#define NUM_TX_QUEUES 4
81#endif
Mohit Khannaee9e80f2015-11-10 11:32:49 -080082
83/** Length of the TX queue for the netdev */
84#define HDD_NETDEV_TX_QUEUE_LEN (3000)
85
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080086/** Hdd Tx Time out value */
87#ifdef LIBRA_LINUX_PC
88#define HDD_TX_TIMEOUT (8000)
89#else
90#define HDD_TX_TIMEOUT msecs_to_jiffies(5000)
91#endif
92/** Hdd Default MTU */
93#define HDD_DEFAULT_MTU (1500)
94
95#ifdef QCA_CONFIG_SMP
96#define NUM_CPUS NR_CPUS
97#else
98#define NUM_CPUS 1
99#endif
100
101/**event flags registered net device*/
102#define NET_DEVICE_REGISTERED (0)
103#define SME_SESSION_OPENED (1)
104#define INIT_TX_RX_SUCCESS (2)
105#define WMM_INIT_DONE (3)
106#define SOFTAP_BSS_STARTED (4)
107#define DEVICE_IFACE_OPENED (5)
108#define TDLS_INIT_DONE (6)
109#define ACS_PENDING (7)
110
111/* HDD global event flags */
112#define ACS_IN_PROGRESS (0)
113
114/** Maximum time(ms)to wait for disconnect to complete **/
115#ifdef QCA_WIFI_3_0_EMU
116#define WLAN_WAIT_TIME_DISCONNECT 3000
117#else
118#define WLAN_WAIT_TIME_DISCONNECT 2000
119#endif
120#define WLAN_WAIT_TIME_STATS 800
121#define WLAN_WAIT_TIME_POWER 800
122#define WLAN_WAIT_TIME_COUNTRY 1000
123#define WLAN_WAIT_TIME_LINK_STATUS 800
124/* Amount of time to wait for sme close session callback.
125 This value should be larger than the timeout used by WDI to wait for
126 a response from WCNSS */
127#define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000
128#define WLAN_WAIT_TIME_ABORTSCAN 2000
129
130/** Maximum time(ms) to wait for mc thread suspend **/
131#define WLAN_WAIT_TIME_MCTHREAD_SUSPEND 1200
132
133/** Maximum time(ms) to wait for target to be ready for suspend **/
134#define WLAN_WAIT_TIME_READY_TO_SUSPEND 2000
135
136/** Maximum time(ms) to wait for tdls add sta to complete **/
137#define WAIT_TIME_TDLS_ADD_STA 1500
138
139/** Maximum time(ms) to wait for tdls del sta to complete **/
140#define WAIT_TIME_TDLS_DEL_STA 1500
141
142/** Maximum time(ms) to wait for Link Establish Req to complete **/
143#define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500
144
145/** Maximum time(ms) to wait for tdls mgmt to complete **/
146#define WAIT_TIME_TDLS_MGMT 11000
147
148/* Scan Req Timeout */
149#define WLAN_WAIT_TIME_SCAN_REQ 100
150
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -0800151#define WLAN_WAIT_TIME_ANTENNA_MODE_REQ 3000
152#define WLAN_WAIT_TIME_SET_DUAL_MAC_CFG 1500
153
Arun Khandavalli2476ef52016-04-26 20:19:43 +0530154#define WLAN_WAIT_TIME_BPF 1000
155
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800156#define MAX_NUMBER_OF_ADAPTERS 4
157
158#define MAX_CFG_STRING_LEN 255
159
160#define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
161/** Mac Address string **/
162#define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x"
163#define MAC_ADDRESS_STR_LEN 18 /* Including null terminator */
164#define MAX_GENIE_LEN 255
165
166#define WLAN_CHIP_VERSION "WCNSS"
167
Jeff Johnson32ad1742015-12-09 13:26:44 -0800168#ifndef HDD_DISALLOW_LEGACY_HDDLOG
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530169#define hddLog(level, args ...) QDF_TRACE(QDF_MODULE_ID_HDD, level, ## args)
Jeff Johnson32ad1742015-12-09 13:26:44 -0800170#endif
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530171#define hdd_log(level, args...) QDF_TRACE(QDF_MODULE_ID_HDD, level, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800172#define hdd_logfl(level, format, args...) hdd_log(level, FL(format), ## args)
173
174#define hdd_alert(format, args...) \
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530175 hdd_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800176#define hdd_err(format, args...) \
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530177 hdd_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800178#define hdd_warn(format, args...) \
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530179 hdd_logfl(QDF_TRACE_LEVEL_WARN, format, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800180#define hdd_notice(format, args...) \
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530181 hdd_logfl(QDF_TRACE_LEVEL_INFO, format, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800182#define hdd_info(format, args...) \
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530183 hdd_logfl(QDF_TRACE_LEVEL_INFO_HIGH, format, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800184#define hdd_debug(format, args...) \
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530185 hdd_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800186
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530187#define ENTER() hdd_logfl(QDF_TRACE_LEVEL_INFO_LOW, "enter")
Jeff Johnson398b3d62016-02-10 17:19:39 -0800188#define ENTER_DEV(dev) \
189 hdd_logfl(QDF_TRACE_LEVEL_INFO_LOW, "enter(%s)", (dev)->name)
Anurag Chouhanb2dc16f2016-02-25 11:47:37 +0530190#define EXIT() hdd_logfl(QDF_TRACE_LEVEL_INFO_LOW, "exit")
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800191
192#define WLAN_HDD_GET_PRIV_PTR(__dev__) (hdd_adapter_t *)(netdev_priv((__dev__)))
193
194#define MAX_NO_OF_2_4_CHANNELS 14
195
196#define WLAN_HDD_PUBLIC_ACTION_FRAME 4
197#define WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET 24
198#define WLAN_HDD_PUBLIC_ACTION_FRAME_BODY_OFFSET 24
199#define WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET 30
200#define WLAN_HDD_PUBLIC_ACTION_FRAME_CATEGORY_OFFSET 0
201#define WLAN_HDD_PUBLIC_ACTION_FRAME_ACTION_OFFSET 1
202#define WLAN_HDD_PUBLIC_ACTION_FRAME_OUI_OFFSET 2
203#define WLAN_HDD_PUBLIC_ACTION_FRAME_OUI_TYPE_OFFSET 5
204#define WLAN_HDD_VENDOR_SPECIFIC_ACTION 0x09
205#define WLAN_HDD_WFA_OUI 0x506F9A
206#define WLAN_HDD_WFA_P2P_OUI_TYPE 0x09
207#define WLAN_HDD_P2P_SOCIAL_CHANNELS 3
208#define WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN 1
209#define WLAN_HDD_PUBLIC_ACTION_FRAME_SUB_TYPE_OFFSET 6
210
211#define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \
212 (((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462))
213
214#define WLAN_HDD_CHANNEL_IN_UNII_1_BAND(center_freq) \
215 (((center_freq) == 5180) || ((center_freq) == 5200) \
216 || ((center_freq) == 5220) || ((center_freq) == 5240))
217
218#ifdef WLAN_FEATURE_11W
219#define WLAN_HDD_SA_QUERY_ACTION_FRAME 8
220#endif
221
222#define WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP 14
223#define WLAN_HDD_TDLS_ACTION_FRAME 12
224#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
225#define HDD_WAKE_LOCK_DURATION 50 /* in msecs */
226#endif
227
228#define WLAN_HDD_QOS_ACTION_FRAME 1
229#define WLAN_HDD_QOS_MAP_CONFIGURE 4
230#define HDD_SAP_WAKE_LOCK_DURATION 10000 /* in msecs */
231
232#define HDD_MOD_EXIT_SSR_MAX_RETRIES 75
233
234#ifdef WLAN_FEATURE_GTK_OFFLOAD
235#define GTK_OFFLOAD_ENABLE 0
236#define GTK_OFFLOAD_DISABLE 1
237#endif
238
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800239#define MAX_USER_COMMAND_SIZE 4096
240
241#define HDD_MIN_TX_POWER (-100) /* minimum tx power */
242#define HDD_MAX_TX_POWER (+100) /* maximum tx power */
243
244/* If IPA UC data path is enabled, target should reserve extra tx descriptors
245 * for IPA data path.
246 * Then host data path should allow less TX packet pumping in case
247 * IPA data path enabled
248 */
249#define WLAN_TFC_IPAUC_TX_DESC_RESERVE 100
250
Ryan Hsu07495ea2016-01-21 15:25:39 -0800251/*
252 * NET_NAME_UNKNOWN is only introduced after Kernel 3.17, to have a macro
253 * here if the Kernel version is less than 3.17 to avoid the interleave
254 * conditional compilation.
255 */
256#if !((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || defined(WITH_BACKPORTS))
257#define NET_NAME_UNKNOWN 0
258#endif
259
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800260#define BSS_WAIT_TIMEOUT 10000
261
Manishekar Chandrasekaran9e8c7be2016-08-03 14:57:14 +0530262#define PRE_CAC_SSID "pre_cac_ssid"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800263/*
264 * Generic asynchronous request/response support
265 *
266 * Many of the APIs supported by HDD require a call to SME to
267 * perform an action or to retrieve some data. In most cases SME
268 * performs the operation asynchronously, and will execute a provided
269 * callback function when the request has completed. In order to
270 * synchronize this the HDD API allocates a context which is then
271 * passed to SME, and which is then, in turn, passed back to the
272 * callback function when the operation completes. The callback
273 * function then sets a completion variable inside the context which
274 * the HDD API is waiting on. In an ideal world the HDD API would
275 * wait forever (or at least for a long time) for the response to be
276 * received and for the completion variable to be set. However in
277 * most cases these HDD APIs are being invoked in the context of a
278 * user space thread which has invoked either a cfg80211 API or a
279 * wireless extensions ioctl and which has taken the kernel rtnl_lock.
280 * Since this lock is used to synchronize many of the kernel tasks, we
281 * do not want to hold it for a long time. In addition we do not want
282 * to block user space threads (such as the wpa supplicant's main
283 * thread) for an extended time. Therefore we only block for a short
284 * time waiting for the response before we timeout. This means that
285 * it is possible for the HDD API to timeout, and for the callback to
286 * be invoked afterwards. In order for the callback function to
287 * determine if the HDD API is still waiting, a magic value is also
288 * stored in the shared context. Only if the context has a valid
289 * magic will the callback routine do any work. In order to further
290 * synchronize these activities a spinlock is used so that if any HDD
291 * API timeout coincides with its callback, the operations of the two
292 * threads will be serialized.
293 */
294
295struct statsContext {
296 struct completion completion;
297 hdd_adapter_t *pAdapter;
298 unsigned int magic;
299};
300
301struct linkspeedContext {
302 struct completion completion;
303 hdd_adapter_t *pAdapter;
304 unsigned int magic;
305};
306
307extern spinlock_t hdd_context_lock;
308
309#define STATS_CONTEXT_MAGIC 0x53544154 /* STAT */
310#define RSSI_CONTEXT_MAGIC 0x52535349 /* RSSI */
311#define POWER_CONTEXT_MAGIC 0x504F5752 /* POWR */
312#define SNR_CONTEXT_MAGIC 0x534E5200 /* SNR */
313#define LINK_CONTEXT_MAGIC 0x4C494E4B /* LINKSPEED */
314#define LINK_STATUS_MAGIC 0x4C4B5354 /* LINKSTATUS(LNST) */
315#define TEMP_CONTEXT_MAGIC 0x74656d70 /* TEMP (temperature) */
Arun Khandavalli2476ef52016-04-26 20:19:43 +0530316#define BPF_CONTEXT_MAGIC 0x4575354 /* BPF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800317
318/* MAX OS Q block time value in msec
319 * Prevent from permanent stall, resume OS Q if timer expired */
320#define WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME 1000
321#define WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME 100
322#define WLAN_HDD_TX_FLOW_CONTROL_MAX_24BAND_CH 14
323
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800324#define NUM_TX_RX_HISTOGRAM 1024
325#define NUM_TX_RX_HISTOGRAM_MASK (NUM_TX_RX_HISTOGRAM - 1)
326
Mohit Khannae71e2262015-11-10 09:37:24 -0800327/**
328 * struct hdd_tx_rx_histogram - structure to keep track of tx and rx packets
329 * received over 100ms intervals
330 * @interval_rx: # of rx packets received in the last 100ms interval
331 * @interval_tx: # of tx packets received in the last 100ms interval
332 * @total_rx: # of total rx packets received on interface
333 * @total_tx: # of total tx packets received on interface
Yuanyuan Liu13738502016-04-06 17:41:37 -0700334 * @next_vote_level: pld_bus_width_type voting level (high or low)
Mohit Khannae71e2262015-11-10 09:37:24 -0800335 * determined on the basis of total tx and rx packets
336 * received in the last 100ms interval
Yuanyuan Liu13738502016-04-06 17:41:37 -0700337 * @next_rx_level: pld_bus_width_type voting level (high or low)
Mohit Khannae71e2262015-11-10 09:37:24 -0800338 * determined on the basis of rx packets received in the
339 * last 100ms interval
Yuanyuan Liu13738502016-04-06 17:41:37 -0700340 * @next_tx_level: pld_bus_width_type voting level (high or low)
Mohit Khannae71e2262015-11-10 09:37:24 -0800341 * determined on the basis of tx packets received in the
342 * last 100ms interval
343 *
344 * The structure keeps track of throughput requirements of wlan driver in 100ms
345 * intervals for later analysis.
346 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800347struct hdd_tx_rx_histogram {
348 uint64_t interval_rx;
349 uint64_t interval_tx;
350 uint64_t total_rx;
351 uint64_t total_tx;
352 uint32_t next_vote_level;
353 uint32_t next_rx_level;
Mohit Khannae71e2262015-11-10 09:37:24 -0800354 uint32_t next_tx_level;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800355};
356
357typedef struct hdd_tx_rx_stats_s {
358 /* start_xmit stats */
359 __u32 txXmitCalled;
360 __u32 txXmitDropped;
361 __u32 txXmitClassifiedAC[NUM_TX_QUEUES];
362 __u32 txXmitDroppedAC[NUM_TX_QUEUES];
363 /* complete_cbk_stats */
364 __u32 txCompleted;
365 /* rx stats */
366 __u32 rxPackets[NUM_CPUS];
367 __u32 rxDropped[NUM_CPUS];
368 __u32 rxDelivered[NUM_CPUS];
369 __u32 rxRefused[NUM_CPUS];
370
371 /* txflow stats */
372 bool is_txflow_paused;
373 __u32 txflow_pause_cnt;
374 __u32 txflow_unpause_cnt;
375 __u32 txflow_timer_cnt;
376} hdd_tx_rx_stats_t;
377
378#ifdef WLAN_FEATURE_11W
379typedef struct hdd_pmf_stats_s {
380 uint8_t numUnprotDeauthRx;
381 uint8_t numUnprotDisassocRx;
382} hdd_pmf_stats_t;
383#endif
384
385typedef struct hdd_stats_s {
386 tCsrSummaryStatsInfo summary_stat;
387 tCsrGlobalClassAStatsInfo ClassA_stat;
388 tCsrGlobalClassBStatsInfo ClassB_stat;
389 tCsrGlobalClassCStatsInfo ClassC_stat;
390 tCsrGlobalClassDStatsInfo ClassD_stat;
391 tCsrPerStaStatsInfo perStaStats;
392 hdd_tx_rx_stats_t hddTxRxStats;
393#ifdef WLAN_FEATURE_11W
394 hdd_pmf_stats_t hddPmfStats;
395#endif
396} hdd_stats_t;
397
398typedef enum {
399 HDD_ROAM_STATE_NONE,
400
401 /* Issuing a disconnect due to transition into low power states. */
402 HDD_ROAM_STATE_DISCONNECTING_POWER,
403
404 /* move to this state when HDD sets a key with SME/CSR. Note this is */
405 /* an important state to get right because we will get calls into our SME */
406 /* callback routine for SetKey activity that we did not initiate! */
407 HDD_ROAM_STATE_SETTING_KEY,
408} HDD_ROAM_STATE;
409
410typedef struct roaming_info_s {
411 HDD_ROAM_STATE roamingState;
Anurag Chouhance0dc992016-02-16 18:18:03 +0530412 qdf_event_t roamingEvent;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800413
414 tSirMacAddr bssid;
415 tSirMacAddr peerMac;
416 uint32_t roamId;
417 eRoamCmdStatus roamStatus;
418 bool deferKeyComplete;
419
420} roaming_info_t;
421
422#ifdef FEATURE_WLAN_WAPI
423/* Define WAPI macros for Length, BKID count etc*/
424#define MAX_WPI_KEY_LENGTH 16
425#define MAX_NUM_PN 16
426#define MAC_ADDR_LEN 6
427#define MAX_ADDR_INDEX 12
428#define MAX_NUM_AKM_SUITES 16
429#define MAX_NUM_UNI_SUITES 16
430#define MAX_NUM_BKIDS 16
431
432/** WAPI AUTH mode definition */
433enum _WAPIAuthMode {
434 WAPI_AUTH_MODE_OPEN = 0,
435 WAPI_AUTH_MODE_PSK = 1,
436 WAPI_AUTH_MODE_CERT
437} __packed;
438typedef enum _WAPIAuthMode WAPIAuthMode;
439
440/** WAPI Work mode structure definition */
441#define WZC_ORIGINAL 0
442#define WAPI_EXTENTION 1
443
444struct _WAPI_FUNCTION_MODE {
445 unsigned char wapiMode;
446} __packed;
447
448typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE;
449
450typedef struct _WAPI_BKID {
451 uint8_t bkid[16];
452} WAPI_BKID, *pWAPI_BKID;
453
454/** WAPI Association information structure definition */
455struct _WAPI_AssocInfo {
456 uint8_t elementID;
457 uint8_t length;
458 uint16_t version;
459 uint16_t akmSuiteCount;
460 uint32_t akmSuite[MAX_NUM_AKM_SUITES];
461 uint16_t unicastSuiteCount;
462 uint32_t unicastSuite[MAX_NUM_UNI_SUITES];
463 uint32_t multicastSuite;
464 uint16_t wapiCability;
465 uint16_t bkidCount;
466 WAPI_BKID bkidList[MAX_NUM_BKIDS];
467} __packed;
468
469typedef struct _WAPI_AssocInfo WAPI_AssocInfo;
470typedef struct _WAPI_AssocInfo *pWAPI_IEAssocInfo;
471
472/** WAPI KEY Type definition */
473enum _WAPIKeyType {
474 PAIRWISE_KEY, /* 0 */
475 GROUP_KEY /* 1 */
476} __packed;
477typedef enum _WAPIKeyType WAPIKeyType;
478
479/** WAPI KEY Direction definition */
480enum _KEY_DIRECTION {
481 None,
482 Rx,
483 Tx,
484 Rx_Tx
485} __packed;
486
487typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION;
488
489/* WAPI KEY structure definition */
490struct WLAN_WAPI_KEY {
491 WAPIKeyType keyType;
492 WAPI_KEY_DIRECTION keyDirection; /*reserved for future use */
493 uint8_t keyId;
494 uint8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use */
495 int wpiekLen;
496 uint8_t wpiek[MAX_WPI_KEY_LENGTH];
497 int wpickLen;
498 uint8_t wpick[MAX_WPI_KEY_LENGTH];
499 uint8_t pn[MAX_NUM_PN]; /*reserved for future use */
500} __packed;
501
502typedef struct WLAN_WAPI_KEY WLAN_WAPI_KEY;
503typedef struct WLAN_WAPI_KEY *pWLAN_WAPI_KEY;
504
505#define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
506#define WPA_GET_BE24(a) ((u32) ((a[0] << 16) | (a[1] << 8) | a[2]))
507#define WLAN_EID_WAPI 68
508#define WAPI_PSK_AKM_SUITE 0x02721400
509#define WAPI_CERT_AKM_SUITE 0x01721400
510
511/* WAPI BKID List structure definition */
512struct _WLAN_BKID_LIST {
513 uint32_t length;
514 uint32_t BKIDCount;
515 WAPI_BKID BKID[1];
516} __packed;
517
518typedef struct _WLAN_BKID_LIST WLAN_BKID_LIST;
519typedef struct _WLAN_BKID_LIST *pWLAN_BKID_LIST;
520
521/* WAPI Information structure definition */
522struct hdd_wapi_info_s {
523 uint32_t nWapiMode;
524 bool fIsWapiSta;
Anurag Chouhan6d760662016-02-20 16:05:43 +0530525 struct qdf_mac_addr cachedMacAddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800526 uint8_t wapiAuthMode;
527} __packed;
528typedef struct hdd_wapi_info_s hdd_wapi_info_t;
529#endif /* FEATURE_WLAN_WAPI */
530
531typedef struct beacon_data_s {
532 u8 *head;
533 u8 *tail;
534 u8 *proberesp_ies;
535 u8 *assocresp_ies;
536 int head_len;
537 int tail_len;
538 int proberesp_ies_len;
539 int assocresp_ies_len;
540 int dtim_period;
541} beacon_data_t;
542
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800543typedef enum rem_on_channel_request_type {
544 REMAIN_ON_CHANNEL_REQUEST,
545 OFF_CHANNEL_ACTION_TX,
546} rem_on_channel_request_type_t;
547
548typedef struct action_pkt_buffer {
549 uint8_t *frame_ptr;
550 uint32_t frame_length;
551 uint16_t freq;
552} action_pkt_buffer_t;
553
554typedef struct hdd_remain_on_chan_ctx {
555 struct net_device *dev;
556 struct ieee80211_channel chan;
557 enum nl80211_channel_type chan_type;
558 unsigned int duration;
559 u64 cookie;
560 rem_on_channel_request_type_t rem_on_chan_request;
Anurag Chouhan210db072016-02-22 18:42:15 +0530561 qdf_mc_timer_t hdd_remain_on_chan_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800562 action_pkt_buffer_t action_pkt_buff;
563 bool hdd_remain_on_chan_cancel_in_progress;
564 uint32_t scan_id;
565} hdd_remain_on_chan_ctx_t;
566
567/* RoC Request entry */
568typedef struct hdd_roc_req {
Anurag Chouhanffb21542016-02-17 14:33:03 +0530569 qdf_list_node_t node; /* MUST be first element */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800570 hdd_adapter_t *pAdapter;
571 hdd_remain_on_chan_ctx_t *pRemainChanCtx;
572} hdd_roc_req_t;
573
574/**
575 * struct hdd_scan_req - Scan Request entry
576 * @node : List entry element
577 * @adapter: Adapter address
578 * @scan_request: scan request holder
579 * @scan_id: scan identifier used across host layers which is generated at WMI
580 * @cookie: scan request identifier sent to userspace
581 * @source: scan request originator (NL/Vendor scan)
582 * @timestamp: scan request timestamp
583 *
584 * Scan request linked list element
585 */
586struct hdd_scan_req {
Anurag Chouhanffb21542016-02-17 14:33:03 +0530587 qdf_list_node_t node;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800588 hdd_adapter_t *adapter;
589 struct cfg80211_scan_request *scan_request;
590 uint32_t scan_id;
591 uint8_t source;
592 uint32_t timestamp;
593};
594
595typedef enum {
596 HDD_IDLE,
597 HDD_PD_REQ_ACK_PENDING,
598 HDD_GO_NEG_REQ_ACK_PENDING,
599 HDD_INVALID_STATE,
600} eP2PActionFrameState;
601
602typedef enum {
603 WLAN_HDD_GO_NEG_REQ,
604 WLAN_HDD_GO_NEG_RESP,
605 WLAN_HDD_GO_NEG_CNF,
606 WLAN_HDD_INVITATION_REQ,
607 WLAN_HDD_INVITATION_RESP,
608 WLAN_HDD_DEV_DIS_REQ,
609 WLAN_HDD_DEV_DIS_RESP,
610 WLAN_HDD_PROV_DIS_REQ,
611 WLAN_HDD_PROV_DIS_RESP,
612} tActionFrmType;
613
614typedef struct hdd_cfg80211_state_s {
615 uint16_t current_freq;
616 u64 action_cookie;
617 uint8_t *buf;
618 size_t len;
619 hdd_remain_on_chan_ctx_t *remain_on_chan_ctx;
620 struct mutex remain_on_chan_ctx_lock;
621 eP2PActionFrameState actionFrmState;
622} hdd_cfg80211_state_t;
623
Manjunathappa Prakash59f861d2016-04-21 10:33:31 -0700624/**
625 * struct hdd_mon_set_ch_info - Holds monitor mode channel switch params
626 * @channel: Channel number.
627 * @cb_mode: Channel bonding
628 * @channel_width: Channel width 0/1/2 for 20/40/80MHz respectively.
629 * @phy_mode: PHY mode
630 */
631struct hdd_mon_set_ch_info {
632 uint8_t channel;
633 uint8_t cb_mode;
634 uint32_t channel_width;
635 eCsrPhyMode phy_mode;
636};
637
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800638struct hdd_station_ctx {
639 /** Handle to the Wireless Extension State */
640 hdd_wext_state_t WextState;
641
642#ifdef FEATURE_WLAN_TDLS
643 tdlsCtx_t *pHddTdlsCtx;
644#endif
645
646 /**Connection information*/
647 connection_info_t conn_info;
648
649 roaming_info_t roam_info;
650
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800651 int ft_carrier_on;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800652
653#ifdef WLAN_FEATURE_GTK_OFFLOAD
654 tSirGtkOffloadParams gtkOffloadReqParams;
655#endif
656 /*Increment whenever ibss New peer joins and departs the network */
657 int ibss_sta_generation;
658
659 /* Indication of wep/wpa-none keys installation */
660 bool ibss_enc_key_installed;
661
662 /*Save the wep/wpa-none keys */
663 tCsrRoamSetKey ibss_enc_key;
Rajeev Kumar94c9b452016-03-24 12:58:47 -0700664 tSirPeerInfoRspParams ibss_peer_info;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800665
666 bool hdd_ReassocScenario;
667
668 /* STA ctx debug variables */
669 int staDebugState;
Chandrasekaran, Manishekar34e325a2015-12-18 12:07:22 +0530670
671 uint8_t broadcast_ibss_staid;
Manjunathappa Prakash59f861d2016-04-21 10:33:31 -0700672
673 struct hdd_mon_set_ch_info ch_info;
Deepak Dhamdhere8360d4c2016-06-01 13:24:31 -0700674#ifdef WLAN_FEATURE_NAN_DATAPATH
675 struct nan_datapath_ctx ndp_ctx;
676#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800677};
678
679#define BSS_STOP 0
680#define BSS_START 1
681typedef struct hdd_hostapd_state_s {
682 int bssState;
Anurag Chouhanf04e84f2016-03-03 10:12:12 +0530683 qdf_event_t qdf_event;
684 qdf_event_t qdf_stop_bss_event;
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530685 QDF_STATUS qdf_status;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800686 bool bCommit;
687
688} hdd_hostapd_state_t;
689
690/*
691 * Per station structure kept in HDD for multiple station support for SoftAP
692 */
693typedef struct {
694 /** The station entry is used or not */
695 bool isUsed;
696
697 /** Station ID reported back from HAL (through SAP). Broadcast
698 * uses station ID zero by default in both libra and volans. */
699 uint8_t ucSTAId;
700
701 /** MAC address of the station */
Anurag Chouhan6d760662016-02-20 16:05:43 +0530702 struct qdf_mac_addr macAddrSTA;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800703
704 /** Current Station state so HDD knows how to deal with packet
705 * queue. Most recent states used to change TLSHIM STA state */
706 enum ol_txrx_peer_state tlSTAState;
707
708 /** Track QoS status of station */
709 bool isQosEnabled;
710
711 /** The station entry for which Deauth is in progress */
712 bool isDeauthInProgress;
Kanchanapally, Vidyullathae3062812015-05-22 17:28:57 +0530713
714 /** Number of spatial streams supported */
715 uint8_t nss;
716
717 /** Rate Flags for this connection */
718 uint32_t rate_flags;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800719} hdd_station_info_t;
720
721struct hdd_ap_ctx_s {
722 hdd_hostapd_state_t HostapdState;
723
724 /* Memory differentiation mode is enabled */
725 /* uint16_t uMemoryDiffThreshold; */
726 /* uint8_t uNumActiveAC; */
727 /* uint8_t uActiveACMask; */
728
729 /** Packet Count to update uNumActiveAC and uActiveACMask */
730 /* uint16_t uUpdatePktCount; */
731
732 /** Station ID assigned after BSS starts */
733 uint8_t uBCStaId;
734
735 uint8_t uPrivacy; /* The privacy bits of configuration */
736
737 tSirWPSPBCProbeReq WPSPBCProbeReq;
738
739 tsap_Config_t sapConfig;
740
741 struct semaphore semWpsPBCOverlapInd;
742
743 bool apDisableIntraBssFwd;
744
Anurag Chouhan210db072016-02-22 18:42:15 +0530745 qdf_mc_timer_t hdd_ap_inactivity_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800746
747 uint8_t operatingChannel;
748
749 bool uIsAuthenticated;
750
751 eCsrEncryptionType ucEncryptType;
752
753 /* This will point to group key data, if it is received before start bss. */
754 tCsrRoamSetKey groupKey;
755 /* This will have WEP key data, if it is received before start bss */
756 tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY];
757
758 beacon_data_t *beacon;
759
760 bool bApActive;
761#ifdef WLAN_FEATURE_MBSSID
762 /* SAP Context */
763 void *sapContext;
764#endif
765 bool dfs_cac_block_tx;
766};
767
768typedef struct hdd_scaninfo_s {
769 /* The scan pending */
770 uint32_t mScanPending;
771
772 /* Counter for mScanPending so that the scan pending
773 error log is not printed for more than 5 times */
774 uint32_t mScanPendingCounter;
775
776 /* Additional IE for scan */
777 tSirAddie scanAddIE;
778
779 /* Scan mode */
780 tSirScanType scan_mode;
781
782 /* completion variable for abortscan */
783 struct completion abortscan_event_var;
784
785} hdd_scaninfo_t;
786
787#define WLAN_HDD_MAX_MC_ADDR_LIST 10
788
789#ifdef WLAN_FEATURE_PACKET_FILTERING
790typedef struct multicast_addr_list {
791 uint8_t isFilterApplied;
792 uint8_t mc_cnt;
793 uint8_t addr[WLAN_HDD_MAX_MC_ADDR_LIST][ETH_ALEN];
794} t_multicast_add_list;
795#endif
796
797#define WLAN_HDD_MAX_HISTORY_ENTRY 10
798
799/**
800 * struct hdd_netif_queue_stats - netif queue operation statistics
801 * @pause_count - pause counter
802 * @unpause_count - unpause counter
803 */
804struct hdd_netif_queue_stats {
805 uint16_t pause_count;
806 uint16_t unpause_count;
Nirav Shahda008342016-05-17 18:50:40 +0530807 qdf_time_t total_pause_time;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800808};
809
810/**
811 * struct hdd_netif_queue_history - netif queue operation history
812 * @time: timestamp
813 * @netif_action: action type
814 * @netif_reason: reason type
815 * @pause_map: pause map
816 */
817struct hdd_netif_queue_history {
Anurag Chouhan50220ce2016-02-18 20:11:33 +0530818 qdf_time_t time;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800819 uint16_t netif_action;
820 uint16_t netif_reason;
821 uint32_t pause_map;
822};
823
Manishekar Chandrasekaranec267592016-05-26 19:10:04 +0530824/**
825 * struct hdd_chan_change_params - channel related information
826 * @chan: operating channel
827 * @chan_params: channel parameters
828 */
829struct hdd_chan_change_params {
830 uint8_t chan;
831 struct ch_params_s chan_params;
832};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800833
834#define WLAN_HDD_ADAPTER_MAGIC 0x574c414e /* ASCII "WLAN" */
835
836
837struct hdd_adapter_s {
Jeff Johnsond399e902015-12-17 15:17:02 -0800838 /* Magic cookie for adapter sanity verification. Note that this
839 * needs to be at the beginning of the private data structure so
840 * that it will exists at the beginning of dev->priv and hence
841 * will always be in mapped memory
842 */
843 uint32_t magic;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800844
Jeff Johnsond399e902015-12-17 15:17:02 -0800845 void *pHddCtx;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800846
847 /** Handle to the network device */
848 struct net_device *dev;
849
Krunal Soni276241e2016-03-10 12:58:11 -0800850 enum tQDF_ADAPTER_MODE device_mode;
Jeff Johnsond399e902015-12-17 15:17:02 -0800851
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800852 /** IPv4 notifier callback for handling ARP offload on change in IP */
853 struct work_struct ipv4NotifierWorkQueue;
854#ifdef WLAN_NS_OFFLOAD
855 /** IPv6 notifier callback for handling NS offload on change in IP */
856 struct work_struct ipv6NotifierWorkQueue;
857#endif
858
859 /* TODO Move this to sta Ctx */
860 struct wireless_dev wdev;
861 struct cfg80211_scan_request *request;
862
863 /** ops checks if Opportunistic Power Save is Enable or Not
864 * ctw stores ctWindow value once we receive Opps command from
865 * wpa_supplicant then using ctWindow value we need to Enable
866 * Opportunistic Power Save
867 */
868 uint8_t ops;
869 uint32_t ctw;
870
871 /** Current MAC Address for the adapter */
Anurag Chouhan6d760662016-02-20 16:05:43 +0530872 struct qdf_mac_addr macAddressCurrent;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800873
874 /**Event Flags*/
875 unsigned long event_flags;
876
877 /**Device TX/RX statistics*/
878 struct net_device_stats stats;
879 /** HDD statistics*/
880 hdd_stats_t hdd_stats;
881 /** linkspeed statistics */
882 tSirLinkSpeedInfo ls_stats;
883 /**Mib information*/
884 sHddMib_t hdd_mib;
885
886 uint8_t sessionId;
887
888 /* Completion variable for session close */
889 struct completion session_close_comp_var;
890
891 /* Completion variable for session open */
892 struct completion session_open_comp_var;
893
894 /* TODO: move these to sta ctx. These may not be used in AP */
895 /** completion variable for disconnect callback */
896 struct completion disconnect_comp_var;
897
898 /** Completion of change country code */
899 struct completion change_country_code;
900
901 /* completion variable for Linkup Event */
902 struct completion linkup_event_var;
903
904 /* completion variable for cancel remain on channel Event */
905 struct completion cancel_rem_on_chan_var;
906
907 /* completion variable for off channel remain on channel Event */
908 struct completion offchannel_tx_event;
909 /* Completion variable for action frame */
910 struct completion tx_action_cnf_event;
911 /* Completion variable for remain on channel ready */
912 struct completion rem_on_chan_ready_event;
913
914 struct completion sta_authorized_event;
915#ifdef FEATURE_WLAN_TDLS
916 struct completion tdls_add_station_comp;
917 struct completion tdls_del_station_comp;
918 struct completion tdls_mgmt_comp;
919 struct completion tdls_link_establish_req_comp;
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530920 QDF_STATUS tdlsAddStaStatus;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800921#endif
922
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800923 struct completion ibss_peer_info_comp;
924
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800925 /* Track whether the linkup handling is needed */
926 bool isLinkUpSvcNeeded;
927
928 /* Mgmt Frames TX completion status code */
929 uint32_t mgmtTxCompletionStatus;
930
931 /* WMM Status */
932 hdd_wmm_status_t hddWmmStatus;
933/*************************************************************
934 */
935/*************************************************************
936 * TODO - Remove it later
937 */
938 /** Multiple station supports */
939 /** Per-station structure */
940 spinlock_t staInfo_lock; /* To protect access to station Info */
941 hdd_station_info_t aStaInfo[WLAN_MAX_STA_COUNT];
942 /* uint8_t uNumActiveStation; */
943
944/*************************************************************
945 */
946
947#ifdef FEATURE_WLAN_WAPI
948 hdd_wapi_info_t wapi_info;
949#endif
950
951 int8_t rssi;
952#ifdef WLAN_FEATURE_LPSS
953 bool rssi_send;
954#endif
955
956 uint8_t snr;
957
958 struct work_struct monTxWorkQueue;
959 struct sk_buff *skb_to_tx;
960
961 union {
962 hdd_station_ctx_t station;
963 hdd_ap_ctx_t ap;
964 } sessionCtx;
965
Manikandan Mohandcc21ba2016-03-15 14:31:56 -0700966#ifdef WLAN_FEATURE_TSF
967 /* tsf value received from firmware */
968 uint32_t tsf_low;
969 uint32_t tsf_high;
970 /* TSF capture state */
971 enum hdd_tsf_capture_state tsf_state;
Manikandan Mohan5356c2b2016-04-03 15:51:35 -0700972 uint64_t tsf_sync_soc_timer;
Manikandan Mohandcc21ba2016-03-15 14:31:56 -0700973#endif
974
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800975 hdd_cfg80211_state_t cfg80211State;
976
977#ifdef WLAN_FEATURE_PACKET_FILTERING
978 t_multicast_add_list mc_addr_list;
979#endif
980 uint8_t addr_filter_pattern;
981
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800982 bool higherDtimTransition;
983 bool survey_idx;
984
985 hdd_scaninfo_t scan_info;
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800986#ifdef FEATURE_WLAN_ESE
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800987 tAniTrafStrmMetrics tsmStats;
988#endif
989 /* Flag to ensure PSB is configured through framework */
990 uint8_t psbChanged;
991 /* UAPSD psb value configured through framework */
992 uint8_t configuredPsb;
993#ifdef IPA_OFFLOAD
994 void *ipa_context;
995#endif
996 /* Use delayed work for Sec AP ACS as Pri AP Startup need to complete
997 * since CSR (PMAC Struct) Config is same for both AP
998 */
999 struct delayed_work acs_pending_work;
1000
1001 struct work_struct scan_block_work;
1002#ifdef MSM_PLATFORM
1003 unsigned long prev_rx_packets;
1004 unsigned long prev_tx_packets;
Himanshu Agarwala6cedee2016-06-08 14:50:00 +05301005 uint64_t prev_fwd_tx_packets;
1006 uint64_t prev_fwd_rx_packets;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001007 int connection;
1008#endif
1009 bool is_roc_inprogress;
1010
1011#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
Anurag Chouhan210db072016-02-22 18:42:15 +05301012 qdf_mc_timer_t tx_flow_control_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001013 bool tx_flow_timer_initialized;
1014 unsigned int tx_flow_low_watermark;
1015 unsigned int tx_flow_high_watermark_offset;
1016#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
1017 bool offloads_configured;
1018
1019 /* DSCP to UP QoS Mapping */
1020 sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_HDD_MAX_DSCP + 1];
1021
1022#ifdef WLAN_FEATURE_LINK_LAYER_STATS
1023 bool isLinkLayerStatsSet;
1024#endif
1025 uint8_t linkStatus;
1026
1027 /* variable for temperature in Celsius */
1028 int temperature;
1029
1030 /* Time stamp for last completed RoC request */
Anurag Chouhan6d760662016-02-20 16:05:43 +05301031 unsigned long last_roc_ts;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001032
1033 /* Time stamp for start RoC request */
Anurag Chouhan6d760662016-02-20 16:05:43 +05301034 unsigned long start_roc_ts;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001035
1036 /* State for synchronous OCB requests to WMI */
1037 struct sir_ocb_set_config_response ocb_set_config_resp;
1038 struct sir_ocb_get_tsf_timer_response ocb_get_tsf_timer_resp;
1039 struct sir_dcc_get_stats_response *dcc_get_stats_resp;
1040 struct sir_dcc_update_ndl_response dcc_update_ndl_resp;
1041
1042 /* MAC addresses used for OCB interfaces */
Anurag Chouhan6d760662016-02-20 16:05:43 +05301043 struct qdf_mac_addr ocb_mac_address[QDF_MAX_CONCURRENCY_PERSONA];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001044 int ocb_mac_addr_count;
1045
1046 /* BITMAP indicating pause reason */
1047 uint32_t pause_map;
1048 spinlock_t pause_map_lock;
Nirav Shah617cff92016-04-25 10:24:24 +05301049 qdf_time_t start_time;
1050 qdf_time_t last_time;
1051 qdf_time_t total_pause_time;
1052 qdf_time_t total_unpause_time;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001053 uint8_t history_index;
1054 struct hdd_netif_queue_history
1055 queue_oper_history[WLAN_HDD_MAX_HISTORY_ENTRY];
1056 struct hdd_netif_queue_stats queue_oper_stats[WLAN_REASON_TYPE_MAX];
1057 struct hdd_lro_s lro_info;
Dhanashri Atre168d2b42016-02-22 14:43:06 -08001058 ol_txrx_tx_fp tx_fn;
Rajeev Kumardca5f812016-02-04 17:28:06 -08001059 /* debugfs entry */
1060 struct dentry *debugfs_phy;
Manishekar Chandrasekaran9e8c7be2016-08-03 14:57:14 +05301061 /*
1062 * The pre cac channel is saved here and will be used when the SAP's
1063 * channel needs to be moved from the existing 2.4GHz channel.
1064 */
1065 uint8_t pre_cac_chan;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001066};
1067
1068#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
1069#define WLAN_HDD_GET_AP_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap)
1070#define WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.station.WextState)
1071#define WLAN_HDD_GET_CTX(pAdapter) ((hdd_context_t *)pAdapter->pHddCtx)
1072#define WLAN_HDD_GET_HAL_CTX(pAdapter) (((hdd_context_t *)(pAdapter->pHddCtx))->hHal)
1073#define WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap.HostapdState)
1074#define WLAN_HDD_GET_CFG_STATE_PTR(pAdapter) (&(pAdapter)->cfg80211State)
1075#ifdef WLAN_FEATURE_MBSSID
1076#define WLAN_HDD_GET_SAP_CTX_PTR(pAdapter) (pAdapter->sessionCtx.ap.sapContext)
1077#endif
1078#ifdef FEATURE_WLAN_TDLS
1079#define WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter) \
Krunal Soni276241e2016-03-10 12:58:11 -08001080 (((QDF_STA_MODE != pAdapter->device_mode) && \
1081 (QDF_P2P_CLIENT_MODE != pAdapter->device_mode)) ? 0 : 1)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001082#define WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter) \
1083 ((WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter)) ? \
1084 (tdlsCtx_t *)(pAdapter)->sessionCtx.station.pHddTdlsCtx : NULL)
1085#endif
1086
Deepak Dhamdhere5cdce842016-05-31 10:39:12 -07001087#ifdef WLAN_FEATURE_NAN_DATAPATH
Deepak Dhamdhere8360d4c2016-06-01 13:24:31 -07001088#define WLAN_HDD_GET_NDP_CTX_PTR(adapter) \
1089 (&(adapter)->sessionCtx.station.ndp_ctx)
Deepak Dhamdhere7e6016f2016-06-01 09:37:37 -07001090#define WLAN_HDD_IS_NDP_ENABLED(hdd_ctx) ((hdd_ctx)->nan_datapath_enabled)
Deepak Dhamdhere5cdce842016-05-31 10:39:12 -07001091#else
Deepak Dhamdhere8360d4c2016-06-01 13:24:31 -07001092/* WLAN_HDD_GET_NDP_CTX_PTR and WLAN_HDD_GET_NDP_WEXT_STATE_PTR are not defined
1093 * intentionally so that all references to these must be within NDP code.
1094 * non-NDP code can call WLAN_HDD_IS_NDP_ENABLED(), and when it is enabled,
1095 * invoke NDP code to do all work.
1096 */
Deepak Dhamdhere7e6016f2016-06-01 09:37:37 -07001097#define WLAN_HDD_IS_NDP_ENABLED(hdd_ctx) (false)
Deepak Dhamdhere5cdce842016-05-31 10:39:12 -07001098#endif
1099
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001100/* Set mac address locally administered bit */
1101#define WLAN_HDD_RESET_LOCALLY_ADMINISTERED_BIT(macaddr) (macaddr[0] &= 0xFD)
1102
1103#define HDD_DEFAULT_MCC_P2P_QUOTA 70
1104#define HDD_RESET_MCC_P2P_QUOTA 50
1105
1106typedef struct hdd_adapter_list_node {
Anurag Chouhanffb21542016-02-17 14:33:03 +05301107 qdf_list_node_t node; /* MUST be first element */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001108 hdd_adapter_t *pAdapter;
1109} hdd_adapter_list_node_t;
1110
1111typedef struct hdd_priv_data_s {
1112 uint8_t *buf;
1113 int used_len;
1114 int total_len;
1115} hdd_priv_data_t;
1116
1117#define MAX_MOD_LOGLEVEL 10
1118typedef struct {
1119 uint8_t enable;
1120 uint8_t dl_type;
1121 uint8_t dl_report;
1122 uint8_t dl_loglevel;
1123 uint8_t index;
1124 uint32_t dl_mod_loglevel[MAX_MOD_LOGLEVEL];
1125
1126} fw_log_info;
1127
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -08001128/**
1129 * enum antenna_mode - number of TX/RX chains
1130 * @HDD_ANTENNA_MODE_INVALID: Invalid mode place holder
1131 * @HDD_ANTENNA_MODE_1X1: Number of TX/RX chains equals 1
1132 * @HDD_ANTENNA_MODE_2X2: Number of TX/RX chains equals 2
1133 * @HDD_ANTENNA_MODE_MAX: Place holder for max mode
1134 */
1135enum antenna_mode {
1136 HDD_ANTENNA_MODE_INVALID,
1137 HDD_ANTENNA_MODE_1X1,
1138 HDD_ANTENNA_MODE_2X2,
1139 HDD_ANTENNA_MODE_MAX
1140};
1141
1142/**
1143 * enum smps_mode - SM power save mode
1144 * @HDD_SMPS_MODE_STATIC: Static power save
1145 * @HDD_SMPS_MODE_DYNAMIC: Dynamic power save
1146 * @HDD_SMPS_MODE_RESERVED: Reserved
1147 * @HDD_SMPS_MODE_DISABLED: Disable power save
1148 * @HDD_SMPS_MODE_MAX: Place holder for max mode
1149 */
1150enum smps_mode {
1151 HDD_SMPS_MODE_STATIC,
1152 HDD_SMPS_MODE_DYNAMIC,
1153 HDD_SMPS_MODE_RESERVED,
1154 HDD_SMPS_MODE_DISABLED,
1155 HDD_SMPS_MODE_MAX
1156};
1157
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001158#ifdef WLAN_FEATURE_OFFLOAD_PACKETS
1159/**
1160 * struct hdd_offloaded_packets - request id to pattern id mapping
1161 * @request_id: request id
1162 * @pattern_id: pattern id
1163 *
1164 */
1165struct hdd_offloaded_packets {
1166 uint32_t request_id;
1167 uint8_t pattern_id;
1168};
1169
1170/**
1171 * struct hdd_offloaded_packets_ctx - offloaded packets context
1172 * @op_table: request id to pattern id table
1173 * @op_lock: mutex lock
1174 */
1175struct hdd_offloaded_packets_ctx {
1176 struct hdd_offloaded_packets op_table[MAXNUM_PERIODIC_TX_PTRNS];
1177 struct mutex op_lock;
1178};
1179#endif
1180
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301181/**
1182 * struct hdd_bpf_context - hdd Context for bpf
1183 * @magic: magic number
1184 * @completion: Completion variable for BPF Get Capability
1185 * @capability_response: capabilities response received from fw
1186 */
1187struct hdd_bpf_context {
1188 unsigned int magic;
1189 struct completion completion;
1190 struct sir_bpf_get_offload capability_response;
1191};
1192
Arun Khandavallifae92942016-08-01 13:31:08 +05301193/**
1194 * enum driver_status: Driver Modules status
1195 * @DRIVER_MODULES_UNINITIALIZED: Driver CDS modules uninitialized
1196 * @DRIVER_MODULES_OPENED: Driver CDS modules opened
1197 * @DRIVER_MODULES_ENABLED: Driver CDS modules opened
1198 * @DRIVER_MODULES_CLOSED: Driver CDS modules closed
1199 */
1200enum driver_modules_status {
1201 DRIVER_MODULES_UNINITIALIZED,
1202 DRIVER_MODULES_OPENED,
1203 DRIVER_MODULES_ENABLED,
1204 DRIVER_MODULES_CLOSED
1205};
1206
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001207/** Adapter structure definition */
1208
1209struct hdd_context_s {
1210 /** Global CDS context */
1211 v_CONTEXT_t pcds_context;
1212
1213 /** HAL handle...*/
1214 tHalHandle hHal;
1215
1216 struct wiphy *wiphy;
1217 /* TODO Remove this from here. */
1218
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301219 qdf_spinlock_t hdd_adapter_lock;
Anurag Chouhanffb21542016-02-17 14:33:03 +05301220 qdf_list_t hddAdapters; /* List of adapters */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001221
1222 /* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID, 1 for WDS_STAID */
Anurag Chouhanf04e84f2016-03-03 10:12:12 +05301223 hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + QDF_MAX_NO_OF_SAP_MODE + 2]; /* One per sta. For quick reference. */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001224
1225 /** Pointer for firmware image data */
1226 const struct firmware *fw;
1227
1228 /** Pointer for configuration data */
1229 const struct firmware *cfg;
1230
1231 /** Pointer to the parent device */
1232 struct device *parent_dev;
1233
1234 /** Config values read from qcom_cfg.ini file */
1235 struct hdd_config *config;
1236
1237 struct wlan_hdd_ftm_status ftm;
1238
1239 /* Completion variable to indicate Mc Thread Suspended */
1240 struct completion mc_sus_event_var;
1241
1242 struct completion reg_init;
1243
1244 bool isMcThreadSuspended;
1245
1246#ifdef QCA_CONFIG_SMP
1247 bool is_ol_rx_thread_suspended;
1248#endif
1249
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001250 /* Track whether Mcast/Bcast Filter is enabled. */
1251 bool hdd_mcastbcast_filter_set;
1252
1253 bool hdd_wlan_suspended;
1254 bool suspended;
1255
1256 /* Lock to avoid race condition during start/stop bss */
1257 struct mutex sap_lock;
1258
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001259#ifdef FEATURE_OEM_DATA_SUPPORT
1260 /* OEM App registered or not */
1261 bool oem_app_registered;
1262
1263 /* OEM App Process ID */
1264 int32_t oem_pid;
1265#endif
1266
1267 /** Concurrency Parameters*/
1268 uint32_t concurrency_mode;
1269
Anurag Chouhan6d760662016-02-20 16:05:43 +05301270 uint8_t no_of_open_sessions[QDF_MAX_NO_OF_MODE];
1271 uint8_t no_of_active_sessions[QDF_MAX_NO_OF_MODE];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001272
1273 /** P2P Device MAC Address for the adapter */
Anurag Chouhan6d760662016-02-20 16:05:43 +05301274 struct qdf_mac_addr p2pDeviceAddress;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001275
1276#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301277 qdf_wake_lock_t rx_wake_lock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001278#endif
1279
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301280 qdf_wake_lock_t sap_wake_lock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001281
1282#ifdef FEATURE_WLAN_TDLS
1283 eTDLSSupportMode tdls_mode;
Kabilan Kannan163fd0b2016-06-08 15:21:51 -07001284 bool concurrency_marked;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001285 eTDLSSupportMode tdls_mode_last;
1286 tdlsConnInfo_t tdlsConnInfo[HDD_MAX_NUM_TDLS_STA];
1287 /* maximum TDLS station number allowed upon runtime condition */
1288 uint16_t max_num_tdls_sta;
1289 /* TDLS peer connected count */
1290 uint16_t connected_peer_count;
1291 tdls_scan_context_t tdls_scan_ctxt;
1292 /* Lock to avoid race condition during TDLS operations */
Kabilan Kannan36090ce2016-05-03 19:28:44 -07001293 qdf_spinlock_t tdls_ct_spinlock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001294 struct mutex tdls_lock;
1295 uint8_t tdls_off_channel;
1296 uint16_t tdls_channel_offset;
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301297 int32_t tdls_fw_off_chan_mode;
Kabilan Kannan36090ce2016-05-03 19:28:44 -07001298 bool enable_tdls_connection_tracker;
1299 uint8_t tdls_external_peer_count;
Archana Ramachandrand5d2e922016-04-20 16:57:35 -07001300 bool tdls_nss_switch_in_progress;
Kabilan Kannanff89f742016-08-15 18:14:10 -07001301 bool tdls_nss_teardown_complete;
1302 enum tdls_nss_transition_type tdls_nss_transition_mode;
Archana Ramachandrand5d2e922016-04-20 16:57:35 -07001303 int32_t tdls_teardown_peers_cnt;
Kabilan Kannan163fd0b2016-06-08 15:21:51 -07001304 struct tdls_set_state_info set_state_info;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001305#endif
1306
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001307 void *hdd_ipa;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001308
1309 /* MC/BC Filter state variable
1310 * This always contains the value that is currently
1311 * configured
1312 * */
1313 uint8_t configuredMcastBcastFilter;
1314
1315 uint8_t sus_res_mcastbcast_filter;
1316
1317 bool sus_res_mcastbcast_filter_valid;
1318
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001319 /* Use below lock to protect access to isSchedScanUpdatePending
1320 * since it will be accessed in two different contexts.
1321 */
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301322 qdf_spinlock_t sched_scan_lock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001323
1324 /* Flag keeps track of wiphy suspend/resume */
1325 bool isWiphySuspended;
1326
1327 /* Indicates about pending sched_scan results */
1328 bool isSchedScanUpdatePending;
1329
1330#ifdef MSM_PLATFORM
1331 /* DDR bus bandwidth compute timer
1332 */
Anurag Chouhan210db072016-02-22 18:42:15 +05301333 qdf_mc_timer_t bus_bw_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001334 int cur_vote_level;
1335 spinlock_t bus_bw_lock;
1336 int cur_rx_level;
1337 uint64_t prev_rx;
Mohit Khannae71e2262015-11-10 09:37:24 -08001338 int cur_tx_level;
1339 uint64_t prev_tx;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001340#endif
1341 /* VHT80 allowed */
1342 bool isVHT80Allowed;
1343
1344 struct completion ready_to_suspend;
1345 /* defining the solution type */
1346 uint32_t target_type;
1347
1348 /* defining the firmware version */
1349 uint32_t target_fw_version;
Arif Hussain1969ec82016-07-08 10:37:01 -07001350 qdf_atomic_t dfs_radar_found;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001351
1352 /* defining the chip/rom version */
1353 uint32_t target_hw_version;
1354 /* defining the chip/rom revision */
1355 uint32_t target_hw_revision;
1356 /* chip/rom name */
1357 const char *target_hw_name;
1358 struct regulatory reg;
1359#ifdef FEATURE_WLAN_CH_AVOID
1360 uint16_t unsafe_channel_count;
Amar Singhalb8d4f152016-02-10 10:21:43 -08001361 uint16_t unsafe_channel_list[NUM_CHANNELS];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001362#endif /* FEATURE_WLAN_CH_AVOID */
1363
1364 uint8_t max_intf_count;
1365 uint8_t current_intf_count;
1366#ifdef WLAN_FEATURE_LPSS
1367 uint8_t lpss_support;
1368#endif
1369 uint8_t ap_arpns_support;
1370 tSirScanType ioctl_scan_mode;
1371
1372#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
Anurag Chouhan42958bb2016-02-19 15:43:11 +05301373 qdf_work_t sta_ap_intf_check_work;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001374#endif
1375
1376 struct work_struct sap_start_work;
1377 bool is_sap_restart_required;
1378 bool is_sta_connection_pending;
Manishekar Chandrasekaran7f63d052016-05-07 09:54:00 +05301379 qdf_spinlock_t sap_update_info_lock;
1380 qdf_spinlock_t sta_update_info_lock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001381
1382 uint8_t dev_dfs_cac_status;
1383
1384 bool btCoexModeSet;
1385#ifdef FEATURE_GREEN_AP
1386 struct hdd_green_ap_ctx *green_ap_ctx;
1387#endif
1388 fw_log_info fw_log_settings;
1389#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
Anurag Chouhan210db072016-02-22 18:42:15 +05301390 qdf_mc_timer_t skip_acs_scan_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001391 uint8_t skip_acs_scan_status;
1392#endif
1393
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301394 qdf_wake_lock_t sap_dfs_wakelock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001395 atomic_t sap_dfs_ref_cnt;
1396
1397#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
1398 bool is_extwow_app_type1_param_set;
1399 bool is_extwow_app_type2_param_set;
1400 bool ext_wow_should_suspend;
1401 struct completion ready_to_extwow;
1402#endif
1403
1404 /* Time since boot up to extscan start (in micro seconds) */
1405 uint64_t ext_scan_start_since_boot;
1406 unsigned long g_event_flags;
1407 /* RoC request queue and work */
1408 struct delayed_work roc_req_work;
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301409 qdf_spinlock_t hdd_roc_req_q_lock;
Anurag Chouhanffb21542016-02-17 14:33:03 +05301410 qdf_list_t hdd_roc_req_q;
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301411 qdf_spinlock_t hdd_scan_req_q_lock;
Anurag Chouhanffb21542016-02-17 14:33:03 +05301412 qdf_list_t hdd_scan_req_q;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001413 uint8_t miracast_value;
1414#ifdef WLAN_NS_OFFLOAD
1415 /* IPv6 notifier callback for handling NS offload on change in IP */
1416 struct notifier_block ipv6_notifier;
1417#endif
1418 /* IPv4 notifier callback for handling ARP offload on change in IP */
1419 struct notifier_block ipv4_notifier;
1420
1421 /* number of rf chains supported by target */
1422 uint32_t num_rf_chains;
1423 /* Is htTxSTBC supported by target */
1424 uint8_t ht_tx_stbc_supported;
1425#ifdef WLAN_FEATURE_OFFLOAD_PACKETS
1426 struct hdd_offloaded_packets_ctx op_ctx;
1427#endif
1428 bool mcc_mode;
1429#ifdef WLAN_FEATURE_MEMDUMP
1430 uint8_t *fw_dump_loc;
1431 uint32_t dump_loc_paddr;
Anurag Chouhan210db072016-02-22 18:42:15 +05301432 qdf_mc_timer_t memdump_cleanup_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001433 struct mutex memdump_lock;
1434 bool memdump_in_progress;
1435#endif /* WLAN_FEATURE_MEMDUMP */
1436
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001437 bool connection_in_progress;
Anurag Chouhana37b5b72016-02-21 14:53:42 +05301438 qdf_spinlock_t connection_status_lock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001439
1440 uint16_t hdd_txrx_hist_idx;
Nirav Shahed34b212016-04-25 10:59:16 +05301441 struct hdd_tx_rx_histogram *hdd_txrx_hist;
Arif Hussain1969ec82016-07-08 10:37:01 -07001442
Krunal Sonie3531942016-04-12 17:43:53 -07001443 /*
1444 * place to store FTM capab of target. This allows changing of FTM capab
1445 * at runtime and intersecting it with target capab before updating.
1446 */
1447 uint32_t fine_time_meas_cap_target;
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -08001448 /* completion variable to indicate set antenna mode complete*/
1449 struct completion set_antenna_mode_cmpl;
1450 /* Current number of TX X RX chains being used */
1451 enum antenna_mode current_antenna_mode;
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301452 bool bpf_enabled;
Ryan Hsuceddceb2016-04-28 10:20:14 -07001453
1454 /* the radio index assigned by cnss_logger */
1455 int radio_index;
Manishekar Chandrasekaran9e8c7be2016-08-03 14:57:14 +05301456 qdf_work_t sap_pre_cac_work;
Nirav Shahffc6a092016-06-09 16:09:08 +05301457 bool hbw_requested;
Deepak Dhamdhere7e6016f2016-06-01 09:37:37 -07001458#ifdef WLAN_FEATURE_NAN_DATAPATH
1459 bool nan_datapath_enabled;
1460#endif
Arun Khandavallifae92942016-08-01 13:31:08 +05301461 /* Present state of driver cds modules */
1462 enum driver_modules_status driver_status;
1463 /* MC timer interface change */
1464 qdf_mc_timer_t iface_change_timer;
1465 /* Interface change lock */
1466 struct mutex iface_change_lock;
Nirav Shahbd36b062016-07-18 11:12:59 +05301467 bool rps;
1468 bool enableRxThread;
1469 bool napi_enable;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001470};
1471
1472/*---------------------------------------------------------------------------
1473 Function declarations and documentation
1474 -------------------------------------------------------------------------*/
Chandrasekaran, Manishekar794a0982016-01-12 19:42:20 +05301475int hdd_validate_channel_and_bandwidth(hdd_adapter_t *adapter,
1476 uint32_t chan_number,
Kiran Kumar Lokere13644672016-02-29 15:40:10 -08001477 enum phy_ch_width chan_bw);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001478#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
1479void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *sta_pAdapter);
1480#endif
1481
1482const char *hdd_device_mode_to_string(uint8_t device_mode);
1483
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301484QDF_STATUS hdd_get_front_adapter(hdd_context_t *pHddCtx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001485 hdd_adapter_list_node_t **ppAdapterNode);
1486
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301487QDF_STATUS hdd_get_next_adapter(hdd_context_t *pHddCtx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001488 hdd_adapter_list_node_t *pAdapterNode,
1489 hdd_adapter_list_node_t **pNextAdapterNode);
1490
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301491QDF_STATUS hdd_remove_adapter(hdd_context_t *pHddCtx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001492 hdd_adapter_list_node_t *pAdapterNode);
1493
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301494QDF_STATUS hdd_remove_front_adapter(hdd_context_t *pHddCtx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001495 hdd_adapter_list_node_t **ppAdapterNode);
1496
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301497QDF_STATUS hdd_add_adapter_back(hdd_context_t *pHddCtx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001498 hdd_adapter_list_node_t *pAdapterNode);
1499
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301500QDF_STATUS hdd_add_adapter_front(hdd_context_t *pHddCtx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001501 hdd_adapter_list_node_t *pAdapterNode);
1502
1503hdd_adapter_t *hdd_open_adapter(hdd_context_t *pHddCtx, uint8_t session_type,
1504 const char *name, tSirMacAddr macAddr,
Ryan Hsu07495ea2016-01-21 15:25:39 -08001505 unsigned char name_assign_type,
Prashanth Bhatta98f04d22016-01-08 16:46:21 -08001506 bool rtnl_held);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301507QDF_STATUS hdd_close_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
Prashanth Bhatta98f04d22016-01-08 16:46:21 -08001508 bool rtnl_held);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301509QDF_STATUS hdd_close_all_adapters(hdd_context_t *pHddCtx, bool rtnl_held);
1510QDF_STATUS hdd_stop_all_adapters(hdd_context_t *pHddCtx);
1511QDF_STATUS hdd_reset_all_adapters(hdd_context_t *pHddCtx);
1512QDF_STATUS hdd_start_all_adapters(hdd_context_t *pHddCtx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001513hdd_adapter_t *hdd_get_adapter_by_vdev(hdd_context_t *pHddCtx,
1514 uint32_t vdev_id);
1515hdd_adapter_t *hdd_get_adapter_by_macaddr(hdd_context_t *pHddCtx,
1516 tSirMacAddr macAddr);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301517QDF_STATUS hdd_init_station_mode(hdd_adapter_t *pAdapter);
Krunal Soni276241e2016-03-10 12:58:11 -08001518hdd_adapter_t *hdd_get_adapter(hdd_context_t *pHddCtx,
1519 enum tQDF_ADAPTER_MODE mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001520void hdd_deinit_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
1521 bool rtnl_held);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301522QDF_STATUS hdd_stop_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001523 const bool bCloseSession);
1524void hdd_set_station_ops(struct net_device *pWlanDev);
1525uint8_t *wlan_hdd_get_intf_addr(hdd_context_t *pHddCtx);
1526void wlan_hdd_release_intf_addr(hdd_context_t *pHddCtx, uint8_t *releaseAddr);
Krunal Soni276241e2016-03-10 12:58:11 -08001527uint8_t hdd_get_operating_channel(hdd_context_t *pHddCtx,
1528 enum tQDF_ADAPTER_MODE mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001529
Prashanth Bhatta05aaf012015-12-10 17:34:24 -08001530void hdd_set_conparam(uint32_t con_param);
Anurag Chouhan6d760662016-02-20 16:05:43 +05301531enum tQDF_GLOBAL_CON_MODE hdd_get_conparam(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001532
1533void hdd_abort_mac_scan(hdd_context_t *pHddCtx, uint8_t sessionId,
1534 eCsrAbortReason reason);
1535void hdd_cleanup_actionframe(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter);
1536
1537void crda_regulatory_entry_default(uint8_t *countryCode, int domain_id);
1538void wlan_hdd_reset_prob_rspies(hdd_adapter_t *pHostapdAdapter);
1539void hdd_prevent_suspend(uint32_t reason);
1540void hdd_allow_suspend(uint32_t reason);
1541void hdd_prevent_suspend_timeout(uint32_t timeout, uint32_t reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001542
1543void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301544QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *pAdapter);
1545QDF_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001546void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx);
1547int wlan_hdd_validate_context(hdd_context_t *pHddCtx);
1548bool hdd_is_valid_mac_address(const uint8_t *pMacAddr);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301549QDF_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001550
Rajeev Kumar8e3e2832015-11-06 16:02:54 -08001551struct qdf_mac_addr *
1552hdd_wlan_get_ibss_mac_addr_from_staid(hdd_adapter_t *pAdapter,
1553 uint8_t staIdx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001554void hdd_checkandupdate_phymode(hdd_context_t *pHddCtx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001555#ifdef MSM_PLATFORM
1556void hdd_start_bus_bw_compute_timer(hdd_adapter_t *pAdapter);
1557void hdd_stop_bus_bw_compute_timer(hdd_adapter_t *pAdapter);
1558#else
1559static inline void hdd_start_bus_bw_compute_timer(hdd_adapter_t *pAdapter)
1560{
1561 return;
1562}
1563
1564static inline void hdd_stop_bus_bw_computer_timer(hdd_adapter_t *pAdapter)
1565{
1566 return;
1567}
1568#endif
1569
Prashanth Bhatta5da711e2015-11-30 14:28:52 -08001570int hdd_init(void);
1571void hdd_deinit(void);
1572
Arun Khandavallifae92942016-08-01 13:31:08 +05301573int hdd_wlan_startup(struct device *dev);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001574void __hdd_wlan_exit(void);
1575int hdd_wlan_notify_modem_power_state(int state);
1576#ifdef QCA_HT_2040_COEX
1577int hdd_wlan_set_ht2040_mode(hdd_adapter_t *pAdapter, uint16_t staId,
Anurag Chouhan6d760662016-02-20 16:05:43 +05301578 struct qdf_mac_addr macAddrSTA, int width);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001579#endif
1580
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001581void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len);
1582#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
1583void wlan_hdd_auto_shutdown_enable(hdd_context_t *hdd_ctx, bool enable);
1584#endif
1585
1586hdd_adapter_t *hdd_get_con_sap_adapter(hdd_adapter_t *this_sap_adapter,
1587 bool check_start_bss);
1588
1589bool hdd_is_5g_supported(hdd_context_t *pHddCtx);
1590
1591int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter);
1592
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001593void hdd_get_fw_version(hdd_context_t *hdd_ctx,
1594 uint32_t *major_spid, uint32_t *minor_spid,
1595 uint32_t *siid, uint32_t *crmid);
1596
1597#ifdef WLAN_FEATURE_MEMDUMP
1598/**
1599 * hdd_is_memdump_supported() - to check if memdump feature support
1600 *
1601 * This function is used to check if memdump feature is supported in
1602 * the host driver
1603 *
1604 * Return: true if supported and false otherwise
1605 */
1606static inline bool hdd_is_memdump_supported(void)
1607{
1608 return true;
1609}
1610#else
1611static inline bool hdd_is_memdump_supported(void)
1612{
1613 return false;
1614}
1615#endif /* WLAN_FEATURE_MEMDUMP */
1616
1617void hdd_update_macaddr(struct hdd_config *config,
Anurag Chouhan6d760662016-02-20 16:05:43 +05301618 struct qdf_mac_addr hw_macaddr);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001619void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter);
1620void wlan_hdd_enable_roaming(hdd_adapter_t *pAdapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001621
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301622QDF_STATUS hdd_post_cds_enable_config(hdd_context_t *pHddCtx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001623
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301624QDF_STATUS hdd_abort_mac_scan_all_adapters(hdd_context_t *hdd_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001625
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301626QDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001627 hdd_adapter_t *ap_adapter,
1628 tCsrRoamProfile *roam_profile,
1629 tScanResultHandle *scan_cache,
1630 bool *concurrent_chnl_same);
1631#ifdef WLAN_FEATURE_MBSSID
1632void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter);
1633void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter);
1634#else
1635static inline void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter) {}
1636static inline void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter) {}
1637#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001638
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -08001639void wlan_hdd_soc_set_antenna_mode_cb(enum set_antenna_mode_status status);
1640
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001641#ifdef QCA_CONFIG_SMP
1642int wlan_hdd_get_cpu(void);
1643#else
1644static inline int wlan_hdd_get_cpu(void)
1645{
1646 return 0;
1647}
1648#endif
1649
Manishekar Chandrasekaran9e8c7be2016-08-03 14:57:14 +05301650void wlan_hdd_sap_pre_cac_failure(void *data);
1651void hdd_clean_up_pre_cac_interface(hdd_context_t *hdd_ctx);
1652
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001653void wlan_hdd_txrx_pause_cb(uint8_t vdev_id,
1654 enum netif_action_type action, enum netif_reason_type reason);
1655
1656void hdd_wlan_dump_stats(hdd_adapter_t *adapter, int value);
Nirav Shahed34b212016-04-25 10:59:16 +05301657int wlan_hdd_init_tx_rx_histogram(hdd_context_t *hdd_ctx);
1658void wlan_hdd_deinit_tx_rx_histogram(hdd_context_t *hdd_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001659void wlan_hdd_display_tx_rx_histogram(hdd_context_t *pHddCtx);
1660void wlan_hdd_clear_tx_rx_histogram(hdd_context_t *pHddCtx);
1661void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx);
1662void wlan_hdd_clear_netif_queue_history(hdd_context_t *hdd_ctx);
1663const char *hdd_get_fwpath(void);
Abhishek Singh7996eb72015-12-30 17:24:02 +05301664void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind);
1665hdd_adapter_t *hdd_get_adapter_by_sme_session_id(hdd_context_t *hdd_ctx,
1666 uint32_t sme_session_id);
Kiran Kumar Lokere13644672016-02-29 15:40:10 -08001667enum phy_ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width);
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301668uint8_t wlan_hdd_find_opclass(tHalHandle hal, uint8_t channel,
1669 uint8_t bw_offset);
Arun Khandavallic811dcc2016-06-26 07:37:21 +05301670int hdd_update_config(hdd_context_t *hdd_ctx);
Dhanashri Atre83d373d2015-07-28 16:45:59 -07001671
Manishekar Chandrasekarancb052172016-04-22 12:19:04 +05301672QDF_STATUS hdd_chan_change_notify(hdd_adapter_t *adapter,
Manishekar Chandrasekaranec267592016-05-26 19:10:04 +05301673 struct net_device *dev,
1674 struct hdd_chan_change_params chan_change);
Manishekar Chandrasekaran9e8c7be2016-08-03 14:57:14 +05301675int wlan_hdd_set_channel(struct wiphy *wiphy,
1676 struct net_device *dev,
1677 struct cfg80211_chan_def *chandef,
1678 enum nl80211_channel_type channel_type);
1679int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
1680 struct cfg80211_beacon_data *params,
1681 const u8 *ssid, size_t ssid_len,
1682 enum nl80211_hidden_ssid hidden_ssid,
1683 bool check_for_concurrency);
Chandrasekaran Manishekarcde33d72016-04-14 19:03:39 +05301684#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
1685QDF_STATUS hdd_register_for_sap_restart_with_channel_switch(void);
1686#else
1687static inline QDF_STATUS hdd_register_for_sap_restart_with_channel_switch(void)
1688{
Krunal Soni276241e2016-03-10 12:58:11 -08001689 return QDF_STATUS_SUCCESS;
Chandrasekaran Manishekarcde33d72016-04-14 19:03:39 +05301690}
1691#endif
1692
Srinivas Girigowdac34f11d2016-02-25 16:02:42 -08001693#if !defined(REMOVE_PKT_LOG)
1694int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value);
1695int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, uint8_t);
1696#else
1697int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, uint8_t)
1698{
1699 return 0;
1700}
1701int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
1702{
1703 return 0;
1704}
1705#endif /* REMOVE_PKT_LOG */
1706
Dhanashri Atre83d373d2015-07-28 16:45:59 -07001707#ifdef FEATURE_TSO
1708/**
1709 * hdd_set_tso_flags() - enable TSO flags in the network device
1710 * @hdd_ctx: HDD context
1711 * @wlan_dev: network device structure
1712 *
1713 * This function enables the TSO related feature flags in the
1714 * given network device.
1715 *
1716 * Return: none
1717 */
1718static inline void hdd_set_tso_flags(hdd_context_t *hdd_ctx,
1719 struct net_device *wlan_dev)
1720{
1721 if (hdd_ctx->config->tso_enable) {
1722 hdd_info("TSO Enabled");
1723 wlan_dev->features |=
1724 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
1725 NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG;
1726 }
1727}
1728#else
1729static inline void hdd_set_tso_flags(hdd_context_t *hdd_ctx,
1730 struct net_device *wlan_dev){}
1731#endif /* FEATURE_TSO */
Varun Reddy Yeturubbbbe232016-02-29 14:01:57 -08001732
Agrawal Ashishc9ddbab2016-05-25 12:04:47 +05301733#if defined(FEATURE_WLAN_MCC_TO_SCC_SWITCH) || \
1734 defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
1735void wlan_hdd_restart_sap(hdd_adapter_t *ap_adapter);
1736#else
1737static inline void wlan_hdd_restart_sap(hdd_adapter_t *ap_adapter)
1738{
1739}
1740#endif
1741
Varun Reddy Yeturubbbbe232016-02-29 14:01:57 -08001742#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Varun Reddy Yeturud351a6c2016-03-16 14:01:00 -07001743static inline bool roaming_offload_enabled(hdd_context_t *hdd_ctx)
Varun Reddy Yeturubbbbe232016-02-29 14:01:57 -08001744{
1745 return hdd_ctx->config->isRoamOffloadEnabled;
1746}
1747#else
Varun Reddy Yeturud351a6c2016-03-16 14:01:00 -07001748static inline bool roaming_offload_enabled(hdd_context_t *hdd_ctx)
Varun Reddy Yeturubbbbe232016-02-29 14:01:57 -08001749{
1750 return false;
1751}
1752#endif
1753
Rajeev Kumar94c9b452016-03-24 12:58:47 -07001754void hdd_get_ibss_peer_info_cb(void *pUserData,
1755 tSirPeerInfoRspParams *pPeerInfo);
1756
Ryan Hsuceddceb2016-04-28 10:20:14 -07001757#ifdef CONFIG_CNSS_LOGGER
1758/**
1759 * wlan_hdd_nl_init() - wrapper function to CNSS_LOGGER case
1760 * @hdd_ctx: the hdd context pointer
1761 *
1762 * The nl_srv_init() will call to cnss_logger_device_register() and
1763 * expect to get a radio_index from cnss_logger module and assign to
1764 * hdd_ctx->radio_index, then to maintain the consistency to original
1765 * design, adding the radio_index check here, then return the error
1766 * code if radio_index is not assigned correctly, which means the nl_init
1767 * from cnss_logger is failed.
1768 *
1769 * Return: 0 if successfully, otherwise error code
1770 */
1771static inline int wlan_hdd_nl_init(hdd_context_t *hdd_ctx)
1772{
1773 hdd_ctx->radio_index = nl_srv_init(hdd_ctx->wiphy);
1774
1775 /* radio_index is assigned from 0, so only >=0 will be valid index */
1776 if (hdd_ctx->radio_index >= 0)
1777 return 0;
1778 else
1779 return -EINVAL;
1780}
1781#else
1782/**
1783 * wlan_hdd_nl_init() - wrapper function to non CNSS_LOGGER case
1784 * @hdd_ctx: the hdd context pointer
1785 *
1786 * In case of non CNSS_LOGGER case, the nl_srv_init() will initialize
1787 * the netlink socket and return the success or not.
1788 *
1789 * Return: the return value from nl_srv_init()
1790 */
1791static inline int wlan_hdd_nl_init(hdd_context_t *hdd_ctx)
1792{
1793 return nl_srv_init(hdd_ctx->wiphy);
1794}
1795#endif
Deepak Dhamdhere5cdce842016-05-31 10:39:12 -07001796QDF_STATUS hdd_sme_close_session_callback(void *pContext);
1797
Varun Reddy Yeturu3e91dad2016-07-18 15:58:47 -07001798int hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid,
1799 const uint8_t channel, const handoff_src src);
1800
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301801int hdd_register_cb(hdd_context_t *hdd_ctx);
1802void hdd_deregister_cb(hdd_context_t *hdd_ctx);
Arun Khandavalli7e857c32016-06-26 12:07:16 +05301803int hdd_start_station_adapter(hdd_adapter_t *adapter);
1804int hdd_start_ap_adapter(hdd_adapter_t *adapter);
Arun Khandavallifae92942016-08-01 13:31:08 +05301805int hdd_configure_cds(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter);
Arun Khandavalli7e857c32016-06-26 12:07:16 +05301806int hdd_start_ftm_adapter(hdd_adapter_t *adapter);
Arun Khandavalli2358d522016-05-16 18:05:37 +05301807int hdd_set_fw_params(hdd_adapter_t *adapter);
Arun Khandavallifae92942016-08-01 13:31:08 +05301808int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
1809 bool reinit);
1810int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool shutdown);
1811int hdd_start_adapter(hdd_adapter_t *adapter);
1812#ifdef WLAN_FEATURE_FASTPATH
1813void hdd_enable_fastpath(struct hdd_config *hdd_cfg,
1814 void *context);
1815#else
1816static inline void hdd_enable_fastpath(struct hdd_config *hdd_cfg,
1817 void *context)
1818{
1819}
1820#endif
1821void hdd_wlan_update_target_info(hdd_context_t *hdd_ctx, void *context);
Srinivas Girigowdad9e6f7b2016-02-01 19:37:52 -08001822
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001823#endif /* end #if !defined(WLAN_HDD_MAIN_H) */