From 4d1b6595120b4cc61ad1303f38e0d8655a4ddf01 Mon Sep 17 00:00:00 2001 From: wadesong Date: Tue, 21 Jul 2020 13:24:51 +0800 Subject: [PATCH] qcacld-3.0: Override phy mode in sap roaming profile Wlan phy mode in sap roaming profile will become invalid when the following corner case happens: 1) sta starts in 5G channel x; 2) sap starts in 5G channel y, leading to mcc; 3) sap moves to 2.4G band on the other mac; In the above case, sap channel frequency will be set to 2.4G, but the phy mode in its roaming profile will not change. Override the sap phy mode in its roaming profile so it aligns with channel frequency again. Change-Id: I0b243c1d312f77bf4a4d782f6b9d0d75928d0277 CRs-Fixed: 2736429 --- core/sap/src/sap_fsm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 5d308de92d..cdeec824fa 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2240,6 +2240,9 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx, sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11g_ONLY)) sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11a; + else if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_ctx->chan_freq) && + (sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11a)) + sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11g; /* * Transition from SAP_INIT to SAP_STARTING