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