Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Krishna Kumaar Natarajan | 4e9cf39 | 2015-11-20 13:35:05 -0800 | [diff] [blame] | 2 | * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
| 29 | * |
| 30 | * This file lim_global.h contains the definitions exported by |
| 31 | * LIM module. |
| 32 | * Author: Chandra Modumudi |
| 33 | * Date: 02/11/02 |
| 34 | * History:- |
| 35 | * Date Modified by Modification Information |
| 36 | * -------------------------------------------------------------------- |
| 37 | * |
| 38 | */ |
| 39 | #ifndef __LIM_GLOBAL_H |
| 40 | #define __LIM_GLOBAL_H |
| 41 | |
| 42 | #include "wni_api.h" |
| 43 | #include "sir_api.h" |
| 44 | #include "sir_mac_prot_def.h" |
| 45 | #include "sir_mac_prop_exts.h" |
| 46 | #include "sir_common.h" |
| 47 | #include "sir_debug.h" |
| 48 | #include "wni_cfg.h" |
| 49 | #include "csr_api.h" |
| 50 | #include "sap_api.h" |
| 51 | #include "dot11f.h" |
| 52 | #include "wma_if.h" |
| 53 | |
| 54 | /* / Maximum number of scan hash table entries */ |
| 55 | #define LIM_MAX_NUM_OF_SCAN_RESULTS 256 |
| 56 | |
| 57 | /* Sending Disassociate frames threshold */ |
| 58 | #define LIM_SEND_DISASSOC_FRAME_THRESHOLD 2 |
| 59 | #define LIM_HASH_MISS_TIMER_MS 10000 |
| 60 | |
| 61 | /* Deferred Message Queue Length */ |
| 62 | #define MAX_DEFERRED_QUEUE_LEN 80 |
| 63 | |
| 64 | /* Maximum number of PS - TIM's to be sent with out wakeup from STA */ |
| 65 | #define LIM_TIM_WAIT_COUNT_FACTOR 5 |
| 66 | |
| 67 | /* |
| 68 | * Use this count if (LIM_TIM_WAIT_FACTOR * ListenInterval) |
| 69 | * is less than LIM_MIN_TIM_WAIT_CNT |
| 70 | */ |
| 71 | #define LIM_MIN_TIM_WAIT_COUNT 50 |
| 72 | |
| 73 | #define GET_TIM_WAIT_COUNT(LIntrvl) \ |
| 74 | ((LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) > LIM_MIN_TIM_WAIT_COUNT ? \ |
| 75 | (LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) : LIM_MIN_TIM_WAIT_COUNT) |
| 76 | |
| 77 | #define IS_5G_BAND(__rfBand) ((__rfBand & 0x3) == 0x2) |
| 78 | #define IS_24G_BAND(__rfBand) ((__rfBand & 0x3) == 0x1) |
| 79 | |
| 80 | #define LIM_MAX_CSA_IE_UPDATES (5) |
| 81 | |
| 82 | /* enums exported by LIM are as follows */ |
| 83 | |
| 84 | /*System role definition */ |
| 85 | typedef enum eLimSystemRole { |
| 86 | eLIM_UNKNOWN_ROLE, |
| 87 | eLIM_AP_ROLE, |
| 88 | eLIM_STA_IN_IBSS_ROLE, |
| 89 | eLIM_STA_ROLE, |
| 90 | eLIM_BT_AMP_STA_ROLE, |
| 91 | eLIM_BT_AMP_AP_ROLE, |
| 92 | eLIM_P2P_DEVICE_ROLE, |
| 93 | eLIM_P2P_DEVICE_GO, |
| 94 | eLIM_P2P_DEVICE_CLIENT |
| 95 | } tLimSystemRole; |
| 96 | |
| 97 | /* |
| 98 | * SME state definition accessible across all Sirius modules. |
| 99 | * AP only states are LIM_SME_CHANNEL_SCAN_STATE & |
| 100 | * LIM_SME_NORMAL_CHANNEL_SCAN_STATE. |
| 101 | * Note that these states may also be present in STA |
| 102 | * side too when DFS support is present for a STA in IBSS mode. |
| 103 | */ |
| 104 | typedef enum eLimSmeStates { |
| 105 | eLIM_SME_OFFLINE_STATE, |
| 106 | eLIM_SME_IDLE_STATE, |
| 107 | eLIM_SME_SUSPEND_STATE, |
| 108 | eLIM_SME_WT_SCAN_STATE, |
| 109 | eLIM_SME_WT_JOIN_STATE, |
| 110 | eLIM_SME_WT_AUTH_STATE, |
| 111 | eLIM_SME_WT_ASSOC_STATE, |
| 112 | eLIM_SME_WT_REASSOC_STATE, |
| 113 | eLIM_SME_WT_REASSOC_LINK_FAIL_STATE, |
| 114 | eLIM_SME_JOIN_FAILURE_STATE, |
| 115 | eLIM_SME_ASSOCIATED_STATE, |
| 116 | eLIM_SME_REASSOCIATED_STATE, |
| 117 | eLIM_SME_LINK_EST_STATE, |
| 118 | eLIM_SME_LINK_EST_WT_SCAN_STATE, |
| 119 | eLIM_SME_WT_PRE_AUTH_STATE, |
| 120 | eLIM_SME_WT_DISASSOC_STATE, |
| 121 | eLIM_SME_WT_DEAUTH_STATE, |
| 122 | eLIM_SME_WT_START_BSS_STATE, |
| 123 | eLIM_SME_WT_STOP_BSS_STATE, |
| 124 | eLIM_SME_NORMAL_STATE, |
| 125 | eLIM_SME_CHANNEL_SCAN_STATE, |
| 126 | eLIM_SME_NORMAL_CHANNEL_SCAN_STATE |
| 127 | } tLimSmeStates; |
| 128 | |
| 129 | /* |
| 130 | * MLM state definition. |
| 131 | * While these states are present on AP too when it is |
| 132 | * STA mode, per-STA MLM state exclusive to AP is: |
| 133 | * eLIM_MLM_WT_AUTH_FRAME3. |
| 134 | */ |
| 135 | typedef enum eLimMlmStates { |
| 136 | eLIM_MLM_OFFLINE_STATE, |
| 137 | eLIM_MLM_IDLE_STATE, |
| 138 | eLIM_MLM_WT_PROBE_RESP_STATE, |
| 139 | eLIM_MLM_PASSIVE_SCAN_STATE, |
| 140 | eLIM_MLM_WT_JOIN_BEACON_STATE, |
| 141 | eLIM_MLM_JOINED_STATE, |
| 142 | eLIM_MLM_BSS_STARTED_STATE, |
| 143 | eLIM_MLM_WT_AUTH_FRAME2_STATE, |
| 144 | eLIM_MLM_WT_AUTH_FRAME3_STATE, |
| 145 | eLIM_MLM_WT_AUTH_FRAME4_STATE, |
| 146 | eLIM_MLM_AUTH_RSP_TIMEOUT_STATE, |
| 147 | eLIM_MLM_AUTHENTICATED_STATE, |
| 148 | eLIM_MLM_WT_ASSOC_RSP_STATE, |
| 149 | eLIM_MLM_WT_REASSOC_RSP_STATE, |
| 150 | eLIM_MLM_ASSOCIATED_STATE, |
| 151 | eLIM_MLM_REASSOCIATED_STATE, |
| 152 | eLIM_MLM_LINK_ESTABLISHED_STATE, |
| 153 | eLIM_MLM_WT_ASSOC_CNF_STATE, |
| 154 | eLIM_MLM_LEARN_STATE, |
| 155 | eLIM_MLM_WT_ADD_BSS_RSP_STATE, |
| 156 | eLIM_MLM_WT_DEL_BSS_RSP_STATE, |
| 157 | eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE, |
| 158 | eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE, |
| 159 | eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE, |
| 160 | eLIM_MLM_WT_ADD_STA_RSP_STATE, |
| 161 | eLIM_MLM_WT_DEL_STA_RSP_STATE, |
| 162 | /* |
| 163 | * MLM goes to this state when LIM initiates DELETE_STA |
| 164 | * as processing of Assoc req because the entry already exists. |
| 165 | * LIM comes out of this state when DELETE_STA response from |
| 166 | * HAL is received. LIM needs to maintain this state so that ADD_STA |
| 167 | * can be issued while processing DELETE_STA response from HAL. |
| 168 | */ |
| 169 | eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE, |
| 170 | eLIM_MLM_WT_SET_BSS_KEY_STATE, |
| 171 | eLIM_MLM_WT_SET_STA_KEY_STATE, |
| 172 | eLIM_MLM_WT_SET_STA_BCASTKEY_STATE, |
| 173 | eLIM_MLM_WT_SET_MIMOPS_STATE, |
| 174 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 175 | eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE, |
| 176 | eLIM_MLM_WT_FT_REASSOC_RSP_STATE, |
| 177 | #endif |
| 178 | eLIM_MLM_P2P_LISTEN_STATE, |
| 179 | } tLimMlmStates; |
| 180 | |
| 181 | /* 11h channel quiet states */ |
| 182 | |
| 183 | /* |
| 184 | * This enum indicates in which state the device is in |
| 185 | * when it receives quiet element in beacon or probe-response. |
| 186 | * The default quiet state of the device is always INIT |
| 187 | * eLIM_QUIET_BEGIN - When Quiet period is started |
| 188 | * eLIM_QUIET_CHANGED - When Quiet period is updated |
| 189 | * eLIM_QUIET_RUNNING - Between two successive Quiet updates |
| 190 | * eLIM_QUIET_END - When quiet period ends |
| 191 | */ |
| 192 | typedef enum eLimQuietStates { |
| 193 | eLIM_QUIET_INIT, |
| 194 | eLIM_QUIET_BEGIN, |
| 195 | eLIM_QUIET_CHANGED, |
| 196 | eLIM_QUIET_RUNNING, |
| 197 | eLIM_QUIET_END |
| 198 | } tLimQuietStates; |
| 199 | |
| 200 | /* 11h channel switch states */ |
| 201 | |
| 202 | /* |
| 203 | * This enum indicates in which state the channel-swith |
| 204 | * is presently operating. |
| 205 | * eLIM_11H_CHANSW_INIT - Default state |
| 206 | * eLIM_11H_CHANSW_RUNNING - When channel switch is running |
| 207 | * eLIM_11H_CHANSW_END - After channel switch is complete |
| 208 | */ |
| 209 | typedef enum eLimDot11hChanSwStates { |
| 210 | eLIM_11H_CHANSW_INIT, |
| 211 | eLIM_11H_CHANSW_RUNNING, |
| 212 | eLIM_11H_CHANSW_END |
| 213 | } tLimDot11hChanSwStates; |
| 214 | |
| 215 | |
| 216 | /* WLAN_SUSPEND_LINK Related */ |
| 217 | typedef void (*SUSPEND_RESUME_LINK_CALLBACK)(tpAniSirGlobal pMac, |
| 218 | CDF_STATUS status, |
| 219 | uint32_t *data); |
| 220 | |
| 221 | /* LIM to HAL SCAN Management Message Interface states */ |
| 222 | typedef enum eLimHalScanState { |
| 223 | eLIM_HAL_IDLE_SCAN_STATE, |
| 224 | eLIM_HAL_INIT_SCAN_WAIT_STATE, |
| 225 | eLIM_HAL_START_SCAN_WAIT_STATE, |
| 226 | eLIM_HAL_END_SCAN_WAIT_STATE, |
| 227 | eLIM_HAL_FINISH_SCAN_WAIT_STATE, |
| 228 | eLIM_HAL_INIT_LEARN_WAIT_STATE, |
| 229 | eLIM_HAL_START_LEARN_WAIT_STATE, |
| 230 | eLIM_HAL_END_LEARN_WAIT_STATE, |
| 231 | eLIM_HAL_FINISH_LEARN_WAIT_STATE, |
| 232 | eLIM_HAL_SCANNING_STATE, |
| 233 | /* WLAN_SUSPEND_LINK Related */ |
| 234 | eLIM_HAL_SUSPEND_LINK_WAIT_STATE, |
| 235 | eLIM_HAL_SUSPEND_LINK_STATE, |
| 236 | eLIM_HAL_RESUME_LINK_WAIT_STATE, |
| 237 | /* end WLAN_SUSPEND_LINK Related */ |
| 238 | } tLimLimHalScanState; |
| 239 | |
| 240 | /* MLM Req/Cnf structure definitions */ |
| 241 | typedef struct sLimMlmAuthReq { |
| 242 | tSirMacAddr peerMacAddr; |
| 243 | tAniAuthType authType; |
| 244 | uint32_t authFailureTimeout; |
| 245 | uint8_t sessionId; |
| 246 | } tLimMlmAuthReq, *tpLimMlmAuthReq; |
| 247 | |
| 248 | typedef struct sLimMlmJoinReq { |
| 249 | uint32_t joinFailureTimeout; |
| 250 | tSirMacRateSet operationalRateSet; |
| 251 | uint8_t sessionId; |
| 252 | tSirBssDescription bssDescription; |
| 253 | } tLimMlmJoinReq, *tpLimMlmJoinReq; |
| 254 | |
| 255 | typedef struct sLimMlmScanReq { |
| 256 | tSirBssType bssType; |
| 257 | tSirMacAddr bssId; |
| 258 | tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID]; |
| 259 | tSirScanType scanType; |
| 260 | uint32_t minChannelTime; |
| 261 | uint32_t maxChannelTime; |
| 262 | uint32_t dot11mode; |
| 263 | /* Number of SSIDs to scan(send Probe request) */ |
| 264 | uint8_t numSsid; |
| 265 | |
| 266 | bool p2pSearch; |
| 267 | uint16_t uIEFieldLen; |
| 268 | uint16_t uIEFieldOffset; |
| 269 | |
| 270 | uint8_t sessionId; |
| 271 | /* channelList MUST be the last field of this structure */ |
| 272 | tSirChannelList channelList; |
| 273 | /*----------------------------- |
| 274 | tLimMlmScanReq.... |
| 275 | ----------------------------- |
| 276 | uIEFiledLen |
| 277 | ----------------------------- |
| 278 | uIEFiledOffset ----+ |
| 279 | ----------------------------- | |
| 280 | channelList.numChannels | |
| 281 | ----------------------------- | |
| 282 | ... variable size up to | |
| 283 | channelNumber[numChannels-1] | |
| 284 | This can be zero, if | |
| 285 | numChannel is zero. | |
| 286 | ----------------------------- <--+ |
| 287 | ... variable size uIEFiled |
| 288 | up to uIEFieldLen (can be 0) |
| 289 | -----------------------------*/ |
| 290 | } tLimMlmScanReq, *tpLimMlmScanReq; |
| 291 | |
| 292 | typedef struct tLimScanResultNode tLimScanResultNode; |
| 293 | struct tLimScanResultNode { |
| 294 | tLimScanResultNode *next; |
| 295 | tSirBssDescription bssDescription; |
| 296 | }; |
| 297 | |
| 298 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 299 | |
| 300 | #ifndef OEM_DATA_REQ_SIZE |
| 301 | #define OEM_DATA_REQ_SIZE 280 |
| 302 | #endif |
| 303 | #ifndef OEM_DATA_RSP_SIZE |
| 304 | #define OEM_DATA_RSP_SIZE 1724 |
| 305 | #endif |
| 306 | |
| 307 | /* OEM Data related structure definitions */ |
| 308 | typedef struct sLimMlmOemDataReq { |
Srinivas Girigowda | 0ee6686 | 2015-09-24 14:03:29 -0700 | [diff] [blame] | 309 | struct cdf_mac_addr selfMacAddr; |
Krishna Kumaar Natarajan | 9ac8efd | 2015-11-20 13:40:24 -0800 | [diff] [blame] | 310 | uint8_t data_len; |
| 311 | uint8_t *data; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | } tLimMlmOemDataReq, *tpLimMlmOemDataReq; |
| 313 | |
| 314 | typedef struct sLimMlmOemDataRsp { |
Krishna Kumaar Natarajan | 4e9cf39 | 2015-11-20 13:35:05 -0800 | [diff] [blame] | 315 | bool target_rsp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | uint8_t oemDataRsp[OEM_DATA_RSP_SIZE]; |
| 317 | } tLimMlmOemDataRsp, *tpLimMlmOemDataRsp; |
| 318 | #endif |
| 319 | |
| 320 | /* Pre-authentication structure definition */ |
| 321 | typedef struct tLimPreAuthNode { |
| 322 | struct tLimPreAuthNode *next; |
| 323 | tSirMacAddr peerMacAddr; |
| 324 | tAniAuthType authType; |
| 325 | tLimMlmStates mlmState; |
| 326 | uint8_t authNodeIdx; |
| 327 | uint8_t challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH]; |
| 328 | uint8_t fTimerStarted:1; |
| 329 | uint8_t fSeen:1; |
| 330 | uint8_t fFree:1; |
| 331 | uint8_t rsvd:5; |
| 332 | TX_TIMER timer; |
| 333 | uint16_t seq_num; |
| 334 | v_TIME_t timestamp; |
| 335 | } tLimPreAuthNode, *tpLimPreAuthNode; |
| 336 | |
| 337 | /* Pre-authentication table definition */ |
| 338 | typedef struct tLimPreAuthTable { |
| 339 | uint32_t numEntry; |
| 340 | tpLimPreAuthNode pTable; |
| 341 | } tLimPreAuthTable, *tpLimPreAuthTable; |
| 342 | |
| 343 | /* / Per STA context structure definition */ |
| 344 | typedef struct sLimMlmStaContext { |
| 345 | tLimMlmStates mlmState; |
| 346 | tAniAuthType authType; |
| 347 | uint16_t listenInterval; |
| 348 | tSirMacCapabilityInfo capabilityInfo; |
| 349 | tSirMacPropRateSet propRateSet; |
| 350 | tSirMacReasonCodes disassocReason; |
| 351 | uint16_t cleanupTrigger; |
| 352 | |
| 353 | tSirResultCodes resultCode; |
| 354 | uint16_t protStatusCode; |
| 355 | |
| 356 | uint8_t subType:1; /* Indicates ASSOC (0) or REASSOC (1) */ |
| 357 | uint8_t updateContext:1; |
| 358 | uint8_t schClean:1; |
| 359 | /* 802.11n HT Capability in Station: Enabled 1 or DIsabled 0 */ |
| 360 | uint8_t htCapability:1; |
| 361 | #ifdef WLAN_FEATURE_11AC |
| 362 | uint8_t vhtCapability:1; |
| 363 | #endif |
| 364 | } tLimMlmStaContext, *tpLimMlmStaContext; |
| 365 | |
| 366 | /* Structure definition to hold deferred messages queue parameters */ |
| 367 | typedef struct sLimDeferredMsgQParams { |
| 368 | tSirMsgQ deferredQueue[MAX_DEFERRED_QUEUE_LEN]; |
| 369 | uint16_t size; |
| 370 | uint16_t read; |
| 371 | uint16_t write; |
| 372 | } tLimDeferredMsgQParams, *tpLimDeferredMsgQParams; |
| 373 | |
| 374 | typedef struct sCfgProtection { |
| 375 | uint32_t overlapFromlla:1; |
| 376 | uint32_t overlapFromllb:1; |
| 377 | uint32_t overlapFromllg:1; |
| 378 | uint32_t overlapHt20:1; |
| 379 | uint32_t overlapNonGf:1; |
| 380 | uint32_t overlapLsigTxop:1; |
| 381 | uint32_t overlapRifs:1; |
| 382 | uint32_t overlapOBSS:1; /* added for obss */ |
| 383 | uint32_t fromlla:1; |
| 384 | uint32_t fromllb:1; |
| 385 | uint32_t fromllg:1; |
| 386 | uint32_t ht20:1; |
| 387 | uint32_t nonGf:1; |
| 388 | uint32_t lsigTxop:1; |
| 389 | uint32_t rifs:1; |
| 390 | uint32_t obss:1; /* added for Obss */ |
| 391 | } tCfgProtection, *tpCfgProtection; |
| 392 | |
| 393 | typedef enum eLimProtStaCacheType { |
| 394 | eLIM_PROT_STA_CACHE_TYPE_INVALID, |
| 395 | eLIM_PROT_STA_CACHE_TYPE_llB, |
| 396 | eLIM_PROT_STA_CACHE_TYPE_llG, |
| 397 | eLIM_PROT_STA_CACHE_TYPE_HT20 |
| 398 | } tLimProtStaCacheType; |
| 399 | |
| 400 | typedef struct sCacheParams { |
| 401 | uint8_t active; |
| 402 | tSirMacAddr addr; |
| 403 | tLimProtStaCacheType protStaCacheType; |
| 404 | |
| 405 | } tCacheParams, *tpCacheParams; |
| 406 | |
| 407 | #define LIM_PROT_STA_OVERLAP_CACHE_SIZE HAL_NUM_ASSOC_STA |
| 408 | #define LIM_PROT_STA_CACHE_SIZE HAL_NUM_ASSOC_STA |
| 409 | |
| 410 | typedef struct sLimProtStaParams { |
| 411 | uint8_t numSta; |
| 412 | uint8_t protectionEnabled; |
| 413 | } tLimProtStaParams, *tpLimProtStaParams; |
| 414 | |
| 415 | typedef struct sLimNoShortParams { |
| 416 | uint8_t numNonShortPreambleSta; |
| 417 | tCacheParams staNoShortCache[LIM_PROT_STA_CACHE_SIZE]; |
| 418 | } tLimNoShortParams, *tpLimNoShortParams; |
| 419 | |
| 420 | typedef struct sLimNoShortSlotParams { |
| 421 | uint8_t numNonShortSlotSta; |
| 422 | tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE]; |
| 423 | } tLimNoShortSlotParams, *tpLimNoShortSlotParams; |
| 424 | |
| 425 | typedef struct tLimIbssPeerNode tLimIbssPeerNode; |
| 426 | struct tLimIbssPeerNode { |
| 427 | tLimIbssPeerNode *next; |
| 428 | tSirMacAddr peerMacAddr; |
| 429 | uint8_t extendedRatesPresent:1; |
| 430 | uint8_t edcaPresent:1; |
| 431 | uint8_t wmeEdcaPresent:1; |
| 432 | uint8_t wmeInfoPresent:1; |
| 433 | uint8_t htCapable:1; |
| 434 | uint8_t vhtCapable:1; |
| 435 | uint8_t rsvd:2; |
| 436 | uint8_t htSecondaryChannelOffset; |
| 437 | tSirMacCapabilityInfo capabilityInfo; |
| 438 | tSirMacRateSet supportedRates; |
| 439 | tSirMacRateSet extendedRates; |
| 440 | uint8_t supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET]; |
| 441 | tSirMacEdcaParamSetIE edcaParams; |
| 442 | uint8_t erpIePresent; |
| 443 | |
| 444 | /* HT Capabilities of IBSS Peer */ |
| 445 | uint8_t htGreenfield; |
| 446 | uint8_t htShortGI40Mhz; |
| 447 | uint8_t htShortGI20Mhz; |
| 448 | |
| 449 | /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */ |
| 450 | uint8_t htDsssCckRate40MHzSupport; |
| 451 | |
| 452 | /* MIMO Power Save */ |
| 453 | tSirMacHTMIMOPowerSaveState htMIMOPSState; |
| 454 | |
| 455 | /* */ |
| 456 | /* A-MPDU Density */ |
| 457 | /* 000 - No restriction */ |
| 458 | /* 001 - 1/8 usec */ |
| 459 | /* 010 - 1/4 usec */ |
| 460 | /* 011 - 1/2 usec */ |
| 461 | /* 100 - 1 usec */ |
| 462 | /* 101 - 2 usec */ |
| 463 | /* 110 - 4 usec */ |
| 464 | /* 111 - 8 usec */ |
| 465 | /* */ |
| 466 | uint8_t htAMpduDensity; |
| 467 | |
| 468 | /* Maximum Rx A-MPDU factor */ |
| 469 | uint8_t htMaxRxAMpduFactor; |
| 470 | |
| 471 | /* Set to 0 for 3839 octets */ |
| 472 | /* Set to 1 for 7935 octets */ |
| 473 | uint8_t htMaxAmsduLength; |
| 474 | |
| 475 | /* */ |
| 476 | /* Recommended Tx Width Set */ |
| 477 | /* 0 - use 20 MHz channel (control channel) */ |
| 478 | /* 1 - use 40 Mhz channel */ |
| 479 | /* */ |
| 480 | uint8_t htSupportedChannelWidthSet; |
| 481 | |
| 482 | uint8_t htLdpcCapable; |
| 483 | |
| 484 | uint8_t beaconHBCount; |
| 485 | uint8_t heartbeatFailure; |
| 486 | |
| 487 | uint8_t *beacon; /* Hold beacon to be sent to HDD/CSR */ |
| 488 | uint16_t beaconLen; |
| 489 | |
| 490 | #ifdef WLAN_FEATURE_11AC |
| 491 | tDot11fIEVHTCaps VHTCaps; |
| 492 | uint8_t vhtSupportedChannelWidthSet; |
| 493 | uint8_t vhtBeamFormerCapable; |
| 494 | #endif |
| 495 | /* |
| 496 | * Peer Atim Info |
| 497 | */ |
| 498 | uint8_t atimIePresent; |
| 499 | uint32_t peerAtimWindowLength; |
| 500 | }; |
| 501 | |
| 502 | /* Enums used for channel switching. */ |
| 503 | typedef enum eLimChannelSwitchState { |
| 504 | eLIM_CHANNEL_SWITCH_IDLE, |
| 505 | eLIM_CHANNEL_SWITCH_PRIMARY_ONLY, |
| 506 | eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY |
| 507 | } tLimChannelSwitchState; |
| 508 | |
| 509 | /* Channel Switch Info */ |
| 510 | typedef struct sLimChannelSwitchInfo { |
| 511 | tLimChannelSwitchState state; |
| 512 | uint8_t primaryChannel; |
| 513 | uint8_t ch_center_freq_seg0; |
| 514 | uint8_t ch_center_freq_seg1; |
Kiran Kumar Lokere | 999e58c | 2016-01-07 02:18:39 -0800 | [diff] [blame^] | 515 | uint8_t sec_ch_offset; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 516 | phy_ch_width ch_width; |
| 517 | int8_t switchCount; |
| 518 | uint32_t switchTimeoutValue; |
| 519 | uint8_t switchMode; |
| 520 | } tLimChannelSwitchInfo, *tpLimChannelSwitchInfo; |
| 521 | |
| 522 | #ifdef WLAN_FEATURE_11AC |
| 523 | typedef struct sLimOperatingModeInfo { |
| 524 | uint8_t present; |
| 525 | uint8_t chanWidth:2; |
| 526 | uint8_t reserved:2; |
| 527 | uint8_t rxNSS:3; |
| 528 | uint8_t rxNSSType:1; |
| 529 | } tLimOperatingModeInfo, *tpLimOperatingModeInfo; |
| 530 | #endif |
| 531 | |
| 532 | typedef struct sLimWiderBWChannelSwitch { |
| 533 | uint8_t newChanWidth; |
| 534 | uint8_t newCenterChanFreq0; |
| 535 | uint8_t newCenterChanFreq1; |
| 536 | } tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo; |
| 537 | |
| 538 | /* Enums used when stopping the Tx. */ |
| 539 | typedef enum eLimQuietTxMode { |
| 540 | /* Stop/resume transmission of all stations,Uses the global flag */ |
| 541 | eLIM_TX_ALL = 0, |
| 542 | /* |
| 543 | * Stops/resumes the transmission of specific stations identified |
| 544 | * by staId. |
| 545 | */ |
| 546 | eLIM_TX_STA, |
| 547 | /* Stops/resumes the transmission of all the packets in BSS */ |
| 548 | eLIM_TX_BSS, |
| 549 | /* |
| 550 | * Stops/resumes the transmission of all packets except beacons in BSS |
| 551 | * This is used when radar is detected in the current operating channel. |
| 552 | * Beacon has to be sent to notify the stations associated about the |
| 553 | * scheduled channel switch |
| 554 | */ |
| 555 | eLIM_TX_BSS_BUT_BEACON |
| 556 | } tLimQuietTxMode; |
| 557 | |
| 558 | typedef enum eLimControlTx { |
| 559 | eLIM_RESUME_TX = 0, |
| 560 | eLIM_STOP_TX |
| 561 | } tLimControlTx; |
| 562 | |
| 563 | /* -------------------------------------------------------------------- */ |
| 564 | |
| 565 | typedef struct sLimTspecInfo { |
| 566 | /* 0==free, else used */ |
| 567 | uint8_t inuse; |
| 568 | /* index in list */ |
| 569 | uint8_t idx; |
| 570 | tSirMacAddr staAddr; |
| 571 | uint16_t assocId; |
| 572 | tSirMacTspecIE tspec; |
| 573 | /* number of Tclas elements */ |
| 574 | uint8_t numTclas; |
| 575 | tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM]; |
| 576 | uint8_t tclasProc; |
| 577 | /* tclassProc is valid only if this is set to 1. */ |
| 578 | uint8_t tclasProcPresent:1; |
| 579 | } cdf_packed tLimTspecInfo, *tpLimTspecInfo; |
| 580 | |
| 581 | typedef struct sLimAdmitPolicyInfo { |
| 582 | /* admit control policy type */ |
| 583 | uint8_t type; |
| 584 | /* oversubscription factor : 0 means nothing is allowed */ |
| 585 | uint8_t bw_factor; |
| 586 | /* valid only when 'type' is set BW_FACTOR */ |
| 587 | } tLimAdmitPolicyInfo, *tpLimAdmitPolicyInfo; |
| 588 | |
| 589 | typedef enum eLimWscEnrollState { |
| 590 | eLIM_WSC_ENROLL_NOOP, |
| 591 | eLIM_WSC_ENROLL_BEGIN, |
| 592 | eLIM_WSC_ENROLL_IN_PROGRESS, |
| 593 | eLIM_WSC_ENROLL_END |
| 594 | } tLimWscEnrollState; |
| 595 | |
| 596 | #define WSC_PASSWD_ID_PUSH_BUTTON (0x0004) |
| 597 | |
| 598 | typedef struct sLimWscIeInfo { |
| 599 | bool apSetupLocked; |
| 600 | bool selectedRegistrar; |
| 601 | uint16_t selectedRegistrarConfigMethods; |
| 602 | tLimWscEnrollState wscEnrollmentState; |
| 603 | tLimWscEnrollState probeRespWscEnrollmentState; |
| 604 | uint8_t reqType; |
| 605 | uint8_t respType; |
| 606 | } tLimWscIeInfo, *tpLimWscIeInfo; |
| 607 | |
| 608 | /* maximum number of tspec's supported */ |
| 609 | #define LIM_NUM_TSPEC_MAX 15 |
| 610 | |
| 611 | /* structure to hold all 11h specific data */ |
| 612 | typedef struct sLimSpecMgmtInfo { |
| 613 | tLimQuietStates quietState; |
| 614 | uint32_t quietCount; |
| 615 | /* This is in units of system TICKS */ |
| 616 | uint32_t quietDuration; |
| 617 | /* This is in units of TU, for over the air transmission */ |
| 618 | uint32_t quietDuration_TU; |
| 619 | /* After this timeout, actual quiet starts */ |
| 620 | uint32_t quietTimeoutValue; |
| 621 | /* Used on AP, if quiet is enabled during learning */ |
| 622 | bool fQuietEnabled; |
| 623 | tLimDot11hChanSwStates dot11hChanSwState; |
| 624 | /* Radar detected in cur oper chan on AP */ |
| 625 | bool fRadarDetCurOperChan; |
| 626 | /* Whether radar interrupt has been configured */ |
| 627 | bool fRadarIntrConfigured; |
| 628 | } tLimSpecMgmtInfo, *tpLimSpecMgmtInfo; |
| 629 | |
| 630 | #ifdef FEATURE_WLAN_TDLS |
| 631 | /* |
| 632 | * Peer info needed for TDLS setup.. |
| 633 | */ |
| 634 | typedef struct tLimTDLSPeerSta { |
| 635 | struct tLimTDLSPeerSta *next; |
| 636 | uint8_t dialog; |
| 637 | tSirMacAddr peerMac; |
| 638 | tSirMacCapabilityInfo capabilityInfo; |
| 639 | tSirMacRateSet supportedRates; |
| 640 | tSirMacRateSet extendedRates; |
| 641 | tSirMacQosCapabilityStaIE qosCaps; |
| 642 | tSirMacEdcaParamSetIE edcaParams; |
| 643 | uint8_t mcsSet[SIZE_OF_SUPPORTED_MCS_SET]; |
| 644 | uint8_t tdls_bIsResponder; |
| 645 | /* HT Capabilties */ |
| 646 | tDot11fIEHTCaps tdlsPeerHTCaps; |
| 647 | tDot11fIEExtCap tdlsPeerExtCaps; |
| 648 | uint8_t tdls_flags; |
| 649 | uint8_t tdls_link_state; |
| 650 | uint8_t tdls_prev_link_state; |
| 651 | uint8_t tdls_sessionId; |
| 652 | uint8_t ExtRatesPresent; |
| 653 | TX_TIMER gLimTdlsLinkSetupRspTimeoutTimer; |
| 654 | TX_TIMER gLimTdlsLinkSetupCnfTimeoutTimer; |
| 655 | } tLimTdlsLinkSetupPeer, *tpLimTdlsLinkSetupPeer; |
| 656 | |
| 657 | typedef struct tLimTdlsLinkSetupInfo { |
| 658 | tLimTdlsLinkSetupPeer *tdlsLinkSetupList; |
| 659 | uint8_t num_tdls_peers; |
| 660 | uint8_t tdls_flags; |
| 661 | uint8_t tdls_state; |
| 662 | uint8_t tdls_prev_state; |
| 663 | } tLimTdlsLinkSetupInfo, *tpLimTdlsLinkSetupInfo; |
| 664 | |
| 665 | typedef enum tdlsLinkMode { |
| 666 | TDLS_LINK_MODE_BG, |
| 667 | TDLS_LINK_MODE_N, |
| 668 | TDLS_LINK_MODE_AC, |
| 669 | TDLS_LINK_MODE_NONE |
| 670 | } eLimTdlsLinkMode; |
| 671 | #endif /* FEATURE_WLAN_TDLS */ |
| 672 | |
| 673 | #endif |