From adf275a6c685d77d236282c085957b525935884c Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 10 Aug 2023 18:03:40 +0530 Subject: [PATCH] qcacld-3.0: Fix wrong bandwidth upgrade for STA STA connected to an 2.4 GHz BSS fails to get IP due to VDEV restart triggered by bandwidth upgrade. Wrong bandwidth upgrade happens upon the reception of the first beacon after connection. Beacon opmode change logic considers supported channel width cap in the HT capability IE to retrieve the bandwidth of 2.4 GHz BSS. However, the AP can support both 20 & 40 MHz, so using this capability will lead to wrong bandwidth upgrade. Use the recommended channel width set from HT Info IE to retrieve the proper bandwidth. Change-Id: Icf07501a97f34125158ea643a9e5b848a5b18e3e CRs-Fixed: 3585499 --- core/mac/src/pe/lim/lim_utils.c | 4 +--- core/mac/src/pe/sch/sch_beacon_process.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 4f05662eb1..1301081a2c 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -11168,10 +11168,8 @@ bool lim_update_channel_width(struct mac_context *mac_ctx, * Do not update the channel bonding mode if channel bonding * mode is disabled in INI. */ - if (cb_mode == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) { - pe_debug("channel bonding disabled"); + if (cb_mode == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) return false; - } if (sta_ptr->htSupportedChannelWidthSet) { if (sta_ptr->vhtSupportedChannelWidthSet > diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 09af51afa0..01ae8ea240 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -468,8 +468,8 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds, (vht_op && vht_op->present && vht_caps))) return; - is_40 = bcn->HTCaps.present ? - bcn->HTCaps.supportedChannelWidthSet : false; + is_40 = bcn->HTInfo.present ? + bcn->HTInfo.recommendedTxWidthSet : false; if (bcn->OperatingMode.present) { pe_debug("OMN IE is present in the beacon, update NSS/Ch width");