mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Provide 'last-ditch' hardware address.
This commit is contained in:
@@ -775,10 +775,17 @@ rtems_fec_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching )
|
||||
/*
|
||||
* Process options
|
||||
*/
|
||||
if (config->hardware_address)
|
||||
if (config->hardware_address) {
|
||||
hwaddr = config->hardware_address;
|
||||
else
|
||||
hwaddr = uC5282_gethwaddr(unitNumber - 1);
|
||||
}
|
||||
else if ((hwaddr = uC5282_gethwaddr(unitNumber - 1)) == NULL) {
|
||||
/* Locally-administered address */
|
||||
static const char defaultAddress[ETHER_ADDR_LEN] = {
|
||||
0x06, 'R', 'T', 'E', 'M', 'S'};
|
||||
printf ("WARNING -- No %s%d Ethernet address specified -- Using default address.\n",
|
||||
unitName, unitNumber);
|
||||
hwaddr = defaultAddress;
|
||||
}
|
||||
printf("%s%d: Ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
unitName, unitNumber,
|
||||
hwaddr[0], hwaddr[1], hwaddr[2],
|
||||
|
||||
Reference in New Issue
Block a user