diff --git a/src/drivers/net/ecm.c b/src/drivers/net/ecm.c index f531b04f8..826b3b16d 100644 --- a/src/drivers/net/ecm.c +++ b/src/drivers/net/ecm.c @@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include #include #include +#include #include #include "ecm.h" @@ -93,6 +94,14 @@ int ecm_fetch_mac ( struct usb_function *func, int len; int rc; + /* Use system-specific MAC address, if present and not already used */ + if ( ( ( rc = acpi_mac ( hw_addr ) ) == 0 ) && + ! find_netdev_by_ll_addr ( ðernet_protocol, hw_addr ) ) { + DBGC ( usb, "USB %s using system-specific MAC %s\n", + func->name, eth_ntoa ( hw_addr ) ); + return 0; + } + /* Fetch MAC address string */ len = usb_get_string_descriptor ( usb, desc->mac, 0, buf, sizeof ( buf ) );