summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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