wlan: fix driver load failure with legacy regulatory code
When driver is compiled without CONFIG_ENABLE_LINUX_REG flag
the function vos_getCurrentCountryCode() is declared and used
but never defined which results in failure to load the driver.
Make sure that the function is not used when using legacy
regulatory code.
Change-Id: I9b1d3b6eb31bf1ecf601f14cf2c75156e581bd35
CRs-Fixed: 759463
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index e6bc201..034ac3c 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -2098,6 +2098,7 @@
goto err_vosstop;
}
+#ifdef CONFIG_ENABLE_LINUX_REG
vosStatus = wlan_hdd_init_channels_for_cc(pHddCtx, REINIT);
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
@@ -2105,6 +2106,7 @@
__func__);
goto err_vosstop;
}
+#endif
#ifdef WLAN_BTAMP_FEATURE
vosStatus = WLANBAP_Open(pVosContext);