From 90976512915348b81570008f868504d7bf205860 Mon Sep 17 00:00:00 2001 From: Asutosh Mohapatra Date: Thu, 12 Oct 2023 19:56:29 +0530 Subject: [PATCH 1/8] qcacld-3.0: Do not allow connection if STA VLP not supported If country code for AP and STA are same and if STA does not support VLP mode for a particular channel and if AP power type is misconfigured to VLP mode, do not allow connection to that AP as per regulatory guidelines. Change-Id: I5c9759d1e8077e83f7b28985253be871213c8385 CRs-Fixed: 3375815 --- core/mac/src/pe/sch/sch_beacon_process.c | 1 + core/sme/src/csr/csr_api_roam.c | 1 + 2 files changed, 2 insertions(+) diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 5adda9196469..eb536e160a3e 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -654,6 +654,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, wlan_reg_read_current_country(mac_ctx->psoc, programmed_country); status = wlan_reg_get_6g_power_type_for_ctry(mac_ctx->psoc, + mac_ctx->pdev, bcn->countryInfoParam.countryString, programmed_country, &pwr_type_6g, &ctry_code_match, REG_MAX_AP_TYPE); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 341758495b38..432905b3d6a6 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -15837,6 +15837,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId, wlan_reg_read_current_country(mac->psoc, programmed_country); status = wlan_reg_get_6g_power_type_for_ctry(mac->psoc, + mac->pdev, pIes->Country.country, programmed_country, &power_type_6g, &ctry_code_match, From a065e1ad333397990c968499b53f3783d82a32dc Mon Sep 17 00:00:00 2001 From: Sai Pavan Akhil Remella Date: Thu, 12 Oct 2023 20:11:31 +0530 Subject: [PATCH 2/8] qcacld-3.0: Extract 6 GHz AP power type from HE IE Extract the 6 GHz AP power type from HE IE before setting the power type in STA. By default, power type is set to LPI. CRs-Fixed: 3631944 Change-Id: I84c00bdca3358299c6ef919975328558b2928353 --- core/sme/src/csr/csr_api_roam.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 432905b3d6a6..60c21f870999 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -14999,6 +14999,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId, { QDF_STATUS status = QDF_STATUS_SUCCESS; uint8_t acm_mask = 0, uapsd_mask; + enum reg_6g_ap_type ap_6g_power_type = REG_INDOOR_AP; uint32_t bss_freq; uint16_t msgLen, ieLen; tSirMacRateSet OpRateSet; @@ -15831,6 +15832,10 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId, else csr_join_req->isQosEnabled = false; + if (pIes->he_op.oper_info_6g_present) { + ap_6g_power_type = pIes->he_op.oper_info_6g.info.reg_info; + } + if (wlan_reg_is_6ghz_chan_freq(pBssDescription->chan_freq)) { if (!pIes->Country.present) sme_debug("Channel is 6G but country IE not present"); @@ -15841,7 +15846,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId, pIes->Country.country, programmed_country, &power_type_6g, &ctry_code_match, - pSession->ap_power_type); + ap_6g_power_type); if (QDF_IS_STATUS_ERROR(status)) break; csr_join_req->ap_power_type_6g = power_type_6g; From da83dfaceaf4c2f8e17d22adecbb9390ae669c8a Mon Sep 17 00:00:00 2001 From: Ravindra Konda Date: Mon, 27 Nov 2023 05:33:57 -0800 Subject: [PATCH 3/8] Release 2.0.8.34G Release 2.0.8.34G Change-Id: I0d8ec33a21b546ab02e8e038c4a66d6acb6edf88 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 2c3d3538966a..c5baf153865b 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "F" +#define QWLAN_VERSION_EXTRA "G" #define QWLAN_VERSION_BUILD 34 -#define QWLAN_VERSIONSTR "2.0.8.34F" +#define QWLAN_VERSIONSTR "2.0.8.34G" #endif /* QWLAN_VERSION_H */ From 8a29e586464a07fc7aa4dda6eb67c3e74b49e13e Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 7 Dec 2023 15:34:00 +0530 Subject: [PATCH 4/8] qcacld-3.0: Higher Bandwidth support 80/80+80/160 in 2.4 GHz Band Higher Bandwidth support 80/80+80/160 is enabled on 2.4 GHz Band. Modififed the population of peer capability logic to disable 80+80/160 based on the band. Change-Id: I8319ef3fcd93676bca1115a088a926a772545d24 CRs-Fixed: 3030837 --- core/mac/src/sys/legacy/src/utils/src/parser_api.c | 3 +++ core/sme/src/csr/csr_api_roam.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 213c8d74a92c..f0d4e3219bc3 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 @@ -1195,6 +1195,9 @@ populate_dot11f_vht_caps(struct mac_context *mac, return QDF_STATUS_SUCCESS; } + if (wlan_reg_is_24ghz_ch_freq(pe_session->curr_op_freq)) + pDot11f->supportedChannelWidthSet = 0; + if (pe_session->ht_config.ht_rx_ldpc) pDot11f->ldpcCodingCap = pe_session->vht_config.ldpc_coding; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 60c21f870999..e3565fbbd7ff 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -16408,8 +16408,14 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t value = MLME_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF; pMsg->vht_config.csnof_beamformer_antSup = (uint8_t)value; pMsg->vht_config.mu_beam_formee = 0; + /* Disable shortgi160 and 80 for 2.4Ghz BSS*/ + if (wlan_reg_is_24ghz_ch_freq(pParam->operation_chan_freq)) { + pMsg->vht_config.shortgi160and80plus80 = 0; + pMsg->vht_config.shortgi80 = 0; + } - sme_debug("ht capability 0x%x VHT capability 0x%x", + sme_debug("cur_op_freq %d ht capability 0x%x VHT capability 0x%x", + pParam->operation_chan_freq, (*(uint32_t *) &pMsg->ht_config), (*(uint32_t *) &pMsg->vht_config)); #ifdef WLAN_FEATURE_11W From 8d9acc2cd39027eeb2d76ea61355f6bda895aa4c Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 7 Dec 2023 15:37:33 +0530 Subject: [PATCH 5/8] qcacld-3.0: Check ch_width for dot11f vht and he caps Currently as STA, when populating channel width set, only max BW advertised by target are considered. However issue is that due to regulatory limitations, the max BW advertised may not be the real operating BW used by our device. Under such conditions, there'll be conflicts between AP's view of our capablities and the real ones host configured to target. Therefore when populating supported channel width set for VHT and HE capabilities, take current session's channel width into account so so that capabilities advertised could correctly reflect current running configurations. Change-Id: Ib072c3e4d36d5c3fbd5504d94a936175d1a92db0 CRs-Fixed: 3047338 --- .../src/sys/legacy/src/utils/src/parser_api.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 f0d4e3219bc3..821e01da2fd4 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 @@ -1195,8 +1195,12 @@ populate_dot11f_vht_caps(struct mac_context *mac, return QDF_STATUS_SUCCESS; } - if (wlan_reg_is_24ghz_ch_freq(pe_session->curr_op_freq)) + if (wlan_reg_is_24ghz_ch_freq(pe_session->curr_op_freq)) { pDot11f->supportedChannelWidthSet = 0; + } else { + if (pe_session->ch_width <= CH_WIDTH_80MHZ) + pDot11f->supportedChannelWidthSet = 0; + } if (pe_session->ht_config.ht_rx_ldpc) pDot11f->ldpcCodingCap = @@ -6404,6 +6408,16 @@ QDF_STATUS populate_dot11f_he_caps(struct mac_context *mac_ctx, struct pe_sessio } populate_dot11f_twt_he_cap(mac_ctx, session, he_cap); + if (wlan_reg_is_5ghz_ch_freq(session->curr_op_freq) || + wlan_reg_is_6ghz_chan_freq(session->curr_op_freq)) { + if (session->ch_width <= CH_WIDTH_80MHZ) { + he_cap->chan_width_2 = 0; + he_cap->chan_width_3 = 0; + } else if (session->ch_width == CH_WIDTH_160MHZ) { + he_cap->chan_width_3 = 0; + } + } + return QDF_STATUS_SUCCESS; } From 00cbf68f69b13e51fc1dbdd6d5f41afe48ce6eb9 Mon Sep 17 00:00:00 2001 From: Ravindra Konda Date: Tue, 19 Dec 2023 23:20:14 -0800 Subject: [PATCH 6/8] Release 2.0.8.34H Release 2.0.8.34H Change-Id: I313a8371a1d4063dba675f9c8018ddabeee467df CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index c5baf153865b..cfbae99018f7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "G" +#define QWLAN_VERSION_EXTRA "H" #define QWLAN_VERSION_BUILD 34 -#define QWLAN_VERSIONSTR "2.0.8.34G" +#define QWLAN_VERSIONSTR "2.0.8.34H" #endif /* QWLAN_VERSION_H */ From 53765ee138762a8b92ae9e262caa6dd0a69630d8 Mon Sep 17 00:00:00 2001 From: Aravind Kishore Sukla Date: Wed, 8 Feb 2023 14:45:03 +0530 Subject: [PATCH 7/8] qcacld-3.0: Ignore CSA request for invalid channel In present scenario, STA disconnects with AP if it receives invalid channel in CSA IE. In this case STA shouldn't disconnect with AP as this request may come from a spoof AP. Ignore this CSA request as it might be from spoof AP and if it is from genuine AP heart beat failure happens and results in disconnection. After disconnection DUT may reconnect to same or other APs. Change-Id: I840508dd27d8c313a3e8f74c4e1f5aa64eecf6f9 CRs-Fixed: 3390251 --- core/mac/src/pe/lim/lim_utils.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 6124376906d6..4bacc753e895 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -1873,20 +1873,16 @@ static void __lim_process_channel_switch_timeout(struct pe_session *pe_session) } /* - * If the channel-list that AP is asking us to switch is invalid - * then we cannot switch the channel. Just disassociate from AP. - * We will find a better AP !!! + * The channel switch request received from AP is carrying + * invalid channel. It's ok to ignore this channel switch + * request as it might be from spoof AP. If it's from genuine + * AP, it may lead to heart beat failure and result in + * disconnection. DUT can go ahead and reconnect to it/any + * other AP once it disconnects. */ - if ((pe_session->limMlmState == - eLIM_MLM_LINK_ESTABLISHED_STATE) && - (pe_session->limSmeState != eLIM_SME_WT_DISASSOC_STATE) && - (pe_session->limSmeState != eLIM_SME_WT_DEAUTH_STATE)) { - pe_err("Invalid channel! Disconnect"); - lim_tear_down_link_with_ap(mac, pe_session->peSessionId, - REASON_UNSUPPORTED_CHANNEL_CSA, - eLIM_LINK_MONITORING_DISASSOC); - return; - } + pe_err("Invalid channel freq %u Ignore CSA request", + channel_freq); + return; } switch (pe_session->gLimChannelSwitch.state) { case eLIM_CHANNEL_SWITCH_PRIMARY_ONLY: From d46056dd98006367893edcb1a1c9f2e79bf61b96 Mon Sep 17 00:00:00 2001 From: Ravindra Konda Date: Wed, 20 Dec 2023 08:53:19 -0800 Subject: [PATCH 8/8] Release 2.0.8.34I Release 2.0.8.34I Change-Id: Ib3ae851e373c589d260c02204c3dd2e465159d5d CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index cfbae99018f7..5298ed90b3d1 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "H" +#define QWLAN_VERSION_EXTRA "I" #define QWLAN_VERSION_BUILD 34 -#define QWLAN_VERSIONSTR "2.0.8.34H" +#define QWLAN_VERSIONSTR "2.0.8.34I" #endif /* QWLAN_VERSION_H */