From 6e3925b99ff8493fdfcd240da55fa4042e88fb87 Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Thu, 19 Jul 2018 12:31:21 +0530 Subject: [PATCH] qcacld-3.0: Check TDLS peer type in lim_process_add_sta_rsp Currenly, as part of tdls add sta req gLimAddStaTdls is set to 1. And as part of add sta response gLimAddStaTdls is checked if 1 to map tdls add sta response. This implementation needs to take care of all error cases of add sta req failure to reset the gLimAddStaTdls value to 0. Instead check for peer type in add sta rsp. Change-Id: Ideaff239f743b95a9578806d2ec220e123d4d995 CRs-Fixed: 2281385 --- core/mac/inc/ani_global.h | 1 - core/mac/src/pe/lim/lim_process_tdls.c | 1 - core/mac/src/pe/lim/lim_utils.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index d3c8284c954f..d35b1510cc22 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -726,7 +726,6 @@ typedef struct sAniSirLim { /* ////////////////////////////// HT RELATED ////////////////////////////////////////// */ #ifdef FEATURE_WLAN_TDLS - uint8_t gLimAddStaTdls; uint8_t gLimTdlsLinkMode; /* ////////////////////////////// TDLS RELATED ////////////////////////////////////////// */ #endif diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 60ff957a6c26..1019bdfce19e 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -3016,7 +3016,6 @@ QDF_STATUS lim_process_sme_tdls_add_sta_req(tpAniSirGlobal pMac, goto lim_tdls_add_sta_error; } - pMac->lim.gLimAddStaTdls = true; /* To start with, send add STA request to HAL */ if (QDF_STATUS_E_FAILURE == lim_tdls_setup_add_sta(pMac, pAddStaReq, psessionEntry)) { diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index b5f0b5197deb..cdc46db78135 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -5419,10 +5419,8 @@ void lim_process_add_sta_rsp(tpAniSirGlobal mac_ctx, struct scheduler_msg *msg) else if (LIM_IS_NDI_ROLE(session)) lim_ndp_add_sta_rsp(mac_ctx, session, msg->bodyptr); #ifdef FEATURE_WLAN_TDLS - else if (mac_ctx->lim.gLimAddStaTdls) { + else if (add_sta_params->staType == STA_ENTRY_TDLS_PEER) lim_process_tdls_add_sta_rsp(mac_ctx, msg->bodyptr, session); - mac_ctx->lim.gLimAddStaTdls = false; - } #endif else lim_process_mlm_add_sta_rsp(mac_ctx, msg, session);