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