From 335a01817bad1e77872a3be816eb91a7851cec04 Mon Sep 17 00:00:00 2001 From: nakul kachhwaha Date: Tue, 27 Feb 2018 14:59:26 +0530 Subject: qcacld-2.0: Fix repetitive channel switch count in CSAIE Beacon template update indication is sent twice (one for channel switch count update in CSAIE and another for EDCA update due to STA disconnecting from SAP interface) within two TBTT due to which updated Channelswitch count value overwrites the last value in beacon memory which was still pending to transmit causing inconsistent value of switch count in CSAIE. Change-Id: I9cb78e6dafb4096dc0cedfb857285f125c9cde95 CRs-Fixed: 2192704 --- CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 4 +--- CORE/MAC/src/pe/lim/limSendSmeRspMessages.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 83c5afc1f19b..10f886d9fdec 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -7612,8 +7612,6 @@ limProcessSmeDfsCsaIeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg) psessionEntry->gLimChannelSwitch.secondarySubBand, psessionEntry); } - - psessionEntry->gLimChannelSwitch.switchCount--; } return; } diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c index 2603df2cba76..698f5381c78c 100644 --- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c +++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c @@ -3501,6 +3501,8 @@ limProcessBeaconTxSuccessInd(tpAniSirGlobal pMac, tANI_U16 msgType, void *event) if (LIM_IS_AP_ROLE(psessionEntry) && VOS_TRUE == psessionEntry->dfsIncludeChanSwIe) { + /* Decrement the Channel Switch Count in CSAIE */ + psessionEntry->gLimChannelSwitch.switchCount--; /* Send only 5 beacons with CSA IE Set in when a radar is detected */ if (psessionEntry->gLimChannelSwitch.switchCount > 0) { @@ -3517,8 +3519,6 @@ limProcessBeaconTxSuccessInd(tpAniSirGlobal pMac, tANI_U16 msgType, void *event) psessionEntry); } - /* Decrement the IE count */ - psessionEntry->gLimChannelSwitch.switchCount--; } else { -- cgit v1.2.3