wlan: Fix module parameters
hdd_set_sme_config will store enable_11d/enable_dfs_chan_scan
value from pHddCtx. Overwrite these two values in pHddCtx before
hdd_set_sme_config by module parameters.
Change-Id: I70d7dbc43cf4a426702f29037409550f048054b4
CRs-Fixed: 592652
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 2332ac7..4d836eb 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -7938,6 +7938,19 @@
goto err_vosclose;
}
+ if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan)
+ {
+ pHddCtx->cfg_ini->enableDFSChnlScan = enable_dfs_chan_scan;
+ hddLog(VOS_TRACE_LEVEL_INFO, "%s: module enable_dfs_chan_scan set to %d",
+ __func__, enable_dfs_chan_scan);
+ }
+ if (0 == enable_11d || 1 == enable_11d)
+ {
+ pHddCtx->cfg_ini->Is11dSupportEnabled = enable_11d;
+ hddLog(VOS_TRACE_LEVEL_INFO, "%s: module enable_11d set to %d",
+ __func__, enable_11d);
+ }
+
/* Note that the vos_preStart() sequence triggers the cfg download.
The cfg download must occur before we update the SME config
since the SME config operation must access the cfg database */
@@ -7961,19 +7974,6 @@
the INI file and from NV before vOSS has been started so that
the final contents are available to send down to the cCPU */
- if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan)
- {
- pHddCtx->cfg_ini->enableDFSChnlScan = enable_dfs_chan_scan;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: module enable_dfs_chan_scan set to %d",
- __func__, enable_dfs_chan_scan);
- }
- if (0 == enable_11d || 1 == enable_11d)
- {
- pHddCtx->cfg_ini->Is11dSupportEnabled = enable_11d;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: module enable_11d set to %d",
- __func__, enable_11d);
- }
-
// Apply the cfg.ini to cfg.dat
if (FALSE == hdd_update_config_dat(pHddCtx))
{
@@ -8160,7 +8160,9 @@
#ifndef CONFIG_ENABLE_LINUX_REG
hdd_checkandupdate_phymode(pAdapter, country_code);
#endif
- ret = sme_ChangeCountryCode(pHddCtx->hHal, NULL,
+ ret = sme_ChangeCountryCode(pHddCtx->hHal,
+ (void *)(tSmeChangeCountryCallback)
+ wlan_hdd_change_country_code_callback,
country_code,
pAdapter, pHddCtx->pvosContext,
eSIR_TRUE, eSIR_TRUE);