BugID:23823293: Fix netmgr crash when running on linuxhost
@@ -513,7 +513,6 @@ void netmgr_register_wifi_scan_result_callback(netmgr_wifi_scan_result_cb_t cb)
static void netmgr_wifi_config_start(void)
{
autoconfig_plugin_t *valid_plugin = NULL;
-
if (g_wifi_interface) {
valid_plugin = g_wifi_interface->autoconfig_chain;
}
@@ -732,10 +731,10 @@ int netmgr_wifi_init(void)
g_wifi_interface->hal_mod = (hal_net_module_t *)module;
g_wifi_interface->wifi_scan_complete_cb_finished = false;
-#if (!defined(CONFIG_YWSS) || defined(CSP_LINUXHOST)) && defined(DEV_SAL_ATHOST)
- add_autoconfig_plugin(&g_def_smartconfig);
-#else
+#if defined(WITH_SAL) || defined(CONFIG_YWSS) && !defined(CSP_LINUXHOST) && !defined(AOS_NET_WTIH_ETH)
add_autoconfig_plugin(&g_alink_smartconfig);
+#else
+ add_autoconfig_plugin(&g_def_smartconfig);
#endif
hal_wifi_install_event((hal_wifi_module_t *)(g_wifi_interface->hal_mod), &g_wifi_hal_event);
