From bfbec06c8ad0acbbe0edf00b0cee87c93b2c8e2b Mon Sep 17 00:00:00 2001 From: Jia Ding Date: Wed, 29 Jul 2020 16:06:19 +0800 Subject: [PATCH] qcacld-3.0: Properly set htCapable and vhtCapable In an IOT scenario, client is VHT capable and is carrying VHT IE in assoc-req frame while our SAP is configured as HT only. Key points here are the phymode and vht_flag populated in WMI_PEER_ASSOC_CMDID. phymode is set with SAP's own capability taken into considertion while vht_flag is not. This leads to FW TX data using VHT data rates. Fix is to properly set htCapable and vhtCapable with SAP's own capability taken into considertion. Change-Id: I7493e90aa744665569093d3a67714c1224d010a0 CRs-Fixed: 2740102 --- core/mac/src/pe/lim/lim_assoc_utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 10d4abbff8c5..0de6c9881168 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2202,9 +2202,12 @@ lim_add_sta(struct mac_context *mac_ctx, /* Update VHT/HT Capability */ if (LIM_IS_AP_ROLE(session_entry)) { - add_sta_params->htCapable = sta_ds->mlmStaContext.htCapability; + add_sta_params->htCapable = + sta_ds->mlmStaContext.htCapability && + session_entry->htCapability; add_sta_params->vhtCapable = - sta_ds->mlmStaContext.vhtCapability; + sta_ds->mlmStaContext.vhtCapability && + session_entry->vhtCapability; } #ifdef FEATURE_WLAN_TDLS /* SystemRole shouldn't be matter if staType is TDLS peer */