浏览代码

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
Ashish 3 年之前
父节点
当前提交
1dcd308bb3
共有 1 个文件被更改,包括 10 次插入3 次删除
  1. 10 3
      umac/regulatory/core/src/reg_utils.c

+ 10 - 3
umac/regulatory/core/src/reg_utils.c

@@ -694,11 +694,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_01 &&
-		 pdev_priv_obj->reg_6g_superid != FCC1_6G_05)
+	} 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);