From b1e97d2edbf282e60602f3959fd553debf9651a4 Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Tue, 9 Jan 2024 14:56:04 +0530 Subject: [PATCH] qcacld-3.0: Find 6 GHz power type for connection channel Currently host doesn't check if power type is supported for connection channel while calculating best 6 GHz power type for connection. This results in calculation of incorrect power for connection values if 6 GHz power type is not supported for that particular channel. To address this issue configure power type for connection only if that power type is supported for connection channel. Change-Id: I7e4ccdb962974cc8c415e8d174b2da0bf311f1a5 CRs-Fixed: 3697212 --- core/mac/src/pe/sch/sch_beacon_process.c | 3 ++- core/sme/src/csr/csr_api_roam.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 723ea4506180..3c0914e6c71a 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -667,7 +667,8 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, status = wlan_reg_get_best_6g_power_type( mac_ctx->psoc, mac_ctx->pdev, &pwr_type_6g, - session->ap_defined_power_type_6g); + session->ap_defined_power_type_6g, + bcn->chan_freq); if (QDF_IS_STATUS_ERROR(status)) return; session->best_6g_power_type = pwr_type_6g; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 12b3ad2ac236..02d4ab9c28d5 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -15839,7 +15839,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId, sme_debug("Channel is 6G but country IE not present"); status = wlan_reg_get_best_6g_power_type(mac->psoc, mac->pdev, &power_type_6g, - ap_6g_power_type); + ap_6g_power_type, pBssDescription->chan_freq); if (QDF_IS_STATUS_ERROR(status)) break; csr_join_req->best_6g_power_type = power_type_6g;