File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
features/FEATURE_LWIP/lwip-interface Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -467,7 +467,6 @@ nsapi_error_t mbed_lwip_emac_init(emac_interface_t *emac)
467
467
eth_arch_enable_interrupts ();
468
468
#endif
469
469
470
- netif_inited = true;
471
470
return NSAPI_ERROR_OK ;
472
471
#else
473
472
return NSAPI_ERROR_UNSUPPORTED ;
@@ -477,8 +476,13 @@ nsapi_error_t mbed_lwip_emac_init(emac_interface_t *emac)
477
476
// Backwards compatibility with people using DEVICE_EMAC
478
477
nsapi_error_t mbed_lwip_init (emac_interface_t * emac )
479
478
{
479
+ nsapi_error_t ret ;
480
480
mbed_lwip_core_init ();
481
- return mbed_lwip_emac_init (emac );
481
+ ret = mbed_lwip_emac_init (emac );
482
+ if (ret == NSAPI_ERROR_OK ) {
483
+ netif_inited = true;
484
+ }
485
+ return ret ;
482
486
}
483
487
484
488
// Backwards compatibility with people using DEVICE_EMAC
You can’t perform that action at this time.
0 commit comments