From e19169dc461f6220b024f0c1b884f69e84659ad5 Mon Sep 17 00:00:00 2001 From: Gururaj Pandurangi Date: Tue, 14 Dec 2021 21:51:36 -0800 Subject: [PATCH] qcacmn: Reduce logging in get 6G power type for country API Optimize the checks in reg_get_6g_power_type_for_ctry API to reduce logging. Logs will appear only during initial connection and not after parsing each beacon. Change-Id: I4c4904c4825cd822d119e4ee9b2c69e96612be31 CRs-Fixed: 3094366 --- umac/regulatory/core/src/reg_utils.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/umac/regulatory/core/src/reg_utils.c b/umac/regulatory/core/src/reg_utils.c index 06103a2d2c3b..73f3a88c7806 100644 --- a/umac/regulatory/core/src/reg_utils.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -350,10 +350,14 @@ reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_NOSUPPORT; } - if (wlan_reg_is_etsi(sta_ctry)) { - reg_debug("STA ctry:%c%c, doesn't match with AP ctry, switch to VLP", - sta_ctry[0], sta_ctry[1]); - *pwr_type_6g = REG_VERY_LOW_POWER_AP; + if (wlan_reg_is_etsi(sta_ctry) && + ap_pwr_type != REG_MAX_AP_TYPE) { + if (!(wlan_reg_is_us(ap_ctry) && + ap_pwr_type == REG_INDOOR_AP)) { + reg_debug("STA ctry:%c%c, doesn't match with AP ctry, switch to VLP", + sta_ctry[0], sta_ctry[1]); + *pwr_type_6g = REG_VERY_LOW_POWER_AP; + } } if (wlan_reg_is_us(ap_ctry) && ap_pwr_type == REG_INDOOR_AP) {