Skip to content

Commit 7e7903e

Browse files
committed
Init first lwip stack to get mac address
1 parent ae8c74e commit 7e7903e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

features/FEATURE_LWIP/lwip-interface/EthernetInterface.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ nsapi_error_t EthernetInterface::disconnect()
5454

5555
const char *EthernetInterface::get_mac_address()
5656
{
57+
if (!mbed_lwip_get_mac_address()) {
58+
mbed_lwip_init(NULL);
59+
}
5760
return mbed_lwip_get_mac_address();
5861
}
5962

0 commit comments

Comments
 (0)