Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * Copyright (c) 2012-2014 Qualcomm Atheros, Inc. |
| 24 | * All Rights Reserved. |
| 25 | * Qualcomm Atheros Confidential and Proprietary. |
| 26 | * |
| 27 | */ |
| 28 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 29 | |
| 30 | #if !defined( WLAN_HDD_MAIN_H ) |
| 31 | #define WLAN_HDD_MAIN_H |
| 32 | /**=========================================================================== |
| 33 | |
| 34 | \file WLAN_HDD_MAIN_H.h |
| 35 | |
| 36 | \brief Linux HDD Adapter Type |
| 37 | Copyright 2008 (c) Qualcomm, Incorporated. |
| 38 | All Rights Reserved. |
| 39 | Qualcomm Confidential and Proprietary. |
| 40 | |
| 41 | ==========================================================================*/ |
| 42 | |
| 43 | /*--------------------------------------------------------------------------- |
| 44 | Include files |
| 45 | -------------------------------------------------------------------------*/ |
| 46 | |
| 47 | #include <linux/netdevice.h> |
| 48 | #include <linux/skbuff.h> |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 49 | #include <net/cfg80211.h> |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 50 | #include <vos_list.h> |
| 51 | #include <vos_types.h> |
| 52 | #include "sirMacProtDef.h" |
| 53 | #include "csrApi.h" |
| 54 | #include <wlan_hdd_assoc.h> |
| 55 | #include <wlan_hdd_dp_utils.h> |
| 56 | #include <wlan_hdd_wmm.h> |
| 57 | #include <wlan_hdd_cfg.h> |
| 58 | #include <linux/spinlock.h> |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 59 | #ifdef WLAN_OPEN_SOURCE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 60 | #include <linux/wakelock.h> |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 61 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 62 | #include <wlan_hdd_ftm.h> |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 63 | #ifdef FEATURE_WLAN_TDLS |
| 64 | #include "wlan_hdd_tdls.h" |
| 65 | #endif |
Rajesh Chauhan | 98a31f8 | 2014-01-06 20:15:25 -0800 | [diff] [blame] | 66 | #include "wlan_hdd_cfg80211.h" |
| 67 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 68 | /*--------------------------------------------------------------------------- |
| 69 | Preprocessor definitions and constants |
| 70 | -------------------------------------------------------------------------*/ |
| 71 | /** Number of attempts to detect/remove card */ |
| 72 | #define LIBRA_CARD_INSERT_DETECT_MAX_COUNT 5 |
| 73 | #define LIBRA_CARD_REMOVE_DETECT_MAX_COUNT 5 |
| 74 | /** Number of Tx Queues */ |
| 75 | #define NUM_TX_QUEUES 4 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 76 | /** HDD's internal Tx Queue Length. Needs to be a power of 2 */ |
| 77 | #define HDD_TX_QUEUE_MAX_LEN 128 |
| 78 | /** HDD internal Tx Queue Low Watermark. Net Device TX queue is disabled |
| 79 | * when HDD queue becomes full. This Low watermark is used to enable |
| 80 | * the Net Device queue again */ |
| 81 | #define HDD_TX_QUEUE_LOW_WATER_MARK (HDD_TX_QUEUE_MAX_LEN*3/4) |
| 82 | /** Bytes to reserve in the headroom */ |
| 83 | #define LIBRA_HW_NEEDED_HEADROOM 128 |
| 84 | /** Hdd Tx Time out value */ |
| 85 | #ifdef LIBRA_LINUX_PC |
| 86 | #define HDD_TX_TIMEOUT (8000) |
| 87 | #else |
| 88 | #define HDD_TX_TIMEOUT msecs_to_jiffies(5000) |
| 89 | #endif |
| 90 | /** Hdd Default MTU */ |
| 91 | #define HDD_DEFAULT_MTU (1500) |
Jeff Johnson | 6a81ca4 | 2013-04-05 10:37:08 -0700 | [diff] [blame] | 92 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 93 | /**event flags registered net device*/ |
Jeff Johnson | 6a81ca4 | 2013-04-05 10:37:08 -0700 | [diff] [blame] | 94 | #define NET_DEVICE_REGISTERED (0) |
| 95 | #define SME_SESSION_OPENED (1) |
| 96 | #define INIT_TX_RX_SUCCESS (2) |
| 97 | #define WMM_INIT_DONE (3) |
| 98 | #define SOFTAP_BSS_STARTED (4) |
| 99 | #define DEVICE_IFACE_OPENED (5) |
| 100 | #define TDLS_INIT_DONE (6) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 101 | |
| 102 | /** Maximum time(ms)to wait for disconnect to complete **/ |
Mahesh A Saptasagar | 05a357e | 2014-02-26 16:28:06 +0530 | [diff] [blame] | 103 | #define WLAN_WAIT_TIME_DISCONNECT 2000 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 104 | #define WLAN_WAIT_TIME_STATS 800 |
| 105 | #define WLAN_WAIT_TIME_POWER 800 |
Sameer Thalappil | da4eb6a | 2013-09-25 11:45:07 -0700 | [diff] [blame] | 106 | #define WLAN_WAIT_TIME_COUNTRY 1000 |
Kiet Lam | 46b8e4e | 2013-11-06 21:49:53 +0530 | [diff] [blame] | 107 | #define WLAN_WAIT_TIME_CHANNEL_UPDATE 600 |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 108 | /* Amount of time to wait for sme close session callback. |
| 109 | This value should be larger than the timeout used by WDI to wait for |
| 110 | a response from WCNSS */ |
| 111 | #define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 112 | #define WLAN_WAIT_TIME_ABORTSCAN 2000 |
| 113 | |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 114 | /** Maximum time(ms) to wait for tdls add sta to complete **/ |
| 115 | #define WAIT_TIME_TDLS_ADD_STA 1500 |
| 116 | |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 117 | /** Maximum time(ms) to wait for tdls del sta to complete **/ |
| 118 | #define WAIT_TIME_TDLS_DEL_STA 1500 |
| 119 | |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 120 | /** Maximum time(ms) to wait for Link Establish Req to complete **/ |
| 121 | #define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500 |
| 122 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 123 | /** Maximum time(ms) to wait for tdls mgmt to complete **/ |
Gopichand Nakkala | 21c3f9b | 2013-03-23 14:45:55 -0700 | [diff] [blame] | 124 | #define WAIT_TIME_TDLS_MGMT 11000 |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 125 | |
Hoonki Lee | 1462135 | 2013-04-16 17:51:19 -0700 | [diff] [blame] | 126 | /** Maximum time(ms) to wait for tdls initiator to start direct communication **/ |
Gopichand Nakkala | 9b4eee1 | 2013-05-21 16:05:48 +0530 | [diff] [blame] | 127 | #define WAIT_TIME_TDLS_INITIATOR 600 |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 128 | |
| 129 | /* Maximum time to get linux regulatory entry settings */ |
Amar Singhal | a49cbc5 | 2013-10-08 18:37:44 -0700 | [diff] [blame] | 130 | #ifdef CONFIG_ENABLE_LINUX_REG |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 131 | #define LINUX_REG_WAIT_TIME 300 |
Amar Singhal | a49cbc5 | 2013-10-08 18:37:44 -0700 | [diff] [blame] | 132 | #else |
| 133 | #define CRDA_WAIT_TIME 300 |
| 134 | #endif |
Madan Mohan Koyyalamudi | c3a240c | 2012-09-28 15:34:08 -0700 | [diff] [blame] | 135 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 136 | /* Scan Req Timeout */ |
| 137 | #define WLAN_WAIT_TIME_SCAN_REQ 100 |
| 138 | |
| 139 | #define MAX_NUMBER_OF_ADAPTERS 4 |
| 140 | |
| 141 | #define MAX_CFG_STRING_LEN 255 |
| 142 | |
| 143 | #define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] |
| 144 | /** Mac Address string **/ |
| 145 | #define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x" |
Arif Hussain | ed66764 | 2013-10-27 23:01:14 -0700 | [diff] [blame] | 146 | #define MAC_ADDRESS_STR_LEN 18 /* Including null terminator */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 147 | #define MAX_GENIE_LEN 255 |
| 148 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 149 | #define WLAN_CHIP_VERSION "WCNSS" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 150 | |
| 151 | #define hddLog(level, args...) VOS_TRACE( VOS_MODULE_ID_HDD, level, ## args) |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 152 | #define ENTER() VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "Enter:%s", __func__) |
| 153 | #define EXIT() VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "Exit:%s", __func__) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 154 | |
| 155 | #define WLAN_HDD_GET_PRIV_PTR(__dev__) (hdd_adapter_t*)(netdev_priv((__dev__))) |
| 156 | |
| 157 | #define MAX_EXIT_ATTEMPTS_DURING_LOGP 20 |
| 158 | |
| 159 | #define MAX_NO_OF_2_4_CHANNELS 14 |
| 160 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 161 | #define WLAN_HDD_PUBLIC_ACTION_FRAME 4 |
| 162 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET 24 |
vamsi | 9bd92b7 | 2013-12-26 14:11:29 +0530 | [diff] [blame] | 163 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_BODY_OFFSET 24 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 164 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET 30 |
vamsi | 9bd92b7 | 2013-12-26 14:11:29 +0530 | [diff] [blame] | 165 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_CATEGORY_OFFSET 0 |
| 166 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_ACTION_OFFSET 1 |
| 167 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_OUI_OFFSET 2 |
| 168 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_OUI_TYPE_OFFSET 5 |
| 169 | #define WLAN_HDD_VENDOR_SPECIFIC_ACTION 0x09 |
| 170 | #define WLAN_HDD_WFA_OUI 0x506F9A |
| 171 | #define WLAN_HDD_WFA_P2P_OUI_TYPE 0x09 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 172 | #define WLAN_HDD_P2P_SOCIAL_CHANNELS 3 |
Madan Mohan Koyyalamudi | 8d50f31 | 2012-11-27 15:48:57 -0800 | [diff] [blame] | 173 | #define WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN 1 |
Ahmad Kholaif | e5ec2cd | 2014-03-19 13:22:04 +0530 | [diff] [blame^] | 174 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_SUB_TYPE_OFFSET 6 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 175 | |
Gopichand Nakkala | 1f7a64f | 2013-04-01 18:37:17 +0530 | [diff] [blame] | 176 | #define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \ |
| 177 | (((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462)) |
| 178 | |
Madan Mohan Koyyalamudi | 7127826 | 2013-04-12 22:00:48 +0530 | [diff] [blame] | 179 | #define WLAN_HDD_CHANNEL_IN_UNII_1_BAND(center_freq) \ |
| 180 | (((center_freq) == 5180 ) || ((center_freq) == 5200) \ |
| 181 | || ((center_freq) == 5220) || ((center_freq) == 5240)) |
| 182 | |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 183 | #ifdef WLAN_FEATURE_11W |
| 184 | #define WLAN_HDD_SA_QUERY_ACTION_FRAME 8 |
| 185 | #endif |
| 186 | |
Hoonki Lee | 1090c6a | 2013-01-16 17:40:54 -0800 | [diff] [blame] | 187 | #define WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP 14 |
| 188 | #define WLAN_HDD_TDLS_ACTION_FRAME 12 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 189 | #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK |
Sameer Thalappil | 84b14ff | 2013-06-12 16:02:52 -0700 | [diff] [blame] | 190 | #define HDD_WAKE_LOCK_DURATION 50 //in msecs |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 191 | #endif |
| 192 | |
Amar Singhal | 6144c00 | 2013-05-03 16:11:42 -0700 | [diff] [blame] | 193 | #define HDD_SAP_WAKE_LOCK_DURATION 10000 //in msecs |
Madan Mohan Koyyalamudi | 69fc3ad | 2012-11-28 16:04:56 -0800 | [diff] [blame] | 194 | |
Sameer Thalappil | 451ebb9 | 2013-06-28 15:49:58 -0700 | [diff] [blame] | 195 | #define HDD_MOD_EXIT_SSR_MAX_RETRIES 30 |
| 196 | |
Sunil Ravi | a72c399 | 2013-01-31 06:12:22 -0800 | [diff] [blame] | 197 | /* Maximum number of interfaces allowed(STA, P2P Device, P2P Interface) */ |
| 198 | #define WLAN_MAX_INTERFACES 3 |
| 199 | |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 200 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
| 201 | #define GTK_OFFLOAD_ENABLE 0 |
| 202 | #define GTK_OFFLOAD_DISABLE 1 |
| 203 | #endif |
| 204 | |
Madan Mohan Koyyalamudi | 1d16f46 | 2013-08-27 16:25:34 +0530 | [diff] [blame] | 205 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 206 | #define HDD_PNO_SCAN_TIMERS_SET_ONE 1 |
| 207 | /* value should not be greater than PNO_MAX_SCAN_TIMERS */ |
| 208 | #define HDD_PNO_SCAN_TIMERS_SET_MULTIPLE 6 |
Vinay Krishna Eranna | f0e523b | 2014-03-01 21:00:16 +0530 | [diff] [blame] | 209 | #define WLAN_WAIT_TIME_PNO 500 |
Madan Mohan Koyyalamudi | 1d16f46 | 2013-08-27 16:25:34 +0530 | [diff] [blame] | 210 | #endif |
| 211 | |
Arif Hussain | 0273cba | 2014-01-07 20:58:29 -0800 | [diff] [blame] | 212 | #define MAX_USER_COMMAND_SIZE 4096 |
| 213 | |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 214 | #define HDD_MAC_ADDR_LEN 6 |
| 215 | typedef v_U8_t tWlanHddMacAddr[HDD_MAC_ADDR_LEN]; |
| 216 | |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 217 | #ifdef FEATURE_WLAN_BATCH_SCAN |
| 218 | #define HDD_BATCH_SCAN_VERSION (17) |
| 219 | #define HDD_SET_BATCH_SCAN_DEFAULT_FREQ (30)/*batch scan frequency default 30s*/ |
| 220 | #define HDD_SET_BATCH_SCAN_BEST_NETWORK (16)/*best network default value*/ |
| 221 | #define HDD_SET_BATCH_SCAN_DEFAULT_BAND (0)/*auto means both 2.4GHz and 5GHz*/ |
| 222 | #define HDD_SET_BATCH_SCAN_24GHz_BAND_ONLY (1)/*only 2.4GHz band*/ |
| 223 | #define HDD_SET_BATCH_SCAN_5GHz_BAND_ONLY (2)/*only 5GHz band*/ |
| 224 | #define HDD_SET_BATCH_SCAN_REQ_TIME_OUT (15000) /*Batch scan req timeout in ms*/ |
| 225 | #define HDD_GET_BATCH_SCAN_RSP_TIME_OUT (15000) /*Batch scan req timeout in ms*/ |
| 226 | #define HDD_BATCH_SCAN_AP_META_INFO_SIZE (150) /*AP meta info size in string*/ |
| 227 | |
| 228 | #define MIN(a, b) (a > b ? b : a) |
| 229 | |
| 230 | #endif |
| 231 | |
Jeff Johnson | 72a4051 | 2013-12-19 10:14:15 -0800 | [diff] [blame] | 232 | /* |
| 233 | * Generic asynchronous request/response support |
| 234 | * |
| 235 | * Many of the APIs supported by HDD require a call to SME to |
| 236 | * perform an action or to retrieve some data. In most cases SME |
| 237 | * performs the operation asynchronously, and will execute a provided |
| 238 | * callback function when the request has completed. In order to |
| 239 | * synchronize this the HDD API allocates a context which is then |
| 240 | * passed to SME, and which is then, in turn, passed back to the |
| 241 | * callback function when the operation completes. The callback |
| 242 | * function then sets a completion variable inside the context which |
| 243 | * the HDD API is waiting on. In an ideal world the HDD API would |
| 244 | * wait forever (or at least for a long time) for the response to be |
| 245 | * received and for the completion variable to be set. However in |
| 246 | * most cases these HDD APIs are being invoked in the context of a |
| 247 | * userspace thread which has invoked either a cfg80211 API or a |
| 248 | * wireless extensions ioctl and which has taken the kernel rtnl_lock. |
| 249 | * Since this lock is used to synchronize many of the kernel tasks, we |
| 250 | * do not want to hold it for a long time. In addition we do not want |
| 251 | * to block userspace threads (such as the wpa supplicant's main |
| 252 | * thread) for an extended time. Therefore we only block for a short |
| 253 | * time waiting for the response before we timeout. This means that |
| 254 | * it is possible for the HDD API to timeout, and for the callback to |
| 255 | * be invoked afterwards. In order for the callback function to |
| 256 | * determine if the HDD API is still waiting, a magic value is also |
| 257 | * stored in the shared context. Only if the context has a valid |
| 258 | * magic will the callback routine do any work. In order to further |
| 259 | * synchronize these activities a spinlock is used so that if any HDD |
| 260 | * API timeout coincides with its callback, the operations of the two |
| 261 | * threads will be serialized. |
| 262 | */ |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 263 | struct statsContext |
| 264 | { |
| 265 | struct completion completion; |
| 266 | hdd_adapter_t *pAdapter; |
| 267 | unsigned int magic; |
| 268 | }; |
| 269 | |
Jeff Johnson | 72a4051 | 2013-12-19 10:14:15 -0800 | [diff] [blame] | 270 | extern spinlock_t hdd_context_lock; |
| 271 | |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 272 | #define STATS_CONTEXT_MAGIC 0x53544154 //STAT |
Jeff Johnson | 72a4051 | 2013-12-19 10:14:15 -0800 | [diff] [blame] | 273 | #define RSSI_CONTEXT_MAGIC 0x52535349 //RSSI |
| 274 | #define POWER_CONTEXT_MAGIC 0x504F5752 //POWR |
| 275 | #define SNR_CONTEXT_MAGIC 0x534E5200 //SNR |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 276 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 277 | typedef struct hdd_tx_rx_stats_s |
| 278 | { |
| 279 | // start_xmit stats |
| 280 | __u32 txXmitCalled; |
| 281 | __u32 txXmitDropped; |
| 282 | __u32 txXmitBackPressured; |
| 283 | __u32 txXmitQueued; |
| 284 | __u32 txXmitClassifiedAC[NUM_TX_QUEUES]; |
| 285 | __u32 txXmitDroppedAC[NUM_TX_QUEUES]; |
| 286 | __u32 txXmitBackPressuredAC[NUM_TX_QUEUES]; |
| 287 | __u32 txXmitQueuedAC[NUM_TX_QUEUES]; |
| 288 | // fetch_cbk stats |
| 289 | __u32 txFetched; |
| 290 | __u32 txFetchedAC[NUM_TX_QUEUES]; |
| 291 | __u32 txFetchEmpty; |
| 292 | __u32 txFetchLowResources; |
| 293 | __u32 txFetchDequeueError; |
| 294 | __u32 txFetchDequeued; |
| 295 | __u32 txFetchDequeuedAC[NUM_TX_QUEUES]; |
| 296 | __u32 txFetchDePressured; |
| 297 | __u32 txFetchDePressuredAC[NUM_TX_QUEUES]; |
| 298 | // complete_cbk_stats |
| 299 | __u32 txCompleted; |
| 300 | // flush stats |
| 301 | __u32 txFlushed; |
| 302 | __u32 txFlushedAC[NUM_TX_QUEUES]; |
Ravi Joshi | 4191463 | 2013-10-21 23:02:21 -0700 | [diff] [blame] | 303 | // Deque depressure stats |
| 304 | __u32 txDequeDePressured; |
| 305 | __u32 txDequeDePressuredAC[NUM_TX_QUEUES]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 306 | // rx stats |
| 307 | __u32 rxChains; |
| 308 | __u32 rxPackets; |
| 309 | __u32 rxDropped; |
| 310 | __u32 rxDelivered; |
| 311 | __u32 rxRefused; |
Sudhir Sattayappa Kohalli | 3762069 | 2013-08-05 14:02:26 -0700 | [diff] [blame] | 312 | __u32 pkt_tx_count; //TX pkt Counter used for dynamic splitscan |
| 313 | __u32 pkt_rx_count; //RX pkt Counter used for dynamic splitscan |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 314 | } hdd_tx_rx_stats_t; |
| 315 | |
| 316 | typedef struct hdd_chip_reset_stats_s |
| 317 | { |
| 318 | __u32 totalLogpResets; |
| 319 | __u32 totalCMD53Failures; |
| 320 | __u32 totalMutexReadFailures; |
| 321 | __u32 totalMIFErrorFailures; |
| 322 | __u32 totalFWHearbeatFailures; |
| 323 | __u32 totalUnknownExceptions; |
| 324 | } hdd_chip_reset_stats_t; |
| 325 | |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 326 | #ifdef WLAN_FEATURE_11W |
| 327 | typedef struct hdd_pmf_stats_s |
| 328 | { |
| 329 | uint8 numUnprotDeauthRx; |
| 330 | uint8 numUnprotDisassocRx; |
| 331 | } hdd_pmf_stats_t; |
| 332 | #endif |
| 333 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 334 | typedef struct hdd_stats_s |
| 335 | { |
| 336 | tCsrSummaryStatsInfo summary_stat; |
| 337 | tCsrGlobalClassAStatsInfo ClassA_stat; |
| 338 | tCsrGlobalClassBStatsInfo ClassB_stat; |
| 339 | tCsrGlobalClassCStatsInfo ClassC_stat; |
| 340 | tCsrGlobalClassDStatsInfo ClassD_stat; |
| 341 | tCsrPerStaStatsInfo perStaStats; |
| 342 | hdd_tx_rx_stats_t hddTxRxStats; |
| 343 | hdd_chip_reset_stats_t hddChipResetStats; |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 344 | #ifdef WLAN_FEATURE_11W |
| 345 | hdd_pmf_stats_t hddPmfStats; |
| 346 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 347 | } hdd_stats_t; |
| 348 | |
| 349 | typedef enum |
| 350 | { |
| 351 | HDD_ROAM_STATE_NONE, |
| 352 | |
| 353 | // Issuing a disconnect due to transition into low power states. |
| 354 | HDD_ROAM_STATE_DISCONNECTING_POWER, |
| 355 | |
| 356 | // move to this state when HDD sets a key with SME/CSR. Note this is |
| 357 | // an important state to get right because we will get calls into our SME |
| 358 | // callback routine for SetKey activity that we did not initiate! |
| 359 | HDD_ROAM_STATE_SETTING_KEY, |
| 360 | } HDD_ROAM_STATE; |
| 361 | |
| 362 | typedef enum |
| 363 | { |
| 364 | eHDD_SUSPEND_NONE = 0, |
| 365 | eHDD_SUSPEND_DEEP_SLEEP, |
| 366 | eHDD_SUSPEND_STANDBY, |
| 367 | } hdd_ps_state_t; |
| 368 | |
| 369 | typedef struct roaming_info_s |
| 370 | { |
| 371 | HDD_ROAM_STATE roamingState; |
| 372 | vos_event_t roamingEvent; |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 373 | |
| 374 | tWlanHddMacAddr bssid; |
| 375 | tWlanHddMacAddr peerMac; |
| 376 | tANI_U32 roamId; |
| 377 | eRoamCmdStatus roamStatus; |
| 378 | v_BOOL_t deferKeyComplete; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 379 | |
| 380 | } roaming_info_t; |
| 381 | |
| 382 | #ifdef FEATURE_WLAN_WAPI |
| 383 | /* Define WAPI macros for Length, BKID count etc*/ |
| 384 | #define MAX_WPI_KEY_LENGTH 16 |
| 385 | #define MAX_NUM_PN 16 |
| 386 | #define MAC_ADDR_LEN 6 |
| 387 | #define MAX_ADDR_INDEX 12 |
| 388 | #define MAX_NUM_AKM_SUITES 16 |
| 389 | #define MAX_NUM_UNI_SUITES 16 |
| 390 | #define MAX_NUM_BKIDS 16 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 391 | |
| 392 | /** WAPI AUTH mode definition */ |
| 393 | enum _WAPIAuthMode |
| 394 | { |
| 395 | WAPI_AUTH_MODE_OPEN = 0, |
| 396 | WAPI_AUTH_MODE_PSK = 1, |
| 397 | WAPI_AUTH_MODE_CERT |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 398 | } __packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 399 | typedef enum _WAPIAuthMode WAPIAuthMode; |
| 400 | |
| 401 | /** WAPI Work mode structure definition */ |
| 402 | #define WZC_ORIGINAL 0 |
| 403 | #define WAPI_EXTENTION 1 |
| 404 | |
| 405 | struct _WAPI_FUNCTION_MODE |
| 406 | { |
| 407 | unsigned char wapiMode; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 408 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 409 | |
| 410 | typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE; |
| 411 | |
| 412 | typedef struct _WAPI_BKID |
| 413 | { |
| 414 | v_U8_t bkid[16]; |
| 415 | }WAPI_BKID, *pWAPI_BKID; |
| 416 | |
| 417 | /** WAPI Association information structure definition */ |
| 418 | struct _WAPI_AssocInfo |
| 419 | { |
| 420 | v_U8_t elementID; |
| 421 | v_U8_t length; |
| 422 | v_U16_t version; |
| 423 | v_U16_t akmSuiteCount; |
| 424 | v_U32_t akmSuite[MAX_NUM_AKM_SUITES]; |
| 425 | v_U16_t unicastSuiteCount; |
| 426 | v_U32_t unicastSuite[MAX_NUM_UNI_SUITES]; |
| 427 | v_U32_t multicastSuite; |
| 428 | v_U16_t wapiCability; |
| 429 | v_U16_t bkidCount; |
| 430 | WAPI_BKID bkidList[MAX_NUM_BKIDS]; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 431 | } __packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 432 | |
| 433 | typedef struct _WAPI_AssocInfo WAPI_AssocInfo; |
| 434 | typedef struct _WAPI_AssocInfo *pWAPI_IEAssocInfo; |
| 435 | |
| 436 | /** WAPI KEY Type definition */ |
| 437 | enum _WAPIKeyType |
| 438 | { |
| 439 | PAIRWISE_KEY, //0 |
| 440 | GROUP_KEY //1 |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 441 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 442 | typedef enum _WAPIKeyType WAPIKeyType; |
| 443 | |
| 444 | /** WAPI KEY Direction definition */ |
| 445 | enum _KEY_DIRECTION |
| 446 | { |
| 447 | None, |
| 448 | Rx, |
| 449 | Tx, |
| 450 | Rx_Tx |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 451 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 452 | |
| 453 | typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION; |
| 454 | |
| 455 | /** WAPI KEY stucture definition */ |
| 456 | struct WLAN_WAPI_KEY |
| 457 | { |
| 458 | WAPIKeyType keyType; |
| 459 | WAPI_KEY_DIRECTION keyDirection; /*reserved for future use*/ |
| 460 | v_U8_t keyId; |
| 461 | v_U8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use*/ |
| 462 | int wpiekLen; |
| 463 | v_U8_t wpiek[MAX_WPI_KEY_LENGTH]; |
| 464 | int wpickLen; |
| 465 | v_U8_t wpick[MAX_WPI_KEY_LENGTH]; |
| 466 | v_U8_t pn[MAX_NUM_PN]; /*reserved for future use*/ |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 467 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 468 | |
| 469 | typedef struct WLAN_WAPI_KEY WLAN_WAPI_KEY; |
| 470 | typedef struct WLAN_WAPI_KEY *pWLAN_WAPI_KEY; |
| 471 | |
| 472 | #define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0])) |
vamsi | 9bd92b7 | 2013-12-26 14:11:29 +0530 | [diff] [blame] | 473 | #define WPA_GET_BE24(a) ((u32) ( (a[0] << 16) | (a[1] << 8) | a[2])) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 474 | #define WLAN_EID_WAPI 68 |
| 475 | #define WAPI_PSK_AKM_SUITE 0x02721400 |
| 476 | #define WAPI_CERT_AKM_SUITE 0x01721400 |
| 477 | |
| 478 | /** WAPI BKID List stucture definition */ |
| 479 | struct _WLAN_BKID_LIST |
| 480 | { |
| 481 | v_U32_t length; |
| 482 | v_U32_t BKIDCount; |
| 483 | WAPI_BKID BKID[1]; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 484 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 485 | |
| 486 | typedef struct _WLAN_BKID_LIST WLAN_BKID_LIST; |
| 487 | typedef struct _WLAN_BKID_LIST *pWLAN_BKID_LIST; |
| 488 | |
| 489 | |
| 490 | /** WAPI Information stucture definition */ |
| 491 | struct hdd_wapi_info_s |
| 492 | { |
| 493 | v_U32_t nWapiMode; |
| 494 | v_BOOL_t fIsWapiSta; |
| 495 | v_MACADDR_t cachedMacAddr; |
| 496 | v_UCHAR_t wapiAuthMode; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 497 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 498 | typedef struct hdd_wapi_info_s hdd_wapi_info_t; |
| 499 | #endif /* FEATURE_WLAN_WAPI */ |
| 500 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 501 | typedef struct beacon_data_s { |
| 502 | u8 *head, *tail; |
| 503 | int head_len, tail_len; |
| 504 | int dtim_period; |
| 505 | } beacon_data_t; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 506 | |
| 507 | typedef enum device_mode |
| 508 | { /* MAINTAIN 1 - 1 CORRESPONDENCE WITH tVOS_CON_MODE*/ |
| 509 | WLAN_HDD_INFRA_STATION, |
| 510 | WLAN_HDD_SOFTAP, |
| 511 | WLAN_HDD_P2P_CLIENT, |
| 512 | WLAN_HDD_P2P_GO, |
Jeff Johnson | 88ba774 | 2013-02-27 14:36:02 -0800 | [diff] [blame] | 513 | WLAN_HDD_MONITOR, |
| 514 | WLAN_HDD_FTM, |
Shailender Karmuchi | a734f33 | 2013-04-19 14:02:48 -0700 | [diff] [blame] | 515 | WLAN_HDD_IBSS, |
Ravi Joshi | aeb7d9e | 2013-05-02 12:28:14 -0700 | [diff] [blame] | 516 | WLAN_HDD_P2P_DEVICE |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 517 | }device_mode_t; |
| 518 | |
| 519 | typedef enum rem_on_channel_request_type |
| 520 | { |
| 521 | REMAIN_ON_CHANNEL_REQUEST, |
| 522 | OFF_CHANNEL_ACTION_TX, |
| 523 | }rem_on_channel_request_type_t; |
| 524 | |
| 525 | /* Thermal mitigation Level Enum Type */ |
| 526 | typedef enum |
| 527 | { |
| 528 | WLAN_HDD_TM_LEVEL_0, |
| 529 | WLAN_HDD_TM_LEVEL_1, |
| 530 | WLAN_HDD_TM_LEVEL_2, |
| 531 | WLAN_HDD_TM_LEVEL_3, |
| 532 | WLAN_HDD_TM_LEVEL_4, |
| 533 | WLAN_HDD_TM_LEVEL_MAX |
| 534 | } WLAN_TmLevelEnumType; |
| 535 | |
| 536 | /* Driver Action based on thermal mitigation level structure */ |
| 537 | typedef struct |
| 538 | { |
| 539 | v_BOOL_t ampduEnable; |
| 540 | v_BOOL_t enterImps; |
| 541 | v_U32_t txSleepDuration; |
| 542 | v_U32_t txOperationDuration; |
| 543 | v_U32_t txBlockFrameCountThreshold; |
| 544 | } hdd_tmLevelAction_t; |
| 545 | |
| 546 | /* Thermal Mitigation control context structure */ |
| 547 | typedef struct |
| 548 | { |
| 549 | WLAN_TmLevelEnumType currentTmLevel; |
| 550 | hdd_tmLevelAction_t tmAction; |
| 551 | vos_timer_t txSleepTimer; |
| 552 | struct mutex tmOperationLock; |
| 553 | vos_event_t setTmDoneEvent; |
| 554 | v_U32_t txFrameCount; |
| 555 | v_TIME_t lastblockTs; |
| 556 | v_TIME_t lastOpenTs; |
| 557 | struct netdev_queue *blockedQueue; |
Leo Chang | 50bbd25 | 2013-04-25 14:58:01 -0700 | [diff] [blame] | 558 | v_BOOL_t qBlocked; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 559 | } hdd_thermal_mitigation_info_t; |
| 560 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 561 | typedef struct hdd_remain_on_chan_ctx |
| 562 | { |
| 563 | struct net_device *dev; |
| 564 | struct ieee80211_channel chan; |
| 565 | enum nl80211_channel_type chan_type; |
| 566 | unsigned int duration; |
| 567 | u64 cookie; |
| 568 | rem_on_channel_request_type_t rem_on_chan_request; |
vamsi | da0e5ab | 2013-12-26 14:33:27 +0530 | [diff] [blame] | 569 | v_U32_t p2pRemOnChanTimeStamp; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 570 | }hdd_remain_on_chan_ctx_t; |
| 571 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 572 | typedef enum{ |
| 573 | HDD_IDLE, |
| 574 | HDD_PD_REQ_ACK_PENDING, |
| 575 | HDD_GO_NEG_REQ_ACK_PENDING, |
| 576 | HDD_INVALID_STATE, |
| 577 | }eP2PActionFrameState; |
| 578 | |
| 579 | typedef enum { |
| 580 | WLAN_HDD_GO_NEG_REQ, |
| 581 | WLAN_HDD_GO_NEG_RESP, |
| 582 | WLAN_HDD_GO_NEG_CNF, |
| 583 | WLAN_HDD_INVITATION_REQ, |
| 584 | WLAN_HDD_INVITATION_RESP, |
| 585 | WLAN_HDD_DEV_DIS_REQ, |
| 586 | WLAN_HDD_DEV_DIS_RESP, |
| 587 | WLAN_HDD_PROV_DIS_REQ, |
| 588 | WLAN_HDD_PROV_DIS_RESP, |
| 589 | }tActionFrmType; |
| 590 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 591 | typedef struct hdd_cfg80211_state_s |
| 592 | { |
| 593 | tANI_U16 current_freq; |
| 594 | u64 action_cookie; |
| 595 | tANI_U8 *buf; |
| 596 | size_t len; |
| 597 | struct sk_buff *skb; |
| 598 | hdd_remain_on_chan_ctx_t* remain_on_chan_ctx; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 599 | eP2PActionFrameState actionFrmState; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 600 | }hdd_cfg80211_state_t; |
| 601 | |
Madan Mohan Koyyalamudi | b5da533 | 2012-10-15 17:23:21 -0700 | [diff] [blame] | 602 | |
| 603 | typedef enum{ |
| 604 | HDD_SSR_NOT_REQUIRED, |
| 605 | HDD_SSR_REQUIRED, |
| 606 | HDD_SSR_DISABLED, |
| 607 | }e_hdd_ssr_required; |
| 608 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 609 | struct hdd_station_ctx |
| 610 | { |
| 611 | /** Handle to the Wireless Extension State */ |
| 612 | hdd_wext_state_t WextState; |
| 613 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 614 | #ifdef FEATURE_WLAN_TDLS |
| 615 | tdlsCtx_t *pHddTdlsCtx; |
| 616 | #endif |
| 617 | |
| 618 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 619 | /**Connection information*/ |
| 620 | connection_info_t conn_info; |
| 621 | |
| 622 | roaming_info_t roam_info; |
| 623 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 624 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 625 | int ft_carrier_on; |
| 626 | #endif |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 627 | |
| 628 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
Gopichand Nakkala | d36ee62 | 2013-05-07 14:13:27 +0530 | [diff] [blame] | 629 | tSirGtkOffloadParams gtkOffloadReqParams; |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 630 | #endif |
Shailender Karmuchi | 15cd067 | 2013-05-15 19:50:04 -0700 | [diff] [blame] | 631 | /*Increment whenever ibss New peer joins and departs the network */ |
| 632 | int ibss_sta_generation; |
Shailender Karmuchi | 642e981 | 2013-05-30 14:34:49 -0700 | [diff] [blame] | 633 | |
| 634 | /*Save the wep/wpa-none keys*/ |
| 635 | tCsrRoamSetKey ibss_enc_key; |
Srinivas Girigowda | 66c05eb | 2013-07-14 13:06:01 -0700 | [diff] [blame] | 636 | |
| 637 | v_BOOL_t hdd_ReassocScenario; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 638 | }; |
| 639 | |
| 640 | #define BSS_STOP 0 |
| 641 | #define BSS_START 1 |
| 642 | typedef struct hdd_hostapd_state_s |
| 643 | { |
| 644 | int bssState; |
| 645 | vos_event_t vosEvent; |
| 646 | VOS_STATUS vosStatus; |
| 647 | v_BOOL_t bCommit; |
| 648 | |
| 649 | } hdd_hostapd_state_t; |
| 650 | |
| 651 | |
| 652 | /* |
| 653 | * Per station structure kept in HDD for multiple station support for SoftAP |
| 654 | */ |
| 655 | typedef struct { |
| 656 | /** The station entry is used or not */ |
| 657 | v_BOOL_t isUsed; |
| 658 | |
| 659 | /** Station ID reported back from HAL (through SAP). Broadcast |
| 660 | * uses station ID zero by default in both libra and volans. */ |
| 661 | v_U8_t ucSTAId; |
| 662 | |
| 663 | /** MAC address of the station */ |
| 664 | v_MACADDR_t macAddrSTA; |
| 665 | |
| 666 | /** Current Station state so HDD knows how to deal with packet |
| 667 | * queue. Most recent states used to change TL STA state. */ |
| 668 | WLANTL_STAStateType tlSTAState; |
| 669 | |
| 670 | /** Transmit queues for each AC (VO,VI,BE etc). */ |
| 671 | hdd_list_t wmm_tx_queue[NUM_TX_QUEUES]; |
| 672 | |
| 673 | /** Might need to differentiate queue depth in contention case */ |
| 674 | v_U16_t aTxQueueDepth[NUM_TX_QUEUES]; |
| 675 | |
| 676 | /**Track whether OS TX queue has been disabled.*/ |
| 677 | v_BOOL_t txSuspended[NUM_TX_QUEUES]; |
| 678 | |
Madan Mohan Koyyalamudi | fd3b7a9 | 2013-10-10 15:02:58 +0530 | [diff] [blame] | 679 | /**Track whether 3/4th of resources are used */ |
| 680 | v_BOOL_t vosLowResource; |
| 681 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 682 | /** Track QoS status of station */ |
| 683 | v_BOOL_t isQosEnabled; |
| 684 | |
Madan Mohan Koyyalamudi | cd78499 | 2013-01-11 15:30:36 -0800 | [diff] [blame] | 685 | /** The station entry for which Deauth is in progress */ |
| 686 | v_BOOL_t isDeauthInProgress; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 687 | } hdd_station_info_t; |
| 688 | |
| 689 | struct hdd_ap_ctx_s |
| 690 | { |
| 691 | hdd_hostapd_state_t HostapdState; |
| 692 | |
| 693 | // Memory differentiation mode is enabled |
| 694 | //v_U16_t uMemoryDiffThreshold; |
| 695 | //v_U8_t uNumActiveAC; |
| 696 | //v_U8_t uActiveACMask; |
| 697 | //v_U8_t aTxQueueLimit[NUM_TX_QUEUES]; |
| 698 | |
| 699 | /** Packet Count to update uNumActiveAC and uActiveACMask */ |
| 700 | //v_U16_t uUpdatePktCount; |
| 701 | |
| 702 | /** Station ID assigned after BSS starts */ |
| 703 | v_U8_t uBCStaId; |
| 704 | |
| 705 | v_U8_t uPrivacy; // The privacy bits of configuration |
Jeff Johnson | 7dda777 | 2013-02-27 08:36:13 -0800 | [diff] [blame] | 706 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 707 | tSirWPSPBCProbeReq WPSPBCProbeReq; |
Jeff Johnson | 7dda777 | 2013-02-27 08:36:13 -0800 | [diff] [blame] | 708 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 709 | tsap_Config_t sapConfig; |
Jeff Johnson | 7dda777 | 2013-02-27 08:36:13 -0800 | [diff] [blame] | 710 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 711 | struct semaphore semWpsPBCOverlapInd; |
| 712 | |
| 713 | v_BOOL_t apDisableIntraBssFwd; |
| 714 | |
| 715 | vos_timer_t hdd_ap_inactivity_timer; |
| 716 | |
| 717 | v_U8_t operatingChannel; |
| 718 | |
| 719 | v_BOOL_t uIsAuthenticated; |
| 720 | |
| 721 | eCsrEncryptionType ucEncryptType; |
| 722 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 723 | //This will point to group key data, if it is received before start bss. |
| 724 | tCsrRoamSetKey groupKey; |
| 725 | // This will have WEP key data, if it is received before start bss |
| 726 | tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY]; |
| 727 | |
| 728 | beacon_data_t *beacon; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 729 | }; |
| 730 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 731 | struct hdd_mon_ctx_s |
| 732 | { |
| 733 | hdd_adapter_t *pAdapterForTx; |
| 734 | }; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 735 | |
| 736 | typedef struct hdd_scaninfo_s |
| 737 | { |
| 738 | /* The scan id */ |
| 739 | v_U32_t scanId; |
| 740 | |
| 741 | /* The scan pending */ |
| 742 | v_U32_t mScanPending; |
| 743 | |
Kiet Lam | ac06e2c | 2013-10-23 16:25:07 +0530 | [diff] [blame] | 744 | /* Counter for mScanPending so that the scan pending |
| 745 | error log is not printed for more than 5 times */ |
| 746 | v_U32_t mScanPendingCounter; |
| 747 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 748 | /* Client Wait Scan Result */ |
| 749 | v_U32_t waitScanResult; |
| 750 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 751 | /* Additional IE for scan */ |
| 752 | tSirAddie scanAddIE; |
| 753 | |
| 754 | /* Scan mode*/ |
| 755 | tSirScanType scan_mode; |
| 756 | |
| 757 | /* Scan Completion Event */ |
| 758 | struct completion scan_req_completion_event; |
| 759 | |
Madan Mohan Koyyalamudi | f4e8100 | 2012-11-13 10:46:38 -0800 | [diff] [blame] | 760 | /* completion variable for abortscan */ |
| 761 | struct completion abortscan_event_var; |
| 762 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 763 | vos_event_t scan_finished_event; |
| 764 | |
| 765 | hdd_scan_pending_option_e scan_pending_option; |
| 766 | |
| 767 | }hdd_scaninfo_t; |
| 768 | |
Gopichand Nakkala | 0f27681 | 2013-02-24 14:45:51 +0530 | [diff] [blame] | 769 | #define WLAN_HDD_MAX_MC_ADDR_LIST 10 |
| 770 | |
| 771 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 772 | typedef struct multicast_addr_list |
| 773 | { |
| 774 | v_U8_t isFilterApplied; |
| 775 | v_U8_t mc_cnt; |
| 776 | v_U8_t addr[WLAN_HDD_MAX_MC_ADDR_LIST][ETH_ALEN]; |
| 777 | } t_multicast_add_list; |
| 778 | #endif |
| 779 | |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 780 | #ifdef FEATURE_WLAN_BATCH_SCAN |
| 781 | |
| 782 | /*Batch scan repsonse AP info*/ |
| 783 | typedef struct |
| 784 | { |
| 785 | /*Batch ID*/ |
| 786 | tANI_U32 batchId; |
| 787 | /*is it last AP in GET BATCH SCAN RSP*/ |
| 788 | v_BOOL_t isLastAp; |
| 789 | /*BSSID*/ |
| 790 | tANI_U8 bssid[SIR_MAC_ADDR_LEN]; |
| 791 | /*SSID*/ |
Rajeev Kumar | 1f7759a | 2014-01-23 15:21:47 -0800 | [diff] [blame] | 792 | tANI_U8 ssid[SIR_MAX_SSID_SIZE + 1]; |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 793 | /*Channel*/ |
| 794 | tANI_U8 ch; |
| 795 | /*RSSI or Level*/ |
| 796 | tANI_U8 rssi; |
| 797 | /*Age*/ |
| 798 | tANI_U32 age; |
| 799 | }tHDDbatchScanRspApInfo; |
| 800 | |
| 801 | /*Batch scan response list*/ |
| 802 | struct tHDDBatchScanRspList |
| 803 | { |
| 804 | tHDDbatchScanRspApInfo ApInfo; |
| 805 | struct tHDDBatchScanRspList *pNext; |
| 806 | }; |
| 807 | |
| 808 | typedef struct tHDDBatchScanRspList tHddBatchScanRsp; |
Rajeev Kumar | 20140c1 | 2013-10-21 19:39:02 -0700 | [diff] [blame] | 809 | |
| 810 | /*Batch Scan state*/ |
| 811 | typedef enum |
| 812 | { |
| 813 | /*Batch scan is started this means WLS_BATCHING SET command is issued |
| 814 | from framework*/ |
| 815 | eHDD_BATCH_SCAN_STATE_STARTED, |
| 816 | |
| 817 | /*Batch scan is stopped this means WLS_BATCHING STOP command is issued |
| 818 | from framework*/ |
| 819 | eHDD_BATCH_SCAN_STATE_STOPPED, |
| 820 | |
| 821 | eHDD_BATCH_SCAN_STATE_MAX, |
| 822 | } eHDD_BATCH_SCAN_STATE; |
| 823 | |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 824 | #endif |
| 825 | |
| 826 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 827 | #define WLAN_HDD_ADAPTER_MAGIC 0x574c414e //ASCII "WLAN" |
| 828 | struct hdd_adapter_s |
| 829 | { |
| 830 | void *pHddCtx; |
| 831 | |
| 832 | device_mode_t device_mode; |
| 833 | |
| 834 | /** Handle to the network device */ |
| 835 | struct net_device *dev; |
Vinay Krishna Eranna | d5b2be2 | 2013-12-01 17:00:15 +0530 | [diff] [blame] | 836 | |
| 837 | #ifdef WLAN_NS_OFFLOAD |
| 838 | /** IPv6 notifier callback for handling NS offload on change in IP */ |
| 839 | struct notifier_block ipv6_notifier; |
Vinay Krishna Eranna | 941360f | 2014-01-16 15:38:22 +0530 | [diff] [blame] | 840 | bool ipv6_notifier_registered; |
Vinay Krishna Eranna | d5b2be2 | 2013-12-01 17:00:15 +0530 | [diff] [blame] | 841 | struct work_struct ipv6NotifierWorkQueue; |
| 842 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 843 | |
Vinay Krishna Eranna | 4d055d4 | 2013-12-17 17:02:01 +0530 | [diff] [blame] | 844 | /** IPv4 notifier callback for handling ARP offload on change in IP */ |
| 845 | struct notifier_block ipv4_notifier; |
Vinay Krishna Eranna | d9cbdb3 | 2014-01-16 12:59:10 +0530 | [diff] [blame] | 846 | bool ipv4_notifier_registered; |
Vinay Krishna Eranna | 4d055d4 | 2013-12-17 17:02:01 +0530 | [diff] [blame] | 847 | struct work_struct ipv4NotifierWorkQueue; |
| 848 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 849 | //TODO Move this to sta Ctx |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 850 | struct wireless_dev wdev ; |
| 851 | struct cfg80211_scan_request *request ; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 852 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 853 | /** ops checks if Opportunistic Power Save is Enable or Not |
| 854 | * ctw stores ctWindow value once we receive Opps command from |
| 855 | * wpa_supplicant then using ctWindow value we need to Enable |
| 856 | * Opportunistic Power Save |
| 857 | */ |
| 858 | tANI_U8 ops; |
| 859 | tANI_U32 ctw; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 860 | |
| 861 | /** Current MAC Address for the adapter */ |
| 862 | v_MACADDR_t macAddressCurrent; |
| 863 | |
| 864 | /**Event Flags*/ |
| 865 | unsigned long event_flags; |
| 866 | |
| 867 | /**Device TX/RX statistics*/ |
| 868 | struct net_device_stats stats; |
| 869 | /** HDD statistics*/ |
| 870 | hdd_stats_t hdd_stats; |
| 871 | /**Mib information*/ |
| 872 | sHddMib_t hdd_mib; |
| 873 | |
| 874 | tANI_U8 sessionId; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 875 | |
| 876 | /* Completion variable for session close */ |
| 877 | struct completion session_close_comp_var; |
| 878 | |
| 879 | /* Completion variable for session open */ |
| 880 | struct completion session_open_comp_var; |
| 881 | |
| 882 | //TODO: move these to sta ctx. These may not be used in AP |
| 883 | /** completion variable for disconnect callback */ |
| 884 | struct completion disconnect_comp_var; |
| 885 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 886 | /** Completion of change country code */ |
| 887 | struct completion change_country_code; |
| 888 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 889 | /* completion variable for Linkup Event */ |
| 890 | struct completion linkup_event_var; |
| 891 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 892 | /* completion variable for cancel remain on channel Event */ |
| 893 | struct completion cancel_rem_on_chan_var; |
| 894 | |
Vinay Krishna Eranna | f0e523b | 2014-03-01 21:00:16 +0530 | [diff] [blame] | 895 | /** completion variable for PNO req callback */ |
| 896 | struct completion pno_comp_var; |
| 897 | int pno_req_status; |
| 898 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 899 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) |
| 900 | /* completion variable for off channel remain on channel Event */ |
| 901 | struct completion offchannel_tx_event; |
| 902 | #endif |
| 903 | /* Completion variable for action frame */ |
| 904 | struct completion tx_action_cnf_event; |
| 905 | /* Completion variable for remain on channel ready */ |
| 906 | struct completion rem_on_chan_ready_event; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 907 | |
Jeff Johnson | 9efb9aa | 2013-03-15 13:59:27 -0700 | [diff] [blame] | 908 | /* Completion variable for Upper Layer Authentication */ |
| 909 | struct completion ula_complete; |
| 910 | |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 911 | #ifdef FEATURE_WLAN_TDLS |
| 912 | struct completion tdls_add_station_comp; |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 913 | struct completion tdls_del_station_comp; |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 914 | struct completion tdls_mgmt_comp; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 915 | struct completion tdls_link_establish_req_comp; |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 916 | eHalStatus tdlsAddStaStatus; |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 917 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 918 | /* Track whether the linkup handling is needed */ |
| 919 | v_BOOL_t isLinkUpSvcNeeded; |
| 920 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 921 | /* Mgmt Frames TX completion status code */ |
| 922 | tANI_U32 mgmtTxCompletionStatus; |
| 923 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 924 | /************************************************************* |
| 925 | * Tx Queues |
| 926 | */ |
| 927 | /** Transmit queues for each AC (VO,VI,BE etc) */ |
| 928 | hdd_list_t wmm_tx_queue[NUM_TX_QUEUES]; |
| 929 | /**Track whether VOS is in a low resource state*/ |
| 930 | v_BOOL_t isVosOutOfResource; |
Madan Mohan Koyyalamudi | fd3b7a9 | 2013-10-10 15:02:58 +0530 | [diff] [blame] | 931 | |
| 932 | /**Track whether 3/4th of resources are used */ |
| 933 | v_BOOL_t isVosLowResource; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 934 | |
| 935 | /**Track whether OS TX queue has been disabled.*/ |
| 936 | v_BOOL_t isTxSuspended[NUM_TX_QUEUES]; |
| 937 | |
| 938 | /** WMM Status */ |
| 939 | hdd_wmm_status_t hddWmmStatus; |
| 940 | /************************************************************* |
| 941 | */ |
| 942 | /************************************************************* |
| 943 | * TODO - Remove it later |
| 944 | */ |
| 945 | /** Multiple station supports */ |
| 946 | /** Per-station structure */ |
| 947 | spinlock_t staInfo_lock; //To protect access to station Info |
| 948 | hdd_station_info_t aStaInfo[WLAN_MAX_STA_COUNT]; |
| 949 | //v_U8_t uNumActiveStation; |
| 950 | |
| 951 | v_U16_t aTxQueueLimit[NUM_TX_QUEUES]; |
| 952 | /************************************************************* |
| 953 | */ |
| 954 | |
| 955 | #ifdef FEATURE_WLAN_WAPI |
| 956 | hdd_wapi_info_t wapi_info; |
| 957 | #endif |
| 958 | |
| 959 | v_S7_t rssi; |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 960 | |
| 961 | tANI_U8 snr; |
| 962 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 963 | struct work_struct monTxWorkQueue; |
| 964 | struct sk_buff *skb_to_tx; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 965 | |
| 966 | union { |
| 967 | hdd_station_ctx_t station; |
| 968 | hdd_ap_ctx_t ap; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 969 | hdd_mon_ctx_t monitor; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 970 | }sessionCtx; |
| 971 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 972 | hdd_cfg80211_state_t cfg80211State; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 973 | |
Gopichand Nakkala | 0f27681 | 2013-02-24 14:45:51 +0530 | [diff] [blame] | 974 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 975 | t_multicast_add_list mc_addr_list; |
| 976 | #endif |
| 977 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 978 | //Magic cookie for adapter sanity verification |
| 979 | v_U32_t magic; |
| 980 | v_BOOL_t higherDtimTransition; |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 981 | v_BOOL_t survey_idx; |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 982 | |
| 983 | #ifdef FEATURE_WLAN_BATCH_SCAN |
| 984 | /*Completion variable for set batch scan request*/ |
| 985 | struct completion hdd_set_batch_scan_req_var; |
| 986 | /*Completion variable for get batch scan request*/ |
| 987 | struct completion hdd_get_batch_scan_req_var; |
| 988 | /*HDD batch scan lock*/ |
| 989 | struct mutex hdd_batch_scan_lock; |
| 990 | /*HDD set batch scan request*/ |
| 991 | tSirSetBatchScanReq hddSetBatchScanReq; |
| 992 | /*HDD set batch scan response*/ |
| 993 | tSirSetBatchScanRsp hddSetBatchScanRsp; |
| 994 | /*HDD stop batch scan indication*/ |
| 995 | tSirStopBatchScanInd hddStopBatchScanInd; |
| 996 | /*HDD get batch scan request*/ |
| 997 | tSirTriggerBatchScanResultInd hddTriggerBatchScanResultInd; |
| 998 | /*Batched scan reponse queue: new batch scan results added at the tail |
| 999 | and old batch scan results are deleted from head*/ |
| 1000 | tHddBatchScanRsp *pBatchScanRsp; |
| 1001 | /*No of scans in batch scan rsp(MSCAN)*/ |
| 1002 | v_U32_t numScanList; |
| 1003 | /*isTruncated = 1 batch scan rsp is truncated |
| 1004 | isTruncated = 0 batch scan rsp is complete*/ |
| 1005 | v_BOOL_t isTruncated; |
| 1006 | /*Wait for get batch scan response from FW or not*/ |
| 1007 | volatile v_BOOL_t hdd_wait_for_get_batch_scan_rsp; |
| 1008 | /*Wait for set batch scan response from FW or not*/ |
| 1009 | volatile v_BOOL_t hdd_wait_for_set_batch_scan_rsp; |
| 1010 | /*Previous batch scan ID*/ |
| 1011 | v_U32_t prev_batch_id; |
Rajeev Kumar | 20140c1 | 2013-10-21 19:39:02 -0700 | [diff] [blame] | 1012 | /*Batch scan state*/ |
| 1013 | eHDD_BATCH_SCAN_STATE batchScanState; |
Rajeev | 79dbe4c | 2013-10-05 11:03:42 +0530 | [diff] [blame] | 1014 | #endif |
| 1015 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1016 | #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1017 | tAniTrafStrmMetrics tsmStats; |
| 1018 | #endif |
Kiet Lam | f040f47 | 2013-11-20 21:15:23 +0530 | [diff] [blame] | 1019 | /* Flag to ensure PSB is configured through framework */ |
| 1020 | v_U8_t psbChanged; |
| 1021 | /* UAPSD psb value configured through framework */ |
| 1022 | v_U8_t configuredPsb; |
Agarwal Ashish | 7875e7c | 2014-03-11 12:54:57 +0530 | [diff] [blame] | 1023 | v_BOOL_t internalRoCinProgress; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1024 | }; |
| 1025 | |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 1026 | #define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station) |
| 1027 | #define WLAN_HDD_GET_AP_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap) |
| 1028 | #define WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.station.WextState) |
| 1029 | #define WLAN_HDD_GET_CTX(pAdapter) ((hdd_context_t*)pAdapter->pHddCtx) |
| 1030 | #define WLAN_HDD_GET_HAL_CTX(pAdapter) (((hdd_context_t*)(pAdapter->pHddCtx))->hHal) |
| 1031 | #define WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap.HostapdState) |
| 1032 | #define WLAN_HDD_GET_CFG_STATE_PTR(pAdapter) (&(pAdapter)->cfg80211State) |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 1033 | #ifdef FEATURE_WLAN_TDLS |
Madan Mohan Koyyalamudi | 8174692 | 2013-07-17 14:38:51 +0530 | [diff] [blame] | 1034 | #define WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter) \ |
Gopichand Nakkala | 40ab275 | 2013-04-04 20:11:36 +0530 | [diff] [blame] | 1035 | (((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) && \ |
Madan Mohan Koyyalamudi | 8174692 | 2013-07-17 14:38:51 +0530 | [diff] [blame] | 1036 | (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)) ? 0 : 1) |
| 1037 | #define WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter) \ |
| 1038 | ((WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter)) ? \ |
| 1039 | (tdlsCtx_t*)(pAdapter)->sessionCtx.station.pHddTdlsCtx : NULL) |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 1040 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1041 | |
| 1042 | typedef struct hdd_adapter_list_node |
| 1043 | { |
| 1044 | hdd_list_node_t node; // MUST be first element |
| 1045 | hdd_adapter_t *pAdapter; |
| 1046 | }hdd_adapter_list_node_t; |
| 1047 | |
| 1048 | typedef struct hdd_priv_data_s |
| 1049 | { |
| 1050 | tANI_U8 *buf; |
| 1051 | int used_len; |
| 1052 | int total_len; |
| 1053 | }hdd_priv_data_t; |
| 1054 | |
Leo Chang | 64d68bc | 2013-06-04 15:40:52 -0700 | [diff] [blame] | 1055 | typedef struct |
| 1056 | { |
| 1057 | vos_timer_t trafficTimer; |
| 1058 | atomic_t isActiveMode; |
| 1059 | v_U8_t isInitialized; |
| 1060 | vos_lock_t trafficLock; |
| 1061 | v_TIME_t lastFrameTs; |
| 1062 | }hdd_traffic_monitor_t; |
| 1063 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1064 | /** Adapter stucture definition */ |
| 1065 | |
| 1066 | struct hdd_context_s |
| 1067 | { |
| 1068 | /** Global VOS context */ |
| 1069 | v_CONTEXT_t pvosContext; |
| 1070 | |
| 1071 | /** HAL handle...*/ |
| 1072 | tHalHandle hHal; |
| 1073 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1074 | struct wiphy *wiphy ; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1075 | //TODO Remove this from here. |
| 1076 | |
| 1077 | hdd_list_t hddAdapters; //List of adapters |
| 1078 | /* One per STA: 1 for RX_BCMC_STA_ID and 1 for SAP_SELF_STA_ID*/ |
| 1079 | hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + 3]; //One per sta. For quick reference. |
| 1080 | |
| 1081 | /** Pointer for firmware image data */ |
| 1082 | const struct firmware *fw; |
| 1083 | |
| 1084 | /** Pointer for configuration data */ |
| 1085 | const struct firmware *cfg; |
| 1086 | |
| 1087 | /** Pointer for nv data */ |
| 1088 | const struct firmware *nv; |
| 1089 | |
| 1090 | /** Pointer to the parent device */ |
| 1091 | struct device *parent_dev; |
| 1092 | |
| 1093 | pid_t pid_sdio_claimed; |
| 1094 | atomic_t sdio_claim_count; |
| 1095 | |
| 1096 | /** Config values read from qcom_cfg.ini file */ |
| 1097 | hdd_config_t *cfg_ini; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1098 | wlan_hdd_ftm_status_t ftm; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1099 | /** completion variable for full power callback */ |
| 1100 | struct completion full_pwr_comp_var; |
| 1101 | /** completion variable for Request BMPS callback */ |
| 1102 | struct completion req_bmps_comp_var; |
| 1103 | |
| 1104 | /** completion variable for standby callback */ |
| 1105 | struct completion standby_comp_var; |
| 1106 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1107 | /* Completion variable to indicate Rx Thread Suspended */ |
| 1108 | struct completion rx_sus_event_var; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1109 | |
| 1110 | /* Completion variable to indicate Tx Thread Suspended */ |
| 1111 | struct completion tx_sus_event_var; |
| 1112 | |
| 1113 | /* Completion variable to indicate Mc Thread Suspended */ |
| 1114 | struct completion mc_sus_event_var; |
| 1115 | |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 1116 | /* Completion variable for regulatory hint */ |
Amar Singhal | a49cbc5 | 2013-10-08 18:37:44 -0700 | [diff] [blame] | 1117 | #ifdef CONFIG_ENABLE_LINUX_REG |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 1118 | struct completion linux_reg_req; |
Amar Singhal | a49cbc5 | 2013-10-08 18:37:44 -0700 | [diff] [blame] | 1119 | #else |
| 1120 | struct completion driver_crda_req; |
| 1121 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1122 | |
Kiet Lam | 46b8e4e | 2013-11-06 21:49:53 +0530 | [diff] [blame] | 1123 | /* Completion variable to indicate updation of channel */ |
| 1124 | struct completion wiphy_channel_update_event; |
| 1125 | |
| 1126 | v_BOOL_t nEnableStrictRegulatoryForFCC; |
| 1127 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1128 | v_BOOL_t isWlanSuspended; |
| 1129 | |
| 1130 | v_BOOL_t isTxThreadSuspended; |
| 1131 | |
| 1132 | v_BOOL_t isMcThreadSuspended; |
| 1133 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1134 | v_BOOL_t isRxThreadSuspended; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1135 | |
| 1136 | volatile v_BOOL_t isLogpInProgress; |
| 1137 | |
Arun Kumar Khandavalli | e0b046d | 2014-03-01 21:54:25 +0530 | [diff] [blame] | 1138 | struct completion ssr_comp_var; |
| 1139 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1140 | v_BOOL_t isLoadUnloadInProgress; |
| 1141 | |
| 1142 | /**Track whether driver has been suspended.*/ |
| 1143 | hdd_ps_state_t hdd_ps_state; |
| 1144 | |
| 1145 | /* Track whether Mcast/Bcast Filter is enabled.*/ |
| 1146 | v_BOOL_t hdd_mcastbcast_filter_set; |
| 1147 | |
| 1148 | /* Track whether ignore DTIM is enabled*/ |
| 1149 | v_BOOL_t hdd_ignore_dtim_enabled; |
| 1150 | v_U32_t hdd_actual_ignore_DTIM_value; |
| 1151 | v_U32_t hdd_actual_LI_value; |
| 1152 | |
| 1153 | |
| 1154 | v_BOOL_t hdd_wlan_suspended; |
| 1155 | |
| 1156 | spinlock_t filter_lock; |
| 1157 | |
| 1158 | /* Lock to avoid race condtion during start/stop bss*/ |
| 1159 | struct mutex sap_lock; |
| 1160 | |
| 1161 | /** ptt Process ID*/ |
| 1162 | v_SINT_t ptt_pid; |
Leo Chang | 9e64608 | 2013-08-02 11:20:21 -0700 | [diff] [blame] | 1163 | #ifdef WLAN_KD_READY_NOTIFIER |
| 1164 | v_BOOL_t kd_nl_init; |
| 1165 | #endif /* WLAN_KD_READY_NOTIFIER */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1166 | v_U8_t change_iface; |
| 1167 | |
| 1168 | /** Concurrency Parameters*/ |
| 1169 | tVOS_CONCURRENCY_MODE concurrency_mode; |
| 1170 | |
Yue Ma | 3ede605 | 2013-08-29 00:33:26 -0700 | [diff] [blame] | 1171 | v_U16_t no_of_sessions[VOS_MAX_NO_OF_MODE + 1]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1172 | |
| 1173 | hdd_chip_reset_stats_t hddChipResetStats; |
| 1174 | /* Number of times riva restarted */ |
| 1175 | v_U32_t hddRivaResetStats; |
| 1176 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1177 | /* Can we allow AMP connection right now*/ |
| 1178 | v_BOOL_t isAmpAllowed; |
| 1179 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1180 | /** P2P Device MAC Address for the adapter */ |
| 1181 | v_MACADDR_t p2pDeviceAddress; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1182 | |
| 1183 | /* Thermal mitigation information */ |
| 1184 | hdd_thermal_mitigation_info_t tmInfo; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1185 | |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 1186 | #ifdef WLAN_OPEN_SOURCE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1187 | #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK |
| 1188 | struct wake_lock rx_wake_lock; |
| 1189 | #endif |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 1190 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1191 | |
| 1192 | /* |
| 1193 | * Framework initiated driver restarting |
| 1194 | * hdd_reload_timer : Restart retry timer |
| 1195 | * isRestartInProgress: Restart in progress |
| 1196 | * hdd_restart_retries: Restart retries |
| 1197 | * |
| 1198 | */ |
| 1199 | vos_timer_t hdd_restart_timer; |
| 1200 | atomic_t isRestartInProgress; |
| 1201 | u_int8_t hdd_restart_retries; |
| 1202 | |
Madan Mohan Koyyalamudi | 2a1ba77 | 2012-10-11 14:59:06 -0700 | [diff] [blame] | 1203 | hdd_scaninfo_t scan_info; |
Gopichand Nakkala | f7e53c5 | 2013-01-07 14:52:52 -0800 | [diff] [blame] | 1204 | |
Madan Mohan Koyyalamudi | 543172b | 2012-12-05 16:40:18 -0800 | [diff] [blame] | 1205 | /*is_dyanmic_channel_range_set is set to 1 when Softap_set_channel_range |
Gopichand Nakkala | f7e53c5 | 2013-01-07 14:52:52 -0800 | [diff] [blame] | 1206 | is invoked*/ |
Madan Mohan Koyyalamudi | 543172b | 2012-12-05 16:40:18 -0800 | [diff] [blame] | 1207 | v_BOOL_t is_dynamic_channel_range_set; |
Madan Mohan Koyyalamudi | 69fc3ad | 2012-11-28 16:04:56 -0800 | [diff] [blame] | 1208 | |
Gopichand Nakkala | 1bc04f1 | 2013-02-28 14:29:23 -0800 | [diff] [blame] | 1209 | #ifdef WLAN_OPEN_SOURCE |
Madan Mohan Koyyalamudi | 69fc3ad | 2012-11-28 16:04:56 -0800 | [diff] [blame] | 1210 | struct wake_lock sap_wake_lock; |
Gopichand Nakkala | 1bc04f1 | 2013-02-28 14:29:23 -0800 | [diff] [blame] | 1211 | #endif |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 1212 | |
| 1213 | #ifdef FEATURE_WLAN_TDLS |
| 1214 | eTDLSSupportMode tdls_mode; |
Hoonki Lee | 2751190 | 2013-03-14 18:19:06 -0700 | [diff] [blame] | 1215 | eTDLSSupportMode tdls_mode_last; |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 1216 | tdlsConnInfo_t tdlsConnInfo[HDD_MAX_NUM_TDLS_STA]; |
| 1217 | /* TDLS peer connected count */ |
| 1218 | tANI_U16 connected_peer_count; |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 1219 | tdls_scan_context_t tdls_scan_ctxt; |
Sunil Dutt | 41de4e2 | 2013-11-14 18:09:02 +0530 | [diff] [blame] | 1220 | /* Lock to avoid race condition during TDLS operations*/ |
| 1221 | struct mutex tdls_lock; |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 1222 | #endif |
Madan Mohan Koyyalamudi | 2602b20 | 2013-08-29 01:15:12 +0530 | [diff] [blame] | 1223 | |
Leo Chang | 64d68bc | 2013-06-04 15:40:52 -0700 | [diff] [blame] | 1224 | hdd_traffic_monitor_t traffic_monitor; |
Gopichand Nakkala | b8f0f1a | 2013-05-23 18:19:48 +0530 | [diff] [blame] | 1225 | |
| 1226 | /* MC/BC Filter state variable |
| 1227 | * This always contains the value that is currently |
| 1228 | * configured |
| 1229 | * */ |
| 1230 | v_U8_t configuredMcastBcastFilter; |
Gopichand Nakkala | 8c0386c | 2013-07-09 23:31:37 +0530 | [diff] [blame] | 1231 | |
Amar Singhal | 49fdfd5 | 2013-08-13 13:25:12 -0700 | [diff] [blame] | 1232 | v_U8_t sus_res_mcastbcast_filter; |
Yue Ma | 0d4891e | 2013-08-06 17:01:45 -0700 | [diff] [blame] | 1233 | |
Amar Singhal | d53568e | 2013-09-26 11:03:45 -0700 | [diff] [blame] | 1234 | v_BOOL_t sus_res_mcastbcast_filter_valid; |
| 1235 | |
Yue Ma | 0d4891e | 2013-08-06 17:01:45 -0700 | [diff] [blame] | 1236 | /* debugfs entry */ |
| 1237 | struct dentry *debugfs_phy; |
Kamath Vinayak | 4000c9a | 2013-08-23 14:24:27 +0530 | [diff] [blame] | 1238 | |
| 1239 | /* Use below lock to protect access to isSchedScanUpdatePending |
| 1240 | * since it will be accessed in two different contexts. |
| 1241 | */ |
| 1242 | spinlock_t schedScan_lock; |
| 1243 | |
| 1244 | // Flag keeps track of wiphy suspend/resume |
| 1245 | v_BOOL_t isWiphySuspended; |
| 1246 | |
| 1247 | // Indicates about pending sched_scan results |
| 1248 | v_BOOL_t isSchedScanUpdatePending; |
Sudhir Sattayappa Kohalli | 3762069 | 2013-08-05 14:02:26 -0700 | [diff] [blame] | 1249 | /* |
| 1250 | * TX_rx_pkt_count_timer |
| 1251 | */ |
| 1252 | vos_timer_t tx_rx_trafficTmr; |
| 1253 | v_U8_t drvr_miracast; |
| 1254 | v_U8_t issplitscan_enabled; |
Tushnim Bhattacharyya | 71ccecc | 2013-10-14 16:22:56 -0700 | [diff] [blame] | 1255 | |
| 1256 | /* VHT80 allowed*/ |
| 1257 | v_BOOL_t isVHT80Allowed; |
| 1258 | |
Leo Chang | 0b0e45a | 2013-12-15 15:18:55 -0800 | [diff] [blame] | 1259 | #ifdef FEATURE_WLAN_CH_AVOID |
| 1260 | v_U16_t unsafeChannelCount; |
| 1261 | v_U16_t unsafeChannelList[NUM_20MHZ_RF_CHANNELS]; |
| 1262 | v_U16_t safeChannelList[NUM_20MHZ_RF_CHANNELS]; |
| 1263 | #endif /* FEATURE_WLAN_CH_AVOID */ |
c_hpothu | 9b781ba | 2013-12-30 20:57:45 +0530 | [diff] [blame] | 1264 | |
| 1265 | v_BOOL_t btCoexModeSet; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1266 | }; |
| 1267 | |
| 1268 | |
| 1269 | |
| 1270 | /*--------------------------------------------------------------------------- |
| 1271 | Function declarations and documenation |
| 1272 | -------------------------------------------------------------------------*/ |
| 1273 | VOS_STATUS hdd_get_front_adapter( hdd_context_t *pHddCtx, |
| 1274 | hdd_adapter_list_node_t** ppAdapterNode); |
| 1275 | |
| 1276 | VOS_STATUS hdd_get_next_adapter( hdd_context_t *pHddCtx, |
| 1277 | hdd_adapter_list_node_t* pAdapterNode, |
| 1278 | hdd_adapter_list_node_t** pNextAdapterNode); |
| 1279 | |
| 1280 | VOS_STATUS hdd_remove_adapter( hdd_context_t *pHddCtx, |
| 1281 | hdd_adapter_list_node_t* pAdapterNode); |
| 1282 | |
| 1283 | VOS_STATUS hdd_remove_front_adapter( hdd_context_t *pHddCtx, |
| 1284 | hdd_adapter_list_node_t** ppAdapterNode); |
| 1285 | |
| 1286 | VOS_STATUS hdd_add_adapter_back( hdd_context_t *pHddCtx, |
| 1287 | hdd_adapter_list_node_t* pAdapterNode); |
| 1288 | |
| 1289 | VOS_STATUS hdd_add_adapter_front( hdd_context_t *pHddCtx, |
| 1290 | hdd_adapter_list_node_t* pAdapterNode); |
| 1291 | |
| 1292 | hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type, |
Jeff Johnson | eed415b | 2013-01-18 16:11:20 -0800 | [diff] [blame] | 1293 | const char* name, tSirMacAddr macAddr, |
| 1294 | tANI_U8 rtnl_held ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1295 | VOS_STATUS hdd_close_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, tANI_U8 rtnl_held ); |
| 1296 | VOS_STATUS hdd_close_all_adapters( hdd_context_t *pHddCtx ); |
| 1297 | VOS_STATUS hdd_stop_all_adapters( hdd_context_t *pHddCtx ); |
| 1298 | VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx ); |
| 1299 | VOS_STATUS hdd_start_all_adapters( hdd_context_t *pHddCtx ); |
| 1300 | VOS_STATUS hdd_reconnect_all_adapters( hdd_context_t *pHddCtx ); |
Sudhir Sattayappa Kohalli | 90e4c75 | 2013-03-21 14:25:04 -0700 | [diff] [blame] | 1301 | void hdd_dump_concurrency_info(hdd_context_t *pHddCtx); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1302 | hdd_adapter_t * hdd_get_adapter_by_name( hdd_context_t *pHddCtx, tANI_U8 *name ); |
| 1303 | hdd_adapter_t * hdd_get_adapter_by_macaddr( hdd_context_t *pHddCtx, tSirMacAddr macAddr ); |
| 1304 | hdd_adapter_t * hdd_get_mon_adapter( hdd_context_t *pHddCtx ); |
| 1305 | VOS_STATUS hdd_init_station_mode( hdd_adapter_t *pAdapter ); |
| 1306 | hdd_adapter_t * hdd_get_adapter( hdd_context_t *pHddCtx, device_mode_t mode ); |
| 1307 | void hdd_deinit_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
| 1308 | VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
| 1309 | void hdd_set_station_ops( struct net_device *pWlanDev ); |
| 1310 | tANI_U8* wlan_hdd_get_intf_addr(hdd_context_t* pHddCtx); |
| 1311 | void wlan_hdd_release_intf_addr(hdd_context_t* pHddCtx, tANI_U8* releaseAddr); |
| 1312 | v_U8_t hdd_get_operating_channel( hdd_context_t *pHddCtx, device_mode_t mode ); |
| 1313 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1314 | void hdd_set_conparam ( v_UINT_t newParam ); |
| 1315 | tVOS_CON_MODE hdd_get_conparam( void ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1316 | |
| 1317 | void wlan_hdd_enable_deepsleep(v_VOID_t * pVosContext); |
| 1318 | v_BOOL_t hdd_is_apps_power_collapse_allowed(hdd_context_t* pHddCtx); |
Madan Mohan Koyyalamudi | c72a4d6 | 2012-11-08 14:59:34 -0800 | [diff] [blame] | 1319 | v_BOOL_t hdd_is_suspend_notify_allowed(hdd_context_t* pHddCtx); |
Srinivas, Dasari | 138af4f | 2014-02-07 11:13:45 +0530 | [diff] [blame] | 1320 | void hdd_abort_mac_scan(hdd_context_t* pHddCtx, tANI_U8 sessionId, |
| 1321 | eCsrAbortReason reason); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1322 | void wlan_hdd_set_monitor_tx_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
| 1323 | void hdd_cleanup_actionframe( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 1324 | |
Yunsen Wang | e3ba1fb | 2013-04-05 15:04:43 -0700 | [diff] [blame] | 1325 | void crda_regulatory_entry_default(v_U8_t *countryCode, int domain_id); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1326 | void wlan_hdd_set_concurrency_mode(hdd_context_t *pHddCtx, tVOS_CON_MODE mode); |
| 1327 | void wlan_hdd_clear_concurrency_mode(hdd_context_t *pHddCtx, tVOS_CON_MODE mode); |
| 1328 | void wlan_hdd_reset_prob_rspies(hdd_adapter_t* pHostapdAdapter); |
| 1329 | void hdd_prevent_suspend(void); |
| 1330 | void hdd_allow_suspend(void); |
Mahesh A Saptasagar | b9c5040 | 2014-01-16 15:49:22 +0530 | [diff] [blame] | 1331 | void hdd_prevent_suspend_timeout(v_U32_t timeout); |
Madan Mohan Koyyalamudi | b5da533 | 2012-10-15 17:23:21 -0700 | [diff] [blame] | 1332 | bool hdd_is_ssr_required(void); |
| 1333 | void hdd_set_ssr_required(e_hdd_ssr_required value); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1334 | |
| 1335 | VOS_STATUS hdd_enable_bmps_imps(hdd_context_t *pHddCtx); |
| 1336 | VOS_STATUS hdd_disable_bmps_imps(hdd_context_t *pHddCtx, tANI_U8 session_type); |
| 1337 | |
Madan Mohan Koyyalamudi | 7127826 | 2013-04-12 22:00:48 +0530 | [diff] [blame] | 1338 | void wlan_hdd_cfg80211_update_reg_info(struct wiphy *wiphy); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1339 | VOS_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx); |
Madan Mohan Koyyalamudi | 8612ec9 | 2012-09-28 15:53:07 -0700 | [diff] [blame] | 1340 | void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx); |
Tushnim Bhattacharyya | 3a37def | 2013-02-24 11:11:15 -0800 | [diff] [blame] | 1341 | void hdd_set_pwrparams(hdd_context_t *pHddCtx); |
| 1342 | void hdd_reset_pwrparams(hdd_context_t *pHddCtx); |
Gopichand Nakkala | f502e2b | 2013-05-24 18:34:25 +0530 | [diff] [blame] | 1343 | int wlan_hdd_validate_context(hdd_context_t *pHddCtx); |
Srinivas Girigowda | 0c69aee | 2013-10-09 17:21:01 -0700 | [diff] [blame] | 1344 | v_BOOL_t hdd_is_valid_mac_address(const tANI_U8* pMacAddr); |
Sudhir Sattayappa Kohalli | b1d8c3a | 2013-06-18 14:47:20 -0700 | [diff] [blame] | 1345 | VOS_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx); |
Vinay Krishna Eranna | 4d055d4 | 2013-12-17 17:02:01 +0530 | [diff] [blame] | 1346 | void hdd_ipv4_notifier_work_queue(struct work_struct *work); |
Gopichand Nakkala | 227c7f3 | 2013-06-26 22:44:57 +0530 | [diff] [blame] | 1347 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 1348 | int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType, tANI_U8 sessionId); |
| 1349 | #endif |
Vinay Krishna Eranna | d5b2be2 | 2013-12-01 17:00:15 +0530 | [diff] [blame] | 1350 | |
| 1351 | #ifdef WLAN_NS_OFFLOAD |
| 1352 | void hdd_ipv6_notifier_work_queue(struct work_struct *work); |
| 1353 | #endif |
| 1354 | |
Tushnim Bhattacharyya | 71ccecc | 2013-10-14 16:22:56 -0700 | [diff] [blame] | 1355 | #ifdef CONFIG_ENABLE_LINUX_REG |
| 1356 | void hdd_checkandupdate_phymode( hdd_context_t *pHddCtx); |
| 1357 | #endif |
Kiet Lam | f040f47 | 2013-11-20 21:15:23 +0530 | [diff] [blame] | 1358 | int hdd_wmmps_helper(hdd_adapter_t *pAdapter, tANI_U8 *ptr); |
Rajeev Kumar | 8b37329 | 2014-01-08 20:36:55 -0800 | [diff] [blame] | 1359 | |
| 1360 | #ifdef FEATURE_WLAN_BATCH_SCAN |
| 1361 | /**--------------------------------------------------------------------------- |
| 1362 | |
| 1363 | \brief hdd_handle_batch_scan_ioctl () - This function handles WLS_BATCHING |
| 1364 | IOCTLs from user space. Following BATCH SCAN DEV IOCTs are handled: |
| 1365 | WLS_BATCHING VERSION |
| 1366 | WLS_BATCHING SET |
| 1367 | WLS_BATCHING GET |
| 1368 | WLS_BATCHING STOP |
| 1369 | |
| 1370 | \param - pAdapter Pointer to HDD adapter |
| 1371 | \param - pPrivdata Pointer to priv_data |
| 1372 | \param - command Pointer to command |
| 1373 | |
| 1374 | \return - 0 for success -EFAULT for failure |
| 1375 | |
| 1376 | --------------------------------------------------------------------------*/ |
| 1377 | |
| 1378 | int hdd_handle_batch_scan_ioctl |
| 1379 | ( |
| 1380 | hdd_adapter_t *pAdapter, |
| 1381 | hdd_priv_data_t *pPrivdata, |
| 1382 | tANI_U8 *command |
| 1383 | ); |
Kiet Lam | 3494745 | 2014-01-21 23:23:40 -0800 | [diff] [blame] | 1384 | |
| 1385 | /**--------------------------------------------------------------------------- |
| 1386 | |
| 1387 | \brief hdd_deinit_batch_scan () - This function cleans up batch scan data |
| 1388 | structures |
| 1389 | |
| 1390 | \param - pAdapter Pointer to HDD adapter |
| 1391 | |
| 1392 | \return - None |
| 1393 | |
| 1394 | --------------------------------------------------------------------------*/ |
| 1395 | |
| 1396 | void hdd_deinit_batch_scan(hdd_adapter_t *pAdapter); |
| 1397 | |
Rajeev Kumar | 8b37329 | 2014-01-08 20:36:55 -0800 | [diff] [blame] | 1398 | #endif /*End of FEATURE_WLAN_BATCH_SCAN*/ |
| 1399 | |
Vinay Krishna Eranna | facf5e2 | 2014-02-24 13:16:25 +0530 | [diff] [blame] | 1400 | boolean hdd_is_5g_supported(hdd_context_t * pHddCtx); |
| 1401 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1402 | #endif // end #if !defined( WLAN_HDD_MAIN_H ) |