Forráskód Böngészése

qcacmn: Don't allow power mode VLP for indoor AP

Currently if AP and STA supports VLP, power mode
is set to VLP without any check of AP indoor or
not. Example when STA is in GB country code and
AP is in KR Country code and AP is indoor AP,
Power mode should be set LPI, but as per current
implementation power type will be set to VLP irrespective
to AP indoor or not beacuse both countries support VLP.

Change-Id: Ib2be4c0076a7e94f9870bd8fc320cfcc170754f9
CRs-Fixed: 3203504
Sheenam Monga 3 éve
szülő
commit
2a969228b4
1 módosított fájl, 10 hozzáadás és 11 törlés
  1. 10 11
      umac/regulatory/core/src/reg_utils.c

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

@@ -422,8 +422,15 @@ reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
 	 * enabled.
 	 */
 	if (ap_pwr_type != REG_INDOOR_AP) {
-		if (wlan_reg_ctry_support_vlp(sta_ctry))
+		if (wlan_reg_ctry_support_vlp(sta_ctry) &&
+		    wlan_reg_ctry_support_vlp(ap_ctry)) {
+			reg_debug("STA ctry doesn't match with AP ctry, switch to VLP");
 			*pwr_type_6g = REG_VERY_LOW_POWER_AP;
+		} else {
+			reg_debug("AP or STA doesn't support VLP");
+			*pwr_type_6g = REG_INDOOR_AP;
+		}
+
 		if (!wlan_reg_ctry_support_vlp(sta_ctry) &&
 		    wlan_cm_get_check_6ghz_security(psoc) &&
 		    !wlan_cm_get_relaxed_6ghz_conn_policy(psoc)) {
@@ -432,16 +439,8 @@ reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
 		}
 	}
 
-	if (wlan_reg_ctry_support_vlp(sta_ctry) &&
-	    wlan_reg_ctry_support_vlp(ap_ctry) &&
-	    ap_pwr_type == REG_INDOOR_AP) {
-		reg_debug("STA ctry doesn't match with AP ctry, switch to VLP");
-		*pwr_type_6g = REG_VERY_LOW_POWER_AP;
-	}
-
-	if (!wlan_reg_ctry_support_vlp(ap_ctry) &&
-	    ap_pwr_type == REG_INDOOR_AP) {
-		reg_debug("VLP not supported by AP, allow STA IN LPI");
+	if (ap_pwr_type == REG_INDOOR_AP) {
+		reg_debug("Indoor AP, allow STA IN LPI");
 		*pwr_type_6g = REG_INDOOR_AP;
 	}