mirror of https://github.com/ARMmbed/mbed-os.git
A better approach to flip "netif_inited"
parent
a812696c1d
commit
b1ca77b6b8
|
@ -469,7 +469,6 @@ nsapi_error_t mbed_lwip_emac_init(emac_interface_t *emac)
|
|||
eth_arch_enable_interrupts();
|
||||
#endif
|
||||
|
||||
netif_inited = true;
|
||||
return NSAPI_ERROR_OK;
|
||||
#else
|
||||
return NSAPI_ERROR_UNSUPPORTED;
|
||||
|
@ -479,8 +478,13 @@ nsapi_error_t mbed_lwip_emac_init(emac_interface_t *emac)
|
|||
// Backwards compatibility with people using DEVICE_EMAC
|
||||
nsapi_error_t mbed_lwip_init(emac_interface_t *emac)
|
||||
{
|
||||
nsapi_error_t ret;
|
||||
mbed_lwip_core_init();
|
||||
return mbed_lwip_emac_init(emac);
|
||||
ret = mbed_lwip_emac_init(emac);
|
||||
if (ret == NSAPI_ERROR_OK) {
|
||||
netif_inited = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Backwards compatibility with people using DEVICE_EMAC
|
||||
|
|
Loading…
Reference in New Issue