diff --git a/umac/regulatory/core/src/reg_offload_11d_scan.c b/umac/regulatory/core/src/reg_offload_11d_scan.c index 5f25a97c6369..5f39b500419f 100644 --- a/umac/regulatory/core/src/reg_offload_11d_scan.c +++ b/umac/regulatory/core/src/reg_offload_11d_scan.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -59,8 +59,10 @@ QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, } if (!qdf_mem_cmp(psoc_priv_obj->cur_country, country, REG_ALPHA2_LEN)) { - reg_debug("country is not different"); - return QDF_STATUS_SUCCESS; + if (psoc_priv_obj->cc_src == SOURCE_11D) { + reg_debug("country is not different"); + return QDF_STATUS_SUCCESS; + } } reg_info("programming new 11d country:%c%c to firmware", diff --git a/umac/regulatory/core/src/reg_utils.c b/umac/regulatory/core/src/reg_utils.c index c36b8fa9fbc1..9addeca0e9b4 100644 --- a/umac/regulatory/core/src/reg_utils.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -201,8 +201,11 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev, } if (!qdf_mem_cmp(psoc_reg->cur_country, country, REG_ALPHA2_LEN)) { - reg_err("country is not different"); - return QDF_STATUS_SUCCESS; + if (psoc_reg->cc_src == SOURCE_USERSPACE || + psoc_reg->cc_src == SOURCE_CORE) { + reg_debug("country is not different"); + return QDF_STATUS_SUCCESS; + } } reg_debug("programming new country: %s to firmware", country);