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