Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 2 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [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 | * Airgo Networks, Inc proprietary. All rights reserved. |
| 24 | * This file limTypes.h contains the definitions used by all |
| 25 | * all LIM modules. |
| 26 | * Author: Chandra Modumudi |
| 27 | * Date: 02/11/02 |
| 28 | * History:- |
| 29 | * Date Modified by Modification Information |
| 30 | * -------------------------------------------------------------------- |
| 31 | * |
| 32 | */ |
| 33 | #ifndef __LIM_TYPES_H |
| 34 | #define __LIM_TYPES_H |
| 35 | |
| 36 | #include "wniApi.h" |
| 37 | #include "sirApi.h" |
| 38 | #include "sirCommon.h" |
| 39 | #include "sirMacProtDef.h" |
| 40 | #include "utilsApi.h" |
| 41 | |
| 42 | #ifdef FEATURE_WLAN_NON_INTEGRATED_SOC |
| 43 | #include "halCommonApi.h" |
| 44 | #endif |
| 45 | #ifdef FEATURE_WLAN_INTEGRATED_SOC |
| 46 | #include "wlan_qct_wdi_ds.h" |
| 47 | #endif |
| 48 | |
| 49 | #include "limApi.h" |
| 50 | #include "limDebug.h" |
| 51 | #include "limSendSmeRspMessages.h" |
| 52 | #include "sysGlobal.h" |
| 53 | #include "dphGlobal.h" |
| 54 | #include "parserApi.h" |
| 55 | |
| 56 | #define LINK_TEST_DEFER 1 |
| 57 | |
| 58 | #define TRACE_EVENT_CNF_TIMER_DEACT 0x6600 |
| 59 | #define TRACE_EVENT_CNF_TIMER_ACT 0x6601 |
| 60 | #define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602 |
| 61 | #define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603 |
| 62 | |
| 63 | // MLM message types |
| 64 | #define LIM_MLM_MSG_START 1000 |
| 65 | #define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START |
| 66 | #define LIM_MLM_SCAN_CNF LIM_MLM_MSG_START + 1 |
| 67 | #define LIM_MLM_START_REQ LIM_MLM_MSG_START + 2 |
| 68 | #define LIM_MLM_START_CNF LIM_MLM_MSG_START + 3 |
| 69 | #define LIM_MLM_JOIN_REQ LIM_MLM_MSG_START + 4 |
| 70 | #define LIM_MLM_JOIN_CNF LIM_MLM_MSG_START + 5 |
| 71 | #define LIM_MLM_AUTH_REQ LIM_MLM_MSG_START + 6 |
| 72 | #define LIM_MLM_AUTH_CNF LIM_MLM_MSG_START + 7 |
| 73 | #define LIM_MLM_AUTH_IND LIM_MLM_MSG_START + 8 |
| 74 | #define LIM_MLM_ASSOC_REQ LIM_MLM_MSG_START + 9 |
| 75 | #define LIM_MLM_ASSOC_CNF LIM_MLM_MSG_START + 10 |
| 76 | #define LIM_MLM_ASSOC_IND LIM_MLM_MSG_START + 11 |
| 77 | #define LIM_MLM_DISASSOC_REQ LIM_MLM_MSG_START + 12 |
| 78 | #define LIM_MLM_DISASSOC_CNF LIM_MLM_MSG_START + 13 |
| 79 | #define LIM_MLM_DISASSOC_IND LIM_MLM_MSG_START + 14 |
| 80 | #define LIM_MLM_REASSOC_REQ LIM_MLM_MSG_START + 15 |
| 81 | #define LIM_MLM_REASSOC_CNF LIM_MLM_MSG_START + 16 |
| 82 | #define LIM_MLM_REASSOC_IND LIM_MLM_MSG_START + 17 |
| 83 | #define LIM_MLM_DEAUTH_REQ LIM_MLM_MSG_START + 18 |
| 84 | #define LIM_MLM_DEAUTH_CNF LIM_MLM_MSG_START + 19 |
| 85 | #define LIM_MLM_DEAUTH_IND LIM_MLM_MSG_START + 20 |
| 86 | #define LIM_MLM_TSPEC_REQ LIM_MLM_MSG_START + 21 |
| 87 | #define LIM_MLM_TSPEC_CNF LIM_MLM_MSG_START + 22 |
| 88 | #define LIM_MLM_TSPEC_IND LIM_MLM_MSG_START + 23 |
| 89 | #define LIM_MLM_SETKEYS_REQ LIM_MLM_MSG_START + 24 |
| 90 | #define LIM_MLM_SETKEYS_CNF LIM_MLM_MSG_START + 25 |
| 91 | #define LIM_MLM_LINK_TEST_STOP_REQ LIM_MLM_MSG_START + 30 |
| 92 | #define LIM_MLM_PURGE_STA_IND LIM_MLM_MSG_START + 31 |
| 93 | #define LIM_MLM_ADDBA_REQ LIM_MLM_MSG_START + 32 |
| 94 | #define LIM_MLM_ADDBA_CNF LIM_MLM_MSG_START + 33 |
| 95 | #define LIM_MLM_ADDBA_IND LIM_MLM_MSG_START + 34 |
| 96 | #define LIM_MLM_ADDBA_RSP LIM_MLM_MSG_START + 35 |
| 97 | #define LIM_MLM_DELBA_REQ LIM_MLM_MSG_START + 36 |
| 98 | #define LIM_MLM_DELBA_CNF LIM_MLM_MSG_START + 37 |
| 99 | #define LIM_MLM_DELBA_IND LIM_MLM_MSG_START + 38 |
| 100 | #define LIM_MLM_REMOVEKEY_REQ LIM_MLM_MSG_START + 39 |
| 101 | #define LIM_MLM_REMOVEKEY_CNF LIM_MLM_MSG_START + 40 |
| 102 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 103 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 104 | #define LIM_MLM_OEM_DATA_REQ LIM_MLM_MSG_START + 41 |
| 105 | #define LIM_MLM_OEM_DATA_CNF LIM_MLM_MSG_START + 42 |
| 106 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 107 | |
| 108 | #define LIM_HASH_ADD 0 |
| 109 | #define LIM_HASH_UPDATE 1 |
| 110 | |
| 111 | #define LIM_WEP_IN_FC 1 |
| 112 | #define LIM_NO_WEP_IN_FC 0 |
| 113 | |
| 114 | #define LIM_DECRYPT_ICV_FAIL 1 |
| 115 | |
| 116 | /// Definitions to distinquish between Association/Reassociaton |
| 117 | #define LIM_ASSOC 0 |
| 118 | #define LIM_REASSOC 1 |
| 119 | |
| 120 | /// Minimum Memory blocks require for different scenario |
| 121 | #define LIM_MIN_MEM_ASSOC 4 |
| 122 | |
| 123 | /// Verifies whether given mac addr matches the CURRENT Bssid |
| 124 | #define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (palEqualMemory(pMac->hHdd, addr, \ |
| 125 | psessionEntry->bssId, \ |
| 126 | sizeof(psessionEntry->bssId))) |
| 127 | /// Verifies whether given addr matches the REASSOC Bssid |
| 128 | #define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (palEqualMemory(pMac->hHdd, addr, \ |
| 129 | psessionEntry->limReAssocbssId, \ |
| 130 | sizeof(psessionEntry->limReAssocbssId))) |
| 131 | |
| 132 | #define REQ_TYPE_REGISTRAR (0x2) |
| 133 | #define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3) |
| 134 | |
| 135 | #define RESP_TYPE_REGISTRAR (0x2) |
| 136 | #define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0) |
| 137 | #define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1) |
| 138 | #define RESP_TYPE_AP (0x3) |
| 139 | #define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300 |
| 140 | |
| 141 | |
| 142 | // enums used by LIM are as follows |
| 143 | |
| 144 | enum eLimDisassocTrigger |
| 145 | { |
| 146 | eLIM_HOST_DISASSOC, |
| 147 | eLIM_PEER_ENTITY_DISASSOC, |
| 148 | eLIM_LINK_MONITORING_DISASSOC, |
| 149 | eLIM_PROMISCUOUS_MODE_DISASSOC, |
| 150 | eLIM_HOST_DEAUTH, |
| 151 | eLIM_PEER_ENTITY_DEAUTH, |
| 152 | eLIM_LINK_MONITORING_DEAUTH, |
| 153 | eLIM_JOIN_FAILURE, |
| 154 | eLIM_REASSOC_REJECT |
| 155 | }; |
| 156 | |
| 157 | /* Reason code to determine the channel change context while sending |
| 158 | * WDA_CHNL_SWITCH_REQ message to HAL |
| 159 | */ |
| 160 | enum eChannelChangeReasonCodes |
| 161 | { |
| 162 | LIM_SWITCH_CHANNEL_REASSOC, |
| 163 | LIM_SWITCH_CHANNEL_JOIN, |
| 164 | LIM_SWITCH_CHANNEL_OPERATION, // Generic change channel |
| 165 | }; |
| 166 | |
| 167 | typedef struct sLimAuthRspTimeout |
| 168 | { |
| 169 | tSirMacAddr peerMacAddr; |
| 170 | } tLimAuthRspTimeout; |
| 171 | |
| 172 | typedef struct sLimMlmStartReq |
| 173 | { |
| 174 | tSirMacSSid ssId; |
| 175 | tSirBssType bssType; |
| 176 | tSirMacAddr bssId; |
| 177 | tSirMacBeaconInterval beaconPeriod; |
| 178 | tANI_U8 dtimPeriod; |
| 179 | tSirMacCfParamSet cfParamSet; |
| 180 | tSirMacChanNum channelNumber; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 181 | ePhyChanBondState cbMode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 182 | tANI_U16 atimWindow; |
| 183 | tSirMacRateSet rateSet; |
| 184 | tANI_U8 sessionId; //Added For BT-AMP Support |
| 185 | |
| 186 | // Parameters reqd for new HAL (message) interface |
| 187 | tSirNwType nwType; |
| 188 | tANI_U8 htCapable; |
| 189 | tSirMacHTOperatingMode htOperMode; |
| 190 | tANI_U8 dualCTSProtection; |
| 191 | tANI_U8 txChannelWidthSet; |
| 192 | #ifdef WLAN_SOFTAP_FEATURE |
| 193 | tANI_U8 ssidHidden; |
| 194 | tANI_U8 wps_state; |
| 195 | tANI_U8 obssProtEnabled; |
| 196 | #endif |
| 197 | } tLimMlmStartReq, *tpLimMlmStartReq; |
| 198 | |
| 199 | typedef struct sLimMlmStartCnf |
| 200 | { |
| 201 | tSirResultCodes resultCode; |
| 202 | tANI_U8 sessionId; |
| 203 | } tLimMlmStartCnf, *tpLimMlmStartCnf; |
| 204 | |
| 205 | typedef struct sLimMlmScanCnf |
| 206 | { |
| 207 | tSirResultCodes resultCode; |
| 208 | tANI_U16 scanResultLength; |
| 209 | tSirBssDescription bssDescription[1]; |
| 210 | tANI_U8 sessionId; |
| 211 | } tLimMlmScanCnf, *tpLimMlmScanCnf; |
| 212 | |
| 213 | typedef struct sLimScanResult |
| 214 | { |
| 215 | tANI_U16 numBssDescriptions; |
| 216 | tSirBssDescription bssDescription[1]; |
| 217 | } tLimScanResult; |
| 218 | |
| 219 | typedef struct sLimMlmJoinCnf |
| 220 | { |
| 221 | tSirResultCodes resultCode; |
| 222 | tANI_U16 protStatusCode; |
| 223 | tANI_U8 sessionId; |
| 224 | } tLimMlmJoinCnf, *tpLimMlmJoinCnf; |
| 225 | |
| 226 | typedef struct sLimMlmAssocReq |
| 227 | { |
| 228 | tSirMacAddr peerMacAddr; |
| 229 | tANI_U32 assocFailureTimeout; |
| 230 | tANI_U16 capabilityInfo; |
| 231 | tSirMacListenInterval listenInterval; |
| 232 | tANI_U8 sessionId; |
| 233 | } tLimMlmAssocReq, *tpLimMlmAssocReq; |
| 234 | |
| 235 | typedef struct sLimMlmAssocCnf |
| 236 | { |
| 237 | tSirResultCodes resultCode; //Internal status code. |
| 238 | tANI_U16 protStatusCode; //Protocol Status code. |
| 239 | tANI_U8 sessionId; |
| 240 | } tLimMlmAssocCnf, *tpLimMlmAssocCnf; |
| 241 | |
| 242 | typedef struct sLimMlmAssocInd |
| 243 | { |
| 244 | tSirMacAddr peerMacAddr; |
| 245 | tANI_U16 aid; |
| 246 | tAniAuthType authType; |
| 247 | tAniSSID ssId; |
| 248 | tSirRSNie rsnIE; |
| 249 | tSirAddie addIE; // additional IE recevied from the peer, which possibly includes WSC IE and/or P2P IE. |
| 250 | tSirMacCapabilityInfo capabilityInfo; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 251 | tAniBool spectrumMgtIndicator; |
| 252 | tSirMacPowerCapInfo powerCap; |
| 253 | tSirSupChnl supportedChannels; |
| 254 | tANI_U8 sessionId; |
| 255 | |
| 256 | |
| 257 | #ifdef WLAN_SOFTAP_FEATURE |
| 258 | tAniBool WmmStaInfoPresent; |
| 259 | #endif |
| 260 | |
| 261 | #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) |
| 262 | tANI_U16 seqNum; |
| 263 | tAniBool wniIndicator; |
| 264 | tAniBool bpIndicator; |
| 265 | tSirBpIndicatorType bpType; |
| 266 | tSirNwType nwType; |
| 267 | tSirAssocType assocType; // Indicates whether STA is LB'ed or not |
| 268 | tSirLoad load; // Current load on the radio for LB |
| 269 | tANI_U32 numBss; // List received from STA |
| 270 | tSirNeighborBssInfo neighborList[1]; // List received from STA |
| 271 | #endif |
| 272 | // Required for indicating the frames to upper layer |
| 273 | tANI_U32 beaconLength; |
| 274 | tANI_U8* beaconPtr; |
| 275 | tANI_U32 assocReqLength; |
| 276 | tANI_U8* assocReqPtr; |
| 277 | } tLimMlmAssocInd, *tpLimMlmAssocInd; |
| 278 | |
| 279 | typedef struct sLimMlmReassocReq |
| 280 | { |
| 281 | tSirMacAddr peerMacAddr; |
| 282 | tANI_U32 reassocFailureTimeout; |
| 283 | tANI_U16 capabilityInfo; |
| 284 | tSirMacListenInterval listenInterval; |
| 285 | tANI_U8 sessionId; |
| 286 | } tLimMlmReassocReq, *tpLimMlmReassocReq; |
| 287 | |
| 288 | typedef struct sLimMlmReassocCnf |
| 289 | { |
| 290 | tSirResultCodes resultCode; |
| 291 | tANI_U16 protStatusCode; //Protocol Status code. |
| 292 | tANI_U8 sessionId; |
| 293 | } tLimMlmReassocCnf, *tpLimMlmReassocCnf; |
| 294 | |
| 295 | typedef struct sLimMlmReassocInd |
| 296 | { |
| 297 | tSirMacAddr peerMacAddr; |
| 298 | tSirMacAddr currentApAddr; |
| 299 | tANI_U16 aid; |
| 300 | tAniAuthType authType; |
| 301 | tAniSSID ssId; |
| 302 | tSirRSNie rsnIE; |
| 303 | tSirAddie addIE; // additional IE recevied from the peer, which can be WSC IE and/or P2P IE. |
| 304 | tSirMacCapabilityInfo capabilityInfo; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 305 | tAniBool spectrumMgtIndicator; |
| 306 | tSirMacPowerCapInfo powerCap; |
| 307 | tSirSupChnl supportedChannels; |
| 308 | |
| 309 | #ifdef WLAN_SOFTAP_FEATURE |
| 310 | tAniBool WmmStaInfoPresent; |
| 311 | #endif |
| 312 | |
| 313 | #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) |
| 314 | tANI_U16 seqNum; |
| 315 | tAniBool wniIndicator; |
| 316 | tAniBool bpIndicator; |
| 317 | tSirBpIndicatorType bpType; |
| 318 | tSirNwType nwType; |
| 319 | tSirAssocType reassocType; // Indicates whether STA is LB'ed or not |
| 320 | tSirLoad load; // Current load on the radio for LB |
| 321 | tANI_U32 numBss; // List received from STA |
| 322 | tSirNeighborBssInfo neighborList[1]; // List received from STA |
| 323 | #endif |
| 324 | // Required for indicating the frames to upper layer |
| 325 | tANI_U32 beaconLength; |
| 326 | tANI_U8* beaconPtr; |
| 327 | tANI_U32 assocReqLength; |
| 328 | tANI_U8* assocReqPtr; |
| 329 | } tLimMlmReassocInd, *tpLimMlmReassocInd; |
| 330 | |
| 331 | typedef struct sLimMlmAuthCnf |
| 332 | { |
| 333 | tSirMacAddr peerMacAddr; |
| 334 | tAniAuthType authType; |
| 335 | tSirResultCodes resultCode; |
| 336 | tANI_U16 protStatusCode; |
| 337 | tANI_U8 sessionId; |
| 338 | } tLimMlmAuthCnf, *tpLimMlmAuthCnf; |
| 339 | |
| 340 | typedef struct sLimMlmAuthInd |
| 341 | { |
| 342 | tSirMacAddr peerMacAddr; |
| 343 | tAniAuthType authType; |
| 344 | tANI_U8 sessionId; |
| 345 | } tLimMlmAuthInd, *tpLimMlmAuthInd; |
| 346 | |
| 347 | typedef struct sLimMlmDeauthReq |
| 348 | { |
| 349 | tSirMacAddr peerMacAddr; |
| 350 | tANI_U16 reasonCode; |
| 351 | tANI_U16 deauthTrigger; |
| 352 | tANI_U16 aid; |
| 353 | tANI_U8 sessionId; //Added for BT-AMP SUPPORT |
| 354 | |
| 355 | } tLimMlmDeauthReq, *tpLimMlmDeauthReq; |
| 356 | |
| 357 | typedef struct sLimMlmDeauthCnf |
| 358 | { |
| 359 | tSirMacAddr peerMacAddr; |
| 360 | tSirResultCodes resultCode; |
| 361 | tANI_U16 deauthTrigger; |
| 362 | tANI_U16 aid; |
| 363 | tANI_U8 sessionId; |
| 364 | } tLimMlmDeauthCnf, *tpLimMLmDeauthCnf; |
| 365 | |
| 366 | typedef struct sLimMlmDeauthInd |
| 367 | { |
| 368 | tSirMacAddr peerMacAddr; |
| 369 | tANI_U16 reasonCode; |
| 370 | tANI_U16 deauthTrigger; |
| 371 | tANI_U16 aid; |
| 372 | } tLimMlmDeauthInd, *tpLimMlmDeauthInd; |
| 373 | |
| 374 | typedef struct sLimMlmDisassocReq |
| 375 | { |
| 376 | tSirMacAddr peerMacAddr; |
| 377 | tANI_U16 reasonCode; |
| 378 | tANI_U16 disassocTrigger; |
| 379 | tANI_U16 aid; |
| 380 | tANI_U8 sessionId; |
| 381 | } tLimMlmDisassocReq, *tpLimMlmDisassocReq; |
| 382 | |
| 383 | typedef struct sLimMlmDisassocCnf |
| 384 | { |
| 385 | tSirMacAddr peerMacAddr; |
| 386 | tSirResultCodes resultCode; |
| 387 | tANI_U16 disassocTrigger; |
| 388 | tANI_U16 aid; |
| 389 | tANI_U8 sessionId; |
| 390 | } tLimMlmDisassocCnf, *tpLimMlmDisassocCnf; |
| 391 | |
| 392 | typedef struct sLimMlmDisassocInd |
| 393 | { |
| 394 | tSirMacAddr peerMacAddr; |
| 395 | tANI_U16 reasonCode; |
| 396 | tANI_U16 disassocTrigger; |
| 397 | tANI_U16 aid; |
| 398 | tANI_U8 sessionId; |
| 399 | } tLimMlmDisassocInd, *tpLimMlmDisassocInd; |
| 400 | |
| 401 | typedef struct sLimMlmPurgeStaReq |
| 402 | { |
| 403 | tSirMacAddr peerMacAddr; |
| 404 | tANI_U16 aid; |
| 405 | tANI_U8 sessionId;//Added For BT-AMP Support |
| 406 | } tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq; |
| 407 | |
| 408 | typedef struct sLimMlmPurgeStaInd |
| 409 | { |
| 410 | tSirMacAddr peerMacAddr; |
| 411 | tANI_U16 reasonCode; |
| 412 | tANI_U16 purgeTrigger; |
| 413 | tANI_U16 aid; |
| 414 | tANI_U8 sessionId; |
| 415 | } tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd; |
| 416 | |
| 417 | typedef struct sLimMlmSetKeysReq |
| 418 | { |
| 419 | tSirMacAddr peerMacAddr; |
| 420 | tANI_U8 sessionId; //Added For BT-AMP Support |
| 421 | tANI_U16 aid; |
| 422 | tAniEdType edType; // Encryption/Decryption type |
| 423 | tANI_U8 numKeys; |
| 424 | tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; |
| 425 | } tLimMlmSetKeysReq, *tpLimMlmSetKeysReq; |
| 426 | |
| 427 | typedef struct sLimMlmSetKeysCnf |
| 428 | { |
| 429 | tSirMacAddr peerMacAddr; |
| 430 | tANI_U16 resultCode; |
| 431 | tANI_U16 aid; |
| 432 | tANI_U8 sessionId; |
| 433 | } tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf; |
| 434 | |
| 435 | typedef struct sLimMlmRemoveKeyReq |
| 436 | { |
| 437 | tSirMacAddr peerMacAddr; |
| 438 | tANI_U8 sessionId; //Added FOr BT-AMP Support |
| 439 | tAniEdType edType; // Encryption/Decryption type |
| 440 | tANI_U8 wepType; //STATIC / DYNAMIC specifier |
| 441 | tANI_U8 keyId; //Key Id To be removed. |
| 442 | tANI_BOOLEAN unicast; |
| 443 | } tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq; |
| 444 | |
| 445 | typedef struct sLimMlmRemoveKeyCnf |
| 446 | { |
| 447 | tSirMacAddr peerMacAddr; |
| 448 | tANI_U16 resultCode; |
| 449 | tANI_U8 sessionId; |
| 450 | } tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf; |
| 451 | |
| 452 | |
| 453 | typedef struct sLimMlmResetReq |
| 454 | { |
| 455 | tSirMacAddr macAddr; |
| 456 | tANI_U8 performCleanup; |
| 457 | tANI_U8 sessionId; |
| 458 | } tLimMlmResetReq, *tpLimMlmResetReq; |
| 459 | |
| 460 | typedef struct sLimMlmResetCnf |
| 461 | { |
| 462 | tSirMacAddr macAddr; |
| 463 | tSirResultCodes resultCode; |
| 464 | tANI_U8 sessionId; |
| 465 | } tLimMlmResetCnf, *tpLimMlmResetCnf; |
| 466 | |
| 467 | |
| 468 | typedef struct sLimMlmLinkTestStopReq |
| 469 | { |
| 470 | tSirMacAddr peerMacAddr; |
| 471 | tANI_U8 sessionId; |
| 472 | #ifdef ANI_PRODUCT_TYPE_AP |
| 473 | tANI_U16 aid; |
| 474 | #endif |
| 475 | } tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq; |
| 476 | |
| 477 | |
| 478 | // |
| 479 | // Block ACK related MLME data structures |
| 480 | // |
| 481 | |
| 482 | typedef struct sLimMlmAddBAReq |
| 483 | { |
| 484 | |
| 485 | // ADDBA recipient |
| 486 | tSirMacAddr peerMacAddr; |
| 487 | |
| 488 | // ADDBA Action Frame dialog token |
| 489 | tANI_U8 baDialogToken; |
| 490 | |
| 491 | // ADDBA requested for TID |
| 492 | tANI_U8 baTID; |
| 493 | |
| 494 | // BA policy |
| 495 | // 0 - Delayed BA (Not supported) |
| 496 | // 1 - Immediate BA |
| 497 | tANI_U8 baPolicy; |
| 498 | |
| 499 | // BA buffer size - (0..127) max size MSDU's |
| 500 | tANI_U16 baBufferSize; |
| 501 | |
| 502 | // BA timeout in TU's |
| 503 | // 0 means no timeout will occur |
| 504 | tANI_U16 baTimeout; |
| 505 | |
| 506 | // ADDBA failure timeout in TU's |
| 507 | // Greater than or equal to 1 |
| 508 | tANI_U16 addBAFailureTimeout; |
| 509 | |
| 510 | // BA Starting Sequence Number |
| 511 | tANI_U16 baSSN; |
| 512 | |
| 513 | tANI_U8 sessionId; |
| 514 | |
| 515 | } tLimMlmAddBAReq, *tpLimMlmAddBAReq; |
| 516 | |
| 517 | typedef struct sLimMlmAddBACnf |
| 518 | { |
| 519 | |
| 520 | // ADDBA recipient |
| 521 | tSirMacAddr peerMacAddr; |
| 522 | |
| 523 | // ADDBA Action Frame dialog token |
| 524 | tANI_U8 baDialogToken; |
| 525 | |
| 526 | // ADDBA requested for TID |
| 527 | tANI_U8 baTID; |
| 528 | |
| 529 | // BA status code |
| 530 | tSirMacStatusCodes addBAResultCode; |
| 531 | |
| 532 | // BA policy |
| 533 | // 0 - Delayed BA (Not supported) |
| 534 | // 1 - Immediate BA |
| 535 | tANI_U8 baPolicy; |
| 536 | |
| 537 | // BA buffer size - (0..127) max size MSDU's |
| 538 | tANI_U16 baBufferSize; |
| 539 | |
| 540 | // BA timeout in TU's |
| 541 | // 0 means no timeout will occur |
| 542 | tANI_U16 baTimeout; |
| 543 | |
| 544 | // ADDBA direction |
| 545 | // 1 - Originator |
| 546 | // 0 - Recipient |
| 547 | tANI_U8 baDirection; |
| 548 | tANI_U8 sessionId; |
| 549 | |
| 550 | |
| 551 | } tLimMlmAddBACnf, *tpLimMlmAddBACnf; |
| 552 | |
| 553 | typedef struct sLimMlmAddBAInd |
| 554 | { |
| 555 | |
| 556 | // ADDBA recipient |
| 557 | tSirMacAddr peerMacAddr; |
| 558 | |
| 559 | // ADDBA Action Frame dialog token |
| 560 | tANI_U8 baDialogToken; |
| 561 | |
| 562 | // ADDBA requested for TID |
| 563 | tANI_U8 baTID; |
| 564 | |
| 565 | // BA policy |
| 566 | // 0 - Delayed BA (Not supported) |
| 567 | // 1 - Immediate BA |
| 568 | tANI_U8 baPolicy; |
| 569 | |
| 570 | // BA buffer size - (0..127) max size MSDU's |
| 571 | tANI_U16 baBufferSize; |
| 572 | |
| 573 | // BA timeout in TU's |
| 574 | // 0 means no timeout will occur |
| 575 | tANI_U16 baTimeout; |
| 576 | |
| 577 | } tLimMlmAddBAInd, *tpLimMlmAddBAInd; |
| 578 | |
| 579 | typedef struct sLimMlmAddBARsp |
| 580 | { |
| 581 | |
| 582 | // ADDBA recipient |
| 583 | tSirMacAddr peerMacAddr; |
| 584 | |
| 585 | // ADDBA Action Frame dialog token |
| 586 | tANI_U8 baDialogToken; |
| 587 | |
| 588 | // ADDBA requested for TID |
| 589 | tANI_U8 baTID; |
| 590 | |
| 591 | // BA status code |
| 592 | tSirMacStatusCodes addBAResultCode; |
| 593 | |
| 594 | // BA policy |
| 595 | // 0 - Delayed BA (Not supported) |
| 596 | // 1 - Immediate BA |
| 597 | tANI_U8 baPolicy; |
| 598 | |
| 599 | // BA buffer size - (0..127) max size MSDU's |
| 600 | tANI_U16 baBufferSize; |
| 601 | |
| 602 | // BA timeout in TU's |
| 603 | // 0 means no timeout will occur |
| 604 | tANI_U16 baTimeout; |
| 605 | |
| 606 | //reserved for alignment |
| 607 | tANI_U8 rsvd[2]; |
| 608 | |
| 609 | /* PE session id*/ |
| 610 | tANI_U8 sessionId; |
| 611 | |
| 612 | } tLimMlmAddBARsp, *tpLimMlmAddBARsp; |
| 613 | |
| 614 | // |
| 615 | // NOTE - Overloading DELBA IND and DELBA CNF |
| 616 | // to use the same data structure as DELBA REQ |
| 617 | // as the parameters do not vary too much. |
| 618 | // |
| 619 | typedef struct sLimMlmDelBAReq |
| 620 | { |
| 621 | |
| 622 | // ADDBA recipient |
| 623 | tSirMacAddr peerMacAddr; |
| 624 | |
| 625 | // DELBA direction |
| 626 | // 1 - Originator |
| 627 | // 0 - Recipient |
| 628 | tANI_U8 baDirection; |
| 629 | |
| 630 | // DELBA requested for TID |
| 631 | tANI_U8 baTID; |
| 632 | |
| 633 | // DELBA reason code |
| 634 | tSirMacReasonCodes delBAReasonCode; |
| 635 | |
| 636 | tANI_U8 sessionId; |
| 637 | |
| 638 | } tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf; |
| 639 | |
| 640 | // Function templates |
| 641 | |
| 642 | tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ); |
| 643 | void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ); |
| 644 | void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *); |
| 645 | void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *); |
| 646 | void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession); |
| 647 | |
| 648 | void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data); |
| 649 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 650 | // Function to handle HT and HT IE CFG parameter intializations |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 651 | void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 652 | |
| 653 | // Function to handle CFG parameter updates |
| 654 | void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32); |
| 655 | |
| 656 | // Function to apply CFG parameters before join/reassoc/start BSS |
| 657 | void limApplyConfiguration(tpAniSirGlobal,tpPESession); |
| 658 | |
| 659 | #ifdef WLAN_SOFTAP_FEATURE |
| 660 | void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry); |
| 661 | #else |
| 662 | void limSetCfgProtection(tpAniSirGlobal pMac); |
| 663 | #endif |
| 664 | |
| 665 | |
| 666 | // Function to Initialize MLM state machine on STA |
| 667 | void limInitMlm(tpAniSirGlobal); |
| 668 | |
| 669 | // Function to cleanup MLM state machine |
| 670 | void limCleanupMlm(tpAniSirGlobal); |
| 671 | |
| 672 | // Function to cleanup LMM state machine |
| 673 | void limCleanupLmm(tpAniSirGlobal); |
| 674 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 675 | // Management frame handling functions |
| 676 | void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 677 | void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *); |
| 678 | void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession); |
| 679 | void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession); |
| 680 | void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *); |
| 681 | void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 682 | |
| 683 | |
| 684 | // Process Auth frame when we have a session in progress. |
| 685 | void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 686 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 687 | int limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body); |
| 688 | #endif |
| 689 | |
| 690 | void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession); |
| 691 | void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry); |
| 692 | |
| 693 | |
| 694 | void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession); |
| 695 | void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 696 | void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 697 | void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 698 | #if defined WLAN_FEATURE_P2P |
| 699 | void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo); |
| 700 | #endif |
| 701 | |
| 702 | |
| 703 | tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr); |
| 704 | tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *); |
| 705 | void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8); |
| 706 | void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr, tANI_U8,tpPESession); |
| 707 | void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession); |
| 708 | void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession); |
| 709 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 710 | void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac, |
| 711 | tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry); |
| 712 | #endif |
| 713 | void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer, |
| 714 | tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo, |
| 715 | tSirMacTspecIE *pTspecIe, tpPESession psessionEntry); |
| 716 | void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, |
| 717 | tSirAddtsReqInfo *addts,tpPESession); |
| 718 | void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, |
| 719 | tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession); |
| 720 | |
| 721 | #ifdef ANI_PRODUCT_TYPE_AP |
| 722 | void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession); |
| 723 | #endif |
| 724 | void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession); |
| 725 | |
| 726 | void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode); |
| 727 | void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr,tpPESession); |
| 728 | void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr,tpPESession); |
| 729 | |
| 730 | void limContinueChannelScan(tpAniSirGlobal); |
| 731 | tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry); |
| 732 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 733 | #if 1 //(WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP) |
| 734 | tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 735 | #endif |
| 736 | |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame^] | 737 | #ifdef WLAN_FEATURE_11AC |
| 738 | tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry ); |
| 739 | #endif |
| 740 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 741 | #if defined WLAN_FEATURE_VOWIFI |
| 742 | tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession); |
| 743 | tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession ); |
| 744 | tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession); |
| 745 | #endif |
| 746 | |
| 747 | #ifdef FEATURE_WLAN_CCX |
| 748 | void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); |
| 749 | #endif |
| 750 | |
| 751 | // Algorithms & Link Monitoring related functions |
| 752 | tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal); |
| 753 | void limTriggerBackgroundScan(tpAniSirGlobal); |
| 754 | void limAbortBackgroundScan(tpAniSirGlobal); |
| 755 | |
| 756 | /// Function that handles heartbeat failure |
| 757 | void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession); |
| 758 | |
| 759 | /// Function that triggers link tear down with AP upon HB failure |
| 760 | void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes); |
| 761 | |
| 762 | #ifdef ANI_PRODUCT_TYPE_AP |
| 763 | /// Function that performs periodic release of AIDs |
| 764 | void limReleaseAIDHandler(tpAniSirGlobal); |
| 765 | |
| 766 | /// Function that performs periodic cleanup of Pre-auth contexts |
| 767 | void limPreAuthClnupHandler(tpAniSirGlobal); |
| 768 | |
| 769 | /// Function that processes CF-poll response message from SCH |
| 770 | void limHandleCFpollRsp(tANI_U32); |
| 771 | |
| 772 | /// Function that processes PS-poll message from PMM |
| 773 | void limHandlePSpoll(tANI_U32); |
| 774 | #endif |
| 775 | |
| 776 | /// Function that sends keep alive message to peer(s) |
| 777 | void limSendKeepAliveToPeer(tpAniSirGlobal); |
| 778 | |
| 779 | /// Function that processes Max retries interrupt from TFP |
| 780 | void limHandleMaxRetriesInterrupt(tANI_U32); |
| 781 | |
| 782 | /// Function that processes messages deferred during Learn mode |
| 783 | void limProcessDeferredMessageQueue(tpAniSirGlobal); |
| 784 | |
| 785 | /// Function that defers the messages received |
| 786 | tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *); |
| 787 | |
| 788 | /// Function that sets system into scan mode |
| 789 | void limSetScanMode(tpAniSirGlobal pMac); |
| 790 | |
| 791 | /// Function that Switches the Channel and sets the CB Mode |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 792 | void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 793 | |
| 794 | /// Function that completes channel scan |
| 795 | void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes); |
| 796 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 797 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 798 | /// Funtion that sets system into meas mode for oem data req |
| 799 | void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data); |
| 800 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 801 | |
| 802 | #ifdef ANI_SUPPORT_11H |
| 803 | /// Function that sends Measurement Report action frame |
| 804 | tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr); |
| 805 | |
| 806 | /// Function that sends TPC Report action frame |
| 807 | tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr); |
| 808 | #endif |
| 809 | |
| 810 | /// Function that sends TPC Request action frame |
| 811 | void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr); |
| 812 | |
| 813 | // Function(s) to handle responses received from HAL |
| 814 | void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ); |
| 815 | void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry); |
| 816 | void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ); |
| 817 | void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 818 | void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry); |
| 819 | void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry); |
| 820 | void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry); |
| 821 | void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ); |
| 822 | void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ); |
| 823 | |
| 824 | |
| 825 | |
| 826 | #ifdef GEN4_SCAN |
| 827 | // Function to process WDA_INIT_SCAN_RSP message |
| 828 | void limProcessInitScanRsp(tpAniSirGlobal, void * ); |
| 829 | |
| 830 | // Function to process WDA_START_SCAN_RSP message |
| 831 | void limProcessStartScanRsp(tpAniSirGlobal, void * ); |
| 832 | |
| 833 | // Function to process WDA_END_SCAN_RSP message |
| 834 | void limProcessEndScanRsp(tpAniSirGlobal, void * ); |
| 835 | |
| 836 | // Function to process WDA_FINISH_SCAN_RSP message |
| 837 | void limProcessFinishScanRsp(tpAniSirGlobal, void * ); |
| 838 | |
| 839 | // Function to process WDA_SWITCH_CHANNEL_RSP message |
| 840 | void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * ); |
| 841 | |
| 842 | void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck); |
| 843 | void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState); |
| 844 | void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState); |
| 845 | void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState); |
| 846 | |
| 847 | void limContinuePostChannelScan(tpAniSirGlobal pMac); |
| 848 | void limContinueChannelLearn( tpAniSirGlobal ); |
| 849 | //WLAN_SUSPEND_LINK Related |
| 850 | tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac); |
| 851 | void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*); |
| 852 | void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*); |
| 853 | //end WLAN_SUSPEND_LINK Related |
| 854 | #endif // GEN4_SCAN |
| 855 | |
| 856 | tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac, |
| 857 | tpLimMlmAddBAReq pMlmAddBAReq,tpPESession); |
| 858 | |
| 859 | tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac, |
| 860 | tpLimMlmAddBARsp pMlmAddBARsp,tpPESession); |
| 861 | |
| 862 | tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac, |
| 863 | tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry); |
| 864 | #if 0 |
| 865 | tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac, |
| 866 | tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State ); |
| 867 | #endif |
| 868 | |
| 869 | void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac, |
| 870 | tpSirMsgQ limMsgQ ); |
| 871 | |
| 872 | void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac, |
| 873 | tpSirMsgQ limMsgQ ); |
| 874 | |
| 875 | void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ); |
| 876 | |
| 877 | void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac); |
| 878 | #ifdef WLAN_FEATURE_11W |
| 879 | //11w SA query request action frame handler |
| 880 | tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac, |
| 881 | tANI_U16 transId, tSirMacAddr peer,tpPESession psessionEntry); |
| 882 | #endif |
| 883 | // Inline functions |
| 884 | |
| 885 | /** |
| 886 | * limPostSmeMessage() |
| 887 | * |
| 888 | *FUNCTION: |
| 889 | * This function is called by limProcessMlmMessages(). In this |
| 890 | * function MLM sub-module invokes MLM ind/cnf primitives. |
| 891 | * |
| 892 | *LOGIC: |
| 893 | * Initially MLM makes an SME function call to invoke MLM ind/cnf |
| 894 | * primitive. In future this can be enhanced to 'post' messages to SME. |
| 895 | * |
| 896 | *ASSUMPTIONS: |
| 897 | * NA |
| 898 | * |
| 899 | *NOTE: |
| 900 | * NA |
| 901 | * |
| 902 | * @param pMac Pointer to Global MAC structure |
| 903 | * @param msgType Indicates the MLM primitive message type |
| 904 | * @param *pMsgBuf A pointer to the MLM message buffer |
| 905 | * |
| 906 | * @return None |
| 907 | */ |
| 908 | static inline void |
| 909 | limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf) |
| 910 | { |
| 911 | tSirMsgQ msg; |
| 912 | |
| 913 | if(pMsgBuf == NULL) |
| 914 | { |
| 915 | limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n")); |
| 916 | return; |
| 917 | } |
| 918 | |
| 919 | msg.type = (tANI_U16)msgType; |
| 920 | msg.bodyptr = pMsgBuf; |
| 921 | msg.bodyval = 0; |
| 922 | if (msgType > eWNI_SME_MSG_TYPES_BEGIN) |
| 923 | limProcessSmeReqMessages(pMac, &msg); |
| 924 | else |
| 925 | limProcessMlmRspMessages(pMac, msgType, pMsgBuf); |
| 926 | } /*** end limPostSmeMessage() ***/ |
| 927 | |
| 928 | /** |
| 929 | * limPostMlmMessage() |
| 930 | * |
| 931 | *FUNCTION: |
| 932 | * This function is called by limProcessSmeMessages(). In this |
| 933 | * function SME invokes MLME primitives. |
| 934 | * |
| 935 | *PARAMS: |
| 936 | * |
| 937 | *LOGIC: |
| 938 | * Initially SME makes an MLM function call to invoke MLM primitive. |
| 939 | * In future this can be enhanced to 'post' messages to MLM. |
| 940 | * |
| 941 | *ASSUMPTIONS: |
| 942 | * NA |
| 943 | * |
| 944 | *NOTE: |
| 945 | * NA |
| 946 | * |
| 947 | * @param pMac Pointer to Global MAC structure |
| 948 | * @param msgType Indicates the MLM primitive message type |
| 949 | * @param *pMsgBuf A pointer to the MLM message buffer |
| 950 | * |
| 951 | * @return None |
| 952 | */ |
| 953 | static inline void |
| 954 | limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf) |
| 955 | { |
| 956 | |
| 957 | tSirMsgQ msg; |
| 958 | if(pMsgBuf == NULL) |
| 959 | { |
| 960 | limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n")); |
| 961 | return; |
| 962 | } |
| 963 | msg.type = (tANI_U16) msgType; |
| 964 | msg.bodyptr = pMsgBuf; |
| 965 | msg.bodyval = 0; |
| 966 | limProcessMlmReqMessages(pMac, &msg); |
| 967 | } /*** end limPostMlmMessage() ***/ |
| 968 | |
| 969 | |
| 970 | |
| 971 | /** |
| 972 | * limGetCurrentScanChannel() |
| 973 | * |
| 974 | *FUNCTION: |
| 975 | * This function is called in various places to get current channel |
| 976 | * number being scanned. |
| 977 | * |
| 978 | *PARAMS: |
| 979 | * |
| 980 | *LOGIC: |
| 981 | * |
| 982 | *ASSUMPTIONS: |
| 983 | * NA |
| 984 | * |
| 985 | *NOTE: |
| 986 | * NA |
| 987 | * |
| 988 | * @param pMac Pointer to Global MAC structure |
| 989 | * @return Channel number |
| 990 | */ |
| 991 | static inline tANI_U8 |
| 992 | limGetCurrentScanChannel(tpAniSirGlobal pMac) |
| 993 | { |
| 994 | tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber; |
| 995 | |
| 996 | return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId)); |
| 997 | } /*** end limGetCurrentScanChannel() ***/ |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | /** |
| 1002 | * limGetIElenFromBssDescription() |
| 1003 | * |
| 1004 | *FUNCTION: |
| 1005 | * This function is called in various places to get IE length |
| 1006 | * from tSirBssDescription structure |
| 1007 | * number being scanned. |
| 1008 | * |
| 1009 | *PARAMS: |
| 1010 | * |
| 1011 | *LOGIC: |
| 1012 | * |
| 1013 | *ASSUMPTIONS: |
| 1014 | * NA |
| 1015 | * |
| 1016 | *NOTE: |
| 1017 | * NA |
| 1018 | * |
| 1019 | * @param pBssDescr |
| 1020 | * @return Total IE length |
| 1021 | */ |
| 1022 | |
| 1023 | static inline tANI_U16 |
| 1024 | limGetIElenFromBssDescription(tpSirBssDescription pBssDescr) |
| 1025 | { |
| 1026 | if (!pBssDescr) |
| 1027 | return 0; |
| 1028 | |
| 1029 | return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) + |
| 1030 | sizeof(tANI_U32) - sizeof(tSirBssDescription))); |
| 1031 | } /*** end limGetIElenFromBssDescription() ***/ |
| 1032 | |
| 1033 | #ifdef WLAN_SOFTAP_FEATURE |
| 1034 | /** |
| 1035 | * limSendBeaconInd() |
| 1036 | * |
| 1037 | *FUNCTION: |
| 1038 | * This function is called to send the beacon indication |
| 1039 | * number being scanned. |
| 1040 | * |
| 1041 | *PARAMS: |
| 1042 | * |
| 1043 | *LOGIC: |
| 1044 | * |
| 1045 | *ASSUMPTIONS: |
| 1046 | */ |
| 1047 | |
| 1048 | void |
| 1049 | limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 1050 | #endif |
| 1051 | |
| 1052 | #ifdef WLAN_SOFTAP_FEATURE |
| 1053 | |
| 1054 | void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry); |
| 1055 | void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 1056 | void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 1057 | void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry); |
| 1058 | |
| 1059 | |
| 1060 | tSirRetStatus |
| 1061 | limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf); |
| 1062 | |
| 1063 | #define LIM_WPS_OVERLAP_TIMER_MS 10000 |
| 1064 | #endif |
| 1065 | |
| 1066 | void |
| 1067 | limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data); |
| 1068 | void |
| 1069 | limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data); |
| 1070 | |
| 1071 | void |
| 1072 | limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel, |
| 1073 | CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry); |
| 1074 | |
| 1075 | #ifdef WLAN_FEATURE_P2P |
| 1076 | void limSendSmeMgmtFrameInd( |
| 1077 | tpAniSirGlobal pMac, tANI_U8 frameType, |
| 1078 | tANI_U8 *frame, tANI_U32 frameLen, tANI_U16 sessionId, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1079 | tANI_U32 rxChan, tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1080 | void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac); |
| 1081 | void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg); |
| 1082 | void limAbortRemainOnChan(tpAniSirGlobal pMac); |
| 1083 | tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf); |
| 1084 | #endif |
| 1085 | #endif /* __LIM_TYPES_H */ |
| 1086 | |