From 6fbd88c606db38b3d9b3fdfac9ffe5bb4d80c10f Mon Sep 17 00:00:00 2001 From: Gururaj Pandurangi Date: Wed, 9 Jun 2021 12:56:17 -0700 Subject: [PATCH] qcacld-3.0: Add skip_tpe check in beacon process API Add skip_tpe check in beacon process API so that TPC power calculation API is not invoked for 2G/5G roaming case if skip tpe INI is set even though tpe power from beacon has changed. Change-Id: I4886634ac04e5dfdfce192d9099976fd436fc4c0 CRs-Fixed: 2966000 --- core/mac/src/pe/sch/sch_beacon_process.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 360e6e22fef4..eedc03c27be8 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -712,6 +712,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, bool ap_constraint_change = false, tpe_change = false; int8_t regMax = 0, maxTxPower = 0; QDF_STATUS status; + bool skip_tpe = false; qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); beaconParams.paramChangeBitmap = 0; @@ -743,6 +744,9 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, return; } + if (!wlan_reg_is_6ghz_chan_freq(bcn->chan_freq)) + skip_tpe = wlan_mlme_skip_tpe(mac_ctx->psoc); + if (wlan_reg_is_ext_tpc_supported(mac_ctx->psoc)) { tx_ops = wlan_reg_get_tx_ops(mac_ctx->psoc); @@ -767,7 +771,8 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, ap_constraint_change = true; } - if (ap_constraint_change || tpe_change) { + if ((ap_constraint_change && local_constraint) || + (tpe_change && !skip_tpe)) { lim_calculate_tpc(mac_ctx, session, false); if (tx_ops->set_tpc_power)