From d1bef2b68afb24dfc73370b2c40aeffffebbf879 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Thu, 7 Jun 2012 10:45:05 +0200 Subject: [PATCH] Bug fix: setup MAC address based on node id if no MAC address was restored from external flash --- platform/z1/contiki-z1-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/z1/contiki-z1-main.c b/platform/z1/contiki-z1-main.c index 3b6195437..e97fddf9a 100644 --- a/platform/z1/contiki-z1-main.c +++ b/platform/z1/contiki-z1-main.c @@ -220,8 +220,8 @@ main(int argc, char **argv) node_id_restore(); /* If no MAC address was burned, we use the node ID. */ - if(node_mac[0] | node_mac[1] | node_mac[2] | node_mac[3] | - node_mac[4] | node_mac[5] | node_mac[6] | node_mac[7]) { + if(!(node_mac[0] | node_mac[1] | node_mac[2] | node_mac[3] | + node_mac[4] | node_mac[5] | node_mac[6] | node_mac[7])) { node_mac[0] = 0xc1; /* Hardcoded for Z1 */ node_mac[1] = 0x0c; /* Hardcoded for Revision C */ node_mac[2] = 0x00; /* Hardcoded to arbitrary even number so that