diff options
| author | Yue Ma <yuem@qca.qualcomm.com> | 2013-12-27 14:20:58 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2014-01-16 21:45:57 -0800 |
| commit | dccbe85b5e81142d43907c94a6a685ca2b66b817 (patch) | |
| tree | 57a4be2de5caa7e12e646dd6922043fc80ea9c6a | |
| parent | 308c88ea13bbc9a416d8c0ff012492e1830bba93 (diff) | |
qcacld: Add regulatory domain init code during SSR re-init progress
NV module for regulatory domain feature should be reinitialized in
the progress of SSR reinitialization, otherwise it will lead crashes
after SSR.
.
Change-Id: Ib161bb060a7a3f828d6f2cfd2244d99f082c15ea
CRs-Fixed: 592262
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_early_suspend.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c index a0f507b3ead0..7bcc30198d7d 100644 --- a/CORE/HDD/src/wlan_hdd_early_suspend.c +++ b/CORE/HDD/src/wlan_hdd_early_suspend.c @@ -1720,6 +1720,25 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc) /* The driver should always be initialized in STA mode after SSR */ hdd_set_conparam(0); +#ifdef CONFIG_ENABLE_LINUX_REG + vosStatus = vos_nv_open(); + if (!VOS_IS_STATUS_SUCCESS(vosStatus)) + { + /* NV module cannot be initialized */ + hddLog(VOS_TRACE_LEVEL_FATAL, "%s: vos_nv_open failed", __func__); + goto err_re_init; + } +#ifdef QCA_WIFI_ISOC + vosStatus = vos_init_wiphy_from_nv_bin(); + if (!VOS_IS_STATUS_SUCCESS(vosStatus)) + { + /* NV module cannot be initialized */ + hddLog(VOS_TRACE_LEVEL_FATAL, "%s: vos_init_wiphy failed", __func__); + goto err_re_init; + } +#endif +#endif + /* Re-open VOSS, it is a re-open b'se control transport was never closed. */ vosStatus = vos_open(&pVosContext, 0); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) @@ -1764,6 +1783,24 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc) goto err_vosclose; } +#ifdef CONFIG_ENABLE_LINUX_REG +#ifndef QCA_WIFI_ISOC + /* initialize the NV module. This is required so that + we can initialize the channel information in wiphy + from the NV.bin data. The channel information in + wiphy needs to be initialized before wiphy registration */ + + vosStatus = vos_init_wiphy_from_eeprom(); + if (!VOS_IS_STATUS_SUCCESS(vosStatus)) + { + /* NV module cannot be initialized */ + hddLog(VOS_TRACE_LEVEL_FATAL, + "%s: vos_init_wiphy_from_eeprom failed", __func__); + goto err_vosclose; + } +#endif +#endif + vosStatus = hdd_set_sme_chan_list(pHddCtx); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) { hddLog(VOS_TRACE_LEVEL_FATAL, |
