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