From 74dd2a91bf25526613c691b6f391b4901cb72149 Mon Sep 17 00:00:00 2001 From: hqu Date: Mon, 27 Apr 2020 23:21:54 +0800 Subject: [PATCH] qcacld-3.0: Do sap channel switch with 20MHz width in 11a mode Bring up SAP(2.4G)+SAP(161 channel with 11a mode)+STA mode, when STA is connected to ref-ap on channel 36, 11a mode SAP will also switch channel to STA's connected channel due to force scc, it will set channel width to CH_WIDTH_40MHZ for 11a mode SAP channel switch, actually 11a mode SAP doesn't support CH_WIDTH_40MHZ, it's wrong and issue is introduced by 'Change-Id: I709dd35575866b7ec9fddcfb94078f114a78d1a2'. Fix is to set channel width with 20MHz for 11a mode in function wlansap_update_csa_channel_params(). Change-Id: I90fea788ff30ef0897c1ba98ad5b4d3c8eec3695 CRs-Fixed: 2623617 --- core/sap/src/sap_module.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index eff52defc5ef..716396f0f6df 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1230,10 +1230,22 @@ wlansap_update_csa_channel_params(struct sap_context *sap_context, if (sap_context->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11ac || sap_context->csr_roamProfile.phyMode == - eCSR_DOT11_MODE_11ac_ONLY) + eCSR_DOT11_MODE_11ac_ONLY || + sap_context->csr_roamProfile.phyMode == + eCSR_DOT11_MODE_11ax || + sap_context->csr_roamProfile.phyMode == + eCSR_DOT11_MODE_11ax_ONLY) { bw = BW80; - else + } else if (sap_context->csr_roamProfile.phyMode == + eCSR_DOT11_MODE_11n || + sap_context->csr_roamProfile.phyMode == + eCSR_DOT11_MODE_11n_ONLY) { bw = BW40_HIGH_PRIMARY; + } else { + /* For legacy 11a mode return 20MHz */ + mac_ctx->sap.SapDfsInfo.new_chanWidth = CH_WIDTH_20MHZ; + return QDF_STATUS_SUCCESS; + } for (; bw >= BW20; bw--) { uint16_t op_class;