blob: 79149fa8d1254e1ea6eec75b69e160bce69d7ed7 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42#if !defined( WLAN_HDD_MAIN_H )
43#define WLAN_HDD_MAIN_H
44/**===========================================================================
45
46 \file WLAN_HDD_MAIN_H.h
47
48 \brief Linux HDD Adapter Type
49 Copyright 2008 (c) Qualcomm, Incorporated.
50 All Rights Reserved.
51 Qualcomm Confidential and Proprietary.
52
53 ==========================================================================*/
54
55/*---------------------------------------------------------------------------
56 Include files
57 -------------------------------------------------------------------------*/
58
59#include <linux/netdevice.h>
60#include <linux/skbuff.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070061#include <net/cfg80211.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070062#include <vos_list.h>
63#include <vos_types.h>
64#include "sirMacProtDef.h"
65#include "csrApi.h"
66#include <wlan_hdd_assoc.h>
67#include <wlan_hdd_dp_utils.h>
68#include <wlan_hdd_wmm.h>
69#include <wlan_hdd_cfg.h>
70#include <linux/spinlock.h>
Sameer Thalappil50dc0092013-02-19 17:23:33 -080071#ifdef WLAN_OPEN_SOURCE
Jeff Johnsone7245742012-09-05 17:12:55 -070072#include <linux/wakelock.h>
Sameer Thalappil50dc0092013-02-19 17:23:33 -080073#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070074#include <wlan_hdd_ftm.h>
Chilam Ng01120412013-02-19 18:32:21 -080075#ifdef FEATURE_WLAN_TDLS
76#include "wlan_hdd_tdls.h"
77#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070078/*---------------------------------------------------------------------------
79 Preprocessor definitions and constants
80 -------------------------------------------------------------------------*/
81/** Number of attempts to detect/remove card */
82#define LIBRA_CARD_INSERT_DETECT_MAX_COUNT 5
83#define LIBRA_CARD_REMOVE_DETECT_MAX_COUNT 5
84/** Number of Tx Queues */
85#define NUM_TX_QUEUES 4
Jeff Johnson295189b2012-06-20 16:38:30 -070086/** HDD's internal Tx Queue Length. Needs to be a power of 2 */
87#define HDD_TX_QUEUE_MAX_LEN 128
88/** HDD internal Tx Queue Low Watermark. Net Device TX queue is disabled
89 * when HDD queue becomes full. This Low watermark is used to enable
90 * the Net Device queue again */
91#define HDD_TX_QUEUE_LOW_WATER_MARK (HDD_TX_QUEUE_MAX_LEN*3/4)
92/** Bytes to reserve in the headroom */
93#define LIBRA_HW_NEEDED_HEADROOM 128
94/** Hdd Tx Time out value */
95#ifdef LIBRA_LINUX_PC
96#define HDD_TX_TIMEOUT (8000)
97#else
98#define HDD_TX_TIMEOUT msecs_to_jiffies(5000)
99#endif
100/** Hdd Default MTU */
101#define HDD_DEFAULT_MTU (1500)
Jeff Johnson6a81ca42013-04-05 10:37:08 -0700102
Jeff Johnson295189b2012-06-20 16:38:30 -0700103/**event flags registered net device*/
Jeff Johnson6a81ca42013-04-05 10:37:08 -0700104#define NET_DEVICE_REGISTERED (0)
105#define SME_SESSION_OPENED (1)
106#define INIT_TX_RX_SUCCESS (2)
107#define WMM_INIT_DONE (3)
108#define SOFTAP_BSS_STARTED (4)
109#define DEVICE_IFACE_OPENED (5)
110#define TDLS_INIT_DONE (6)
Jeff Johnson295189b2012-06-20 16:38:30 -0700111
112/** Maximum time(ms)to wait for disconnect to complete **/
113#define WLAN_WAIT_TIME_DISCONNECT 500
114#define WLAN_WAIT_TIME_STATS 800
115#define WLAN_WAIT_TIME_POWER 800
Sameer Thalappilda4eb6a2013-09-25 11:45:07 -0700116#define WLAN_WAIT_TIME_COUNTRY 1000
Kiet Lam46b8e4e2013-11-06 21:49:53 +0530117#define WLAN_WAIT_TIME_CHANNEL_UPDATE 600
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700118/* Amount of time to wait for sme close session callback.
119 This value should be larger than the timeout used by WDI to wait for
120 a response from WCNSS */
121#define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000
Jeff Johnson295189b2012-06-20 16:38:30 -0700122#define WLAN_WAIT_TIME_ABORTSCAN 2000
123
Hoonki Lee11f7dda2013-02-14 16:55:44 -0800124/** Maximum time(ms) to wait for tdls add sta to complete **/
125#define WAIT_TIME_TDLS_ADD_STA 1500
126
Gopichand Nakkalae7cbc5d2013-03-27 21:09:23 -0700127/** Maximum time(ms) to wait for tdls del sta to complete **/
128#define WAIT_TIME_TDLS_DEL_STA 1500
129
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530130/** Maximum time(ms) to wait for Link Establish Req to complete **/
131#define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500
132
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800133/** Maximum time(ms) to wait for tdls mgmt to complete **/
Gopichand Nakkala21c3f9b2013-03-23 14:45:55 -0700134#define WAIT_TIME_TDLS_MGMT 11000
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800135
Hoonki Lee14621352013-04-16 17:51:19 -0700136/** Maximum time(ms) to wait for tdls initiator to start direct communication **/
Gopichand Nakkala9b4eee12013-05-21 16:05:48 +0530137#define WAIT_TIME_TDLS_INITIATOR 600
Amar Singhalfddc28c2013-09-05 13:03:40 -0700138
139/* Maximum time to get linux regulatory entry settings */
Amar Singhala49cbc52013-10-08 18:37:44 -0700140#ifdef CONFIG_ENABLE_LINUX_REG
Amar Singhalfddc28c2013-09-05 13:03:40 -0700141#define LINUX_REG_WAIT_TIME 300
Amar Singhala49cbc52013-10-08 18:37:44 -0700142#else
143#define CRDA_WAIT_TIME 300
144#endif
Madan Mohan Koyyalamudic3a240c2012-09-28 15:34:08 -0700145
Jeff Johnson295189b2012-06-20 16:38:30 -0700146/* Scan Req Timeout */
147#define WLAN_WAIT_TIME_SCAN_REQ 100
148
149#define MAX_NUMBER_OF_ADAPTERS 4
150
151#define MAX_CFG_STRING_LEN 255
152
153#define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
154/** Mac Address string **/
155#define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x"
Arif Hussained667642013-10-27 23:01:14 -0700156#define MAC_ADDRESS_STR_LEN 18 /* Including null terminator */
Jeff Johnson295189b2012-06-20 16:38:30 -0700157#define MAX_GENIE_LEN 255
158
Jeff Johnson295189b2012-06-20 16:38:30 -0700159#define WLAN_CHIP_VERSION "WCNSS"
Jeff Johnson295189b2012-06-20 16:38:30 -0700160
161#define hddLog(level, args...) VOS_TRACE( VOS_MODULE_ID_HDD, level, ## args)
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -0700162#define ENTER() VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "Enter:%s", __func__)
163#define EXIT() VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "Exit:%s", __func__)
Jeff Johnson295189b2012-06-20 16:38:30 -0700164
165#define WLAN_HDD_GET_PRIV_PTR(__dev__) (hdd_adapter_t*)(netdev_priv((__dev__)))
166
167#define MAX_EXIT_ATTEMPTS_DURING_LOGP 20
168
169#define MAX_NO_OF_2_4_CHANNELS 14
170
Jeff Johnsone7245742012-09-05 17:12:55 -0700171#define WLAN_HDD_PUBLIC_ACTION_FRAME 4
172#define WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET 24
173#define WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET 30
174#define WLAN_HDD_P2P_SOCIAL_CHANNELS 3
Madan Mohan Koyyalamudi8d50f312012-11-27 15:48:57 -0800175#define WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN 1
Jeff Johnsone7245742012-09-05 17:12:55 -0700176
Gopichand Nakkala1f7a64f2013-04-01 18:37:17 +0530177#define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \
178(((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462))
179
Madan Mohan Koyyalamudi71278262013-04-12 22:00:48 +0530180#define WLAN_HDD_CHANNEL_IN_UNII_1_BAND(center_freq) \
181(((center_freq) == 5180 ) || ((center_freq) == 5200) \
182|| ((center_freq) == 5220) || ((center_freq) == 5240))
183
Chet Lanctot186b5732013-03-18 10:26:30 -0700184#ifdef WLAN_FEATURE_11W
185#define WLAN_HDD_SA_QUERY_ACTION_FRAME 8
186#endif
187
Hoonki Lee1090c6a2013-01-16 17:40:54 -0800188#define WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP 14
189#define WLAN_HDD_TDLS_ACTION_FRAME 12
Jeff Johnsone7245742012-09-05 17:12:55 -0700190#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
Sameer Thalappil84b14ff2013-06-12 16:02:52 -0700191#define HDD_WAKE_LOCK_DURATION 50 //in msecs
Jeff Johnsone7245742012-09-05 17:12:55 -0700192#endif
193
Amar Singhal6144c002013-05-03 16:11:42 -0700194#define HDD_SAP_WAKE_LOCK_DURATION 10000 //in msecs
Madan Mohan Koyyalamudi69fc3ad2012-11-28 16:04:56 -0800195
Sameer Thalappil451ebb92013-06-28 15:49:58 -0700196#define HDD_MOD_EXIT_SSR_MAX_RETRIES 30
197
Sunil Ravia72c3992013-01-31 06:12:22 -0800198/* Maximum number of interfaces allowed(STA, P2P Device, P2P Interface) */
199#define WLAN_MAX_INTERFACES 3
200
Gopichand Nakkala870cbae2013-03-15 21:16:09 +0530201#ifdef WLAN_FEATURE_GTK_OFFLOAD
202#define GTK_OFFLOAD_ENABLE 0
203#define GTK_OFFLOAD_DISABLE 1
204#endif
205
Madan Mohan Koyyalamudi1d16f462013-08-27 16:25:34 +0530206#ifdef FEATURE_WLAN_SCAN_PNO
207#define HDD_PNO_SCAN_TIMERS_SET_ONE 1
208/* value should not be greater than PNO_MAX_SCAN_TIMERS */
209#define HDD_PNO_SCAN_TIMERS_SET_MULTIPLE 6
210#endif
211
Gopichand Nakkala3d295922013-05-07 16:19:14 +0530212#define HDD_MAC_ADDR_LEN 6
213typedef v_U8_t tWlanHddMacAddr[HDD_MAC_ADDR_LEN];
214
Rajeev79dbe4c2013-10-05 11:03:42 +0530215#ifdef FEATURE_WLAN_BATCH_SCAN
216#define HDD_BATCH_SCAN_VERSION (17)
217#define HDD_SET_BATCH_SCAN_DEFAULT_FREQ (30)/*batch scan frequency default 30s*/
218#define HDD_SET_BATCH_SCAN_BEST_NETWORK (16)/*best network default value*/
219#define HDD_SET_BATCH_SCAN_DEFAULT_BAND (0)/*auto means both 2.4GHz and 5GHz*/
220#define HDD_SET_BATCH_SCAN_24GHz_BAND_ONLY (1)/*only 2.4GHz band*/
221#define HDD_SET_BATCH_SCAN_5GHz_BAND_ONLY (2)/*only 5GHz band*/
222#define HDD_SET_BATCH_SCAN_REQ_TIME_OUT (15000) /*Batch scan req timeout in ms*/
223#define HDD_GET_BATCH_SCAN_RSP_TIME_OUT (15000) /*Batch scan req timeout in ms*/
224#define HDD_BATCH_SCAN_AP_META_INFO_SIZE (150) /*AP meta info size in string*/
225
226#define MIN(a, b) (a > b ? b : a)
227
228#endif
229
Jeff Johnson72a40512013-12-19 10:14:15 -0800230/*
231 * Generic asynchronous request/response support
232 *
233 * Many of the APIs supported by HDD require a call to SME to
234 * perform an action or to retrieve some data. In most cases SME
235 * performs the operation asynchronously, and will execute a provided
236 * callback function when the request has completed. In order to
237 * synchronize this the HDD API allocates a context which is then
238 * passed to SME, and which is then, in turn, passed back to the
239 * callback function when the operation completes. The callback
240 * function then sets a completion variable inside the context which
241 * the HDD API is waiting on. In an ideal world the HDD API would
242 * wait forever (or at least for a long time) for the response to be
243 * received and for the completion variable to be set. However in
244 * most cases these HDD APIs are being invoked in the context of a
245 * userspace thread which has invoked either a cfg80211 API or a
246 * wireless extensions ioctl and which has taken the kernel rtnl_lock.
247 * Since this lock is used to synchronize many of the kernel tasks, we
248 * do not want to hold it for a long time. In addition we do not want
249 * to block userspace threads (such as the wpa supplicant's main
250 * thread) for an extended time. Therefore we only block for a short
251 * time waiting for the response before we timeout. This means that
252 * it is possible for the HDD API to timeout, and for the callback to
253 * be invoked afterwards. In order for the callback function to
254 * determine if the HDD API is still waiting, a magic value is also
255 * stored in the shared context. Only if the context has a valid
256 * magic will the callback routine do any work. In order to further
257 * synchronize these activities a spinlock is used so that if any HDD
258 * API timeout coincides with its callback, the operations of the two
259 * threads will be serialized.
260 */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700261struct statsContext
262{
263 struct completion completion;
264 hdd_adapter_t *pAdapter;
265 unsigned int magic;
266};
267
Jeff Johnson72a40512013-12-19 10:14:15 -0800268extern spinlock_t hdd_context_lock;
269
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700270#define STATS_CONTEXT_MAGIC 0x53544154 //STAT
Jeff Johnson72a40512013-12-19 10:14:15 -0800271#define RSSI_CONTEXT_MAGIC 0x52535349 //RSSI
272#define POWER_CONTEXT_MAGIC 0x504F5752 //POWR
273#define SNR_CONTEXT_MAGIC 0x534E5200 //SNR
Rajeev79dbe4c2013-10-05 11:03:42 +0530274
Jeff Johnson295189b2012-06-20 16:38:30 -0700275typedef struct hdd_tx_rx_stats_s
276{
277 // start_xmit stats
278 __u32 txXmitCalled;
279 __u32 txXmitDropped;
280 __u32 txXmitBackPressured;
281 __u32 txXmitQueued;
282 __u32 txXmitClassifiedAC[NUM_TX_QUEUES];
283 __u32 txXmitDroppedAC[NUM_TX_QUEUES];
284 __u32 txXmitBackPressuredAC[NUM_TX_QUEUES];
285 __u32 txXmitQueuedAC[NUM_TX_QUEUES];
286 // fetch_cbk stats
287 __u32 txFetched;
288 __u32 txFetchedAC[NUM_TX_QUEUES];
289 __u32 txFetchEmpty;
290 __u32 txFetchLowResources;
291 __u32 txFetchDequeueError;
292 __u32 txFetchDequeued;
293 __u32 txFetchDequeuedAC[NUM_TX_QUEUES];
294 __u32 txFetchDePressured;
295 __u32 txFetchDePressuredAC[NUM_TX_QUEUES];
296 // complete_cbk_stats
297 __u32 txCompleted;
298 // flush stats
299 __u32 txFlushed;
300 __u32 txFlushedAC[NUM_TX_QUEUES];
301 // rx stats
302 __u32 rxChains;
303 __u32 rxPackets;
304 __u32 rxDropped;
305 __u32 rxDelivered;
306 __u32 rxRefused;
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -0700307 __u32 pkt_tx_count; //TX pkt Counter used for dynamic splitscan
308 __u32 pkt_rx_count; //RX pkt Counter used for dynamic splitscan
Jeff Johnson295189b2012-06-20 16:38:30 -0700309} hdd_tx_rx_stats_t;
310
311typedef struct hdd_chip_reset_stats_s
312{
313 __u32 totalLogpResets;
314 __u32 totalCMD53Failures;
315 __u32 totalMutexReadFailures;
316 __u32 totalMIFErrorFailures;
317 __u32 totalFWHearbeatFailures;
318 __u32 totalUnknownExceptions;
319} hdd_chip_reset_stats_t;
320
Chet Lanctot186b5732013-03-18 10:26:30 -0700321#ifdef WLAN_FEATURE_11W
322typedef struct hdd_pmf_stats_s
323{
324 uint8 numUnprotDeauthRx;
325 uint8 numUnprotDisassocRx;
326} hdd_pmf_stats_t;
327#endif
328
Jeff Johnson295189b2012-06-20 16:38:30 -0700329typedef struct hdd_stats_s
330{
331 tCsrSummaryStatsInfo summary_stat;
332 tCsrGlobalClassAStatsInfo ClassA_stat;
333 tCsrGlobalClassBStatsInfo ClassB_stat;
334 tCsrGlobalClassCStatsInfo ClassC_stat;
335 tCsrGlobalClassDStatsInfo ClassD_stat;
336 tCsrPerStaStatsInfo perStaStats;
337 hdd_tx_rx_stats_t hddTxRxStats;
338 hdd_chip_reset_stats_t hddChipResetStats;
Chet Lanctot186b5732013-03-18 10:26:30 -0700339#ifdef WLAN_FEATURE_11W
340 hdd_pmf_stats_t hddPmfStats;
341#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700342} hdd_stats_t;
343
344typedef enum
345{
346 HDD_ROAM_STATE_NONE,
347
348 // Issuing a disconnect due to transition into low power states.
349 HDD_ROAM_STATE_DISCONNECTING_POWER,
350
351 // move to this state when HDD sets a key with SME/CSR. Note this is
352 // an important state to get right because we will get calls into our SME
353 // callback routine for SetKey activity that we did not initiate!
354 HDD_ROAM_STATE_SETTING_KEY,
355} HDD_ROAM_STATE;
356
357typedef enum
358{
359 eHDD_SUSPEND_NONE = 0,
360 eHDD_SUSPEND_DEEP_SLEEP,
361 eHDD_SUSPEND_STANDBY,
362} hdd_ps_state_t;
363
364typedef struct roaming_info_s
365{
366 HDD_ROAM_STATE roamingState;
367 vos_event_t roamingEvent;
Gopichand Nakkala3d295922013-05-07 16:19:14 +0530368
369 tWlanHddMacAddr bssid;
370 tWlanHddMacAddr peerMac;
371 tANI_U32 roamId;
372 eRoamCmdStatus roamStatus;
373 v_BOOL_t deferKeyComplete;
Jeff Johnson295189b2012-06-20 16:38:30 -0700374
375} roaming_info_t;
376
377#ifdef FEATURE_WLAN_WAPI
378/* Define WAPI macros for Length, BKID count etc*/
379#define MAX_WPI_KEY_LENGTH 16
380#define MAX_NUM_PN 16
381#define MAC_ADDR_LEN 6
382#define MAX_ADDR_INDEX 12
383#define MAX_NUM_AKM_SUITES 16
384#define MAX_NUM_UNI_SUITES 16
385#define MAX_NUM_BKIDS 16
Jeff Johnson295189b2012-06-20 16:38:30 -0700386
387/** WAPI AUTH mode definition */
388enum _WAPIAuthMode
389{
390 WAPI_AUTH_MODE_OPEN = 0,
391 WAPI_AUTH_MODE_PSK = 1,
392 WAPI_AUTH_MODE_CERT
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700393} __packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700394typedef enum _WAPIAuthMode WAPIAuthMode;
395
396/** WAPI Work mode structure definition */
397#define WZC_ORIGINAL 0
398#define WAPI_EXTENTION 1
399
400struct _WAPI_FUNCTION_MODE
401{
402 unsigned char wapiMode;
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700403}__packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700404
405typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE;
406
407typedef struct _WAPI_BKID
408{
409 v_U8_t bkid[16];
410}WAPI_BKID, *pWAPI_BKID;
411
412/** WAPI Association information structure definition */
413struct _WAPI_AssocInfo
414{
415 v_U8_t elementID;
416 v_U8_t length;
417 v_U16_t version;
418 v_U16_t akmSuiteCount;
419 v_U32_t akmSuite[MAX_NUM_AKM_SUITES];
420 v_U16_t unicastSuiteCount;
421 v_U32_t unicastSuite[MAX_NUM_UNI_SUITES];
422 v_U32_t multicastSuite;
423 v_U16_t wapiCability;
424 v_U16_t bkidCount;
425 WAPI_BKID bkidList[MAX_NUM_BKIDS];
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700426} __packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700427
428typedef struct _WAPI_AssocInfo WAPI_AssocInfo;
429typedef struct _WAPI_AssocInfo *pWAPI_IEAssocInfo;
430
431/** WAPI KEY Type definition */
432enum _WAPIKeyType
433{
434 PAIRWISE_KEY, //0
435 GROUP_KEY //1
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700436}__packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700437typedef enum _WAPIKeyType WAPIKeyType;
438
439/** WAPI KEY Direction definition */
440enum _KEY_DIRECTION
441{
442 None,
443 Rx,
444 Tx,
445 Rx_Tx
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700446}__packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700447
448typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION;
449
450/** WAPI KEY stucture definition */
451struct WLAN_WAPI_KEY
452{
453 WAPIKeyType keyType;
454 WAPI_KEY_DIRECTION keyDirection; /*reserved for future use*/
455 v_U8_t keyId;
456 v_U8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use*/
457 int wpiekLen;
458 v_U8_t wpiek[MAX_WPI_KEY_LENGTH];
459 int wpickLen;
460 v_U8_t wpick[MAX_WPI_KEY_LENGTH];
461 v_U8_t pn[MAX_NUM_PN]; /*reserved for future use*/
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700462}__packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700463
464typedef struct WLAN_WAPI_KEY WLAN_WAPI_KEY;
465typedef struct WLAN_WAPI_KEY *pWLAN_WAPI_KEY;
466
467#define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
468#define WLAN_EID_WAPI 68
469#define WAPI_PSK_AKM_SUITE 0x02721400
470#define WAPI_CERT_AKM_SUITE 0x01721400
471
472/** WAPI BKID List stucture definition */
473struct _WLAN_BKID_LIST
474{
475 v_U32_t length;
476 v_U32_t BKIDCount;
477 WAPI_BKID BKID[1];
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700478}__packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700479
480typedef struct _WLAN_BKID_LIST WLAN_BKID_LIST;
481typedef struct _WLAN_BKID_LIST *pWLAN_BKID_LIST;
482
483
484/** WAPI Information stucture definition */
485struct hdd_wapi_info_s
486{
487 v_U32_t nWapiMode;
488 v_BOOL_t fIsWapiSta;
489 v_MACADDR_t cachedMacAddr;
490 v_UCHAR_t wapiAuthMode;
Madan Mohan Koyyalamudi4e31b132012-11-02 13:13:52 -0700491}__packed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700492typedef struct hdd_wapi_info_s hdd_wapi_info_t;
493#endif /* FEATURE_WLAN_WAPI */
494
Jeff Johnson295189b2012-06-20 16:38:30 -0700495typedef struct beacon_data_s {
496 u8 *head, *tail;
497 int head_len, tail_len;
498 int dtim_period;
499} beacon_data_t;
Jeff Johnson295189b2012-06-20 16:38:30 -0700500
501typedef enum device_mode
502{ /* MAINTAIN 1 - 1 CORRESPONDENCE WITH tVOS_CON_MODE*/
503 WLAN_HDD_INFRA_STATION,
504 WLAN_HDD_SOFTAP,
505 WLAN_HDD_P2P_CLIENT,
506 WLAN_HDD_P2P_GO,
Jeff Johnson88ba7742013-02-27 14:36:02 -0800507 WLAN_HDD_MONITOR,
508 WLAN_HDD_FTM,
Shailender Karmuchia734f332013-04-19 14:02:48 -0700509 WLAN_HDD_IBSS,
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -0700510 WLAN_HDD_P2P_DEVICE
Jeff Johnson295189b2012-06-20 16:38:30 -0700511}device_mode_t;
512
513typedef enum rem_on_channel_request_type
514{
515 REMAIN_ON_CHANNEL_REQUEST,
516 OFF_CHANNEL_ACTION_TX,
517}rem_on_channel_request_type_t;
518
519/* Thermal mitigation Level Enum Type */
520typedef enum
521{
522 WLAN_HDD_TM_LEVEL_0,
523 WLAN_HDD_TM_LEVEL_1,
524 WLAN_HDD_TM_LEVEL_2,
525 WLAN_HDD_TM_LEVEL_3,
526 WLAN_HDD_TM_LEVEL_4,
527 WLAN_HDD_TM_LEVEL_MAX
528} WLAN_TmLevelEnumType;
529
530/* Driver Action based on thermal mitigation level structure */
531typedef struct
532{
533 v_BOOL_t ampduEnable;
534 v_BOOL_t enterImps;
535 v_U32_t txSleepDuration;
536 v_U32_t txOperationDuration;
537 v_U32_t txBlockFrameCountThreshold;
538} hdd_tmLevelAction_t;
539
540/* Thermal Mitigation control context structure */
541typedef struct
542{
543 WLAN_TmLevelEnumType currentTmLevel;
544 hdd_tmLevelAction_t tmAction;
545 vos_timer_t txSleepTimer;
546 struct mutex tmOperationLock;
547 vos_event_t setTmDoneEvent;
548 v_U32_t txFrameCount;
549 v_TIME_t lastblockTs;
550 v_TIME_t lastOpenTs;
551 struct netdev_queue *blockedQueue;
Leo Chang50bbd252013-04-25 14:58:01 -0700552 v_BOOL_t qBlocked;
Jeff Johnson295189b2012-06-20 16:38:30 -0700553} hdd_thermal_mitigation_info_t;
554
Jeff Johnson295189b2012-06-20 16:38:30 -0700555typedef struct hdd_remain_on_chan_ctx
556{
557 struct net_device *dev;
558 struct ieee80211_channel chan;
559 enum nl80211_channel_type chan_type;
560 unsigned int duration;
561 u64 cookie;
562 rem_on_channel_request_type_t rem_on_chan_request;
563}hdd_remain_on_chan_ctx_t;
564
Jeff Johnsone7245742012-09-05 17:12:55 -0700565typedef enum{
566 HDD_IDLE,
567 HDD_PD_REQ_ACK_PENDING,
568 HDD_GO_NEG_REQ_ACK_PENDING,
569 HDD_INVALID_STATE,
570}eP2PActionFrameState;
571
572typedef enum {
573 WLAN_HDD_GO_NEG_REQ,
574 WLAN_HDD_GO_NEG_RESP,
575 WLAN_HDD_GO_NEG_CNF,
576 WLAN_HDD_INVITATION_REQ,
577 WLAN_HDD_INVITATION_RESP,
578 WLAN_HDD_DEV_DIS_REQ,
579 WLAN_HDD_DEV_DIS_RESP,
580 WLAN_HDD_PROV_DIS_REQ,
581 WLAN_HDD_PROV_DIS_RESP,
582}tActionFrmType;
583
Jeff Johnson295189b2012-06-20 16:38:30 -0700584typedef struct hdd_cfg80211_state_s
585{
586 tANI_U16 current_freq;
587 u64 action_cookie;
588 tANI_U8 *buf;
589 size_t len;
590 struct sk_buff *skb;
591 hdd_remain_on_chan_ctx_t* remain_on_chan_ctx;
Jeff Johnsone7245742012-09-05 17:12:55 -0700592 eP2PActionFrameState actionFrmState;
Jeff Johnson295189b2012-06-20 16:38:30 -0700593}hdd_cfg80211_state_t;
594
Madan Mohan Koyyalamudib5da5332012-10-15 17:23:21 -0700595
596typedef enum{
597 HDD_SSR_NOT_REQUIRED,
598 HDD_SSR_REQUIRED,
599 HDD_SSR_DISABLED,
600}e_hdd_ssr_required;
601
Jeff Johnson295189b2012-06-20 16:38:30 -0700602struct hdd_station_ctx
603{
604 /** Handle to the Wireless Extension State */
605 hdd_wext_state_t WextState;
606
Gopichand Nakkala4327a152013-03-04 23:22:42 -0800607#ifdef FEATURE_WLAN_TDLS
608 tdlsCtx_t *pHddTdlsCtx;
609#endif
610
611
Jeff Johnson295189b2012-06-20 16:38:30 -0700612 /**Connection information*/
613 connection_info_t conn_info;
614
615 roaming_info_t roam_info;
616
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700617#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -0700618 int ft_carrier_on;
619#endif
Gopichand Nakkala870cbae2013-03-15 21:16:09 +0530620
621#ifdef WLAN_FEATURE_GTK_OFFLOAD
Gopichand Nakkalad36ee622013-05-07 14:13:27 +0530622 tSirGtkOffloadParams gtkOffloadReqParams;
Gopichand Nakkala870cbae2013-03-15 21:16:09 +0530623#endif
Shailender Karmuchi15cd0672013-05-15 19:50:04 -0700624 /*Increment whenever ibss New peer joins and departs the network */
625 int ibss_sta_generation;
Shailender Karmuchi642e9812013-05-30 14:34:49 -0700626
627 /*Save the wep/wpa-none keys*/
628 tCsrRoamSetKey ibss_enc_key;
Srinivas Girigowda66c05eb2013-07-14 13:06:01 -0700629
630 v_BOOL_t hdd_ReassocScenario;
Jeff Johnson295189b2012-06-20 16:38:30 -0700631};
632
633#define BSS_STOP 0
634#define BSS_START 1
635typedef struct hdd_hostapd_state_s
636{
637 int bssState;
638 vos_event_t vosEvent;
639 VOS_STATUS vosStatus;
640 v_BOOL_t bCommit;
641
642} hdd_hostapd_state_t;
643
644
645/*
646 * Per station structure kept in HDD for multiple station support for SoftAP
647*/
648typedef struct {
649 /** The station entry is used or not */
650 v_BOOL_t isUsed;
651
652 /** Station ID reported back from HAL (through SAP). Broadcast
653 * uses station ID zero by default in both libra and volans. */
654 v_U8_t ucSTAId;
655
656 /** MAC address of the station */
657 v_MACADDR_t macAddrSTA;
658
659 /** Current Station state so HDD knows how to deal with packet
660 * queue. Most recent states used to change TL STA state. */
661 WLANTL_STAStateType tlSTAState;
662
663 /** Transmit queues for each AC (VO,VI,BE etc). */
664 hdd_list_t wmm_tx_queue[NUM_TX_QUEUES];
665
666 /** Might need to differentiate queue depth in contention case */
667 v_U16_t aTxQueueDepth[NUM_TX_QUEUES];
668
669 /**Track whether OS TX queue has been disabled.*/
670 v_BOOL_t txSuspended[NUM_TX_QUEUES];
671
Madan Mohan Koyyalamudifd3b7a92013-10-10 15:02:58 +0530672 /**Track whether 3/4th of resources are used */
673 v_BOOL_t vosLowResource;
674
Jeff Johnson295189b2012-06-20 16:38:30 -0700675 /** Track QoS status of station */
676 v_BOOL_t isQosEnabled;
677
Madan Mohan Koyyalamudicd784992013-01-11 15:30:36 -0800678 /** The station entry for which Deauth is in progress */
679 v_BOOL_t isDeauthInProgress;
Jeff Johnson295189b2012-06-20 16:38:30 -0700680} hdd_station_info_t;
681
682struct hdd_ap_ctx_s
683{
684 hdd_hostapd_state_t HostapdState;
685
686 // Memory differentiation mode is enabled
687 //v_U16_t uMemoryDiffThreshold;
688 //v_U8_t uNumActiveAC;
689 //v_U8_t uActiveACMask;
690 //v_U8_t aTxQueueLimit[NUM_TX_QUEUES];
691
692 /** Packet Count to update uNumActiveAC and uActiveACMask */
693 //v_U16_t uUpdatePktCount;
694
695 /** Station ID assigned after BSS starts */
696 v_U8_t uBCStaId;
697
698 v_U8_t uPrivacy; // The privacy bits of configuration
Jeff Johnson7dda7772013-02-27 08:36:13 -0800699
Jeff Johnson295189b2012-06-20 16:38:30 -0700700 tSirWPSPBCProbeReq WPSPBCProbeReq;
Jeff Johnson7dda7772013-02-27 08:36:13 -0800701
Jeff Johnson295189b2012-06-20 16:38:30 -0700702 tsap_Config_t sapConfig;
Jeff Johnson7dda7772013-02-27 08:36:13 -0800703
Jeff Johnson295189b2012-06-20 16:38:30 -0700704 struct semaphore semWpsPBCOverlapInd;
705
706 v_BOOL_t apDisableIntraBssFwd;
707
708 vos_timer_t hdd_ap_inactivity_timer;
709
710 v_U8_t operatingChannel;
711
712 v_BOOL_t uIsAuthenticated;
713
714 eCsrEncryptionType ucEncryptType;
715
Jeff Johnson295189b2012-06-20 16:38:30 -0700716 //This will point to group key data, if it is received before start bss.
717 tCsrRoamSetKey groupKey;
718 // This will have WEP key data, if it is received before start bss
719 tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY];
720
721 beacon_data_t *beacon;
Jeff Johnson295189b2012-06-20 16:38:30 -0700722};
723
Jeff Johnson295189b2012-06-20 16:38:30 -0700724struct hdd_mon_ctx_s
725{
726 hdd_adapter_t *pAdapterForTx;
727};
Jeff Johnson295189b2012-06-20 16:38:30 -0700728
729typedef struct hdd_scaninfo_s
730{
731 /* The scan id */
732 v_U32_t scanId;
733
734 /* The scan pending */
735 v_U32_t mScanPending;
736
Kiet Lamac06e2c2013-10-23 16:25:07 +0530737 /* Counter for mScanPending so that the scan pending
738 error log is not printed for more than 5 times */
739 v_U32_t mScanPendingCounter;
740
Jeff Johnson295189b2012-06-20 16:38:30 -0700741 /* Client Wait Scan Result */
742 v_U32_t waitScanResult;
743
Jeff Johnson295189b2012-06-20 16:38:30 -0700744 /* Additional IE for scan */
745 tSirAddie scanAddIE;
746
747 /* Scan mode*/
748 tSirScanType scan_mode;
749
750 /* Scan Completion Event */
751 struct completion scan_req_completion_event;
752
Madan Mohan Koyyalamudif4e81002012-11-13 10:46:38 -0800753 /* completion variable for abortscan */
754 struct completion abortscan_event_var;
755
Jeff Johnson295189b2012-06-20 16:38:30 -0700756 vos_event_t scan_finished_event;
757
758 hdd_scan_pending_option_e scan_pending_option;
759
760}hdd_scaninfo_t;
761
Gopichand Nakkala0f276812013-02-24 14:45:51 +0530762#define WLAN_HDD_MAX_MC_ADDR_LIST 10
763
764#ifdef WLAN_FEATURE_PACKET_FILTERING
765typedef struct multicast_addr_list
766{
767 v_U8_t isFilterApplied;
768 v_U8_t mc_cnt;
769 v_U8_t addr[WLAN_HDD_MAX_MC_ADDR_LIST][ETH_ALEN];
770} t_multicast_add_list;
771#endif
772
Rajeev79dbe4c2013-10-05 11:03:42 +0530773#ifdef FEATURE_WLAN_BATCH_SCAN
774
775/*Batch scan repsonse AP info*/
776typedef struct
777{
778 /*Batch ID*/
779 tANI_U32 batchId;
780 /*is it last AP in GET BATCH SCAN RSP*/
781 v_BOOL_t isLastAp;
782 /*BSSID*/
783 tANI_U8 bssid[SIR_MAC_ADDR_LEN];
784 /*SSID*/
785 tANI_U8 ssid[SIR_MAX_SSID_SIZE];
786 /*Channel*/
787 tANI_U8 ch;
788 /*RSSI or Level*/
789 tANI_U8 rssi;
790 /*Age*/
791 tANI_U32 age;
792}tHDDbatchScanRspApInfo;
793
794/*Batch scan response list*/
795struct tHDDBatchScanRspList
796{
797 tHDDbatchScanRspApInfo ApInfo;
798 struct tHDDBatchScanRspList *pNext;
799};
800
801typedef struct tHDDBatchScanRspList tHddBatchScanRsp;
Rajeev Kumar20140c12013-10-21 19:39:02 -0700802
803/*Batch Scan state*/
804typedef enum
805{
806 /*Batch scan is started this means WLS_BATCHING SET command is issued
807 from framework*/
808 eHDD_BATCH_SCAN_STATE_STARTED,
809
810 /*Batch scan is stopped this means WLS_BATCHING STOP command is issued
811 from framework*/
812 eHDD_BATCH_SCAN_STATE_STOPPED,
813
814 eHDD_BATCH_SCAN_STATE_MAX,
815} eHDD_BATCH_SCAN_STATE;
816
Rajeev79dbe4c2013-10-05 11:03:42 +0530817#endif
818
819
Jeff Johnson295189b2012-06-20 16:38:30 -0700820#define WLAN_HDD_ADAPTER_MAGIC 0x574c414e //ASCII "WLAN"
821struct hdd_adapter_s
822{
823 void *pHddCtx;
824
825 device_mode_t device_mode;
826
827 /** Handle to the network device */
828 struct net_device *dev;
Vinay Krishna Erannad5b2be22013-12-01 17:00:15 +0530829
830#ifdef WLAN_NS_OFFLOAD
831 /** IPv6 notifier callback for handling NS offload on change in IP */
832 struct notifier_block ipv6_notifier;
833 struct work_struct ipv6NotifierWorkQueue;
834#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700835
836 //TODO Move this to sta Ctx
Jeff Johnson295189b2012-06-20 16:38:30 -0700837 struct wireless_dev wdev ;
838 struct cfg80211_scan_request *request ;
Jeff Johnson295189b2012-06-20 16:38:30 -0700839
Jeff Johnson295189b2012-06-20 16:38:30 -0700840 /** ops checks if Opportunistic Power Save is Enable or Not
841 * ctw stores ctWindow value once we receive Opps command from
842 * wpa_supplicant then using ctWindow value we need to Enable
843 * Opportunistic Power Save
844 */
845 tANI_U8 ops;
846 tANI_U32 ctw;
Jeff Johnson295189b2012-06-20 16:38:30 -0700847
848 /** Current MAC Address for the adapter */
849 v_MACADDR_t macAddressCurrent;
850
851 /**Event Flags*/
852 unsigned long event_flags;
853
854 /**Device TX/RX statistics*/
855 struct net_device_stats stats;
856 /** HDD statistics*/
857 hdd_stats_t hdd_stats;
858 /**Mib information*/
859 sHddMib_t hdd_mib;
860
861 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700862
863 /* Completion variable for session close */
864 struct completion session_close_comp_var;
865
866 /* Completion variable for session open */
867 struct completion session_open_comp_var;
868
869 //TODO: move these to sta ctx. These may not be used in AP
870 /** completion variable for disconnect callback */
871 struct completion disconnect_comp_var;
872
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700873 /** Completion of change country code */
874 struct completion change_country_code;
875
Jeff Johnson295189b2012-06-20 16:38:30 -0700876 /* completion variable for Linkup Event */
877 struct completion linkup_event_var;
878
Jeff Johnson295189b2012-06-20 16:38:30 -0700879 /* completion variable for cancel remain on channel Event */
880 struct completion cancel_rem_on_chan_var;
881
882#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
883 /* completion variable for off channel remain on channel Event */
884 struct completion offchannel_tx_event;
885#endif
886 /* Completion variable for action frame */
887 struct completion tx_action_cnf_event;
888 /* Completion variable for remain on channel ready */
889 struct completion rem_on_chan_ready_event;
Jeff Johnson295189b2012-06-20 16:38:30 -0700890
Jeff Johnson9efb9aa2013-03-15 13:59:27 -0700891 /* Completion variable for Upper Layer Authentication */
892 struct completion ula_complete;
893
Hoonki Lee11f7dda2013-02-14 16:55:44 -0800894#ifdef FEATURE_WLAN_TDLS
895 struct completion tdls_add_station_comp;
Gopichand Nakkalae7cbc5d2013-03-27 21:09:23 -0700896 struct completion tdls_del_station_comp;
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800897 struct completion tdls_mgmt_comp;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530898 struct completion tdls_link_establish_req_comp;
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800899 eHalStatus tdlsAddStaStatus;
Hoonki Lee11f7dda2013-02-14 16:55:44 -0800900#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700901 /* Track whether the linkup handling is needed */
902 v_BOOL_t isLinkUpSvcNeeded;
903
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800904 /* Mgmt Frames TX completion status code */
905 tANI_U32 mgmtTxCompletionStatus;
906
Jeff Johnson295189b2012-06-20 16:38:30 -0700907/*************************************************************
908 * Tx Queues
909 */
910 /** Transmit queues for each AC (VO,VI,BE etc) */
911 hdd_list_t wmm_tx_queue[NUM_TX_QUEUES];
912 /**Track whether VOS is in a low resource state*/
913 v_BOOL_t isVosOutOfResource;
Madan Mohan Koyyalamudifd3b7a92013-10-10 15:02:58 +0530914
915 /**Track whether 3/4th of resources are used */
916 v_BOOL_t isVosLowResource;
Jeff Johnson295189b2012-06-20 16:38:30 -0700917
918 /**Track whether OS TX queue has been disabled.*/
919 v_BOOL_t isTxSuspended[NUM_TX_QUEUES];
920
921 /** WMM Status */
922 hdd_wmm_status_t hddWmmStatus;
923/*************************************************************
924 */
925/*************************************************************
926 * TODO - Remove it later
927 */
928 /** Multiple station supports */
929 /** Per-station structure */
930 spinlock_t staInfo_lock; //To protect access to station Info
931 hdd_station_info_t aStaInfo[WLAN_MAX_STA_COUNT];
932 //v_U8_t uNumActiveStation;
933
934 v_U16_t aTxQueueLimit[NUM_TX_QUEUES];
935/*************************************************************
936 */
937
938#ifdef FEATURE_WLAN_WAPI
939 hdd_wapi_info_t wapi_info;
940#endif
941
942 v_S7_t rssi;
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530943
944 tANI_U8 snr;
945
Jeff Johnson295189b2012-06-20 16:38:30 -0700946 struct work_struct monTxWorkQueue;
947 struct sk_buff *skb_to_tx;
Jeff Johnson295189b2012-06-20 16:38:30 -0700948
949 union {
950 hdd_station_ctx_t station;
951 hdd_ap_ctx_t ap;
Jeff Johnson295189b2012-06-20 16:38:30 -0700952 hdd_mon_ctx_t monitor;
Jeff Johnson295189b2012-06-20 16:38:30 -0700953 }sessionCtx;
954
Jeff Johnson295189b2012-06-20 16:38:30 -0700955 hdd_cfg80211_state_t cfg80211State;
Jeff Johnson295189b2012-06-20 16:38:30 -0700956
Gopichand Nakkala0f276812013-02-24 14:45:51 +0530957#ifdef WLAN_FEATURE_PACKET_FILTERING
958 t_multicast_add_list mc_addr_list;
959#endif
960
Jeff Johnson295189b2012-06-20 16:38:30 -0700961 //Magic cookie for adapter sanity verification
962 v_U32_t magic;
963 v_BOOL_t higherDtimTransition;
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530964 v_BOOL_t survey_idx;
Rajeev79dbe4c2013-10-05 11:03:42 +0530965
966#ifdef FEATURE_WLAN_BATCH_SCAN
967 /*Completion variable for set batch scan request*/
968 struct completion hdd_set_batch_scan_req_var;
969 /*Completion variable for get batch scan request*/
970 struct completion hdd_get_batch_scan_req_var;
971 /*HDD batch scan lock*/
972 struct mutex hdd_batch_scan_lock;
973 /*HDD set batch scan request*/
974 tSirSetBatchScanReq hddSetBatchScanReq;
975 /*HDD set batch scan response*/
976 tSirSetBatchScanRsp hddSetBatchScanRsp;
977 /*HDD stop batch scan indication*/
978 tSirStopBatchScanInd hddStopBatchScanInd;
979 /*HDD get batch scan request*/
980 tSirTriggerBatchScanResultInd hddTriggerBatchScanResultInd;
981 /*Batched scan reponse queue: new batch scan results added at the tail
982 and old batch scan results are deleted from head*/
983 tHddBatchScanRsp *pBatchScanRsp;
984 /*No of scans in batch scan rsp(MSCAN)*/
985 v_U32_t numScanList;
986 /*isTruncated = 1 batch scan rsp is truncated
987 isTruncated = 0 batch scan rsp is complete*/
988 v_BOOL_t isTruncated;
989 /*Wait for get batch scan response from FW or not*/
990 volatile v_BOOL_t hdd_wait_for_get_batch_scan_rsp;
991 /*Wait for set batch scan response from FW or not*/
992 volatile v_BOOL_t hdd_wait_for_set_batch_scan_rsp;
993 /*Previous batch scan ID*/
994 v_U32_t prev_batch_id;
Rajeev Kumar20140c12013-10-21 19:39:02 -0700995 /*Batch scan state*/
996 eHDD_BATCH_SCAN_STATE batchScanState;
Rajeev79dbe4c2013-10-05 11:03:42 +0530997#endif
998
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700999#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1000 tAniTrafStrmMetrics tsmStats;
1001#endif
Kiet Lamf040f472013-11-20 21:15:23 +05301002 /* Flag to ensure PSB is configured through framework */
1003 v_U8_t psbChanged;
1004 /* UAPSD psb value configured through framework */
1005 v_U8_t configuredPsb;
Jeff Johnson295189b2012-06-20 16:38:30 -07001006};
1007
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -08001008#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
1009#define WLAN_HDD_GET_AP_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap)
1010#define WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.station.WextState)
1011#define WLAN_HDD_GET_CTX(pAdapter) ((hdd_context_t*)pAdapter->pHddCtx)
1012#define WLAN_HDD_GET_HAL_CTX(pAdapter) (((hdd_context_t*)(pAdapter->pHddCtx))->hHal)
1013#define WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap.HostapdState)
1014#define WLAN_HDD_GET_CFG_STATE_PTR(pAdapter) (&(pAdapter)->cfg80211State)
Gopichand Nakkala4327a152013-03-04 23:22:42 -08001015#ifdef FEATURE_WLAN_TDLS
Madan Mohan Koyyalamudi81746922013-07-17 14:38:51 +05301016#define WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter) \
Gopichand Nakkala40ab2752013-04-04 20:11:36 +05301017 (((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) && \
Madan Mohan Koyyalamudi81746922013-07-17 14:38:51 +05301018 (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)) ? 0 : 1)
1019#define WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter) \
1020 ((WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter)) ? \
1021 (tdlsCtx_t*)(pAdapter)->sessionCtx.station.pHddTdlsCtx : NULL)
Gopichand Nakkala4327a152013-03-04 23:22:42 -08001022#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001023
1024typedef struct hdd_adapter_list_node
1025{
1026 hdd_list_node_t node; // MUST be first element
1027 hdd_adapter_t *pAdapter;
1028}hdd_adapter_list_node_t;
1029
1030typedef struct hdd_priv_data_s
1031{
1032 tANI_U8 *buf;
1033 int used_len;
1034 int total_len;
1035}hdd_priv_data_t;
1036
Leo Chang64d68bc2013-06-04 15:40:52 -07001037typedef struct
1038{
1039 vos_timer_t trafficTimer;
1040 atomic_t isActiveMode;
1041 v_U8_t isInitialized;
1042 vos_lock_t trafficLock;
1043 v_TIME_t lastFrameTs;
1044}hdd_traffic_monitor_t;
1045
Jeff Johnson295189b2012-06-20 16:38:30 -07001046/** Adapter stucture definition */
1047
1048struct hdd_context_s
1049{
1050 /** Global VOS context */
1051 v_CONTEXT_t pvosContext;
1052
1053 /** HAL handle...*/
1054 tHalHandle hHal;
1055
Jeff Johnson295189b2012-06-20 16:38:30 -07001056 struct wiphy *wiphy ;
Jeff Johnson295189b2012-06-20 16:38:30 -07001057 //TODO Remove this from here.
1058
1059 hdd_list_t hddAdapters; //List of adapters
1060 /* One per STA: 1 for RX_BCMC_STA_ID and 1 for SAP_SELF_STA_ID*/
1061 hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + 3]; //One per sta. For quick reference.
1062
1063 /** Pointer for firmware image data */
1064 const struct firmware *fw;
1065
1066 /** Pointer for configuration data */
1067 const struct firmware *cfg;
1068
1069 /** Pointer for nv data */
1070 const struct firmware *nv;
1071
1072 /** Pointer to the parent device */
1073 struct device *parent_dev;
1074
1075 pid_t pid_sdio_claimed;
1076 atomic_t sdio_claim_count;
1077
1078 /** Config values read from qcom_cfg.ini file */
1079 hdd_config_t *cfg_ini;
Jeff Johnson295189b2012-06-20 16:38:30 -07001080 wlan_hdd_ftm_status_t ftm;
Jeff Johnson295189b2012-06-20 16:38:30 -07001081 /** completion variable for full power callback */
1082 struct completion full_pwr_comp_var;
1083 /** completion variable for Request BMPS callback */
1084 struct completion req_bmps_comp_var;
1085
1086 /** completion variable for standby callback */
1087 struct completion standby_comp_var;
1088
Jeff Johnson295189b2012-06-20 16:38:30 -07001089 /* Completion variable to indicate Rx Thread Suspended */
1090 struct completion rx_sus_event_var;
Jeff Johnson295189b2012-06-20 16:38:30 -07001091
1092 /* Completion variable to indicate Tx Thread Suspended */
1093 struct completion tx_sus_event_var;
1094
1095 /* Completion variable to indicate Mc Thread Suspended */
1096 struct completion mc_sus_event_var;
1097
Amar Singhalfddc28c2013-09-05 13:03:40 -07001098 /* Completion variable for regulatory hint */
Amar Singhala49cbc52013-10-08 18:37:44 -07001099#ifdef CONFIG_ENABLE_LINUX_REG
Amar Singhalfddc28c2013-09-05 13:03:40 -07001100 struct completion linux_reg_req;
Amar Singhala49cbc52013-10-08 18:37:44 -07001101#else
1102 struct completion driver_crda_req;
1103#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001104
Kiet Lam46b8e4e2013-11-06 21:49:53 +05301105 /* Completion variable to indicate updation of channel */
1106 struct completion wiphy_channel_update_event;
1107
1108 v_BOOL_t nEnableStrictRegulatoryForFCC;
1109
Jeff Johnson295189b2012-06-20 16:38:30 -07001110 v_BOOL_t isWlanSuspended;
1111
1112 v_BOOL_t isTxThreadSuspended;
1113
1114 v_BOOL_t isMcThreadSuspended;
1115
Jeff Johnson295189b2012-06-20 16:38:30 -07001116 v_BOOL_t isRxThreadSuspended;
Jeff Johnson295189b2012-06-20 16:38:30 -07001117
1118 volatile v_BOOL_t isLogpInProgress;
1119
1120 v_BOOL_t isLoadUnloadInProgress;
1121
1122 /**Track whether driver has been suspended.*/
1123 hdd_ps_state_t hdd_ps_state;
1124
1125 /* Track whether Mcast/Bcast Filter is enabled.*/
1126 v_BOOL_t hdd_mcastbcast_filter_set;
1127
1128 /* Track whether ignore DTIM is enabled*/
1129 v_BOOL_t hdd_ignore_dtim_enabled;
1130 v_U32_t hdd_actual_ignore_DTIM_value;
1131 v_U32_t hdd_actual_LI_value;
1132
1133
1134 v_BOOL_t hdd_wlan_suspended;
1135
1136 spinlock_t filter_lock;
1137
1138 /* Lock to avoid race condtion during start/stop bss*/
1139 struct mutex sap_lock;
1140
1141 /** ptt Process ID*/
1142 v_SINT_t ptt_pid;
Leo Chang9e646082013-08-02 11:20:21 -07001143#ifdef WLAN_KD_READY_NOTIFIER
1144 v_BOOL_t kd_nl_init;
1145#endif /* WLAN_KD_READY_NOTIFIER */
Jeff Johnson295189b2012-06-20 16:38:30 -07001146 v_U8_t change_iface;
1147
1148 /** Concurrency Parameters*/
1149 tVOS_CONCURRENCY_MODE concurrency_mode;
1150
Yue Ma3ede6052013-08-29 00:33:26 -07001151 v_U16_t no_of_sessions[VOS_MAX_NO_OF_MODE + 1];
Jeff Johnson295189b2012-06-20 16:38:30 -07001152
1153 hdd_chip_reset_stats_t hddChipResetStats;
1154 /* Number of times riva restarted */
1155 v_U32_t hddRivaResetStats;
1156
Jeff Johnson295189b2012-06-20 16:38:30 -07001157 /* Can we allow AMP connection right now*/
1158 v_BOOL_t isAmpAllowed;
1159
Jeff Johnson295189b2012-06-20 16:38:30 -07001160 /** P2P Device MAC Address for the adapter */
1161 v_MACADDR_t p2pDeviceAddress;
Jeff Johnson295189b2012-06-20 16:38:30 -07001162
1163 /* Thermal mitigation information */
1164 hdd_thermal_mitigation_info_t tmInfo;
Jeff Johnsone7245742012-09-05 17:12:55 -07001165
Sameer Thalappil50dc0092013-02-19 17:23:33 -08001166#ifdef WLAN_OPEN_SOURCE
Jeff Johnsone7245742012-09-05 17:12:55 -07001167#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
1168 struct wake_lock rx_wake_lock;
1169#endif
Sameer Thalappil50dc0092013-02-19 17:23:33 -08001170#endif
Jeff Johnsone7245742012-09-05 17:12:55 -07001171
1172 /*
1173 * Framework initiated driver restarting
1174 * hdd_reload_timer : Restart retry timer
1175 * isRestartInProgress: Restart in progress
1176 * hdd_restart_retries: Restart retries
1177 *
1178 */
1179 vos_timer_t hdd_restart_timer;
1180 atomic_t isRestartInProgress;
1181 u_int8_t hdd_restart_retries;
1182
Madan Mohan Koyyalamudi2a1ba772012-10-11 14:59:06 -07001183 hdd_scaninfo_t scan_info;
Gopichand Nakkalaf7e53c52013-01-07 14:52:52 -08001184
Madan Mohan Koyyalamudi543172b2012-12-05 16:40:18 -08001185 /*is_dyanmic_channel_range_set is set to 1 when Softap_set_channel_range
Gopichand Nakkalaf7e53c52013-01-07 14:52:52 -08001186 is invoked*/
Madan Mohan Koyyalamudi543172b2012-12-05 16:40:18 -08001187 v_BOOL_t is_dynamic_channel_range_set;
Madan Mohan Koyyalamudi69fc3ad2012-11-28 16:04:56 -08001188
Gopichand Nakkala1bc04f12013-02-28 14:29:23 -08001189#ifdef WLAN_OPEN_SOURCE
Madan Mohan Koyyalamudi69fc3ad2012-11-28 16:04:56 -08001190 struct wake_lock sap_wake_lock;
Gopichand Nakkala1bc04f12013-02-28 14:29:23 -08001191#endif
Chilam Ng01120412013-02-19 18:32:21 -08001192
1193#ifdef FEATURE_WLAN_TDLS
1194 eTDLSSupportMode tdls_mode;
Hoonki Lee27511902013-03-14 18:19:06 -07001195 eTDLSSupportMode tdls_mode_last;
Gopichand Nakkala4327a152013-03-04 23:22:42 -08001196 tdlsConnInfo_t tdlsConnInfo[HDD_MAX_NUM_TDLS_STA];
1197 /* TDLS peer connected count */
1198 tANI_U16 connected_peer_count;
Hoonki Lee93e67ff2013-03-19 15:49:25 -07001199 tdls_scan_context_t tdls_scan_ctxt;
Sunil Dutt41de4e22013-11-14 18:09:02 +05301200 /* Lock to avoid race condition during TDLS operations*/
1201 struct mutex tdls_lock;
Sameer Thalappil50dc0092013-02-19 17:23:33 -08001202#endif
Madan Mohan Koyyalamudi2602b202013-08-29 01:15:12 +05301203
Leo Chang64d68bc2013-06-04 15:40:52 -07001204 hdd_traffic_monitor_t traffic_monitor;
Gopichand Nakkalab8f0f1a2013-05-23 18:19:48 +05301205
1206 /* MC/BC Filter state variable
1207 * This always contains the value that is currently
1208 * configured
1209 * */
1210 v_U8_t configuredMcastBcastFilter;
Gopichand Nakkala8c0386c2013-07-09 23:31:37 +05301211
Amar Singhal49fdfd52013-08-13 13:25:12 -07001212 v_U8_t sus_res_mcastbcast_filter;
Yue Ma0d4891e2013-08-06 17:01:45 -07001213
Amar Singhald53568e2013-09-26 11:03:45 -07001214 v_BOOL_t sus_res_mcastbcast_filter_valid;
1215
Yue Ma0d4891e2013-08-06 17:01:45 -07001216 /* debugfs entry */
1217 struct dentry *debugfs_phy;
Kamath Vinayak4000c9a2013-08-23 14:24:27 +05301218
1219 /* Use below lock to protect access to isSchedScanUpdatePending
1220 * since it will be accessed in two different contexts.
1221 */
1222 spinlock_t schedScan_lock;
1223
1224 // Flag keeps track of wiphy suspend/resume
1225 v_BOOL_t isWiphySuspended;
1226
1227 // Indicates about pending sched_scan results
1228 v_BOOL_t isSchedScanUpdatePending;
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07001229 /*
1230 * TX_rx_pkt_count_timer
1231 */
1232 vos_timer_t tx_rx_trafficTmr;
1233 v_U8_t drvr_miracast;
1234 v_U8_t issplitscan_enabled;
Tushnim Bhattacharyya71ccecc2013-10-14 16:22:56 -07001235
1236 /* VHT80 allowed*/
1237 v_BOOL_t isVHT80Allowed;
1238
Jeff Johnson295189b2012-06-20 16:38:30 -07001239};
1240
1241
1242
1243/*---------------------------------------------------------------------------
1244 Function declarations and documenation
1245 -------------------------------------------------------------------------*/
1246VOS_STATUS hdd_get_front_adapter( hdd_context_t *pHddCtx,
1247 hdd_adapter_list_node_t** ppAdapterNode);
1248
1249VOS_STATUS hdd_get_next_adapter( hdd_context_t *pHddCtx,
1250 hdd_adapter_list_node_t* pAdapterNode,
1251 hdd_adapter_list_node_t** pNextAdapterNode);
1252
1253VOS_STATUS hdd_remove_adapter( hdd_context_t *pHddCtx,
1254 hdd_adapter_list_node_t* pAdapterNode);
1255
1256VOS_STATUS hdd_remove_front_adapter( hdd_context_t *pHddCtx,
1257 hdd_adapter_list_node_t** ppAdapterNode);
1258
1259VOS_STATUS hdd_add_adapter_back( hdd_context_t *pHddCtx,
1260 hdd_adapter_list_node_t* pAdapterNode);
1261
1262VOS_STATUS hdd_add_adapter_front( hdd_context_t *pHddCtx,
1263 hdd_adapter_list_node_t* pAdapterNode);
1264
1265hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
Jeff Johnsoneed415b2013-01-18 16:11:20 -08001266 const char* name, tSirMacAddr macAddr,
1267 tANI_U8 rtnl_held );
Jeff Johnson295189b2012-06-20 16:38:30 -07001268VOS_STATUS hdd_close_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, tANI_U8 rtnl_held );
1269VOS_STATUS hdd_close_all_adapters( hdd_context_t *pHddCtx );
1270VOS_STATUS hdd_stop_all_adapters( hdd_context_t *pHddCtx );
1271VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx );
1272VOS_STATUS hdd_start_all_adapters( hdd_context_t *pHddCtx );
1273VOS_STATUS hdd_reconnect_all_adapters( hdd_context_t *pHddCtx );
Sudhir Sattayappa Kohalli90e4c752013-03-21 14:25:04 -07001274void hdd_dump_concurrency_info(hdd_context_t *pHddCtx);
Jeff Johnson295189b2012-06-20 16:38:30 -07001275hdd_adapter_t * hdd_get_adapter_by_name( hdd_context_t *pHddCtx, tANI_U8 *name );
1276hdd_adapter_t * hdd_get_adapter_by_macaddr( hdd_context_t *pHddCtx, tSirMacAddr macAddr );
1277hdd_adapter_t * hdd_get_mon_adapter( hdd_context_t *pHddCtx );
1278VOS_STATUS hdd_init_station_mode( hdd_adapter_t *pAdapter );
1279hdd_adapter_t * hdd_get_adapter( hdd_context_t *pHddCtx, device_mode_t mode );
1280void hdd_deinit_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter );
1281VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter );
1282void hdd_set_station_ops( struct net_device *pWlanDev );
1283tANI_U8* wlan_hdd_get_intf_addr(hdd_context_t* pHddCtx);
1284void wlan_hdd_release_intf_addr(hdd_context_t* pHddCtx, tANI_U8* releaseAddr);
1285v_U8_t hdd_get_operating_channel( hdd_context_t *pHddCtx, device_mode_t mode );
1286
Jeff Johnson295189b2012-06-20 16:38:30 -07001287void hdd_set_conparam ( v_UINT_t newParam );
1288tVOS_CON_MODE hdd_get_conparam( void );
Jeff Johnson295189b2012-06-20 16:38:30 -07001289
1290void wlan_hdd_enable_deepsleep(v_VOID_t * pVosContext);
1291v_BOOL_t hdd_is_apps_power_collapse_allowed(hdd_context_t* pHddCtx);
Madan Mohan Koyyalamudic72a4d62012-11-08 14:59:34 -08001292v_BOOL_t hdd_is_suspend_notify_allowed(hdd_context_t* pHddCtx);
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05301293void hdd_abort_mac_scan(hdd_context_t *pHddCtx, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001294void wlan_hdd_set_monitor_tx_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter );
1295void hdd_cleanup_actionframe( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter );
Amar Singhalfddc28c2013-09-05 13:03:40 -07001296
Yunsen Wange3ba1fb2013-04-05 15:04:43 -07001297void crda_regulatory_entry_default(v_U8_t *countryCode, int domain_id);
Jeff Johnson295189b2012-06-20 16:38:30 -07001298void wlan_hdd_set_concurrency_mode(hdd_context_t *pHddCtx, tVOS_CON_MODE mode);
1299void wlan_hdd_clear_concurrency_mode(hdd_context_t *pHddCtx, tVOS_CON_MODE mode);
1300void wlan_hdd_reset_prob_rspies(hdd_adapter_t* pHostapdAdapter);
1301void hdd_prevent_suspend(void);
1302void hdd_allow_suspend(void);
Madan Mohan Koyyalamudi10d83a92012-09-28 15:47:05 -07001303void hdd_allow_suspend_timeout(v_U32_t timeout);
Madan Mohan Koyyalamudib5da5332012-10-15 17:23:21 -07001304bool hdd_is_ssr_required(void);
1305void hdd_set_ssr_required(e_hdd_ssr_required value);
Jeff Johnson295189b2012-06-20 16:38:30 -07001306
1307VOS_STATUS hdd_enable_bmps_imps(hdd_context_t *pHddCtx);
1308VOS_STATUS hdd_disable_bmps_imps(hdd_context_t *pHddCtx, tANI_U8 session_type);
1309
Madan Mohan Koyyalamudi71278262013-04-12 22:00:48 +05301310void wlan_hdd_cfg80211_update_reg_info(struct wiphy *wiphy);
Jeff Johnsone7245742012-09-05 17:12:55 -07001311VOS_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx);
Madan Mohan Koyyalamudi8612ec92012-09-28 15:53:07 -07001312void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx);
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08001313void hdd_set_pwrparams(hdd_context_t *pHddCtx);
1314void hdd_reset_pwrparams(hdd_context_t *pHddCtx);
Gopichand Nakkalaf502e2b2013-05-24 18:34:25 +05301315int wlan_hdd_validate_context(hdd_context_t *pHddCtx);
Srinivas Girigowda0c69aee2013-10-09 17:21:01 -07001316v_BOOL_t hdd_is_valid_mac_address(const tANI_U8* pMacAddr);
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07001317VOS_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx);
Gopichand Nakkala227c7f32013-06-26 22:44:57 +05301318#ifdef WLAN_FEATURE_PACKET_FILTERING
1319int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType, tANI_U8 sessionId);
1320#endif
Vinay Krishna Erannad5b2be22013-12-01 17:00:15 +05301321
1322#ifdef WLAN_NS_OFFLOAD
1323void hdd_ipv6_notifier_work_queue(struct work_struct *work);
1324#endif
1325
Tushnim Bhattacharyya71ccecc2013-10-14 16:22:56 -07001326#ifdef CONFIG_ENABLE_LINUX_REG
1327void hdd_checkandupdate_phymode( hdd_context_t *pHddCtx);
1328#endif
Kiet Lamf040f472013-11-20 21:15:23 +05301329int hdd_wmmps_helper(hdd_adapter_t *pAdapter, tANI_U8 *ptr);
Jeff Johnson295189b2012-06-20 16:38:30 -07001330#endif // end #if !defined( WLAN_HDD_MAIN_H )