mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacmn: Set the right cc_src for reg country
Currently, if the country code which is going to be set is the same as the country currently being used, it will be ignored. It does not consider its country code source. This causes the working of 11d logic unexpected. To fix this issue, check the country source when trying to set the same country code. CRs-Fixed: 2583172 Change-Id: I9c574a62d11676bc0305510f1da9848cc044f874
This commit is contained in:
parent
1f6c0cdad8
commit
c5a417e285
2 changed files with 11 additions and 6 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue