From e586ade30d2f40f8a1000f2a8e03591693874efe Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Fri, 17 Feb 2017 16:35:42 +0530 Subject: [PATCH] qcacld-3.0: Fix incorrect channel switch info during CSA qcacld-2.0 to qcacld-3.0 propagation In the current code, when STA receives CSA IE then host look and operate on extended channel switch element eventhough our own channel-bonding state is not enabled. This causes setting up of secondary subband and state in new channel during CSA eventhough the secondary channel offset is set to zero in CSA beacon. Fix is to set the Secondary Channel Offset if our own channel bonding state is enabled. Change-Id: I82ca9737f49937176801bc4cbbdd3e2fb77d4749 CRs-Fixed: 1080260 --- core/mac/src/pe/lim/lim_process_tdls.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index b71b3d39bc..1b19d4451a 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -2652,15 +2652,21 @@ static void lim_tdls_update_hash_node_info(tpAniSirGlobal pMac, pStaDs->vhtSupportedChannelWidthSet = WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ; } - /*Calculate the Secondary Coannel Offset */ - cbMode = lim_select_cb_mode(pStaDs, psessionEntry, + + /* + * Calculate the Secondary Coannel Offset if our + * own channel bonding state is enabled + */ + if (psessionEntry->htSupportedChannelWidthSet) { + cbMode = lim_select_cb_mode(pStaDs, psessionEntry, psessionEntry->currentOperChannel, pStaDs->vhtSupportedChannelWidthSet); - pStaDs->htSecondaryChannelOffset = cbMode; - - if (pStaDs->mlmStaContext.vhtCapability) { - pStaDs->htSecondaryChannelOffset = lim_get_htcb_state(cbMode); + if (pStaDs->mlmStaContext.vhtCapability) + pStaDs->htSecondaryChannelOffset = + lim_get_htcb_state(cbMode); + else + pStaDs->htSecondaryChannelOffset = cbMode; } pSessStaDs = dph_lookup_hash_entry(pMac, psessionEntry->bssId, &aid, &psessionEntry->dph.dphHashTable);