Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame^] | 2 | * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
| 29 | * This file lim_types.h contains the definitions used by all |
| 30 | * all LIM modules. |
| 31 | * Author: Chandra Modumudi |
| 32 | * Date: 02/11/02 |
| 33 | * History:- |
| 34 | * Date Modified by Modification Information |
| 35 | * -------------------------------------------------------------------- |
| 36 | * |
| 37 | */ |
| 38 | #ifndef __LIM_TYPES_H |
| 39 | #define __LIM_TYPES_H |
| 40 | |
| 41 | #include "wni_api.h" |
| 42 | #include "sir_api.h" |
| 43 | #include "sir_common.h" |
| 44 | #include "sir_mac_prot_def.h" |
| 45 | #include "utils_api.h" |
| 46 | |
| 47 | #include "lim_api.h" |
| 48 | #include "lim_debug.h" |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 49 | #include "lim_trace.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 50 | #include "lim_send_sme_rsp_messages.h" |
| 51 | #include "sys_global.h" |
| 52 | #include "dph_global.h" |
| 53 | #include "parser_api.h" |
| 54 | #include "wma_if.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 | /* |
| 94 | * Values (LIM_MLM_MSG_START + 32) through |
| 95 | * (LIM_MLM_MSG_START + 40) are unused. |
| 96 | */ |
Krishna Kumaar Natarajan | c5e06ac | 2016-06-30 16:49:19 -0700 | [diff] [blame] | 97 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 98 | #define LIM_HASH_ADD 0 |
| 99 | #define LIM_HASH_UPDATE 1 |
| 100 | |
| 101 | #define LIM_WEP_IN_FC 1 |
| 102 | #define LIM_NO_WEP_IN_FC 0 |
| 103 | |
| 104 | #define LIM_DECRYPT_ICV_FAIL 1 |
| 105 | |
| 106 | /* / Definitions to distinquish between Association/Reassociaton */ |
| 107 | #define LIM_ASSOC 0 |
| 108 | #define LIM_REASSOC 1 |
| 109 | |
| 110 | /* / Minimum Memory blocks require for different scenario */ |
| 111 | #define LIM_MIN_MEM_ASSOC 4 |
| 112 | |
| 113 | /* / Verifies whether given mac addr matches the CURRENT Bssid */ |
Anurag Chouhan | 600c3a0 | 2016-03-01 10:33:54 +0530 | [diff] [blame] | 114 | #define IS_CURRENT_BSSID(pMac, addr, psessionEntry) (!qdf_mem_cmp(addr, \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 115 | psessionEntry->bssId, \ |
| 116 | sizeof(psessionEntry->bssId))) |
| 117 | /* / Verifies whether given addr matches the REASSOC Bssid */ |
Anurag Chouhan | 600c3a0 | 2016-03-01 10:33:54 +0530 | [diff] [blame] | 118 | #define IS_REASSOC_BSSID(pMac, addr, psessionEntry) (!qdf_mem_cmp(addr, \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 119 | psessionEntry->limReAssocbssId, \ |
| 120 | sizeof(psessionEntry->limReAssocbssId))) |
| 121 | |
| 122 | #define REQ_TYPE_REGISTRAR (0x2) |
| 123 | #define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3) |
| 124 | |
| 125 | #define RESP_TYPE_REGISTRAR (0x2) |
| 126 | #define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0) |
| 127 | #define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1) |
| 128 | #define RESP_TYPE_AP (0x3) |
| 129 | #define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300 |
| 130 | |
| 131 | |
| 132 | #define HAL_TXCOMP_REQUESTED_MASK 0x1 /* bit 0 for TxComp intr requested. */ |
| 133 | #define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 /* bit 1 for STA overwrite with selfSta Requested. */ |
| 134 | #define HAL_TX_NO_ENCRYPTION_MASK 0x4 /* bit 2. If set, the frame is not to be encrypted */ |
| 135 | #if defined(LIBRA_WAPI_SUPPORT) |
| 136 | #define HAL_WAPI_STA_MASK 0x8 /* bit 3. If set, this frame is for WAPI station */ |
| 137 | #endif |
| 138 | |
| 139 | #define HAL_TRIGGER_ENABLED_AC_MASK 0x10 /* bit 4 for data frames belonging to trigger enabled AC */ |
| 140 | #define HAL_USE_NO_ACK_REQUESTED_MASK 0x20 |
| 141 | |
| 142 | #define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 /* Bit 6 will be used to control BD rate for Management frames */ |
| 143 | #define HAL_USE_PEER_STA_REQUESTED_MASK 0x80 /* bit 7 will be used to control frames for p2p interface */ |
| 144 | |
| 145 | #ifdef FEATURE_WLAN_TDLS |
| 146 | #define HAL_TDLS_PEER_STA_MASK 0x80 /* bit 7 set for TDLS peer station */ |
| 147 | #endif |
| 148 | |
| 149 | |
| 150 | /* enums used by LIM are as follows */ |
| 151 | |
| 152 | enum eLimDisassocTrigger { |
| 153 | eLIM_HOST_DISASSOC, |
| 154 | eLIM_PEER_ENTITY_DISASSOC, |
| 155 | eLIM_LINK_MONITORING_DISASSOC, |
| 156 | eLIM_PROMISCUOUS_MODE_DISASSOC, |
| 157 | eLIM_HOST_DEAUTH, |
| 158 | eLIM_PEER_ENTITY_DEAUTH, |
| 159 | eLIM_LINK_MONITORING_DEAUTH, |
| 160 | eLIM_JOIN_FAILURE, |
Sandeep Puligilla | 7e3e3c5 | 2016-09-02 17:54:21 -0700 | [diff] [blame] | 161 | eLIM_REASSOC_REJECT, |
| 162 | eLIM_DUPLICATE_ENTRY |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 163 | }; |
| 164 | |
| 165 | /* Reason code to determine the channel change context while sending |
| 166 | * WMA_CHNL_SWITCH_REQ message to HAL |
| 167 | */ |
| 168 | enum eChannelChangeReasonCodes { |
| 169 | LIM_SWITCH_CHANNEL_REASSOC, |
| 170 | LIM_SWITCH_CHANNEL_JOIN, |
| 171 | LIM_SWITCH_CHANNEL_OPERATION, /* Generic change channel */ |
| 172 | LIM_SWITCH_CHANNEL_SAP_DFS, /* DFS channel change */ |
| 173 | }; |
| 174 | |
| 175 | typedef struct sLimAuthRspTimeout { |
| 176 | tSirMacAddr peerMacAddr; |
| 177 | } tLimAuthRspTimeout; |
| 178 | |
| 179 | typedef struct sLimMlmStartReq { |
| 180 | tSirMacSSid ssId; |
| 181 | tSirBssType bssType; |
| 182 | tSirMacAddr bssId; |
| 183 | tSirMacBeaconInterval beaconPeriod; |
| 184 | uint8_t dtimPeriod; |
| 185 | tSirMacCfParamSet cfParamSet; |
| 186 | tSirMacChanNum channelNumber; |
| 187 | ePhyChanBondState cbMode; |
| 188 | uint16_t atimWindow; |
| 189 | tSirMacRateSet rateSet; |
| 190 | uint8_t sessionId; /* Added For BT-AMP Support */ |
| 191 | |
| 192 | /* Parameters reqd for new HAL (message) interface */ |
| 193 | tSirNwType nwType; |
| 194 | uint8_t htCapable; |
| 195 | tSirMacHTOperatingMode htOperMode; |
| 196 | uint8_t dualCTSProtection; |
| 197 | uint8_t txChannelWidthSet; |
| 198 | uint8_t ssidHidden; |
| 199 | uint8_t wps_state; |
| 200 | uint8_t obssProtEnabled; |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 201 | uint8_t beacon_tx_rate; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 202 | } tLimMlmStartReq, *tpLimMlmStartReq; |
| 203 | |
| 204 | typedef struct sLimMlmStartCnf { |
| 205 | tSirResultCodes resultCode; |
| 206 | uint8_t sessionId; |
| 207 | } tLimMlmStartCnf, *tpLimMlmStartCnf; |
| 208 | |
| 209 | typedef struct sLimMlmScanCnf { |
| 210 | tSirResultCodes resultCode; |
| 211 | uint16_t scanResultLength; |
| 212 | tSirBssDescription bssDescription[1]; |
| 213 | uint8_t sessionId; |
| 214 | } tLimMlmScanCnf, *tpLimMlmScanCnf; |
| 215 | |
| 216 | typedef struct sLimScanResult { |
| 217 | uint16_t numBssDescriptions; |
| 218 | tSirBssDescription bssDescription[1]; |
| 219 | } tLimScanResult; |
| 220 | |
| 221 | typedef struct sLimMlmJoinCnf { |
| 222 | tSirResultCodes resultCode; |
| 223 | uint16_t protStatusCode; |
| 224 | uint8_t sessionId; |
| 225 | } tLimMlmJoinCnf, *tpLimMlmJoinCnf; |
| 226 | |
| 227 | typedef struct sLimMlmAssocReq { |
| 228 | tSirMacAddr peerMacAddr; |
| 229 | uint32_t assocFailureTimeout; |
| 230 | uint16_t capabilityInfo; |
| 231 | tSirMacListenInterval listenInterval; |
| 232 | uint8_t sessionId; |
| 233 | } tLimMlmAssocReq, *tpLimMlmAssocReq; |
| 234 | |
| 235 | typedef struct sLimMlmAssocCnf { |
| 236 | tSirResultCodes resultCode; /* Internal status code. */ |
| 237 | uint16_t protStatusCode; /* Protocol Status code. */ |
| 238 | uint8_t sessionId; |
| 239 | } tLimMlmAssocCnf, *tpLimMlmAssocCnf; |
| 240 | |
| 241 | typedef struct sLimMlmAssocInd { |
| 242 | tSirMacAddr peerMacAddr; |
| 243 | uint16_t aid; |
| 244 | tAniAuthType authType; |
| 245 | tAniSSID ssId; |
| 246 | tSirRSNie rsnIE; |
| 247 | tSirWAPIie wapiIE; |
| 248 | tSirAddie addIE; /* additional IE received from the peer, which possibly includes WSC IE and/or P2P IE. */ |
| 249 | tSirMacCapabilityInfo capabilityInfo; |
| 250 | tAniBool spectrumMgtIndicator; |
| 251 | tSirMacPowerCapInfo powerCap; |
| 252 | tSirSupChnl supportedChannels; |
| 253 | uint8_t sessionId; |
| 254 | |
| 255 | tAniBool WmmStaInfoPresent; |
| 256 | |
| 257 | /* Required for indicating the frames to upper layer */ |
| 258 | uint32_t beaconLength; |
| 259 | uint8_t *beaconPtr; |
| 260 | uint32_t assocReqLength; |
| 261 | uint8_t *assocReqPtr; |
| 262 | tSirSmeChanInfo chan_info; |
| 263 | } tLimMlmAssocInd, *tpLimMlmAssocInd; |
| 264 | |
| 265 | typedef struct sLimMlmReassocReq { |
| 266 | tSirMacAddr peerMacAddr; |
| 267 | uint32_t reassocFailureTimeout; |
| 268 | uint16_t capabilityInfo; |
| 269 | tSirMacListenInterval listenInterval; |
| 270 | uint8_t sessionId; |
| 271 | } tLimMlmReassocReq, *tpLimMlmReassocReq; |
| 272 | |
| 273 | typedef struct sLimMlmReassocCnf { |
| 274 | tSirResultCodes resultCode; |
| 275 | uint16_t protStatusCode; /* Protocol Status code. */ |
| 276 | uint8_t sessionId; |
| 277 | } tLimMlmReassocCnf, *tpLimMlmReassocCnf; |
| 278 | |
| 279 | typedef struct sLimMlmReassocInd { |
| 280 | tSirMacAddr peerMacAddr; |
| 281 | tSirMacAddr currentApAddr; |
| 282 | uint16_t aid; |
| 283 | tAniAuthType authType; |
| 284 | tAniSSID ssId; |
| 285 | tSirRSNie rsnIE; |
| 286 | tSirWAPIie wapiIE; |
| 287 | tSirAddie addIE; /* additional IE received from the peer, which can be WSC IE and/or P2P IE. */ |
| 288 | tSirMacCapabilityInfo capabilityInfo; |
| 289 | tAniBool spectrumMgtIndicator; |
| 290 | tSirMacPowerCapInfo powerCap; |
| 291 | tSirSupChnl supportedChannels; |
| 292 | |
| 293 | tAniBool WmmStaInfoPresent; |
| 294 | |
| 295 | /* Required for indicating the frames to upper layer */ |
| 296 | uint32_t beaconLength; |
| 297 | uint8_t *beaconPtr; |
| 298 | uint32_t assocReqLength; |
| 299 | uint8_t *assocReqPtr; |
| 300 | } tLimMlmReassocInd, *tpLimMlmReassocInd; |
| 301 | |
| 302 | typedef struct sLimMlmAuthCnf { |
| 303 | tSirMacAddr peerMacAddr; |
| 304 | tAniAuthType authType; |
| 305 | tSirResultCodes resultCode; |
| 306 | uint16_t protStatusCode; |
| 307 | uint8_t sessionId; |
| 308 | } tLimMlmAuthCnf, *tpLimMlmAuthCnf; |
| 309 | |
| 310 | typedef struct sLimMlmDeauthReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 311 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | uint16_t reasonCode; |
| 313 | uint16_t deauthTrigger; |
| 314 | uint16_t aid; |
| 315 | uint8_t sessionId; /* Added for BT-AMP SUPPORT */ |
| 316 | |
| 317 | } tLimMlmDeauthReq, *tpLimMlmDeauthReq; |
| 318 | |
| 319 | typedef struct sLimMlmDeauthCnf { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 320 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 321 | tSirResultCodes resultCode; |
| 322 | uint16_t deauthTrigger; |
| 323 | uint16_t aid; |
| 324 | uint8_t sessionId; |
| 325 | } tLimMlmDeauthCnf, *tpLimMLmDeauthCnf; |
| 326 | |
| 327 | typedef struct sLimMlmDeauthInd { |
| 328 | tSirMacAddr peerMacAddr; |
| 329 | uint16_t reasonCode; |
| 330 | uint16_t deauthTrigger; |
| 331 | uint16_t aid; |
| 332 | } tLimMlmDeauthInd, *tpLimMlmDeauthInd; |
| 333 | |
| 334 | typedef struct sLimMlmDisassocReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 335 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 336 | uint16_t reasonCode; |
| 337 | uint16_t disassocTrigger; |
| 338 | uint16_t aid; |
| 339 | uint8_t sessionId; |
| 340 | } tLimMlmDisassocReq, *tpLimMlmDisassocReq; |
| 341 | |
| 342 | typedef struct sLimMlmDisassocCnf { |
| 343 | tSirMacAddr peerMacAddr; |
| 344 | tSirResultCodes resultCode; |
| 345 | uint16_t disassocTrigger; |
| 346 | uint16_t aid; |
| 347 | uint8_t sessionId; |
| 348 | } tLimMlmDisassocCnf, *tpLimMlmDisassocCnf; |
| 349 | |
| 350 | typedef struct sLimMlmDisassocInd { |
| 351 | tSirMacAddr peerMacAddr; |
| 352 | uint16_t reasonCode; |
| 353 | uint16_t disassocTrigger; |
| 354 | uint16_t aid; |
| 355 | uint8_t sessionId; |
| 356 | } tLimMlmDisassocInd, *tpLimMlmDisassocInd; |
| 357 | |
| 358 | typedef struct sLimMlmPurgeStaReq { |
| 359 | tSirMacAddr peerMacAddr; |
| 360 | uint16_t aid; |
| 361 | uint8_t sessionId; /* Added For BT-AMP Support */ |
| 362 | } tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq; |
| 363 | |
| 364 | typedef struct sLimMlmPurgeStaInd { |
| 365 | tSirMacAddr peerMacAddr; |
| 366 | uint16_t reasonCode; |
| 367 | uint16_t purgeTrigger; |
| 368 | uint16_t aid; |
| 369 | uint8_t sessionId; |
| 370 | } tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd; |
| 371 | |
Deepak Dhamdhere | 0716816 | 2016-10-19 20:45:20 -0700 | [diff] [blame] | 372 | /** |
| 373 | * struct sLimMlmSetKeysCnf - set key confirmation parameters |
| 374 | * @peer_macaddr: peer mac address |
| 375 | * @resultCode: Result of set key operation |
| 376 | * @aid: association id |
| 377 | * @sessionId: PE session id |
| 378 | * @key_len_nonzero: Keys are non-zero length |
| 379 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 380 | typedef struct sLimMlmSetKeysCnf { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 381 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 382 | uint16_t resultCode; |
| 383 | uint16_t aid; |
| 384 | uint8_t sessionId; |
Deepak Dhamdhere | 0716816 | 2016-10-19 20:45:20 -0700 | [diff] [blame] | 385 | bool key_len_nonzero; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 386 | } tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf; |
| 387 | |
| 388 | typedef struct sLimMlmResetReq { |
| 389 | tSirMacAddr macAddr; |
| 390 | uint8_t performCleanup; |
| 391 | uint8_t sessionId; |
| 392 | } tLimMlmResetReq, *tpLimMlmResetReq; |
| 393 | |
| 394 | typedef struct sLimMlmResetCnf { |
| 395 | tSirMacAddr macAddr; |
| 396 | tSirResultCodes resultCode; |
| 397 | uint8_t sessionId; |
| 398 | } tLimMlmResetCnf, *tpLimMlmResetCnf; |
| 399 | |
| 400 | typedef struct sLimMlmLinkTestStopReq { |
| 401 | tSirMacAddr peerMacAddr; |
| 402 | uint8_t sessionId; |
| 403 | } tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq; |
| 404 | |
| 405 | /* Function templates */ |
| 406 | |
| 407 | bool lim_process_sme_req_messages(tpAniSirGlobal, tpSirMsgQ); |
| 408 | void lim_process_mlm_req_messages(tpAniSirGlobal, tpSirMsgQ); |
| 409 | void lim_process_mlm_rsp_messages(tpAniSirGlobal, uint32_t, uint32_t *); |
| 410 | void lim_process_sme_del_bss_rsp(tpAniSirGlobal, uint32_t, tpPESession); |
| 411 | |
| 412 | void lim_get_random_bssid(tpAniSirGlobal pMac, uint8_t *data); |
| 413 | |
| 414 | /* Function to handle HT and HT IE CFG parameter intializations */ |
| 415 | void handle_ht_capabilityand_ht_info(struct sAniSirGlobal *pMac, |
| 416 | tpPESession psessionEntry); |
| 417 | |
| 418 | /* Function to handle CFG parameter updates */ |
| 419 | void lim_handle_cf_gparam_update(tpAniSirGlobal, uint32_t); |
| 420 | |
| 421 | void lim_handle_param_update(tpAniSirGlobal pMac, eUpdateIEsType cfgId); |
| 422 | |
| 423 | /* Function to apply CFG parameters before join/reassoc/start BSS */ |
| 424 | void lim_apply_configuration(tpAniSirGlobal, tpPESession); |
| 425 | |
| 426 | void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry); |
| 427 | |
| 428 | /* Function to Initialize MLM state machine on STA */ |
Naveen Rawat | e6ddcaa | 2016-02-05 16:50:18 -0800 | [diff] [blame] | 429 | tSirRetStatus lim_init_mlm(tpAniSirGlobal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 430 | |
| 431 | /* Function to cleanup MLM state machine */ |
| 432 | void lim_cleanup_mlm(tpAniSirGlobal); |
| 433 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 434 | /* Management frame handling functions */ |
| 435 | void lim_process_beacon_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
| 436 | void lim_process_beacon_frame_no_session(tpAniSirGlobal, uint8_t *); |
| 437 | void lim_process_probe_req_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
| 438 | void lim_process_probe_rsp_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
| 439 | void lim_process_probe_rsp_frame_no_session(tpAniSirGlobal, uint8_t *); |
| 440 | void lim_process_probe_req_frame_multiple_bss(tpAniSirGlobal, uint8_t *, |
| 441 | tpPESession); |
| 442 | |
| 443 | /* Process Auth frame when we have a session in progress. */ |
| 444 | void lim_process_auth_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 445 | tSirRetStatus lim_process_auth_frame_no_session(tpAniSirGlobal pMac, uint8_t *, |
| 446 | void *body); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 447 | |
| 448 | void lim_process_assoc_req_frame(tpAniSirGlobal, uint8_t *, uint8_t, tpPESession); |
| 449 | void lim_send_mlm_assoc_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, |
| 450 | tpPESession psessionEntry); |
| 451 | |
| 452 | void lim_process_assoc_rsp_frame(tpAniSirGlobal, uint8_t *, uint8_t, tpPESession); |
| 453 | void lim_process_disassoc_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
| 454 | void lim_process_deauth_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
| 455 | void lim_process_action_frame(tpAniSirGlobal, uint8_t *, tpPESession); |
| 456 | void lim_process_action_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxMetaInfo); |
| 457 | |
| 458 | void lim_populate_p2p_mac_header(tpAniSirGlobal, uint8_t *); |
| 459 | void lim_populate_mac_header(tpAniSirGlobal, uint8_t *, uint8_t, uint8_t, |
| 460 | tSirMacAddr, tSirMacAddr); |
| 461 | tSirRetStatus lim_send_probe_req_mgmt_frame(tpAniSirGlobal, tSirMacSSid *, |
| 462 | tSirMacAddr, uint8_t, tSirMacAddr, |
| 463 | uint32_t, uint32_t, uint8_t *); |
| 464 | void lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, |
| 465 | uint8_t, tpPESession, uint8_t); |
| 466 | void lim_send_auth_mgmt_frame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr, |
Abhishek Singh | 7d3bc3e | 2016-02-03 17:45:01 +0530 | [diff] [blame] | 467 | uint8_t, tpPESession, bool wait_for_ack); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 468 | void lim_send_assoc_req_mgmt_frame(tpAniSirGlobal, tLimMlmAssocReq *, tpPESession); |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 469 | #ifdef WLAN_FEATURE_HOST_ROAM |
| 470 | void lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal pMac, |
| 471 | tLimMlmReassocReq *pMlmReassocReq, tpPESession psessionEntry); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 472 | void lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal, tLimMlmReassocReq *, |
| 473 | tpPESession); |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 474 | #else |
| 475 | static inline void lim_send_reassoc_req_with_ft_ies_mgmt_frame( |
| 476 | tpAniSirGlobal pMac, tLimMlmReassocReq *pMlmReassocReq, |
| 477 | tpPESession psessionEntry) |
| 478 | {} |
| 479 | static inline void lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, |
| 480 | tLimMlmReassocReq *reassoc_req, tpPESession pe_session) |
| 481 | {} |
| 482 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 483 | void lim_send_delts_req_action_frame(tpAniSirGlobal pMac, tSirMacAddr peer, |
| 484 | uint8_t wmmTspecPresent, |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 485 | tSirMacTSInfo * pTsinfo, |
| 486 | tSirMacTspecIE * pTspecIe, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 487 | tpPESession psessionEntry); |
| 488 | void lim_send_addts_req_action_frame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, |
| 489 | tSirAddtsReqInfo *addts, tpPESession); |
| 490 | void lim_send_addts_rsp_action_frame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, |
| 491 | uint16_t statusCode, tSirAddtsReqInfo *addts, |
| 492 | tSirMacScheduleIE *pSchedule, tpPESession); |
| 493 | |
| 494 | void lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal, uint16_t, uint16_t, tSirMacAddr, |
| 495 | uint8_t, tpDphHashNode pSta, tpPESession); |
| 496 | |
| 497 | void lim_send_disassoc_mgmt_frame(tpAniSirGlobal, uint16_t, tSirMacAddr, |
| 498 | tpPESession, bool waitForAck); |
| 499 | void lim_send_deauth_mgmt_frame(tpAniSirGlobal, uint16_t, tSirMacAddr, tpPESession, |
| 500 | bool waitForAck); |
| 501 | |
| 502 | tSirResultCodes lim_mlm_add_bss(tpAniSirGlobal, tLimMlmStartReq *, |
| 503 | tpPESession psessionEntry); |
| 504 | |
| 505 | tSirRetStatus lim_send_channel_switch_mgmt_frame(tpAniSirGlobal, tSirMacAddr, |
| 506 | uint8_t, uint8_t, uint8_t, |
| 507 | tpPESession); |
| 508 | |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 509 | tSirRetStatus lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx, |
| 510 | tSirMacAddr peer, uint8_t mode, uint8_t new_op_class, |
| 511 | uint8_t new_channel, uint8_t count, tpPESession session_entry); |
Abhishek Singh | 5695e2a | 2016-10-28 10:39:12 +0530 | [diff] [blame] | 512 | tSirRetStatus lim_p2p_oper_chan_change_confirm_action_frame( |
| 513 | tpAniSirGlobal mac_ctx, tSirMacAddr peer, |
| 514 | tpPESession session_entry); |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 515 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 516 | tSirRetStatus lim_send_vht_opmode_notification_frame(tpAniSirGlobal pMac, |
| 517 | tSirMacAddr peer, uint8_t nMode, |
| 518 | tpPESession psessionEntry); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 519 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 520 | tSirRetStatus lim_send_neighbor_report_request_frame(tpAniSirGlobal, |
| 521 | tpSirMacNeighborReportReq, |
| 522 | tSirMacAddr, tpPESession); |
| 523 | tSirRetStatus lim_send_link_report_action_frame(tpAniSirGlobal, tpSirMacLinkReport, |
| 524 | tSirMacAddr, tpPESession); |
| 525 | tSirRetStatus lim_send_radio_measure_report_action_frame(tpAniSirGlobal, uint8_t, |
| 526 | uint8_t, |
| 527 | tpSirMacRadioMeasureReport, |
| 528 | tSirMacAddr, tpPESession); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 529 | |
| 530 | |
| 531 | #ifdef FEATURE_WLAN_TDLS |
| 532 | void lim_init_tdls_data(tpAniSirGlobal, tpPESession); |
| 533 | tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal pMac, |
| 534 | uint32_t *pMsgBuf); |
| 535 | tSirRetStatus lim_process_sme_tdls_add_sta_req(tpAniSirGlobal pMac, |
| 536 | uint32_t *pMsgBuf); |
| 537 | tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal pMac, |
| 538 | uint32_t *pMsgBuf); |
| 539 | tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac, |
| 540 | uint32_t *pMsgBuf); |
| 541 | void lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac, |
| 542 | tpPESession psessionEntry); |
| 543 | void lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac, tpPESession psessionEntry, |
| 544 | uint32_t txCompleteStatus); |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 545 | tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx, |
| 546 | tpPESession session_entry); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 547 | QDF_STATUS lim_process_tdls_add_sta_rsp(tpAniSirGlobal pMac, void *msg, tpPESession); |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 548 | #else |
| 549 | static inline tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx, |
| 550 | tpPESession session_entry) |
| 551 | { |
| 552 | return eSIR_SUCCESS; |
| 553 | } |
Kabilan Kannan | 32eb502 | 2016-10-04 12:24:50 -0700 | [diff] [blame] | 554 | static inline void lim_init_tdls_data(tpAniSirGlobal pMac, |
| 555 | tpPESession pSessionEntry) |
| 556 | { |
| 557 | |
| 558 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 559 | #endif |
| 560 | |
| 561 | /* Algorithms & Link Monitoring related functions */ |
| 562 | /* / Function that handles heartbeat failure */ |
| 563 | void lim_handle_heart_beat_failure(tpAniSirGlobal, tpPESession); |
| 564 | |
| 565 | /* / Function that triggers link tear down with AP upon HB failure */ |
| 566 | void lim_tear_down_link_with_ap(tpAniSirGlobal, uint8_t, tSirMacReasonCodes); |
| 567 | |
| 568 | /* / Function that processes Max retries interrupt from TFP */ |
| 569 | void limHandleMaxRetriesInterrupt(uint32_t); |
| 570 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 571 | /* / Function that defers the messages received */ |
| 572 | uint32_t lim_defer_msg(tpAniSirGlobal, tSirMsgQ *); |
| 573 | |
| 574 | /* / Function that Switches the Channel and sets the CB Mode */ |
| 575 | void lim_set_channel(tpAniSirGlobal pMac, uint8_t channel, |
| 576 | uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1, |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 577 | enum phy_ch_width ch_width, int8_t maxTxPower, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 578 | uint8_t peSessionId); |
| 579 | |
| 580 | |
| 581 | /* / Function that completes channel scan */ |
| 582 | void lim_complete_mlm_scan(tpAniSirGlobal, tSirResultCodes); |
| 583 | |
| 584 | #ifdef ANI_SUPPORT_11H |
| 585 | /* / Function that sends Measurement Report action frame */ |
| 586 | tSirRetStatus lim_send_meas_report_frame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, |
| 587 | tSirMacAddr, tpPESession psessionEntry); |
| 588 | |
| 589 | /* / Function that sends TPC Report action frame */ |
| 590 | tSirRetStatus lim_send_tpc_report_frame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, |
| 591 | tSirMacAddr, tpPESession psessionEntry); |
| 592 | #endif |
| 593 | |
| 594 | /* / Function that sends TPC Request action frame */ |
| 595 | void lim_send_tpc_request_frame(tpAniSirGlobal, tSirMacAddr, |
| 596 | tpPESession psessionEntry); |
| 597 | |
| 598 | /* Function(s) to handle responses received from HAL */ |
| 599 | void lim_process_mlm_add_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ); |
| 600 | void lim_process_mlm_add_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQt, |
| 601 | tpPESession psessionEntry); |
| 602 | void lim_process_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ); |
| 603 | void lim_process_mlm_del_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, |
| 604 | tpPESession); |
| 605 | void lim_process_sta_mlm_add_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, |
| 606 | tpPESession psessionEntry); |
| 607 | void lim_process_sta_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, |
| 608 | tpPESession psessionEntry); |
| 609 | void lim_process_sta_mlm_del_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, |
| 610 | tpPESession psessionEntry); |
| 611 | void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ); |
| 612 | void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ); |
| 613 | |
| 614 | /* Function to process WMA_SWITCH_CHANNEL_RSP message */ |
| 615 | void lim_process_switch_channel_rsp(tpAniSirGlobal pMac, void *); |
| 616 | |
| 617 | void lim_covert_channel_scan_type(tpAniSirGlobal pMac, uint8_t channelNum, |
| 618 | bool passiveToActive); |
| 619 | void lim_set_dfs_channel_list(tpAniSirGlobal pMac, uint8_t channelNum, |
| 620 | tSirDFSChannelList *dfsChannelList); |
| 621 | void limContinueChannelLearn(tpAniSirGlobal); |
| 622 | /* WLAN_SUSPEND_LINK Related */ |
| 623 | uint8_t lim_is_link_suspended(tpAniSirGlobal pMac); |
| 624 | /* end WLAN_SUSPEND_LINK Related */ |
| 625 | |
| 626 | #ifdef WLAN_FEATURE_11W |
| 627 | /* 11w send SA query request action frame */ |
| 628 | tSirRetStatus lim_send_sa_query_request_frame(tpAniSirGlobal pMac, uint8_t *transId, |
| 629 | tSirMacAddr peer, |
| 630 | tpPESession psessionEntry); |
| 631 | /* 11w SA query request action frame handler */ |
| 632 | tSirRetStatus lim_send_sa_query_response_frame(tpAniSirGlobal pMac, |
| 633 | uint8_t *transId, tSirMacAddr peer, |
| 634 | tpPESession psessionEntry); |
| 635 | #endif |
| 636 | |
| 637 | /* Inline functions */ |
| 638 | |
| 639 | /** |
| 640 | * lim_post_sme_message() |
| 641 | * |
| 642 | ***FUNCTION: |
| 643 | * This function is called by limProcessMlmMessages(). In this |
| 644 | * function MLM sub-module invokes MLM ind/cnf primitives. |
| 645 | * |
| 646 | ***LOGIC: |
| 647 | * Initially MLM makes an SME function call to invoke MLM ind/cnf |
| 648 | * primitive. In future this can be enhanced to 'post' messages to SME. |
| 649 | * |
| 650 | ***ASSUMPTIONS: |
| 651 | * NA |
| 652 | * |
| 653 | ***NOTE: |
| 654 | * NA |
| 655 | * |
| 656 | * @param pMac Pointer to Global MAC structure |
| 657 | * @param msgType Indicates the MLM primitive message type |
| 658 | * @param *pMsgBuf A pointer to the MLM message buffer |
| 659 | * |
| 660 | * @return None |
| 661 | */ |
| 662 | static inline void |
| 663 | lim_post_sme_message(tpAniSirGlobal pMac, uint32_t msgType, uint32_t *pMsgBuf) |
| 664 | { |
| 665 | tSirMsgQ msg; |
| 666 | |
| 667 | if (pMsgBuf == NULL) { |
| 668 | lim_log(pMac, LOGE, FL("Buffer is Pointing to NULL")); |
| 669 | return; |
| 670 | } |
| 671 | |
| 672 | msg.type = (uint16_t) msgType; |
| 673 | msg.bodyptr = pMsgBuf; |
| 674 | msg.bodyval = 0; |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 675 | if (msgType > eWNI_SME_MSG_TYPES_BEGIN) { |
| 676 | MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, |
| 677 | msg.type)); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 678 | lim_process_sme_req_messages(pMac, &msg); |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 679 | } else { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 680 | lim_process_mlm_rsp_messages(pMac, msgType, pMsgBuf); |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 681 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 682 | } /*** end lim_post_sme_message() ***/ |
| 683 | |
| 684 | /** |
| 685 | * lim_post_mlm_message() |
| 686 | * |
| 687 | ***FUNCTION: |
| 688 | * This function is called by limProcessSmeMessages(). In this |
| 689 | * function SME invokes MLME primitives. |
| 690 | * |
| 691 | ***PARAMS: |
| 692 | * |
| 693 | ***LOGIC: |
| 694 | * Initially SME makes an MLM function call to invoke MLM primitive. |
| 695 | * In future this can be enhanced to 'post' messages to MLM. |
| 696 | * |
| 697 | ***ASSUMPTIONS: |
| 698 | * NA |
| 699 | * |
| 700 | ***NOTE: |
| 701 | * NA |
| 702 | * |
| 703 | * @param pMac Pointer to Global MAC structure |
| 704 | * @param msgType Indicates the MLM primitive message type |
| 705 | * @param *pMsgBuf A pointer to the MLM message buffer |
| 706 | * |
| 707 | * @return None |
| 708 | */ |
| 709 | static inline void |
| 710 | lim_post_mlm_message(tpAniSirGlobal pMac, uint32_t msgType, uint32_t *pMsgBuf) |
| 711 | { |
| 712 | |
| 713 | tSirMsgQ msg; |
| 714 | if (pMsgBuf == NULL) { |
| 715 | lim_log(pMac, LOGE, FL("Buffer is Pointing to NULL")); |
| 716 | return; |
| 717 | } |
| 718 | msg.type = (uint16_t) msgType; |
| 719 | msg.bodyptr = pMsgBuf; |
| 720 | msg.bodyval = 0; |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 721 | MTRACE(mac_trace_msg_rx(pMac, NO_SESSION, msg.type)); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 722 | lim_process_mlm_req_messages(pMac, &msg); |
| 723 | } /*** end lim_post_mlm_message() ***/ |
| 724 | |
| 725 | /** |
| 726 | * lim_get_current_scan_channel() |
| 727 | * |
| 728 | ***FUNCTION: |
| 729 | * This function is called in various places to get current channel |
| 730 | * number being scanned. |
| 731 | * |
| 732 | ***PARAMS: |
| 733 | * |
| 734 | ***LOGIC: |
| 735 | * |
| 736 | ***ASSUMPTIONS: |
| 737 | * NA |
| 738 | * |
| 739 | ***NOTE: |
| 740 | * NA |
| 741 | * |
| 742 | * @param pMac Pointer to Global MAC structure |
| 743 | * @return Channel number |
| 744 | */ |
| 745 | static inline uint8_t lim_get_current_scan_channel(tpAniSirGlobal pMac) |
| 746 | { |
| 747 | uint8_t *pChanNum = |
| 748 | pMac->lim.gpLimMlmScanReq->channelList.channelNumber; |
| 749 | |
| 750 | return *(pChanNum + pMac->lim.gLimCurrentScanChannelId); |
| 751 | } /*** end lim_get_current_scan_channel() ***/ |
| 752 | |
| 753 | /** |
| 754 | * lim_get_ielen_from_bss_description() |
| 755 | * |
| 756 | ***FUNCTION: |
| 757 | * This function is called in various places to get IE length |
| 758 | * from tSirBssDescription structure |
| 759 | * number being scanned. |
| 760 | * |
| 761 | ***PARAMS: |
| 762 | * |
| 763 | ***LOGIC: |
| 764 | * |
| 765 | ***ASSUMPTIONS: |
| 766 | * NA |
| 767 | * |
| 768 | ***NOTE: |
| 769 | * NA |
| 770 | * |
| 771 | * @param pBssDescr |
| 772 | * @return Total IE length |
| 773 | */ |
| 774 | |
| 775 | static inline uint16_t |
| 776 | lim_get_ielen_from_bss_description(tpSirBssDescription pBssDescr) |
| 777 | { |
| 778 | uint16_t ielen; |
| 779 | |
| 780 | if (!pBssDescr) |
| 781 | return 0; |
| 782 | |
| 783 | /* |
| 784 | * Length of BSS desription is without length of |
| 785 | * length itself and length of pointer |
| 786 | * that holds ieFields |
| 787 | * |
| 788 | * <------------sizeof(tSirBssDescription)--------------------> |
| 789 | * +--------+---------------------------------+---------------+ |
| 790 | * | length | other fields | pointer to IEs| |
| 791 | * +--------+---------------------------------+---------------+ |
| 792 | * ^ |
| 793 | * ieFields |
| 794 | */ |
| 795 | |
| 796 | ielen = (uint16_t)(pBssDescr->length + sizeof(pBssDescr->length) - |
| 797 | GET_FIELD_OFFSET(tSirBssDescription, ieFields)); |
| 798 | |
| 799 | return ielen; |
| 800 | } /*** end lim_get_ielen_from_bss_description() ***/ |
| 801 | |
| 802 | /** |
| 803 | * lim_send_beacon_ind() |
| 804 | * |
| 805 | ***FUNCTION: |
| 806 | * This function is called to send the beacon indication |
| 807 | * number being scanned. |
| 808 | * |
| 809 | ***PARAMS: |
| 810 | * |
| 811 | ***LOGIC: |
| 812 | * |
| 813 | ***ASSUMPTIONS: |
| 814 | */ |
| 815 | |
| 816 | void lim_send_beacon_ind(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 817 | |
| 818 | void |
| 819 | lim_send_vdev_restart(tpAniSirGlobal pMac, tpPESession psessionEntry, |
| 820 | uint8_t sessionId); |
| 821 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 822 | void lim_get_wpspbc_sessions(tpAniSirGlobal pMac, struct qdf_mac_addr addr, |
Srinivas Girigowda | 419e36b | 2015-11-24 15:39:54 -0800 | [diff] [blame] | 823 | uint8_t *uuid_e, eWPSPBCOverlap *overlap, |
| 824 | tpPESession psessionEntry); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 825 | void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 826 | void lim_wpspbc_close(tpAniSirGlobal pMac, tpPESession psessionEntry); |
Srinivas Girigowda | edcfab9 | 2015-11-24 15:21:41 -0800 | [diff] [blame] | 827 | void lim_remove_pbc_sessions(tpAniSirGlobal pMac, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 828 | struct qdf_mac_addr pRemoveMac, |
Srinivas Girigowda | edcfab9 | 2015-11-24 15:21:41 -0800 | [diff] [blame] | 829 | tpPESession psessionEntry); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 830 | |
| 831 | #define LIM_WPS_OVERLAP_TIMER_MS 10000 |
| 832 | void |
| 833 | lim_change_channel_with_callback(tpAniSirGlobal pMac, uint8_t newChannel, |
| 834 | CHANGE_CHANNEL_CALLBACK callback, |
| 835 | uint32_t *cbdata, tpPESession psessionEntry); |
| 836 | |
| 837 | void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType, |
| 838 | uint8_t *frame, uint32_t frameLen, |
| 839 | uint16_t sessionId, uint32_t rxChan, |
| 840 | tpPESession psessionEntry, int8_t rxRssi); |
| 841 | void lim_process_remain_on_chn_timeout(tpAniSirGlobal pMac); |
| 842 | void lim_process_insert_single_shot_noa_timeout(tpAniSirGlobal pMac); |
| 843 | void lim_convert_active_channel_to_passive_channel(tpAniSirGlobal pMac); |
| 844 | void lim_send_p2p_action_frame(tpAniSirGlobal pMac, tpSirMsgQ pMsg); |
| 845 | void lim_abort_remain_on_chan(tpAniSirGlobal pMac, uint8_t sessionId, |
| 846 | uint32_t scan_id); |
| 847 | tSirRetStatus __lim_process_sme_no_a_update(tpAniSirGlobal pMac, uint32_t *pMsgBuf); |
| 848 | void lim_process_regd_defd_sme_req_after_noa_start(tpAniSirGlobal pMac); |
| 849 | |
| 850 | void lim_process_disassoc_ack_timeout(tpAniSirGlobal pMac); |
| 851 | void lim_process_deauth_ack_timeout(tpAniSirGlobal pMac); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 852 | QDF_STATUS lim_send_disassoc_cnf(tpAniSirGlobal pMac); |
| 853 | QDF_STATUS lim_send_deauth_cnf(tpAniSirGlobal pMac); |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame^] | 854 | |
| 855 | /** |
| 856 | * lim_disassoc_tx_complete_cnf() - callback to indicate Tx completion |
| 857 | * @context: pointer to mac structure |
| 858 | * @buf: buffer |
| 859 | * @txCompleteSuccess: indicates tx success/failure |
| 860 | * @params: tx completion params |
| 861 | * |
| 862 | * function will be invoked on receiving tx completion indication |
| 863 | * |
| 864 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
| 865 | */ |
| 866 | QDF_STATUS lim_disassoc_tx_complete_cnf(void *context, |
| 867 | qdf_nbuf_t buf, |
| 868 | uint32_t txCompleteSuccess, |
| 869 | void *params); |
| 870 | |
| 871 | /** |
| 872 | * lim_deauth_tx_complete_cnf() - callback to indicate Tx completion |
| 873 | * @context: pointer to mac structure |
| 874 | * @buf: buffer |
| 875 | * @txCompleteSuccess: indicates tx success/failure |
| 876 | * @params: tx completion params |
| 877 | * |
| 878 | * function will be invoked on receiving tx completion indication |
| 879 | * |
| 880 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
| 881 | */ |
| 882 | QDF_STATUS lim_deauth_tx_complete_cnf(void *context, |
| 883 | qdf_nbuf_t buf, |
| 884 | uint32_t txCompleteSuccess, |
| 885 | void *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 886 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 887 | typedef struct sSetLinkCbackParams { |
| 888 | void *cbackDataPtr; |
| 889 | } tSetLinkCbackParams; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 890 | |
| 891 | void lim_process_rx_scan_event(tpAniSirGlobal mac, void *buf); |
| 892 | |
| 893 | int lim_process_remain_on_chnl_req(tpAniSirGlobal pMac, uint32_t *pMsg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 894 | void lim_remain_on_chn_rsp(tpAniSirGlobal pMac, QDF_STATUS status, uint32_t *data); |
Masti, Narayanraddi | 21bde25 | 2015-10-09 19:39:47 +0530 | [diff] [blame] | 895 | void lim_send_sme_disassoc_deauth_ntf(tpAniSirGlobal mac_ctx, |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 896 | QDF_STATUS status, uint32_t *ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 897 | |
| 898 | /* / Bit value data structure */ |
| 899 | typedef enum sHalBitVal /* For Bit operations */ |
| 900 | { |
| 901 | eHAL_CLEAR, |
| 902 | eHAL_SET |
| 903 | } tHalBitVal; |
| 904 | |
| 905 | enum { |
| 906 | eHI_PRI, |
| 907 | ePROT, |
| 908 | eDBG |
| 909 | }; |
| 910 | |
| 911 | #endif /* __LIM_TYPES_H */ |