소스 검색

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 년 전
부모
커밋
2a969228b4
1개의 변경된 파일10개의 추가작업 그리고 11개의 파일을 삭제
  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;
 	}