Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #ifndef _ANIGLOBAL_H |
| 20 | #define _ANIGLOBAL_H |
| 21 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 22 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 23 | #include "sir_common.h" |
| 24 | #include "ani_system_defs.h" |
| 25 | #include "sys_def.h" |
| 26 | #include "dph_global.h" |
| 27 | #include "lim_global.h" |
| 28 | #include "sch_global.h" |
| 29 | #include "sys_global.h" |
| 30 | #include "cfg_global.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 31 | #include "sir_api.h" |
| 32 | |
| 33 | #include "csr_api.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 34 | #include "sme_ft_api.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 35 | #include "csr_support.h" |
| 36 | #include "sme_internal.h" |
| 37 | #include "sap_api.h" |
| 38 | #include "csr_internal.h" |
| 39 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 40 | #include "sme_rrm_internal.h" |
| 41 | #include "rrm_global.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 42 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 43 | #include <lim_ft_defs.h> |
Selvaraj, Sridhar | 0672a12 | 2016-12-29 16:11:48 +0530 | [diff] [blame] | 44 | #include "wlan_objmgr_psoc_obj.h" |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame^] | 45 | #include "wlan_mlme_public_struct.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 46 | |
Jeff Johnson | 21b678d | 2018-06-07 11:14:00 -0700 | [diff] [blame] | 47 | /** |
| 48 | * MAC_CONTEXT() - Convert an opaque mac handle into a mac context |
| 49 | * @handle: MAC handle to be converted |
| 50 | * |
| 51 | * Given an opaque mac handle this function will return the mac |
| 52 | * context that is associated with that handle. |
| 53 | * |
| 54 | * This is the inverse function of MAC_HANDLE() |
| 55 | * |
| 56 | * Return: mac context for @handle |
| 57 | */ |
| 58 | static inline tpAniSirGlobal MAC_CONTEXT(mac_handle_t handle) |
| 59 | { |
| 60 | return (tpAniSirGlobal)handle; |
| 61 | } |
| 62 | |
| 63 | /* legacy definition */ |
| 64 | #define PMAC_STRUCT(handle) MAC_CONTEXT(handle) |
| 65 | |
| 66 | /** |
| 67 | * MAC_HANDLE() - Convert a mac context into an opaque mac handle |
| 68 | * @mac: MAC context to be converted |
| 69 | * |
| 70 | * Given a mac context this function will return the opaque mac handle |
| 71 | * that is associated with that handle. |
| 72 | * |
| 73 | * This is the inverse function of PMAC_STRUCT() |
| 74 | * |
| 75 | * Return: opaque handle for @mac |
| 76 | */ |
| 77 | static inline mac_handle_t MAC_HANDLE(tpAniSirGlobal mac) |
| 78 | { |
| 79 | return (mac_handle_t)mac; |
| 80 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | |
| 82 | #define ANI_DRIVER_TYPE(pMac) (((tpAniSirGlobal)(pMac))->gDriverType) |
| 83 | |
| 84 | #define IS_MIRACAST_SESSION_PRESENT(pMac) (((tpAniSirGlobal)(pMac))->fMiracastSessionPresent ? 1 : 0) |
| 85 | /* ------------------------------------------------------------------- */ |
| 86 | /* Bss Qos Caps bit map definition */ |
| 87 | #define LIM_BSS_CAPS_OFFSET_HCF 0 |
| 88 | #define LIM_BSS_CAPS_OFFSET_WME 1 |
| 89 | #define LIM_BSS_CAPS_OFFSET_WSM 2 |
| 90 | |
| 91 | #define LIM_BSS_CAPS_HCF (1 << LIM_BSS_CAPS_OFFSET_HCF) |
| 92 | #define LIM_BSS_CAPS_WME (1 << LIM_BSS_CAPS_OFFSET_WME) |
| 93 | #define LIM_BSS_CAPS_WSM (1 << LIM_BSS_CAPS_OFFSET_WSM) |
| 94 | |
| 95 | /* cap should be one of HCF/WME/WSM */ |
| 96 | #define LIM_BSS_CAPS_GET(cap, val) (((val) & (LIM_BSS_CAPS_ ## cap)) >> LIM_BSS_CAPS_OFFSET_ ## cap) |
| 97 | #define LIM_BSS_CAPS_SET(cap, val) ((val) |= (LIM_BSS_CAPS_ ## cap)) |
| 98 | #define LIM_BSS_CAPS_CLR(cap, val) ((val) &= (~(LIM_BSS_CAPS_ ## cap))) |
| 99 | |
| 100 | /* 40 beacons per heart beat interval is the default + 1 to count the rest */ |
| 101 | #define MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL 41 |
| 102 | |
| 103 | /* max number of legacy bssid we can store during scan on one channel */ |
| 104 | #define MAX_NUM_LEGACY_BSSID_PER_CHANNEL 10 |
| 105 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 106 | #ifdef WLAN_FEATURE_CONCURRENT_P2P |
| 107 | #define MAX_NO_OF_P2P_SESSIONS 5 |
| 108 | #endif /* WLAN_FEATURE_CONCURRENT_P2P */ |
| 109 | |
| 110 | #define SPACE_ASCII_VALUE 32 |
| 111 | |
| 112 | #define WLAN_HOST_SEQ_NUM_MIN 2048 |
| 113 | #define WLAN_HOST_SEQ_NUM_MAX 4095 |
| 114 | #define LOW_SEQ_NUM_MASK 0x000F |
| 115 | #define HIGH_SEQ_NUM_MASK 0x0FF0 |
| 116 | #define HIGH_SEQ_NUM_OFFSET 4 |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 117 | #define DEF_HE_AUTO_SGI_LTF 0x0F07 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 118 | |
| 119 | /* vendor element ID */ |
| 120 | #define IE_EID_VENDOR (221) /* 0xDD */ |
| 121 | #define IE_LEN_SIZE (1) |
| 122 | #define IE_EID_SIZE (1) |
| 123 | /* Minimum size of vendor IE = 3 bytes of oui_data + 1 byte of data */ |
| 124 | #define IE_VENDOR_OUI_SIZE (4) |
| 125 | |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 126 | /* |
| 127 | * NSS cfg bit definition. |
| 128 | * STA BIT[0:1] |
| 129 | * SAP BIT[2:3] |
| 130 | * P2P_GO BIT[4:5] |
| 131 | * P2P_CLIENT BIT[6:7] |
| 132 | * IBSS BIT[8:9] |
| 133 | * TDLS BIT[10:11] |
| 134 | * P2P_DEVICE BIT[12:13] |
| 135 | * OCB BIT[14:15] |
| 136 | */ |
| 137 | |
| 138 | #define CFG_STA_NSS(_x) ((((_x) >> 0) & 0x3) ? (((_x) >> 0) & 0x3) : 1) |
| 139 | #define CFG_SAP_NSS(_x) ((((_x) >> 2) & 0x3) ? (((_x) >> 2) & 0x3) : 1) |
| 140 | #define CFG_P2P_GO_NSS(_x) ((((_x) >> 4) & 0x3) ? (((_x) >> 4) & 0x3) : 1) |
| 141 | #define CFG_P2P_CLI_NSS(_x) ((((_x) >> 6) & 0x3) ? (((_x) >> 6) & 0x3) : 1) |
| 142 | #define CFG_IBSS_NSS(_x) ((((_x) >> 8) & 0x3) ? (((_x) >> 8) & 0x3) : 1) |
| 143 | #define CFG_TDLS_NSS(_x) ((((_x) >> 10) & 0x3) ? (((_x) >> 10) & 0x3) : 1) |
| 144 | #define CFG_P2P_DEV_NSS(_x) ((((_x) >> 12) & 0x3) ? (((_x) >> 12) & 0x3) : 1) |
| 145 | #define CFG_OCB_NSS(_x) ((((_x) >> 14) & 0x3) ? (((_x) >> 14) & 0x3) : 1) |
| 146 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 147 | /** |
| 148 | * enum log_event_type - Type of event initiating bug report |
| 149 | * @WLAN_LOG_TYPE_NON_FATAL: Non fatal event |
| 150 | * @WLAN_LOG_TYPE_FATAL: Fatal event |
| 151 | * |
| 152 | * Enum indicating the type of event that is initiating the bug report |
| 153 | */ |
| 154 | enum log_event_type { |
| 155 | WLAN_LOG_TYPE_NON_FATAL, |
| 156 | WLAN_LOG_TYPE_FATAL, |
| 157 | }; |
| 158 | |
| 159 | /** |
| 160 | * enum log_event_indicator - Module triggering bug report |
| 161 | * @WLAN_LOG_INDICATOR_UNUSED: Unused |
| 162 | * @WLAN_LOG_INDICATOR_FRAMEWORK: Framework triggers bug report |
| 163 | * @WLAN_LOG_INDICATOR_HOST_DRIVER: Host driver triggers bug report |
| 164 | * @WLAN_LOG_INDICATOR_FIRMWARE: FW initiates bug report |
Abhishek Singh | 5ea8653 | 2016-04-27 14:10:53 +0530 | [diff] [blame] | 165 | * @WLAN_LOG_INDICATOR_HOST_ONLY: Host triggers fatal event bug report |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 166 | * |
| 167 | * Enum indicating the module that triggered the bug report |
| 168 | */ |
| 169 | enum log_event_indicator { |
| 170 | WLAN_LOG_INDICATOR_UNUSED, |
| 171 | WLAN_LOG_INDICATOR_FRAMEWORK, |
| 172 | WLAN_LOG_INDICATOR_HOST_DRIVER, |
| 173 | WLAN_LOG_INDICATOR_FIRMWARE, |
Abhishek Singh | 5ea8653 | 2016-04-27 14:10:53 +0530 | [diff] [blame] | 174 | WLAN_LOG_INDICATOR_HOST_ONLY, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 175 | }; |
| 176 | |
| 177 | /** |
| 178 | * enum log_event_host_reason_code - Reason code for bug report |
| 179 | * @WLAN_LOG_REASON_CODE_UNUSED: Unused |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 180 | * @WLAN_LOG_REASON_ROAM_FAIL: Driver initiated roam has failed |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 181 | * @WLAN_LOG_REASON_DATA_STALL: Unable to send/receive data due to low resource |
| 182 | * scenario for a prolonged period |
| 183 | * @WLAN_LOG_REASON_SME_COMMAND_STUCK: SME command is stuck in SME active queue |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 184 | * @WLAN_LOG_REASON_QUEUE_FULL: Defer queue becomes full for a prolonged period |
| 185 | * @WLAN_LOG_REASON_POWER_COLLAPSE_FAIL: Unable to allow apps power collapse |
| 186 | * for a prolonged period |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 187 | * @WLAN_LOG_REASON_MALLOC_FAIL: Memory allocation Fails |
| 188 | * @WLAN_LOG_REASON_VOS_MSG_UNDER_RUN: VOS Core runs out of message wrapper |
Abhishek Singh | 5ea8653 | 2016-04-27 14:10:53 +0530 | [diff] [blame] | 189 | * @WLAN_LOG_REASON_HDD_TIME_OUT: Wait for event Timeout in HDD layer |
| 190 | @WLAN_LOG_REASON_SME_OUT_OF_CMD_BUFL sme out of cmd buffer |
Kapil Gupta | 0ed58dc | 2016-04-22 15:35:26 +0530 | [diff] [blame] | 191 | * @WLAN_LOG_REASON_NO_SCAN_RESULTS: no scan results to report from HDD |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 192 | * This enum contains the different reason codes for bug report |
Sreelakshmi Konamki | b53c629 | 2017-03-01 13:13:23 +0530 | [diff] [blame] | 193 | * @WLAN_LOG_REASON_SCAN_NOT_ALLOWED: scan not allowed due to connection states |
Agrawal Ashish | c416da6 | 2017-04-10 15:12:46 +0530 | [diff] [blame] | 194 | * @WLAN_LOG_REASON_HB_FAILURE: station triggered heart beat failure with AP |
| 195 | * @WLAN_LOG_REASON_ROAM_HO_FAILURE: Handover failed during LFR3 roaming |
Agrawal Ashish | b08e721 | 2017-07-04 18:47:02 +0530 | [diff] [blame] | 196 | * @WLAN_LOG_REASON_DISCONNECT: Disconnect because of some failure |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 197 | */ |
| 198 | enum log_event_host_reason_code { |
| 199 | WLAN_LOG_REASON_CODE_UNUSED, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 200 | WLAN_LOG_REASON_ROAM_FAIL, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 201 | WLAN_LOG_REASON_DATA_STALL, |
| 202 | WLAN_LOG_REASON_SME_COMMAND_STUCK, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 203 | WLAN_LOG_REASON_QUEUE_FULL, |
| 204 | WLAN_LOG_REASON_POWER_COLLAPSE_FAIL, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 205 | WLAN_LOG_REASON_MALLOC_FAIL, |
| 206 | WLAN_LOG_REASON_VOS_MSG_UNDER_RUN, |
Abhishek Singh | 5ea8653 | 2016-04-27 14:10:53 +0530 | [diff] [blame] | 207 | WLAN_LOG_REASON_HDD_TIME_OUT, |
| 208 | WLAN_LOG_REASON_SME_OUT_OF_CMD_BUF, |
Kapil Gupta | 0ed58dc | 2016-04-22 15:35:26 +0530 | [diff] [blame] | 209 | WLAN_LOG_REASON_NO_SCAN_RESULTS, |
Sreelakshmi Konamki | b53c629 | 2017-03-01 13:13:23 +0530 | [diff] [blame] | 210 | WLAN_LOG_REASON_SCAN_NOT_ALLOWED, |
Agrawal Ashish | c416da6 | 2017-04-10 15:12:46 +0530 | [diff] [blame] | 211 | WLAN_LOG_REASON_HB_FAILURE, |
Agrawal Ashish | b08e721 | 2017-07-04 18:47:02 +0530 | [diff] [blame] | 212 | WLAN_LOG_REASON_ROAM_HO_FAILURE, |
| 213 | WLAN_LOG_REASON_DISCONNECT |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 214 | }; |
| 215 | |
Abhishek Singh | 5ea8653 | 2016-04-27 14:10:53 +0530 | [diff] [blame] | 216 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 217 | /** |
| 218 | * enum userspace_log_level - Log level at userspace |
| 219 | * @LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection |
| 220 | * @LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log level, |
| 221 | * with minimal user impact. this is the default value |
| 222 | * @LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily |
| 223 | * trying to reproduce a problem, wifi performances and power can be impacted |
| 224 | * but device should not otherwise be significantly impacted |
| 225 | * @LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to |
| 226 | * actively debug a problem |
| 227 | * |
| 228 | * Various log levels defined in the userspace for logging applications |
| 229 | */ |
| 230 | enum userspace_log_level { |
| 231 | LOG_LEVEL_NO_COLLECTION, |
| 232 | LOG_LEVEL_NORMAL_COLLECT, |
| 233 | LOG_LEVEL_ISSUE_REPRO, |
| 234 | LOG_LEVEL_ACTIVE, |
| 235 | }; |
| 236 | |
| 237 | /** |
| 238 | * enum wifi_driver_log_level - Log level defined in the driver for logging |
| 239 | * @WLAN_LOG_LEVEL_OFF: No logging |
| 240 | * @WLAN_LOG_LEVEL_NORMAL: Default logging |
| 241 | * @WLAN_LOG_LEVEL_REPRO: Normal debug level |
| 242 | * @WLAN_LOG_LEVEL_ACTIVE: Active debug level |
| 243 | * |
| 244 | * Log levels defined for logging by the wifi driver |
| 245 | */ |
| 246 | enum wifi_driver_log_level { |
| 247 | WLAN_LOG_LEVEL_OFF, |
| 248 | WLAN_LOG_LEVEL_NORMAL, |
| 249 | WLAN_LOG_LEVEL_REPRO, |
| 250 | WLAN_LOG_LEVEL_ACTIVE, |
| 251 | }; |
| 252 | |
| 253 | /** |
| 254 | * enum wifi_logging_ring_id - Ring id of logging entities |
| 255 | * @RING_ID_WAKELOCK: Power events ring id |
| 256 | * @RING_ID_CONNECTIVITY: Connectivity event ring id |
| 257 | * @RING_ID_PER_PACKET_STATS: Per packet statistic ring id |
Chandrasekaran, Manishekar | 907c2af | 2015-11-13 12:50:04 +0530 | [diff] [blame] | 258 | * @RING_ID_DRIVER_DEBUG: Driver debug messages ring id |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 259 | * @RING_ID_FIRMWARE_DEBUG: Firmware debug messages ring id |
| 260 | * |
| 261 | * This enum has the ring id values of logging rings |
| 262 | */ |
| 263 | enum wifi_logging_ring_id { |
| 264 | RING_ID_WAKELOCK, |
| 265 | RING_ID_CONNECTIVITY, |
| 266 | RING_ID_PER_PACKET_STATS, |
Chandrasekaran, Manishekar | 907c2af | 2015-11-13 12:50:04 +0530 | [diff] [blame] | 267 | RING_ID_DRIVER_DEBUG, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 268 | RING_ID_FIRMWARE_DEBUG, |
| 269 | }; |
| 270 | |
| 271 | /* ------------------------------------------------------------------- */ |
| 272 | /* Change channel generic scheme */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 273 | typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal pMac, QDF_STATUS status, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 274 | uint32_t *data, |
| 275 | tpPESession psessionEntry); |
| 276 | |
| 277 | /* / LIM global definitions */ |
| 278 | typedef struct sAniSirLimIbss { |
| 279 | void *pHdr; |
| 280 | void *pBeacon; |
| 281 | } tAniSirLimIbss; |
| 282 | |
| 283 | typedef struct sDialogueToken { |
| 284 | /* bytes 0-3 */ |
| 285 | uint16_t assocId; |
| 286 | uint8_t token; |
| 287 | uint8_t rsvd1; |
| 288 | /* Bytes 4-7 */ |
| 289 | uint16_t tid; |
| 290 | uint8_t rsvd2[2]; |
| 291 | |
| 292 | struct sDialogueToken *next; |
| 293 | } tDialogueToken, *tpDialogueToken; |
| 294 | |
| 295 | typedef struct sLimTimers { |
| 296 | /* TIMERS IN LIM ARE NOT SUPPOSED TO BE ZEROED OUT DURING RESET. */ |
| 297 | /* DURING lim_initialize DONOT ZERO THEM OUT. */ |
| 298 | |
| 299 | /* STA SPECIFIC TIMERS */ |
| 300 | |
| 301 | TX_TIMER gLimPreAuthClnupTimer; |
| 302 | |
| 303 | /* Association related timers */ |
| 304 | TX_TIMER gLimAssocFailureTimer; |
| 305 | TX_TIMER gLimReassocFailureTimer; |
| 306 | |
| 307 | /* / Wait for Probe after Heartbeat failure timer on STA */ |
| 308 | TX_TIMER gLimProbeAfterHBTimer; |
| 309 | |
| 310 | /* Authentication related timers */ |
| 311 | TX_TIMER gLimAuthFailureTimer; |
| 312 | |
| 313 | /* Join Failure timeout on STA */ |
| 314 | TX_TIMER gLimJoinFailureTimer; |
| 315 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | /* CNF_WAIT timer */ |
| 317 | TX_TIMER *gpLimCnfWaitTimer; |
| 318 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 319 | TX_TIMER gLimAddtsRspTimer; /* max wait for a response */ |
| 320 | |
| 321 | /* Update OLBC Cache Timer */ |
| 322 | TX_TIMER gLimUpdateOlbcCacheTimer; |
| 323 | |
| 324 | TX_TIMER gLimChannelSwitchTimer; |
| 325 | /* This TIMER is started on the STA, as indicated by the */ |
| 326 | /* AP in its Quiet BSS IE, for the specified interval */ |
| 327 | TX_TIMER gLimQuietTimer; |
| 328 | /* This TIMER is started on the AP, prior to the AP going */ |
| 329 | /* into LEARN mode */ |
| 330 | /* This TIMER is started on the STA, for the specified */ |
| 331 | /* quiet duration */ |
| 332 | TX_TIMER gLimQuietBssTimer; |
| 333 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 334 | TX_TIMER gLimFTPreAuthRspTimer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 335 | |
| 336 | #ifdef FEATURE_WLAN_ESE |
| 337 | TX_TIMER gLimEseTsmTimer; |
| 338 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 339 | TX_TIMER gLimPeriodicJoinProbeReqTimer; |
| 340 | TX_TIMER gLimDisassocAckTimer; |
| 341 | TX_TIMER gLimDeauthAckTimer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 342 | /* This timer is used to convert active channel to |
| 343 | * passive channel when there is no beacon |
| 344 | * for a period of time on a particular DFS channel |
| 345 | */ |
| 346 | TX_TIMER gLimActiveToPassiveChannelTimer; |
Abhishek Singh | 7d3bc3e | 2016-02-03 17:45:01 +0530 | [diff] [blame] | 347 | TX_TIMER g_lim_periodic_auth_retry_timer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 348 | |
Padma, Santhosh Kumar | c56735f | 2017-09-13 18:14:26 +0530 | [diff] [blame] | 349 | /* SAE authentication related timer */ |
| 350 | TX_TIMER sae_auth_timer; |
| 351 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 352 | /* ********************TIMER SECTION ENDS************************************************** */ |
| 353 | /* ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in lim_initialize */ |
| 354 | /* **************************************************************************************** */ |
| 355 | |
| 356 | } tLimTimers; |
| 357 | |
| 358 | typedef struct { |
| 359 | void *pMlmDisassocReq; |
| 360 | void *pMlmDeauthReq; |
| 361 | } tLimDisassocDeauthCnfReq; |
| 362 | |
| 363 | typedef struct sAniSirLim { |
| 364 | /* //////////////////////////////////// TIMER RELATED START /////////////////////////////////////////// */ |
| 365 | |
| 366 | tLimTimers limTimers; |
| 367 | /* / Flag to track if LIM timers are created or not */ |
| 368 | uint32_t gLimTimersCreated; |
| 369 | |
| 370 | /* //////////////////////////////////// TIMER RELATED END /////////////////////////////////////////// */ |
| 371 | |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 372 | struct lim_scan_channel_status scan_channel_status; |
| 373 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 374 | uint8_t gLimCurrentBssUapsd; |
| 375 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 376 | /* */ |
| 377 | /* Store the BSS Index returned by HAL during */ |
| 378 | /* WMA_ADD_BSS_RSP here. */ |
| 379 | /* */ |
| 380 | |
| 381 | /* For now: */ |
| 382 | /* This will be used during WMA_SET_BSSKEY_REQ in */ |
| 383 | /* order to set the GTK */ |
| 384 | /* Later: */ |
| 385 | /* There could be other interfaces needing this info */ |
| 386 | /* */ |
| 387 | |
| 388 | /* */ |
| 389 | /* Due to the asynchronous nature of the interface */ |
| 390 | /* between PE <-> HAL, some transient information */ |
| 391 | /* like this needs to be cached. */ |
| 392 | /* This is cached upon receipt of eWNI_SME_SETCONTEXT_REQ. */ |
| 393 | /* This is released while posting LIM_MLM_SETKEYS_CNF */ |
| 394 | /* */ |
| 395 | void *gpLimMlmSetKeysReq; |
| 396 | |
| 397 | /* //////////////////////////////////////// BSS RELATED END /////////////////////////////////////////// */ |
| 398 | |
| 399 | /* //////////////////////////////////////// IBSS RELATED START /////////////////////////////////////////// */ |
| 400 | /* This indicates whether this STA coalesced and adapter to peer's capabilities or not. */ |
| 401 | uint8_t gLimIbssCoalescingHappened; |
| 402 | |
| 403 | /* / Definition for storing IBSS peers BSS description */ |
| 404 | tLimIbssPeerNode *gLimIbssPeerList; |
| 405 | uint32_t gLimNumIbssPeers; |
| 406 | uint32_t ibss_retry_cnt; |
| 407 | |
| 408 | /* ibss info - params for which ibss to join while coalescing */ |
| 409 | tAniSirLimIbss ibssInfo; |
| 410 | |
| 411 | /* //////////////////////////////////////// IBSS RELATED END /////////////////////////////////////////// */ |
| 412 | |
| 413 | /* //////////////////////////////////////// STATS/COUNTER RELATED START /////////////////////////////////////////// */ |
| 414 | |
| 415 | uint16_t maxStation; |
| 416 | uint16_t maxBssId; |
| 417 | |
| 418 | uint32_t gLimNumBeaconsRcvd; |
| 419 | uint32_t gLimNumBeaconsIgnored; |
| 420 | |
| 421 | uint32_t gLimNumDeferredMsgs; |
| 422 | |
| 423 | /* / Variable to keep track of number of currently associated STAs */ |
| 424 | uint16_t gLimNumOfAniSTAs; /* count of ANI peers */ |
| 425 | uint16_t gLimAssocStaLimit; |
| 426 | |
| 427 | /* Heart-Beat interval value */ |
| 428 | uint32_t gLimHeartBeatCount; |
| 429 | tSirMacAddr gLimHeartBeatApMac[2]; |
| 430 | uint8_t gLimHeartBeatApMacIndex; |
| 431 | |
| 432 | /* Statistics to keep track of no. beacons rcvd in heart beat interval */ |
| 433 | uint16_t |
| 434 | gLimHeartBeatBeaconStats[MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL]; |
| 435 | |
| 436 | #ifdef WLAN_DEBUG |
| 437 | /* Debug counters */ |
| 438 | uint32_t numTot, numBbt, numProtErr, numLearn, numLearnIgnore; |
| 439 | uint32_t numSme, numMAC[4][16]; |
| 440 | |
| 441 | /* Debug counter to track number of Assoc Req frame drops */ |
| 442 | /* when received in pStaDs->mlmState other than LINK_ESTABLISED */ |
| 443 | uint32_t gLimNumAssocReqDropInvldState; |
| 444 | /* counters to track rejection of Assoc Req due to Admission Control */ |
| 445 | uint32_t gLimNumAssocReqDropACRejectTS; |
| 446 | uint32_t gLimNumAssocReqDropACRejectSta; |
| 447 | /* Debug counter to track number of Reassoc Req frame drops */ |
| 448 | /* when received in pStaDs->mlmState other than LINK_ESTABLISED */ |
| 449 | uint32_t gLimNumReassocReqDropInvldState; |
| 450 | /* Debug counter to track number of Hash Miss event that */ |
| 451 | /* will not cause a sending of de-auth/de-associate frame */ |
| 452 | uint32_t gLimNumHashMissIgnored; |
| 453 | |
| 454 | /* Debug counter to track number of Beacon frames */ |
| 455 | /* received in unexpected state */ |
| 456 | uint32_t gLimUnexpBcnCnt; |
| 457 | |
| 458 | /* Debug counter to track number of Beacon frames */ |
| 459 | /* received in wt-join-state that do have SSID mismatch */ |
| 460 | uint32_t gLimBcnSSIDMismatchCnt; |
| 461 | |
| 462 | /* Debug counter to track number of Link establishments on STA/BP */ |
| 463 | uint32_t gLimNumLinkEsts; |
| 464 | |
| 465 | /* Debug counter to track number of Rx cleanup */ |
| 466 | uint32_t gLimNumRxCleanup; |
| 467 | |
| 468 | /* Debug counter to track different parse problem */ |
| 469 | uint32_t gLim11bStaAssocRejectCount; |
| 470 | |
| 471 | #endif |
| 472 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 473 | /* //////////////////////////////////////// STATS/COUNTER RELATED END /////////////////////////////////////////// */ |
| 474 | |
| 475 | /* //////////////////////////////////////// STATES RELATED START /////////////////////////////////////////// */ |
| 476 | /* Counts Heartbeat failures */ |
| 477 | uint8_t gLimHBfailureCntInLinkEstState; |
| 478 | uint8_t gLimProbeFailureAfterHBfailedCnt; |
| 479 | uint8_t gLimHBfailureCntInOtherStates; |
| 480 | |
| 481 | /** |
| 482 | * This variable indicates whether LIM module need to |
| 483 | * send response to host. Used to identify whether a request |
| 484 | * is generated internally within LIM module or by host |
| 485 | */ |
| 486 | uint8_t gLimRspReqd; |
| 487 | |
| 488 | /* / Previous SME State */ |
| 489 | tLimSmeStates gLimPrevSmeState; |
| 490 | |
| 491 | /* / MLM State visible across all Sirius modules */ |
| 492 | tLimMlmStates gLimMlmState; |
| 493 | |
| 494 | /* / Previous MLM State */ |
| 495 | tLimMlmStates gLimPrevMlmState; |
| 496 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 497 | /* Can be set to invalid channel. If it is invalid, HAL */ |
| 498 | /* should move to previous valid channel or stay in the */ |
| 499 | /* current channel. CB state goes along with channel to resume to */ |
| 500 | uint16_t gResumeChannel; |
| 501 | ePhyChanBondState gResumePhyCbState; |
| 502 | |
| 503 | /* Change channel generic scheme */ |
| 504 | CHANGE_CHANNEL_CALLBACK gpchangeChannelCallback; |
| 505 | uint32_t *gpchangeChannelData; |
| 506 | |
| 507 | /* / SME State visible across all Sirius modules */ |
| 508 | tLimSmeStates gLimSmeState; |
| 509 | /* / This indicates whether we're an AP, STA in BSS/IBSS */ |
| 510 | tLimSystemRole gLimSystemRole; |
| 511 | |
| 512 | /* Number of STAs that do not support short preamble */ |
| 513 | tLimNoShortParams gLimNoShortParams; |
| 514 | |
| 515 | /* Number of STAs that do not support short slot time */ |
| 516 | tLimNoShortSlotParams gLimNoShortSlotParams; |
| 517 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 518 | /* */ |
| 519 | /* ---------------- DPH ----------------------- */ |
| 520 | /* these used to live in DPH but are now moved here (where they belong) */ |
| 521 | uint32_t gLimPhyMode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 522 | |
| 523 | uint8_t gLimQosEnabled:1; /* 11E */ |
| 524 | uint8_t gLimWmeEnabled:1; /* WME */ |
| 525 | uint8_t gLimWsmEnabled:1; /* WSM */ |
| 526 | uint8_t gLimHcfEnabled:1; |
| 527 | uint8_t gLim11dEnabled:1; |
| 528 | uint8_t gLimProbeRespDisableFlag:1; /* control over probe response */ |
| 529 | /* ---------------- DPH ----------------------- */ |
| 530 | |
| 531 | /* //////////////////////////////////////// STATES RELATED END /////////////////////////////////////////// */ |
| 532 | |
| 533 | /* //////////////////////////////////////// MISC RELATED START /////////////////////////////////////////// */ |
| 534 | |
| 535 | /* Deferred Queue Parameters */ |
| 536 | tLimDeferredMsgQParams gLimDeferredMsgQ; |
| 537 | |
| 538 | /* addts request if any - only one can be outstanding at any time */ |
| 539 | tSirAddtsReq gLimAddtsReq; |
| 540 | uint8_t gLimAddtsSent; |
| 541 | uint8_t gLimAddtsRspTimerCount; |
| 542 | |
| 543 | /* protection related config cache */ |
| 544 | tCfgProtection cfgProtection; |
| 545 | |
| 546 | uint8_t gLimProtectionControl; |
| 547 | /* This flag will remain to be set except while LIM is waiting for specific response messages */ |
| 548 | /* from HAL. e.g when LIM issues ADD_STA req it will clear this flag and when it will receive */ |
| 549 | /* the response the flag will be set. */ |
| 550 | uint8_t gLimProcessDefdMsgs; |
| 551 | |
| 552 | /* UAPSD flag used on AP */ |
| 553 | uint8_t gUapsdEnable; |
| 554 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 555 | /* Used on STA for AC downgrade. This is a dynamic mask |
| 556 | * setting which keep tracks of ACs being admitted. |
| 557 | * If bit is set to 0: That partiular AC is not admitted |
| 558 | * If bit is set to 1: That particular AC is admitted |
| 559 | */ |
| 560 | uint8_t gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT]; |
| 561 | |
| 562 | /* dialogue token List head/tail for Action frames request sent. */ |
| 563 | tpDialogueToken pDialogueTokenHead; |
| 564 | tpDialogueToken pDialogueTokenTail; |
| 565 | |
| 566 | tLimTspecInfo tspecInfo[LIM_NUM_TSPEC_MAX]; |
| 567 | |
| 568 | /* admission control policy information */ |
| 569 | tLimAdmitPolicyInfo admitPolicyInfo; |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 570 | qdf_mutex_t lkPeGlobalLock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 571 | uint8_t disableLDPCWithTxbfAP; |
| 572 | #ifdef FEATURE_WLAN_TDLS |
| 573 | uint8_t gLimTDLSBufStaEnabled; |
| 574 | uint8_t gLimTDLSUapsdMask; |
| 575 | uint8_t gLimTDLSOffChannelEnabled; |
| 576 | uint8_t gLimTDLSWmmMode; |
| 577 | #endif |
| 578 | /* //////////////////////////////////////// MISC RELATED END /////////////////////////////////////////// */ |
| 579 | |
| 580 | /* //////////////////////////////////////// ASSOC RELATED START /////////////////////////////////////////// */ |
| 581 | /* Place holder for JoinReq message */ |
| 582 | /* received by SME state machine */ |
| 583 | /* tpSirSmeJoinReq gpLimJoinReq; */ |
| 584 | |
| 585 | /* Place holder for ReassocReq message */ |
| 586 | /* received by SME state machine */ |
| 587 | /* tpSirSmeReassocReq gpLimReassocReq; sep23 review */ |
| 588 | |
| 589 | /* Current Authentication type used at STA */ |
| 590 | /* tAniAuthType gLimCurrentAuthType; */ |
| 591 | |
| 592 | /* Place holder for current authentication request */ |
| 593 | /* being handled */ |
| 594 | tLimMlmAuthReq *gpLimMlmAuthReq; |
| 595 | |
| 596 | /* Reason code to determine the channel change context while sending */ |
| 597 | /* WMA_CHNL_SWITCH_REQ message to HAL */ |
| 598 | uint32_t channelChangeReasonCode; |
| 599 | |
| 600 | /* / MAC level Pre-authentication related globals */ |
| 601 | tSirMacChanNum gLimPreAuthChannelNumber; |
| 602 | tAniAuthType gLimPreAuthType; |
| 603 | tSirMacAddr gLimPreAuthPeerAddr; |
| 604 | uint32_t gLimNumPreAuthContexts; |
| 605 | tLimPreAuthTable gLimPreAuthTimerTable; |
| 606 | |
| 607 | /* Placed holder to deauth reason */ |
| 608 | uint16_t gLimDeauthReasonCode; |
| 609 | |
| 610 | /* Place holder for Pre-authentication node list */ |
| 611 | struct tLimPreAuthNode *pLimPreAuthList; |
| 612 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 613 | /* Assoc or ReAssoc Response Data/Frame */ |
| 614 | void *gLimAssocResponseData; |
| 615 | |
| 616 | /* One cache for each overlap and associated case. */ |
| 617 | tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE]; |
| 618 | tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE]; |
| 619 | |
| 620 | /* //////////////////////////////////////// ASSOC RELATED END /////////////////////////////////////////// */ |
| 621 | |
| 622 | /* ////////////////////////////// HT RELATED ////////////////////////////////////////// */ |
| 623 | /* */ |
| 624 | /* The following global LIM variables maintain/manage */ |
| 625 | /* the runtime configurations related to 802.11n */ |
| 626 | |
| 627 | /* 802.11n Station detected HT capability in Beacon Frame */ |
| 628 | uint8_t htCapabilityPresentInBeacon; |
| 629 | |
| 630 | /* 802.11 HT capability: Enabled or Disabled */ |
| 631 | uint8_t htCapability; |
| 632 | |
| 633 | uint8_t gHTGreenfield; |
| 634 | |
| 635 | uint8_t gHTShortGI40Mhz; |
| 636 | uint8_t gHTShortGI20Mhz; |
| 637 | |
| 638 | /* Set to 0 for 3839 octets */ |
| 639 | /* Set to 1 for 7935 octets */ |
| 640 | uint8_t gHTMaxAmsduLength; |
| 641 | |
| 642 | /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */ |
| 643 | uint8_t gHTDsssCckRate40MHzSupport; |
| 644 | |
| 645 | /* PSMP Support: Enabled 1 or Disabled 0 */ |
| 646 | uint8_t gHTPSMPSupport; |
| 647 | |
| 648 | /* L-SIG TXOP Protection used only if peer support available */ |
| 649 | uint8_t gHTLsigTXOPProtection; |
| 650 | |
| 651 | /* MIMO Power Save */ |
| 652 | tSirMacHTMIMOPowerSaveState gHTMIMOPSState; |
| 653 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 654 | /* */ |
| 655 | /* A-MPDU Density */ |
| 656 | /* 000 - No restriction */ |
| 657 | /* 001 - 1/8 usec */ |
| 658 | /* 010 - 1/4 usec */ |
| 659 | /* 011 - 1/2 usec */ |
| 660 | /* 100 - 1 usec */ |
| 661 | /* 101 - 2 usec */ |
| 662 | /* 110 - 4 usec */ |
| 663 | /* 111 - 8 usec */ |
| 664 | /* */ |
| 665 | uint8_t gHTAMpduDensity; |
| 666 | |
| 667 | bool gMaxAmsduSizeEnabled; |
| 668 | /* Maximum Tx/Rx A-MPDU factor */ |
| 669 | uint8_t gHTMaxRxAMpduFactor; |
| 670 | |
| 671 | /* */ |
| 672 | /* Scheduled PSMP related - Service Interval Granularity */ |
| 673 | /* 000 - 5 ms */ |
| 674 | /* 001 - 10 ms */ |
| 675 | /* 010 - 15 ms */ |
| 676 | /* 011 - 20 ms */ |
| 677 | /* 100 - 25 ms */ |
| 678 | /* 101 - 30 ms */ |
| 679 | /* 110 - 35 ms */ |
| 680 | /* 111 - 40 ms */ |
| 681 | /* */ |
| 682 | uint8_t gHTServiceIntervalGranularity; |
| 683 | |
| 684 | /* Indicates whether an AP wants to associate PSMP enabled Stations */ |
| 685 | uint8_t gHTControlledAccessOnly; |
| 686 | |
| 687 | /* RIFS Mode. Set if no APSD legacy devices associated */ |
| 688 | uint8_t gHTRifsMode; |
| 689 | /* OBss Mode . set when we have Non HT STA is associated or with in overlap bss */ |
| 690 | uint8_t gHTObssMode; |
| 691 | |
| 692 | /* Identifies the current Operating Mode */ |
| 693 | tSirMacHTOperatingMode gHTOperMode; |
| 694 | |
| 695 | /* Indicates if PCO is activated in the BSS */ |
| 696 | uint8_t gHTPCOActive; |
| 697 | |
| 698 | /* */ |
| 699 | /* If PCO is active, indicates which PCO phase to use */ |
| 700 | /* 0 - switch to 20 MHz phase */ |
| 701 | /* 1 - switch to 40 MHz phase */ |
| 702 | /* */ |
| 703 | uint8_t gHTPCOPhase; |
| 704 | |
| 705 | /* */ |
| 706 | /* Used only in beacons. For PR, this is set to 0 */ |
| 707 | /* 0 - Primary beacon */ |
| 708 | /* 1 - Secondary beacon */ |
| 709 | /* */ |
| 710 | uint8_t gHTSecondaryBeacon; |
| 711 | |
| 712 | /* */ |
| 713 | /* Dual CTS Protection */ |
| 714 | /* 0 - Use RTS/CTS */ |
| 715 | /* 1 - Dual CTS Protection is used */ |
| 716 | /* */ |
| 717 | uint8_t gHTDualCTSProtection; |
| 718 | |
| 719 | /* */ |
| 720 | /* Identifies a single STBC MCS that shall ne used for */ |
| 721 | /* STBC control frames and STBC beacons */ |
| 722 | /* */ |
| 723 | uint8_t gHTSTBCBasicMCS; |
| 724 | |
| 725 | uint8_t gHTNonGFDevicesPresent; |
| 726 | |
| 727 | /* ////////////////////////////// HT RELATED ////////////////////////////////////////// */ |
| 728 | |
| 729 | #ifdef FEATURE_WLAN_TDLS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 730 | uint8_t gLimTdlsLinkMode; |
| 731 | /* ////////////////////////////// TDLS RELATED ////////////////////////////////////////// */ |
| 732 | #endif |
| 733 | |
| 734 | /* wsc info required to form the wsc IE */ |
| 735 | tLimWscIeInfo wscIeInfo; |
| 736 | tpPESession gpSession; /* Pointer to session table */ |
| 737 | /* |
| 738 | * sessionID and transactionID from SME is stored here for those messages, for which |
| 739 | * there is no session context in PE, e.g. Scan related messages. |
| 740 | **/ |
| 741 | uint8_t gSmeSessionId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 742 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 743 | tSirRemainOnChnReq *gpLimRemainOnChanReq; /* hold remain on chan request in this buf */ |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 744 | qdf_mutex_t lim_frame_register_lock; |
Anurag Chouhan | ffb2154 | 2016-02-17 14:33:03 +0530 | [diff] [blame] | 745 | qdf_list_t gLimMgmtFrameRegistratinQueue; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 746 | uint32_t mgmtFrameSessionId; |
Masti, Narayanraddi | 6319f06 | 2016-09-03 18:49:22 +0530 | [diff] [blame] | 747 | uint32_t tdls_frm_session_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 748 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 749 | tpPESession pSessionEntry; |
| 750 | uint8_t reAssocRetryAttempt; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 751 | tLimDisassocDeauthCnfReq limDisassocDeauthCnfReq; |
| 752 | uint8_t deferredMsgCnt; |
| 753 | tSirDFSChannelList dfschannelList; |
| 754 | uint8_t deauthMsgCnt; |
Sandeep Puligilla | f481070 | 2017-04-19 17:07:03 -0700 | [diff] [blame] | 755 | uint8_t disassocMsgCnt; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 756 | uint8_t gLimIbssStaLimit; |
| 757 | |
| 758 | /* Number of channel switch IEs sent so far */ |
| 759 | uint8_t gLimDfsChanSwTxCount; |
| 760 | uint8_t gLimDfsTargetChanNum; |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 761 | QDF_STATUS(*sme_msg_callback) |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 762 | (tpAniSirGlobal mac, struct scheduler_msg *msg); |
Vignesh Viswanathan | 3d47803 | 2018-08-02 20:18:53 +0530 | [diff] [blame] | 763 | QDF_STATUS(*stop_roaming_callback) |
| 764 | (tpAniSirGlobal mac, uint8_t session_id, uint8_t reason); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 765 | uint8_t retry_packet_cnt; |
Sreelakshmi Konamki | 1bb6f31 | 2016-12-08 12:32:01 +0530 | [diff] [blame] | 766 | uint8_t beacon_probe_rsp_cnt_per_scan; |
Paul Zhang | 2f1077c | 2017-11-30 12:06:09 +0800 | [diff] [blame] | 767 | wlan_scan_requester req_id; |
Arif Hussain | 1513cb2 | 2018-01-05 19:56:31 -0800 | [diff] [blame] | 768 | bool global_obss_offload_enabled; |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 769 | bool global_obss_color_collision_det_offload; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 770 | } tAniSirLim, *tpAniSirLim; |
| 771 | |
| 772 | struct mgmt_frm_reg_info { |
Anurag Chouhan | ffb2154 | 2016-02-17 14:33:03 +0530 | [diff] [blame] | 773 | qdf_list_node_t node; /* MUST be first element */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 774 | uint16_t frameType; |
| 775 | uint16_t matchLen; |
| 776 | uint16_t sessionId; |
| 777 | uint8_t matchData[1]; |
| 778 | }; |
| 779 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 780 | typedef struct sRrmContext { |
| 781 | tRrmSMEContext rrmSmeContext; |
| 782 | tRrmPEContext rrmPEContext; |
| 783 | } tRrmContext, *tpRrmContext; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 784 | |
Abhishek Singh | 7d3bc3e | 2016-02-03 17:45:01 +0530 | [diff] [blame] | 785 | /** |
| 786 | * enum auth_tx_ack_status - Indicate TX status of AUTH |
| 787 | * @LIM_AUTH_ACK_NOT_RCD : Default status while waiting for ack status. |
| 788 | * @LIM_AUTH_ACK_RCD_SUCCESS : Ack is received. |
| 789 | * @LIM_AUTH_ACK_RCD_FAILURE : No Ack received. |
| 790 | * |
| 791 | * Indicate if driver is waiting for ACK status of auth or ACK received for AUTH |
| 792 | * OR NO ACK is received for the auth sent. |
| 793 | */ |
| 794 | enum auth_tx_ack_status { |
| 795 | LIM_AUTH_ACK_NOT_RCD, |
| 796 | LIM_AUTH_ACK_RCD_SUCCESS, |
| 797 | LIM_AUTH_ACK_RCD_FAILURE, |
| 798 | }; |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 799 | /** |
| 800 | * struct vdev_type_nss - vdev type nss structure |
| 801 | * @sta: STA Nss value. |
| 802 | * @sap: SAP Nss value. |
| 803 | * @p2p_go: P2P GO Nss value. |
| 804 | * @p2p_cli: P2P CLI Nss value. |
| 805 | * @p2p_dev: P2P device Nss value. |
| 806 | * @ibss: IBSS Nss value. |
| 807 | * @tdls: TDLS Nss value. |
| 808 | * @ocb: OCB Nss value. |
| 809 | * |
| 810 | * Holds the Nss values of different vdev types. |
| 811 | */ |
| 812 | struct vdev_type_nss { |
| 813 | uint8_t sta; |
| 814 | uint8_t sap; |
| 815 | uint8_t p2p_go; |
| 816 | uint8_t p2p_cli; |
| 817 | uint8_t p2p_dev; |
| 818 | uint8_t ibss; |
| 819 | uint8_t tdls; |
| 820 | uint8_t ocb; |
| 821 | }; |
Abhishek Singh | 7d3bc3e | 2016-02-03 17:45:01 +0530 | [diff] [blame] | 822 | |
Vignesh Viswanathan | b3dbbc8 | 2018-04-06 00:06:27 +0530 | [diff] [blame] | 823 | /** |
| 824 | * struct mgmt_beacon_probe_filter |
| 825 | * @bcn_filter_lock: Spinlock for the filter structure |
| 826 | * @num_sta_sessions: Number of active PE STA sessions |
| 827 | * @sta_bssid: Array of PE STA session's peer BSSIDs |
| 828 | * @num_ibss_sessions: Number of active PE IBSS sessions |
| 829 | * @ibss_ssid: Array of PE IBSS session's SSID |
| 830 | * @num_sap_session: Number of active PE SAP sessions |
| 831 | * @sap_channel: Array of PE SAP session's channels |
| 832 | * |
| 833 | * Used to filter the STA/IBSS/SAP beacons/probes required in PE and |
| 834 | * drop other unwanted beacon/probe response frames |
| 835 | */ |
| 836 | struct mgmt_beacon_probe_filter { |
| 837 | uint8_t num_sta_sessions; |
| 838 | tSirMacAddr sta_bssid[SIR_MAX_SUPPORTED_BSS]; |
| 839 | uint8_t num_ibss_sessions; |
| 840 | tSirMacSSid ibss_ssid[SIR_MAX_SUPPORTED_BSS]; |
| 841 | uint8_t num_sap_sessions; |
| 842 | uint8_t sap_channel[SIR_MAX_SUPPORTED_BSS]; |
| 843 | }; |
| 844 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 845 | /* ------------------------------------------------------------------- */ |
| 846 | /* / MAC Sirius parameter structure */ |
| 847 | typedef struct sAniSirGlobal { |
Srinivas Girigowda | 35b0031 | 2017-06-27 21:52:03 -0700 | [diff] [blame] | 848 | enum qdf_driver_type gDriverType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 849 | |
| 850 | tAniSirCfg cfg; |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame^] | 851 | struct wlan_mlme_cfg *mlme_cfg; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 852 | tAniSirLim lim; |
| 853 | tAniSirSch sch; |
| 854 | tAniSirSys sys; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 855 | |
| 856 | /* PAL/HDD handle */ |
Jeff Johnson | 6aaaa99 | 2018-06-30 10:43:04 -0700 | [diff] [blame] | 857 | hdd_handle_t hdd_handle; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 858 | |
| 859 | |
| 860 | tSmeStruct sme; |
| 861 | tSapStruct sap; |
gaurank kathpalia | 14e2f91 | 2017-08-31 14:51:45 +0530 | [diff] [blame] | 862 | struct csr_scanstruct scan; |
| 863 | struct csr_roamstruct roam; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 864 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 865 | tRrmContext rrm; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 866 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 867 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 868 | csr_readyToSuspendCallback readyToSuspendCallback; |
| 869 | void *readyToSuspendContext; |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 870 | uint8_t isCoalesingInIBSSAllowed; |
Krunal Soni | e6a1cda | 2017-09-27 15:23:02 -0700 | [diff] [blame] | 871 | uint8_t lteCoexAntShare; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 872 | uint8_t beacon_offload; |
mukul sharma | 72c8b22 | 2015-09-04 17:02:01 +0530 | [diff] [blame] | 873 | bool pmf_offload; |
Vignesh Viswanathan | 731186f | 2017-09-18 13:47:37 +0530 | [diff] [blame] | 874 | bool is_fils_roaming_supported; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 875 | bool enable5gEBT; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 876 | uint8_t fMiracastSessionPresent; |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 877 | uint8_t f_prefer_non_dfs_on_radar; |
| 878 | uint32_t fEnableDebugLog; |
| 879 | uint32_t f_sta_miracast_mcc_rest_time_val; |
| 880 | /* Miracast session 0-Disabled, 1-Source, 2-sink */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 881 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
| 882 | csr_readyToExtWoWCallback readyToExtWoWCallback; |
| 883 | void *readyToExtWoWContext; |
| 884 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 885 | hdd_ftm_msg_processor ftm_msg_processor_callback; |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 886 | struct vdev_type_nss vdev_type_nss_2g; |
| 887 | struct vdev_type_nss vdev_type_nss_5g; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 888 | |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 889 | uint16_t mgmtSeqNum; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 890 | /* 802.11p enable */ |
| 891 | bool enable_dot11p; |
Nitesh Shah | db5ea0d | 2017-03-22 15:17:47 +0530 | [diff] [blame] | 892 | /* DBS capability based on INI and FW capability */ |
| 893 | uint8_t hw_dbs_capable; |
Ganesh Kondabattini | 930304c | 2017-10-10 15:25:36 +0530 | [diff] [blame] | 894 | uint32_t sta_sap_scc_on_dfs_chan; |
Abhishek Singh | 7996eb7 | 2015-12-30 17:24:02 +0530 | [diff] [blame] | 895 | sir_mgmt_frame_ind_callback mgmt_frame_ind_cb; |
Krunal Soni | da0e1e7 | 2018-06-01 10:50:38 -0700 | [diff] [blame] | 896 | qdf_atomic_t global_cmd_id; |
Selvaraj, Sridhar | 0672a12 | 2016-12-29 16:11:48 +0530 | [diff] [blame] | 897 | struct wlan_objmgr_psoc *psoc; |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 898 | struct wlan_objmgr_pdev *pdev; |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 899 | void (*chan_info_cb)(struct scan_chan_info *chan_info); |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 900 | /* Based on INI parameter */ |
| 901 | uint32_t dual_mac_feature_disable; |
| 902 | |
| 903 | enum country_src reg_hint_src; |
Sreelakshmi Konamki | 0e9fb9a | 2017-04-05 18:57:15 +0530 | [diff] [blame] | 904 | uint32_t rx_packet_drop_counter; |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 905 | enum auth_tx_ack_status auth_ack_status; |
| 906 | uint8_t user_configured_nss; |
| 907 | bool snr_monitor_enabled; |
Selvaraj, Sridhar | 5b5a065 | 2017-05-04 11:23:07 +0530 | [diff] [blame] | 908 | bool ignore_assoc_disallowed; |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 909 | bool sta_prefer_80MHz_over_160MHz; |
| 910 | bool first_scan_done; |
| 911 | int8_t first_scan_bucket_threshold; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 912 | uint32_t peer_rssi; |
| 913 | uint32_t peer_txrate; |
| 914 | uint32_t peer_rxrate; |
Vignesh Viswanathan | 694e28e | 2018-01-18 20:53:57 +0530 | [diff] [blame] | 915 | /* 11k Offload Support */ |
| 916 | bool is_11k_offload_supported; |
Kiran Kumar Lokere | 08195ef | 2018-01-17 19:25:15 -0800 | [diff] [blame] | 917 | uint8_t reject_addba_req; |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 918 | uint16_t usr_cfg_ba_buff_size; |
Arif Hussain | 0e24680 | 2018-05-01 18:13:44 -0700 | [diff] [blame] | 919 | bool is_usr_cfg_amsdu_enabled; |
Kiran Kumar Lokere | 3324f63 | 2018-03-01 21:43:21 -0800 | [diff] [blame] | 920 | uint8_t no_ack_policy_cfg[MAX_NUM_AC]; |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 921 | uint32_t he_sgi_ltf_cfg_bit_mask; |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 922 | uint8_t usr_cfg_tx_bfee_nsts; |
Vignesh Viswanathan | b3dbbc8 | 2018-04-06 00:06:27 +0530 | [diff] [blame] | 923 | struct mgmt_beacon_probe_filter bcn_filter; |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 924 | tSirMacEdcaParamRecord usr_mu_edca_params[MAX_NUM_AC]; |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 925 | bool usr_cfg_mu_edca_params; |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 926 | #ifdef WLAN_FEATURE_11AX |
| 927 | tDot11fIEhe_cap he_cap_2g; |
| 928 | tDot11fIEhe_cap he_cap_5g; |
| 929 | #endif |
Liangwei Dong | 0da1426 | 2018-07-03 03:30:23 -0400 | [diff] [blame] | 930 | bool obss_scan_offload; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 931 | } tAniSirGlobal; |
| 932 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 933 | |
| 934 | #ifdef FEATURE_WLAN_TDLS |
| 935 | |
| 936 | #define RFC1042_HDR_LENGTH (6) |
| 937 | #define GET_BE16(x) ((uint16_t) (((x)[0] << 8) | (x)[1])) |
| 938 | #define ETH_TYPE_89_0d (0x890d) |
| 939 | #define ETH_TYPE_LEN (2) |
| 940 | #define PAYLOAD_TYPE_TDLS_SIZE (1) |
| 941 | #define PAYLOAD_TYPE_TDLS (2) |
| 942 | |
| 943 | #endif |
| 944 | |
| 945 | #endif /* _ANIGLOBAL_H */ |