From da7f673abe1cefae8b5322feb16792a6f3c8ea0e Mon Sep 17 00:00:00 2001 From: "Aggarwal, Nishank" Date: Fri, 19 Aug 2016 12:49:01 +0530 Subject: qcacld-2.0: Fix logging issue to avoid false error print to kmsg In limProcessMlmDeauthInd API , peerMacAddr is used to search the session. For AP mode we cannot get the session based on peer mac address. Because of this there is false error print to kmsg . Fix is to call limProcessMlmDeauthInd API only for STA mode as for SAP mode there is no functionality in this API. Change-Id: I2043b1e35e93b049ca1b73dae702a257780b2d0f CRs-Fixed: 1056746 --- CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c | 4 +++- CORE/MAC/src/pe/lim/limProcessDeauthFrame.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c index 5db1fd513647..dffe56913b17 100644 --- a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c +++ b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c @@ -401,7 +401,9 @@ limTearDownLinkWithAp(tpAniSirGlobal pMac, tANI_U8 sessionId, tSirMacReasonCodes mlmDeauthInd.reasonCode = (tANI_U8) pStaDs->mlmStaContext.disassocReason; mlmDeauthInd.deauthTrigger = pStaDs->mlmStaContext.cleanupTrigger; - limPostSmeMessage(pMac, LIM_MLM_DEAUTH_IND, (tANI_U32 *) &mlmDeauthInd); + if (GET_LIM_SYSTEM_ROLE(psessionEntry) == eLIM_STA_ROLE) + limPostSmeMessage(pMac, LIM_MLM_DEAUTH_IND, + (tANI_U32 *) &mlmDeauthInd); limSendSmeDeauthInd(pMac, pStaDs, psessionEntry); limReInitScanResults(pMac); diff --git a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c index 4cd0b527e96c..c0ec1e6973fc 100644 --- a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -546,7 +546,8 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p lim_update_lost_link_info(pMac, psessionEntry, frame_rssi); /// Deauthentication from peer MAC entity - limPostSmeMessage(pMac, LIM_MLM_DEAUTH_IND, (tANI_U32 *) &mlmDeauthInd); + if (GET_LIM_SYSTEM_ROLE(psessionEntry) == eLIM_STA_ROLE) + limPostSmeMessage(pMac, LIM_MLM_DEAUTH_IND, (tANI_U32 *) &mlmDeauthInd); // send eWNI_SME_DEAUTH_IND to SME limSendSmeDeauthInd(pMac, pStaDs, psessionEntry); -- cgit v1.2.3