Ignore:
Timestamp:
Feb 2, 2005, 2:17:11 PM (16 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
12993b3
Parents:
3f10bb3
Message:

Provide 'last-ditch' hardware address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/uC5282/network/network.c

    r3f10bb3 rdd2f891  
    776776     * Process options
    777777     */
    778     if (config->hardware_address)
     778    if (config->hardware_address) {
    779779        hwaddr = config->hardware_address;
    780     else
    781         hwaddr = uC5282_gethwaddr(unitNumber - 1);
     780    }
     781    else if ((hwaddr = uC5282_gethwaddr(unitNumber - 1)) == NULL) {
     782        /* Locally-administered address */
     783        static const char defaultAddress[ETHER_ADDR_LEN] = {
     784                                            0x06, 'R', 'T', 'E', 'M', 'S'};
     785        printf ("WARNING -- No %s%d Ethernet address specified -- Using default address.\n",
     786                                                        unitName, unitNumber);
     787        hwaddr = defaultAddress;
     788    }
    782789    printf("%s%d: Ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n",
    783790                                            unitName, unitNumber,
Note: See TracChangeset for help on using the changeset viewer.