summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c37
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,