From 46f2ca00a3acd8e5074ba09b3ce64f76c22fd1f4 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Sat, 25 Feb 2017 00:45:29 +0530 Subject: [PATCH] qcacld-3.0: Delete TDLS peers upon receiving disassoc from AP wlan-cld3.driver.lnx.1.1-dev to wlan-cld3.driver.lnx.2.0-dev propagation As per the current code, upon receiving the disassociation frame AP, DUT-STA disconnects from the AP link but not tearing down the TDLS link with peer by sending deauth with reason code 3.So when AP comes up again TDLS link is not establishing between the peers. Fix is to delete all connected TDLS peers upon receiving disassociation framefrom AP. Change-Id: I8daa61cb1901441e5fae7d161c9f943d67e13c56 CRs-Fixed: 1081264 --- core/mac/src/pe/lim/lim_process_disassoc_frame.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c index ae26794f77f1..8f633fd3ed6c 100644 --- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c +++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -316,6 +316,19 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, return; } +#ifdef FEATURE_WLAN_TDLS + /** + * Delete all the TDLS peers only if Disassoc is received + * from the AP + */ + if ((LIM_IS_STA_ROLE(psessionEntry)) && + ((pStaDs->mlmStaContext.mlmState == + eLIM_MLM_LINK_ESTABLISHED_STATE) || + (pStaDs->mlmStaContext.mlmState == + eLIM_MLM_IDLE_STATE)) && + (IS_CURRENT_BSSID(pMac, pHdr->sa, psessionEntry))) + lim_delete_tdls_peers(pMac, psessionEntry); +#endif if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) { /**