Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Yue Ma | e63f42f | 2019-12-23 16:39:30 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2020 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) |
Harprit Chhabada | e40b310 | 2019-02-27 11:49:11 -0800 | [diff] [blame] | 69 | #define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 15) |
| 70 | #define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 16) |
| 71 | #define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 17) |
| 72 | #define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 18) |
| 73 | #define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 19) |
| 74 | #define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 20) |
| 75 | #define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 21) |
| 76 | #define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 22) |
Harprit Chhabada | e40b310 | 2019-02-27 11:49:11 -0800 | [diff] [blame] | 77 | #define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 24) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 78 | #define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30) |
| 79 | #define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31) |
| 80 | /* |
| 81 | * Values (LIM_MLM_MSG_START + 32) through |
| 82 | * (LIM_MLM_MSG_START + 40) are unused. |
| 83 | */ |
Krishna Kumaar Natarajan | c5e06ac | 2016-06-30 16:49:19 -0700 | [diff] [blame] | 84 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 85 | #define LIM_WEP_IN_FC 1 |
| 86 | #define LIM_NO_WEP_IN_FC 0 |
| 87 | |
| 88 | #define LIM_DECRYPT_ICV_FAIL 1 |
| 89 | |
| 90 | /* / Definitions to distinquish between Association/Reassociaton */ |
| 91 | #define LIM_ASSOC 0 |
| 92 | #define LIM_REASSOC 1 |
| 93 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 94 | /* / Verifies whether given mac addr matches the CURRENT Bssid */ |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 95 | #define IS_CURRENT_BSSID(mac, addr, pe_session) (!qdf_mem_cmp(addr, \ |
| 96 | pe_session->bssId, \ |
| 97 | sizeof(pe_session->bssId))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 98 | /* / Verifies whether given addr matches the REASSOC Bssid */ |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 99 | #define IS_REASSOC_BSSID(mac, addr, pe_session) (!qdf_mem_cmp(addr, \ |
| 100 | pe_session->limReAssocbssId, \ |
| 101 | sizeof(pe_session->limReAssocbssId))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 102 | |
| 103 | #define REQ_TYPE_REGISTRAR (0x2) |
| 104 | #define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3) |
| 105 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 106 | #define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0) |
| 107 | #define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1) |
| 108 | #define RESP_TYPE_AP (0x3) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 109 | |
| 110 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | #define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 /* bit 1 for STA overwrite with selfSta Requested. */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 112 | |
| 113 | #define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 /* Bit 6 will be used to control BD rate for Management frames */ |
| 114 | #define HAL_USE_PEER_STA_REQUESTED_MASK 0x80 /* bit 7 will be used to control frames for p2p interface */ |
| 115 | |
Krunal Soni | fa6c7f5 | 2018-08-07 11:54:19 -0700 | [diff] [blame] | 116 | #define LIM_DOS_PROTECTION_TIME 1000 //1000ms |
Pragaspathi Thilagaraj | 30251ec | 2018-12-18 17:22:57 +0530 | [diff] [blame] | 117 | #define LIM_MIN_RSSI 0 /* 0dbm */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 118 | /* enums used by LIM are as follows */ |
| 119 | |
| 120 | enum eLimDisassocTrigger { |
| 121 | eLIM_HOST_DISASSOC, |
| 122 | eLIM_PEER_ENTITY_DISASSOC, |
| 123 | eLIM_LINK_MONITORING_DISASSOC, |
| 124 | eLIM_PROMISCUOUS_MODE_DISASSOC, |
| 125 | eLIM_HOST_DEAUTH, |
| 126 | eLIM_PEER_ENTITY_DEAUTH, |
| 127 | eLIM_LINK_MONITORING_DEAUTH, |
| 128 | eLIM_JOIN_FAILURE, |
Sandeep Puligilla | 7e3e3c5 | 2016-09-02 17:54:21 -0700 | [diff] [blame] | 129 | eLIM_REASSOC_REJECT, |
| 130 | eLIM_DUPLICATE_ENTRY |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 131 | }; |
| 132 | |
Abhishek Singh | 4e8524a | 2019-06-20 09:59:58 +0530 | [diff] [blame] | 133 | /** |
| 134 | * enum eChannelChangeReasonCodes - Reason code to determine the channel change |
| 135 | * reason |
| 136 | * @LIM_SWITCH_CHANNEL_REASSOC: channel switch to reassoc |
| 137 | * @LIM_SWITCH_CHANNEL_JOIN: switch for connect req |
| 138 | * @LIM_SWITCH_CHANNEL_OPERATION: Generic change channel for STA |
| 139 | * @LIM_SWITCH_CHANNEL_SAP_DFS: SAP channel change req |
| 140 | * @LIM_SWITCH_CHANNEL_HT_WIDTH: HT channel width change reg |
| 141 | * @LIM_SWITCH_CHANNEL_MONITOR: Monitor mode channel change req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 142 | */ |
| 143 | enum eChannelChangeReasonCodes { |
| 144 | LIM_SWITCH_CHANNEL_REASSOC, |
| 145 | LIM_SWITCH_CHANNEL_JOIN, |
Abhishek Singh | 4e8524a | 2019-06-20 09:59:58 +0530 | [diff] [blame] | 146 | LIM_SWITCH_CHANNEL_OPERATION, |
| 147 | LIM_SWITCH_CHANNEL_SAP_DFS, |
| 148 | LIM_SWITCH_CHANNEL_HT_WIDTH, |
| 149 | LIM_SWITCH_CHANNEL_MONITOR, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 150 | }; |
| 151 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 152 | typedef struct sLimMlmStartReq { |
| 153 | tSirMacSSid ssId; |
Pragaspathi Thilagaraj | afd0a48 | 2019-05-23 13:02:36 +0530 | [diff] [blame] | 154 | enum bss_type bssType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 155 | tSirMacAddr bssId; |
| 156 | tSirMacBeaconInterval beaconPeriod; |
| 157 | uint8_t dtimPeriod; |
| 158 | tSirMacCfParamSet cfParamSet; |
Kiran Kumar Lokere | 987377e | 2019-08-29 12:27:14 -0700 | [diff] [blame] | 159 | uint32_t oper_ch_freq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 160 | ePhyChanBondState cbMode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 161 | tSirMacRateSet rateSet; |
| 162 | uint8_t sessionId; /* Added For BT-AMP Support */ |
| 163 | |
| 164 | /* Parameters reqd for new HAL (message) interface */ |
| 165 | tSirNwType nwType; |
| 166 | uint8_t htCapable; |
| 167 | tSirMacHTOperatingMode htOperMode; |
| 168 | uint8_t dualCTSProtection; |
| 169 | uint8_t txChannelWidthSet; |
| 170 | uint8_t ssidHidden; |
| 171 | uint8_t wps_state; |
| 172 | uint8_t obssProtEnabled; |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 173 | uint16_t beacon_tx_rate; |
Arif Hussain | 671a190 | 2017-03-17 09:08:32 -0700 | [diff] [blame] | 174 | uint32_t cac_duration_ms; |
| 175 | uint32_t dfs_regdomain; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 176 | } tLimMlmStartReq, *tpLimMlmStartReq; |
| 177 | |
| 178 | typedef struct sLimMlmStartCnf { |
| 179 | tSirResultCodes resultCode; |
| 180 | uint8_t sessionId; |
| 181 | } tLimMlmStartCnf, *tpLimMlmStartCnf; |
| 182 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 183 | typedef struct sLimMlmJoinCnf { |
| 184 | tSirResultCodes resultCode; |
| 185 | uint16_t protStatusCode; |
| 186 | uint8_t sessionId; |
| 187 | } tLimMlmJoinCnf, *tpLimMlmJoinCnf; |
| 188 | |
| 189 | typedef struct sLimMlmAssocReq { |
| 190 | tSirMacAddr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 191 | uint16_t capabilityInfo; |
| 192 | tSirMacListenInterval listenInterval; |
| 193 | uint8_t sessionId; |
| 194 | } tLimMlmAssocReq, *tpLimMlmAssocReq; |
| 195 | |
| 196 | typedef struct sLimMlmAssocCnf { |
| 197 | tSirResultCodes resultCode; /* Internal status code. */ |
| 198 | uint16_t protStatusCode; /* Protocol Status code. */ |
| 199 | uint8_t sessionId; |
| 200 | } tLimMlmAssocCnf, *tpLimMlmAssocCnf; |
| 201 | |
| 202 | typedef struct sLimMlmAssocInd { |
| 203 | tSirMacAddr peerMacAddr; |
| 204 | uint16_t aid; |
| 205 | tAniAuthType authType; |
Min Liu | ddd2330 | 2018-12-05 16:17:48 +0800 | [diff] [blame] | 206 | enum ani_akm_type akm_type; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 207 | tAniSSID ssId; |
| 208 | tSirRSNie rsnIE; |
| 209 | tSirWAPIie wapiIE; |
| 210 | tSirAddie addIE; /* additional IE received from the peer, which possibly includes WSC IE and/or P2P IE. */ |
| 211 | tSirMacCapabilityInfo capabilityInfo; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 212 | bool spectrumMgtIndicator; |
Jeff Johnson | 39f02ae | 2019-02-01 23:42:38 -0800 | [diff] [blame] | 213 | struct power_cap_info powerCap; |
Jeff Johnson | ed4f4d5 | 2019-02-02 00:09:45 -0800 | [diff] [blame] | 214 | struct supported_channels supportedChannels; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 215 | uint8_t sessionId; |
| 216 | |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 217 | bool WmmStaInfoPresent; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 218 | |
| 219 | /* Required for indicating the frames to upper layer */ |
| 220 | uint32_t beaconLength; |
| 221 | uint8_t *beaconPtr; |
| 222 | uint32_t assocReqLength; |
| 223 | uint8_t *assocReqPtr; |
Jeff Johnson | a7d5b54 | 2019-02-03 10:15:46 -0800 | [diff] [blame] | 224 | struct oem_channel_info chan_info; |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 225 | bool ampdu; |
| 226 | bool sgi_enable; |
| 227 | bool tx_stbc; |
| 228 | bool rx_stbc; |
| 229 | tSirMacHTChannelWidth ch_width; |
| 230 | enum sir_sme_phy_mode mode; |
| 231 | uint8_t max_supp_idx; |
| 232 | uint8_t max_ext_idx; |
| 233 | uint8_t max_mcs_idx; |
| 234 | uint8_t rx_mcs_map; |
| 235 | uint8_t tx_mcs_map; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 236 | uint8_t ecsa_capable; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 237 | |
| 238 | tDot11fIEHTCaps ht_caps; |
| 239 | tDot11fIEVHTCaps vht_caps; |
Ashish Kumar Dhanotiya | 6025c70 | 2019-03-20 18:48:49 +0530 | [diff] [blame] | 240 | bool he_caps_present; |
Srinivas Dasari | 5f52820 | 2019-02-11 17:29:43 +0530 | [diff] [blame] | 241 | bool is_sae_authenticated; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 242 | } tLimMlmAssocInd, *tpLimMlmAssocInd; |
| 243 | |
| 244 | typedef struct sLimMlmReassocReq { |
| 245 | tSirMacAddr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 246 | uint16_t capabilityInfo; |
| 247 | tSirMacListenInterval listenInterval; |
| 248 | uint8_t sessionId; |
| 249 | } tLimMlmReassocReq, *tpLimMlmReassocReq; |
| 250 | |
| 251 | typedef struct sLimMlmReassocCnf { |
| 252 | tSirResultCodes resultCode; |
| 253 | uint16_t protStatusCode; /* Protocol Status code. */ |
| 254 | uint8_t sessionId; |
| 255 | } tLimMlmReassocCnf, *tpLimMlmReassocCnf; |
| 256 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 257 | typedef struct sLimMlmAuthCnf { |
| 258 | tSirMacAddr peerMacAddr; |
| 259 | tAniAuthType authType; |
| 260 | tSirResultCodes resultCode; |
| 261 | uint16_t protStatusCode; |
| 262 | uint8_t sessionId; |
| 263 | } tLimMlmAuthCnf, *tpLimMlmAuthCnf; |
| 264 | |
| 265 | typedef struct sLimMlmDeauthReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 266 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 267 | uint16_t reasonCode; |
| 268 | uint16_t deauthTrigger; |
| 269 | uint16_t aid; |
| 270 | uint8_t sessionId; /* Added for BT-AMP SUPPORT */ |
| 271 | |
| 272 | } tLimMlmDeauthReq, *tpLimMlmDeauthReq; |
| 273 | |
| 274 | typedef struct sLimMlmDeauthCnf { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 275 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 276 | tSirResultCodes resultCode; |
| 277 | uint16_t deauthTrigger; |
| 278 | uint16_t aid; |
| 279 | uint8_t sessionId; |
| 280 | } tLimMlmDeauthCnf, *tpLimMLmDeauthCnf; |
| 281 | |
| 282 | typedef struct sLimMlmDeauthInd { |
| 283 | tSirMacAddr peerMacAddr; |
| 284 | uint16_t reasonCode; |
| 285 | uint16_t deauthTrigger; |
| 286 | uint16_t aid; |
| 287 | } tLimMlmDeauthInd, *tpLimMlmDeauthInd; |
| 288 | |
| 289 | typedef struct sLimMlmDisassocReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 290 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 291 | uint16_t reasonCode; |
| 292 | uint16_t disassocTrigger; |
| 293 | uint16_t aid; |
| 294 | uint8_t sessionId; |
| 295 | } tLimMlmDisassocReq, *tpLimMlmDisassocReq; |
| 296 | |
| 297 | typedef struct sLimMlmDisassocCnf { |
| 298 | tSirMacAddr peerMacAddr; |
| 299 | tSirResultCodes resultCode; |
| 300 | uint16_t disassocTrigger; |
| 301 | uint16_t aid; |
| 302 | uint8_t sessionId; |
| 303 | } tLimMlmDisassocCnf, *tpLimMlmDisassocCnf; |
| 304 | |
| 305 | typedef struct sLimMlmDisassocInd { |
| 306 | tSirMacAddr peerMacAddr; |
| 307 | uint16_t reasonCode; |
| 308 | uint16_t disassocTrigger; |
| 309 | uint16_t aid; |
| 310 | uint8_t sessionId; |
| 311 | } tLimMlmDisassocInd, *tpLimMlmDisassocInd; |
| 312 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 313 | typedef struct sLimMlmPurgeStaInd { |
| 314 | tSirMacAddr peerMacAddr; |
| 315 | uint16_t reasonCode; |
| 316 | uint16_t purgeTrigger; |
| 317 | uint16_t aid; |
| 318 | uint8_t sessionId; |
| 319 | } tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd; |
| 320 | |
Deepak Dhamdhere | 0716816 | 2016-10-19 20:45:20 -0700 | [diff] [blame] | 321 | /** |
| 322 | * struct sLimMlmSetKeysCnf - set key confirmation parameters |
| 323 | * @peer_macaddr: peer mac address |
| 324 | * @resultCode: Result of set key operation |
| 325 | * @aid: association id |
| 326 | * @sessionId: PE session id |
| 327 | * @key_len_nonzero: Keys are non-zero length |
| 328 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 329 | typedef struct sLimMlmSetKeysCnf { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 330 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 331 | uint16_t resultCode; |
| 332 | uint16_t aid; |
| 333 | uint8_t sessionId; |
Deepak Dhamdhere | 0716816 | 2016-10-19 20:45:20 -0700 | [diff] [blame] | 334 | bool key_len_nonzero; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 335 | } tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf; |
| 336 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 337 | /* Function templates */ |
| 338 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 339 | bool lim_process_sme_req_messages(struct mac_context *, struct scheduler_msg *); |
| 340 | void lim_process_mlm_req_messages(struct mac_context *, struct scheduler_msg *); |
| 341 | void lim_process_mlm_rsp_messages(struct mac_context *, uint32_t, uint32_t *); |
Abhishek Ambure | 2bd960b | 2019-08-21 16:30:53 +0530 | [diff] [blame] | 342 | void lim_process_sme_del_bss_rsp(struct mac_context *mac, |
| 343 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 344 | |
Abhishek Singh | c5a5408 | 2018-09-12 16:08:03 +0530 | [diff] [blame] | 345 | /** |
| 346 | * lim_process_mlm_start_cnf(): called to processes MLM_START_CNF message from |
| 347 | * MLM State machine. |
| 348 | * @mac_ctx: Pointer to Global MAC structure |
| 349 | * @msg_buf: A pointer to the MLM message buffer |
| 350 | * |
| 351 | * Return: None |
| 352 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 353 | 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] | 354 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 355 | void lim_get_random_bssid(struct mac_context *mac, uint8_t *data); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 356 | |
| 357 | /* Function to handle HT and HT IE CFG parameter intializations */ |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 358 | void handle_ht_capabilityand_ht_info(struct mac_context *mac, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 359 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 360 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 361 | void lim_handle_param_update(struct mac_context *mac, eUpdateIEsType cfgId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 362 | |
| 363 | /* Function to apply CFG parameters before join/reassoc/start BSS */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 364 | void lim_apply_configuration(struct mac_context *, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 365 | |
Pragaspathi Thilagaraj | 1ee7600 | 2018-09-18 21:38:51 +0530 | [diff] [blame] | 366 | /** |
| 367 | * lim_set_cfg_protection() - sets lim global cfg cache from the config |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 368 | * @mac: global mac context |
Pragaspathi Thilagaraj | 1ee7600 | 2018-09-18 21:38:51 +0530 | [diff] [blame] | 369 | * @pesessionEntry: PE session |
| 370 | * |
| 371 | * Return none |
| 372 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 373 | 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] | 374 | |
| 375 | /* Function to Initialize MLM state machine on STA */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 376 | QDF_STATUS lim_init_mlm(struct mac_context *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 377 | |
| 378 | /* Function to cleanup MLM state machine */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 379 | void lim_cleanup_mlm(struct mac_context *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 380 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 381 | /* Management frame handling functions */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 382 | void lim_process_beacon_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 383 | void lim_process_probe_req_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 384 | void lim_process_probe_rsp_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 385 | 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] | 386 | struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 387 | |
| 388 | /* Process Auth frame when we have a session in progress. */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 389 | void lim_process_auth_frame(struct mac_context *, uint8_t *, struct pe_session *); |
Pragaspathi Thilagaraj | 21b88d2 | 2019-08-01 20:11:53 +0530 | [diff] [blame] | 390 | |
| 391 | /** |
| 392 | * lim_process_auth_frame_no_session() - Process auth frame received from AP to |
| 393 | * which we are not connected currently. |
| 394 | * @mac: Pointer to global mac context |
| 395 | * @bd: Pointer to rx auth frame |
| 396 | * @body: Pointer to lim_msg->body_ptr |
| 397 | * |
| 398 | * This is possibly the pre-auth from the neighbor AP, in the same mobility |
| 399 | * domain or pre-authentication reply for WPA3 SAE roaming. |
| 400 | * This will be used in case of 11r FT. |
| 401 | */ |
| 402 | QDF_STATUS lim_process_auth_frame_no_session(struct mac_context *mac, |
| 403 | uint8_t *bd, void *body); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 404 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 405 | void lim_process_assoc_req_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *); |
bings | 8551233 | 2019-09-04 17:46:37 +0800 | [diff] [blame] | 406 | |
| 407 | /** |
| 408 | * lim_fill_lim_assoc_ind_params() - Initialize lim association indication |
| 409 | * @assoc_ind: PE association indication structure |
| 410 | * @mac_ctx: Pointer to Global MAC structure |
| 411 | * @sta_ds: station dph entry |
| 412 | * @session_entry: PE session entry |
| 413 | * |
| 414 | * Return: true if lim assoc ind filled successfully |
| 415 | */ |
| 416 | bool lim_fill_lim_assoc_ind_params( |
| 417 | tpLimMlmAssocInd assoc_ind, |
| 418 | struct mac_context *mac_ctx, |
| 419 | tpDphHashNode sta_ds, |
| 420 | struct pe_session *session_entry); |
| 421 | |
| 422 | /** |
| 423 | * lim_fill_sme_assoc_ind_params() - Initialize association indication |
| 424 | * @mac_ctx: Pointer to Global MAC structure |
| 425 | * @assoc_ind: PE association indication structure |
| 426 | * @sme_assoc_ind: SME association indication |
| 427 | * @session_entry: PE session entry |
Chaoli Zhou | 98d1b3e | 2019-10-10 17:13:44 +0800 | [diff] [blame] | 428 | * @assoc_req_alloc: malloc memory for assoc_req or not |
bings | 8551233 | 2019-09-04 17:46:37 +0800 | [diff] [blame] | 429 | * |
| 430 | * Return: None |
| 431 | */ |
| 432 | void |
| 433 | lim_fill_sme_assoc_ind_params( |
| 434 | struct mac_context *mac_ctx, |
| 435 | tpLimMlmAssocInd assoc_ind, struct assoc_ind *sme_assoc_ind, |
Chaoli Zhou | 98d1b3e | 2019-10-10 17:13:44 +0800 | [diff] [blame] | 436 | struct pe_session *session_entry, bool assoc_req_alloc); |
Jeff Johnson | bddc03e | 2019-01-17 15:37:09 -0800 | [diff] [blame] | 437 | void lim_send_mlm_assoc_ind(struct mac_context *mac, tpDphHashNode sta, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 438 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 439 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 440 | void lim_process_assoc_rsp_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *); |
| 441 | 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] | 442 | /* |
| 443 | * lim_perform_disassoc() - Actual action taken after receiving disassoc |
| 444 | * @mac_ctx: Global MAC context |
| 445 | * @frame_rssi: RSSI of the frame |
| 446 | * @rc: Reason code of the deauth |
| 447 | * @pe_session: PE session entry pointer |
| 448 | * @addr: BSSID from which the disassoc is received |
| 449 | * |
| 450 | * Return: None |
| 451 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 452 | 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] | 453 | uint16_t rc, struct pe_session *pe_session, |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 454 | tSirMacAddr addr); |
| 455 | /* |
| 456 | * lim_disassoc_tdls_peers() - Disassoc action for tdls peers |
| 457 | * @mac_ctx: Global MAC context |
| 458 | * @pe_session: PE session entry pointer |
| 459 | * @addr: BSSID from which the disassoc is received |
| 460 | * |
| 461 | * Return: None |
| 462 | */ |
| 463 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 464 | void lim_disassoc_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 465 | struct pe_session *pe_session, tSirMacAddr addr); |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 466 | #else |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 467 | static inline void lim_disassoc_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 468 | struct pe_session *pe_session, tSirMacAddr addr) |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 469 | { |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 470 | } |
| 471 | #endif |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 472 | 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] | 473 | /* |
| 474 | * lim_perform_deauth() - Actual action taken after receiving deauth |
| 475 | * @mac_ctx: Global MAC context |
| 476 | * @pe_session: PE session entry pointer |
| 477 | * @rc: Reason code of the deauth |
| 478 | * @addr: BSSID from which the deauth is received |
| 479 | * @frame_rssi: RSSI of the frame |
| 480 | * |
| 481 | * Return: None |
| 482 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 483 | 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] | 484 | uint16_t rc, tSirMacAddr addr, int32_t frame_rssi); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 485 | void lim_process_action_frame(struct mac_context *, uint8_t *, struct pe_session *); |
| 486 | 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] | 487 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 488 | 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] | 489 | tSirMacAddr, tSirMacAddr); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 490 | QDF_STATUS lim_send_probe_req_mgmt_frame(struct mac_context *, tSirMacSSid *, |
Amruta Kulkarni | 1d93a85 | 2020-02-11 11:05:41 -0800 | [diff] [blame] | 491 | tSirMacAddr, qdf_freq_t, tSirMacAddr, |
| 492 | uint32_t, uint16_t *, uint8_t *); |
Jeff Johnson | 3c08ace | 2019-03-12 08:50:37 -0700 | [diff] [blame] | 493 | |
| 494 | /** |
| 495 | * lim_send_probe_rsp_mgmt_frame() - Send probe response |
| 496 | * @mac_ctx: Handle for mac context |
| 497 | * @peer_macaddr: Mac address of requesting peer |
| 498 | * @ssid: SSID for response |
| 499 | * @pe_session: PE session id |
| 500 | * @preq_p2pie: P2P IE in incoming probe request |
| 501 | * |
| 502 | * Builds and sends probe response frame to the requesting peer |
| 503 | * |
| 504 | * Return: void |
| 505 | */ |
| 506 | void |
| 507 | lim_send_probe_rsp_mgmt_frame(struct mac_context *mac_ctx, |
| 508 | tSirMacAddr peer_macaddr, |
| 509 | tpAniSSID ssid, |
| 510 | struct pe_session *pe_session, |
| 511 | uint8_t preq_p2pie); |
| 512 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 513 | void lim_send_auth_mgmt_frame(struct mac_context *, tSirMacAuthFrameBody *, tSirMacAddr, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 514 | uint8_t, struct pe_session *); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 515 | 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] | 516 | #ifdef WLAN_FEATURE_HOST_ROAM |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 517 | 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] | 518 | tLimMlmReassocReq *pMlmReassocReq, struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 519 | void lim_send_reassoc_req_mgmt_frame(struct mac_context *, tLimMlmReassocReq *, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 520 | struct pe_session *); |
Paul Zhang | 2f1077c | 2017-11-30 12:06:09 +0800 | [diff] [blame] | 521 | /** |
| 522 | * lim_process_rx_scan_handler() - |
| 523 | * process the event for scan which is issued by LIM |
| 524 | * @vdev: wlan objmgr vdev pointer |
| 525 | * @event: scan event |
| 526 | * @arg: global mac context pointer |
| 527 | * |
| 528 | * Return: void |
| 529 | */ |
| 530 | void lim_process_rx_scan_handler(struct wlan_objmgr_vdev *vdev, |
| 531 | struct scan_event *event, void *arg); |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 532 | #else |
| 533 | static inline void lim_send_reassoc_req_with_ft_ies_mgmt_frame( |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 534 | struct mac_context *mac, tLimMlmReassocReq *pMlmReassocReq, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 535 | struct pe_session *pe_session) |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 536 | {} |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 537 | 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] | 538 | tLimMlmReassocReq *reassoc_req, struct pe_session *pe_session) |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 539 | {} |
Paul Zhang | 2f1077c | 2017-11-30 12:06:09 +0800 | [diff] [blame] | 540 | static inline void lim_process_rx_scan_handler(struct wlan_objmgr_vdev *vdev, |
| 541 | struct scan_event *event, void *arg) |
| 542 | {} |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 543 | #endif |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 544 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 545 | /** |
| 546 | * lim_process_set_he_bss_color() - process the set he bss color request |
| 547 | * |
| 548 | * @mac_ctx: global mac context pointer |
| 549 | * @msg_buf: message buffer pointer |
| 550 | * |
| 551 | * Return: void |
| 552 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 553 | 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] | 554 | |
| 555 | /** |
| 556 | * lim_process_obss_color_collision_info() - Process the obss color collision |
| 557 | * request. |
| 558 | * @mac_ctx: global mac context pointer |
| 559 | * @msg_buf: message buffer pointer |
| 560 | * |
| 561 | * Return: void |
| 562 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 563 | void lim_process_obss_color_collision_info(struct mac_context *mac_ctx, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 564 | uint32_t *msg_buf); |
| 565 | |
| 566 | /** |
| 567 | * lim_send_obss_color_collision_cfg() - Send obss color collision cfg. |
| 568 | * @mac_ctx: global mac context pointer |
| 569 | * @session: Pointer to session |
| 570 | * @event_type: obss color collision detection type |
| 571 | * |
| 572 | * Return: void |
| 573 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 574 | void lim_send_obss_color_collision_cfg(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 575 | struct pe_session *session, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 576 | enum wmi_obss_color_collision_evt_type |
| 577 | event_type); |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 578 | #else |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 579 | 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] | 580 | uint32_t *msg_buf) |
| 581 | {} |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 582 | 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] | 583 | uint32_t *msg_buf) |
| 584 | {} |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 585 | 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] | 586 | struct pe_session *session, |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 587 | enum wmi_obss_color_collision_evt_type event_type) |
| 588 | {} |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 589 | #endif |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 590 | 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] | 591 | uint8_t wmmTspecPresent, |
Jeff Johnson | 312348f | 2018-12-22 13:33:54 -0800 | [diff] [blame] | 592 | struct mac_ts_info * pTsinfo, |
Jeff Johnson | 56471b9 | 2018-12-22 14:36:06 -0800 | [diff] [blame] | 593 | struct mac_tspec_ie * pTspecIe, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 594 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 595 | 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] | 596 | tSirAddtsReqInfo *addts, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 597 | |
bings | 8551233 | 2019-09-04 17:46:37 +0800 | [diff] [blame] | 598 | /** |
| 599 | * lim_send_assoc_rsp_mgmt_frame() - Send assoc response |
| 600 | * @mac_ctx: Handle for mac context |
| 601 | * @status_code: Status code for assoc response frame |
| 602 | * @aid: Association ID |
| 603 | * @peer_addr: Mac address of requesting peer |
| 604 | * @subtype: Assoc/Reassoc |
| 605 | * @sta: Pointer to station node |
| 606 | * @pe_session: PE session id. |
| 607 | * @tx_complete: Need tx complete callback or not |
| 608 | * |
| 609 | * Builds and sends association response frame to the requesting peer. |
| 610 | * |
| 611 | * Return: void |
| 612 | */ |
| 613 | void |
| 614 | lim_send_assoc_rsp_mgmt_frame( |
| 615 | struct mac_context *mac_ctx, |
| 616 | uint16_t status_code, uint16_t aid, tSirMacAddr peer_addr, |
| 617 | uint8_t subtype, tpDphHashNode sta, struct pe_session *pe_session, |
| 618 | bool tx_complete); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 619 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 620 | void lim_send_disassoc_mgmt_frame(struct mac_context *, uint16_t, tSirMacAddr, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 621 | struct pe_session *, bool waitForAck); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 622 | 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] | 623 | bool waitForAck); |
| 624 | |
Jianmin Zhu | 160d364 | 2019-08-19 21:27:52 +0800 | [diff] [blame] | 625 | /** |
| 626 | * lim_process_mlm_update_hidden_ssid_rsp() - process hidden ssid response |
| 627 | * @mac_ctx: global mac context |
| 628 | * @vdev_id: vdev id |
| 629 | * |
| 630 | * Return: None |
| 631 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 632 | void lim_process_mlm_update_hidden_ssid_rsp(struct mac_context *mac_ctx, |
Jianmin Zhu | 160d364 | 2019-08-19 21:27:52 +0800 | [diff] [blame] | 633 | uint8_t vdev_id); |
Kiran Kumar Lokere | 5798bfa | 2017-04-27 20:49:39 -0700 | [diff] [blame] | 634 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 635 | tSirResultCodes lim_mlm_add_bss(struct mac_context *, tLimMlmStartReq *, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 636 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 637 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 638 | QDF_STATUS lim_send_channel_switch_mgmt_frame(struct mac_context *, tSirMacAddr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 639 | uint8_t, uint8_t, uint8_t, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 640 | struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 641 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 642 | 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] | 643 | tSirMacAddr peer, uint8_t mode, uint8_t new_op_class, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 644 | uint8_t new_channel, uint8_t count, struct pe_session *session_entry); |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 645 | QDF_STATUS lim_p2p_oper_chan_change_confirm_action_frame( |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 646 | struct mac_context *mac_ctx, tSirMacAddr peer, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 647 | struct pe_session *session_entry); |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 648 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 649 | QDF_STATUS lim_send_neighbor_report_request_frame(struct mac_context *, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 650 | tpSirMacNeighborReportReq, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 651 | tSirMacAddr, struct pe_session *); |
Pragaspathi Thilagaraj | 683c1cf | 2019-09-23 18:40:57 +0530 | [diff] [blame] | 652 | |
| 653 | /** |
| 654 | * lim_send_link_report_action_frame() - Send link measurement report action |
| 655 | * frame in response for a link measurement request received. |
| 656 | * @mac: Pointer to Mac context |
| 657 | * @link_report: Pointer to the sSirMacLinkReport struct |
| 658 | * @peer: BSSID of the peer |
| 659 | * @pe_session: Pointer to the pe_session |
| 660 | * |
| 661 | * Return: QDF_STATUS |
| 662 | * |
| 663 | */ |
| 664 | QDF_STATUS |
| 665 | lim_send_link_report_action_frame(struct mac_context *mac, |
| 666 | tpSirMacLinkReport link_report, |
| 667 | tSirMacAddr peer, |
| 668 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 669 | |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 670 | /** |
| 671 | * lim_send_radio_measure_report_action_frame - Send RRM report action frame |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 672 | * @mac: pointer to global MAC context |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 673 | * @dialog_token: Dialog token to be used in the action frame |
| 674 | * @num_report: number of reports in pRRMReport |
Vignesh Viswanathan | 09bd8f4 | 2018-08-14 22:04:36 +0530 | [diff] [blame] | 675 | * @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] | 676 | * @pRRMReport: Pointer to the RRM report structure |
| 677 | * @peer: MAC address of the peer |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 678 | * @pe_session: Pointer to the PE session entry |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 679 | * |
| 680 | * Return: Ret Status |
| 681 | */ |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 682 | QDF_STATUS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 683 | lim_send_radio_measure_report_action_frame(struct mac_context *mac, |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 684 | uint8_t dialog_token, |
| 685 | uint8_t num_report, |
Vignesh Viswanathan | 09bd8f4 | 2018-08-14 22:04:36 +0530 | [diff] [blame] | 686 | bool is_last_frame, |
Vignesh Viswanathan | 3b4bf98 | 2018-06-05 15:04:23 +0530 | [diff] [blame] | 687 | tpSirMacRadioMeasureReport pRRMReport, |
| 688 | tSirMacAddr peer, |
sheenam monga | b06e28d | 2020-03-05 17:23:24 +0530 | [diff] [blame^] | 689 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 690 | |
| 691 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 692 | void lim_init_tdls_data(struct mac_context *, struct pe_session *); |
Jeff Johnson | 93cf08a | 2019-02-14 13:06:56 -0800 | [diff] [blame] | 693 | |
| 694 | /** |
| 695 | * lim_process_sme_tdls_mgmt_send_req() - send out tdls management frames |
| 696 | * @mac_ctx: global mac context |
| 697 | * @msg: message buffer received from SME. |
| 698 | * |
| 699 | * Process Send Mgmt Request from SME and transmit to AP. |
| 700 | * |
| 701 | * Return: QDF_STATUS_SUCCESS on success, error code otherwise |
| 702 | */ |
| 703 | QDF_STATUS lim_process_sme_tdls_mgmt_send_req(struct mac_context *mac_ctx, |
| 704 | void *msg); |
| 705 | |
Jeff Johnson | 4cdd1ac | 2019-02-14 20:01:24 -0800 | [diff] [blame] | 706 | /** |
| 707 | * lim_process_sme_tdls_add_sta_req() - process TDLS Add STA |
| 708 | * @mac_ctx: global mac context |
| 709 | * @msg: message buffer received from SME. |
| 710 | * |
| 711 | * Process TDLS Add Station request |
| 712 | * |
| 713 | * Return: QDF_STATUS_SUCCESS on success, error code otherwise |
| 714 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 715 | QDF_STATUS lim_process_sme_tdls_add_sta_req(struct mac_context *mac, |
Jeff Johnson | 4cdd1ac | 2019-02-14 20:01:24 -0800 | [diff] [blame] | 716 | void *msg); |
| 717 | |
Jeff Johnson | ab797d6 | 2019-02-14 20:47:16 -0800 | [diff] [blame] | 718 | /** |
| 719 | * lim_process_sme_tdls_del_sta_req() - process TDLS Del STA |
| 720 | * @mac_ctx: global mac context |
| 721 | * @msg: message buffer received from SME. |
| 722 | * |
| 723 | * Process TDLS Delete Station request |
| 724 | * |
| 725 | * Return: QDF_STATUS_SUCCESS on success, error code otherwise |
| 726 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 727 | QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac, |
Jeff Johnson | ab797d6 | 2019-02-14 20:47:16 -0800 | [diff] [blame] | 728 | void *msg); |
| 729 | |
Abhishek Singh | 345be41 | 2019-11-19 10:59:29 +0530 | [diff] [blame] | 730 | void lim_send_sme_mgmt_tx_completion(struct mac_context *mac, uint32_t vdev_id, |
| 731 | uint32_t txCompleteStatus); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 732 | QDF_STATUS lim_delete_tdls_peers(struct mac_context *mac_ctx, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 733 | struct pe_session *session_entry); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 734 | QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *); |
| 735 | 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] | 736 | struct scheduler_msg *lim_msg, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 737 | struct pe_session *session_entry); |
Bala Venkatesh | 33f270b | 2019-01-14 16:31:29 +0530 | [diff] [blame] | 738 | |
| 739 | /** |
| 740 | * lim_update_tdls_state_in_fw() - Update TDLS state in FW |
| 741 | * |
| 742 | * @session_entry - PE sessions |
| 743 | * @value -value to be updated |
| 744 | * |
| 745 | * |
| 746 | * Return: void |
| 747 | */ |
| 748 | void lim_update_tdls_set_state_for_fw(struct pe_session *session_entry, |
| 749 | bool value); |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 750 | #else |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 751 | 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] | 752 | struct pe_session *session_entry) |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 753 | { |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 754 | return QDF_STATUS_SUCCESS; |
Masti, Narayanraddi | 1c63044 | 2015-11-02 12:03:50 +0530 | [diff] [blame] | 755 | } |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 756 | static inline void lim_init_tdls_data(struct mac_context *mac, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 757 | struct pe_session *pe_session) |
Kabilan Kannan | 32eb502 | 2016-10-04 12:24:50 -0700 | [diff] [blame] | 758 | { |
| 759 | |
| 760 | } |
Bala Venkatesh | 33f270b | 2019-01-14 16:31:29 +0530 | [diff] [blame] | 761 | |
| 762 | static inline void lim_update_tdls_set_state_for_fw(struct pe_session |
| 763 | *session_entry, bool value) |
| 764 | { |
| 765 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 766 | #endif |
| 767 | |
| 768 | /* Algorithms & Link Monitoring related functions */ |
| 769 | /* / Function that handles heartbeat failure */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 770 | void lim_handle_heart_beat_failure(struct mac_context *, struct pe_session *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 771 | |
Srinivas Dasari | e2495dc | 2020-02-13 09:49:24 +0530 | [diff] [blame] | 772 | /** |
| 773 | * lim_tear_down_link_with_ap() - Tear down link with AP |
| 774 | * @mac: mac context |
| 775 | * @session_id: PE session id |
| 776 | * @reason_code: Disconnect reason code as per emun eSirMacReasonCodes |
| 777 | * @trigger: Disconnect trigger as per enum eLimDisassocTrigger |
| 778 | * |
| 779 | * Function that triggers link tear down with AP upon HB failure |
| 780 | * |
| 781 | * Return: None |
| 782 | */ |
| 783 | void lim_tear_down_link_with_ap(struct mac_context *mac, |
| 784 | uint8_t session_id, |
| 785 | tSirMacReasonCodes reason_code, |
| 786 | enum eLimDisassocTrigger trigger); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 787 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 788 | /* / Function that defers the messages received */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 789 | uint32_t lim_defer_msg(struct mac_context *, struct scheduler_msg *); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 790 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 791 | #ifdef ANI_SUPPORT_11H |
| 792 | /* / Function that sends Measurement Report action frame */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 793 | QDF_STATUS lim_send_meas_report_frame(struct mac_context *, tpSirMacMeasReqActionFrame, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 794 | tSirMacAddr, struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 795 | |
| 796 | /* / Function that sends TPC Report action frame */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 797 | QDF_STATUS lim_send_tpc_report_frame(struct mac_context *, tpSirMacTpcReqActionFrame, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 798 | tSirMacAddr, struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 799 | #endif |
| 800 | |
Jianmin Zhu | ef22819 | 2019-08-13 15:04:23 +0800 | [diff] [blame] | 801 | /** |
Abhishek Singh | 6e5c7a6 | 2019-09-18 12:24:54 +0530 | [diff] [blame] | 802 | * lim_handle_add_bss_rsp() - Handle add bss response |
Jianmin Zhu | ef22819 | 2019-08-13 15:04:23 +0800 | [diff] [blame] | 803 | * @mac_ctx: mac context |
Abhishek Singh | 6e5c7a6 | 2019-09-18 12:24:54 +0530 | [diff] [blame] | 804 | * @add_bss_rsp: add bss rsp |
Jianmin Zhu | ef22819 | 2019-08-13 15:04:23 +0800 | [diff] [blame] | 805 | * |
Abhishek Singh | 6e5c7a6 | 2019-09-18 12:24:54 +0530 | [diff] [blame] | 806 | * This function is called to handle all types of add bss rsp |
| 807 | * It will free memory of add_bss_rsp in the end after rsp is handled. |
Jianmin Zhu | ef22819 | 2019-08-13 15:04:23 +0800 | [diff] [blame] | 808 | * |
| 809 | * Return: None |
| 810 | */ |
Abhishek Singh | 6e5c7a6 | 2019-09-18 12:24:54 +0530 | [diff] [blame] | 811 | void lim_handle_add_bss_rsp(struct mac_context *mac_ctx, |
| 812 | struct add_bss_rsp *add_bss_rsp); |
Jianmin Zhu | ef22819 | 2019-08-13 15:04:23 +0800 | [diff] [blame] | 813 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 814 | void lim_process_mlm_add_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 815 | struct scheduler_msg *limMsgQt, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 816 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 817 | void lim_process_mlm_del_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 818 | struct scheduler_msg *limMsgQ); |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 819 | |
| 820 | /** |
| 821 | * lim_process_mlm_del_bss_rsp () - API to process delete bss response |
| 822 | * @mac: Pointer to Global MAC structure |
| 823 | * @vdev_stop_rsp: pointer to vdev stop response |
| 824 | * @pe_session: pointer to pe_session |
| 825 | * |
| 826 | * Return: None |
| 827 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 828 | void lim_process_mlm_del_bss_rsp(struct mac_context *mac, |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 829 | struct del_bss_resp *vdev_stop_rsp, |
Abhishek Ambure | 2bd960b | 2019-08-21 16:30:53 +0530 | [diff] [blame] | 830 | struct pe_session *pe_session); |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 831 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 832 | void lim_process_sta_mlm_add_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 833 | struct scheduler_msg *limMsgQ, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 834 | struct pe_session *pe_session); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 835 | void lim_process_sta_mlm_del_sta_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 836 | struct scheduler_msg *limMsgQ, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 837 | struct pe_session *pe_session); |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 838 | |
| 839 | /** |
| 840 | * lim_process_sta_mlm_del_bss_rsp() - handle del bss response of STA |
| 841 | * @mac: Pointer to Global MAC structure |
| 842 | * @vdev_stop_rsp: pointer to vdev stop response |
| 843 | * @pe_session: pointer to pe_session |
| 844 | * |
| 845 | * Return: none |
| 846 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 847 | void lim_process_sta_mlm_del_bss_rsp(struct mac_context *mac, |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 848 | struct del_bss_resp *vdev_stop_rsp, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 849 | struct pe_session *pe_session); |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 850 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 851 | void lim_process_mlm_set_sta_key_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 852 | struct scheduler_msg *limMsgQ); |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 853 | void lim_process_mlm_set_bss_key_rsp(struct mac_context *mac, |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 854 | struct scheduler_msg *limMsgQ); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 855 | |
| 856 | /* Function to process WMA_SWITCH_CHANNEL_RSP message */ |
Jianmin Zhu | 160d364 | 2019-08-19 21:27:52 +0800 | [diff] [blame] | 857 | void lim_process_switch_channel_rsp(struct mac_context *mac, |
| 858 | struct vdev_start_response *rsp); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 859 | |
Abhishek Singh | 8586573 | 2019-07-11 13:37:20 +0530 | [diff] [blame] | 860 | /** |
| 861 | * lim_sta_handle_connect_fail() - handle connect failure of STA |
| 862 | * @param - join params |
| 863 | * |
| 864 | * Return: QDF_STATUS |
| 865 | */ |
| 866 | QDF_STATUS lim_sta_handle_connect_fail(join_params *param); |
Pragaspathi Thilagaraj | 2071e33 | 2019-05-25 20:01:32 +0530 | [diff] [blame] | 867 | |
Abhishek Ambure | 40972f1 | 2019-08-21 19:43:18 +0530 | [diff] [blame] | 868 | /** |
| 869 | * lim_join_result_callback() - Callback to handle join rsp |
| 870 | * @mac: Pointer to Global MAC structure |
| 871 | * @vdev_id: vdev id |
| 872 | * |
| 873 | * This callback function is used to delete PE session |
| 874 | * entry and send join response to sme. |
| 875 | * |
| 876 | * Return: None |
| 877 | */ |
| 878 | void lim_join_result_callback(struct mac_context *mac, |
| 879 | uint8_t vdev_id); |
| 880 | |
Pragaspathi Thilagaraj | 2071e33 | 2019-05-25 20:01:32 +0530 | [diff] [blame] | 881 | #ifdef WLAN_FEATURE_HOST_ROAM |
Jianmin Zhu | d252607 | 2019-04-25 14:04:13 +0800 | [diff] [blame] | 882 | QDF_STATUS lim_sta_reassoc_error_handler(struct reassoc_params *param); |
Pragaspathi Thilagaraj | 2071e33 | 2019-05-25 20:01:32 +0530 | [diff] [blame] | 883 | #else |
| 884 | static inline |
| 885 | QDF_STATUS lim_sta_reassoc_error_handler(struct reassoc_params *param) |
| 886 | { |
| 887 | return QDF_STATUS_E_NOSUPPORT; |
| 888 | } |
| 889 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 890 | |
| 891 | #ifdef WLAN_FEATURE_11W |
| 892 | /* 11w send SA query request action frame */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 893 | 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] | 894 | tSirMacAddr peer, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 895 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 896 | /* 11w SA query request action frame handler */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 897 | QDF_STATUS lim_send_sa_query_response_frame(struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 898 | uint8_t *transId, tSirMacAddr peer, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 899 | struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 900 | #endif |
| 901 | |
| 902 | /* Inline functions */ |
| 903 | |
| 904 | /** |
| 905 | * lim_post_sme_message() |
| 906 | * |
| 907 | ***FUNCTION: |
| 908 | * This function is called by limProcessMlmMessages(). In this |
| 909 | * function MLM sub-module invokes MLM ind/cnf primitives. |
| 910 | * |
| 911 | ***LOGIC: |
| 912 | * Initially MLM makes an SME function call to invoke MLM ind/cnf |
| 913 | * primitive. In future this can be enhanced to 'post' messages to SME. |
| 914 | * |
| 915 | ***ASSUMPTIONS: |
| 916 | * NA |
| 917 | * |
| 918 | ***NOTE: |
| 919 | * NA |
| 920 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 921 | * @param mac Pointer to Global MAC structure |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 922 | * @param msgType Indicates the MLM primitive message type |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 923 | * @param *msg_buf A pointer to the MLM message buffer |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 924 | * |
| 925 | * @return None |
| 926 | */ |
| 927 | static inline void |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 928 | lim_post_sme_message(struct mac_context *mac, uint32_t msgType, |
| 929 | uint32_t *msg_buf) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 930 | { |
Rajeev Kumar | cf7bd80 | 2017-04-18 11:11:42 -0700 | [diff] [blame] | 931 | struct scheduler_msg msg = {0}; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 932 | |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 933 | if (!msg_buf) { |
Srinivas Girigowda | 9ffddb1 | 2017-03-26 22:15:09 -0700 | [diff] [blame] | 934 | pe_err("Buffer is Pointing to NULL"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 935 | return; |
| 936 | } |
| 937 | |
| 938 | msg.type = (uint16_t) msgType; |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 939 | msg.bodyptr = msg_buf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 940 | msg.bodyval = 0; |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 941 | if (msgType > eWNI_SME_MSG_TYPES_BEGIN) { |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 942 | MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG, NO_SESSION, |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 943 | msg.type)); |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 944 | lim_process_sme_req_messages(mac, &msg); |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 945 | } else { |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 946 | lim_process_mlm_rsp_messages(mac, msgType, msg_buf); |
Sreelakshmi Konamki | 544e33b | 2016-08-17 15:08:48 +0530 | [diff] [blame] | 947 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 948 | } /*** end lim_post_sme_message() ***/ |
| 949 | |
| 950 | /** |
| 951 | * lim_post_mlm_message() |
| 952 | * |
| 953 | ***FUNCTION: |
| 954 | * This function is called by limProcessSmeMessages(). In this |
| 955 | * function SME invokes MLME primitives. |
| 956 | * |
| 957 | ***PARAMS: |
| 958 | * |
| 959 | ***LOGIC: |
| 960 | * Initially SME makes an MLM function call to invoke MLM primitive. |
| 961 | * In future this can be enhanced to 'post' messages to MLM. |
| 962 | * |
| 963 | ***ASSUMPTIONS: |
| 964 | * NA |
| 965 | * |
| 966 | ***NOTE: |
| 967 | * NA |
| 968 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 969 | * @param mac Pointer to Global MAC structure |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 970 | * @param msgType Indicates the MLM primitive message type |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 971 | * @param *msg_buf A pointer to the MLM message buffer |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 972 | * |
| 973 | * @return None |
| 974 | */ |
| 975 | static inline void |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 976 | lim_post_mlm_message(struct mac_context *mac, uint32_t msgType, |
| 977 | uint32_t *msg_buf) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 978 | { |
Rajeev Kumar | cf7bd80 | 2017-04-18 11:11:42 -0700 | [diff] [blame] | 979 | struct scheduler_msg msg = {0}; |
Srinivas Girigowda | 9ffddb1 | 2017-03-26 22:15:09 -0700 | [diff] [blame] | 980 | |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 981 | if (!msg_buf) { |
Srinivas Girigowda | 9ffddb1 | 2017-03-26 22:15:09 -0700 | [diff] [blame] | 982 | pe_err("Buffer is Pointing to NULL"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 983 | return; |
| 984 | } |
| 985 | msg.type = (uint16_t) msgType; |
Pragaspathi Thilagaraj | 469495b | 2019-05-30 00:18:31 +0530 | [diff] [blame] | 986 | msg.bodyptr = msg_buf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 987 | msg.bodyval = 0; |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 988 | MTRACE(mac_trace_msg_rx(mac, NO_SESSION, msg.type)); |
| 989 | lim_process_mlm_req_messages(mac, &msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 990 | } /*** end lim_post_mlm_message() ***/ |
| 991 | |
| 992 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 993 | * lim_get_ielen_from_bss_description() |
| 994 | * |
| 995 | ***FUNCTION: |
| 996 | * This function is called in various places to get IE length |
Pragaspathi Thilagaraj | 1112c96 | 2019-05-23 23:45:38 +0530 | [diff] [blame] | 997 | * from struct bss_description structure |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 998 | * number being scanned. |
| 999 | * |
| 1000 | ***PARAMS: |
| 1001 | * |
| 1002 | ***LOGIC: |
| 1003 | * |
| 1004 | ***ASSUMPTIONS: |
| 1005 | * NA |
| 1006 | * |
| 1007 | ***NOTE: |
| 1008 | * NA |
| 1009 | * |
| 1010 | * @param pBssDescr |
| 1011 | * @return Total IE length |
| 1012 | */ |
| 1013 | |
| 1014 | static inline uint16_t |
Pragaspathi Thilagaraj | 1d8e2ab | 2019-03-04 23:59:21 +0530 | [diff] [blame] | 1015 | lim_get_ielen_from_bss_description(struct bss_description *pBssDescr) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1016 | { |
| 1017 | uint16_t ielen; |
| 1018 | |
| 1019 | if (!pBssDescr) |
| 1020 | return 0; |
| 1021 | |
| 1022 | /* |
| 1023 | * Length of BSS desription is without length of |
| 1024 | * length itself and length of pointer |
| 1025 | * that holds ieFields |
| 1026 | * |
Pragaspathi Thilagaraj | 1112c96 | 2019-05-23 23:45:38 +0530 | [diff] [blame] | 1027 | * <------------sizeof(struct bss_description)--------------------> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1028 | * +--------+---------------------------------+---------------+ |
| 1029 | * | length | other fields | pointer to IEs| |
| 1030 | * +--------+---------------------------------+---------------+ |
| 1031 | * ^ |
| 1032 | * ieFields |
| 1033 | */ |
| 1034 | |
| 1035 | ielen = (uint16_t)(pBssDescr->length + sizeof(pBssDescr->length) - |
Pragaspathi Thilagaraj | 1112c96 | 2019-05-23 23:45:38 +0530 | [diff] [blame] | 1036 | GET_FIELD_OFFSET(struct bss_description, ieFields)); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1037 | |
| 1038 | return ielen; |
| 1039 | } /*** end lim_get_ielen_from_bss_description() ***/ |
| 1040 | |
| 1041 | /** |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 1042 | * lim_send_beacon_ind() - send the beacon indication |
| 1043 | * @mac_ctx: pointer to mac structure |
| 1044 | * @session: pe session |
| 1045 | * @reason: beacon update reason |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1046 | * |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 1047 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1048 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1049 | 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] | 1050 | enum sir_bcn_update_reason reason); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1051 | |
| 1052 | void |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1053 | 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] | 1054 | uint8_t sessionId); |
| 1055 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1056 | 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] | 1057 | |
| 1058 | #define LIM_WPS_OVERLAP_TIMER_MS 10000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1059 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1060 | void lim_process_disassoc_ack_timeout(struct mac_context *mac); |
| 1061 | void lim_process_deauth_ack_timeout(struct mac_context *mac); |
| 1062 | QDF_STATUS lim_send_disassoc_cnf(struct mac_context *mac); |
| 1063 | QDF_STATUS lim_send_deauth_cnf(struct mac_context *mac); |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 1064 | |
| 1065 | /** |
| 1066 | * lim_disassoc_tx_complete_cnf() - callback to indicate Tx completion |
| 1067 | * @context: pointer to mac structure |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 1068 | * @txCompleteSuccess: indicates tx success/failure |
| 1069 | * @params: tx completion params |
| 1070 | * |
| 1071 | * function will be invoked on receiving tx completion indication |
| 1072 | * |
| 1073 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
| 1074 | */ |
| 1075 | QDF_STATUS lim_disassoc_tx_complete_cnf(void *context, |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 1076 | uint32_t txCompleteSuccess, |
| 1077 | void *params); |
| 1078 | |
| 1079 | /** |
| 1080 | * lim_deauth_tx_complete_cnf() - callback to indicate Tx completion |
| 1081 | * @context: pointer to mac structure |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 1082 | * @txCompleteSuccess: indicates tx success/failure |
| 1083 | * @params: tx completion params |
| 1084 | * |
| 1085 | * function will be invoked on receiving tx completion indication |
| 1086 | * |
| 1087 | * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE |
| 1088 | */ |
| 1089 | QDF_STATUS lim_deauth_tx_complete_cnf(void *context, |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame] | 1090 | uint32_t txCompleteSuccess, |
| 1091 | void *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1092 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1093 | void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac_ctx, |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1094 | QDF_STATUS status, uint32_t *ctx); |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 1095 | |
| 1096 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1097 | 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] | 1098 | uint32_t *msg_buf); |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 1099 | #else |
| 1100 | static inline |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1101 | 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] | 1102 | uint32_t *msg_buf) |
| 1103 | { |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 1104 | return QDF_STATUS_SUCCESS; |
Yingying Tang | d491e18 | 2017-04-18 14:11:03 +0800 | [diff] [blame] | 1105 | } |
| 1106 | #endif |
| 1107 | |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 1108 | /** |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 1109 | * lim_send_bcn_rsp() - handle beacon send response |
| 1110 | * @mac_ctx Pointer to Global MAC structure |
| 1111 | * @rsp: beacon send response |
| 1112 | * |
| 1113 | * Return: None |
| 1114 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1115 | void lim_send_bcn_rsp(struct mac_context *mac_ctx, tpSendbeaconParams rsp); |
Abhishek Singh | fc740be | 2018-10-12 11:34:26 +0530 | [diff] [blame] | 1116 | |
| 1117 | /** |
Pragaspathi Thilagaraj | 30251ec | 2018-12-18 17:22:57 +0530 | [diff] [blame] | 1118 | * lim_add_roam_blacklist_ap() - handle the blacklist bssid list received from |
| 1119 | * firmware |
| 1120 | * @mac_ctx: Pointer to Global MAC structure |
| 1121 | * @list: roam blacklist ap list |
| 1122 | * |
| 1123 | * Return: None |
| 1124 | */ |
| 1125 | void lim_add_roam_blacklist_ap(struct mac_context *mac_ctx, |
| 1126 | struct roam_blacklist_event *src_lst); |
| 1127 | |
| 1128 | /** |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 1129 | * lim_process_rx_channel_status_event() - processes |
| 1130 | * event WDA_RX_CHN_STATUS_EVENT |
| 1131 | * @mac_ctx Pointer to Global MAC structure |
| 1132 | * @buf: Received message info |
| 1133 | * |
| 1134 | * Return: None |
| 1135 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1136 | 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] | 1137 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1138 | /* / Bit value data structure */ |
| 1139 | typedef enum sHalBitVal /* For Bit operations */ |
| 1140 | { |
| 1141 | eHAL_CLEAR, |
| 1142 | eHAL_SET |
| 1143 | } tHalBitVal; |
| 1144 | |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1145 | 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] | 1146 | tSirMacAddr peer_mac, uint16_t tid, |
Jeff Johnson | 2b0d20f | 2018-11-18 22:01:18 -0800 | [diff] [blame] | 1147 | struct pe_session *session, |
Kiran Kumar Lokere | aee823a | 2018-03-22 15:27:05 -0700 | [diff] [blame] | 1148 | uint8_t addba_extn_present, |
| 1149 | uint8_t amsdu_support); |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 1150 | /** |
| 1151 | * lim_process_join_failure_timeout() - This function is called to process |
| 1152 | * JoinFailureTimeout |
| 1153 | * |
| 1154 | * @mac_ctx: Pointer to Global MAC structure |
| 1155 | * |
| 1156 | * This function is called to process JoinFailureTimeout |
| 1157 | * |
| 1158 | * @Return None |
| 1159 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1160 | void lim_process_join_failure_timeout(struct mac_context *mac_ctx); |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 1161 | |
| 1162 | /** |
| 1163 | * lim_process_auth_failure_timeout() - This function is called to process Min |
| 1164 | * Channel Timeout during channel scan. |
| 1165 | * |
| 1166 | * @mac_ctx: Pointer to Global MAC structure |
| 1167 | * |
| 1168 | * This function is called to process Min Channel Timeout during channel scan. |
| 1169 | * |
| 1170 | * @Return: None |
| 1171 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1172 | void lim_process_auth_failure_timeout(struct mac_context *mac_ctx); |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 1173 | |
| 1174 | /** |
| 1175 | * lim_process_assoc_failure_timeout() - This function is called to process Min |
| 1176 | * Channel Timeout during channel scan. |
| 1177 | * |
| 1178 | * @mac_ctx: Pointer to Global MAC structure |
| 1179 | * @msg_type: Assoc or reassoc |
| 1180 | * |
| 1181 | * This function is called to process Min Channel Timeout during channel scan. |
| 1182 | * |
| 1183 | * @Return: None |
| 1184 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1185 | void lim_process_assoc_failure_timeout(struct mac_context *mac_ctx, |
Abhishek Singh | 6a73017 | 2017-12-29 14:07:21 +0530 | [diff] [blame] | 1186 | uint32_t msg_type); |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 1187 | |
| 1188 | /** |
| 1189 | * lim_send_mgmt_frame_tx() - Sends mgmt frame |
| 1190 | * @mac_ctx Pointer to Global MAC structure |
| 1191 | * @msg: Received message info |
| 1192 | * |
| 1193 | * Return: None |
| 1194 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1195 | void lim_send_mgmt_frame_tx(struct mac_context *mac_ctx, |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 1196 | struct scheduler_msg *msg); |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1197 | |
| 1198 | /** |
| 1199 | * lim_send_csa_restart_req() - send csa restart req |
| 1200 | * @mac_ctx Pointer to Global MAC structure |
| 1201 | * @vdev_id: vdev id |
| 1202 | * |
| 1203 | * Return: None |
| 1204 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1205 | 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] | 1206 | |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 1207 | /** |
Abhishek Singh | bc4261f | 2019-03-14 13:21:57 +0530 | [diff] [blame] | 1208 | * lim_continue_sta_csa_req() - continue with CSA req after HW mode change |
| 1209 | * @mac_ctx Pointer to Global MAC structure |
| 1210 | * @vdev_id: vdev id |
| 1211 | * |
| 1212 | * Return: None |
| 1213 | */ |
| 1214 | void lim_continue_sta_csa_req(struct mac_context *mac_ctx, uint8_t vdev_id); |
| 1215 | |
| 1216 | /** |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 1217 | * lim_process_mlm_start_req() - process MLM_START_REQ message |
| 1218 | * |
| 1219 | * @mac_ctx: global MAC context |
| 1220 | * @mlm_start_req: Pointer to start req |
| 1221 | * |
| 1222 | * This function is called to process MLM_START_REQ message |
| 1223 | * from SME. MLME now waits for HAL to send WMA_ADD_BSS_RSP. |
| 1224 | * |
| 1225 | * Return: None |
| 1226 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1227 | void lim_process_mlm_start_req(struct mac_context *mac_ctx, |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 1228 | tLimMlmStartReq *mlm_start_req); |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 1229 | |
Sandeep Puligilla | 45e0c5e | 2018-09-21 00:38:23 -0700 | [diff] [blame] | 1230 | /** |
| 1231 | * lim_process_mlm_join_req() - process mlm join request. |
| 1232 | * |
| 1233 | * @mac_ctx: Pointer to Global MAC structure |
| 1234 | * @msg: Pointer to the MLM message buffer |
| 1235 | * |
| 1236 | * This function is called to process MLM_JOIN_REQ message |
| 1237 | * from SME. It does following: |
| 1238 | * 1) Initialize LIM, HAL, DPH |
| 1239 | * 2) Configure the BSS for which the JOIN REQ was received |
| 1240 | * a) Send WMA_ADD_BSS_REQ to HAL - |
| 1241 | * This will identify the BSS that we are interested in |
| 1242 | * --AND-- |
| 1243 | * Add a STA entry for the AP (in a STA context) |
| 1244 | * b) Wait for WMA_ADD_BSS_RSP |
| 1245 | * c) Send WMA_ADD_STA_REQ to HAL |
| 1246 | * This will add the "local STA" entry to the STA table |
| 1247 | * 3) Continue as before, i.e, |
| 1248 | * a) Send a PROBE REQ |
| 1249 | * b) Wait for PROBE RSP/BEACON containing the SSID that |
| 1250 | * we are interested in |
| 1251 | * c) Then start an AUTH seq |
| 1252 | * d) Followed by the ASSOC seq |
| 1253 | * |
| 1254 | * @Return: None |
| 1255 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1256 | void lim_process_mlm_join_req(struct mac_context *mac_ctx, |
Sandeep Puligilla | 45e0c5e | 2018-09-21 00:38:23 -0700 | [diff] [blame] | 1257 | tLimMlmJoinReq *mlm_join_req); |
Sandeep Puligilla | 30bb840 | 2018-09-23 22:01:08 -0700 | [diff] [blame] | 1258 | |
| 1259 | /* |
| 1260 | * lim_process_mlm_deauth_req() - This function is called to process |
| 1261 | * MLM_DEAUTH_REQ message from SME |
| 1262 | * |
| 1263 | * @mac_ctx: Pointer to Global MAC structure |
| 1264 | * @msg_buf: A pointer to the MLM message buffer |
| 1265 | * |
| 1266 | * This function is called to process MLM_DEAUTH_REQ message from SME |
| 1267 | * |
| 1268 | * @Return: None |
| 1269 | */ |
Jeff Johnson | 8d8a9ab | 2018-12-02 12:52:36 -0800 | [diff] [blame] | 1270 | 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] | 1271 | |
Sandeep Puligilla | 30bb840 | 2018-09-23 22:01:08 -0700 | [diff] [blame] | 1272 | /** |
| 1273 | * lim_sta_mlme_vdev_disconnect_bss() - Disconnect from BSS |
| 1274 | * @vdev_mlme_obj: VDEV MLME comp object |
| 1275 | * @data_len: data size |
| 1276 | * @data: event data |
| 1277 | * |
| 1278 | * API invokes BSS disconnection |
| 1279 | * |
| 1280 | * Return: SUCCESS on successful completion of disconnection |
| 1281 | * FAILURE, if it fails due to any |
| 1282 | */ |
| 1283 | QDF_STATUS lim_sta_mlme_vdev_disconnect_bss(struct vdev_mlme_obj *vdev_mlme, |
| 1284 | uint16_t data_len, void *data); |
Abhishek Ambure | 7acc2c1 | 2019-05-16 14:28:46 +0530 | [diff] [blame] | 1285 | |
Srinivas Dasari | 3e54a4a | 2019-01-28 12:02:35 +0530 | [diff] [blame] | 1286 | /** |
| 1287 | * lim_process_assoc_cleanup() - frees up resources used in function |
| 1288 | * lim_process_assoc_req_frame() |
| 1289 | * @mac_ctx: pointer to Global MAC structure |
| 1290 | * @session: pointer to pe session entry |
| 1291 | * @assoc_req: pointer to ASSOC/REASSOC Request frame |
| 1292 | * @sta_ds: station dph entry |
| 1293 | * @assoc_req_copied: boolean to indicate if assoc req was copied to tmp above |
| 1294 | * |
| 1295 | * Frees up resources used in function lim_process_assoc_req_frame |
| 1296 | * |
| 1297 | * Return: void |
| 1298 | */ |
| 1299 | void lim_process_assoc_cleanup(struct mac_context *mac_ctx, |
| 1300 | struct pe_session *session, |
| 1301 | tpSirAssocReq assoc_req, |
| 1302 | tpDphHashNode sta_ds, |
| 1303 | bool assoc_req_copied); |
| 1304 | |
| 1305 | /** |
| 1306 | * lim_send_assoc_ind_to_sme() - Initialize PE data structures and send assoc |
| 1307 | * indication to SME. |
| 1308 | * @mac_ctx: Pointer to Global MAC structure |
| 1309 | * @session: pe session entry |
| 1310 | * @sub_type: Indicates whether it is Association Request(=0) or Reassociation |
| 1311 | * Request(=1) frame |
| 1312 | * @hdr: A pointer to the MAC header |
| 1313 | * @assoc_req: pointer to ASSOC/REASSOC Request frame |
Min Liu | ddd2330 | 2018-12-05 16:17:48 +0800 | [diff] [blame] | 1314 | * @akm_type: AKM type |
Srinivas Dasari | 3e54a4a | 2019-01-28 12:02:35 +0530 | [diff] [blame] | 1315 | * @pmf_connection: flag indicating pmf connection |
| 1316 | * @assoc_req_copied: boolean to indicate if assoc req was copied to tmp above |
| 1317 | * @dup_entry: flag indicating if duplicate entry found |
Pragaspathi Thilagaraj | b3472f0 | 2019-06-04 14:10:44 +0530 | [diff] [blame] | 1318 | * @force_1x1: flag to indicate if the STA nss needs to be downgraded to 1x1 |
Srinivas Dasari | 3e54a4a | 2019-01-28 12:02:35 +0530 | [diff] [blame] | 1319 | * |
| 1320 | * Return: void |
| 1321 | */ |
| 1322 | bool lim_send_assoc_ind_to_sme(struct mac_context *mac_ctx, |
| 1323 | struct pe_session *session, |
| 1324 | uint8_t sub_type, |
| 1325 | tpSirMacMgmtHdr hdr, |
| 1326 | tpSirAssocReq assoc_req, |
Min Liu | ddd2330 | 2018-12-05 16:17:48 +0800 | [diff] [blame] | 1327 | enum ani_akm_type akm_type, |
Srinivas Dasari | 3e54a4a | 2019-01-28 12:02:35 +0530 | [diff] [blame] | 1328 | bool pmf_connection, |
| 1329 | bool *assoc_req_copied, |
Pragaspathi Thilagaraj | b3472f0 | 2019-06-04 14:10:44 +0530 | [diff] [blame] | 1330 | bool dup_entry, bool force_1x1); |
Jianmin Zhu | 9772c4a | 2019-08-14 16:38:05 +0800 | [diff] [blame] | 1331 | |
| 1332 | /** |
| 1333 | * lim_process_sta_add_bss_rsp_pre_assoc - Processes handoff request |
| 1334 | * @mac_ctx: Pointer to mac context |
| 1335 | * @pAddBssParams: Bss params including rsp data |
| 1336 | * @session_entry: PE session handle |
Abhishek Singh | 7944c9a | 2019-09-18 17:55:22 +0530 | [diff] [blame] | 1337 | * @status: Qdf status |
Jianmin Zhu | 9772c4a | 2019-08-14 16:38:05 +0800 | [diff] [blame] | 1338 | * |
| 1339 | * This function is called to process a WMA_ADD_BSS_RSP from HAL. |
| 1340 | * Upon receipt of this message from HAL if the state is pre assoc. |
| 1341 | * |
| 1342 | * Return: Null |
| 1343 | */ |
| 1344 | void lim_process_sta_add_bss_rsp_pre_assoc(struct mac_context *mac_ctx, |
| 1345 | struct bss_params *add_bss_params, |
Abhishek Singh | 7944c9a | 2019-09-18 17:55:22 +0530 | [diff] [blame] | 1346 | struct pe_session *session_entry, |
| 1347 | QDF_STATUS status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1348 | #endif /* __LIM_TYPES_H */ |