diff options
| author | Kiran Kumar Lokere <klokere@codeaurora.org> | 2018-03-30 18:54:25 -0700 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-04-03 18:01:36 -0700 |
| commit | 4f964f642572a01abb21782947a8a68444e853f8 (patch) | |
| tree | f17830d6ccd36477fa5f53681ad14bc5ea5eb6a8 /core/mac/src | |
| parent | 4c74687be66c19be0b9bd83d78d033dff5d1a9ae (diff) | |
qcacld-3.0: Add configuration support for VHT20 MCS9
Add user configuration to enable/disable the MCS9 in VHT20
operation.
Change-Id: I1bf1156dbeb51a7850ef5a5b66295ecc0d007542
CRs-Fixed: 2217038
Diffstat (limited to 'core/mac/src')
| -rw-r--r-- | core/mac/src/include/parser_api.h | 10 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_assoc_utils.c | 21 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/utils/src/parser_api.c | 19 |
3 files changed, 48 insertions, 2 deletions
diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index 8affc7789f8c..fdc879c9d77d 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -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. * @@ -54,6 +54,14 @@ #define IS_5G_CH(__chNum) ((__chNum >= 36) && (__chNum <= 165)) #define IS_2X2_CHAIN(__chain) ((__chain & 0x3) == 0x3) #define DISABLE_NSS2_MCS 0xC +#define VHT_1x1_MCS9_MAP 0x2 +#define VHT_2x2_MCS9_MAP 0xA +#define VHT_1x1_MCS8_VAL 0xFFFD +#define VHT_2x2_MCS8_VAL 0xFFF5 +#define VHT_1x1_MCS_MASK 0x3 +#define VHT_2x2_MCS_MASK 0xF +#define DISABLE_VHT_MCS_9(mcs, nss) \ + (mcs = (nss > 1) ? VHT_2x2_MCS8_VAL : VHT_1x1_MCS8_VAL) #define NSS_1x1_MODE 1 #define NSS_2x2_MODE 2 diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index e7ca136f209a..427252ee9c2d 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1396,6 +1396,25 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx, VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1; rates->vhtRxHighestDataRate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1; + if (!session_entry->ch_width && + !mac_ctx->roam.configParam.enable_vht20_mcs9 && + ((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) == + VHT_1x1_MCS9_MAP)) { + DISABLE_VHT_MCS_9(rates->vhtRxMCSMap, + NSS_1x1_MODE); + DISABLE_VHT_MCS_9(rates->vhtTxMCSMap, + NSS_1x1_MODE); + } + } else { + if (!session_entry->ch_width && + !mac_ctx->roam.configParam.enable_vht20_mcs9 && + ((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) == + VHT_2x2_MCS9_MAP)) { + DISABLE_VHT_MCS_9(rates->vhtRxMCSMap, + NSS_2x2_MODE); + DISABLE_VHT_MCS_9(rates->vhtTxMCSMap, + NSS_2x2_MODE); + } } if ((peer_vht_caps == NULL) || (!peer_vht_caps->present)) 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 7e7d13d0f511..0d49d5e0de65 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 @@ -1068,6 +1068,25 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac, VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1; pDot11f->rxHighSupDataRate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1; + if (!psessionEntry->ch_width && + !pMac->roam.configParam.enable_vht20_mcs9 && + ((pDot11f->txMCSMap & VHT_1x1_MCS_MASK) == + VHT_1x1_MCS9_MAP)) { + DISABLE_VHT_MCS_9(pDot11f->txMCSMap, + NSS_1x1_MODE); + DISABLE_VHT_MCS_9(pDot11f->rxMCSMap, + NSS_1x1_MODE); + } + } else { + if (!psessionEntry->ch_width && + !pMac->roam.configParam.enable_vht20_mcs9 && + ((pDot11f->txMCSMap & VHT_2x2_MCS_MASK) == + VHT_2x2_MCS9_MAP)) { + DISABLE_VHT_MCS_9(pDot11f->txMCSMap, + NSS_2x2_MODE); + DISABLE_VHT_MCS_9(pDot11f->rxMCSMap, + NSS_2x2_MODE); + } } } lim_log_vht_cap(pMac, pDot11f); |
