From c5560438fc171e684b6f6d73c1b514d851b2fc72 Mon Sep 17 00:00:00 2001 From: Ashish Date: Fri, 14 Jul 2023 12:23:03 +0530 Subject: [PATCH] qcacmn: Consider gindoor_channel_support ini to decide ap_power_type Currently driver does not consider gindoor_channel_support ini when it decides the ap power type and because of that it always decides ap power type as VLP. Driver should consider this ini value as well because this INI says that indoor channels are allowed so driver should set ap power mode as LPI to allow LPI power mode. Change-ID: Id7ad546ba23ce210497002e3083a22f1edc87185 CRs-Fixed: 3085997 --- umac/regulatory/core/src/reg_utils.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/umac/regulatory/core/src/reg_utils.c b/umac/regulatory/core/src/reg_utils.c index 2a162c13bd52..1438365da7d9 100644 --- a/umac/regulatory/core/src/reg_utils.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -831,11 +831,18 @@ enum reg_6g_ap_type reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev) return REG_VERY_LOW_POWER_AP; } - if (reg_is_afc_available(pdev)) + if (reg_is_afc_available(pdev)) { ap_pwr_type = REG_STANDARD_POWER_AP; - else if (pdev_priv_obj->reg_6g_superid != FCC1_6G && - pdev_priv_obj->reg_6g_superid != FCC1_6G_CL) + } else if (pdev_priv_obj->indoor_chan_enabled) { + if (pdev_priv_obj->reg_rules.num_of_6g_ap_reg_rules[REG_INDOOR_AP]) + ap_pwr_type = REG_INDOOR_AP; + else + ap_pwr_type = REG_VERY_LOW_POWER_AP; + } else if (pdev_priv_obj->reg_rules.num_of_6g_ap_reg_rules[REG_VERY_LOW_POWER_AP]) { ap_pwr_type = REG_VERY_LOW_POWER_AP; + } + reg_debug("indoor_chan_enabled %d ap_pwr_type %d", + pdev_priv_obj->indoor_chan_enabled, ap_pwr_type); reg_set_ap_pwr_and_update_chan_list(pdev, ap_pwr_type);