Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Padma, Santhosh Kumar | 9f72955 | 2017-01-09 14:06:30 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 22 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 29 | * This file limSendSmeRspMessages.cc contains the functions |
| 30 | * for sending SME response/notification messages to applications |
| 31 | * above MAC software. |
| 32 | * Author: Chandra Modumudi |
| 33 | * Date: 02/13/02 |
| 34 | * History:- |
| 35 | * Date Modified by Modification Information |
| 36 | * -------------------------------------------------------------------- |
| 37 | */ |
| 38 | |
| 39 | #include "vos_types.h" |
| 40 | #include "wniApi.h" |
| 41 | #include "sirCommon.h" |
| 42 | #include "aniGlobal.h" |
| 43 | |
Satyanarayana Dash | 6f43827 | 2015-03-03 18:01:06 +0530 | [diff] [blame] | 44 | #include "wniCfg.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 45 | #include "sysDef.h" |
| 46 | #include "cfgApi.h" |
| 47 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 48 | |
| 49 | #include "schApi.h" |
| 50 | #include "utilsApi.h" |
| 51 | #include "limUtils.h" |
| 52 | #include "limSecurityUtils.h" |
| 53 | #include "limSerDesUtils.h" |
| 54 | #include "limSendSmeRspMessages.h" |
| 55 | #include "limIbssPeerMgmt.h" |
| 56 | #include "limSessionUtils.h" |
Padma, Santhosh Kumar | 9f72955 | 2017-01-09 14:06:30 +0530 | [diff] [blame] | 57 | #include "lim_mbb.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 58 | |
| 59 | /** |
| 60 | * limSendSmeRsp() |
| 61 | * |
| 62 | *FUNCTION: |
| 63 | * This function is called by limProcessSmeReqMessages() to send |
| 64 | * eWNI_SME_START_RSP, eWNI_SME_MEASUREMENT_RSP, eWNI_SME_STOP_BSS_RSP |
| 65 | * or eWNI_SME_SWITCH_CHL_RSP messages to applications above MAC |
| 66 | * Software. |
| 67 | * |
| 68 | *PARAMS: |
| 69 | * |
| 70 | *LOGIC: |
| 71 | * |
| 72 | *ASSUMPTIONS: |
| 73 | * NA |
| 74 | * |
| 75 | *NOTE: |
| 76 | * NA |
| 77 | * |
| 78 | * @param pMac Pointer to Global MAC structure |
| 79 | * @param msgType Indicates message type |
| 80 | * @param resultCode Indicates the result of previously issued |
| 81 | * eWNI_SME_msgType_REQ message |
| 82 | * |
| 83 | * @return None |
| 84 | */ |
| 85 | |
| 86 | void |
| 87 | limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType, |
| 88 | tSirResultCodes resultCode,tANI_U8 smesessionId, tANI_U16 smetransactionId) |
| 89 | { |
| 90 | tSirMsgQ mmhMsg; |
| 91 | tSirSmeRsp *pSirSmeRsp; |
| 92 | |
| 93 | PELOG1(limLog(pMac, LOG1, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 94 | FL("Sending message %s with reasonCode %s"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 95 | limMsgStr(msgType), limResultCodeStr(resultCode));) |
| 96 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 97 | pSirSmeRsp = vos_mem_malloc(sizeof(tSirSmeRsp)); |
| 98 | if ( NULL == pSirSmeRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 99 | { |
| 100 | /// Buffer not available. Log error |
| 101 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 102 | FL("call to AllocateMemory failed for eWNI_SME_*_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 103 | |
| 104 | return; |
| 105 | } |
| 106 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 107 | pSirSmeRsp->messageType = msgType; |
| 108 | pSirSmeRsp->length = sizeof(tSirSmeRsp); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 109 | pSirSmeRsp->statusCode = resultCode; |
| 110 | |
| 111 | /* Update SME session Id and Transaction Id */ |
| 112 | pSirSmeRsp->sessionId = smesessionId; |
| 113 | pSirSmeRsp->transactionId = smetransactionId; |
| 114 | |
| 115 | |
| 116 | mmhMsg.type = msgType; |
| 117 | mmhMsg.bodyptr = pSirSmeRsp; |
| 118 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 119 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, smesessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 120 | |
| 121 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 122 | { |
| 123 | tpPESession psessionEntry = peGetValidPowerSaveSession(pMac); |
| 124 | switch(msgType) |
| 125 | { |
| 126 | case eWNI_PMC_ENTER_BMPS_RSP: |
| 127 | limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_BMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 128 | break; |
| 129 | case eWNI_PMC_EXIT_BMPS_RSP: |
| 130 | limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_BMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 131 | break; |
| 132 | case eWNI_PMC_ENTER_IMPS_RSP: |
| 133 | limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_IMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 134 | break; |
| 135 | case eWNI_PMC_EXIT_IMPS_RSP: |
| 136 | limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_IMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 137 | break; |
| 138 | case eWNI_PMC_ENTER_UAPSD_RSP: |
| 139 | limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_UAPSD_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 140 | break; |
| 141 | case eWNI_PMC_EXIT_UAPSD_RSP: |
| 142 | limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_UAPSD_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 143 | break; |
| 144 | case eWNI_SME_SWITCH_CHL_RSP: |
| 145 | limDiagEventReport(pMac, WLAN_PE_DIAG_SWITCH_CHL_RSP_EVENT, NULL, (tANI_U16)resultCode, 0); |
| 146 | break; |
| 147 | case eWNI_SME_STOP_BSS_RSP: |
| 148 | limDiagEventReport(pMac, WLAN_PE_DIAG_STOP_BSS_RSP_EVENT, NULL, (tANI_U16)resultCode, 0); |
| 149 | break; |
| 150 | case eWNI_PMC_ENTER_WOWL_RSP: |
| 151 | limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_WOWL_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 152 | break; |
| 153 | case eWNI_PMC_EXIT_WOWL_RSP: |
| 154 | limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_WOWL_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 155 | break; |
| 156 | } |
| 157 | } |
| 158 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 159 | |
| 160 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 161 | } /*** end limSendSmeRsp() ***/ |
| 162 | |
Anurag Chouhan | bdb1fd6 | 2017-07-19 16:32:33 +0530 | [diff] [blame] | 163 | /** |
| 164 | * lim_add_bss_info() - copy data from session entry to join rsp |
| 165 | * @session_entry: PE Session Info |
| 166 | * @sme_join_rsp: Join response buffer to be filled up |
| 167 | * |
| 168 | * Return: None |
| 169 | */ |
| 170 | void lim_add_bss_info(tpDphHashNode sta_ds, |
| 171 | tpSirSmeJoinRsp sme_join_rsp) |
| 172 | { |
| 173 | struct parsed_ies *parsed_ies = &sta_ds->parsed_ies; |
| 174 | |
| 175 | if (parsed_ies->hs20vendor_ie.present) |
| 176 | sme_join_rsp->hs20vendor_ie = parsed_ies->hs20vendor_ie; |
| 177 | if (parsed_ies->vht_caps.present) |
| 178 | sme_join_rsp->vht_caps = parsed_ies->vht_caps; |
| 179 | if (parsed_ies->ht_caps.present) |
| 180 | sme_join_rsp->ht_caps = parsed_ies->ht_caps; |
| 181 | if (parsed_ies->ht_operation.present) |
| 182 | sme_join_rsp->ht_operation = parsed_ies->ht_operation; |
| 183 | if (parsed_ies->vht_operation.present) |
| 184 | sme_join_rsp->vht_operation = parsed_ies->vht_operation; |
| 185 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 186 | |
| 187 | /** |
| 188 | * limSendSmeJoinReassocRspAfterResume() |
| 189 | * |
| 190 | *FUNCTION: |
| 191 | * This function is called to send Join/Reassoc rsp |
| 192 | * message to SME after the resume link. |
| 193 | * |
| 194 | *PARAMS: |
| 195 | * |
| 196 | *LOGIC: |
| 197 | * |
| 198 | *ASSUMPTIONS: |
| 199 | * NA |
| 200 | * |
| 201 | *NOTE: |
| 202 | * NA |
| 203 | * |
| 204 | * @param pMac Pointer to Global MAC structure |
| 205 | * @param status Resume link status |
| 206 | * @param ctx context passed while calling resmune link. |
| 207 | * (join response to be sent) |
| 208 | * |
| 209 | * @return None |
| 210 | */ |
| 211 | static void limSendSmeJoinReassocRspAfterResume( tpAniSirGlobal pMac, |
| 212 | eHalStatus status, tANI_U32 *ctx) |
| 213 | { |
| 214 | tSirMsgQ mmhMsg; |
| 215 | tpSirSmeJoinRsp pSirSmeJoinRsp = (tpSirSmeJoinRsp) ctx; |
| 216 | |
| 217 | mmhMsg.type = pSirSmeJoinRsp->messageType; |
| 218 | mmhMsg.bodyptr = pSirSmeJoinRsp; |
| 219 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 220 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 221 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 222 | } |
| 223 | |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 224 | /** |
| 225 | * limGetMaxRateFlags() |
| 226 | * |
| 227 | *FUNCTION: |
| 228 | *This function is called by limSendSmeJoinReassocRsp get rateFlags. |
| 229 | *These rateflags are used when MAX link-speed need to be reported |
| 230 | *to UI. |
| 231 | * |
| 232 | *PARAMS: |
| 233 | * @param pStaDs - Pointer to internal STA Datastructure |
| 234 | * @param psessionEntry - Pointer to the session entry |
| 235 | * |
| 236 | *LOGIC: |
| 237 | * |
| 238 | *ASSUMPTIONS: |
| 239 | * |
| 240 | *NOTE: |
| 241 | * |
| 242 | * @return rateFlags |
| 243 | */ |
| 244 | tANI_U32 limGetMaxRateFlags(tpDphHashNode pStaDs, tpPESession psessionEntry) |
| 245 | { |
| 246 | tANI_U32 rate_flags = 0; |
| 247 | |
| 248 | if (NULL == psessionEntry) |
| 249 | { |
| 250 | return rate_flags; |
| 251 | } |
| 252 | |
| 253 | if(!IS_DOT11_MODE_HT(psessionEntry->dot11mode) && |
| 254 | !IS_DOT11_MODE_VHT(psessionEntry->dot11mode)) |
| 255 | { |
| 256 | rate_flags |= eHAL_TX_RATE_LEGACY; |
| 257 | } |
| 258 | else |
| 259 | { |
Arun Khandavalli | c9bb487 | 2015-12-08 19:22:30 +0530 | [diff] [blame] | 260 | if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) |
| 261 | #ifdef WLAN_FEATURE_11AC |
| 262 | || IS_DOT11_MODE_VHT(psessionEntry->dot11mode) |
| 263 | ) |
| 264 | #endif |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 265 | { |
Arun Khandavalli | c9bb487 | 2015-12-08 19:22:30 +0530 | [diff] [blame] | 266 | if (pStaDs->htShortGI20Mhz || pStaDs->htShortGI40Mhz) |
| 267 | rate_flags |= eHAL_TX_RATE_SGI; |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 268 | } |
Arun Khandavalli | c9bb487 | 2015-12-08 19:22:30 +0530 | [diff] [blame] | 269 | |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 270 | #ifdef WLAN_FEATURE_11AC |
| 271 | if(IS_DOT11_MODE_VHT(psessionEntry->dot11mode)) |
| 272 | { |
c_hpothu | d65d218 | 2014-06-06 21:18:17 +0530 | [diff] [blame] | 273 | if (WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ == |
| 274 | pStaDs->vhtSupportedChannelWidthSet) |
| 275 | { |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 276 | rate_flags |= eHAL_TX_RATE_VHT80; |
c_hpothu | d65d218 | 2014-06-06 21:18:17 +0530 | [diff] [blame] | 277 | } |
| 278 | else if(WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ == |
| 279 | pStaDs->vhtSupportedChannelWidthSet) |
| 280 | { |
| 281 | if (eHT_CHANNEL_WIDTH_40MHZ == |
| 282 | pStaDs->htSupportedChannelWidthSet) |
| 283 | rate_flags |= eHAL_TX_RATE_VHT40; |
| 284 | else |
| 285 | rate_flags |= eHAL_TX_RATE_VHT20; |
| 286 | } |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 287 | } |
Arun Khandavalli | c9bb487 | 2015-12-08 19:22:30 +0530 | [diff] [blame] | 288 | else |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 289 | #endif |
Arun Khandavalli | c9bb487 | 2015-12-08 19:22:30 +0530 | [diff] [blame] | 290 | if(IS_DOT11_MODE_HT(psessionEntry->dot11mode)) |
| 291 | { |
| 292 | if (pStaDs->htSupportedChannelWidthSet) |
| 293 | rate_flags |=eHAL_TX_RATE_HT40; |
| 294 | else |
| 295 | rate_flags |=eHAL_TX_RATE_HT20; |
| 296 | } |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | return rate_flags; |
| 300 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 301 | |
| 302 | /** |
| 303 | * limSendSmeJoinReassocRsp() |
| 304 | * |
| 305 | *FUNCTION: |
| 306 | * This function is called by limProcessSmeReqMessages() to send |
| 307 | * eWNI_SME_JOIN_RSP or eWNI_SME_REASSOC_RSP messages to applications |
| 308 | * above MAC Software. |
| 309 | * |
| 310 | *PARAMS: |
| 311 | * |
| 312 | *LOGIC: |
| 313 | * |
| 314 | *ASSUMPTIONS: |
| 315 | * NA |
| 316 | * |
| 317 | *NOTE: |
| 318 | * NA |
| 319 | * |
| 320 | * @param pMac Pointer to Global MAC structure |
| 321 | * @param msgType Indicates message type |
| 322 | * @param resultCode Indicates the result of previously issued |
| 323 | * eWNI_SME_msgType_REQ message |
| 324 | * |
| 325 | * @return None |
| 326 | */ |
| 327 | |
| 328 | void |
| 329 | limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType, |
| 330 | tSirResultCodes resultCode, tANI_U16 protStatusCode, |
| 331 | tpPESession psessionEntry,tANI_U8 smesessionId,tANI_U16 smetransactionId) |
| 332 | { |
| 333 | tpSirSmeJoinRsp pSirSmeJoinRsp; |
| 334 | tANI_U32 rspLen; |
| 335 | tpDphHashNode pStaDs = NULL; |
| 336 | |
| 337 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 338 | if (msgType == eWNI_SME_REASSOC_RSP) |
| 339 | limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 340 | else |
| 341 | limDiagEventReport(pMac, WLAN_PE_DIAG_JOIN_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 342 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 343 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 344 | limLog(pMac, LOG1, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 345 | FL("Sending message %s with reasonCode %s"), |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 346 | limMsgStr(msgType), limResultCodeStr(resultCode)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 347 | |
| 348 | if(psessionEntry == NULL) |
| 349 | { |
| 350 | |
| 351 | rspLen = sizeof(tSirSmeJoinRsp); |
| 352 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 353 | pSirSmeJoinRsp = vos_mem_malloc(rspLen); |
| 354 | if ( NULL == pSirSmeJoinRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 355 | { |
| 356 | /// Buffer not available. Log error |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 357 | limLog(pMac, LOGP, FL("call to AllocateMemory failed for JOIN/REASSOC_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 358 | return; |
| 359 | } |
| 360 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 361 | vos_mem_set((tANI_U8*)pSirSmeJoinRsp, rspLen, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 362 | |
| 363 | |
| 364 | pSirSmeJoinRsp->beaconLength = 0; |
| 365 | pSirSmeJoinRsp->assocReqLength = 0; |
| 366 | pSirSmeJoinRsp->assocRspLength = 0; |
| 367 | } |
| 368 | |
| 369 | else |
| 370 | { |
| 371 | rspLen = psessionEntry->assocReqLen + psessionEntry->assocRspLen + |
| 372 | psessionEntry->bcnLen + |
| 373 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 374 | psessionEntry->RICDataLen + |
| 375 | #endif |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 376 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 377 | psessionEntry->tspecLen + |
| 378 | #endif |
| 379 | sizeof(tSirSmeJoinRsp) - sizeof(tANI_U8) ; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 380 | |
| 381 | pSirSmeJoinRsp = vos_mem_malloc(rspLen); |
| 382 | if ( NULL == pSirSmeJoinRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 383 | { |
| 384 | /// Buffer not available. Log error |
| 385 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 386 | FL("call to AllocateMemory failed for JOIN/REASSOC_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 387 | |
| 388 | return; |
| 389 | } |
| 390 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 391 | vos_mem_set((tANI_U8*)pSirSmeJoinRsp, rspLen, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 392 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 393 | if (resultCode == eSIR_SME_SUCCESS) |
| 394 | { |
| 395 | pStaDs = dphGetHashEntry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable); |
| 396 | if (pStaDs == NULL) |
| 397 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 398 | PELOGE(limLog(pMac, LOGE, FL("could not Get Self Entry for the station"));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 399 | } |
| 400 | else |
| 401 | { |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 402 | //Pass the peer's staId |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 403 | pSirSmeJoinRsp->staId = pStaDs->staIndex; |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 404 | pSirSmeJoinRsp->ucastSig = pStaDs->ucUcastSig; |
| 405 | pSirSmeJoinRsp->bcastSig = pStaDs->ucBcastSig; |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 406 | pSirSmeJoinRsp->maxRateFlags = |
| 407 | limGetMaxRateFlags(pStaDs, psessionEntry); |
Anurag Chouhan | bdb1fd6 | 2017-07-19 16:32:33 +0530 | [diff] [blame] | 408 | lim_add_bss_info(pStaDs, pSirSmeJoinRsp); |
c_hpothu | 44ff4e0 | 2014-05-08 00:13:57 +0530 | [diff] [blame] | 409 | PELOGE(limLog(pMac, LOG1, FL("maxRateFlags: %x"), |
| 410 | pSirSmeJoinRsp->maxRateFlags);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 411 | } |
| 412 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 413 | |
| 414 | pSirSmeJoinRsp->beaconLength = 0; |
| 415 | pSirSmeJoinRsp->assocReqLength = 0; |
| 416 | pSirSmeJoinRsp->assocRspLength = 0; |
| 417 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 418 | pSirSmeJoinRsp->parsedRicRspLen = 0; |
| 419 | #endif |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 420 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 421 | pSirSmeJoinRsp->tspecIeLen = 0; |
| 422 | #endif |
| 423 | |
| 424 | if(resultCode == eSIR_SME_SUCCESS) |
| 425 | { |
| 426 | |
| 427 | if(psessionEntry->beacon != NULL) |
| 428 | { |
| 429 | pSirSmeJoinRsp->beaconLength = psessionEntry->bcnLen; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 430 | vos_mem_copy( pSirSmeJoinRsp->frames, psessionEntry->beacon, |
| 431 | pSirSmeJoinRsp->beaconLength); |
| 432 | vos_mem_free( psessionEntry->beacon); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 433 | psessionEntry->beacon = NULL; |
| 434 | #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 435 | PELOG1(limLog(pMac, LOG1, FL("Beacon=%d"), psessionEntry->bcnLen);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 436 | #endif |
| 437 | } |
| 438 | |
| 439 | if(psessionEntry->assocReq != NULL) |
| 440 | { |
| 441 | pSirSmeJoinRsp->assocReqLength = psessionEntry->assocReqLen; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 442 | vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen, |
| 443 | psessionEntry->assocReq, pSirSmeJoinRsp->assocReqLength); |
| 444 | vos_mem_free( psessionEntry->assocReq); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 445 | psessionEntry->assocReq = NULL; |
| 446 | #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 447 | PELOG1(limLog(pMac, LOG1, FL("AssocReq=%d"), psessionEntry->assocReqLen);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 448 | #endif |
| 449 | } |
| 450 | if(psessionEntry->assocRsp != NULL) |
| 451 | { |
| 452 | pSirSmeJoinRsp->assocRspLength = psessionEntry->assocRspLen; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 453 | vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen + |
| 454 | psessionEntry->assocReqLen, |
| 455 | psessionEntry->assocRsp, |
| 456 | pSirSmeJoinRsp->assocRspLength); |
| 457 | vos_mem_free( psessionEntry->assocRsp); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 458 | psessionEntry->assocRsp = NULL; |
| 459 | } |
| 460 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 461 | if(psessionEntry->ricData != NULL) |
| 462 | { |
| 463 | pSirSmeJoinRsp->parsedRicRspLen = psessionEntry->RICDataLen; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 464 | vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen + |
| 465 | psessionEntry->assocReqLen + psessionEntry->assocRspLen, |
| 466 | psessionEntry->ricData, pSirSmeJoinRsp->parsedRicRspLen); |
| 467 | vos_mem_free(psessionEntry->ricData); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 468 | psessionEntry->ricData = NULL; |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 469 | PELOG1(limLog(pMac, LOG1, FL("RicLength=%d"), pSirSmeJoinRsp->parsedRicRspLen);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 470 | } |
| 471 | #endif |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 472 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 473 | if(psessionEntry->tspecIes != NULL) |
| 474 | { |
| 475 | pSirSmeJoinRsp->tspecIeLen = psessionEntry->tspecLen; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 476 | vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen + |
| 477 | psessionEntry->assocReqLen + psessionEntry->assocRspLen + |
| 478 | psessionEntry->RICDataLen, |
| 479 | psessionEntry->tspecIes, pSirSmeJoinRsp->tspecIeLen); |
| 480 | vos_mem_free(psessionEntry->tspecIes); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 481 | psessionEntry->tspecIes = NULL; |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 482 | PELOG1(limLog(pMac, LOG1, FL("ESE-TspecLen=%d"), psessionEntry->tspecLen);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 483 | } |
| 484 | #endif |
| 485 | pSirSmeJoinRsp->aid = psessionEntry->limAID; |
| 486 | #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 487 | PELOG1(limLog(pMac, LOG1, FL("AssocRsp=%d"), psessionEntry->assocRspLen);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 488 | #endif |
| 489 | } |
Madan Mohan Koyyalamudi | b666eb1 | 2012-09-18 17:29:47 -0700 | [diff] [blame] | 490 | else |
| 491 | { |
| 492 | |
| 493 | if(psessionEntry->beacon != NULL) |
| 494 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 495 | vos_mem_free(psessionEntry->beacon); |
Madan Mohan Koyyalamudi | b666eb1 | 2012-09-18 17:29:47 -0700 | [diff] [blame] | 496 | psessionEntry->beacon = NULL; |
| 497 | } |
| 498 | |
| 499 | if(psessionEntry->assocReq != NULL) |
| 500 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 501 | vos_mem_free( psessionEntry->assocReq); |
Madan Mohan Koyyalamudi | b666eb1 | 2012-09-18 17:29:47 -0700 | [diff] [blame] | 502 | psessionEntry->assocReq = NULL; |
| 503 | } |
| 504 | |
| 505 | if(psessionEntry->assocRsp != NULL) |
| 506 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 507 | vos_mem_free( psessionEntry->assocRsp); |
Madan Mohan Koyyalamudi | b666eb1 | 2012-09-18 17:29:47 -0700 | [diff] [blame] | 508 | psessionEntry->assocRsp = NULL; |
| 509 | } |
Deepthi Gowri | 241fac3 | 2015-04-23 14:27:15 +0530 | [diff] [blame] | 510 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 511 | if(psessionEntry->ricData != NULL) |
| 512 | { |
| 513 | vos_mem_free( psessionEntry->ricData); |
| 514 | psessionEntry->ricData = NULL; |
| 515 | } |
| 516 | #endif |
Madan Mohan Koyyalamudi | b666eb1 | 2012-09-18 17:29:47 -0700 | [diff] [blame] | 517 | |
Deepthi Gowri | 241fac3 | 2015-04-23 14:27:15 +0530 | [diff] [blame] | 518 | #ifdef FEATURE_WLAN_ESE |
| 519 | if(psessionEntry->tspecIes != NULL) |
| 520 | { |
| 521 | vos_mem_free(psessionEntry->tspecIes); |
| 522 | psessionEntry->tspecIes = NULL; |
| 523 | } |
| 524 | #endif |
Madan Mohan Koyyalamudi | b666eb1 | 2012-09-18 17:29:47 -0700 | [diff] [blame] | 525 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 526 | } |
| 527 | |
| 528 | |
| 529 | pSirSmeJoinRsp->messageType = msgType; |
| 530 | pSirSmeJoinRsp->length = (tANI_U16) rspLen; |
| 531 | pSirSmeJoinRsp->statusCode = resultCode; |
| 532 | pSirSmeJoinRsp->protStatusCode = protStatusCode; |
| 533 | |
| 534 | /* Update SME session ID and transaction Id */ |
| 535 | pSirSmeJoinRsp->sessionId = smesessionId; |
| 536 | pSirSmeJoinRsp->transactionId = smetransactionId; |
| 537 | |
| 538 | if(IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) ) |
| 539 | { |
| 540 | if( psessionEntry && psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE ) |
| 541 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 542 | |
| 543 | #ifdef WLAN_FEATURE_11AC |
| 544 | if (psessionEntry->vhtCapability) |
| 545 | { |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 546 | ePhyChanBondState htSecondaryChannelOffset; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 547 | /*Get 11ac cbState from 11n cbState*/ |
| 548 | htSecondaryChannelOffset = limGet11ACPhyCBState(pMac, |
| 549 | psessionEntry->currentOperChannel, |
Madan Mohan Koyyalamudi | c6226de | 2012-09-18 16:33:31 -0700 | [diff] [blame] | 550 | psessionEntry->htSecondaryChannelOffset, |
| 551 | psessionEntry->apCenterChan, |
| 552 | psessionEntry); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 553 | peSetResumeChannel( pMac, psessionEntry->currentOperChannel, htSecondaryChannelOffset); |
| 554 | } |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 555 | else |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 556 | #endif |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 557 | peSetResumeChannel( pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 558 | } |
| 559 | else |
| 560 | { |
| 561 | peSetResumeChannel( pMac, 0, 0); |
| 562 | } |
| 563 | limResumeLink( pMac, limSendSmeJoinReassocRspAfterResume, |
| 564 | (tANI_U32*) pSirSmeJoinRsp ); |
| 565 | } |
| 566 | else |
| 567 | { |
| 568 | limSendSmeJoinReassocRspAfterResume( pMac, eHAL_STATUS_SUCCESS, |
| 569 | (tANI_U32*) pSirSmeJoinRsp ); |
| 570 | } |
| 571 | } /*** end limSendSmeJoinReassocRsp() ***/ |
| 572 | |
| 573 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 574 | /** |
| 575 | * limSendSmeStartBssRsp() |
| 576 | * |
| 577 | *FUNCTION: |
| 578 | * This function is called to send eWNI_SME_START_BSS_RSP |
| 579 | * message to applications above MAC Software. |
| 580 | * |
| 581 | *PARAMS: |
| 582 | * |
| 583 | *LOGIC: |
| 584 | * |
| 585 | *ASSUMPTIONS: |
| 586 | * NA |
| 587 | * |
| 588 | *NOTE: |
| 589 | * NA |
| 590 | * |
| 591 | * @param pMac Pointer to Global MAC structure |
| 592 | * @param msgType Indicates message type |
| 593 | * @param resultCode Indicates the result of previously issued |
| 594 | * eWNI_SME_msgType_REQ message |
| 595 | * |
| 596 | * @return None |
| 597 | */ |
| 598 | |
| 599 | void |
| 600 | limSendSmeStartBssRsp(tpAniSirGlobal pMac, |
| 601 | tANI_U16 msgType, tSirResultCodes resultCode,tpPESession psessionEntry, |
| 602 | tANI_U8 smesessionId,tANI_U16 smetransactionId) |
| 603 | { |
| 604 | |
| 605 | |
| 606 | tANI_U16 size = 0; |
| 607 | tSirMsgQ mmhMsg; |
| 608 | tSirSmeStartBssRsp *pSirSmeRsp; |
| 609 | tANI_U16 ieLen; |
| 610 | tANI_U16 ieOffset, curLen; |
| 611 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 612 | limLog(pMac, LOG1, FL("Sending message %s with reasonCode %s"), |
| 613 | limMsgStr(msgType), limResultCodeStr(resultCode)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 614 | |
| 615 | size = sizeof(tSirSmeStartBssRsp); |
| 616 | |
| 617 | if(psessionEntry == NULL) |
| 618 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 619 | pSirSmeRsp = vos_mem_malloc(size); |
| 620 | if ( NULL == pSirSmeRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 621 | { |
| 622 | /// Buffer not available. Log error |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 623 | limLog(pMac, LOGP,FL("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 624 | return; |
| 625 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 626 | vos_mem_set((tANI_U8*)pSirSmeRsp, size, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 627 | |
| 628 | } |
| 629 | else |
| 630 | { |
| 631 | //subtract size of beaconLength + Mac Hdr + Fixed Fields before SSID |
| 632 | ieOffset = sizeof(tAniBeaconStruct) + SIR_MAC_B_PR_SSID_OFFSET; |
| 633 | ieLen = pMac->sch.schObject.gSchBeaconOffsetBegin + pMac->sch.schObject.gSchBeaconOffsetEnd - ieOffset; |
| 634 | //calculate the memory size to allocate |
| 635 | size += ieLen; |
| 636 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 637 | pSirSmeRsp = vos_mem_malloc(size); |
| 638 | if ( NULL == pSirSmeRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 639 | { |
| 640 | /// Buffer not available. Log error |
| 641 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 642 | FL("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 643 | |
| 644 | return; |
| 645 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 646 | vos_mem_set((tANI_U8*)pSirSmeRsp, size, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 647 | size = sizeof(tSirSmeStartBssRsp); |
| 648 | if (resultCode == eSIR_SME_SUCCESS) |
| 649 | { |
| 650 | |
| 651 | sirCopyMacAddr(pSirSmeRsp->bssDescription.bssId, psessionEntry->bssId); |
| 652 | |
| 653 | /* Read beacon interval from session */ |
| 654 | pSirSmeRsp->bssDescription.beaconInterval = (tANI_U16) psessionEntry->beaconParams.beaconInterval; |
| 655 | pSirSmeRsp->bssType = psessionEntry->bssType; |
| 656 | |
| 657 | if (cfgGetCapabilityInfo( pMac, &pSirSmeRsp->bssDescription.capabilityInfo,psessionEntry) |
| 658 | != eSIR_SUCCESS) |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 659 | limLog(pMac, LOGP, FL("could not retrieve Capabilities value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 660 | |
| 661 | limGetPhyMode(pMac, (tANI_U32 *)&pSirSmeRsp->bssDescription.nwType, psessionEntry); |
| 662 | |
| 663 | #if 0 |
| 664 | if (wlan_cfgGetInt(pMac, WNI_CFG_CURRENT_CHANNEL, &len) != eSIR_SUCCESS) |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 665 | limLog(pMac, LOGP, FL("could not retrieve CURRENT_CHANNEL from CFG")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 666 | |
| 667 | #endif// TO SUPPORT BT-AMP |
| 668 | |
| 669 | pSirSmeRsp->bssDescription.channelId = psessionEntry->currentOperChannel; |
| 670 | |
| 671 | pSirSmeRsp->bssDescription.aniIndicator = 1; |
| 672 | |
| 673 | curLen = pMac->sch.schObject.gSchBeaconOffsetBegin - ieOffset; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 674 | vos_mem_copy( (tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 675 | pMac->sch.schObject.gSchBeaconFrameBegin + ieOffset, |
| 676 | (tANI_U32)curLen); |
| 677 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 678 | vos_mem_copy( ((tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields) + curLen, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 679 | pMac->sch.schObject.gSchBeaconFrameEnd, |
| 680 | (tANI_U32)pMac->sch.schObject.gSchBeaconOffsetEnd); |
| 681 | |
| 682 | |
| 683 | //subtracting size of length indicator itself and size of pointer to ieFields |
Abhishek Singh | bad2b32 | 2016-10-21 11:22:33 +0530 | [diff] [blame] | 684 | pSirSmeRsp->bssDescription.length = |
| 685 | ((uintptr_t)OFFSET_OF(tSirBssDescription, ieFields)) |
| 686 | - sizeof(pSirSmeRsp->bssDescription.length) + ieLen; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 687 | //This is the size of the message, subtracting the size of the pointer to ieFields |
| 688 | size += ieLen - sizeof(tANI_U32); |
| 689 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 690 | } |
| 691 | |
| 692 | pSirSmeRsp->messageType = msgType; |
| 693 | pSirSmeRsp->length = size; |
| 694 | |
| 695 | /* Update SME session Id and transaction Id */ |
| 696 | pSirSmeRsp->sessionId = smesessionId; |
| 697 | pSirSmeRsp->transactionId = smetransactionId; |
| 698 | pSirSmeRsp->statusCode = resultCode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 699 | if(psessionEntry != NULL ) |
| 700 | pSirSmeRsp->staId = psessionEntry->staId; //else it will be always zero smeRsp StaID = 0 |
| 701 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 702 | |
| 703 | mmhMsg.type = msgType; |
| 704 | mmhMsg.bodyptr = pSirSmeRsp; |
| 705 | mmhMsg.bodyval = 0; |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 706 | if(psessionEntry == NULL) |
| 707 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 708 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 709 | } |
| 710 | else |
| 711 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 712 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, |
| 713 | psessionEntry->peSessionId, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 714 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 715 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 716 | limDiagEventReport(pMac, WLAN_PE_DIAG_START_BSS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 717 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 718 | |
| 719 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 720 | } /*** end limSendSmeStartBssRsp() ***/ |
| 721 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 722 | #define LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED 20 |
| 723 | #define LIM_SIZE_OF_EACH_BSS 400 // this is a rough estimate |
| 724 | |
| 725 | |
| 726 | /** |
| 727 | * limSendSmeScanRsp() |
| 728 | * |
| 729 | *FUNCTION: |
| 730 | * This function is called by limProcessSmeReqMessages() to send |
| 731 | * eWNI_SME_SCAN_RSP message to applications above MAC |
| 732 | * Software. |
| 733 | * |
| 734 | *PARAMS: |
| 735 | * |
| 736 | *LOGIC: |
| 737 | * |
| 738 | *ASSUMPTIONS: |
| 739 | * NA |
| 740 | * |
| 741 | *NOTE: |
| 742 | * NA |
| 743 | * |
| 744 | * @param pMac Pointer to Global MAC structure |
| 745 | * @param length Indicates length of message |
| 746 | * @param resultCode Indicates the result of previously issued |
| 747 | * eWNI_SME_SCAN_REQ message |
| 748 | * |
| 749 | * @return None |
| 750 | */ |
| 751 | |
| 752 | void |
| 753 | limSendSmeScanRsp(tpAniSirGlobal pMac, tANI_U16 length, |
| 754 | tSirResultCodes resultCode,tANI_U8 smesessionId,tANI_U16 smetranscationId) |
| 755 | { |
| 756 | tSirMsgQ mmhMsg; |
| 757 | tpSirSmeScanRsp pSirSmeScanRsp=NULL; |
| 758 | tLimScanResultNode *ptemp = NULL; |
| 759 | tANI_U16 msgLen, allocLength, curMsgLen = 0; |
| 760 | tANI_U16 i, bssCount; |
| 761 | tANI_U8 *pbBuf; |
| 762 | tSirBssDescription *pDesc; |
| 763 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 764 | if (resultCode != eSIR_SME_SUCCESS) |
| 765 | { |
| 766 | limPostSmeScanRspMessage(pMac, length, resultCode,smesessionId,smetranscationId); |
| 767 | return; |
| 768 | } |
| 769 | |
| 770 | mmhMsg.type = eWNI_SME_SCAN_RSP; |
| 771 | i = 0; |
| 772 | bssCount = 0; |
| 773 | msgLen = 0; |
| 774 | allocLength = LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED * LIM_SIZE_OF_EACH_BSS; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 775 | pSirSmeScanRsp = vos_mem_malloc(allocLength); |
| 776 | if ( NULL == pSirSmeScanRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 777 | { |
| 778 | // Log error |
| 779 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 780 | FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 781 | |
| 782 | return; |
| 783 | } |
| 784 | for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++) |
| 785 | { |
| 786 | //when ptemp is not NULL it is a left over |
| 787 | ptemp = pMac->lim.gLimCachedScanHashTable[i]; |
| 788 | while(ptemp) |
| 789 | { |
| 790 | pbBuf = ((tANI_U8 *)pSirSmeScanRsp) + msgLen; |
| 791 | if(0 == bssCount) |
| 792 | { |
| 793 | msgLen = sizeof(tSirSmeScanRsp) - |
| 794 | sizeof(tSirBssDescription) + |
| 795 | ptemp->bssDescription.length + |
| 796 | sizeof(ptemp->bssDescription.length); |
| 797 | pDesc = pSirSmeScanRsp->bssDescription; |
| 798 | } |
| 799 | else |
| 800 | { |
| 801 | msgLen += ptemp->bssDescription.length + |
| 802 | sizeof(ptemp->bssDescription.length); |
| 803 | pDesc = (tSirBssDescription *)pbBuf; |
| 804 | } |
| 805 | if( (allocLength < msgLen) || |
| 806 | (LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED <= bssCount++) ) |
| 807 | { |
| 808 | pSirSmeScanRsp->statusCode = |
| 809 | eSIR_SME_MORE_SCAN_RESULTS_FOLLOW; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 810 | pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP; |
| 811 | pSirSmeScanRsp->length = curMsgLen; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 812 | mmhMsg.bodyptr = pSirSmeScanRsp; |
| 813 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 814 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, |
| 815 | mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 816 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 817 | pSirSmeScanRsp = vos_mem_malloc(allocLength); |
| 818 | if ( NULL == pSirSmeScanRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 819 | { |
| 820 | // Log error |
| 821 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 822 | FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 823 | return; |
| 824 | } |
| 825 | msgLen = sizeof(tSirSmeScanRsp) - |
| 826 | sizeof(tSirBssDescription) + |
| 827 | ptemp->bssDescription.length + |
| 828 | sizeof(ptemp->bssDescription.length); |
| 829 | pDesc = pSirSmeScanRsp->bssDescription; |
| 830 | bssCount = 1; |
| 831 | } |
| 832 | curMsgLen = msgLen; |
| 833 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 834 | pDesc->length |
| 835 | = ptemp->bssDescription.length; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 836 | vos_mem_copy( (tANI_U8 *) &pDesc->bssId, |
| 837 | (tANI_U8 *) &ptemp->bssDescription.bssId, |
| 838 | ptemp->bssDescription.length); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 839 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 840 | pSirSmeScanRsp->sessionId = smesessionId; |
| 841 | pSirSmeScanRsp->transcationId = smetranscationId; |
| 842 | |
| 843 | ptemp = ptemp->next; |
| 844 | } //while(ptemp) |
| 845 | } //for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++) |
| 846 | |
| 847 | if(0 == bssCount) |
| 848 | { |
| 849 | limPostSmeScanRspMessage(pMac, length, resultCode, smesessionId, smetranscationId); |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 850 | if (NULL != pSirSmeScanRsp) |
| 851 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 852 | vos_mem_free( pSirSmeScanRsp); |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 853 | pSirSmeScanRsp = NULL; |
| 854 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 855 | } |
| 856 | else |
| 857 | { |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 858 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 859 | limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_RES_FOUND_EVENT, NULL, |
| 860 | eSIR_SUCCESS, eSIR_SUCCESS); |
| 861 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 862 | // send last message |
| 863 | pSirSmeScanRsp->statusCode = eSIR_SME_SUCCESS; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 864 | pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP; |
| 865 | pSirSmeScanRsp->length = curMsgLen; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 866 | |
| 867 | /* Update SME session Id and SME transcation Id */ |
| 868 | pSirSmeScanRsp->sessionId = smesessionId; |
| 869 | pSirSmeScanRsp->transcationId = smetranscationId; |
| 870 | |
| 871 | mmhMsg.type = eWNI_SME_SCAN_RSP; |
| 872 | mmhMsg.bodyptr = pSirSmeScanRsp; |
| 873 | mmhMsg.bodyval = 0; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 874 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
Abhishek Singh | 525045c | 2014-12-15 17:18:45 +0530 | [diff] [blame] | 875 | limLog(pMac, LOG1, FL("statusCode : eSIR_SME_SUCCESS")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 876 | } |
| 877 | |
| 878 | return; |
| 879 | |
| 880 | } /*** end limSendSmeScanRsp() ***/ |
| 881 | |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 882 | #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
| 883 | /** |
| 884 | * limSendSmeLfrScanRsp() |
| 885 | * |
| 886 | *FUNCTION: |
| 887 | * This function is called by limProcessSmeReqMessages() to send |
| 888 | * eWNI_SME_SCAN_RSP message to applications above MAC Software |
| 889 | * only for sending up the roam candidates. |
| 890 | * |
| 891 | *PARAMS: |
| 892 | * |
| 893 | *LOGIC: |
| 894 | * |
| 895 | *ASSUMPTIONS: |
| 896 | * NA |
| 897 | * |
| 898 | *NOTE: |
| 899 | * NA |
| 900 | * |
| 901 | * @param pMac Pointer to Global MAC structure |
| 902 | * @param length Indicates length of message |
| 903 | * @param resultCode Indicates the result of previously issued |
| 904 | * eWNI_SME_SCAN_REQ message |
| 905 | * |
| 906 | * @return None |
| 907 | */ |
| 908 | |
| 909 | void |
| 910 | limSendSmeLfrScanRsp(tpAniSirGlobal pMac, tANI_U16 length, |
| 911 | tSirResultCodes resultCode,tANI_U8 smesessionId,tANI_U16 smetranscationId) |
| 912 | { |
| 913 | tSirMsgQ mmhMsg; |
| 914 | tpSirSmeScanRsp pSirSmeScanRsp=NULL; |
| 915 | tLimScanResultNode *ptemp = NULL; |
| 916 | tANI_U16 msgLen, allocLength, curMsgLen = 0; |
| 917 | tANI_U16 i, bssCount; |
| 918 | tANI_U8 *pbBuf; |
| 919 | tSirBssDescription *pDesc; |
| 920 | |
| 921 | PELOG1(limLog(pMac, LOG1, |
| 922 | FL("Sending message SME_SCAN_RSP with length=%d reasonCode %s\n"), |
| 923 | length, limResultCodeStr(resultCode));) |
| 924 | |
| 925 | if (resultCode != eSIR_SME_SUCCESS) |
| 926 | { |
| 927 | limPostSmeScanRspMessage(pMac, length, resultCode,smesessionId,smetranscationId); |
| 928 | return; |
| 929 | } |
| 930 | |
| 931 | mmhMsg.type = eWNI_SME_SCAN_RSP; |
| 932 | i = 0; |
| 933 | bssCount = 0; |
| 934 | msgLen = 0; |
| 935 | allocLength = LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED * LIM_SIZE_OF_EACH_BSS; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 936 | pSirSmeScanRsp = vos_mem_malloc(allocLength); |
| 937 | if ( NULL == pSirSmeScanRsp ) |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 938 | { |
| 939 | // Log error |
| 940 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 941 | FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP\n")); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 942 | |
| 943 | return; |
| 944 | } |
| 945 | for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++) |
| 946 | { |
| 947 | //when ptemp is not NULL it is a left over |
| 948 | ptemp = pMac->lim.gLimCachedLfrScanHashTable[i]; |
| 949 | while(ptemp) |
| 950 | { |
| 951 | pbBuf = ((tANI_U8 *)pSirSmeScanRsp) + msgLen; |
| 952 | if(0 == bssCount) |
| 953 | { |
| 954 | msgLen = sizeof(tSirSmeScanRsp) - |
| 955 | sizeof(tSirBssDescription) + |
| 956 | ptemp->bssDescription.length + |
| 957 | sizeof(ptemp->bssDescription.length); |
| 958 | pDesc = pSirSmeScanRsp->bssDescription; |
| 959 | } |
| 960 | else |
| 961 | { |
| 962 | msgLen += ptemp->bssDescription.length + |
| 963 | sizeof(ptemp->bssDescription.length); |
| 964 | pDesc = (tSirBssDescription *)pbBuf; |
| 965 | } |
| 966 | if ( (allocLength < msgLen) || |
| 967 | (LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED <= bssCount++) ) |
| 968 | { |
| 969 | pSirSmeScanRsp->statusCode = |
| 970 | eSIR_SME_MORE_SCAN_RESULTS_FOLLOW; |
| 971 | pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP; |
| 972 | pSirSmeScanRsp->length = curMsgLen; |
| 973 | mmhMsg.bodyptr = pSirSmeScanRsp; |
| 974 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 975 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, |
| 976 | mmhMsg.type)); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 977 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 978 | pSirSmeScanRsp = vos_mem_malloc(allocLength); |
| 979 | if ( NULL == pSirSmeScanRsp ) |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 980 | { |
| 981 | // Log error |
| 982 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 983 | FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP\n")); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 984 | return; |
| 985 | } |
| 986 | msgLen = sizeof(tSirSmeScanRsp) - |
| 987 | sizeof(tSirBssDescription) + |
| 988 | ptemp->bssDescription.length + |
| 989 | sizeof(ptemp->bssDescription.length); |
| 990 | pDesc = pSirSmeScanRsp->bssDescription; |
| 991 | bssCount = 1; |
| 992 | } |
| 993 | curMsgLen = msgLen; |
| 994 | |
| 995 | PELOG2(limLog(pMac, LOG2, FL("ScanRsp : msgLen %d, bssDescr Len=%d\n"), |
| 996 | msgLen, ptemp->bssDescription.length);) |
| 997 | pDesc->length |
| 998 | = ptemp->bssDescription.length; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 999 | vos_mem_copy( (tANI_U8 *) &pDesc->bssId, |
| 1000 | (tANI_U8 *) &ptemp->bssDescription.bssId, |
| 1001 | ptemp->bssDescription.length); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 1002 | |
| 1003 | PELOG2(limLog(pMac, LOG2, FL("BssId ")); |
| 1004 | limPrintMacAddr(pMac, ptemp->bssDescription.bssId, LOG2);) |
| 1005 | |
| 1006 | pSirSmeScanRsp->sessionId = smesessionId; |
| 1007 | pSirSmeScanRsp->transcationId = smetranscationId; |
| 1008 | |
| 1009 | ptemp = ptemp->next; |
| 1010 | } //while(ptemp) |
| 1011 | } //for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++) |
| 1012 | |
| 1013 | if (0 == bssCount) |
| 1014 | { |
| 1015 | limPostSmeScanRspMessage(pMac, length, resultCode, smesessionId, smetranscationId); |
| 1016 | if (NULL != pSirSmeScanRsp) |
| 1017 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1018 | vos_mem_free( pSirSmeScanRsp); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 1019 | pSirSmeScanRsp = NULL; |
| 1020 | } |
| 1021 | } |
| 1022 | else |
| 1023 | { |
| 1024 | // send last message |
| 1025 | pSirSmeScanRsp->statusCode = eSIR_SME_SUCCESS; |
| 1026 | pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP; |
| 1027 | pSirSmeScanRsp->length = curMsgLen; |
| 1028 | |
| 1029 | /* Update SME session Id and SME transcation Id */ |
| 1030 | pSirSmeScanRsp->sessionId = smesessionId; |
| 1031 | pSirSmeScanRsp->transcationId = smetranscationId; |
| 1032 | |
| 1033 | mmhMsg.type = eWNI_SME_SCAN_RSP; |
| 1034 | mmhMsg.bodyptr = pSirSmeScanRsp; |
| 1035 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 1036 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 1037 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1038 | PELOG2(limLog(pMac, LOG2, FL("statusCode : eSIR_SME_SUCCESS\n"));) |
| 1039 | } |
| 1040 | |
| 1041 | return; |
| 1042 | |
| 1043 | } /*** end limSendSmeLfrScanRsp() ***/ |
| 1044 | #endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1045 | |
| 1046 | /** |
| 1047 | * limPostSmeScanRspMessage() |
| 1048 | * |
| 1049 | *FUNCTION: |
| 1050 | * This function is called by limSendSmeScanRsp() to send |
| 1051 | * eWNI_SME_SCAN_RSP message with failed result code |
| 1052 | * |
| 1053 | *NOTE: |
| 1054 | * NA |
| 1055 | * |
| 1056 | * @param pMac Pointer to Global MAC structure |
| 1057 | * @param length Indicates length of message |
| 1058 | * @param resultCode failed result code |
| 1059 | * |
| 1060 | * @return None |
| 1061 | */ |
| 1062 | |
| 1063 | void |
| 1064 | limPostSmeScanRspMessage(tpAniSirGlobal pMac, |
| 1065 | tANI_U16 length, |
| 1066 | tSirResultCodes resultCode,tANI_U8 smesessionId, tANI_U16 smetransactionId) |
| 1067 | { |
| 1068 | tpSirSmeScanRsp pSirSmeScanRsp; |
| 1069 | tSirMsgQ mmhMsg; |
| 1070 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 1071 | limLog(pMac, LOG1, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1072 | FL("limPostSmeScanRspMessage: send SME_SCAN_RSP (len %d, reasonCode %s). "), |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 1073 | length, limResultCodeStr(resultCode)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1074 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1075 | pSirSmeScanRsp = vos_mem_malloc(length); |
| 1076 | if ( NULL == pSirSmeScanRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1077 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1078 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_SCAN_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1079 | return; |
| 1080 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1081 | vos_mem_set((void*)pSirSmeScanRsp, length, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1082 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1083 | pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP; |
| 1084 | pSirSmeScanRsp->length = length; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1085 | |
| 1086 | if(sizeof(tSirSmeScanRsp) <= length) |
| 1087 | { |
| 1088 | pSirSmeScanRsp->bssDescription->length = sizeof(tSirBssDescription); |
| 1089 | } |
| 1090 | |
| 1091 | pSirSmeScanRsp->statusCode = resultCode; |
| 1092 | |
| 1093 | /*Update SME session Id and transaction Id */ |
| 1094 | pSirSmeScanRsp->sessionId = smesessionId; |
| 1095 | pSirSmeScanRsp->transcationId = smetransactionId; |
| 1096 | |
| 1097 | mmhMsg.type = eWNI_SME_SCAN_RSP; |
| 1098 | mmhMsg.bodyptr = pSirSmeScanRsp; |
| 1099 | mmhMsg.bodyval = 0; |
| 1100 | |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 1101 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1102 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 1103 | limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_RSP_EVENT, NULL, (tANI_U16)resultCode, 0); |
| 1104 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 1105 | |
| 1106 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1107 | return; |
| 1108 | |
| 1109 | } /*** limPostSmeScanRspMessage ***/ |
| 1110 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1111 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 1112 | |
| 1113 | /** |
| 1114 | * limSendSmeOemDataRsp() |
| 1115 | * |
| 1116 | *FUNCTION: |
| 1117 | * This function is called by limProcessSmeReqMessages() to send |
| 1118 | * eWNI_SME_OEM_DATA_RSP message to applications above MAC |
| 1119 | * Software. |
| 1120 | * |
| 1121 | *PARAMS: |
| 1122 | * |
| 1123 | *LOGIC: |
| 1124 | * |
| 1125 | *ASSUMPTIONS: |
| 1126 | * NA |
| 1127 | * |
| 1128 | *NOTE: |
| 1129 | * NA |
| 1130 | * |
| 1131 | * @param pMac Pointer to Global MAC structure |
| 1132 | * @param pMsgBuf Indicates the mlm message |
| 1133 | * @param resultCode Indicates the result of previously issued |
| 1134 | * eWNI_SME_OEM_DATA_RSP message |
| 1135 | * |
| 1136 | * @return None |
| 1137 | */ |
| 1138 | |
| 1139 | void limSendSmeOemDataRsp(tpAniSirGlobal pMac, tANI_U32* pMsgBuf, tSirResultCodes resultCode) |
| 1140 | { |
| 1141 | tSirMsgQ mmhMsg; |
| 1142 | tSirOemDataRsp* pSirSmeOemDataRsp=NULL; |
| 1143 | tLimMlmOemDataRsp* pMlmOemDataRsp=NULL; |
| 1144 | tANI_U16 msgLength; |
| 1145 | |
| 1146 | |
| 1147 | //get the pointer to the mlm message |
| 1148 | pMlmOemDataRsp = (tLimMlmOemDataRsp*)(pMsgBuf); |
| 1149 | |
| 1150 | msgLength = sizeof(tSirOemDataRsp); |
| 1151 | |
| 1152 | //now allocate memory for the char buffer |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1153 | pSirSmeOemDataRsp = vos_mem_malloc(msgLength); |
| 1154 | if (NULL == pSirSmeOemDataRsp) |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1155 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1156 | limLog(pMac, LOGP, FL("call to AllocateMemory failed for pSirSmeOemDataRsp")); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1157 | return; |
| 1158 | } |
| 1159 | |
| 1160 | #if defined (ANI_LITTLE_BYTE_ENDIAN) |
| 1161 | sirStoreU16N((tANI_U8*)&pSirSmeOemDataRsp->length, msgLength); |
| 1162 | sirStoreU16N((tANI_U8*)&pSirSmeOemDataRsp->messageType, eWNI_SME_OEM_DATA_RSP); |
| 1163 | #else |
| 1164 | pSirSmeOemDataRsp->length = msgLength; |
| 1165 | pSirSmeOemDataRsp->messageType = eWNI_SME_OEM_DATA_RSP; |
| 1166 | #endif |
| 1167 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1168 | vos_mem_copy(pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1169 | |
| 1170 | //Now free the memory from MLM Rsp Message |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1171 | vos_mem_free(pMlmOemDataRsp); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1172 | |
| 1173 | mmhMsg.type = eWNI_SME_OEM_DATA_RSP; |
| 1174 | mmhMsg.bodyptr = pSirSmeOemDataRsp; |
| 1175 | mmhMsg.bodyval = 0; |
| 1176 | |
| 1177 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1178 | |
| 1179 | return; |
| 1180 | } /*** limSendSmeOemDataRsp ***/ |
| 1181 | |
| 1182 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1183 | |
| 1184 | |
| 1185 | /** |
| 1186 | * limSendSmeAuthRsp() |
| 1187 | * |
| 1188 | *FUNCTION: |
| 1189 | * This function is called by limProcessSmeMessages() to send |
| 1190 | * eWNI_SME_AUTH_RSP message to host |
| 1191 | * |
| 1192 | *PARAMS: |
| 1193 | * |
| 1194 | *LOGIC: |
| 1195 | * |
| 1196 | *ASSUMPTIONS: |
| 1197 | * NA |
| 1198 | * |
| 1199 | *NOTE: |
| 1200 | * NA |
| 1201 | * |
| 1202 | * @param pMac Pointer to Global MAC structure |
| 1203 | * @param statusCode Indicates the result of previously issued |
| 1204 | * eWNI_SME_AUTH_REQ message |
| 1205 | * |
| 1206 | * @return None |
| 1207 | */ |
| 1208 | void |
| 1209 | limSendSmeAuthRsp(tpAniSirGlobal pMac, |
| 1210 | tSirResultCodes statusCode, |
| 1211 | tSirMacAddr peerMacAddr, |
| 1212 | tAniAuthType authType, |
| 1213 | tANI_U16 protStatusCode, |
| 1214 | tpPESession psessionEntry,tANI_U8 smesessionId, |
| 1215 | tANI_U16 smetransactionId) |
| 1216 | { |
| 1217 | #if 0 |
| 1218 | tSirMsgQ mmhMsg; |
| 1219 | tSirSmeAuthRsp *pSirSmeAuthRsp; |
| 1220 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1221 | pSirSmeAuthRsp = vos_mem_malloc(sizeof(tSirSmeAuthRsp)); |
| 1222 | if (NULL == pSirSmeAuthRsp) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1223 | { |
| 1224 | // Log error |
| 1225 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1226 | FL("call to AllocateMemory failed for eWNI_SME_AUTH_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1227 | |
| 1228 | return; |
| 1229 | } |
| 1230 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1231 | |
| 1232 | |
| 1233 | if(psessionEntry != NULL) |
| 1234 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1235 | vos_mem_copy( (tANI_U8 *) pSirSmeAuthRsp->peerMacAddr, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1236 | (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr)); |
| 1237 | pSirSmeAuthRsp->authType = authType; |
| 1238 | |
| 1239 | } |
| 1240 | |
| 1241 | pSirSmeAuthRsp->messageType = eWNI_SME_AUTH_RSP; |
| 1242 | pSirSmeAuthRsp->length = sizeof(tSirSmeAuthRsp); |
| 1243 | pSirSmeAuthRsp->statusCode = statusCode; |
| 1244 | pSirSmeAuthRsp->protStatusCode = protStatusCode; |
| 1245 | |
| 1246 | /* Update SME session and transaction Id*/ |
| 1247 | pSirSmeAuthRsp->sessionId = smesessionId; |
| 1248 | pSirSmeAuthRsp->transactionId = smetransactionId; |
| 1249 | |
| 1250 | mmhMsg.type = eWNI_SME_AUTH_RSP; |
| 1251 | mmhMsg.bodyptr = pSirSmeAuthRsp; |
| 1252 | mmhMsg.bodyval = 0; |
| 1253 | MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type)); |
| 1254 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1255 | #endif |
| 1256 | } /*** end limSendSmeAuthRsp() ***/ |
| 1257 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1258 | /** |
| 1259 | * limSendSmeDisassocNtf() |
| 1260 | * |
| 1261 | *FUNCTION: |
| 1262 | * This function is called by limProcessSmeMessages() to send |
| 1263 | * eWNI_SME_DISASSOC_RSP/IND message to host |
| 1264 | * |
| 1265 | *PARAMS: |
| 1266 | * |
| 1267 | *LOGIC: |
| 1268 | * |
| 1269 | *ASSUMPTIONS: |
| 1270 | * NA |
| 1271 | * |
| 1272 | *NOTE: |
| 1273 | * This function is used for sending eWNI_SME_DISASSOC_CNF, |
| 1274 | * or eWNI_SME_DISASSOC_IND to host depending on |
| 1275 | * disassociation trigger. |
| 1276 | * |
| 1277 | * @param peerMacAddr Indicates the peer MAC addr to which |
| 1278 | * disassociate was initiated |
| 1279 | * @param reasonCode Indicates the reason for Disassociation |
| 1280 | * @param disassocTrigger Indicates the trigger for Disassociation |
| 1281 | * @param aid Indicates the STAID. This parameter is |
| 1282 | * present only on AP. |
| 1283 | * |
| 1284 | * @return None |
| 1285 | */ |
| 1286 | void |
| 1287 | limSendSmeDisassocNtf(tpAniSirGlobal pMac, |
| 1288 | tSirMacAddr peerMacAddr, |
| 1289 | tSirResultCodes reasonCode, |
| 1290 | tANI_U16 disassocTrigger, |
| 1291 | tANI_U16 aid, |
| 1292 | tANI_U8 smesessionId, |
| 1293 | tANI_U16 smetransactionId, |
| 1294 | tpPESession psessionEntry) |
| 1295 | { |
| 1296 | |
| 1297 | tANI_U8 *pBuf; |
| 1298 | tSirSmeDisassocRsp *pSirSmeDisassocRsp; |
| 1299 | tSirSmeDisassocInd *pSirSmeDisassocInd; |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1300 | tSirSmeDisConDoneInd *pSirSmeDisConDoneInd; |
Sushant Kaushik | 7ac65f0 | 2015-04-13 16:12:23 +0530 | [diff] [blame] | 1301 | bool failure = FALSE; |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1302 | vos_msg_t msg = {0}; |
Sachin Ahuja | 2fea3d1 | 2014-12-18 17:31:31 +0530 | [diff] [blame] | 1303 | |
| 1304 | limLog(pMac, LOG1, FL("Disassoc Ntf with trigger : %d" |
| 1305 | "reasonCode: %d"), |
| 1306 | disassocTrigger, |
| 1307 | reasonCode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1308 | switch (disassocTrigger) |
| 1309 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1310 | case eLIM_HOST_DISASSOC: |
| 1311 | /** |
| 1312 | * Disassociation response due to |
| 1313 | * host triggered disassociation |
| 1314 | */ |
| 1315 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1316 | pSirSmeDisassocRsp = vos_mem_malloc(sizeof(tSirSmeDisassocRsp)); |
| 1317 | if ( NULL == pSirSmeDisassocRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1318 | { |
| 1319 | // Log error |
| 1320 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1321 | FL("call to AllocateMemory failed for eWNI_SME_DISASSOC_RSP")); |
Sushant Kaushik | 7ac65f0 | 2015-04-13 16:12:23 +0530 | [diff] [blame] | 1322 | failure = TRUE; |
| 1323 | goto error; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1324 | } |
Sachin Ahuja | 2fea3d1 | 2014-12-18 17:31:31 +0530 | [diff] [blame] | 1325 | limLog(pMac, LOG1, FL("send eWNI_SME_DISASSOC_RSP with " |
Abhishek Singh | cd09b56 | 2013-12-24 16:02:20 +0530 | [diff] [blame] | 1326 | "retCode: %d for "MAC_ADDRESS_STR),reasonCode, |
| 1327 | MAC_ADDR_ARRAY(peerMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1328 | pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP; |
| 1329 | pSirSmeDisassocRsp->length = sizeof(tSirSmeDisassocRsp); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1330 | //sessionId |
| 1331 | pBuf = (tANI_U8 *) &pSirSmeDisassocRsp->sessionId; |
| 1332 | *pBuf = smesessionId; |
| 1333 | pBuf++; |
| 1334 | |
| 1335 | //transactionId |
| 1336 | limCopyU16(pBuf, smetransactionId); |
| 1337 | pBuf += sizeof(tANI_U16); |
| 1338 | |
| 1339 | //statusCode |
| 1340 | limCopyU32(pBuf, reasonCode); |
| 1341 | pBuf += sizeof(tSirResultCodes); |
| 1342 | |
| 1343 | //peerMacAddr |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1344 | vos_mem_copy( pBuf, peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1345 | pBuf += sizeof(tSirMacAddr); |
| 1346 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1347 | // Clear Station Stats |
| 1348 | //for sta, it is always 1, IBSS is handled at halInitSta |
| 1349 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1350 | |
| 1351 | |
| 1352 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1353 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1354 | limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_RSP_EVENT, |
| 1355 | psessionEntry, (tANI_U16)reasonCode, 0); |
| 1356 | #endif |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1357 | msg.type = eWNI_SME_DISASSOC_RSP; |
| 1358 | msg.bodyptr = pSirSmeDisassocRsp; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1359 | break; |
| 1360 | |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1361 | case eLIM_PEER_ENTITY_DISASSOC: |
| 1362 | case eLIM_LINK_MONITORING_DISASSOC: |
| 1363 | pSirSmeDisConDoneInd = vos_mem_malloc(sizeof(tSirSmeDisConDoneInd)); |
| 1364 | if ( NULL == pSirSmeDisConDoneInd ) |
| 1365 | { |
| 1366 | // Log error |
| 1367 | limLog(pMac, LOGP, |
| 1368 | FL("call to AllocateMemory failed for disconnect indication")); |
| 1369 | |
| 1370 | return; |
| 1371 | } |
| 1372 | vos_mem_zero(pSirSmeDisConDoneInd, sizeof(tSirSmeDisConDoneInd)); |
| 1373 | limLog(pMac, LOG1, |
| 1374 | FL("send eWNI_SME_DISCONNECT_DONE_IND withretCode: %d"), |
| 1375 | reasonCode); |
| 1376 | pSirSmeDisConDoneInd->messageType = eWNI_SME_DISCONNECT_DONE_IND; |
| 1377 | pSirSmeDisConDoneInd->length = sizeof(tSirSmeDisConDoneInd); |
| 1378 | vos_mem_copy(pSirSmeDisConDoneInd->peerMacAddr, peerMacAddr, |
| 1379 | sizeof(tSirMacAddr)); |
| 1380 | pSirSmeDisConDoneInd->sessionId = smesessionId; |
Selvaraj, Sridhar | a9545d9 | 2016-06-08 17:38:20 +0530 | [diff] [blame] | 1381 | |
| 1382 | if (reasonCode == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE) |
| 1383 | pSirSmeDisConDoneInd->reasonCode = 0; |
| 1384 | else |
| 1385 | pSirSmeDisConDoneInd->reasonCode = reasonCode; |
| 1386 | |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1387 | msg.type = eWNI_SME_DISCONNECT_DONE_IND; |
| 1388 | msg.bodyptr = pSirSmeDisConDoneInd; |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1389 | break; |
| 1390 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1391 | default: |
| 1392 | /** |
| 1393 | * Disassociation indication due to Disassociation |
| 1394 | * frame reception from peer entity or due to |
| 1395 | * loss of link with peer entity. |
| 1396 | */ |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1397 | pSirSmeDisassocInd = vos_mem_malloc(sizeof(tSirSmeDisassocInd)); |
| 1398 | if ( NULL == pSirSmeDisassocInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1399 | { |
| 1400 | // Log error |
| 1401 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1402 | FL("call to AllocateMemory failed for eWNI_SME_DISASSOC_IND")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1403 | |
Sushant Kaushik | 7ac65f0 | 2015-04-13 16:12:23 +0530 | [diff] [blame] | 1404 | failure = TRUE; |
| 1405 | goto error; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1406 | } |
Abhishek Singh | cd09b56 | 2013-12-24 16:02:20 +0530 | [diff] [blame] | 1407 | limLog(pMac, LOG1, FL("send eWNI_SME_DISASSOC_IND with " |
| 1408 | "retCode: %d for "MAC_ADDRESS_STR),reasonCode, |
| 1409 | MAC_ADDR_ARRAY(peerMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1410 | pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND; |
| 1411 | pSirSmeDisassocInd->length = sizeof(tSirSmeDisassocInd); |
| 1412 | |
| 1413 | /* Update SME session Id and Transaction Id */ |
| 1414 | pSirSmeDisassocInd->sessionId = smesessionId; |
| 1415 | pSirSmeDisassocInd->transactionId = smetransactionId; |
Mohit Khanna | 99d5fd0 | 2012-09-11 14:51:20 -0700 | [diff] [blame] | 1416 | pSirSmeDisassocInd->reasonCode = reasonCode; |
Wu Gao | 742b735 | 2015-10-16 19:10:40 +0800 | [diff] [blame] | 1417 | pSirSmeDisassocInd->assocId = aid; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1418 | pBuf = (tANI_U8 *) &pSirSmeDisassocInd->statusCode; |
| 1419 | |
| 1420 | limCopyU32(pBuf, reasonCode); |
| 1421 | pBuf += sizeof(tSirResultCodes); |
| 1422 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1423 | vos_mem_copy( pBuf, psessionEntry->bssId, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1424 | pBuf += sizeof(tSirMacAddr); |
| 1425 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1426 | vos_mem_copy( pBuf, peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1427 | |
| 1428 | |
| 1429 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 1430 | limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, |
| 1431 | psessionEntry, (tANI_U16)reasonCode, 0); |
| 1432 | #endif |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1433 | msg.type = eWNI_SME_DISASSOC_IND; |
| 1434 | msg.bodyptr = pSirSmeDisassocInd; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1435 | |
| 1436 | break; |
| 1437 | } |
| 1438 | |
Sushant Kaushik | 7ac65f0 | 2015-04-13 16:12:23 +0530 | [diff] [blame] | 1439 | error: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1440 | /* Delete the PE session Created */ |
| 1441 | if((psessionEntry != NULL) && ((psessionEntry ->limSystemRole == eLIM_STA_ROLE) || |
| 1442 | (psessionEntry ->limSystemRole == eLIM_BT_AMP_STA_ROLE)) ) |
| 1443 | { |
| 1444 | peDeleteSession(pMac,psessionEntry); |
| 1445 | } |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1446 | if (failure == FALSE && pMac->lim.sme_msg_callback) |
| 1447 | pMac->lim.sme_msg_callback(pMac, &msg); |
| 1448 | else if (failure == FALSE) |
| 1449 | limLog(pMac, LOGE, FL("Sme msg callback is NULL")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1450 | } /*** end limSendSmeDisassocNtf() ***/ |
| 1451 | |
| 1452 | |
| 1453 | /** ----------------------------------------------------------------- |
| 1454 | \brief limSendSmeDisassocInd() - sends SME_DISASSOC_IND |
| 1455 | |
| 1456 | After receiving disassociation frame from peer entity, this |
| 1457 | function sends a eWNI_SME_DISASSOC_IND to SME with a specific |
| 1458 | reason code. |
| 1459 | |
| 1460 | \param pMac - global mac structure |
| 1461 | \param pStaDs - station dph hash node |
| 1462 | \return none |
| 1463 | \sa |
| 1464 | ----------------------------------------------------------------- */ |
| 1465 | void |
| 1466 | limSendSmeDisassocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs,tpPESession psessionEntry) |
| 1467 | { |
| 1468 | tSirMsgQ mmhMsg; |
| 1469 | tSirSmeDisassocInd *pSirSmeDisassocInd; |
| 1470 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1471 | pSirSmeDisassocInd = vos_mem_malloc(sizeof(tSirSmeDisassocInd)); |
| 1472 | if ( NULL == pSirSmeDisassocInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1473 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1474 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_DISASSOC_IND")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1475 | return; |
| 1476 | } |
| 1477 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1478 | pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND; |
| 1479 | pSirSmeDisassocInd->length = sizeof(tSirSmeDisassocInd); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1480 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1481 | pSirSmeDisassocInd->sessionId = psessionEntry->smeSessionId; |
| 1482 | pSirSmeDisassocInd->transactionId = psessionEntry->transactionId; |
Padma, Santhosh Kumar | 95eaa7b | 2016-09-01 19:11:16 +0530 | [diff] [blame] | 1483 | pSirSmeDisassocInd->statusCode = eSIR_SME_DEAUTH_STATUS; |
Mohit Khanna | 99d5fd0 | 2012-09-11 14:51:20 -0700 | [diff] [blame] | 1484 | pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason; |
Wu Gao | 742b735 | 2015-10-16 19:10:40 +0800 | [diff] [blame] | 1485 | pSirSmeDisassocInd->assocId = pStaDs->assocId; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1486 | |
| 1487 | vos_mem_copy( pSirSmeDisassocInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); |
| 1488 | |
| 1489 | vos_mem_copy( pSirSmeDisassocInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1490 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1491 | pSirSmeDisassocInd->staId = pStaDs->staIndex; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1492 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1493 | mmhMsg.type = eWNI_SME_DISASSOC_IND; |
| 1494 | mmhMsg.bodyptr = pSirSmeDisassocInd; |
| 1495 | mmhMsg.bodyval = 0; |
| 1496 | |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 1497 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, psessionEntry->peSessionId, |
| 1498 | mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1499 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 1500 | limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, psessionEntry, 0, (tANI_U16)pStaDs->mlmStaContext.disassocReason); |
| 1501 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 1502 | |
| 1503 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1504 | |
| 1505 | } /*** end limSendSmeDisassocInd() ***/ |
| 1506 | |
| 1507 | |
| 1508 | /** ----------------------------------------------------------------- |
| 1509 | \brief limSendSmeDeauthInd() - sends SME_DEAUTH_IND |
| 1510 | |
| 1511 | After receiving deauthentication frame from peer entity, this |
| 1512 | function sends a eWNI_SME_DEAUTH_IND to SME with a specific |
| 1513 | reason code. |
| 1514 | |
| 1515 | \param pMac - global mac structure |
| 1516 | \param pStaDs - station dph hash node |
| 1517 | \return none |
| 1518 | \sa |
| 1519 | ----------------------------------------------------------------- */ |
| 1520 | void |
| 1521 | limSendSmeDeauthInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry) |
| 1522 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1523 | tSirMsgQ mmhMsg; |
| 1524 | tSirSmeDeauthInd *pSirSmeDeauthInd; |
| 1525 | |
Bhargav Shah | e3a6ff0 | 2016-04-11 16:31:49 +0530 | [diff] [blame] | 1526 | limSendTLPauseInd(pMac, pStaDs->staIndex); |
| 1527 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1528 | pSirSmeDeauthInd = vos_mem_malloc(sizeof(tSirSmeDeauthInd)); |
| 1529 | if ( NULL == pSirSmeDeauthInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1530 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1531 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_DEAUTH_IND ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1532 | return; |
| 1533 | } |
| 1534 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1535 | pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND; |
| 1536 | pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1537 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1538 | pSirSmeDeauthInd->sessionId = psessionEntry->smeSessionId; |
| 1539 | pSirSmeDeauthInd->transactionId = psessionEntry->transactionId; |
Wu Gao | 742b735 | 2015-10-16 19:10:40 +0800 | [diff] [blame] | 1540 | pSirSmeDeauthInd->assocId = pStaDs->assocId; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1541 | if(eSIR_INFRA_AP_MODE == psessionEntry->bssType) |
| 1542 | { |
| 1543 | pSirSmeDeauthInd->statusCode = (tSirResultCodes)pStaDs->mlmStaContext.cleanupTrigger; |
| 1544 | } |
| 1545 | else |
| 1546 | { |
| 1547 | //Need to indicatet he reascon code over the air |
| 1548 | pSirSmeDeauthInd->statusCode = (tSirResultCodes)pStaDs->mlmStaContext.disassocReason; |
| 1549 | } |
| 1550 | //BSSID |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1551 | vos_mem_copy( pSirSmeDeauthInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1552 | //peerMacAddr |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1553 | vos_mem_copy( pSirSmeDeauthInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr)); |
Mohit Khanna | 99d5fd0 | 2012-09-11 14:51:20 -0700 | [diff] [blame] | 1554 | pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1555 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1556 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1557 | pSirSmeDeauthInd->staId = pStaDs->staIndex; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1558 | |
| 1559 | mmhMsg.type = eWNI_SME_DEAUTH_IND; |
| 1560 | mmhMsg.bodyptr = pSirSmeDeauthInd; |
| 1561 | mmhMsg.bodyval = 0; |
| 1562 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1563 | MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1564 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 1565 | limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT, psessionEntry, 0, pStaDs->mlmStaContext.cleanupTrigger); |
| 1566 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 1567 | |
| 1568 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1569 | return; |
| 1570 | } /*** end limSendSmeDeauthInd() ***/ |
| 1571 | |
Hoonki Lee | e6bfe94 | 2013-02-05 15:01:19 -0800 | [diff] [blame] | 1572 | #ifdef FEATURE_WLAN_TDLS |
| 1573 | /** |
| 1574 | * limSendSmeTDLSDelStaInd() |
| 1575 | * |
| 1576 | *FUNCTION: |
| 1577 | * This function is called to send the TDLS STA context deletion to SME. |
| 1578 | * |
| 1579 | *LOGIC: |
| 1580 | * |
| 1581 | *ASSUMPTIONS: |
| 1582 | * |
| 1583 | *NOTE: |
| 1584 | * NA |
| 1585 | * |
| 1586 | * @param pMac - Pointer to global MAC structure |
| 1587 | * @param pStaDs - Pointer to internal STA Datastructure |
| 1588 | * @param psessionEntry - Pointer to the session entry |
| 1589 | * @param reasonCode - Reason for TDLS sta deletion |
| 1590 | * @return None |
| 1591 | */ |
| 1592 | void |
| 1593 | limSendSmeTDLSDelStaInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry, tANI_U16 reasonCode) |
| 1594 | { |
| 1595 | tSirMsgQ mmhMsg; |
| 1596 | tSirTdlsDelStaInd *pSirTdlsDelStaInd; |
| 1597 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1598 | pSirTdlsDelStaInd = vos_mem_malloc(sizeof(tSirTdlsDelStaInd)); |
| 1599 | if ( NULL == pSirTdlsDelStaInd ) |
Hoonki Lee | e6bfe94 | 2013-02-05 15:01:19 -0800 | [diff] [blame] | 1600 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1601 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_TDLS_DEL_STA_IND ")); |
Hoonki Lee | e6bfe94 | 2013-02-05 15:01:19 -0800 | [diff] [blame] | 1602 | return; |
| 1603 | } |
| 1604 | |
| 1605 | //messageType |
| 1606 | pSirTdlsDelStaInd->messageType = eWNI_SME_TDLS_DEL_STA_IND; |
| 1607 | pSirTdlsDelStaInd->length = sizeof(tSirTdlsDelStaInd); |
| 1608 | |
| 1609 | //sessionId |
| 1610 | pSirTdlsDelStaInd->sessionId = psessionEntry->smeSessionId; |
| 1611 | |
| 1612 | //peerMacAddr |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1613 | vos_mem_copy( pSirTdlsDelStaInd->peerMac, pStaDs->staAddr, sizeof(tSirMacAddr)); |
Hoonki Lee | e6bfe94 | 2013-02-05 15:01:19 -0800 | [diff] [blame] | 1614 | |
| 1615 | //staId |
| 1616 | limCopyU16((tANI_U8*)(&pSirTdlsDelStaInd->staId), (tANI_U16)pStaDs->staIndex); |
| 1617 | |
| 1618 | //reasonCode |
| 1619 | limCopyU16((tANI_U8*)(&pSirTdlsDelStaInd->reasonCode), reasonCode); |
| 1620 | |
| 1621 | mmhMsg.type = eWNI_SME_TDLS_DEL_STA_IND; |
| 1622 | mmhMsg.bodyptr = pSirTdlsDelStaInd; |
| 1623 | mmhMsg.bodyval = 0; |
| 1624 | |
| 1625 | |
| 1626 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1627 | return; |
| 1628 | }/*** end limSendSmeTDLSDelStaInd() ***/ |
Gopichand Nakkala | 2a0a157 | 2013-02-10 21:39:16 -0800 | [diff] [blame] | 1629 | |
| 1630 | /** |
| 1631 | * limSendSmeTDLSDeleteAllPeerInd() |
| 1632 | * |
| 1633 | *FUNCTION: |
| 1634 | * This function is called to send the eWNI_SME_TDLS_DEL_ALL_PEER_IND |
| 1635 | * message to SME. |
| 1636 | * |
| 1637 | *LOGIC: |
| 1638 | * |
| 1639 | *ASSUMPTIONS: |
| 1640 | * |
| 1641 | *NOTE: |
| 1642 | * NA |
| 1643 | * |
| 1644 | * @param pMac - Pointer to global MAC structure |
| 1645 | * @param psessionEntry - Pointer to the session entry |
| 1646 | * @return None |
| 1647 | */ |
| 1648 | void |
| 1649 | limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry) |
| 1650 | { |
| 1651 | tSirMsgQ mmhMsg; |
| 1652 | tSirTdlsDelAllPeerInd *pSirTdlsDelAllPeerInd; |
| 1653 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1654 | pSirTdlsDelAllPeerInd = vos_mem_malloc(sizeof(tSirTdlsDelAllPeerInd)); |
| 1655 | if ( NULL == pSirTdlsDelAllPeerInd ) |
Gopichand Nakkala | 2a0a157 | 2013-02-10 21:39:16 -0800 | [diff] [blame] | 1656 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1657 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_TDLS_DEL_ALL_PEER_IND")); |
Gopichand Nakkala | 2a0a157 | 2013-02-10 21:39:16 -0800 | [diff] [blame] | 1658 | return; |
| 1659 | } |
| 1660 | |
| 1661 | //messageType |
| 1662 | pSirTdlsDelAllPeerInd->messageType = eWNI_SME_TDLS_DEL_ALL_PEER_IND; |
| 1663 | pSirTdlsDelAllPeerInd->length = sizeof(tSirTdlsDelAllPeerInd); |
| 1664 | |
| 1665 | //sessionId |
| 1666 | pSirTdlsDelAllPeerInd->sessionId = psessionEntry->smeSessionId; |
| 1667 | |
| 1668 | mmhMsg.type = eWNI_SME_TDLS_DEL_ALL_PEER_IND; |
| 1669 | mmhMsg.bodyptr = pSirTdlsDelAllPeerInd; |
| 1670 | mmhMsg.bodyval = 0; |
| 1671 | |
| 1672 | |
| 1673 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1674 | return; |
| 1675 | }/*** end limSendSmeTDLSDeleteAllPeerInd() ***/ |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 1676 | |
| 1677 | /** |
| 1678 | * limSendSmeMgmtTXCompletion() |
| 1679 | * |
| 1680 | *FUNCTION: |
| 1681 | * This function is called to send the eWNI_SME_MGMT_FRM_TX_COMPLETION_IND |
| 1682 | * message to SME. |
| 1683 | * |
| 1684 | *LOGIC: |
| 1685 | * |
| 1686 | *ASSUMPTIONS: |
| 1687 | * |
| 1688 | *NOTE: |
| 1689 | * NA |
| 1690 | * |
| 1691 | * @param pMac - Pointer to global MAC structure |
| 1692 | * @param psessionEntry - Pointer to the session entry |
| 1693 | * @param txCompleteStatus - TX Complete Status of Mgmt Frames |
| 1694 | * @return None |
| 1695 | */ |
| 1696 | void |
| 1697 | limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac, |
Ganesh Kondabattini | ff98702 | 2015-08-11 19:43:44 +0530 | [diff] [blame] | 1698 | tANI_U32 smeSessionId, |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 1699 | tANI_U32 txCompleteStatus) |
| 1700 | { |
| 1701 | tSirMsgQ mmhMsg; |
| 1702 | tSirMgmtTxCompletionInd *pSirMgmtTxCompletionInd; |
| 1703 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1704 | pSirMgmtTxCompletionInd = vos_mem_malloc(sizeof(tSirMgmtTxCompletionInd)); |
| 1705 | if ( NULL == pSirMgmtTxCompletionInd ) |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 1706 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1707 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_MGMT_FRM_TX_COMPLETION_IND")); |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 1708 | return; |
| 1709 | } |
| 1710 | |
| 1711 | //messageType |
| 1712 | pSirMgmtTxCompletionInd->messageType = eWNI_SME_MGMT_FRM_TX_COMPLETION_IND; |
| 1713 | pSirMgmtTxCompletionInd->length = sizeof(tSirMgmtTxCompletionInd); |
| 1714 | |
| 1715 | //sessionId |
Ganesh Kondabattini | ff98702 | 2015-08-11 19:43:44 +0530 | [diff] [blame] | 1716 | pSirMgmtTxCompletionInd->sessionId = smeSessionId; |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 1717 | |
| 1718 | pSirMgmtTxCompletionInd->txCompleteStatus = txCompleteStatus; |
| 1719 | |
| 1720 | mmhMsg.type = eWNI_SME_MGMT_FRM_TX_COMPLETION_IND; |
| 1721 | mmhMsg.bodyptr = pSirMgmtTxCompletionInd; |
| 1722 | mmhMsg.bodyval = 0; |
| 1723 | |
| 1724 | |
| 1725 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 1726 | return; |
| 1727 | }/*** end limSendSmeTDLSDeleteAllPeerInd() ***/ |
Hoonki Lee | e6bfe94 | 2013-02-05 15:01:19 -0800 | [diff] [blame] | 1728 | #endif |
| 1729 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1730 | |
| 1731 | /** |
| 1732 | * limSendSmeDeauthNtf() |
| 1733 | * |
| 1734 | *FUNCTION: |
| 1735 | * This function is called by limProcessSmeMessages() to send |
| 1736 | * eWNI_SME_DISASSOC_RSP/IND message to host |
| 1737 | * |
| 1738 | *PARAMS: |
| 1739 | * |
| 1740 | *LOGIC: |
| 1741 | * |
| 1742 | *ASSUMPTIONS: |
| 1743 | * NA |
| 1744 | * |
| 1745 | *NOTE: |
| 1746 | * This function is used for sending eWNI_SME_DEAUTH_CNF or |
| 1747 | * eWNI_SME_DEAUTH_IND to host depending on deauthentication trigger. |
| 1748 | * |
| 1749 | * @param peerMacAddr Indicates the peer MAC addr to which |
| 1750 | * deauthentication was initiated |
| 1751 | * @param reasonCode Indicates the reason for Deauthetication |
| 1752 | * @param deauthTrigger Indicates the trigger for Deauthetication |
| 1753 | * @param aid Indicates the STAID. This parameter is present |
| 1754 | * only on AP. |
| 1755 | * |
| 1756 | * @return None |
| 1757 | */ |
| 1758 | void |
| 1759 | limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCodes reasonCode, |
| 1760 | tANI_U16 deauthTrigger, tANI_U16 aid,tANI_U8 smesessionId, tANI_U16 smetransactionId) |
| 1761 | { |
| 1762 | tANI_U8 *pBuf; |
| 1763 | tSirSmeDeauthRsp *pSirSmeDeauthRsp; |
| 1764 | tSirSmeDeauthInd *pSirSmeDeauthInd; |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1765 | tSirSmeDisConDoneInd *pSirSmeDisConDoneInd; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1766 | tpPESession psessionEntry; |
| 1767 | tANI_U8 sessionId; |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1768 | vos_msg_t msg = {0}; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1769 | |
| 1770 | psessionEntry = peFindSessionByBssid(pMac,peerMacAddr,&sessionId); |
| 1771 | switch (deauthTrigger) |
| 1772 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1773 | case eLIM_HOST_DEAUTH: |
| 1774 | /** |
| 1775 | * Deauthentication response to host triggered |
| 1776 | * deauthentication. |
| 1777 | */ |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1778 | pSirSmeDeauthRsp = vos_mem_malloc(sizeof(tSirSmeDeauthRsp)); |
| 1779 | if ( NULL == pSirSmeDeauthRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1780 | { |
| 1781 | // Log error |
| 1782 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1783 | FL("call to AllocateMemory failed for eWNI_SME_DEAUTH_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1784 | |
| 1785 | return; |
| 1786 | } |
Abhishek Singh | cd09b56 | 2013-12-24 16:02:20 +0530 | [diff] [blame] | 1787 | limLog(pMac, LOG1, FL("send eWNI_SME_DEAUTH_RSP with " |
| 1788 | "retCode: %d for"MAC_ADDRESS_STR),reasonCode, |
| 1789 | MAC_ADDR_ARRAY(peerMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1790 | pSirSmeDeauthRsp->messageType = eWNI_SME_DEAUTH_RSP; |
| 1791 | pSirSmeDeauthRsp->length = sizeof(tSirSmeDeauthRsp); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1792 | pSirSmeDeauthRsp->statusCode = reasonCode; |
| 1793 | pSirSmeDeauthRsp->sessionId = smesessionId; |
| 1794 | pSirSmeDeauthRsp->transactionId = smetransactionId; |
| 1795 | |
| 1796 | pBuf = (tANI_U8 *) pSirSmeDeauthRsp->peerMacAddr; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1797 | vos_mem_copy( pBuf, peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1798 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1799 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 1800 | limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_RSP_EVENT, |
| 1801 | psessionEntry, 0, (tANI_U16)reasonCode); |
| 1802 | #endif |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1803 | msg.type = eWNI_SME_DEAUTH_RSP; |
| 1804 | msg.bodyptr = pSirSmeDeauthRsp; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1805 | |
| 1806 | break; |
| 1807 | |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1808 | case eLIM_PEER_ENTITY_DEAUTH: |
| 1809 | case eLIM_LINK_MONITORING_DEAUTH: |
| 1810 | pSirSmeDisConDoneInd = vos_mem_malloc(sizeof(tSirSmeDisConDoneInd)); |
| 1811 | if ( NULL == pSirSmeDisConDoneInd ) |
| 1812 | { |
| 1813 | // Log error |
| 1814 | limLog(pMac, LOGP, |
| 1815 | FL("call to AllocateMemory failed for disconnect indication")); |
| 1816 | |
| 1817 | return; |
| 1818 | } |
| 1819 | vos_mem_zero(pSirSmeDisConDoneInd, sizeof(tSirSmeDisConDoneInd)); |
| 1820 | limLog(pMac, LOG1, |
| 1821 | FL("send eWNI_SME_DISCONNECT_DONE_IND withretCode: %d"), |
| 1822 | reasonCode); |
Deepthi Gowri | dc197d0 | 2015-12-30 16:48:32 +0530 | [diff] [blame] | 1823 | |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1824 | pSirSmeDisConDoneInd->messageType = eWNI_SME_DISCONNECT_DONE_IND; |
| 1825 | pSirSmeDisConDoneInd->length = sizeof(tSirSmeDisConDoneInd); |
Deepthi Gowri | dc197d0 | 2015-12-30 16:48:32 +0530 | [diff] [blame] | 1826 | vos_mem_copy(pSirSmeDisConDoneInd->peerMacAddr, peerMacAddr, |
| 1827 | sizeof(tSirMacAddr)); |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1828 | pSirSmeDisConDoneInd->sessionId = smesessionId; |
Selvaraj, Sridhar | a9545d9 | 2016-06-08 17:38:20 +0530 | [diff] [blame] | 1829 | |
| 1830 | if (reasonCode == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE) |
| 1831 | pSirSmeDisConDoneInd->reasonCode = 0; |
| 1832 | else |
| 1833 | pSirSmeDisConDoneInd->reasonCode = reasonCode; |
| 1834 | |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1835 | msg.type = eWNI_SME_DISCONNECT_DONE_IND; |
| 1836 | msg.bodyptr = pSirSmeDisConDoneInd; |
Hanumantha Reddy Pothula | 1b6eb2f | 2015-11-30 20:50:23 +0530 | [diff] [blame] | 1837 | break; |
| 1838 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1839 | default: |
| 1840 | /** |
| 1841 | * Deauthentication indication due to Deauthentication |
| 1842 | * frame reception from peer entity or due to |
| 1843 | * loss of link with peer entity. |
| 1844 | */ |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1845 | pSirSmeDeauthInd = vos_mem_malloc(sizeof(tSirSmeDeauthInd)); |
| 1846 | if ( NULL == pSirSmeDeauthInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1847 | { |
| 1848 | // Log error |
| 1849 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1850 | FL("call to AllocateMemory failed for eWNI_SME_DEAUTH_Ind")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1851 | |
| 1852 | return; |
| 1853 | } |
Abhishek Singh | cd09b56 | 2013-12-24 16:02:20 +0530 | [diff] [blame] | 1854 | limLog(pMac, LOG1, FL("send eWNI_SME_DEAUTH_IND with " |
| 1855 | "retCode: %d for "MAC_ADDRESS_STR),reasonCode, |
| 1856 | MAC_ADDR_ARRAY(peerMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1857 | pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND; |
| 1858 | pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd); |
Mohit Khanna | 99d5fd0 | 2012-09-11 14:51:20 -0700 | [diff] [blame] | 1859 | pSirSmeDeauthInd->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON; |
Wu Gao | 742b735 | 2015-10-16 19:10:40 +0800 | [diff] [blame] | 1860 | pSirSmeDeauthInd->assocId = aid; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1861 | |
| 1862 | // sessionId |
| 1863 | pBuf = (tANI_U8*) &pSirSmeDeauthInd->sessionId; |
| 1864 | *pBuf++ = smesessionId; |
| 1865 | |
| 1866 | //transaction ID |
| 1867 | limCopyU16(pBuf, smetransactionId); |
| 1868 | pBuf += sizeof(tANI_U16); |
| 1869 | |
| 1870 | // status code |
| 1871 | limCopyU32(pBuf, reasonCode); |
| 1872 | pBuf += sizeof(tSirResultCodes); |
| 1873 | |
| 1874 | //bssId |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1875 | vos_mem_copy( pBuf, psessionEntry->bssId, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1876 | pBuf += sizeof(tSirMacAddr); |
| 1877 | |
| 1878 | //peerMacAddr |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1879 | vos_mem_copy( pSirSmeDeauthInd->peerMacAddr, peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1880 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1881 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 1882 | limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT, |
| 1883 | psessionEntry, 0, (tANI_U16)reasonCode); |
| 1884 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1885 | msg.type = eWNI_SME_DEAUTH_IND; |
| 1886 | msg.bodyptr = pSirSmeDeauthInd; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1887 | |
| 1888 | break; |
| 1889 | } |
| 1890 | |
| 1891 | /*Delete the PE session created */ |
| 1892 | if(psessionEntry != NULL) |
| 1893 | { |
| 1894 | peDeleteSession(pMac,psessionEntry); |
| 1895 | } |
| 1896 | |
Yeshwanth Sriram Guntuka | 802101a | 2018-06-29 16:41:02 +0530 | [diff] [blame] | 1897 | if (pMac->lim.sme_msg_callback) |
| 1898 | pMac->lim.sme_msg_callback(pMac, &msg); |
| 1899 | else |
| 1900 | limLog(pMac, LOGE, FL("Sme msg callback is NULL")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1901 | } /*** end limSendSmeDeauthNtf() ***/ |
| 1902 | |
| 1903 | |
| 1904 | /** |
| 1905 | * limSendSmeWmStatusChangeNtf() |
| 1906 | * |
| 1907 | *FUNCTION: |
| 1908 | * This function is called by limProcessSmeMessages() to send |
| 1909 | * eWNI_SME_WM_STATUS_CHANGE_NTF message to host. |
| 1910 | * |
| 1911 | *PARAMS: |
| 1912 | * |
| 1913 | *LOGIC: |
| 1914 | * |
| 1915 | *ASSUMPTIONS: |
| 1916 | * NA |
| 1917 | * |
| 1918 | *NOTE: |
| 1919 | * |
| 1920 | * @param statusChangeCode Indicates the change in the wireless medium. |
| 1921 | * @param statusChangeInfo Indicates the information associated with |
| 1922 | * change in the wireless medium. |
| 1923 | * @param infoLen Indicates the length of status change information |
| 1924 | * being sent. |
| 1925 | * |
| 1926 | * @return None |
| 1927 | */ |
| 1928 | void |
| 1929 | limSendSmeWmStatusChangeNtf(tpAniSirGlobal pMac, tSirSmeStatusChangeCode statusChangeCode, |
| 1930 | tANI_U32 *pStatusChangeInfo, tANI_U16 infoLen, tANI_U8 sessionId) |
| 1931 | { |
| 1932 | tSirMsgQ mmhMsg; |
| 1933 | tSirSmeWmStatusChangeNtf *pSirSmeWmStatusChangeNtf; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1934 | pSirSmeWmStatusChangeNtf = vos_mem_malloc(sizeof(tSirSmeWmStatusChangeNtf)); |
| 1935 | if ( NULL == pSirSmeWmStatusChangeNtf ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1936 | { |
| 1937 | limLog(pMac, LOGE, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1938 | FL("call to AllocateMemory failed for eWNI_SME_WM_STATUS_CHANGE_NTF")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1939 | return; |
| 1940 | } |
| 1941 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1942 | |
| 1943 | mmhMsg.type = eWNI_SME_WM_STATUS_CHANGE_NTF; |
| 1944 | mmhMsg.bodyval = 0; |
| 1945 | mmhMsg.bodyptr = pSirSmeWmStatusChangeNtf; |
| 1946 | |
| 1947 | switch(statusChangeCode) |
| 1948 | { |
| 1949 | case eSIR_SME_RADAR_DETECTED: |
| 1950 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1951 | break; |
| 1952 | |
| 1953 | case eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1954 | break; |
| 1955 | |
| 1956 | case eSIR_SME_BACKGROUND_SCAN_FAIL: |
| 1957 | limPackBkgndScanFailNotify(pMac, |
| 1958 | statusChangeCode, |
| 1959 | (tpSirBackgroundScanInfo)pStatusChangeInfo, |
| 1960 | pSirSmeWmStatusChangeNtf, sessionId); |
| 1961 | break; |
| 1962 | |
| 1963 | default: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1964 | pSirSmeWmStatusChangeNtf->messageType = eWNI_SME_WM_STATUS_CHANGE_NTF; |
| 1965 | pSirSmeWmStatusChangeNtf->statusChangeCode = statusChangeCode; |
| 1966 | pSirSmeWmStatusChangeNtf->length = sizeof(tSirSmeWmStatusChangeNtf); |
| 1967 | pSirSmeWmStatusChangeNtf->sessionId = sessionId; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1968 | if(sizeof(pSirSmeWmStatusChangeNtf->statusChangeInfo) >= infoLen) |
| 1969 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1970 | vos_mem_copy( (tANI_U8 *)&pSirSmeWmStatusChangeNtf->statusChangeInfo, |
| 1971 | (tANI_U8 *)pStatusChangeInfo, infoLen); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1972 | } |
Sushant Kaushik | 1b64538 | 2014-10-13 16:39:36 +0530 | [diff] [blame] | 1973 | limLog(pMac, LOGE, FL("***---*** StatusChg: code %d, length %d ***---***"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1974 | statusChangeCode, infoLen); |
| 1975 | break; |
| 1976 | } |
| 1977 | |
| 1978 | |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 1979 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1980 | if (eSIR_SUCCESS != limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT)) |
| 1981 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 1982 | vos_mem_free(pSirSmeWmStatusChangeNtf); |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1983 | limLog( pMac, LOGP, FL("limSysProcessMmhMsgApi failed")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1984 | } |
| 1985 | |
| 1986 | } /*** end limSendSmeWmStatusChangeNtf() ***/ |
| 1987 | |
| 1988 | |
| 1989 | /** |
| 1990 | * limSendSmeSetContextRsp() |
| 1991 | * |
| 1992 | *FUNCTION: |
| 1993 | * This function is called by limProcessSmeMessages() to send |
| 1994 | * eWNI_SME_SETCONTEXT_RSP message to host |
| 1995 | * |
| 1996 | *PARAMS: |
| 1997 | * |
| 1998 | *LOGIC: |
| 1999 | * |
| 2000 | *ASSUMPTIONS: |
| 2001 | * NA |
| 2002 | * |
| 2003 | *NOTE: |
| 2004 | * |
| 2005 | * @param pMac Pointer to Global MAC structure |
| 2006 | * @param peerMacAddr Indicates the peer MAC addr to which |
| 2007 | * setContext was performed |
| 2008 | * @param aid Indicates the aid corresponding to the peer MAC |
| 2009 | * address |
| 2010 | * @param resultCode Indicates the result of previously issued |
| 2011 | * eWNI_SME_SETCONTEXT_RSP message |
| 2012 | * |
| 2013 | * @return None |
| 2014 | */ |
| 2015 | void |
| 2016 | limSendSmeSetContextRsp(tpAniSirGlobal pMac, |
| 2017 | tSirMacAddr peerMacAddr, tANI_U16 aid, |
| 2018 | tSirResultCodes resultCode, |
| 2019 | tpPESession psessionEntry,tANI_U8 smesessionId,tANI_U16 smetransactionId) |
| 2020 | { |
| 2021 | |
| 2022 | tANI_U8 *pBuf; |
| 2023 | tSirMsgQ mmhMsg; |
| 2024 | tSirSmeSetContextRsp *pSirSmeSetContextRsp; |
| 2025 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2026 | pSirSmeSetContextRsp = vos_mem_malloc(sizeof(tSirSmeSetContextRsp)); |
| 2027 | if ( NULL == pSirSmeSetContextRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2028 | { |
| 2029 | // Log error |
| 2030 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2031 | FL("call to AllocateMemory failed for SmeSetContextRsp")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2032 | |
| 2033 | return; |
| 2034 | } |
| 2035 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2036 | pSirSmeSetContextRsp->messageType = eWNI_SME_SETCONTEXT_RSP; |
| 2037 | pSirSmeSetContextRsp->length = sizeof(tSirSmeSetContextRsp); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2038 | pSirSmeSetContextRsp->statusCode = resultCode; |
| 2039 | |
| 2040 | pBuf = pSirSmeSetContextRsp->peerMacAddr; |
| 2041 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2042 | vos_mem_copy( pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2043 | pBuf += sizeof(tSirMacAddr); |
| 2044 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2045 | |
| 2046 | /* Update SME session and transaction Id*/ |
| 2047 | pSirSmeSetContextRsp->sessionId = smesessionId; |
| 2048 | pSirSmeSetContextRsp->transactionId = smetransactionId; |
| 2049 | |
| 2050 | mmhMsg.type = eWNI_SME_SETCONTEXT_RSP; |
| 2051 | mmhMsg.bodyptr = pSirSmeSetContextRsp; |
| 2052 | mmhMsg.bodyval = 0; |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2053 | if(NULL == psessionEntry) |
| 2054 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2055 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, |
| 2056 | mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2057 | } |
| 2058 | else |
| 2059 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2060 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, |
| 2061 | psessionEntry->peSessionId, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2062 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2063 | |
| 2064 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 2065 | limDiagEventReport(pMac, WLAN_PE_DIAG_SETCONTEXT_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0); |
| 2066 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 2067 | |
| 2068 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2069 | } /*** end limSendSmeSetContextRsp() ***/ |
| 2070 | |
| 2071 | /** |
| 2072 | * limSendSmeRemoveKeyRsp() |
| 2073 | * |
| 2074 | *FUNCTION: |
| 2075 | * This function is called by limProcessSmeMessages() to send |
| 2076 | * eWNI_SME_REMOVEKEY_RSP message to host |
| 2077 | * |
| 2078 | *PARAMS: |
| 2079 | * |
| 2080 | *LOGIC: |
| 2081 | * |
| 2082 | *ASSUMPTIONS: |
| 2083 | * NA |
| 2084 | * |
| 2085 | *NOTE: |
| 2086 | * |
| 2087 | * @param pMac Pointer to Global MAC structure |
| 2088 | * @param peerMacAddr Indicates the peer MAC addr to which |
| 2089 | * Removekey was performed |
| 2090 | * @param aid Indicates the aid corresponding to the peer MAC |
| 2091 | * address |
| 2092 | * @param resultCode Indicates the result of previously issued |
| 2093 | * eWNI_SME_REMOVEKEY_RSP message |
| 2094 | * |
| 2095 | * @return None |
| 2096 | */ |
| 2097 | void |
| 2098 | limSendSmeRemoveKeyRsp(tpAniSirGlobal pMac, |
| 2099 | tSirMacAddr peerMacAddr, |
| 2100 | tSirResultCodes resultCode, |
| 2101 | tpPESession psessionEntry,tANI_U8 smesessionId, |
| 2102 | tANI_U16 smetransactionId) |
| 2103 | { |
| 2104 | tANI_U8 *pBuf; |
| 2105 | tSirMsgQ mmhMsg; |
| 2106 | tSirSmeRemoveKeyRsp *pSirSmeRemoveKeyRsp; |
| 2107 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2108 | pSirSmeRemoveKeyRsp = vos_mem_malloc(sizeof(tSirSmeRemoveKeyRsp)); |
| 2109 | if ( NULL == pSirSmeRemoveKeyRsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2110 | { |
| 2111 | // Log error |
| 2112 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2113 | FL("call to AllocateMemory failed for SmeRemoveKeyRsp")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2114 | |
| 2115 | return; |
| 2116 | } |
| 2117 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2118 | |
| 2119 | |
| 2120 | if(psessionEntry != NULL) |
| 2121 | { |
| 2122 | pBuf = pSirSmeRemoveKeyRsp->peerMacAddr; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2123 | vos_mem_copy( pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2124 | } |
| 2125 | |
| 2126 | pSirSmeRemoveKeyRsp->messageType = eWNI_SME_REMOVEKEY_RSP; |
| 2127 | pSirSmeRemoveKeyRsp->length = sizeof(tSirSmeRemoveKeyRsp); |
| 2128 | pSirSmeRemoveKeyRsp->statusCode = resultCode; |
| 2129 | |
| 2130 | /* Update SME session and transaction Id*/ |
| 2131 | pSirSmeRemoveKeyRsp->sessionId = smesessionId; |
| 2132 | pSirSmeRemoveKeyRsp->transactionId = smetransactionId; |
| 2133 | |
| 2134 | mmhMsg.type = eWNI_SME_REMOVEKEY_RSP; |
| 2135 | mmhMsg.bodyptr = pSirSmeRemoveKeyRsp; |
| 2136 | mmhMsg.bodyval = 0; |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2137 | if(NULL == psessionEntry) |
| 2138 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2139 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2140 | } |
| 2141 | else |
| 2142 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2143 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, |
| 2144 | psessionEntry->peSessionId, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2145 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2146 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2147 | } /*** end limSendSmeSetContextRsp() ***/ |
| 2148 | |
| 2149 | |
| 2150 | /** |
| 2151 | * limSendSmePromiscuousModeRsp() |
| 2152 | * |
| 2153 | *FUNCTION: |
| 2154 | * This function is called by limProcessSmeMessages() to send |
| 2155 | * eWNI_PROMISCUOUS_MODE_RSP message to host |
| 2156 | * |
| 2157 | *PARAMS: |
| 2158 | * |
| 2159 | *LOGIC: |
| 2160 | * |
| 2161 | *ASSUMPTIONS: |
| 2162 | * NA |
| 2163 | * |
| 2164 | *NOTE: |
| 2165 | * This function is used for sending eWNI_SME_PROMISCUOUS_MODE_RSP to |
| 2166 | * host as a reply to eWNI_SME_PROMISCUOUS_MODE_REQ directive from it. |
| 2167 | * |
| 2168 | * @param None |
| 2169 | * @return None |
| 2170 | */ |
| 2171 | void |
| 2172 | limSendSmePromiscuousModeRsp(tpAniSirGlobal pMac) |
| 2173 | { |
| 2174 | #if 0 |
| 2175 | tSirMsgQ mmhMsg; |
| 2176 | tSirMbMsg *pMbMsg; |
| 2177 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2178 | pMbMsg = vos_mem_malloc(sizeof(tSirMbMsg)); |
| 2179 | if ( NULL == pMbMsg ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2180 | { |
| 2181 | // Log error |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2182 | limLog(pMac, LOGP, FL("call to AllocateMemory failed")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2183 | |
| 2184 | return; |
| 2185 | } |
| 2186 | |
| 2187 | pMbMsg->type = eWNI_SME_PROMISCUOUS_MODE_RSP; |
| 2188 | pMbMsg->msgLen = 4; |
| 2189 | |
| 2190 | mmhMsg.type = eWNI_SME_PROMISCUOUS_MODE_RSP; |
| 2191 | mmhMsg.bodyptr = pMbMsg; |
| 2192 | mmhMsg.bodyval = 0; |
| 2193 | MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type)); |
| 2194 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2195 | #endif |
| 2196 | } /*** end limSendSmePromiscuousModeRsp() ***/ |
| 2197 | |
| 2198 | |
| 2199 | |
| 2200 | /** |
| 2201 | * limSendSmeNeighborBssInd() |
| 2202 | * |
| 2203 | *FUNCTION: |
| 2204 | * This function is called by limLookupNaddHashEntry() to send |
| 2205 | * eWNI_SME_NEIGHBOR_BSS_IND message to host |
| 2206 | * |
| 2207 | *PARAMS: |
| 2208 | * |
| 2209 | *LOGIC: |
| 2210 | * |
| 2211 | *ASSUMPTIONS: |
| 2212 | * NA |
| 2213 | * |
| 2214 | *NOTE: |
| 2215 | * This function is used for sending eWNI_SME_NEIGHBOR_BSS_IND to |
| 2216 | * host upon detecting new BSS during background scanning if CFG |
| 2217 | * option is enabled for sending such indication |
| 2218 | * |
| 2219 | * @param pMac - Pointer to Global MAC structure |
| 2220 | * @return None |
| 2221 | */ |
| 2222 | |
| 2223 | void |
| 2224 | limSendSmeNeighborBssInd(tpAniSirGlobal pMac, |
| 2225 | tLimScanResultNode *pBssDescr) |
| 2226 | { |
| 2227 | tSirMsgQ msgQ; |
| 2228 | tANI_U32 val; |
| 2229 | tSirSmeNeighborBssInd *pNewBssInd; |
| 2230 | |
| 2231 | if ((pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_WT_SCAN_STATE) || |
| 2232 | ((pMac->lim.gLimSmeState == eLIM_SME_LINK_EST_WT_SCAN_STATE) && |
| 2233 | pMac->lim.gLimRspReqd)) |
| 2234 | { |
| 2235 | // LIM is not in background scan state OR |
| 2236 | // current scan is initiated by HDD. |
| 2237 | // No need to send new BSS indication to HDD |
| 2238 | return; |
| 2239 | } |
| 2240 | |
| 2241 | if (wlan_cfgGetInt(pMac, WNI_CFG_NEW_BSS_FOUND_IND, &val) != eSIR_SUCCESS) |
| 2242 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2243 | limLog(pMac, LOGP, FL("could not get NEIGHBOR_BSS_IND from CFG")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2244 | |
| 2245 | return; |
| 2246 | } |
| 2247 | |
| 2248 | if (val == 0) |
| 2249 | return; |
| 2250 | |
| 2251 | /** |
| 2252 | * Need to indicate new BSSs found during |
| 2253 | * background scanning to host. |
| 2254 | * Allocate buffer for sending indication. |
| 2255 | * Length of buffer is length of BSS description |
| 2256 | * and length of header itself |
| 2257 | */ |
| 2258 | val = pBssDescr->bssDescription.length + sizeof(tANI_U16) + sizeof(tANI_U32) + sizeof(tANI_U8); |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2259 | pNewBssInd = vos_mem_malloc(val); |
| 2260 | if ( NULL == pNewBssInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2261 | { |
| 2262 | // Log error |
| 2263 | limLog(pMac, LOGP, |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2264 | FL("call to AllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2265 | |
| 2266 | return; |
| 2267 | } |
| 2268 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2269 | pNewBssInd->messageType = eWNI_SME_NEIGHBOR_BSS_IND; |
| 2270 | pNewBssInd->length = (tANI_U16) val; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2271 | pNewBssInd->sessionId = 0; |
| 2272 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2273 | vos_mem_copy( (tANI_U8 *) pNewBssInd->bssDescription, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2274 | (tANI_U8 *) &pBssDescr->bssDescription, |
| 2275 | pBssDescr->bssDescription.length + sizeof(tANI_U16)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2276 | |
| 2277 | msgQ.type = eWNI_SME_NEIGHBOR_BSS_IND; |
| 2278 | msgQ.bodyptr = pNewBssInd; |
| 2279 | msgQ.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2280 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msgQ.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2281 | limSysProcessMmhMsgApi(pMac, &msgQ, ePROT); |
| 2282 | } /*** end limSendSmeNeighborBssInd() ***/ |
| 2283 | |
| 2284 | /** ----------------------------------------------------------------- |
| 2285 | \brief limSendSmeAddtsRsp() - sends SME ADDTS RSP |
| 2286 | \ This function sends a eWNI_SME_ADDTS_RSP to SME. |
| 2287 | \ SME only looks at rc and tspec field. |
| 2288 | \param pMac - global mac structure |
| 2289 | \param rspReqd - is SmeAddTsRsp required |
| 2290 | \param status - status code of SME_ADD_TS_RSP |
| 2291 | \return tspec |
| 2292 | \sa |
| 2293 | ----------------------------------------------------------------- */ |
| 2294 | void |
| 2295 | limSendSmeAddtsRsp(tpAniSirGlobal pMac, tANI_U8 rspReqd, tANI_U32 status, tpPESession psessionEntry, |
| 2296 | tSirMacTspecIE tspec, tANI_U8 smesessionId, tANI_U16 smetransactionId) |
| 2297 | { |
| 2298 | tpSirAddtsRsp rsp; |
| 2299 | tSirMsgQ mmhMsg; |
| 2300 | |
| 2301 | if (! rspReqd) |
| 2302 | return; |
| 2303 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2304 | rsp = vos_mem_malloc(sizeof(tSirAddtsRsp)); |
| 2305 | if ( NULL == rsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2306 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2307 | limLog(pMac, LOGP, FL("AllocateMemory failed for ADDTS_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2308 | return; |
| 2309 | } |
| 2310 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2311 | vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2312 | rsp->messageType = eWNI_SME_ADDTS_RSP; |
| 2313 | rsp->rc = status; |
| 2314 | rsp->rsp.status = (enum eSirMacStatusCodes) status; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2315 | //vos_mem_copy( (tANI_U8 *) &rsp->rsp.tspec, (tANI_U8 *) &addts->tspec, sizeof(addts->tspec)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2316 | rsp->rsp.tspec = tspec; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2317 | /* Update SME session Id and transcation Id */ |
| 2318 | rsp->sessionId = smesessionId; |
| 2319 | rsp->transactionId = smetransactionId; |
| 2320 | |
| 2321 | mmhMsg.type = eWNI_SME_ADDTS_RSP; |
| 2322 | mmhMsg.bodyptr = rsp; |
| 2323 | mmhMsg.bodyval = 0; |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2324 | if(NULL == psessionEntry) |
| 2325 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2326 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2327 | } |
| 2328 | else |
| 2329 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2330 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, |
| 2331 | psessionEntry->peSessionId, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2332 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2333 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 2334 | limDiagEventReport(pMac, WLAN_PE_DIAG_ADDTS_RSP_EVENT, psessionEntry, 0, 0); |
| 2335 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 2336 | |
| 2337 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2338 | return; |
| 2339 | } |
| 2340 | |
| 2341 | void |
| 2342 | limSendSmeAddtsInd(tpAniSirGlobal pMac, tpSirAddtsReqInfo addts) |
| 2343 | { |
| 2344 | tpSirAddtsRsp rsp; |
| 2345 | tSirMsgQ mmhMsg; |
| 2346 | |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2347 | limLog(pMac, LOGW, "SendSmeAddtsInd (token %d, tsid %d, up %d)", |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2348 | addts->dialogToken, |
| 2349 | addts->tspec.tsinfo.traffic.tsid, |
| 2350 | addts->tspec.tsinfo.traffic.userPrio); |
| 2351 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2352 | rsp = vos_mem_malloc(sizeof(tSirAddtsRsp)); |
| 2353 | if ( NULL == rsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2354 | { |
| 2355 | // Log error |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2356 | limLog(pMac, LOGP, FL("AllocateMemory failed for ADDTS_IND")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2357 | return; |
| 2358 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2359 | vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2360 | |
| 2361 | rsp->messageType = eWNI_SME_ADDTS_IND; |
| 2362 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2363 | vos_mem_copy( (tANI_U8 *) &rsp->rsp, (tANI_U8 *) addts, sizeof(*addts)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2364 | |
| 2365 | mmhMsg.type = eWNI_SME_ADDTS_IND; |
| 2366 | mmhMsg.bodyptr = rsp; |
| 2367 | mmhMsg.bodyval = 0; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2368 | MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2369 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2370 | } |
| 2371 | |
| 2372 | void |
| 2373 | limSendSmeDeltsRsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, tANI_U32 status,tpPESession psessionEntry,tANI_U8 smesessionId,tANI_U16 smetransactionId) |
| 2374 | { |
| 2375 | tpSirDeltsRsp rsp; |
| 2376 | tSirMsgQ mmhMsg; |
| 2377 | |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2378 | limLog(pMac, LOGW, "SendSmeDeltsRsp (aid %d, tsid %d, up %d) status %d", |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2379 | delts->aid, |
| 2380 | delts->req.tsinfo.traffic.tsid, |
| 2381 | delts->req.tsinfo.traffic.userPrio, |
| 2382 | status); |
| 2383 | if (! delts->rspReqd) |
| 2384 | return; |
| 2385 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2386 | rsp = vos_mem_malloc(sizeof(tSirDeltsRsp)); |
| 2387 | if ( NULL == rsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2388 | { |
| 2389 | // Log error |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2390 | limLog(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2391 | return; |
| 2392 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2393 | vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2394 | |
| 2395 | if(psessionEntry != NULL) |
| 2396 | { |
| 2397 | |
| 2398 | rsp->aid = delts->aid; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2399 | vos_mem_copy( (tANI_U8 *) &rsp->macAddr[0], (tANI_U8 *) &delts->macAddr[0], 6); |
| 2400 | vos_mem_copy( (tANI_U8 *) &rsp->rsp, (tANI_U8 *) &delts->req, sizeof(tSirDeltsReqInfo)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2401 | } |
| 2402 | |
| 2403 | |
| 2404 | rsp->messageType = eWNI_SME_DELTS_RSP; |
| 2405 | rsp->rc = status; |
| 2406 | |
| 2407 | /* Update SME session Id and transcation Id */ |
| 2408 | rsp->sessionId = smesessionId; |
| 2409 | rsp->transactionId = smetransactionId; |
| 2410 | |
| 2411 | mmhMsg.type = eWNI_SME_DELTS_RSP; |
| 2412 | mmhMsg.bodyptr = rsp; |
| 2413 | mmhMsg.bodyval = 0; |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2414 | if(NULL == psessionEntry) |
| 2415 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2416 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2417 | } |
| 2418 | else |
| 2419 | { |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2420 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, |
| 2421 | psessionEntry->peSessionId, mmhMsg.type)); |
Leela Venkata Kiran Kumar Reddy Chirala | 68a6abe | 2013-02-28 07:43:16 -0800 | [diff] [blame] | 2422 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2423 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 2424 | limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_RSP_EVENT, psessionEntry, (tANI_U16)status, 0); |
| 2425 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 2426 | |
| 2427 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2428 | } |
| 2429 | |
| 2430 | void |
| 2431 | limSendSmeDeltsInd(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, tANI_U16 aid,tpPESession psessionEntry) |
| 2432 | { |
| 2433 | tpSirDeltsRsp rsp; |
| 2434 | tSirMsgQ mmhMsg; |
| 2435 | |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2436 | limLog(pMac, LOGW, "SendSmeDeltsInd (aid %d, tsid %d, up %d)", |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2437 | aid, |
| 2438 | delts->tsinfo.traffic.tsid, |
| 2439 | delts->tsinfo.traffic.userPrio); |
| 2440 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2441 | rsp = vos_mem_malloc(sizeof(tSirDeltsRsp)); |
| 2442 | if ( NULL == rsp ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2443 | { |
| 2444 | // Log error |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2445 | limLog(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2446 | return; |
| 2447 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2448 | vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2449 | |
| 2450 | rsp->messageType = eWNI_SME_DELTS_IND; |
| 2451 | rsp->rc = eSIR_SUCCESS; |
| 2452 | rsp->aid = aid; |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2453 | vos_mem_copy( (tANI_U8 *) &rsp->rsp, (tANI_U8 *) delts, sizeof(*delts)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2454 | |
| 2455 | /* Update SME session Id and SME transaction Id */ |
| 2456 | |
| 2457 | rsp->sessionId = psessionEntry->smeSessionId; |
| 2458 | rsp->transactionId = psessionEntry->transactionId; |
| 2459 | |
| 2460 | mmhMsg.type = eWNI_SME_DELTS_IND; |
| 2461 | mmhMsg.bodyptr = rsp; |
| 2462 | mmhMsg.bodyval = 0; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2463 | MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2464 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 2465 | limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_IND_EVENT, psessionEntry, 0, 0); |
| 2466 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 2467 | |
| 2468 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2469 | } |
| 2470 | |
| 2471 | /** |
| 2472 | * limSendSmeStatsRsp() |
| 2473 | * |
| 2474 | *FUNCTION: |
| 2475 | * This function is called to send 802.11 statistics response to HDD. |
| 2476 | * This function posts the result back to HDD. This is a response to |
| 2477 | * HDD's request for statistics. |
| 2478 | * |
| 2479 | *PARAMS: |
| 2480 | * |
| 2481 | *LOGIC: |
| 2482 | * |
| 2483 | *ASSUMPTIONS: |
| 2484 | * NA |
| 2485 | * |
| 2486 | *NOTE: |
| 2487 | * NA |
| 2488 | * |
| 2489 | * @param pMac Pointer to Global MAC structure |
| 2490 | * @param p80211Stats Statistics sent in response |
| 2491 | * @param resultCode TODO: |
| 2492 | * |
| 2493 | * |
| 2494 | * @return none |
| 2495 | */ |
| 2496 | |
| 2497 | void |
| 2498 | limSendSmeStatsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats) |
| 2499 | { |
| 2500 | tSirMsgQ mmhMsg; |
| 2501 | tSirSmeRsp *pMsgHdr = (tSirSmeRsp*) stats; |
| 2502 | |
| 2503 | switch(msgType) |
| 2504 | { |
| 2505 | case WDA_STA_STAT_RSP: |
| 2506 | mmhMsg.type = eWNI_SME_STA_STAT_RSP; |
| 2507 | break; |
| 2508 | case WDA_AGGR_STAT_RSP: |
| 2509 | mmhMsg.type = eWNI_SME_AGGR_STAT_RSP; |
| 2510 | break; |
| 2511 | case WDA_GLOBAL_STAT_RSP: |
| 2512 | mmhMsg.type = eWNI_SME_GLOBAL_STAT_RSP; |
| 2513 | break; |
| 2514 | case WDA_STAT_SUMM_RSP: |
| 2515 | mmhMsg.type = eWNI_SME_STAT_SUMM_RSP; |
| 2516 | break; |
| 2517 | default: |
| 2518 | mmhMsg.type = msgType; //Response from within PE |
| 2519 | break; |
| 2520 | } |
| 2521 | |
| 2522 | pMsgHdr->messageType = mmhMsg.type; |
| 2523 | |
| 2524 | mmhMsg.bodyptr = stats; |
| 2525 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2526 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2527 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2528 | |
| 2529 | return; |
| 2530 | |
| 2531 | } /*** end limSendSmeStatsRsp() ***/ |
| 2532 | |
| 2533 | /** |
| 2534 | * limSendSmePEStatisticsRsp() |
| 2535 | * |
| 2536 | *FUNCTION: |
| 2537 | * This function is called to send 802.11 statistics response to HDD. |
| 2538 | * This function posts the result back to HDD. This is a response to |
| 2539 | * HDD's request for statistics. |
| 2540 | * |
| 2541 | *PARAMS: |
| 2542 | * |
| 2543 | *LOGIC: |
| 2544 | * |
| 2545 | *ASSUMPTIONS: |
| 2546 | * NA |
| 2547 | * |
| 2548 | *NOTE: |
| 2549 | * NA |
| 2550 | * |
| 2551 | * @param pMac Pointer to Global MAC structure |
| 2552 | * @param p80211Stats Statistics sent in response |
| 2553 | * @param resultCode TODO: |
| 2554 | * |
| 2555 | * |
| 2556 | * @return none |
| 2557 | */ |
| 2558 | |
| 2559 | void |
| 2560 | limSendSmePEStatisticsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats) |
| 2561 | { |
| 2562 | tSirMsgQ mmhMsg; |
| 2563 | tANI_U8 sessionId; |
| 2564 | tAniGetPEStatsRsp *pPeStats = (tAniGetPEStatsRsp *) stats; |
| 2565 | tpPESession pPeSessionEntry; |
| 2566 | |
| 2567 | //Get the Session Id based on Sta Id |
| 2568 | pPeSessionEntry = peFindSessionByStaId(pMac, pPeStats->staId, &sessionId); |
| 2569 | |
| 2570 | //Fill the Session Id |
| 2571 | if(NULL != pPeSessionEntry) |
| 2572 | { |
| 2573 | //Fill the Session Id |
| 2574 | pPeStats->sessionId = pPeSessionEntry->smeSessionId; |
| 2575 | } |
| 2576 | |
| 2577 | pPeStats->msgType = eWNI_SME_GET_STATISTICS_RSP; |
| 2578 | |
| 2579 | |
| 2580 | //msgType should be WDA_GET_STATISTICS_RSP |
| 2581 | mmhMsg.type = eWNI_SME_GET_STATISTICS_RSP; |
| 2582 | |
| 2583 | mmhMsg.bodyptr = stats; |
| 2584 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2585 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2586 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2587 | |
| 2588 | return; |
| 2589 | |
| 2590 | } /*** end limSendSmePEStatisticsRsp() ***/ |
| 2591 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2592 | #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR) |
Srinivas Girigowda | d34cedb | 2013-01-25 13:33:11 -0800 | [diff] [blame] | 2593 | /** |
| 2594 | * limSendSmePEGetRoamRssiRsp() |
| 2595 | * |
| 2596 | *FUNCTION: |
| 2597 | * This function is called to send roam rssi response to HDD. |
| 2598 | * This function posts the result back to HDD. This is a response to |
| 2599 | * HDD's request to get roam rssi. |
| 2600 | * |
| 2601 | *PARAMS: |
| 2602 | * |
| 2603 | *LOGIC: |
| 2604 | * |
| 2605 | *ASSUMPTIONS: |
| 2606 | * NA |
| 2607 | * |
| 2608 | *NOTE: |
| 2609 | * NA |
| 2610 | * |
| 2611 | * @param pMac Pointer to Global MAC structure |
| 2612 | * @param p80211Stats Statistics sent in response |
| 2613 | * @param resultCode TODO: |
| 2614 | * |
| 2615 | * |
| 2616 | * @return none |
| 2617 | */ |
| 2618 | |
| 2619 | void |
| 2620 | limSendSmePEGetRoamRssiRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats) |
| 2621 | { |
| 2622 | tSirMsgQ mmhMsg; |
| 2623 | tANI_U8 sessionId; |
| 2624 | tAniGetRoamRssiRsp *pPeStats = (tAniGetRoamRssiRsp *) stats; |
| 2625 | tpPESession pPeSessionEntry = NULL; |
| 2626 | |
| 2627 | //Get the Session Id based on Sta Id |
| 2628 | pPeSessionEntry = peFindSessionByStaId(pMac, pPeStats->staId, &sessionId); |
| 2629 | |
| 2630 | //Fill the Session Id |
| 2631 | if(NULL != pPeSessionEntry) |
| 2632 | { |
| 2633 | //Fill the Session Id |
| 2634 | pPeStats->sessionId = pPeSessionEntry->smeSessionId; |
| 2635 | } |
| 2636 | |
| 2637 | pPeStats->msgType = eWNI_SME_GET_ROAM_RSSI_RSP; |
| 2638 | |
| 2639 | //msgType should be WDA_GET_STATISTICS_RSP |
| 2640 | mmhMsg.type = eWNI_SME_GET_ROAM_RSSI_RSP; |
| 2641 | |
| 2642 | mmhMsg.bodyptr = stats; |
| 2643 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2644 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type)); |
Srinivas Girigowda | d34cedb | 2013-01-25 13:33:11 -0800 | [diff] [blame] | 2645 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2646 | |
| 2647 | return; |
| 2648 | |
| 2649 | } /*** end limSendSmePEGetRoamRssiRsp() ***/ |
| 2650 | |
| 2651 | #endif |
| 2652 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2653 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2654 | #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2655 | /** |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2656 | * limSendSmePEEseTsmRsp() |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2657 | * |
| 2658 | *FUNCTION: |
| 2659 | * This function is called to send tsm stats response to HDD. |
| 2660 | * This function posts the result back to HDD. This is a response to |
| 2661 | * HDD's request to get tsm stats. |
| 2662 | * |
| 2663 | *PARAMS: |
| 2664 | * @param pMac - Pointer to global pMac structure |
| 2665 | * @param pStats - Pointer to TSM Stats |
| 2666 | * |
| 2667 | * @return none |
| 2668 | */ |
| 2669 | |
| 2670 | void |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2671 | limSendSmePEEseTsmRsp(tpAniSirGlobal pMac, tAniGetTsmStatsRsp *pStats) |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2672 | { |
| 2673 | tSirMsgQ mmhMsg; |
| 2674 | tANI_U8 sessionId; |
| 2675 | tAniGetTsmStatsRsp *pPeStats = (tAniGetTsmStatsRsp *) pStats; |
| 2676 | tpPESession pPeSessionEntry = NULL; |
| 2677 | |
| 2678 | //Get the Session Id based on Sta Id |
| 2679 | pPeSessionEntry = peFindSessionByStaId(pMac, pPeStats->staId, &sessionId); |
| 2680 | |
| 2681 | //Fill the Session Id |
| 2682 | if(NULL != pPeSessionEntry) |
| 2683 | { |
| 2684 | //Fill the Session Id |
| 2685 | pPeStats->sessionId = pPeSessionEntry->smeSessionId; |
| 2686 | } |
| 2687 | else |
| 2688 | { |
| 2689 | PELOGE(limLog(pMac, LOGE, FL("Session not found for the Sta id(%d)"), |
| 2690 | pPeStats->staId);) |
| 2691 | return; |
| 2692 | } |
| 2693 | |
| 2694 | pPeStats->msgType = eWNI_SME_GET_TSM_STATS_RSP; |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2695 | pPeStats->tsmMetrics.RoamingCount = pPeSessionEntry->eseContext.tsm.tsmMetrics.RoamingCount; |
| 2696 | pPeStats->tsmMetrics.RoamingDly = pPeSessionEntry->eseContext.tsm.tsmMetrics.RoamingDly; |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2697 | |
| 2698 | mmhMsg.type = eWNI_SME_GET_TSM_STATS_RSP; |
| 2699 | mmhMsg.bodyptr = pStats; |
| 2700 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2701 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type)); |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2702 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2703 | |
| 2704 | return; |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2705 | } /*** end limSendSmePEEseTsmRsp() ***/ |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2706 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 2707 | #endif /* FEATURE_WLAN_ESE) && FEATURE_WLAN_ESE_UPLOAD */ |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 2708 | |
| 2709 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2710 | void |
| 2711 | limSendSmeIBSSPeerInd( |
| 2712 | tpAniSirGlobal pMac, |
| 2713 | tSirMacAddr peerMacAddr, |
| 2714 | tANI_U16 staIndex, |
| 2715 | tANI_U8 ucastIdx, |
| 2716 | tANI_U8 bcastIdx, |
| 2717 | tANI_U8 *beacon, |
| 2718 | tANI_U16 beaconLen, |
| 2719 | tANI_U16 msgType, |
| 2720 | tANI_U8 sessionId) |
| 2721 | { |
| 2722 | tSirMsgQ mmhMsg; |
| 2723 | tSmeIbssPeerInd *pNewPeerInd; |
| 2724 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2725 | pNewPeerInd = vos_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen); |
| 2726 | if ( NULL == pNewPeerInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2727 | { |
| 2728 | PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));) |
| 2729 | return; |
| 2730 | } |
| 2731 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2732 | vos_mem_set((void *) pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2733 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2734 | vos_mem_copy( (tANI_U8 *) pNewPeerInd->peerAddr, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2735 | peerMacAddr, sizeof(tSirMacAddr)); |
| 2736 | pNewPeerInd->staId= staIndex; |
| 2737 | pNewPeerInd->ucastSig = ucastIdx; |
| 2738 | pNewPeerInd->bcastSig = bcastIdx; |
| 2739 | pNewPeerInd->mesgLen = sizeof(tSmeIbssPeerInd) + beaconLen; |
| 2740 | pNewPeerInd->mesgType = msgType; |
| 2741 | pNewPeerInd->sessionId = sessionId; |
| 2742 | |
| 2743 | if ( beacon != NULL ) |
| 2744 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2745 | vos_mem_copy((void*) ((tANI_U8*)pNewPeerInd+sizeof(tSmeIbssPeerInd)), |
| 2746 | (void*)beacon, beaconLen); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2747 | } |
| 2748 | |
| 2749 | mmhMsg.type = msgType; |
| 2750 | // mmhMsg.bodyval = (tANI_U32) pNewPeerInd; |
| 2751 | mmhMsg.bodyptr = pNewPeerInd; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2752 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2753 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2754 | |
| 2755 | } |
| 2756 | |
| 2757 | |
| 2758 | /** ----------------------------------------------------------------- |
| 2759 | \brief limSendExitBmpsInd() - sends exit bmps indication |
| 2760 | |
| 2761 | This function sends a eWNI_PMC_EXIT_BMPS_IND with a specific reason |
| 2762 | code to SME. This will trigger SME to get out of BMPS mode. |
| 2763 | |
| 2764 | \param pMac - global mac structure |
| 2765 | \param reasonCode - reason for which PE wish to exit BMPS |
| 2766 | \return none |
| 2767 | \sa |
| 2768 | ----------------------------------------------------------------- */ |
| 2769 | void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode) |
| 2770 | { |
| 2771 | tSirMsgQ mmhMsg; |
| 2772 | tANI_U16 msgLen = 0; |
| 2773 | tpSirSmeExitBmpsInd pExitBmpsInd; |
| 2774 | |
| 2775 | msgLen = sizeof(tSirSmeExitBmpsInd); |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2776 | pExitBmpsInd = vos_mem_malloc(msgLen); |
| 2777 | if ( NULL == pExitBmpsInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2778 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2779 | limLog(pMac, LOGP, FL("AllocateMemory failed for PMC_EXIT_BMPS_IND ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2780 | return; |
| 2781 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2782 | vos_mem_set(pExitBmpsInd, msgLen, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2783 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2784 | pExitBmpsInd->mesgType = eWNI_PMC_EXIT_BMPS_IND; |
| 2785 | pExitBmpsInd->mesgLen = msgLen; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2786 | pExitBmpsInd->exitBmpsReason = reasonCode; |
| 2787 | pExitBmpsInd->statusCode = eSIR_SME_SUCCESS; |
| 2788 | |
| 2789 | mmhMsg.type = eWNI_PMC_EXIT_BMPS_IND; |
| 2790 | mmhMsg.bodyptr = pExitBmpsInd; |
| 2791 | mmhMsg.bodyval = 0; |
| 2792 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2793 | limLog(pMac, LOG1, FL("Sending eWNI_PMC_EXIT_BMPS_IND to SME. ")); |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2794 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2795 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 2796 | limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_BMPS_IND_EVENT, peGetValidPowerSaveSession(pMac), 0, (tANI_U16)reasonCode); |
| 2797 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 2798 | |
| 2799 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2800 | return; |
| 2801 | |
| 2802 | } /*** end limSendExitBmpsInd() ***/ |
| 2803 | |
| 2804 | |
| 2805 | |
| 2806 | |
| 2807 | /*-------------------------------------------------------------------------- |
| 2808 | \brief peDeleteSession() - Handle the Delete BSS Response from HAL. |
| 2809 | |
| 2810 | |
| 2811 | \param pMac - pointer to global adapter context |
| 2812 | \param sessionId - Message pointer. |
| 2813 | |
| 2814 | \sa |
| 2815 | --------------------------------------------------------------------------*/ |
| 2816 | |
| 2817 | void limHandleDeleteBssRsp(tpAniSirGlobal pMac,tpSirMsgQ MsgQ) |
| 2818 | { |
| 2819 | tpPESession psessionEntry; |
| 2820 | tpDeleteBssParams pDelBss = (tpDeleteBssParams)(MsgQ->bodyptr); |
| 2821 | if((psessionEntry = peFindSessionBySessionId(pMac,pDelBss->sessionId))==NULL) |
| 2822 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2823 | limLog(pMac, LOGP,FL("Session Does not exist for given sessionID")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2824 | return; |
| 2825 | } |
| 2826 | if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE) |
| 2827 | { |
| 2828 | limIbssDelBssRsp(pMac, MsgQ->bodyptr,psessionEntry); |
| 2829 | } |
| 2830 | else if(psessionEntry->limSystemRole == eLIM_UNKNOWN_ROLE) |
| 2831 | { |
| 2832 | limProcessSmeDelBssRsp(pMac, MsgQ->bodyval,psessionEntry); |
| 2833 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2834 | else |
| 2835 | limProcessMlmDelBssRsp(pMac,MsgQ,psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2836 | } |
| 2837 | |
| 2838 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 2839 | /** ----------------------------------------------------------------- |
| 2840 | \brief limSendSmeAggrQosRsp() - sends SME FT AGGR QOS RSP |
| 2841 | \ This function sends a eWNI_SME_FT_AGGR_QOS_RSP to SME. |
| 2842 | \ SME only looks at rc and tspec field. |
| 2843 | \param pMac - global mac structure |
| 2844 | \param rspReqd - is SmeAddTsRsp required |
| 2845 | \param status - status code of eWNI_SME_FT_AGGR_QOS_RSP |
| 2846 | \return tspec |
| 2847 | \sa |
| 2848 | ----------------------------------------------------------------- */ |
| 2849 | void |
| 2850 | limSendSmeAggrQosRsp(tpAniSirGlobal pMac, tpSirAggrQosRsp aggrQosRsp, |
| 2851 | tANI_U8 smesessionId) |
| 2852 | { |
| 2853 | tSirMsgQ mmhMsg; |
| 2854 | |
| 2855 | mmhMsg.type = eWNI_SME_FT_AGGR_QOS_RSP; |
| 2856 | mmhMsg.bodyptr = aggrQosRsp; |
| 2857 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2858 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, smesessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2859 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2860 | |
| 2861 | return; |
| 2862 | } |
| 2863 | #endif |
| 2864 | |
| 2865 | /** ----------------------------------------------------------------- |
| 2866 | \brief limSendSmePreChannelSwitchInd() - sends an indication to SME |
| 2867 | before switching channels for spectrum manangement. |
| 2868 | |
| 2869 | This function sends a eWNI_SME_PRE_SWITCH_CHL_IND to SME. |
| 2870 | |
| 2871 | \param pMac - global mac structure |
| 2872 | \return none |
| 2873 | \sa |
| 2874 | ----------------------------------------------------------------- */ |
| 2875 | void |
| 2876 | limSendSmePreChannelSwitchInd(tpAniSirGlobal pMac) |
| 2877 | { |
| 2878 | tSirMsgQ mmhMsg; |
| 2879 | |
| 2880 | mmhMsg.type = eWNI_SME_PRE_SWITCH_CHL_IND; |
| 2881 | mmhMsg.bodyptr = NULL; |
| 2882 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2883 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2884 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2885 | |
| 2886 | return; |
| 2887 | } |
| 2888 | |
| 2889 | /** ----------------------------------------------------------------- |
| 2890 | \brief limSendSmePostChannelSwitchInd() - sends an indication to SME |
| 2891 | after channel switch for spectrum manangement is complete. |
| 2892 | |
| 2893 | This function sends a eWNI_SME_POST_SWITCH_CHL_IND to SME. |
| 2894 | |
| 2895 | \param pMac - global mac structure |
| 2896 | \return none |
| 2897 | \sa |
| 2898 | ----------------------------------------------------------------- */ |
| 2899 | void |
| 2900 | limSendSmePostChannelSwitchInd(tpAniSirGlobal pMac) |
| 2901 | { |
| 2902 | tSirMsgQ mmhMsg; |
| 2903 | |
| 2904 | mmhMsg.type = eWNI_SME_POST_SWITCH_CHL_IND; |
| 2905 | mmhMsg.bodyptr = NULL; |
| 2906 | mmhMsg.bodyval = 0; |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2907 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2908 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2909 | |
| 2910 | return; |
| 2911 | } |
| 2912 | |
| 2913 | void limSendSmeMaxAssocExceededNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, |
| 2914 | tANI_U8 smesessionId) |
| 2915 | { |
| 2916 | tSirMsgQ mmhMsg; |
| 2917 | tSmeMaxAssocInd *pSmeMaxAssocInd; |
| 2918 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2919 | pSmeMaxAssocInd = vos_mem_malloc(sizeof(tSmeMaxAssocInd)); |
| 2920 | if ( NULL == pSmeMaxAssocInd ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2921 | { |
| 2922 | PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));) |
| 2923 | return; |
| 2924 | } |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2925 | vos_mem_set((void *) pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd),0); |
| 2926 | vos_mem_copy( (tANI_U8 *)pSmeMaxAssocInd->peerMac, |
| 2927 | (tANI_U8 *)peerMacAddr, sizeof(tSirMacAddr)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2928 | pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED; |
| 2929 | pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd); |
| 2930 | pSmeMaxAssocInd->sessionId = smesessionId; |
| 2931 | mmhMsg.type = pSmeMaxAssocInd->mesgType; |
| 2932 | mmhMsg.bodyptr = pSmeMaxAssocInd; |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2933 | limLog(pMac, LOG1, FL("msgType %s peerMacAddr "MAC_ADDRESS_STR |
| 2934 | " sme session id %d"), "eWNI_SME_MAX_ASSOC_EXCEEDED", MAC_ADDR_ARRAY(peerMacAddr),smesessionId); |
Konamki, Sreelakshmi | 824f93e | 2015-07-31 12:55:48 +0530 | [diff] [blame] | 2935 | MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, smesessionId, mmhMsg.type)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2936 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2937 | |
| 2938 | return; |
| 2939 | } |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 2940 | #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
| 2941 | /** ----------------------------------------------------------------- |
| 2942 | \brief limSendSmeCandidateFoundInd() - sends |
| 2943 | eWNI_SME_CANDIDATE_FOUND_IND |
| 2944 | |
| 2945 | After receiving candidate found indication frame from FW, this |
| 2946 | function sends a eWNI_SME_CANDIDATE_FOUND_IND to SME to notify |
| 2947 | roam candidate(s) are available. |
| 2948 | |
| 2949 | \param pMac - global mac structure |
| 2950 | \param psessionEntry - session info |
| 2951 | \return none |
| 2952 | \sa |
| 2953 | ----------------------------------------------------------------- */ |
| 2954 | void |
| 2955 | limSendSmeCandidateFoundInd(tpAniSirGlobal pMac, tANI_U8 sessionId) |
| 2956 | { |
| 2957 | tSirMsgQ mmhMsg; |
| 2958 | tSirSmeCandidateFoundInd *pSirSmeCandidateFoundInd; |
| 2959 | |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2960 | pSirSmeCandidateFoundInd = vos_mem_malloc(sizeof(tSirSmeCandidateFoundInd)); |
| 2961 | if ( NULL == pSirSmeCandidateFoundInd ) |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 2962 | { |
Bansidhar Gopalachari | 1273123 | 2013-07-11 10:56:36 +0530 | [diff] [blame] | 2963 | limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_CANDIDATE_FOUND_IND\n")); |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 2964 | return; |
| 2965 | } |
| 2966 | |
Sushant Kaushik | b97a008 | 2015-08-31 12:36:45 +0530 | [diff] [blame] | 2967 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 2968 | limDiagEventReport(pMac, WLAN_PE_DIAG_ROAM_CANDIDATE_FOUND, |
| 2969 | NULL, eSIR_SUCCESS, eSIR_SUCCESS); |
| 2970 | #endif |
| 2971 | |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 2972 | pSirSmeCandidateFoundInd->messageType = eWNI_SME_CANDIDATE_FOUND_IND; |
Kanchanapally, Vidyullatha | 31b8d14 | 2015-01-30 14:25:18 +0530 | [diff] [blame] | 2973 | pSirSmeCandidateFoundInd->length = sizeof(tSirSmeCandidateFoundInd); |
| 2974 | pSirSmeCandidateFoundInd->sessionId = sessionId; |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 2975 | |
| 2976 | |
| 2977 | limLog( pMac, LOGE, FL("posting candidate ind to SME")); |
| 2978 | mmhMsg.type = eWNI_SME_CANDIDATE_FOUND_IND; |
| 2979 | mmhMsg.bodyptr = pSirSmeCandidateFoundInd; |
| 2980 | mmhMsg.bodyval = 0; |
| 2981 | |
| 2982 | limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); |
| 2983 | |
| 2984 | } /*** end limSendSmeCandidateFoundInd() ***/ |
| 2985 | #endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD |