Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Abhishek Singh | d085438 | 2019-01-03 11:40:22 +0530 | [diff] [blame] | 2 | * Copyright (c) 2011-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 | |
| 19 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 20 | * |
| 21 | * This file lim_global.h contains the definitions exported by |
| 22 | * LIM module. |
| 23 | * Author: Chandra Modumudi |
| 24 | * Date: 02/11/02 |
| 25 | * History:- |
| 26 | * Date Modified by Modification Information |
| 27 | * -------------------------------------------------------------------- |
| 28 | * |
| 29 | */ |
| 30 | #ifndef __LIM_GLOBAL_H |
| 31 | #define __LIM_GLOBAL_H |
| 32 | |
| 33 | #include "wni_api.h" |
| 34 | #include "sir_api.h" |
| 35 | #include "sir_mac_prot_def.h" |
| 36 | #include "sir_mac_prop_exts.h" |
| 37 | #include "sir_common.h" |
| 38 | #include "sir_debug.h" |
| 39 | #include "wni_cfg.h" |
| 40 | #include "csr_api.h" |
| 41 | #include "sap_api.h" |
| 42 | #include "dot11f.h" |
| 43 | #include "wma_if.h" |
| 44 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 45 | /* Deferred Message Queue Length */ |
| 46 | #define MAX_DEFERRED_QUEUE_LEN 80 |
| 47 | |
| 48 | /* Maximum number of PS - TIM's to be sent with out wakeup from STA */ |
| 49 | #define LIM_TIM_WAIT_COUNT_FACTOR 5 |
| 50 | |
| 51 | /* |
| 52 | * Use this count if (LIM_TIM_WAIT_FACTOR * ListenInterval) |
| 53 | * is less than LIM_MIN_TIM_WAIT_CNT |
| 54 | */ |
| 55 | #define LIM_MIN_TIM_WAIT_COUNT 50 |
| 56 | |
gaolez | 76d2a16 | 2017-03-21 19:23:58 +0800 | [diff] [blame] | 57 | #ifdef CHANNEL_HOPPING_ALL_BANDS |
| 58 | #define CHAN_HOP_ALL_BANDS_ENABLE 1 |
| 59 | #else |
| 60 | #define CHAN_HOP_ALL_BANDS_ENABLE 0 |
| 61 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 62 | |
| 63 | /* enums exported by LIM are as follows */ |
| 64 | |
| 65 | /*System role definition */ |
| 66 | typedef enum eLimSystemRole { |
| 67 | eLIM_UNKNOWN_ROLE, |
| 68 | eLIM_AP_ROLE, |
| 69 | eLIM_STA_IN_IBSS_ROLE, |
| 70 | eLIM_STA_ROLE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 71 | eLIM_P2P_DEVICE_ROLE, |
| 72 | eLIM_P2P_DEVICE_GO, |
Deepak Dhamdhere | c9acc44 | 2016-05-26 02:12:58 -0700 | [diff] [blame] | 73 | eLIM_P2P_DEVICE_CLIENT, |
| 74 | eLIM_NDI_ROLE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 75 | } tLimSystemRole; |
| 76 | |
| 77 | /* |
| 78 | * SME state definition accessible across all Sirius modules. |
| 79 | * AP only states are LIM_SME_CHANNEL_SCAN_STATE & |
| 80 | * LIM_SME_NORMAL_CHANNEL_SCAN_STATE. |
| 81 | * Note that these states may also be present in STA |
| 82 | * side too when DFS support is present for a STA in IBSS mode. |
| 83 | */ |
| 84 | typedef enum eLimSmeStates { |
| 85 | eLIM_SME_OFFLINE_STATE, |
| 86 | eLIM_SME_IDLE_STATE, |
| 87 | eLIM_SME_SUSPEND_STATE, |
| 88 | eLIM_SME_WT_SCAN_STATE, |
| 89 | eLIM_SME_WT_JOIN_STATE, |
| 90 | eLIM_SME_WT_AUTH_STATE, |
| 91 | eLIM_SME_WT_ASSOC_STATE, |
| 92 | eLIM_SME_WT_REASSOC_STATE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 93 | eLIM_SME_JOIN_FAILURE_STATE, |
| 94 | eLIM_SME_ASSOCIATED_STATE, |
| 95 | eLIM_SME_REASSOCIATED_STATE, |
| 96 | eLIM_SME_LINK_EST_STATE, |
| 97 | eLIM_SME_LINK_EST_WT_SCAN_STATE, |
| 98 | eLIM_SME_WT_PRE_AUTH_STATE, |
| 99 | eLIM_SME_WT_DISASSOC_STATE, |
| 100 | eLIM_SME_WT_DEAUTH_STATE, |
| 101 | eLIM_SME_WT_START_BSS_STATE, |
| 102 | eLIM_SME_WT_STOP_BSS_STATE, |
| 103 | eLIM_SME_NORMAL_STATE, |
| 104 | eLIM_SME_CHANNEL_SCAN_STATE, |
| 105 | eLIM_SME_NORMAL_CHANNEL_SCAN_STATE |
| 106 | } tLimSmeStates; |
| 107 | |
| 108 | /* |
| 109 | * MLM state definition. |
| 110 | * While these states are present on AP too when it is |
| 111 | * STA mode, per-STA MLM state exclusive to AP is: |
| 112 | * eLIM_MLM_WT_AUTH_FRAME3. |
| 113 | */ |
| 114 | typedef enum eLimMlmStates { |
| 115 | eLIM_MLM_OFFLINE_STATE, |
| 116 | eLIM_MLM_IDLE_STATE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 117 | eLIM_MLM_WT_JOIN_BEACON_STATE, |
| 118 | eLIM_MLM_JOINED_STATE, |
| 119 | eLIM_MLM_BSS_STARTED_STATE, |
| 120 | eLIM_MLM_WT_AUTH_FRAME2_STATE, |
| 121 | eLIM_MLM_WT_AUTH_FRAME3_STATE, |
| 122 | eLIM_MLM_WT_AUTH_FRAME4_STATE, |
| 123 | eLIM_MLM_AUTH_RSP_TIMEOUT_STATE, |
| 124 | eLIM_MLM_AUTHENTICATED_STATE, |
| 125 | eLIM_MLM_WT_ASSOC_RSP_STATE, |
| 126 | eLIM_MLM_WT_REASSOC_RSP_STATE, |
| 127 | eLIM_MLM_ASSOCIATED_STATE, |
| 128 | eLIM_MLM_REASSOCIATED_STATE, |
| 129 | eLIM_MLM_LINK_ESTABLISHED_STATE, |
| 130 | eLIM_MLM_WT_ASSOC_CNF_STATE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 131 | eLIM_MLM_WT_ADD_BSS_RSP_STATE, |
| 132 | eLIM_MLM_WT_DEL_BSS_RSP_STATE, |
| 133 | eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE, |
| 134 | eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE, |
| 135 | eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE, |
| 136 | eLIM_MLM_WT_ADD_STA_RSP_STATE, |
| 137 | eLIM_MLM_WT_DEL_STA_RSP_STATE, |
| 138 | /* |
| 139 | * MLM goes to this state when LIM initiates DELETE_STA |
| 140 | * as processing of Assoc req because the entry already exists. |
| 141 | * LIM comes out of this state when DELETE_STA response from |
| 142 | * HAL is received. LIM needs to maintain this state so that ADD_STA |
| 143 | * can be issued while processing DELETE_STA response from HAL. |
| 144 | */ |
| 145 | eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE, |
| 146 | eLIM_MLM_WT_SET_BSS_KEY_STATE, |
| 147 | eLIM_MLM_WT_SET_STA_KEY_STATE, |
| 148 | eLIM_MLM_WT_SET_STA_BCASTKEY_STATE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 149 | eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE, |
| 150 | eLIM_MLM_WT_FT_REASSOC_RSP_STATE, |
Padma, Santhosh Kumar | b38ab51 | 2018-01-16 16:16:46 +0530 | [diff] [blame] | 151 | eLIM_MLM_WT_SAE_AUTH_STATE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 152 | } tLimMlmStates; |
| 153 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 154 | /* 11h channel switch states */ |
| 155 | |
| 156 | /* |
| 157 | * This enum indicates in which state the channel-swith |
| 158 | * is presently operating. |
| 159 | * eLIM_11H_CHANSW_INIT - Default state |
| 160 | * eLIM_11H_CHANSW_RUNNING - When channel switch is running |
| 161 | * eLIM_11H_CHANSW_END - After channel switch is complete |
| 162 | */ |
| 163 | typedef enum eLimDot11hChanSwStates { |
| 164 | eLIM_11H_CHANSW_INIT, |
| 165 | eLIM_11H_CHANSW_RUNNING, |
| 166 | eLIM_11H_CHANSW_END |
| 167 | } tLimDot11hChanSwStates; |
| 168 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 169 | /* MLM Req/Cnf structure definitions */ |
| 170 | typedef struct sLimMlmAuthReq { |
| 171 | tSirMacAddr peerMacAddr; |
| 172 | tAniAuthType authType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | uint8_t sessionId; |
| 174 | } tLimMlmAuthReq, *tpLimMlmAuthReq; |
| 175 | |
| 176 | typedef struct sLimMlmJoinReq { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 177 | tSirMacRateSet operationalRateSet; |
| 178 | uint8_t sessionId; |
| 179 | tSirBssDescription bssDescription; |
Selvaraj, Sridhar | 81ab80d | 2017-06-08 12:21:39 +0530 | [diff] [blame] | 180 | /* |
| 181 | * WARNING: Pls make bssDescription as last variable in struct |
| 182 | * tLimMlmJoinReq as it has ieFields followed after this bss |
| 183 | * description. Adding a variable after this corrupts the ieFields |
| 184 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 185 | } tLimMlmJoinReq, *tpLimMlmJoinReq; |
| 186 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 187 | /* Pre-authentication structure definition */ |
| 188 | typedef struct tLimPreAuthNode { |
| 189 | struct tLimPreAuthNode *next; |
| 190 | tSirMacAddr peerMacAddr; |
| 191 | tAniAuthType authType; |
| 192 | tLimMlmStates mlmState; |
| 193 | uint8_t authNodeIdx; |
| 194 | uint8_t challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH]; |
| 195 | uint8_t fTimerStarted:1; |
| 196 | uint8_t fSeen:1; |
| 197 | uint8_t fFree:1; |
| 198 | uint8_t rsvd:5; |
| 199 | TX_TIMER timer; |
| 200 | uint16_t seq_num; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 201 | unsigned long timestamp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 202 | } tLimPreAuthNode, *tpLimPreAuthNode; |
| 203 | |
| 204 | /* Pre-authentication table definition */ |
| 205 | typedef struct tLimPreAuthTable { |
| 206 | uint32_t numEntry; |
Naveen Rawat | e6ddcaa | 2016-02-05 16:50:18 -0800 | [diff] [blame] | 207 | tLimPreAuthNode **pTable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 208 | } tLimPreAuthTable, *tpLimPreAuthTable; |
| 209 | |
| 210 | /* / Per STA context structure definition */ |
| 211 | typedef struct sLimMlmStaContext { |
| 212 | tLimMlmStates mlmState; |
| 213 | tAniAuthType authType; |
| 214 | uint16_t listenInterval; |
| 215 | tSirMacCapabilityInfo capabilityInfo; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 216 | tSirMacReasonCodes disassocReason; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 217 | |
| 218 | tSirResultCodes resultCode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 219 | |
| 220 | uint8_t subType:1; /* Indicates ASSOC (0) or REASSOC (1) */ |
| 221 | uint8_t updateContext:1; |
| 222 | uint8_t schClean:1; |
| 223 | /* 802.11n HT Capability in Station: Enabled 1 or DIsabled 0 */ |
| 224 | uint8_t htCapability:1; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 225 | uint8_t vhtCapability:1; |
Rachit Kankane | 0247191 | 2017-12-27 17:13:57 +0530 | [diff] [blame] | 226 | uint16_t cleanupTrigger; |
| 227 | uint16_t protStatusCode; |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 228 | #ifdef WLAN_FEATURE_11AX |
| 229 | bool he_capable; |
| 230 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 231 | } tLimMlmStaContext, *tpLimMlmStaContext; |
| 232 | |
| 233 | /* Structure definition to hold deferred messages queue parameters */ |
| 234 | typedef struct sLimDeferredMsgQParams { |
Rajeev Kumar | 416b73f | 2017-01-21 16:45:21 -0800 | [diff] [blame] | 235 | struct scheduler_msg deferredQueue[MAX_DEFERRED_QUEUE_LEN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 236 | uint16_t size; |
| 237 | uint16_t read; |
| 238 | uint16_t write; |
| 239 | } tLimDeferredMsgQParams, *tpLimDeferredMsgQParams; |
| 240 | |
| 241 | typedef struct sCfgProtection { |
| 242 | uint32_t overlapFromlla:1; |
| 243 | uint32_t overlapFromllb:1; |
| 244 | uint32_t overlapFromllg:1; |
| 245 | uint32_t overlapHt20:1; |
| 246 | uint32_t overlapNonGf:1; |
| 247 | uint32_t overlapLsigTxop:1; |
| 248 | uint32_t overlapRifs:1; |
| 249 | uint32_t overlapOBSS:1; /* added for obss */ |
| 250 | uint32_t fromlla:1; |
| 251 | uint32_t fromllb:1; |
| 252 | uint32_t fromllg:1; |
| 253 | uint32_t ht20:1; |
| 254 | uint32_t nonGf:1; |
| 255 | uint32_t lsigTxop:1; |
| 256 | uint32_t rifs:1; |
| 257 | uint32_t obss:1; /* added for Obss */ |
| 258 | } tCfgProtection, *tpCfgProtection; |
| 259 | |
| 260 | typedef enum eLimProtStaCacheType { |
| 261 | eLIM_PROT_STA_CACHE_TYPE_INVALID, |
| 262 | eLIM_PROT_STA_CACHE_TYPE_llB, |
| 263 | eLIM_PROT_STA_CACHE_TYPE_llG, |
| 264 | eLIM_PROT_STA_CACHE_TYPE_HT20 |
| 265 | } tLimProtStaCacheType; |
| 266 | |
| 267 | typedef struct sCacheParams { |
| 268 | uint8_t active; |
| 269 | tSirMacAddr addr; |
| 270 | tLimProtStaCacheType protStaCacheType; |
| 271 | |
| 272 | } tCacheParams, *tpCacheParams; |
| 273 | |
| 274 | #define LIM_PROT_STA_OVERLAP_CACHE_SIZE HAL_NUM_ASSOC_STA |
| 275 | #define LIM_PROT_STA_CACHE_SIZE HAL_NUM_ASSOC_STA |
| 276 | |
| 277 | typedef struct sLimProtStaParams { |
| 278 | uint8_t numSta; |
| 279 | uint8_t protectionEnabled; |
| 280 | } tLimProtStaParams, *tpLimProtStaParams; |
| 281 | |
| 282 | typedef struct sLimNoShortParams { |
| 283 | uint8_t numNonShortPreambleSta; |
| 284 | tCacheParams staNoShortCache[LIM_PROT_STA_CACHE_SIZE]; |
| 285 | } tLimNoShortParams, *tpLimNoShortParams; |
| 286 | |
| 287 | typedef struct sLimNoShortSlotParams { |
| 288 | uint8_t numNonShortSlotSta; |
| 289 | tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE]; |
| 290 | } tLimNoShortSlotParams, *tpLimNoShortSlotParams; |
| 291 | |
| 292 | typedef struct tLimIbssPeerNode tLimIbssPeerNode; |
| 293 | struct tLimIbssPeerNode { |
| 294 | tLimIbssPeerNode *next; |
| 295 | tSirMacAddr peerMacAddr; |
| 296 | uint8_t extendedRatesPresent:1; |
| 297 | uint8_t edcaPresent:1; |
| 298 | uint8_t wmeEdcaPresent:1; |
| 299 | uint8_t wmeInfoPresent:1; |
| 300 | uint8_t htCapable:1; |
| 301 | uint8_t vhtCapable:1; |
| 302 | uint8_t rsvd:2; |
| 303 | uint8_t htSecondaryChannelOffset; |
| 304 | tSirMacCapabilityInfo capabilityInfo; |
| 305 | tSirMacRateSet supportedRates; |
| 306 | tSirMacRateSet extendedRates; |
| 307 | uint8_t supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET]; |
| 308 | tSirMacEdcaParamSetIE edcaParams; |
| 309 | uint8_t erpIePresent; |
| 310 | |
| 311 | /* HT Capabilities of IBSS Peer */ |
| 312 | uint8_t htGreenfield; |
| 313 | uint8_t htShortGI40Mhz; |
| 314 | uint8_t htShortGI20Mhz; |
| 315 | |
| 316 | /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */ |
| 317 | uint8_t htDsssCckRate40MHzSupport; |
| 318 | |
| 319 | /* MIMO Power Save */ |
| 320 | tSirMacHTMIMOPowerSaveState htMIMOPSState; |
| 321 | |
| 322 | /* */ |
| 323 | /* A-MPDU Density */ |
| 324 | /* 000 - No restriction */ |
| 325 | /* 001 - 1/8 usec */ |
| 326 | /* 010 - 1/4 usec */ |
| 327 | /* 011 - 1/2 usec */ |
| 328 | /* 100 - 1 usec */ |
| 329 | /* 101 - 2 usec */ |
| 330 | /* 110 - 4 usec */ |
| 331 | /* 111 - 8 usec */ |
| 332 | /* */ |
| 333 | uint8_t htAMpduDensity; |
| 334 | |
| 335 | /* Maximum Rx A-MPDU factor */ |
| 336 | uint8_t htMaxRxAMpduFactor; |
| 337 | |
| 338 | /* Set to 0 for 3839 octets */ |
| 339 | /* Set to 1 for 7935 octets */ |
| 340 | uint8_t htMaxAmsduLength; |
| 341 | |
| 342 | /* */ |
| 343 | /* Recommended Tx Width Set */ |
| 344 | /* 0 - use 20 MHz channel (control channel) */ |
| 345 | /* 1 - use 40 Mhz channel */ |
| 346 | /* */ |
| 347 | uint8_t htSupportedChannelWidthSet; |
| 348 | |
| 349 | uint8_t htLdpcCapable; |
| 350 | |
| 351 | uint8_t beaconHBCount; |
| 352 | uint8_t heartbeatFailure; |
| 353 | |
| 354 | uint8_t *beacon; /* Hold beacon to be sent to HDD/CSR */ |
| 355 | uint16_t beaconLen; |
| 356 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 357 | tDot11fIEVHTCaps VHTCaps; |
| 358 | uint8_t vhtSupportedChannelWidthSet; |
| 359 | uint8_t vhtBeamFormerCapable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 360 | /* |
| 361 | * Peer Atim Info |
| 362 | */ |
| 363 | uint8_t atimIePresent; |
| 364 | uint32_t peerAtimWindowLength; |
| 365 | }; |
| 366 | |
| 367 | /* Enums used for channel switching. */ |
| 368 | typedef enum eLimChannelSwitchState { |
| 369 | eLIM_CHANNEL_SWITCH_IDLE, |
| 370 | eLIM_CHANNEL_SWITCH_PRIMARY_ONLY, |
| 371 | eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY |
| 372 | } tLimChannelSwitchState; |
| 373 | |
| 374 | /* Channel Switch Info */ |
| 375 | typedef struct sLimChannelSwitchInfo { |
| 376 | tLimChannelSwitchState state; |
| 377 | uint8_t primaryChannel; |
| 378 | uint8_t ch_center_freq_seg0; |
| 379 | uint8_t ch_center_freq_seg1; |
Kiran Kumar Lokere | 999e58c | 2016-01-07 02:18:39 -0800 | [diff] [blame] | 380 | uint8_t sec_ch_offset; |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 381 | enum phy_ch_width ch_width; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 382 | int8_t switchCount; |
| 383 | uint32_t switchTimeoutValue; |
| 384 | uint8_t switchMode; |
| 385 | } tLimChannelSwitchInfo, *tpLimChannelSwitchInfo; |
| 386 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 387 | typedef struct sLimOperatingModeInfo { |
| 388 | uint8_t present; |
| 389 | uint8_t chanWidth:2; |
| 390 | uint8_t reserved:2; |
| 391 | uint8_t rxNSS:3; |
| 392 | uint8_t rxNSSType:1; |
| 393 | } tLimOperatingModeInfo, *tpLimOperatingModeInfo; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 394 | |
| 395 | typedef struct sLimWiderBWChannelSwitch { |
| 396 | uint8_t newChanWidth; |
| 397 | uint8_t newCenterChanFreq0; |
| 398 | uint8_t newCenterChanFreq1; |
| 399 | } tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo; |
| 400 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 401 | typedef struct sLimTspecInfo { |
| 402 | /* 0==free, else used */ |
| 403 | uint8_t inuse; |
| 404 | /* index in list */ |
| 405 | uint8_t idx; |
| 406 | tSirMacAddr staAddr; |
| 407 | uint16_t assocId; |
Jeff Johnson | 56471b9 | 2018-12-22 14:36:06 -0800 | [diff] [blame] | 408 | struct mac_tspec_ie tspec; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 409 | /* number of Tclas elements */ |
| 410 | uint8_t numTclas; |
| 411 | tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM]; |
| 412 | uint8_t tclasProc; |
| 413 | /* tclassProc is valid only if this is set to 1. */ |
| 414 | uint8_t tclasProcPresent:1; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 415 | } qdf_packed tLimTspecInfo, *tpLimTspecInfo; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 416 | |
| 417 | typedef struct sLimAdmitPolicyInfo { |
| 418 | /* admit control policy type */ |
| 419 | uint8_t type; |
| 420 | /* oversubscription factor : 0 means nothing is allowed */ |
| 421 | uint8_t bw_factor; |
| 422 | /* valid only when 'type' is set BW_FACTOR */ |
| 423 | } tLimAdmitPolicyInfo, *tpLimAdmitPolicyInfo; |
| 424 | |
| 425 | typedef enum eLimWscEnrollState { |
| 426 | eLIM_WSC_ENROLL_NOOP, |
| 427 | eLIM_WSC_ENROLL_BEGIN, |
| 428 | eLIM_WSC_ENROLL_IN_PROGRESS, |
| 429 | eLIM_WSC_ENROLL_END |
| 430 | } tLimWscEnrollState; |
| 431 | |
| 432 | #define WSC_PASSWD_ID_PUSH_BUTTON (0x0004) |
| 433 | |
| 434 | typedef struct sLimWscIeInfo { |
| 435 | bool apSetupLocked; |
| 436 | bool selectedRegistrar; |
| 437 | uint16_t selectedRegistrarConfigMethods; |
| 438 | tLimWscEnrollState wscEnrollmentState; |
| 439 | tLimWscEnrollState probeRespWscEnrollmentState; |
| 440 | uint8_t reqType; |
| 441 | uint8_t respType; |
| 442 | } tLimWscIeInfo, *tpLimWscIeInfo; |
| 443 | |
| 444 | /* maximum number of tspec's supported */ |
| 445 | #define LIM_NUM_TSPEC_MAX 15 |
| 446 | |
| 447 | /* structure to hold all 11h specific data */ |
| 448 | typedef struct sLimSpecMgmtInfo { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 449 | tLimDot11hChanSwStates dot11hChanSwState; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 450 | } tLimSpecMgmtInfo, *tpLimSpecMgmtInfo; |
| 451 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 452 | #endif |