From 8353e521d92ac9bf302fc1c90446210ecd2bc2fd Mon Sep 17 00:00:00 2001 From: "Aggarwal, Nishank" Date: Mon, 22 Aug 2016 19:42:45 +0530 Subject: [PATCH] qcacld-3.0: Fix logging issue to avoid false error print to kmsg qcacld-2.0 to qcacld-3.0 propagation In lim_process_mlm_deauth_ind 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 lim_process_mlm_deauth_ind 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/lim_link_monitoring_algo.c | 6 ++++-- core/mac/src/pe/lim/lim_process_deauth_frame.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index 908ff896c06f..3e578b8aa65f 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -190,7 +190,8 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, /* Delete all TDLS peers connected before leaving BSS */ lim_delete_tdls_peers(mac_ctx, session_entry); #endif - lim_post_sme_message(mac_ctx, LIM_MLM_DEAUTH_IND, + if (LIM_IS_STA_ROLE(session_entry)) + lim_post_sme_message(mac_ctx, LIM_MLM_DEAUTH_IND, (uint32_t *) &mlm_deauth_ind); lim_send_sme_deauth_ind(mac_ctx, stads, session_entry); @@ -410,7 +411,8 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, mlmDeauthInd.deauthTrigger = pStaDs->mlmStaContext.cleanupTrigger; - lim_post_sme_message(pMac, LIM_MLM_DEAUTH_IND, + if (LIM_IS_STA_ROLE(psessionEntry)) + lim_post_sme_message(pMac, LIM_MLM_DEAUTH_IND, (uint32_t *) &mlmDeauthInd); lim_send_sme_deauth_ind(pMac, pStaDs, psessionEntry); diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c index b77a7c75e77f..488782722246 100644 --- a/core/mac/src/pe/lim/lim_process_deauth_frame.c +++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c @@ -595,7 +595,8 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, wma_tx_abort(psessionEntry->smeSessionId); /* / Deauthentication from peer MAC entity */ - lim_post_sme_message(pMac, LIM_MLM_DEAUTH_IND, + if (LIM_IS_STA_ROLE(psessionEntry)) + lim_post_sme_message(pMac, LIM_MLM_DEAUTH_IND, (uint32_t *) &mlmDeauthInd); /* send eWNI_SME_DEAUTH_IND to SME */