summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2019-07-07 21:59:47 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-07-07 21:59:47 -0700
commita97fdb54ece039e6c8a7ef49de369fa918b82cc9 (patch)
tree5aec129a463e12d1bd1cddb17d59173a476a862c
parentfbcc8ccccc9456a3baf59e1d8158d844cb2df37c (diff)
parent388e1ab7c3c44b055661c3d9b5ff73bf6328f91b (diff)
Merge "qcacld-2.0: Zero sRegulatoryChannel before create new reg entry" into wlan-cld2.driver.lnx.1.0
-rw-r--r--CORE/VOSS/src/vos_nvitem.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index 744f02d15711..792db86ae718 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -2107,6 +2107,15 @@ static int create_linux_regulatory_entry(struct wiphy *wiphy,
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
"BandCapability is set to 2G only");
+ if (pnvEFSTable == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
+ "error: pnvEFSTable is NULL, probably not parsed nv.bin yet");
+ return -1;
+ }
+ vos_mem_zero(pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels,
+ NUM_RF_CHANNELS * sizeof(sRegulatoryChannel));
+
for (i = 0, m = 0; i<IEEE80211_NUM_BANDS; i++)
{
if (wiphy->bands[i] == NULL)
@@ -2120,13 +2129,6 @@ static int create_linux_regulatory_entry(struct wiphy *wiphy,
else
m = wiphy->bands[i-1]->n_channels + m;
- if (pnvEFSTable == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "error: pnvEFSTable is NULL, probably not parsed nv.bin yet");
- return -1;
- }
-
for (j = 0; j < wiphy->bands[i]->n_channels; j++)
{
/* k = (m + j) is internal current channel index for 20MHz channel