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

qcacld-3.0: User country set based on INI config params

Ignore user regulatory country set when below INIs are set as:
gCountryCodePriority=0
g11dSupportEnabled=1

Change-Id: I8ba5624bbe7aa9d3b06ab4eaffb0b9ab19f1f0fd
CRs-Fixed: 3498489
Vishal Miskin 1 éve
szülő
commit
d243a443ff
2 módosított fájl, 7 hozzáadás és 1 törlés
  1. 2 1
      core/hdd/src/wlan_hdd_main.c
  2. 5 0
      core/hdd/src/wlan_hdd_regulatory.c

+ 2 - 1
core/hdd/src/wlan_hdd_main.c

@@ -4187,7 +4187,8 @@ static void hdd_skip_acs_scan_timer_deinit(struct hdd_context *hdd_ctx) {}
  */
 int hdd_update_country_code(struct hdd_context *hdd_ctx)
 {
-	if (!country_code)
+	if (!country_code ||
+	    !ucfg_reg_is_user_country_set_allowed(hdd_ctx->psoc))
 		return 0;
 
 	return hdd_reg_set_country(hdd_ctx, country_code);

+ 5 - 0
core/hdd/src/wlan_hdd_regulatory.c

@@ -867,6 +867,11 @@ int hdd_reg_set_country(struct hdd_context *hdd_ctx, char *country_code)
 		return -EINVAL;
 	}
 
+	if (!ucfg_reg_is_user_country_set_allowed(hdd_ctx->psoc)) {
+		hdd_err("user_country is not allowed");
+		return -EINVAL;
+	}
+
 	qdf_mem_copy(cc, country_code, REG_ALPHA2_LEN);
 	cc[REG_ALPHA2_LEN] = '\0';