Commit 09a736d5 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wrc_main: changing default mac to something that would let user know that something got wrong

parent 18177c83
...@@ -45,13 +45,16 @@ void wrc_initialize() ...@@ -45,13 +45,16 @@ void wrc_initialize()
mac_addr[0] = 0x08; // mac_addr[0] = 0x08; //
mac_addr[1] = 0x00; // CERN OUI mac_addr[1] = 0x00; // CERN OUI
mac_addr[2] = 0x30; // mac_addr[2] = 0x30; //
mac_addr[3] = 0xDE; // fallback MAC if get_persistent_mac fails
mac_addr[4] = 0xAD;
mac_addr[5] = 0x42;
own_scanbus(ONEWIRE_PORT); own_scanbus(ONEWIRE_PORT);
if (get_persistent_mac(ONEWIRE_PORT, mac_addr) == -1) { if (get_persistent_mac(ONEWIRE_PORT, mac_addr) == -1) {
mprintf("Unable to determine MAC address\n"); mprintf("Unable to determine MAC address\n");
mac_addr[0] = 0x11; //
mac_addr[1] = 0x22; //
mac_addr[2] = 0x33; // fallback MAC if get_persistent_mac fails
mac_addr[3] = 0x44; //
mac_addr[4] = 0x55; //
mac_addr[5] = 0x66; //
} }
TRACE_DEV("Local MAC address: %x:%x:%x:%x:%x:%x\n", mac_addr[0],mac_addr[1],mac_addr[2],mac_addr[3],mac_addr[4],mac_addr[5]); TRACE_DEV("Local MAC address: %x:%x:%x:%x:%x:%x\n", mac_addr[0],mac_addr[1],mac_addr[2],mac_addr[3],mac_addr[4],mac_addr[5]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment