Provide 'last-ditch' hardware address.

This commit is contained in:
Eric Norum
2005-02-02 14:17:11 +00:00
parent 3f10bb3eba
commit dd2f8912aa

View File

@@ -775,10 +775,17 @@ rtems_fec_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching )
/* /*
* Process options * Process options
*/ */
if (config->hardware_address) if (config->hardware_address) {
hwaddr = 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", printf("%s%d: Ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n",
unitName, unitNumber, unitName, unitNumber,
hwaddr[0], hwaddr[1], hwaddr[2], hwaddr[0], hwaddr[1], hwaddr[2],