Merge pull request #1052 from aozima/lwip_dev
[LWIP] make sure lwip initialization order.
This commit is contained in:
commit
e34f53c4ca
|
@ -136,11 +136,14 @@ static void tcpip_init_done_callback(void *arg)
|
||||||
/**
|
/**
|
||||||
* LwIP system initialization
|
* LwIP system initialization
|
||||||
*/
|
*/
|
||||||
|
extern int eth_system_device_init_private(void);
|
||||||
int lwip_system_init(void)
|
int lwip_system_init(void)
|
||||||
{
|
{
|
||||||
rt_err_t rc;
|
rt_err_t rc;
|
||||||
struct rt_semaphore done_sem;
|
struct rt_semaphore done_sem;
|
||||||
|
|
||||||
|
eth_system_device_init_private();
|
||||||
|
|
||||||
/* set default netif to NULL */
|
/* set default netif to NULL */
|
||||||
netif_default = RT_NULL;
|
netif_default = RT_NULL;
|
||||||
|
|
||||||
|
@ -181,7 +184,7 @@ int lwip_system_init(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
INIT_COMPONENT_EXPORT(lwip_system_init);
|
INIT_PREV_EXPORT(lwip_system_init);
|
||||||
|
|
||||||
void sys_init(void)
|
void sys_init(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -415,7 +415,16 @@ static void eth_rx_thread_entry(void* parameter)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* this function does not need,
|
||||||
|
* use eth_system_device_init_private()
|
||||||
|
* call by lwip_system_init().
|
||||||
|
*/
|
||||||
int eth_system_device_init(void)
|
int eth_system_device_init(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int eth_system_device_init_private(void)
|
||||||
{
|
{
|
||||||
rt_err_t result = RT_EOK;
|
rt_err_t result = RT_EOK;
|
||||||
|
|
||||||
|
@ -454,7 +463,6 @@ int eth_system_device_init(void)
|
||||||
|
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
INIT_PREV_EXPORT(eth_system_device_init);
|
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_FINSH
|
||||||
#include <finsh.h>
|
#include <finsh.h>
|
||||||
|
|
Loading…
Reference in New Issue