Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Abhishek Singh | 5432c35 | 2019-01-02 17:11:44 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 20 | * This file lim_types.h contains the definitions used by all |
| 21 | * all LIM modules. |
| 22 | * Author: Chandra Modumudi |
| 23 | * Date: 02/11/02 |
| 24 | * History:- |
| 25 | * Date Modified by Modification Information |
| 26 | * -------------------------------------------------------------------- |
| 27 | * |
| 28 | */ |
| 29 | #ifndef __LIM_TYPES_H |
| 30 | #define __LIM_TYPES_H |
| 31 | |
| 32 | #include "wni_api.h" |
| 33 | #include "sir_api.h" |
| 34 | #include "sir_common.h" |
| 35 | #include "sir_mac_prot_def.h" |
| 36 | #include "utils_api.h" |
| 37 | |
| 38 | #include "lim_api.h" |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 39 | #include "lim_trace.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 40 | #include "lim_send_sme_rsp_messages.h" |
| 41 | #include "sys_global.h" |
| 42 | #include "dph_global.h" |
| 43 | #include "parser_api.h" |
| 44 | #include "wma_if.h" |
| 45 | |
| 46 | #define LINK_TEST_DEFER 1 |
| 47 | |
| 48 | #define TRACE_EVENT_CNF_TIMER_DEACT 0x6600 |
| 49 | #define TRACE_EVENT_CNF_TIMER_ACT 0x6601 |
| 50 | #define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602 |
| 51 | #define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603 |
| 52 | |
| 53 | /* MLM message types */ |
| 54 | #define LIM_MLM_MSG_START 1000 |
| 55 | #define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START |
| 56 | #define LIM_MLM_SCAN_CNF (LIM_MLM_MSG_START + 1) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 57 | #define LIM_MLM_START_CNF (LIM_MLM_MSG_START + 3) |
| 58 | #define LIM_MLM_JOIN_REQ (LIM_MLM_MSG_START + 4) |
| 59 | #define LIM_MLM_JOIN_CNF (LIM_MLM_MSG_START + 5) |
| 60 | #define LIM_MLM_AUTH_REQ (LIM_MLM_MSG_START + 6) |
| 61 | #define LIM_MLM_AUTH_CNF (LIM_MLM_MSG_START + 7) |
| 62 | #define LIM_MLM_AUTH_IND (LIM_MLM_MSG_START + 8) |
| 63 | #define LIM_MLM_ASSOC_REQ (LIM_MLM_MSG_START + 9) |
| 64 | #define LIM_MLM_ASSOC_CNF (LIM_MLM_MSG_START + 10) |
| 65 | #define LIM_MLM_ASSOC_IND (LIM_MLM_MSG_START + 11) |
| 66 | #define LIM_MLM_DISASSOC_REQ (LIM_MLM_MSG_START + 12) |
| 67 | #define LIM_MLM_DISASSOC_CNF (LIM_MLM_MSG_START + 13) |
| 68 | #define LIM_MLM_DISASSOC_IND (LIM_MLM_MSG_START + 14) |
| 69 | #define LIM_MLM_REASSOC_REQ (LIM_MLM_MSG_START + 15) |
| 70 | #define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 16) |
| 71 | #define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 17) |
| 72 | #define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 18) |
| 73 | #define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 19) |
| 74 | #define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 20) |
| 75 | #define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 21) |
| 76 | #define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 22) |
| 77 | #define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 23) |
| 78 | #define LIM_MLM_SETKEYS_REQ (LIM_MLM_MSG_START + 24) |
| 79 | #define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 25) |
| 80 | #define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30) |
| 81 | #define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31) |
| 82 | /* |
| 83 | * Values (LIM_MLM_MSG_START + 32) through |
| 84 | * (LIM_MLM_MSG_START + 40) are unused. |
| 85 | */ |
Krishna Kumaar Natarajan | c5e06ac | 2016-06-30 16:49:19 -0700 | [diff] [blame] | 86 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 87 | #define LIM_HASH_ADD 0 |
| 88 | #define LIM_HASH_UPDATE 1 |
| 89 | |
| 90 | #define LIM_WEP_IN_FC 1 |
| 91 | #define LIM_NO_WEP_IN_FC 0 |
| 92 | |
| 93 | #define LIM_DECRYPT_ICV_FAIL 1 |
| 94 | |
| 95 | /* / Definitions to distinquish between Association/Reassociaton */ |
| 96 | #define LIM_ASSOC 0 |
| 97 | #define LIM_REASSOC 1 |
| 98 | |
| 99 | /* / Minimum Memory blocks require for different scenario */ |
| 100 | #define LIM_MIN_MEM_ASSOC 4 |
| 101 | |
| 102 | /* / Verifies whether given mac addr matches the CURRENT Bssid */ |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 103 | #define IS_CURRENT_BSSID(mac, addr, pe_session) (!qdf_mem_cmp(addr, \ |
| 104 | pe_session->bssId, \ |
| 105 | sizeof(pe_session->bssId))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 106 | /* / Verifies whether given addr matches the REASSOC Bssid */ |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 107 | #define IS_REASSOC_BSSID(mac, addr, pe_session) (!qdf_mem_cmp(addr, \ |
| 108 | pe_session->limReAssocbssId, \ |
| 109 | sizeof(pe_session->limReAssocbssId))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 110 | |
| 111 | #define REQ_TYPE_REGISTRAR (0x2) |
| 112 | #define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3) |
| 113 | |
| 114 | #define RESP_TYPE_REGISTRAR (0x2) |
| 115 | #define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0) |
| 116 | #define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1) |
| 117 | #define RESP_TYPE_AP (0x3) |
| 118 | #define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300 |
| 119 | |
| 120 | |
| 121 | #define HAL_TXCOMP_REQUESTED_MASK 0x1 /* bit 0 for TxComp intr requested. */ |
| 122 | #define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 /* bit 1 for STA overwrite with selfSta Requested. */ |
| 123 | #define HAL_TX_NO_ENCRYPTION_MASK 0x4 /* bit 2. If set, the frame is not to be encrypted */ |
| 124 | #if defined(LIBRA_WAPI_SUPPORT) |
| 125 | #define HAL_WAPI_STA_MASK 0x8 /* bit 3. If set, this frame is for WAPI station */ |
| 126 | #endif |
| 127 | |
| 128 | #define HAL_TRIGGER_ENABLED_AC_MASK 0x10 /* bit 4 for data frames belonging to trigger enabled AC */ |
| 129 | #define HAL_USE_NO_ACK_REQUESTED_MASK 0x20 |
| 130 | |
| 131 | #define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 /* Bit 6 will be used to control BD rate for Management frames */ |
| 132 | #define HAL_USE_PEER_STA_REQUESTED_MASK 0x80 /* bit 7 will be used to control frames for p2p interface */ |
| 133 | |
| 134 | #ifdef FEATURE_WLAN_TDLS |
| 135 | #define HAL_TDLS_PEER_STA_MASK 0x80 /* bit 7 set for TDLS peer station */ |
| 136 | #endif |
| 137 | |
Krunal Soni | fa6c7f5 | 2018-08-07 11:54:19 -0700 | [diff] [blame] | 138 | #define LIM_DOS_PROTECTION_TIME 1000 //1000ms |
Pragaspathi Thilagaraj | 30251ec | 2018-12-18 17:22:57 +0530 | [diff] [blame] | 139 | #define LIM_MIN_RSSI 0 /* 0dbm */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 140 | /* enums used by LIM are as follows */ |
| 141 | |
| 142 | enum eLimDisassocTrigger { |
| 143 | eLIM_HOST_DISASSOC, |
| 144 | eLIM_PEER_ENTITY_DISASSOC, |
| 145 | eLIM_LINK_MONITORING_DISASSOC, |
| 146 | eLIM_PROMISCUOUS_MODE_DISASSOC, |
| 147 | eLIM_HOST_DEAUTH, |
| 148 | eLIM_PEER_ENTITY_DEAUTH, |
| 149 | eLIM_LINK_MONITORING_DEAUTH, |
| 150 | eLIM_JOIN_FAILURE, |
Sandeep Puligilla | 7e3e3c5 | 2016-09-02 17:54:21 -0700 | [diff] [blame] | 151 | eLIM_REASSOC_REJECT, |
| 152 | eLIM_DUPLICATE_ENTRY |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 153 | }; |
| 154 | |
| 155 | /* Reason code to determine the channel change context while sending |
| 156 | * WMA_CHNL_SWITCH_REQ message to HAL |
| 157 | */ |
| 158 | enum eChannelChangeReasonCodes { |
| 159 | LIM_SWITCH_CHANNEL_REASSOC, |
| 160 | LIM_SWITCH_CHANNEL_JOIN, |
| 161 | LIM_SWITCH_CHANNEL_OPERATION, /* Generic change channel */ |
| 162 | LIM_SWITCH_CHANNEL_SAP_DFS, /* DFS channel change */ |
Jianmin Zhu | f2de84f | 2018-12-20 13:03:19 +0800 | [diff] [blame] | 163 | LIM_SWITCH_CHANNEL_HT_WIDTH /* HT channel width change */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 164 | }; |
| 165 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 166 | typedef struct sLimMlmStartReq { |
| 167 | tSirMacSSid ssId; |
| 168 | tSirBssType bssType; |
| 169 | tSirMacAddr bssId; |
| 170 | tSirMacBeaconInterval beaconPeriod; |
| 171 | uint8_t dtimPeriod; |
| 172 | tSirMacCfParamSet cfParamSet; |
| 173 | tSirMacChanNum channelNumber; |
| 174 | ePhyChanBondState cbMode; |
| 175 | uint16_t atimWindow; |
| 176 | tSirMacRateSet rateSet; |
| 177 | uint8_t sessionId; /* Added For BT-AMP Support */ |
| 178 | |
| 179 | /* Parameters reqd for new HAL (message) interface */ |
| 180 | tSirNwType nwType; |
| 181 | uint8_t htCapable; |
| 182 | tSirMacHTOperatingMode htOperMode; |
| 183 | uint8_t dualCTSProtection; |
| 184 | uint8_t txChannelWidthSet; |
| 185 | uint8_t ssidHidden; |
| 186 | uint8_t wps_state; |
| 187 | uint8_t obssProtEnabled; |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 188 | uint16_t beacon_tx_rate; |
Arif Hussain | 671a190 | 2017-03-17 09:08:32 -0700 | [diff] [blame] | 189 | uint32_t cac_duration_ms; |
| 190 | uint32_t dfs_regdomain; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 191 | } tLimMlmStartReq, *tpLimMlmStartReq; |
| 192 | |
| 193 | typedef struct sLimMlmStartCnf { |
| 194 | tSirResultCodes resultCode; |
| 195 | uint8_t sessionId; |
| 196 | } tLimMlmStartCnf, *tpLimMlmStartCnf; |
| 197 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 198 | typedef struct sLimMlmJoinCnf { |
| 199 | tSirResultCodes resultCode; |
| 200 | uint16_t protStatusCode; |
| 201 | uint8_t sessionId; |
| 202 | } tLimMlmJoinCnf, *tpLimMlmJoinCnf; |
| 203 | |
| 204 | typedef struct sLimMlmAssocReq { |
| 205 | tSirMacAddr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 206 | uint16_t capabilityInfo; |
| 207 | tSirMacListenInterval listenInterval; |
| 208 | uint8_t sessionId; |
| 209 | } tLimMlmAssocReq, *tpLimMlmAssocReq; |
| 210 | |
| 211 | typedef struct sLimMlmAssocCnf { |
| 212 | tSirResultCodes resultCode; /* Internal status code. */ |
| 213 | uint16_t protStatusCode; /* Protocol Status code. */ |
| 214 | uint8_t sessionId; |
| 215 | } tLimMlmAssocCnf, *tpLimMlmAssocCnf; |
| 216 | |
| 217 | typedef struct sLimMlmAssocInd { |
| 218 | tSirMacAddr peerMacAddr; |
| 219 | uint16_t aid; |
| 220 | tAniAuthType authType; |
| 221 | tAniSSID ssId; |
| 222 | tSirRSNie rsnIE; |
| 223 | tSirWAPIie wapiIE; |
| 224 | tSirAddie addIE; /* additional IE received from the peer, which possibly includes WSC IE and/or P2P IE. */ |
| 225 | tSirMacCapabilityInfo capabilityInfo; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 226 | bool spectrumMgtIndicator; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 227 | tSirMacPowerCapInfo powerCap; |
| 228 | tSirSupChnl supportedChannels; |
| 229 | uint8_t sessionId; |
| 230 | |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 231 | bool WmmStaInfoPresent; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 232 | |
| 233 | /* Required for indicating the frames to upper layer */ |
| 234 | uint32_t beaconLength; |
| 235 | uint8_t *beaconPtr; |
| 236 | uint32_t assocReqLength; |
| 237 | uint8_t *assocReqPtr; |
| 238 | tSirSmeChanInfo chan_info; |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 239 | bool ampdu; |
| 240 | bool sgi_enable; |
| 241 | bool tx_stbc; |
| 242 | bool rx_stbc; |
| 243 | tSirMacHTChannelWidth ch_width; |
| 244 | enum sir_sme_phy_mode mode; |
| 245 | uint8_t max_supp_idx; |
| 246 | uint8_t max_ext_idx; |
| 247 | uint8_t max_mcs_idx; |
| 248 | uint8_t rx_mcs_map; |
| 249 | uint8_t tx_mcs_map; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 250 | uint8_t ecsa_capable; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 251 | |
| 252 | tDot11fIEHTCaps ht_caps; |
| 253 | tDot11fIEVHTCaps vht_caps; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 254 | } tLimMlmAssocInd, *tpLimMlmAssocInd; |
| 255 | |
| 256 | typedef struct sLimMlmReassocReq { |
| 257 | tSirMacAddr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 258 | uint16_t capabilityInfo; |
| 259 | tSirMacListenInterval listenInterval; |
| 260 | uint8_t sessionId; |
| 261 | } tLimMlmReassocReq, *tpLimMlmReassocReq; |
| 262 | |
| 263 | typedef struct sLimMlmReassocCnf { |
| 264 | tSirResultCodes resultCode; |
| 265 | uint16_t protStatusCode; /* Protocol Status code. */ |
| 266 | uint8_t sessionId; |
| 267 | } tLimMlmReassocCnf, *tpLimMlmReassocCnf; |
| 268 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 269 | typedef struct sLimMlmAuthCnf { |
| 270 | tSirMacAddr peerMacAddr; |
| 271 | tAniAuthType authType; |
| 272 | tSirResultCodes resultCode; |
| 273 | uint16_t protStatusCode; |
| 274 | uint8_t sessionId; |
| 275 | } tLimMlmAuthCnf, *tpLimMlmAuthCnf; |
| 276 | |
| 277 | typedef struct sLimMlmDeauthReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 278 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 279 | uint16_t reasonCode; |
| 280 | uint16_t deauthTrigger; |
| 281 | uint16_t aid; |
| 282 | uint8_t sessionId; /* Added for BT-AMP SUPPORT */ |
| 283 | |
| 284 | } tLimMlmDeauthReq, *tpLimMlmDeauthReq; |
| 285 | |
| 286 | typedef struct sLimMlmDeauthCnf { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 287 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 288 | tSirResultCodes resultCode; |
| 289 | uint16_t deauthTrigger; |
| 290 | uint16_t aid; |
| 291 | uint8_t sessionId; |
| 292 | } tLimMlmDeauthCnf, *tpLimMLmDeauthCnf; |
| 293 | |
| 294 | typedef struct sLimMlmDeauthInd { |
| 295 | tSirMacAddr peerMacAddr; |
| 296 | uint16_t reasonCode; |
| 297 | uint16_t deauthTrigger; |
| 298 | uint16_t aid; |
| 299 | } tLimMlmDeauthInd, *tpLimMlmDeauthInd; |
| 300 | |
| 301 | typedef struct sLimMlmDisassocReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 302 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 303 | uint16_t reasonCode; |
| 304 | uint16_t disassocTrigger; |
| 305 | uint16_t aid; |
| 306 | uint8_t sessionId; |
| 307 | } tLimMlmDisassocReq, *tpLimMlmDisassocReq; |
| 308 | |
| 309 | typedef struct sLimMlmDisassocCnf { |
| 310 | tSirMacAddr peerMacAddr; |
| 311 | tSirResultCodes resultCode; |
| 312 | uint16_t disassocTrigger; |
| 313 | uint16_t aid; |
| 314 | uint8_t sessionId; |
| 315 | } tLimMlmDisassocCnf, *tpLimMlmDisassocCnf; |
| 316 | |
| 317 | typedef struct sLimMlmDisassocInd { |
| 318 | tSirMacAddr peerMacAddr; |
| 319 | uint16_t reasonCode; |
| 320 | uint16_t disassocTrigger; |
| 321 | uint16_t aid; |
| 322 | uint8_t sessionId; |
| 323 | } tLimMlmDisassocInd, *tpLimMlmDisassocInd; |
| 324 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 325 | typedef struct sLimMlmPurgeStaInd { |
| 326 | tSirMacAddr peerMacAddr; |
| 327 | uint16_t reasonCode; |
| 328 | uint16_t purgeTrigger; |
| 329 | uint16_t aid; |
| 330 | uint8_t sessionId; |
| 331 | } tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd; |
| 332 | |
Deepak Dhamdhere | 0716816 | 2016-10-19 20:45:20 -0700 | [diff] [blame] | 333 | /** |
| 334 | * struct sLimMlmSetKeysCnf - set key confirmation parameters |
| 335 | * @peer_macaddr: peer mac address |
| 336 | * @resultCode: Result of set key operation |
| 337 | * @aid: association id |
| 338 | * @sessionId: PE session id |
| 339 | * @key_len_nonzero: Keys are non-zero length |
| 340 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 341 | typedef struct sLimMlmSetKeysCnf { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 342 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 343 | uint16_t resultCode; |
| 344 | uint16_t aid; |
| 345 | uint8_t sessionId; |
Deepak Dhamdhere | 0716816 | 2016-10-19 20:45:20 -0700 | [diff] [blame] | 346 | bool key_len_nonzero; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 347 | } tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf; |
| 348 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 349 | /* Function templates */ |
| 350 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 351 | bool lim_process_sme_req_messages(struct mac_context *, struct scheduler_msg *); |
| 352 | void lim_process_mlm_req_messages(struct mac_context *, struct scheduler_msg *); |
| 353 | void lim_process_mlm_rsp_messages(struct mac_context *, uint32_t, uint32_t *); |
| 354 | void lim_process_sme_del_bss_rsp(struct mac_context *, uint32_t, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 355 | |
Abhishek Singh | c5a5408 | 2018-09-12 16:08:03 +0530 | [diff] [blame] | 356 | /** |
| 357 | * lim_process_mlm_start_cnf(): called to processes MLM_START_CNF message from |
| 358 | * MLM State machine. |
| 359 | * @mac_ctx: Pointer to Global MAC structure |
| 360 | * @msg_buf: A pointer to the MLM message buffer |
| 361 | * |
| 362 | * Return: None |
| 363 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 364 | void lim_process_mlm_start_cnf(struct mac_context *mac_ctx, uint32_t *msg_buf); |
Abhishek Singh | c5a5408 | 2018-09-12 16:08:03 +0530 | [diff] [blame] | 365 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 366 | void lim_get_random_bssid(struct mac_context *mac, uint8_t *data); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 367 | |
| 368 | /* Function to handle HT and HT IE CFG parameter intializations */ |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 369 | void handle_ht_capabilityand_ht_info(struct mac_context *mac, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 370 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 371 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 372 | void lim_handle_param_update(struct mac_context *mac, eUpdateIEsType cfgId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 373 | |
| 374 | /* Function to apply CFG parameters before join/reassoc/start BSS */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 375 | void lim_apply_configuration(struct mac_context *, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 376 | |
Pragaspathi Thilagaraj | 1ee7600 | 2018-09-18 21:38:51 +0530 | [diff] [blame] | 377 | /** |
| 378 | * lim_set_cfg_protection() - sets lim global cfg cache from the config |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 379 | * @mac: global mac context |
Pragaspathi Thilagaraj | 1ee7600 | 2018-09-18 21:38:51 +0530 | [diff] [blame] | 380 | * @pesessionEntry: PE session |
| 381 | * |
| 382 | * Return none |
| 383 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 384 | void lim_set_cfg_protection(struct mac_context *mac, struct pe_session *pesessionEntry); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 385 | |
| 386 | /* Function to Initialize MLM state machine on STA */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 387 | QDF_STATUS lim_init_mlm(struct mac_context *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 388 | |
| 389 | /* Function to cleanup MLM state machine */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 390 | void lim_cleanup_mlm(struct mac_context *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 391 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 392 | /* Management frame handling functions */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 393 | void lim_process_beacon_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 394 | void lim_process_probe_req_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 395 | void lim_process_probe_rsp_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 396 | void lim_process_probe_req_frame_multiple_bss(struct mac_context *, uint8_t *, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 397 | struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 398 | |
| 399 | /* Process Auth frame when we have a session in progress. */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 400 | void lim_process_auth_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 401 | QDF_STATUS lim_process_auth_frame_no_session(struct mac_context *mac, uint8_t *, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 402 | void *body); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 403 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 404 | void lim_process_assoc_req_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *); |
| 405 | void lim_send_mlm_assoc_ind(struct mac_context *mac, tpDphHashNode pStaDs, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 406 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 407 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 408 | void lim_process_assoc_rsp_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *); |
| 409 | void lim_process_disassoc_frame(struct mac_context *, uint8_t *, struct pe_session *); |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 410 | /* |
| 411 | * lim_perform_disassoc() - Actual action taken after receiving disassoc |
| 412 | * @mac_ctx: Global MAC context |
| 413 | * @frame_rssi: RSSI of the frame |
| 414 | * @rc: Reason code of the deauth |
| 415 | * @pe_session: PE session entry pointer |
| 416 | * @addr: BSSID from which the disassoc is received |
| 417 | * |
| 418 | * Return: None |
| 419 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 420 | void lim_perform_disassoc(struct mac_context *mac_ctx, int32_t frame_rssi, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 421 | uint16_t rc, struct pe_session *pe_session, |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 422 | tSirMacAddr addr); |
| 423 | /* |
| 424 | * lim_disassoc_tdls_peers() - Disassoc action for tdls peers |
| 425 | * @mac_ctx: Global MAC context |
| 426 | * @pe_session: PE session entry pointer |
| 427 | * @addr: BSSID from which the disassoc is received |
| 428 | * |
| 429 | * Return: None |
| 430 | */ |
| 431 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 432 | void lim_disassoc_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 433 | struct pe_session *pe_session, tSirMacAddr addr); |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 434 | #else |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 435 | static inline void lim_disassoc_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 436 | struct pe_session *pe_session, tSirMacAddr addr) |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 437 | { |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 438 | } |
| 439 | #endif |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 440 | void lim_process_deauth_frame(struct mac_context *, uint8_t *, struct pe_session *); |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 441 | /* |
| 442 | * lim_perform_deauth() - Actual action taken after receiving deauth |
| 443 | * @mac_ctx: Global MAC context |
| 444 | * @pe_session: PE session entry pointer |
| 445 | * @rc: Reason code of the deauth |
| 446 | * @addr: BSSID from which the deauth is received |
| 447 | * @frame_rssi: RSSI of the frame |
| 448 | * |
| 449 | * Return: None |
| 450 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 451 | void lim_perform_deauth(struct mac_context *mac_ctx, struct pe_session *pe_session, |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 452 | uint16_t rc, tSirMacAddr addr, int32_t frame_rssi); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 453 | void lim_process_action_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 454 | void lim_process_action_frame_no_session(struct mac_context *mac, uint8_t *pRxMetaInfo); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 455 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 456 | void lim_populate_mac_header(struct mac_context *, uint8_t *, uint8_t, uint8_t, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 457 | tSirMacAddr, tSirMacAddr); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 458 | QDF_STATUS lim_send_probe_req_mgmt_frame(struct mac_context *, tSirMacSSid *, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 459 | tSirMacAddr, uint8_t, tSirMacAddr, |
Sandeep Puligilla | 06ae890 | 2018-04-16 19:02:47 -0700 | [diff] [blame] | 460 | uint32_t, uint16_t *, uint8_t *); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 461 | void lim_send_probe_rsp_mgmt_frame(struct mac_context *, tSirMacAddr, tpAniSSID, short, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 462 | uint8_t, struct pe_session *, uint8_t); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 463 | void lim_send_auth_mgmt_frame(struct mac_context *, tSirMacAuthFrameBody *, tSirMacAddr, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 464 | uint8_t, struct pe_session *); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 465 | void lim_send_assoc_req_mgmt_frame(struct mac_context *, tLimMlmAssocReq *, struct pe_session *); |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 466 | #ifdef WLAN_FEATURE_HOST_ROAM |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 467 | void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 468 | tLimMlmReassocReq *pMlmReassocReq, struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 469 | void lim_send_reassoc_req_mgmt_frame(struct mac_context *, tLimMlmReassocReq *, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 470 | struct pe_session *); |
Paul Zhang | 2f1077c | 2017-11-30 12:06:09 +0800 | [diff] [blame] | 471 | /** |
| 472 | * lim_process_rx_scan_handler() - |
| 473 | * process the event for scan which is issued by LIM |
| 474 | * @vdev: wlan objmgr vdev pointer |
| 475 | * @event: scan event |
| 476 | * @arg: global mac context pointer |
| 477 | * |
| 478 | * Return: void |
| 479 | */ |
| 480 | void lim_process_rx_scan_handler(struct wlan_objmgr_vdev *vdev, |
| 481 | struct scan_event *event, void *arg); |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 482 | #else |
| 483 | static inline void lim_send_reassoc_req_with_ft_ies_mgmt_frame( |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 484 | struct mac_context *mac, tLimMlmReassocReq *pMlmReassocReq, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 485 | struct pe_session *pe_session) |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 486 | {} |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 487 | static inline void lim_send_reassoc_req_mgmt_frame(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 488 | tLimMlmReassocReq *reassoc_req, struct pe_session *pe_session) |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 489 | {} |
Paul Zhang | 2f1077c | 2017-11-30 12:06:09 +0800 | [diff] [blame] | 490 | static inline void lim_process_rx_scan_handler(struct wlan_objmgr_vdev *vdev, |
| 491 | struct scan_event *event, void *arg) |
| 492 | {} |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 493 | #endif |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 494 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 495 | /** |
| 496 | * lim_process_set_he_bss_color() - process the set he bss color request |
| 497 | * |
| 498 | * @mac_ctx: global mac context pointer |
| 499 | * @msg_buf: message buffer pointer |
| 500 | * |
| 501 | * Return: void |
| 502 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 503 | void lim_process_set_he_bss_color(struct mac_context *mac_ctx, uint32_t *msg_buf); |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 504 | |
| 505 | /** |
| 506 | * lim_process_obss_color_collision_info() - Process the obss color collision |
| 507 | * request. |
| 508 | * @mac_ctx: global mac context pointer |
| 509 | * @msg_buf: message buffer pointer |
| 510 | * |
| 511 | * Return: void |
| 512 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 513 | void lim_process_obss_color_collision_info(struct mac_context *mac_ctx, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 514 | uint32_t *msg_buf); |
| 515 | |
| 516 | /** |
| 517 | * lim_send_obss_color_collision_cfg() - Send obss color collision cfg. |
| 518 | * @mac_ctx: global mac context pointer |
| 519 | * @session: Pointer to session |
| 520 | * @event_type: obss color collision detection type |
| 521 | * |
| 522 | * Return: void |
| 523 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 524 | void lim_send_obss_color_collision_cfg(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 525 | struct pe_session *session, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 526 | enum wmi_obss_color_collision_evt_type |
| 527 | event_type); |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 528 | #else |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 529 | static inline void lim_process_set_he_bss_color(struct mac_context *mac_ctx, |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 530 | uint32_t *msg_buf) |
| 531 | {} |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 532 | static inline void lim_process_obss_color_collision_info(struct mac_context *mac_ctx, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 533 | uint32_t *msg_buf) |
| 534 | {} |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 535 | static inline void lim_send_obss_color_collision_cfg(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 536 | struct pe_session *session, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 537 | enum wmi_obss_color_collision_evt_type event_type) |
| 538 | {} |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 539 | #endif |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 540 | void lim_send_delts_req_action_frame(struct mac_context *mac, tSirMacAddr peer, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 541 | uint8_t wmmTspecPresent, |
Jeff Johnson | 312348f | 2018-12-22 13:33:54 -0800 | [diff] [blame] | 542 | struct mac_ts_info * pTsinfo, |
Jeff Johnson | 56471b9 | 2018-12-22 14:36:06 -0800 | [diff] [blame] | 543 | struct mac_tspec_ie * pTspecIe, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 544 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 545 | void lim_send_addts_req_action_frame(struct mac_context *mac, tSirMacAddr peerMacAddr, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 546 | tSirAddtsReqInfo *addts, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 547 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 548 | void lim_send_assoc_rsp_mgmt_frame(struct mac_context *, uint16_t, uint16_t, tSirMacAddr, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 549 | uint8_t, tpDphHashNode pSta, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 550 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 551 | void lim_send_disassoc_mgmt_frame(struct mac_context *, uint16_t, tSirMacAddr, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 552 | struct pe_session *, bool waitForAck); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 553 | void lim_send_deauth_mgmt_frame(struct mac_context *, uint16_t, tSirMacAddr, struct pe_session *, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 554 | bool waitForAck); |
| 555 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 556 | void lim_process_mlm_update_hidden_ssid_rsp(struct mac_context *mac_ctx, |
Kiran Kumar Lokere | 5798bfa | 2017-04-27 20:49:39 -0700 | [diff] [blame] | 557 | struct scheduler_msg *msg); |
| 558 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 559 | tSirResultCodes lim_mlm_add_bss(struct mac_context *, tLimMlmStartReq *, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 560 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 561 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 562 | QDF_STATUS lim_send_channel_switch_mgmt_frame(struct mac_context *, tSirMacAddr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 563 | uint8_t, uint8_t, uint8_t, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 564 | struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 565 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 566 | QDF_STATUS lim_send_extended_chan_switch_action_frame(struct mac_context *mac_ctx, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 567 | tSirMacAddr peer, uint8_t mode, uint8_t new_op_class, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 568 | uint8_t new_channel, uint8_t count, struct pe_session *session_entry); |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 569 | QDF_STATUS lim_p2p_oper_chan_change_confirm_action_frame( |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 570 | struct mac_context *mac_ctx, tSirMacAddr peer, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 571 | struct pe_session *session_entry); |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 572 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 573 | QDF_STATUS lim_send_neighbor_report_request_frame(struct mac_context *, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 574 | tpSirMacNeighborReportReq, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 575 | tSirMacAddr, struct pe_session *); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 576 | QDF_STATUS lim_send_link_report_action_frame(struct mac_context *, tpSirMacLinkReport, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 577 | tSirMacAddr, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 578 | |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 579 | /** |
| 580 | * lim_send_radio_measure_report_action_frame - Send RRM report action frame |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 581 | * @mac: pointer to global MAC context |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 582 | * @dialog_token: Dialog token to be used in the action frame |
| 583 | * @num_report: number of reports in pRRMReport |
Vignesh Viswanathan | 09bd8f4 | 2018-08-14 22:04:36 +0530 | [diff] [blame] | 584 | * @is_last_frame: is the current report last or more reports to follow |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 585 | * @pRRMReport: Pointer to the RRM report structure |
| 586 | * @peer: MAC address of the peer |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 587 | * @pe_session: Pointer to the PE session entry |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 588 | * |
| 589 | * Return: Ret Status |
| 590 | */ |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 591 | QDF_STATUS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 592 | lim_send_radio_measure_report_action_frame(struct mac_context *mac, |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 593 | uint8_t dialog_token, |
| 594 | uint8_t num_report, |
Vignesh Viswanathan | 09bd8f4 | 2018-08-14 22:04:36 +0530 | [diff] [blame] | 595 | bool is_last_frame, |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 596 | tpSirMacRadioMeasureReport pRRMReport, |
| 597 | tSirMacAddr peer, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 598 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 599 | |
| 600 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 601 | void lim_init_tdls_data(struct mac_context *, struct pe_session *); |
| 602 | QDF_STATUS lim_process_sme_tdls_mgmt_send_req(struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 603 | uint32_t *pMsgBuf); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 604 | QDF_STATUS lim_process_sme_tdls_add_sta_req(struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 605 | uint32_t *pMsgBuf); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 606 | QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 607 | uint32_t *pMsgBuf); |
Ganesh Kondabattini | ac57007 | 2016-12-21 12:45:48 +0530 | [diff] [blame] | 608 | void lim_send_sme_mgmt_tx_completion( |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 609 | struct mac_context *mac, |
Ganesh Kondabattini | ac57007 | 2016-12-21 12:45:48 +0530 | [diff] [blame] | 610 | uint32_t sme_session_id, |
| 611 | uint32_t txCompleteStatus); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 612 | QDF_STATUS lim_delete_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 613 | struct pe_session *session_entry); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 614 | QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *); |
| 615 | void lim_process_tdls_del_sta_rsp(struct mac_context *mac_ctx, |
Padma, Santhosh Kumar | 4eb7908 | 2017-02-24 16:00:20 +0530 | [diff] [blame] | 616 | struct scheduler_msg *lim_msg, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 617 | struct pe_session *session_entry); |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 618 | #else |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 619 | static inline QDF_STATUS lim_delete_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 620 | struct pe_session *session_entry) |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 621 | { |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 622 | return QDF_STATUS_SUCCESS; |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 623 | } |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 624 | static inline void lim_init_tdls_data(struct mac_context *mac, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 625 | struct pe_session *pe_session) |
Kabilan Kannan | 32eb502 | 2016-10-04 12:24:50 -0700 | [diff] [blame] | 626 | { |
| 627 | |
| 628 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 629 | #endif |
| 630 | |
| 631 | /* Algorithms & Link Monitoring related functions */ |
| 632 | /* / Function that handles heartbeat failure */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 633 | void lim_handle_heart_beat_failure(struct mac_context *, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 634 | |
| 635 | /* / Function that triggers link tear down with AP upon HB failure */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 636 | void lim_tear_down_link_with_ap(struct mac_context *, uint8_t, tSirMacReasonCodes); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 637 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 638 | /* / Function that defers the messages received */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 639 | uint32_t lim_defer_msg(struct mac_context *, struct scheduler_msg *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 640 | |
| 641 | /* / Function that Switches the Channel and sets the CB Mode */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 642 | void lim_set_channel(struct mac_context *mac, uint8_t channel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 643 | 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] | 644 | enum phy_ch_width ch_width, int8_t maxTxPower, |
Arif Hussain | 671a190 | 2017-03-17 09:08:32 -0700 | [diff] [blame] | 645 | uint8_t peSessionId, uint32_t cac_duration_ms, |
| 646 | uint32_t dfs_regdomain); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 647 | |
| 648 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 649 | #ifdef ANI_SUPPORT_11H |
| 650 | /* / Function that sends Measurement Report action frame */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 651 | QDF_STATUS lim_send_meas_report_frame(struct mac_context *, tpSirMacMeasReqActionFrame, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 652 | tSirMacAddr, struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 653 | |
| 654 | /* / Function that sends TPC Report action frame */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 655 | QDF_STATUS lim_send_tpc_report_frame(struct mac_context *, tpSirMacTpcReqActionFrame, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 656 | tSirMacAddr, struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 657 | #endif |
| 658 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 659 | /* Function(s) to handle responses received from HAL */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 660 | void lim_process_mlm_add_bss_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 661 | struct scheduler_msg *limMsgQ); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 662 | void lim_process_mlm_add_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 663 | struct scheduler_msg *limMsgQt, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 664 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 665 | void lim_process_mlm_del_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 666 | struct scheduler_msg *limMsgQ); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 667 | void lim_process_mlm_del_bss_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 668 | struct scheduler_msg *limMsgQ, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 669 | struct pe_session *); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 670 | void lim_process_sta_mlm_add_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 671 | struct scheduler_msg *limMsgQ, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 672 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 673 | void lim_process_sta_mlm_del_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 674 | struct scheduler_msg *limMsgQ, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 675 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 676 | void lim_process_sta_mlm_del_bss_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 677 | struct scheduler_msg *limMsgQ, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 678 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 679 | void lim_process_mlm_set_sta_key_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 680 | struct scheduler_msg *limMsgQ); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 681 | void lim_process_mlm_set_bss_key_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 682 | struct scheduler_msg *limMsgQ); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 683 | |
| 684 | /* Function to process WMA_SWITCH_CHANNEL_RSP message */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 685 | void lim_process_switch_channel_rsp(struct mac_context *mac, void *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 686 | |
Sandeep Puligilla | 2a7fa84 | 2018-10-02 01:00:56 -0700 | [diff] [blame] | 687 | QDF_STATUS lim_sta_send_down_link(join_params *param); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 688 | |
| 689 | #ifdef WLAN_FEATURE_11W |
| 690 | /* 11w send SA query request action frame */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 691 | QDF_STATUS lim_send_sa_query_request_frame(struct mac_context *mac, uint8_t *transId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 692 | tSirMacAddr peer, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 693 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 694 | /* 11w SA query request action frame handler */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 695 | QDF_STATUS lim_send_sa_query_response_frame(struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 696 | uint8_t *transId, tSirMacAddr peer, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 697 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 698 | #endif |
| 699 | |
| 700 | /* Inline functions */ |
| 701 | |
| 702 | /** |
| 703 | * lim_post_sme_message() |
| 704 | * |
| 705 | ***FUNCTION: |
| 706 | * This function is called by limProcessMlmMessages(). In this |
| 707 | * function MLM sub-module invokes MLM ind/cnf primitives. |
| 708 | * |
| 709 | ***LOGIC: |
| 710 | * Initially MLM makes an SME function call to invoke MLM ind/cnf |
| 711 | * primitive. In future this can be enhanced to 'post' messages to SME. |
| 712 | * |
| 713 | ***ASSUMPTIONS: |
| 714 | * NA |
| 715 | * |
| 716 | ***NOTE: |
| 717 | * NA |
| 718 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 719 | * @param mac Pointer to Global MAC structure |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 720 | * @param msgType Indicates the MLM primitive message type |
| 721 | * @param *pMsgBuf A pointer to the MLM message buffer |
| 722 | * |
| 723 | * @return None |
| 724 | */ |
| 725 | static inline void |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 726 | lim_post_sme_message(struct mac_context *mac, uint32_t msgType, uint32_t *pMsgBuf) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 727 | { |
Rajeev Kumar | cf7bd80 | 2017-04-18 11:11:42 -0700 | [diff] [blame] | 728 | struct scheduler_msg msg = {0}; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 729 | |
| 730 | if (pMsgBuf == NULL) { |
Srinivas Girigowda | 9ffddb1 | 2017-03-26 22:15:09 -0700 | [diff] [blame] | 731 | pe_err("Buffer is Pointing to NULL"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 732 | return; |
| 733 | } |
| 734 | |
| 735 | msg.type = (uint16_t) msgType; |
| 736 | msg.bodyptr = pMsgBuf; |
| 737 | msg.bodyval = 0; |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 738 | if (msgType > eWNI_SME_MSG_TYPES_BEGIN) { |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 739 | MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG, NO_SESSION, |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 740 | msg.type)); |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 741 | lim_process_sme_req_messages(mac, &msg); |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 742 | } else { |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 743 | lim_process_mlm_rsp_messages(mac, msgType, pMsgBuf); |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 744 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 745 | } /*** end lim_post_sme_message() ***/ |
| 746 | |
| 747 | /** |
| 748 | * lim_post_mlm_message() |
| 749 | * |
| 750 | ***FUNCTION: |
| 751 | * This function is called by limProcessSmeMessages(). In this |
| 752 | * function SME invokes MLME primitives. |
| 753 | * |
| 754 | ***PARAMS: |
| 755 | * |
| 756 | ***LOGIC: |
| 757 | * Initially SME makes an MLM function call to invoke MLM primitive. |
| 758 | * In future this can be enhanced to 'post' messages to MLM. |
| 759 | * |
| 760 | ***ASSUMPTIONS: |
| 761 | * NA |
| 762 | * |
| 763 | ***NOTE: |
| 764 | * NA |
| 765 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 766 | * @param mac Pointer to Global MAC structure |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 767 | * @param msgType Indicates the MLM primitive message type |
| 768 | * @param *pMsgBuf A pointer to the MLM message buffer |
| 769 | * |
| 770 | * @return None |
| 771 | */ |
| 772 | static inline void |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 773 | lim_post_mlm_message(struct mac_context *mac, uint32_t msgType, uint32_t *pMsgBuf) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 774 | { |
Rajeev Kumar | cf7bd80 | 2017-04-18 11:11:42 -0700 | [diff] [blame] | 775 | struct scheduler_msg msg = {0}; |
Srinivas Girigowda | 9ffddb1 | 2017-03-26 22:15:09 -0700 | [diff] [blame] | 776 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 777 | if (pMsgBuf == NULL) { |
Srinivas Girigowda | 9ffddb1 | 2017-03-26 22:15:09 -0700 | [diff] [blame] | 778 | pe_err("Buffer is Pointing to NULL"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 779 | return; |
| 780 | } |
| 781 | msg.type = (uint16_t) msgType; |
| 782 | msg.bodyptr = pMsgBuf; |
| 783 | msg.bodyval = 0; |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 784 | MTRACE(mac_trace_msg_rx(mac, NO_SESSION, msg.type)); |
| 785 | lim_process_mlm_req_messages(mac, &msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 786 | } /*** end lim_post_mlm_message() ***/ |
| 787 | |
| 788 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 789 | * lim_get_ielen_from_bss_description() |
| 790 | * |
| 791 | ***FUNCTION: |
| 792 | * This function is called in various places to get IE length |
| 793 | * from tSirBssDescription structure |
| 794 | * number being scanned. |
| 795 | * |
| 796 | ***PARAMS: |
| 797 | * |
| 798 | ***LOGIC: |
| 799 | * |
| 800 | ***ASSUMPTIONS: |
| 801 | * NA |
| 802 | * |
| 803 | ***NOTE: |
| 804 | * NA |
| 805 | * |
| 806 | * @param pBssDescr |
| 807 | * @return Total IE length |
| 808 | */ |
| 809 | |
| 810 | static inline uint16_t |
| 811 | lim_get_ielen_from_bss_description(tpSirBssDescription pBssDescr) |
| 812 | { |
| 813 | uint16_t ielen; |
| 814 | |
| 815 | if (!pBssDescr) |
| 816 | return 0; |
| 817 | |
| 818 | /* |
| 819 | * Length of BSS desription is without length of |
| 820 | * length itself and length of pointer |
| 821 | * that holds ieFields |
| 822 | * |
| 823 | * <------------sizeof(tSirBssDescription)--------------------> |
| 824 | * +--------+---------------------------------+---------------+ |
| 825 | * | length | other fields | pointer to IEs| |
| 826 | * +--------+---------------------------------+---------------+ |
| 827 | * ^ |
| 828 | * ieFields |
| 829 | */ |
| 830 | |
| 831 | ielen = (uint16_t)(pBssDescr->length + sizeof(pBssDescr->length) - |
| 832 | GET_FIELD_OFFSET(tSirBssDescription, ieFields)); |
| 833 | |
| 834 | return ielen; |
| 835 | } /*** end lim_get_ielen_from_bss_description() ***/ |
| 836 | |
| 837 | /** |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 838 | * lim_send_beacon_ind() - send the beacon indication |
| 839 | * @mac_ctx: pointer to mac structure |
| 840 | * @session: pe session |
| 841 | * @reason: beacon update reason |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 842 | * |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 843 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 844 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 845 | QDF_STATUS lim_send_beacon_ind(struct mac_context *mac_ctx, struct pe_session *session, |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 846 | enum sir_bcn_update_reason reason); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 847 | |
| 848 | void |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 849 | lim_send_vdev_restart(struct mac_context *mac, struct pe_session *pe_session, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 850 | uint8_t sessionId); |
| 851 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 852 | void lim_wpspbc_close(struct mac_context *mac, struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 853 | |
| 854 | #define LIM_WPS_OVERLAP_TIMER_MS 10000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 855 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 856 | void lim_process_disassoc_ack_timeout(struct mac_context *mac); |
| 857 | void lim_process_deauth_ack_timeout(struct mac_context *mac); |
| 858 | QDF_STATUS lim_send_disassoc_cnf(struct mac_context *mac); |
| 859 | QDF_STATUS lim_send_deauth_cnf(struct mac_context *mac); |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 860 | |
| 861 | /** |
| 862 | * lim_disassoc_tx_complete_cnf() - callback to indicate Tx completion |
| 863 | * @context: pointer to mac structure |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 864 | * @txCompleteSuccess: indicates tx success/failure |
| 865 | * @params: tx completion params |
| 866 | * |
| 867 | * function will be invoked on receiving tx completion indication |
| 868 | * |
| 869 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
| 870 | */ |
| 871 | QDF_STATUS lim_disassoc_tx_complete_cnf(void *context, |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 872 | uint32_t txCompleteSuccess, |
| 873 | void *params); |
| 874 | |
| 875 | /** |
| 876 | * lim_deauth_tx_complete_cnf() - callback to indicate Tx completion |
| 877 | * @context: pointer to mac structure |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 878 | * @txCompleteSuccess: indicates tx success/failure |
| 879 | * @params: tx completion params |
| 880 | * |
| 881 | * function will be invoked on receiving tx completion indication |
| 882 | * |
| 883 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
| 884 | */ |
| 885 | QDF_STATUS lim_deauth_tx_complete_cnf(void *context, |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 886 | uint32_t txCompleteSuccess, |
| 887 | void *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 888 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 889 | typedef struct sSetLinkCbackParams { |
| 890 | void *cbackDataPtr; |
| 891 | } tSetLinkCbackParams; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 892 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 893 | void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac_ctx, |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 894 | QDF_STATUS status, uint32_t *ctx); |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 895 | |
| 896 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 897 | QDF_STATUS lim_process_sme_del_all_tdls_peers(struct mac_context *p_mac, |
Nitesh Shah | 99dd955 | 2017-03-20 19:27:47 +0530 | [diff] [blame] | 898 | uint32_t *msg_buf); |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 899 | #else |
| 900 | static inline |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 901 | QDF_STATUS lim_process_sme_del_all_tdls_peers(struct mac_context *p_mac, |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 902 | uint32_t *msg_buf) |
| 903 | { |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 904 | return QDF_STATUS_SUCCESS; |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 905 | } |
| 906 | #endif |
| 907 | |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 908 | /** |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 909 | * lim_send_bcn_rsp() - handle beacon send response |
| 910 | * @mac_ctx Pointer to Global MAC structure |
| 911 | * @rsp: beacon send response |
| 912 | * |
| 913 | * Return: None |
| 914 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 915 | void lim_send_bcn_rsp(struct mac_context *mac_ctx, tpSendbeaconParams rsp); |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 916 | |
| 917 | /** |
Pragaspathi Thilagaraj | 30251ec | 2018-12-18 17:22:57 +0530 | [diff] [blame] | 918 | * lim_remove_duplicate_bssid_node() - remove duplicate bssid from the |
| 919 | * @entry: entry to check for which the duplicate entry is present |
| 920 | * @list: mac_ctx->roam.rssi_disallow_bssid list |
| 921 | * |
| 922 | * Return: None |
| 923 | */ |
| 924 | void lim_remove_duplicate_bssid_node(struct sir_rssi_disallow_lst *entry, |
| 925 | qdf_list_t *list); |
| 926 | |
| 927 | /** |
| 928 | * lim_add_roam_blacklist_ap() - handle the blacklist bssid list received from |
| 929 | * firmware |
| 930 | * @mac_ctx: Pointer to Global MAC structure |
| 931 | * @list: roam blacklist ap list |
| 932 | * |
| 933 | * Return: None |
| 934 | */ |
| 935 | void lim_add_roam_blacklist_ap(struct mac_context *mac_ctx, |
| 936 | struct roam_blacklist_event *src_lst); |
| 937 | |
| 938 | /** |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 939 | * lim_process_rx_channel_status_event() - processes |
| 940 | * event WDA_RX_CHN_STATUS_EVENT |
| 941 | * @mac_ctx Pointer to Global MAC structure |
| 942 | * @buf: Received message info |
| 943 | * |
| 944 | * Return: None |
| 945 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 946 | void lim_process_rx_channel_status_event(struct mac_context *mac_ctx, void *buf); |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 947 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 948 | /* / Bit value data structure */ |
| 949 | typedef enum sHalBitVal /* For Bit operations */ |
| 950 | { |
| 951 | eHAL_CLEAR, |
| 952 | eHAL_SET |
| 953 | } tHalBitVal; |
| 954 | |
| 955 | enum { |
| 956 | eHI_PRI, |
| 957 | ePROT, |
| 958 | eDBG |
| 959 | }; |
| 960 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 961 | QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx, |
Kiran Kumar Lokere | aee823a | 2018-03-22 15:27:05 -0700 | [diff] [blame] | 962 | tSirMacAddr peer_mac, uint16_t tid, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 963 | struct pe_session *session, |
Kiran Kumar Lokere | aee823a | 2018-03-22 15:27:05 -0700 | [diff] [blame] | 964 | uint8_t addba_extn_present, |
| 965 | uint8_t amsdu_support); |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 966 | /** |
| 967 | * lim_process_join_failure_timeout() - This function is called to process |
| 968 | * JoinFailureTimeout |
| 969 | * |
| 970 | * @mac_ctx: Pointer to Global MAC structure |
| 971 | * |
| 972 | * This function is called to process JoinFailureTimeout |
| 973 | * |
| 974 | * @Return None |
| 975 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 976 | void lim_process_join_failure_timeout(struct mac_context *mac_ctx); |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 977 | |
| 978 | /** |
| 979 | * lim_process_auth_failure_timeout() - This function is called to process Min |
| 980 | * Channel Timeout during channel scan. |
| 981 | * |
| 982 | * @mac_ctx: Pointer to Global MAC structure |
| 983 | * |
| 984 | * This function is called to process Min Channel Timeout during channel scan. |
| 985 | * |
| 986 | * @Return: None |
| 987 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 988 | void lim_process_auth_failure_timeout(struct mac_context *mac_ctx); |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 989 | |
| 990 | /** |
| 991 | * lim_process_assoc_failure_timeout() - This function is called to process Min |
| 992 | * Channel Timeout during channel scan. |
| 993 | * |
| 994 | * @mac_ctx: Pointer to Global MAC structure |
| 995 | * @msg_type: Assoc or reassoc |
| 996 | * |
| 997 | * This function is called to process Min Channel Timeout during channel scan. |
| 998 | * |
| 999 | * @Return: None |
| 1000 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1001 | void lim_process_assoc_failure_timeout(struct mac_context *mac_ctx, |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 1002 | uint32_t msg_type); |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 1003 | |
| 1004 | /** |
| 1005 | * lim_send_mgmt_frame_tx() - Sends mgmt frame |
| 1006 | * @mac_ctx Pointer to Global MAC structure |
| 1007 | * @msg: Received message info |
| 1008 | * |
| 1009 | * Return: None |
| 1010 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1011 | void lim_send_mgmt_frame_tx(struct mac_context *mac_ctx, |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 1012 | struct scheduler_msg *msg); |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1013 | |
| 1014 | /** |
| 1015 | * lim_send_csa_restart_req() - send csa restart req |
| 1016 | * @mac_ctx Pointer to Global MAC structure |
| 1017 | * @vdev_id: vdev id |
| 1018 | * |
| 1019 | * Return: None |
| 1020 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1021 | void lim_send_csa_restart_req(struct mac_context *mac_ctx, uint8_t vdev_id); |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1022 | |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 1023 | /** |
| 1024 | * lim_process_mlm_start_req() - process MLM_START_REQ message |
| 1025 | * |
| 1026 | * @mac_ctx: global MAC context |
| 1027 | * @mlm_start_req: Pointer to start req |
| 1028 | * |
| 1029 | * This function is called to process MLM_START_REQ message |
| 1030 | * from SME. MLME now waits for HAL to send WMA_ADD_BSS_RSP. |
| 1031 | * |
| 1032 | * Return: None |
| 1033 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1034 | void lim_process_mlm_start_req(struct mac_context *mac_ctx, |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 1035 | tLimMlmStartReq *mlm_start_req); |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 1036 | |
Sandeep Puligilla | 45e0c5e | 2018-09-21 00:38:23 -0700 | [diff] [blame] | 1037 | /** |
| 1038 | * lim_process_mlm_join_req() - process mlm join request. |
| 1039 | * |
| 1040 | * @mac_ctx: Pointer to Global MAC structure |
| 1041 | * @msg: Pointer to the MLM message buffer |
| 1042 | * |
| 1043 | * This function is called to process MLM_JOIN_REQ message |
| 1044 | * from SME. It does following: |
| 1045 | * 1) Initialize LIM, HAL, DPH |
| 1046 | * 2) Configure the BSS for which the JOIN REQ was received |
| 1047 | * a) Send WMA_ADD_BSS_REQ to HAL - |
| 1048 | * This will identify the BSS that we are interested in |
| 1049 | * --AND-- |
| 1050 | * Add a STA entry for the AP (in a STA context) |
| 1051 | * b) Wait for WMA_ADD_BSS_RSP |
| 1052 | * c) Send WMA_ADD_STA_REQ to HAL |
| 1053 | * This will add the "local STA" entry to the STA table |
| 1054 | * 3) Continue as before, i.e, |
| 1055 | * a) Send a PROBE REQ |
| 1056 | * b) Wait for PROBE RSP/BEACON containing the SSID that |
| 1057 | * we are interested in |
| 1058 | * c) Then start an AUTH seq |
| 1059 | * d) Followed by the ASSOC seq |
| 1060 | * |
| 1061 | * @Return: None |
| 1062 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1063 | void lim_process_mlm_join_req(struct mac_context *mac_ctx, |
Sandeep Puligilla | 45e0c5e | 2018-09-21 00:38:23 -0700 | [diff] [blame] | 1064 | tLimMlmJoinReq *mlm_join_req); |
Sandeep Puligilla | 30bb840 | 2018-09-23 22:01:08 -0700 | [diff] [blame] | 1065 | |
| 1066 | /* |
| 1067 | * lim_process_mlm_deauth_req() - This function is called to process |
| 1068 | * MLM_DEAUTH_REQ message from SME |
| 1069 | * |
| 1070 | * @mac_ctx: Pointer to Global MAC structure |
| 1071 | * @msg_buf: A pointer to the MLM message buffer |
| 1072 | * |
| 1073 | * This function is called to process MLM_DEAUTH_REQ message from SME |
| 1074 | * |
| 1075 | * @Return: None |
| 1076 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1077 | void lim_process_mlm_deauth_req(struct mac_context *mac_ctx, uint32_t *msg_buf); |
Sandeep Puligilla | 30bb840 | 2018-09-23 22:01:08 -0700 | [diff] [blame] | 1078 | |
| 1079 | #ifdef CONFIG_VDEV_SM |
| 1080 | /** |
| 1081 | * lim_sta_mlme_vdev_disconnect_bss() - Disconnect from BSS |
| 1082 | * @vdev_mlme_obj: VDEV MLME comp object |
| 1083 | * @data_len: data size |
| 1084 | * @data: event data |
| 1085 | * |
| 1086 | * API invokes BSS disconnection |
| 1087 | * |
| 1088 | * Return: SUCCESS on successful completion of disconnection |
| 1089 | * FAILURE, if it fails due to any |
| 1090 | */ |
| 1091 | QDF_STATUS lim_sta_mlme_vdev_disconnect_bss(struct vdev_mlme_obj *vdev_mlme, |
| 1092 | uint16_t data_len, void *data); |
| 1093 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1094 | #endif /* __LIM_TYPES_H */ |