From abb0de459cfb6c5f56c0087def9fed2fc6a30f1f Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Tue, 3 Nov 2015 14:33:25 -0800 Subject: [PATCH] qcacld-3.0: Do not advertise 80MHz/160MHz capabilities in 40/20MHz This is qcacld-2.0 to qcacld-3.0 propagation Do not advertise the short GI capability for 80MHz and 160MHz if the operating channel width is 20MHz or 40MHz. Change-Id: I93f0b2e94e27b50fa0baa2a263fc866ba3807fb3 CRs-Fixed: 908743 --- core/mac/src/pe/lim/lim_prop_exts_utils.c | 2 + .../src/sys/legacy/src/utils/src/parser_api.c | 37 ++++++++++++------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index d5349059edc6..f47dd34caff2 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -126,6 +126,8 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, beacon_struct->VHTOperation.present && session->vhtCapability) { session->vhtCapabilityPresentInBeacon = 1; + session->vhtTxChannelWidthSet = + beacon_struct->VHTOperation.chanWidth; if (((beacon_struct->Vendor1IEPresent && beacon_struct->vendor2_ie.present && beacon_struct->Vendor3IEPresent)) && diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index 7dea42c89d37..16bd125f1f88 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -915,21 +915,30 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac, nCfgValue); pDot11f->ldpcCodingCap = (nCfgValue & 0x0001); + if (psessionEntry->vhtTxChannelWidthSet < + WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) { + pDot11f->shortGI80MHz = 0; + } else { + nCfgValue = 0; + if (psessionEntry->htConfig.ht_sgi) + CFG_GET_INT(nStatus, pMac, + WNI_CFG_VHT_SHORT_GI_80MHZ, + nCfgValue); + pDot11f->shortGI80MHz = (nCfgValue & 0x0001); + } - nCfgValue = 0; - if (psessionEntry->htConfig.ht_sgi) - CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SHORT_GI_80MHZ, - nCfgValue); - - pDot11f->shortGI80MHz = (nCfgValue & 0x0001); - - nCfgValue = 0; - if (psessionEntry->htConfig.ht_sgi) - CFG_GET_INT(nStatus, pMac, - WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ, - nCfgValue); - - pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001); + if (psessionEntry->vhtTxChannelWidthSet < + WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ) { + pDot11f->shortGI160and80plus80MHz = 0; + } else { + nCfgValue = 0; + if (psessionEntry->htConfig.ht_sgi) + CFG_GET_INT(nStatus, pMac, + WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ, + nCfgValue); + pDot11f->shortGI160and80plus80MHz = + (nCfgValue & 0x0001); + } nCfgValue = 0; if (psessionEntry->htConfig.ht_tx_stbc)