Ignore user regulatory country set when below INIs are set as: gCountryCodePriority=0 g11dSupportEnabled=1 Change-Id: I8ba5624bbe7aa9d3b06ab4eaffb0b9ab19f1f0fd CRs-Fixed: 3498489
@@ -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);
@@ -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';