From f01581d180c0f2da19a6fc26ae94e049085be708 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Wed, 26 Feb 2020 16:08:56 -0800 Subject: [PATCH] qcacld-3.0: Fix issue in populating VHT capabilities for TDLS If AP-STA connection is non-VHT mode then VHT capabilities are not included in TDLS frames as the session is not VHT capable. Correct the condition to populate VHT capabilities for TDLS. Change-Id: I993e495255d7b82e32500e051cc2b296df00aa03 CRs-Fixed: 2627299 --- core/mac/src/pe/lim/lim_process_tdls.c | 8 ++++---- core/mac/src/sys/legacy/src/utils/src/parser_api.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 7182cc44e880..71f08c4a48f3 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -720,10 +720,10 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac, } pe_debug("HT present: %hu, Chan Width: %hu", htCap->present, htCap->supportedChannelWidthSet); - if (((wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq) <= - SIR_11B_CHANNEL_END) && vht_cap_info->b24ghz_band) || - (wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq) >= - SIR_11B_CHANNEL_END)) { + + if ((WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq) && + vht_cap_info->b24ghz_band) || + WLAN_REG_IS_5GHZ_CH_FREQ(pe_session->curr_op_freq)) { if (IS_DOT11_MODE_VHT(selfDot11Mode) && IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) { /* Include VHT Capability IE */ 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 af0fa162255c..0cb6828ceb6d 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 @@ -955,7 +955,7 @@ populate_dot11f_vht_caps(struct mac_context *mac, nCfgValue = 0; /* With VHT it suffices if we just examine HT */ if (pe_session) { - if (!pe_session->vhtCapability) { + if (lim_is_he_6ghz_band(pe_session)) { pDot11f->present = 0; return QDF_STATUS_SUCCESS; }