Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 2 | * 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 Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 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 Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 61 | #include <net/cfg80211.h> |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 62 | #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 Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 71 | #ifdef WLAN_OPEN_SOURCE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 72 | #include <linux/wakelock.h> |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 73 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 74 | #include <wlan_hdd_ftm.h> |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 75 | #ifdef FEATURE_WLAN_TDLS |
| 76 | #include "wlan_hdd_tdls.h" |
| 77 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 78 | /*--------------------------------------------------------------------------- |
| 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 |
| 86 | /** Queue length specified to OS in the net_device */ |
| 87 | #define NET_DEV_TX_QUEUE_LEN 100 |
| 88 | /** HDD's internal Tx Queue Length. Needs to be a power of 2 */ |
| 89 | #define HDD_TX_QUEUE_MAX_LEN 128 |
| 90 | /** HDD internal Tx Queue Low Watermark. Net Device TX queue is disabled |
| 91 | * when HDD queue becomes full. This Low watermark is used to enable |
| 92 | * the Net Device queue again */ |
| 93 | #define HDD_TX_QUEUE_LOW_WATER_MARK (HDD_TX_QUEUE_MAX_LEN*3/4) |
| 94 | /** Bytes to reserve in the headroom */ |
| 95 | #define LIBRA_HW_NEEDED_HEADROOM 128 |
| 96 | /** Hdd Tx Time out value */ |
| 97 | #ifdef LIBRA_LINUX_PC |
| 98 | #define HDD_TX_TIMEOUT (8000) |
| 99 | #else |
| 100 | #define HDD_TX_TIMEOUT msecs_to_jiffies(5000) |
| 101 | #endif |
| 102 | /** Hdd Default MTU */ |
| 103 | #define HDD_DEFAULT_MTU (1500) |
Jeff Johnson | 6a81ca4 | 2013-04-05 10:37:08 -0700 | [diff] [blame] | 104 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 105 | /**event flags registered net device*/ |
Jeff Johnson | 6a81ca4 | 2013-04-05 10:37:08 -0700 | [diff] [blame] | 106 | #define NET_DEVICE_REGISTERED (0) |
| 107 | #define SME_SESSION_OPENED (1) |
| 108 | #define INIT_TX_RX_SUCCESS (2) |
| 109 | #define WMM_INIT_DONE (3) |
| 110 | #define SOFTAP_BSS_STARTED (4) |
| 111 | #define DEVICE_IFACE_OPENED (5) |
| 112 | #define TDLS_INIT_DONE (6) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 113 | |
| 114 | /** Maximum time(ms)to wait for disconnect to complete **/ |
| 115 | #define WLAN_WAIT_TIME_DISCONNECT 500 |
| 116 | #define WLAN_WAIT_TIME_STATS 800 |
| 117 | #define WLAN_WAIT_TIME_POWER 800 |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 118 | /* 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 Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 122 | #define WLAN_WAIT_TIME_ABORTSCAN 2000 |
| 123 | |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 124 | /** Maximum time(ms) to wait for tdls add sta to complete **/ |
| 125 | #define WAIT_TIME_TDLS_ADD_STA 1500 |
| 126 | |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 127 | /** Maximum time(ms) to wait for tdls del sta to complete **/ |
| 128 | #define WAIT_TIME_TDLS_DEL_STA 1500 |
| 129 | |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 130 | /** Maximum time(ms) to wait for Link Establish Req to complete **/ |
| 131 | #define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500 |
| 132 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 133 | /** Maximum time(ms) to wait for tdls mgmt to complete **/ |
Gopichand Nakkala | 21c3f9b | 2013-03-23 14:45:55 -0700 | [diff] [blame] | 134 | #define WAIT_TIME_TDLS_MGMT 11000 |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 135 | |
Hoonki Lee | 1462135 | 2013-04-16 17:51:19 -0700 | [diff] [blame] | 136 | /** Maximum time(ms) to wait for tdls initiator to start direct communication **/ |
Gopichand Nakkala | 9b4eee1 | 2013-05-21 16:05:48 +0530 | [diff] [blame] | 137 | #define WAIT_TIME_TDLS_INITIATOR 600 |
Madan Mohan Koyyalamudi | c3a240c | 2012-09-28 15:34:08 -0700 | [diff] [blame] | 138 | /* Maximum time to get crda entry settings */ |
| 139 | #define CRDA_WAIT_TIME 300 |
| 140 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 141 | /* Scan Req Timeout */ |
| 142 | #define WLAN_WAIT_TIME_SCAN_REQ 100 |
| 143 | |
| 144 | #define MAX_NUMBER_OF_ADAPTERS 4 |
| 145 | |
| 146 | #define MAX_CFG_STRING_LEN 255 |
| 147 | |
| 148 | #define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] |
| 149 | /** Mac Address string **/ |
| 150 | #define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x" |
| 151 | #define MAX_GENIE_LEN 255 |
| 152 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 153 | #define WLAN_CHIP_VERSION "WCNSS" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 154 | |
| 155 | #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] | 156 | #define ENTER() VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "Enter:%s", __func__) |
| 157 | #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] | 158 | |
| 159 | #define WLAN_HDD_GET_PRIV_PTR(__dev__) (hdd_adapter_t*)(netdev_priv((__dev__))) |
| 160 | |
| 161 | #define MAX_EXIT_ATTEMPTS_DURING_LOGP 20 |
| 162 | |
| 163 | #define MAX_NO_OF_2_4_CHANNELS 14 |
| 164 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 165 | #define WLAN_HDD_PUBLIC_ACTION_FRAME 4 |
| 166 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET 24 |
| 167 | #define WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET 30 |
| 168 | #define WLAN_HDD_P2P_SOCIAL_CHANNELS 3 |
Madan Mohan Koyyalamudi | 8d50f31 | 2012-11-27 15:48:57 -0800 | [diff] [blame] | 169 | #define WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN 1 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 170 | |
Gopichand Nakkala | 1f7a64f | 2013-04-01 18:37:17 +0530 | [diff] [blame] | 171 | #define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \ |
| 172 | (((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462)) |
| 173 | |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 174 | #ifdef WLAN_FEATURE_11W |
| 175 | #define WLAN_HDD_SA_QUERY_ACTION_FRAME 8 |
| 176 | #endif |
| 177 | |
Hoonki Lee | 1090c6a | 2013-01-16 17:40:54 -0800 | [diff] [blame] | 178 | #define WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP 14 |
| 179 | #define WLAN_HDD_TDLS_ACTION_FRAME 12 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 180 | #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK |
Sameer Thalappil | 84b14ff | 2013-06-12 16:02:52 -0700 | [diff] [blame] | 181 | #define HDD_WAKE_LOCK_DURATION 50 //in msecs |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 182 | #endif |
| 183 | |
Amar Singhal | 6144c00 | 2013-05-03 16:11:42 -0700 | [diff] [blame] | 184 | #define HDD_SAP_WAKE_LOCK_DURATION 10000 //in msecs |
Madan Mohan Koyyalamudi | 69fc3ad | 2012-11-28 16:04:56 -0800 | [diff] [blame] | 185 | |
Sameer Thalappil | 451ebb9 | 2013-06-28 15:49:58 -0700 | [diff] [blame] | 186 | #define HDD_MOD_EXIT_SSR_MAX_RETRIES 30 |
| 187 | |
Sunil Ravi | a72c399 | 2013-01-31 06:12:22 -0800 | [diff] [blame] | 188 | /* Maximum number of interfaces allowed(STA, P2P Device, P2P Interface) */ |
| 189 | #define WLAN_MAX_INTERFACES 3 |
| 190 | |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 191 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
| 192 | #define GTK_OFFLOAD_ENABLE 0 |
| 193 | #define GTK_OFFLOAD_DISABLE 1 |
| 194 | #endif |
| 195 | |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 196 | #define HDD_MAC_ADDR_LEN 6 |
Srinivas Girigowda | 6cf0b82 | 2013-06-27 14:00:20 -0700 | [diff] [blame] | 197 | #define HDD_ROAM_SCAN_CHANNEL_SWITCH_TIME 3 |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 198 | typedef v_U8_t tWlanHddMacAddr[HDD_MAC_ADDR_LEN]; |
| 199 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 200 | typedef struct hdd_tx_rx_stats_s |
| 201 | { |
| 202 | // start_xmit stats |
| 203 | __u32 txXmitCalled; |
| 204 | __u32 txXmitDropped; |
| 205 | __u32 txXmitBackPressured; |
| 206 | __u32 txXmitQueued; |
| 207 | __u32 txXmitClassifiedAC[NUM_TX_QUEUES]; |
| 208 | __u32 txXmitDroppedAC[NUM_TX_QUEUES]; |
| 209 | __u32 txXmitBackPressuredAC[NUM_TX_QUEUES]; |
| 210 | __u32 txXmitQueuedAC[NUM_TX_QUEUES]; |
| 211 | // fetch_cbk stats |
| 212 | __u32 txFetched; |
| 213 | __u32 txFetchedAC[NUM_TX_QUEUES]; |
| 214 | __u32 txFetchEmpty; |
| 215 | __u32 txFetchLowResources; |
| 216 | __u32 txFetchDequeueError; |
| 217 | __u32 txFetchDequeued; |
| 218 | __u32 txFetchDequeuedAC[NUM_TX_QUEUES]; |
| 219 | __u32 txFetchDePressured; |
| 220 | __u32 txFetchDePressuredAC[NUM_TX_QUEUES]; |
| 221 | // complete_cbk_stats |
| 222 | __u32 txCompleted; |
| 223 | // flush stats |
| 224 | __u32 txFlushed; |
| 225 | __u32 txFlushedAC[NUM_TX_QUEUES]; |
| 226 | // rx stats |
| 227 | __u32 rxChains; |
| 228 | __u32 rxPackets; |
| 229 | __u32 rxDropped; |
| 230 | __u32 rxDelivered; |
| 231 | __u32 rxRefused; |
| 232 | } hdd_tx_rx_stats_t; |
| 233 | |
| 234 | typedef struct hdd_chip_reset_stats_s |
| 235 | { |
| 236 | __u32 totalLogpResets; |
| 237 | __u32 totalCMD53Failures; |
| 238 | __u32 totalMutexReadFailures; |
| 239 | __u32 totalMIFErrorFailures; |
| 240 | __u32 totalFWHearbeatFailures; |
| 241 | __u32 totalUnknownExceptions; |
| 242 | } hdd_chip_reset_stats_t; |
| 243 | |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 244 | #ifdef WLAN_FEATURE_11W |
| 245 | typedef struct hdd_pmf_stats_s |
| 246 | { |
| 247 | uint8 numUnprotDeauthRx; |
| 248 | uint8 numUnprotDisassocRx; |
| 249 | } hdd_pmf_stats_t; |
| 250 | #endif |
| 251 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 252 | typedef struct hdd_stats_s |
| 253 | { |
| 254 | tCsrSummaryStatsInfo summary_stat; |
| 255 | tCsrGlobalClassAStatsInfo ClassA_stat; |
| 256 | tCsrGlobalClassBStatsInfo ClassB_stat; |
| 257 | tCsrGlobalClassCStatsInfo ClassC_stat; |
| 258 | tCsrGlobalClassDStatsInfo ClassD_stat; |
| 259 | tCsrPerStaStatsInfo perStaStats; |
| 260 | hdd_tx_rx_stats_t hddTxRxStats; |
| 261 | hdd_chip_reset_stats_t hddChipResetStats; |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 262 | #ifdef WLAN_FEATURE_11W |
| 263 | hdd_pmf_stats_t hddPmfStats; |
| 264 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 265 | } hdd_stats_t; |
| 266 | |
| 267 | typedef enum |
| 268 | { |
| 269 | HDD_ROAM_STATE_NONE, |
| 270 | |
| 271 | // Issuing a disconnect due to transition into low power states. |
| 272 | HDD_ROAM_STATE_DISCONNECTING_POWER, |
| 273 | |
| 274 | // move to this state when HDD sets a key with SME/CSR. Note this is |
| 275 | // an important state to get right because we will get calls into our SME |
| 276 | // callback routine for SetKey activity that we did not initiate! |
| 277 | HDD_ROAM_STATE_SETTING_KEY, |
| 278 | } HDD_ROAM_STATE; |
| 279 | |
| 280 | typedef enum |
| 281 | { |
| 282 | eHDD_SUSPEND_NONE = 0, |
| 283 | eHDD_SUSPEND_DEEP_SLEEP, |
| 284 | eHDD_SUSPEND_STANDBY, |
| 285 | } hdd_ps_state_t; |
| 286 | |
| 287 | typedef struct roaming_info_s |
| 288 | { |
| 289 | HDD_ROAM_STATE roamingState; |
| 290 | vos_event_t roamingEvent; |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 291 | |
| 292 | tWlanHddMacAddr bssid; |
| 293 | tWlanHddMacAddr peerMac; |
| 294 | tANI_U32 roamId; |
| 295 | eRoamCmdStatus roamStatus; |
| 296 | v_BOOL_t deferKeyComplete; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 297 | |
| 298 | } roaming_info_t; |
| 299 | |
| 300 | #ifdef FEATURE_WLAN_WAPI |
| 301 | /* Define WAPI macros for Length, BKID count etc*/ |
| 302 | #define MAX_WPI_KEY_LENGTH 16 |
| 303 | #define MAX_NUM_PN 16 |
| 304 | #define MAC_ADDR_LEN 6 |
| 305 | #define MAX_ADDR_INDEX 12 |
| 306 | #define MAX_NUM_AKM_SUITES 16 |
| 307 | #define MAX_NUM_UNI_SUITES 16 |
| 308 | #define MAX_NUM_BKIDS 16 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 309 | |
| 310 | /** WAPI AUTH mode definition */ |
| 311 | enum _WAPIAuthMode |
| 312 | { |
| 313 | WAPI_AUTH_MODE_OPEN = 0, |
| 314 | WAPI_AUTH_MODE_PSK = 1, |
| 315 | WAPI_AUTH_MODE_CERT |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 316 | } __packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 317 | typedef enum _WAPIAuthMode WAPIAuthMode; |
| 318 | |
| 319 | /** WAPI Work mode structure definition */ |
| 320 | #define WZC_ORIGINAL 0 |
| 321 | #define WAPI_EXTENTION 1 |
| 322 | |
| 323 | struct _WAPI_FUNCTION_MODE |
| 324 | { |
| 325 | unsigned char wapiMode; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 326 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 327 | |
| 328 | typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE; |
| 329 | |
| 330 | typedef struct _WAPI_BKID |
| 331 | { |
| 332 | v_U8_t bkid[16]; |
| 333 | }WAPI_BKID, *pWAPI_BKID; |
| 334 | |
| 335 | /** WAPI Association information structure definition */ |
| 336 | struct _WAPI_AssocInfo |
| 337 | { |
| 338 | v_U8_t elementID; |
| 339 | v_U8_t length; |
| 340 | v_U16_t version; |
| 341 | v_U16_t akmSuiteCount; |
| 342 | v_U32_t akmSuite[MAX_NUM_AKM_SUITES]; |
| 343 | v_U16_t unicastSuiteCount; |
| 344 | v_U32_t unicastSuite[MAX_NUM_UNI_SUITES]; |
| 345 | v_U32_t multicastSuite; |
| 346 | v_U16_t wapiCability; |
| 347 | v_U16_t bkidCount; |
| 348 | WAPI_BKID bkidList[MAX_NUM_BKIDS]; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 349 | } __packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 350 | |
| 351 | typedef struct _WAPI_AssocInfo WAPI_AssocInfo; |
| 352 | typedef struct _WAPI_AssocInfo *pWAPI_IEAssocInfo; |
| 353 | |
| 354 | /** WAPI KEY Type definition */ |
| 355 | enum _WAPIKeyType |
| 356 | { |
| 357 | PAIRWISE_KEY, //0 |
| 358 | GROUP_KEY //1 |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 359 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 360 | typedef enum _WAPIKeyType WAPIKeyType; |
| 361 | |
| 362 | /** WAPI KEY Direction definition */ |
| 363 | enum _KEY_DIRECTION |
| 364 | { |
| 365 | None, |
| 366 | Rx, |
| 367 | Tx, |
| 368 | Rx_Tx |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 369 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 370 | |
| 371 | typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION; |
| 372 | |
| 373 | /** WAPI KEY stucture definition */ |
| 374 | struct WLAN_WAPI_KEY |
| 375 | { |
| 376 | WAPIKeyType keyType; |
| 377 | WAPI_KEY_DIRECTION keyDirection; /*reserved for future use*/ |
| 378 | v_U8_t keyId; |
| 379 | v_U8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use*/ |
| 380 | int wpiekLen; |
| 381 | v_U8_t wpiek[MAX_WPI_KEY_LENGTH]; |
| 382 | int wpickLen; |
| 383 | v_U8_t wpick[MAX_WPI_KEY_LENGTH]; |
| 384 | v_U8_t pn[MAX_NUM_PN]; /*reserved for future use*/ |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 385 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 386 | |
| 387 | typedef struct WLAN_WAPI_KEY WLAN_WAPI_KEY; |
| 388 | typedef struct WLAN_WAPI_KEY *pWLAN_WAPI_KEY; |
| 389 | |
| 390 | #define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0])) |
| 391 | #define WLAN_EID_WAPI 68 |
| 392 | #define WAPI_PSK_AKM_SUITE 0x02721400 |
| 393 | #define WAPI_CERT_AKM_SUITE 0x01721400 |
| 394 | |
| 395 | /** WAPI BKID List stucture definition */ |
| 396 | struct _WLAN_BKID_LIST |
| 397 | { |
| 398 | v_U32_t length; |
| 399 | v_U32_t BKIDCount; |
| 400 | WAPI_BKID BKID[1]; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 401 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 402 | |
| 403 | typedef struct _WLAN_BKID_LIST WLAN_BKID_LIST; |
| 404 | typedef struct _WLAN_BKID_LIST *pWLAN_BKID_LIST; |
| 405 | |
| 406 | |
| 407 | /** WAPI Information stucture definition */ |
| 408 | struct hdd_wapi_info_s |
| 409 | { |
| 410 | v_U32_t nWapiMode; |
| 411 | v_BOOL_t fIsWapiSta; |
| 412 | v_MACADDR_t cachedMacAddr; |
| 413 | v_UCHAR_t wapiAuthMode; |
Madan Mohan Koyyalamudi | 4e31b13 | 2012-11-02 13:13:52 -0700 | [diff] [blame] | 414 | }__packed; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 415 | typedef struct hdd_wapi_info_s hdd_wapi_info_t; |
| 416 | #endif /* FEATURE_WLAN_WAPI */ |
| 417 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 418 | typedef struct beacon_data_s { |
| 419 | u8 *head, *tail; |
| 420 | int head_len, tail_len; |
| 421 | int dtim_period; |
| 422 | } beacon_data_t; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 423 | |
| 424 | typedef enum device_mode |
| 425 | { /* MAINTAIN 1 - 1 CORRESPONDENCE WITH tVOS_CON_MODE*/ |
| 426 | WLAN_HDD_INFRA_STATION, |
| 427 | WLAN_HDD_SOFTAP, |
| 428 | WLAN_HDD_P2P_CLIENT, |
| 429 | WLAN_HDD_P2P_GO, |
Jeff Johnson | 88ba774 | 2013-02-27 14:36:02 -0800 | [diff] [blame] | 430 | WLAN_HDD_MONITOR, |
| 431 | WLAN_HDD_FTM, |
Shailender Karmuchi | a734f33 | 2013-04-19 14:02:48 -0700 | [diff] [blame] | 432 | WLAN_HDD_IBSS, |
Ravi Joshi | aeb7d9e | 2013-05-02 12:28:14 -0700 | [diff] [blame] | 433 | WLAN_HDD_P2P_DEVICE |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 434 | }device_mode_t; |
| 435 | |
| 436 | typedef enum rem_on_channel_request_type |
| 437 | { |
| 438 | REMAIN_ON_CHANNEL_REQUEST, |
| 439 | OFF_CHANNEL_ACTION_TX, |
| 440 | }rem_on_channel_request_type_t; |
| 441 | |
| 442 | /* Thermal mitigation Level Enum Type */ |
| 443 | typedef enum |
| 444 | { |
| 445 | WLAN_HDD_TM_LEVEL_0, |
| 446 | WLAN_HDD_TM_LEVEL_1, |
| 447 | WLAN_HDD_TM_LEVEL_2, |
| 448 | WLAN_HDD_TM_LEVEL_3, |
| 449 | WLAN_HDD_TM_LEVEL_4, |
| 450 | WLAN_HDD_TM_LEVEL_MAX |
| 451 | } WLAN_TmLevelEnumType; |
| 452 | |
| 453 | /* Driver Action based on thermal mitigation level structure */ |
| 454 | typedef struct |
| 455 | { |
| 456 | v_BOOL_t ampduEnable; |
| 457 | v_BOOL_t enterImps; |
| 458 | v_U32_t txSleepDuration; |
| 459 | v_U32_t txOperationDuration; |
| 460 | v_U32_t txBlockFrameCountThreshold; |
| 461 | } hdd_tmLevelAction_t; |
| 462 | |
| 463 | /* Thermal Mitigation control context structure */ |
| 464 | typedef struct |
| 465 | { |
| 466 | WLAN_TmLevelEnumType currentTmLevel; |
| 467 | hdd_tmLevelAction_t tmAction; |
| 468 | vos_timer_t txSleepTimer; |
| 469 | struct mutex tmOperationLock; |
| 470 | vos_event_t setTmDoneEvent; |
| 471 | v_U32_t txFrameCount; |
| 472 | v_TIME_t lastblockTs; |
| 473 | v_TIME_t lastOpenTs; |
| 474 | struct netdev_queue *blockedQueue; |
Leo Chang | 50bbd25 | 2013-04-25 14:58:01 -0700 | [diff] [blame] | 475 | v_BOOL_t qBlocked; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 476 | } hdd_thermal_mitigation_info_t; |
| 477 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 478 | typedef struct hdd_remain_on_chan_ctx |
| 479 | { |
| 480 | struct net_device *dev; |
| 481 | struct ieee80211_channel chan; |
| 482 | enum nl80211_channel_type chan_type; |
| 483 | unsigned int duration; |
| 484 | u64 cookie; |
| 485 | rem_on_channel_request_type_t rem_on_chan_request; |
| 486 | }hdd_remain_on_chan_ctx_t; |
| 487 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 488 | typedef enum{ |
| 489 | HDD_IDLE, |
| 490 | HDD_PD_REQ_ACK_PENDING, |
| 491 | HDD_GO_NEG_REQ_ACK_PENDING, |
| 492 | HDD_INVALID_STATE, |
| 493 | }eP2PActionFrameState; |
| 494 | |
| 495 | typedef enum { |
| 496 | WLAN_HDD_GO_NEG_REQ, |
| 497 | WLAN_HDD_GO_NEG_RESP, |
| 498 | WLAN_HDD_GO_NEG_CNF, |
| 499 | WLAN_HDD_INVITATION_REQ, |
| 500 | WLAN_HDD_INVITATION_RESP, |
| 501 | WLAN_HDD_DEV_DIS_REQ, |
| 502 | WLAN_HDD_DEV_DIS_RESP, |
| 503 | WLAN_HDD_PROV_DIS_REQ, |
| 504 | WLAN_HDD_PROV_DIS_RESP, |
| 505 | }tActionFrmType; |
| 506 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 507 | typedef struct hdd_cfg80211_state_s |
| 508 | { |
| 509 | tANI_U16 current_freq; |
| 510 | u64 action_cookie; |
| 511 | tANI_U8 *buf; |
| 512 | size_t len; |
| 513 | struct sk_buff *skb; |
| 514 | hdd_remain_on_chan_ctx_t* remain_on_chan_ctx; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 515 | eP2PActionFrameState actionFrmState; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 516 | }hdd_cfg80211_state_t; |
| 517 | |
Madan Mohan Koyyalamudi | b5da533 | 2012-10-15 17:23:21 -0700 | [diff] [blame] | 518 | |
| 519 | typedef enum{ |
| 520 | HDD_SSR_NOT_REQUIRED, |
| 521 | HDD_SSR_REQUIRED, |
| 522 | HDD_SSR_DISABLED, |
| 523 | }e_hdd_ssr_required; |
| 524 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 525 | struct hdd_station_ctx |
| 526 | { |
| 527 | /** Handle to the Wireless Extension State */ |
| 528 | hdd_wext_state_t WextState; |
| 529 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 530 | #ifdef FEATURE_WLAN_TDLS |
| 531 | tdlsCtx_t *pHddTdlsCtx; |
| 532 | #endif |
| 533 | |
| 534 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 535 | /**Connection information*/ |
| 536 | connection_info_t conn_info; |
| 537 | |
| 538 | roaming_info_t roam_info; |
| 539 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 540 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 541 | int ft_carrier_on; |
| 542 | #endif |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 543 | |
| 544 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
Gopichand Nakkala | d36ee62 | 2013-05-07 14:13:27 +0530 | [diff] [blame] | 545 | tSirGtkOffloadParams gtkOffloadReqParams; |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 546 | #endif |
Shailender Karmuchi | 15cd067 | 2013-05-15 19:50:04 -0700 | [diff] [blame] | 547 | /*Increment whenever ibss New peer joins and departs the network */ |
| 548 | int ibss_sta_generation; |
Shailender Karmuchi | 642e981 | 2013-05-30 14:34:49 -0700 | [diff] [blame] | 549 | |
| 550 | /*Save the wep/wpa-none keys*/ |
| 551 | tCsrRoamSetKey ibss_enc_key; |
Srinivas Girigowda | 66c05eb | 2013-07-14 13:06:01 -0700 | [diff] [blame] | 552 | |
| 553 | v_BOOL_t hdd_ReassocScenario; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 554 | }; |
| 555 | |
| 556 | #define BSS_STOP 0 |
| 557 | #define BSS_START 1 |
| 558 | typedef struct hdd_hostapd_state_s |
| 559 | { |
| 560 | int bssState; |
| 561 | vos_event_t vosEvent; |
| 562 | VOS_STATUS vosStatus; |
| 563 | v_BOOL_t bCommit; |
| 564 | |
| 565 | } hdd_hostapd_state_t; |
| 566 | |
| 567 | |
| 568 | /* |
| 569 | * Per station structure kept in HDD for multiple station support for SoftAP |
| 570 | */ |
| 571 | typedef struct { |
| 572 | /** The station entry is used or not */ |
| 573 | v_BOOL_t isUsed; |
| 574 | |
| 575 | /** Station ID reported back from HAL (through SAP). Broadcast |
| 576 | * uses station ID zero by default in both libra and volans. */ |
| 577 | v_U8_t ucSTAId; |
| 578 | |
| 579 | /** MAC address of the station */ |
| 580 | v_MACADDR_t macAddrSTA; |
| 581 | |
| 582 | /** Current Station state so HDD knows how to deal with packet |
| 583 | * queue. Most recent states used to change TL STA state. */ |
| 584 | WLANTL_STAStateType tlSTAState; |
| 585 | |
| 586 | /** Transmit queues for each AC (VO,VI,BE etc). */ |
| 587 | hdd_list_t wmm_tx_queue[NUM_TX_QUEUES]; |
| 588 | |
| 589 | /** Might need to differentiate queue depth in contention case */ |
| 590 | v_U16_t aTxQueueDepth[NUM_TX_QUEUES]; |
| 591 | |
| 592 | /**Track whether OS TX queue has been disabled.*/ |
| 593 | v_BOOL_t txSuspended[NUM_TX_QUEUES]; |
| 594 | |
| 595 | /** Track QoS status of station */ |
| 596 | v_BOOL_t isQosEnabled; |
| 597 | |
Madan Mohan Koyyalamudi | cd78499 | 2013-01-11 15:30:36 -0800 | [diff] [blame] | 598 | /** The station entry for which Deauth is in progress */ |
| 599 | v_BOOL_t isDeauthInProgress; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 600 | } hdd_station_info_t; |
| 601 | |
| 602 | struct hdd_ap_ctx_s |
| 603 | { |
| 604 | hdd_hostapd_state_t HostapdState; |
| 605 | |
| 606 | // Memory differentiation mode is enabled |
| 607 | //v_U16_t uMemoryDiffThreshold; |
| 608 | //v_U8_t uNumActiveAC; |
| 609 | //v_U8_t uActiveACMask; |
| 610 | //v_U8_t aTxQueueLimit[NUM_TX_QUEUES]; |
| 611 | |
| 612 | /** Packet Count to update uNumActiveAC and uActiveACMask */ |
| 613 | //v_U16_t uUpdatePktCount; |
| 614 | |
| 615 | /** Station ID assigned after BSS starts */ |
| 616 | v_U8_t uBCStaId; |
| 617 | |
| 618 | v_U8_t uPrivacy; // The privacy bits of configuration |
Jeff Johnson | 7dda777 | 2013-02-27 08:36:13 -0800 | [diff] [blame] | 619 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 620 | tSirWPSPBCProbeReq WPSPBCProbeReq; |
Jeff Johnson | 7dda777 | 2013-02-27 08:36:13 -0800 | [diff] [blame] | 621 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 622 | tsap_Config_t sapConfig; |
Jeff Johnson | 7dda777 | 2013-02-27 08:36:13 -0800 | [diff] [blame] | 623 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 624 | struct semaphore semWpsPBCOverlapInd; |
| 625 | |
| 626 | v_BOOL_t apDisableIntraBssFwd; |
| 627 | |
| 628 | vos_timer_t hdd_ap_inactivity_timer; |
| 629 | |
| 630 | v_U8_t operatingChannel; |
| 631 | |
| 632 | v_BOOL_t uIsAuthenticated; |
| 633 | |
| 634 | eCsrEncryptionType ucEncryptType; |
| 635 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 636 | //This will point to group key data, if it is received before start bss. |
| 637 | tCsrRoamSetKey groupKey; |
| 638 | // This will have WEP key data, if it is received before start bss |
| 639 | tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY]; |
| 640 | |
| 641 | beacon_data_t *beacon; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 642 | }; |
| 643 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 644 | struct hdd_mon_ctx_s |
| 645 | { |
| 646 | hdd_adapter_t *pAdapterForTx; |
| 647 | }; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 648 | |
| 649 | typedef struct hdd_scaninfo_s |
| 650 | { |
| 651 | /* The scan id */ |
| 652 | v_U32_t scanId; |
| 653 | |
| 654 | /* The scan pending */ |
| 655 | v_U32_t mScanPending; |
| 656 | |
| 657 | /* Client Wait Scan Result */ |
| 658 | v_U32_t waitScanResult; |
| 659 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 660 | /* Additional IE for scan */ |
| 661 | tSirAddie scanAddIE; |
| 662 | |
| 663 | /* Scan mode*/ |
| 664 | tSirScanType scan_mode; |
| 665 | |
| 666 | /* Scan Completion Event */ |
| 667 | struct completion scan_req_completion_event; |
| 668 | |
Madan Mohan Koyyalamudi | f4e8100 | 2012-11-13 10:46:38 -0800 | [diff] [blame] | 669 | /* completion variable for abortscan */ |
| 670 | struct completion abortscan_event_var; |
| 671 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 672 | vos_event_t scan_finished_event; |
| 673 | |
| 674 | hdd_scan_pending_option_e scan_pending_option; |
| 675 | |
| 676 | }hdd_scaninfo_t; |
| 677 | |
Gopichand Nakkala | 0f27681 | 2013-02-24 14:45:51 +0530 | [diff] [blame] | 678 | #define WLAN_HDD_MAX_MC_ADDR_LIST 10 |
| 679 | |
| 680 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 681 | typedef struct multicast_addr_list |
| 682 | { |
| 683 | v_U8_t isFilterApplied; |
| 684 | v_U8_t mc_cnt; |
| 685 | v_U8_t addr[WLAN_HDD_MAX_MC_ADDR_LIST][ETH_ALEN]; |
| 686 | } t_multicast_add_list; |
| 687 | #endif |
| 688 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 689 | #define WLAN_HDD_ADAPTER_MAGIC 0x574c414e //ASCII "WLAN" |
| 690 | struct hdd_adapter_s |
| 691 | { |
| 692 | void *pHddCtx; |
| 693 | |
| 694 | device_mode_t device_mode; |
| 695 | |
| 696 | /** Handle to the network device */ |
| 697 | struct net_device *dev; |
| 698 | |
| 699 | //TODO Move this to sta Ctx |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 700 | struct wireless_dev wdev ; |
| 701 | struct cfg80211_scan_request *request ; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 702 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 703 | /** ops checks if Opportunistic Power Save is Enable or Not |
| 704 | * ctw stores ctWindow value once we receive Opps command from |
| 705 | * wpa_supplicant then using ctWindow value we need to Enable |
| 706 | * Opportunistic Power Save |
| 707 | */ |
| 708 | tANI_U8 ops; |
| 709 | tANI_U32 ctw; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 710 | |
| 711 | /** Current MAC Address for the adapter */ |
| 712 | v_MACADDR_t macAddressCurrent; |
| 713 | |
| 714 | /**Event Flags*/ |
| 715 | unsigned long event_flags; |
| 716 | |
| 717 | /**Device TX/RX statistics*/ |
| 718 | struct net_device_stats stats; |
| 719 | /** HDD statistics*/ |
| 720 | hdd_stats_t hdd_stats; |
| 721 | /**Mib information*/ |
| 722 | sHddMib_t hdd_mib; |
| 723 | |
| 724 | tANI_U8 sessionId; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 725 | |
| 726 | /* Completion variable for session close */ |
| 727 | struct completion session_close_comp_var; |
| 728 | |
| 729 | /* Completion variable for session open */ |
| 730 | struct completion session_open_comp_var; |
| 731 | |
| 732 | //TODO: move these to sta ctx. These may not be used in AP |
| 733 | /** completion variable for disconnect callback */ |
| 734 | struct completion disconnect_comp_var; |
| 735 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 736 | /** Completion of change country code */ |
| 737 | struct completion change_country_code; |
| 738 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 739 | /* completion variable for Linkup Event */ |
| 740 | struct completion linkup_event_var; |
| 741 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 742 | /* completion variable for cancel remain on channel Event */ |
| 743 | struct completion cancel_rem_on_chan_var; |
| 744 | |
| 745 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) |
| 746 | /* completion variable for off channel remain on channel Event */ |
| 747 | struct completion offchannel_tx_event; |
| 748 | #endif |
| 749 | /* Completion variable for action frame */ |
| 750 | struct completion tx_action_cnf_event; |
| 751 | /* Completion variable for remain on channel ready */ |
| 752 | struct completion rem_on_chan_ready_event; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 753 | |
Jeff Johnson | 9efb9aa | 2013-03-15 13:59:27 -0700 | [diff] [blame] | 754 | /* Completion variable for Upper Layer Authentication */ |
| 755 | struct completion ula_complete; |
| 756 | |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 757 | #ifdef FEATURE_WLAN_TDLS |
| 758 | struct completion tdls_add_station_comp; |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 759 | struct completion tdls_del_station_comp; |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 760 | struct completion tdls_mgmt_comp; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 761 | struct completion tdls_link_establish_req_comp; |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 762 | eHalStatus tdlsAddStaStatus; |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 763 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 764 | /* Track whether the linkup handling is needed */ |
| 765 | v_BOOL_t isLinkUpSvcNeeded; |
| 766 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 767 | /* Mgmt Frames TX completion status code */ |
| 768 | tANI_U32 mgmtTxCompletionStatus; |
| 769 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 770 | /************************************************************* |
| 771 | * Tx Queues |
| 772 | */ |
| 773 | /** Transmit queues for each AC (VO,VI,BE etc) */ |
| 774 | hdd_list_t wmm_tx_queue[NUM_TX_QUEUES]; |
| 775 | /**Track whether VOS is in a low resource state*/ |
| 776 | v_BOOL_t isVosOutOfResource; |
| 777 | |
| 778 | /**Track whether OS TX queue has been disabled.*/ |
| 779 | v_BOOL_t isTxSuspended[NUM_TX_QUEUES]; |
| 780 | |
| 781 | /** WMM Status */ |
| 782 | hdd_wmm_status_t hddWmmStatus; |
| 783 | /************************************************************* |
| 784 | */ |
| 785 | /************************************************************* |
| 786 | * TODO - Remove it later |
| 787 | */ |
| 788 | /** Multiple station supports */ |
| 789 | /** Per-station structure */ |
| 790 | spinlock_t staInfo_lock; //To protect access to station Info |
| 791 | hdd_station_info_t aStaInfo[WLAN_MAX_STA_COUNT]; |
| 792 | //v_U8_t uNumActiveStation; |
| 793 | |
| 794 | v_U16_t aTxQueueLimit[NUM_TX_QUEUES]; |
| 795 | /************************************************************* |
| 796 | */ |
| 797 | |
| 798 | #ifdef FEATURE_WLAN_WAPI |
| 799 | hdd_wapi_info_t wapi_info; |
| 800 | #endif |
| 801 | |
| 802 | v_S7_t rssi; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 803 | struct work_struct monTxWorkQueue; |
| 804 | struct sk_buff *skb_to_tx; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 805 | |
| 806 | union { |
| 807 | hdd_station_ctx_t station; |
| 808 | hdd_ap_ctx_t ap; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 809 | hdd_mon_ctx_t monitor; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 810 | }sessionCtx; |
| 811 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 812 | hdd_cfg80211_state_t cfg80211State; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 813 | |
Gopichand Nakkala | 0f27681 | 2013-02-24 14:45:51 +0530 | [diff] [blame] | 814 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 815 | t_multicast_add_list mc_addr_list; |
| 816 | #endif |
| 817 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 818 | //Magic cookie for adapter sanity verification |
| 819 | v_U32_t magic; |
| 820 | v_BOOL_t higherDtimTransition; |
| 821 | }; |
| 822 | |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 823 | #define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station) |
| 824 | #define WLAN_HDD_GET_AP_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap) |
| 825 | #define WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.station.WextState) |
| 826 | #define WLAN_HDD_GET_CTX(pAdapter) ((hdd_context_t*)pAdapter->pHddCtx) |
| 827 | #define WLAN_HDD_GET_HAL_CTX(pAdapter) (((hdd_context_t*)(pAdapter->pHddCtx))->hHal) |
| 828 | #define WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap.HostapdState) |
| 829 | #define WLAN_HDD_GET_CFG_STATE_PTR(pAdapter) (&(pAdapter)->cfg80211State) |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 830 | #ifdef FEATURE_WLAN_TDLS |
Madan Mohan Koyyalamudi | 8174692 | 2013-07-17 14:38:51 +0530 | [diff] [blame] | 831 | #define WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter) \ |
Gopichand Nakkala | 40ab275 | 2013-04-04 20:11:36 +0530 | [diff] [blame] | 832 | (((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) && \ |
Madan Mohan Koyyalamudi | 8174692 | 2013-07-17 14:38:51 +0530 | [diff] [blame] | 833 | (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)) ? 0 : 1) |
| 834 | #define WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter) \ |
| 835 | ((WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter)) ? \ |
| 836 | (tdlsCtx_t*)(pAdapter)->sessionCtx.station.pHddTdlsCtx : NULL) |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 837 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 838 | |
| 839 | typedef struct hdd_adapter_list_node |
| 840 | { |
| 841 | hdd_list_node_t node; // MUST be first element |
| 842 | hdd_adapter_t *pAdapter; |
| 843 | }hdd_adapter_list_node_t; |
| 844 | |
| 845 | typedef struct hdd_priv_data_s |
| 846 | { |
| 847 | tANI_U8 *buf; |
| 848 | int used_len; |
| 849 | int total_len; |
| 850 | }hdd_priv_data_t; |
| 851 | |
Leo Chang | 64d68bc | 2013-06-04 15:40:52 -0700 | [diff] [blame] | 852 | typedef struct |
| 853 | { |
| 854 | vos_timer_t trafficTimer; |
| 855 | atomic_t isActiveMode; |
| 856 | v_U8_t isInitialized; |
| 857 | vos_lock_t trafficLock; |
| 858 | v_TIME_t lastFrameTs; |
| 859 | }hdd_traffic_monitor_t; |
| 860 | |
Leo Chang | 9056f46 | 2013-08-01 19:21:11 -0700 | [diff] [blame] | 861 | #ifdef FEATURE_WLAN_LPHB |
| 862 | typedef struct |
| 863 | { |
| 864 | v_U8_t enable; |
| 865 | v_U8_t item; |
| 866 | v_U8_t session; |
| 867 | } lphbEnableStruct; |
| 868 | #endif /* FEATURE_WLAN_LPHB */ |
| 869 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 870 | /** Adapter stucture definition */ |
| 871 | |
| 872 | struct hdd_context_s |
| 873 | { |
| 874 | /** Global VOS context */ |
| 875 | v_CONTEXT_t pvosContext; |
| 876 | |
| 877 | /** HAL handle...*/ |
| 878 | tHalHandle hHal; |
| 879 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 880 | struct wiphy *wiphy ; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 881 | //TODO Remove this from here. |
| 882 | |
| 883 | hdd_list_t hddAdapters; //List of adapters |
| 884 | /* One per STA: 1 for RX_BCMC_STA_ID and 1 for SAP_SELF_STA_ID*/ |
| 885 | hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + 3]; //One per sta. For quick reference. |
| 886 | |
| 887 | /** Pointer for firmware image data */ |
| 888 | const struct firmware *fw; |
| 889 | |
| 890 | /** Pointer for configuration data */ |
| 891 | const struct firmware *cfg; |
| 892 | |
| 893 | /** Pointer for nv data */ |
| 894 | const struct firmware *nv; |
| 895 | |
| 896 | /** Pointer to the parent device */ |
| 897 | struct device *parent_dev; |
| 898 | |
| 899 | pid_t pid_sdio_claimed; |
| 900 | atomic_t sdio_claim_count; |
| 901 | |
| 902 | /** Config values read from qcom_cfg.ini file */ |
| 903 | hdd_config_t *cfg_ini; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 904 | wlan_hdd_ftm_status_t ftm; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 905 | /** completion variable for full power callback */ |
| 906 | struct completion full_pwr_comp_var; |
| 907 | /** completion variable for Request BMPS callback */ |
| 908 | struct completion req_bmps_comp_var; |
| 909 | |
| 910 | /** completion variable for standby callback */ |
| 911 | struct completion standby_comp_var; |
| 912 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 913 | /* Completion variable to indicate Rx Thread Suspended */ |
| 914 | struct completion rx_sus_event_var; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 915 | |
| 916 | /* Completion variable to indicate Tx Thread Suspended */ |
| 917 | struct completion tx_sus_event_var; |
| 918 | |
| 919 | /* Completion variable to indicate Mc Thread Suspended */ |
| 920 | struct completion mc_sus_event_var; |
| 921 | |
Madan Mohan Koyyalamudi | c3a240c | 2012-09-28 15:34:08 -0700 | [diff] [blame] | 922 | /* Completion variable to wlan_hdd_get_crda_regd_entry */ |
| 923 | struct completion driver_crda_req; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 924 | |
| 925 | v_BOOL_t isWlanSuspended; |
| 926 | |
| 927 | v_BOOL_t isTxThreadSuspended; |
| 928 | |
| 929 | v_BOOL_t isMcThreadSuspended; |
| 930 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 931 | v_BOOL_t isRxThreadSuspended; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 932 | |
| 933 | volatile v_BOOL_t isLogpInProgress; |
| 934 | |
| 935 | v_BOOL_t isLoadUnloadInProgress; |
| 936 | |
| 937 | /**Track whether driver has been suspended.*/ |
| 938 | hdd_ps_state_t hdd_ps_state; |
| 939 | |
| 940 | /* Track whether Mcast/Bcast Filter is enabled.*/ |
| 941 | v_BOOL_t hdd_mcastbcast_filter_set; |
| 942 | |
| 943 | /* Track whether ignore DTIM is enabled*/ |
| 944 | v_BOOL_t hdd_ignore_dtim_enabled; |
| 945 | v_U32_t hdd_actual_ignore_DTIM_value; |
| 946 | v_U32_t hdd_actual_LI_value; |
| 947 | |
| 948 | |
| 949 | v_BOOL_t hdd_wlan_suspended; |
| 950 | |
| 951 | spinlock_t filter_lock; |
| 952 | |
| 953 | /* Lock to avoid race condtion during start/stop bss*/ |
| 954 | struct mutex sap_lock; |
| 955 | |
| 956 | /** ptt Process ID*/ |
| 957 | v_SINT_t ptt_pid; |
Leo Chang | 9e64608 | 2013-08-02 11:20:21 -0700 | [diff] [blame] | 958 | #ifdef WLAN_KD_READY_NOTIFIER |
| 959 | v_BOOL_t kd_nl_init; |
| 960 | #endif /* WLAN_KD_READY_NOTIFIER */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 961 | v_U8_t change_iface; |
| 962 | |
| 963 | /** Concurrency Parameters*/ |
| 964 | tVOS_CONCURRENCY_MODE concurrency_mode; |
| 965 | |
| 966 | v_U16_t no_of_sessions[VOS_MAX_NO_OF_MODE]; |
| 967 | |
| 968 | hdd_chip_reset_stats_t hddChipResetStats; |
| 969 | /* Number of times riva restarted */ |
| 970 | v_U32_t hddRivaResetStats; |
| 971 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 972 | /* Can we allow AMP connection right now*/ |
| 973 | v_BOOL_t isAmpAllowed; |
| 974 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 975 | /** P2P Device MAC Address for the adapter */ |
| 976 | v_MACADDR_t p2pDeviceAddress; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 977 | |
| 978 | /* Thermal mitigation information */ |
| 979 | hdd_thermal_mitigation_info_t tmInfo; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 980 | |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 981 | #ifdef WLAN_OPEN_SOURCE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 982 | #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK |
| 983 | struct wake_lock rx_wake_lock; |
| 984 | #endif |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 985 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 986 | |
| 987 | /* |
| 988 | * Framework initiated driver restarting |
| 989 | * hdd_reload_timer : Restart retry timer |
| 990 | * isRestartInProgress: Restart in progress |
| 991 | * hdd_restart_retries: Restart retries |
| 992 | * |
| 993 | */ |
| 994 | vos_timer_t hdd_restart_timer; |
| 995 | atomic_t isRestartInProgress; |
| 996 | u_int8_t hdd_restart_retries; |
| 997 | |
Madan Mohan Koyyalamudi | 2a1ba77 | 2012-10-11 14:59:06 -0700 | [diff] [blame] | 998 | hdd_scaninfo_t scan_info; |
Gopichand Nakkala | f7e53c5 | 2013-01-07 14:52:52 -0800 | [diff] [blame] | 999 | |
Madan Mohan Koyyalamudi | 543172b | 2012-12-05 16:40:18 -0800 | [diff] [blame] | 1000 | /*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] | 1001 | is invoked*/ |
Madan Mohan Koyyalamudi | 543172b | 2012-12-05 16:40:18 -0800 | [diff] [blame] | 1002 | v_BOOL_t is_dynamic_channel_range_set; |
Madan Mohan Koyyalamudi | 69fc3ad | 2012-11-28 16:04:56 -0800 | [diff] [blame] | 1003 | |
Gopichand Nakkala | 1bc04f1 | 2013-02-28 14:29:23 -0800 | [diff] [blame] | 1004 | #ifdef WLAN_OPEN_SOURCE |
Madan Mohan Koyyalamudi | 69fc3ad | 2012-11-28 16:04:56 -0800 | [diff] [blame] | 1005 | struct wake_lock sap_wake_lock; |
Gopichand Nakkala | 1bc04f1 | 2013-02-28 14:29:23 -0800 | [diff] [blame] | 1006 | #endif |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 1007 | |
| 1008 | #ifdef FEATURE_WLAN_TDLS |
| 1009 | eTDLSSupportMode tdls_mode; |
Hoonki Lee | 2751190 | 2013-03-14 18:19:06 -0700 | [diff] [blame] | 1010 | eTDLSSupportMode tdls_mode_last; |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 1011 | tdlsConnInfo_t tdlsConnInfo[HDD_MAX_NUM_TDLS_STA]; |
| 1012 | /* TDLS peer connected count */ |
| 1013 | tANI_U16 connected_peer_count; |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 1014 | tdls_scan_context_t tdls_scan_ctxt; |
Sameer Thalappil | 50dc009 | 2013-02-19 17:23:33 -0800 | [diff] [blame] | 1015 | #endif |
Leo Chang | 64d68bc | 2013-06-04 15:40:52 -0700 | [diff] [blame] | 1016 | hdd_traffic_monitor_t traffic_monitor; |
Gopichand Nakkala | b8f0f1a | 2013-05-23 18:19:48 +0530 | [diff] [blame] | 1017 | |
| 1018 | /* MC/BC Filter state variable |
| 1019 | * This always contains the value that is currently |
| 1020 | * configured |
| 1021 | * */ |
| 1022 | v_U8_t configuredMcastBcastFilter; |
Gopichand Nakkala | 8c0386c | 2013-07-09 23:31:37 +0530 | [diff] [blame] | 1023 | |
| 1024 | vos_timer_t hdd_p2p_go_conn_is_in_progress; |
| 1025 | |
Leo Chang | 9056f46 | 2013-08-01 19:21:11 -0700 | [diff] [blame] | 1026 | #ifdef FEATURE_WLAN_LPHB |
| 1027 | lphbEnableStruct lphbEnableReq; |
| 1028 | #endif /* FEATURE_WLAN_LPHB */ |
Yue Ma | 0d4891e | 2013-08-06 17:01:45 -0700 | [diff] [blame] | 1029 | |
| 1030 | /* debugfs entry */ |
| 1031 | struct dentry *debugfs_phy; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1032 | }; |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | /*--------------------------------------------------------------------------- |
| 1037 | Function declarations and documenation |
| 1038 | -------------------------------------------------------------------------*/ |
| 1039 | VOS_STATUS hdd_get_front_adapter( hdd_context_t *pHddCtx, |
| 1040 | hdd_adapter_list_node_t** ppAdapterNode); |
| 1041 | |
| 1042 | VOS_STATUS hdd_get_next_adapter( hdd_context_t *pHddCtx, |
| 1043 | hdd_adapter_list_node_t* pAdapterNode, |
| 1044 | hdd_adapter_list_node_t** pNextAdapterNode); |
| 1045 | |
| 1046 | VOS_STATUS hdd_remove_adapter( hdd_context_t *pHddCtx, |
| 1047 | hdd_adapter_list_node_t* pAdapterNode); |
| 1048 | |
| 1049 | VOS_STATUS hdd_remove_front_adapter( hdd_context_t *pHddCtx, |
| 1050 | hdd_adapter_list_node_t** ppAdapterNode); |
| 1051 | |
| 1052 | VOS_STATUS hdd_add_adapter_back( hdd_context_t *pHddCtx, |
| 1053 | hdd_adapter_list_node_t* pAdapterNode); |
| 1054 | |
| 1055 | VOS_STATUS hdd_add_adapter_front( hdd_context_t *pHddCtx, |
| 1056 | hdd_adapter_list_node_t* pAdapterNode); |
| 1057 | |
| 1058 | 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] | 1059 | const char* name, tSirMacAddr macAddr, |
| 1060 | tANI_U8 rtnl_held ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1061 | VOS_STATUS hdd_close_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, tANI_U8 rtnl_held ); |
| 1062 | VOS_STATUS hdd_close_all_adapters( hdd_context_t *pHddCtx ); |
| 1063 | VOS_STATUS hdd_stop_all_adapters( hdd_context_t *pHddCtx ); |
| 1064 | VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx ); |
| 1065 | VOS_STATUS hdd_start_all_adapters( hdd_context_t *pHddCtx ); |
| 1066 | VOS_STATUS hdd_reconnect_all_adapters( hdd_context_t *pHddCtx ); |
Sudhir Sattayappa Kohalli | 90e4c75 | 2013-03-21 14:25:04 -0700 | [diff] [blame] | 1067 | void hdd_dump_concurrency_info(hdd_context_t *pHddCtx); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1068 | hdd_adapter_t * hdd_get_adapter_by_name( hdd_context_t *pHddCtx, tANI_U8 *name ); |
| 1069 | hdd_adapter_t * hdd_get_adapter_by_macaddr( hdd_context_t *pHddCtx, tSirMacAddr macAddr ); |
| 1070 | hdd_adapter_t * hdd_get_mon_adapter( hdd_context_t *pHddCtx ); |
| 1071 | VOS_STATUS hdd_init_station_mode( hdd_adapter_t *pAdapter ); |
| 1072 | hdd_adapter_t * hdd_get_adapter( hdd_context_t *pHddCtx, device_mode_t mode ); |
| 1073 | void hdd_deinit_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
| 1074 | VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
| 1075 | void hdd_set_station_ops( struct net_device *pWlanDev ); |
| 1076 | tANI_U8* wlan_hdd_get_intf_addr(hdd_context_t* pHddCtx); |
| 1077 | void wlan_hdd_release_intf_addr(hdd_context_t* pHddCtx, tANI_U8* releaseAddr); |
| 1078 | v_U8_t hdd_get_operating_channel( hdd_context_t *pHddCtx, device_mode_t mode ); |
| 1079 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1080 | void hdd_set_conparam ( v_UINT_t newParam ); |
| 1081 | tVOS_CON_MODE hdd_get_conparam( void ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1082 | |
| 1083 | void wlan_hdd_enable_deepsleep(v_VOID_t * pVosContext); |
| 1084 | 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] | 1085 | v_BOOL_t hdd_is_suspend_notify_allowed(hdd_context_t* pHddCtx); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1086 | void hdd_abort_mac_scan(hdd_context_t *pHddCtx); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1087 | void wlan_hdd_set_monitor_tx_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
| 1088 | void hdd_cleanup_actionframe( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter ); |
Madan Mohan Koyyalamudi | c3a240c | 2012-09-28 15:34:08 -0700 | [diff] [blame] | 1089 | v_BOOL_t is_crda_regulatory_entry_valid(void); |
Yunsen Wang | e3ba1fb | 2013-04-05 15:04:43 -0700 | [diff] [blame] | 1090 | void crda_regulatory_entry_default(v_U8_t *countryCode, int domain_id); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1091 | void wlan_hdd_set_concurrency_mode(hdd_context_t *pHddCtx, tVOS_CON_MODE mode); |
| 1092 | void wlan_hdd_clear_concurrency_mode(hdd_context_t *pHddCtx, tVOS_CON_MODE mode); |
| 1093 | void wlan_hdd_reset_prob_rspies(hdd_adapter_t* pHostapdAdapter); |
| 1094 | void hdd_prevent_suspend(void); |
| 1095 | void hdd_allow_suspend(void); |
Madan Mohan Koyyalamudi | 10d83a9 | 2012-09-28 15:47:05 -0700 | [diff] [blame] | 1096 | void hdd_allow_suspend_timeout(v_U32_t timeout); |
Madan Mohan Koyyalamudi | b5da533 | 2012-10-15 17:23:21 -0700 | [diff] [blame] | 1097 | bool hdd_is_ssr_required(void); |
| 1098 | void hdd_set_ssr_required(e_hdd_ssr_required value); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1099 | |
| 1100 | VOS_STATUS hdd_enable_bmps_imps(hdd_context_t *pHddCtx); |
| 1101 | VOS_STATUS hdd_disable_bmps_imps(hdd_context_t *pHddCtx, tANI_U8 session_type); |
| 1102 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1103 | VOS_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx); |
Madan Mohan Koyyalamudi | 8612ec9 | 2012-09-28 15:53:07 -0700 | [diff] [blame] | 1104 | void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx); |
Tushnim Bhattacharyya | 3a37def | 2013-02-24 11:11:15 -0800 | [diff] [blame] | 1105 | void hdd_set_pwrparams(hdd_context_t *pHddCtx); |
| 1106 | void hdd_reset_pwrparams(hdd_context_t *pHddCtx); |
Gopichand Nakkala | f502e2b | 2013-05-24 18:34:25 +0530 | [diff] [blame] | 1107 | int wlan_hdd_validate_context(hdd_context_t *pHddCtx); |
Sudhir Sattayappa Kohalli | b1d8c3a | 2013-06-18 14:47:20 -0700 | [diff] [blame] | 1108 | VOS_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx); |
Gopichand Nakkala | 227c7f3 | 2013-06-26 22:44:57 +0530 | [diff] [blame] | 1109 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 1110 | int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType, tANI_U8 sessionId); |
| 1111 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1112 | #endif // end #if !defined( WLAN_HDD_MAIN_H ) |