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