From 77ec98c2f912f88ae59bdce676a183d3bb024c92 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Fri, 16 Oct 2015 16:26:14 +0530 Subject: [PATCH] qcacld-3.0:IBSS:Update HT secondary channel offset from beacon in pStaDs qcacld-2.0 to qcacld-3.0 propagation While adding pStaDs for IBSS when peer beacon is received, HT secondary channel offset is not copied from beacon. This leads to false change capability indication while processing the same beacon and thus update cb mode is sent with staid 255(default), leading to crash. Update HT secondary channel offset from beacon and add a check in cbmode update to ignore update if staid is 255. CRs-Fixed: 885747 Change-Id: I66dedb38aadde473b99b2f8fc4a7a9b855a10b2a --- core/mac/src/pe/lim/lim_ibss_peer_mgmt.c | 2 ++ core/mac/src/pe/sch/sch_beacon_process.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c index c2c3dba5353a..4cdacb9aeb12 100644 --- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c +++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c @@ -246,6 +246,8 @@ ibss_sta_caps_update(tpAniSirGlobal pMac, pStaDs->htGreenfield = pPeerNode->htGreenfield; pStaDs->htSupportedChannelWidthSet = pPeerNode->htSupportedChannelWidthSet; + pStaDs->htSecondaryChannelOffset = + pPeerNode->htSecondaryChannelOffset; pStaDs->htMIMOPSState = pPeerNode->htMIMOPSState; pStaDs->htMaxAmsduLength = pPeerNode->htMaxAmsduLength; pStaDs->htAMpduDensity = pPeerNode->htAMpduDensity; diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index a8f2a468b90b..459cb90bcb2c 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -538,7 +538,9 @@ sch_bcn_process_sta_bt_amp_sta_ibss(tpAniSirGlobal mac_ctx, pStaDs = dph_lookup_hash_entry(mac_ctx, pMh->sa, &aid, &session->dph.dphHashTable); if ((NULL == pStaDs) || - (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode)) + (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) || + ((NULL != pStaDs) && + (STA_INVALID_IDX == pStaDs->staIndex))) return; if (session->vhtCapability && bcn->OperatingMode.present) {