From 9d5c3f4c8bbbe70d75b62c43caec1893ab8c1037 Mon Sep 17 00:00:00 2001
From: Oleg Hahm <oleg@hobbykeller.org>
Date: Thu, 6 Nov 2014 21:52:08 +0100
Subject: [PATCH] auto_init: always set source address mode

---
 sys/auto_init/auto_init.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/sys/auto_init/auto_init.c b/sys/auto_init/auto_init.c
index 218e2c314e..e4272b8be8 100644
--- a/sys/auto_init/auto_init.c
+++ b/sys/auto_init/auto_init.c
@@ -163,6 +163,14 @@ void auto_init_net_if(void)
         DEBUG("Auto init radio address on interface %d to 0x%04x\n", iface, hwaddr);
 #else /* CPUID_ID_LEN && defined(MODULE_HASHES) */
 
+        if (!net_if_get_hardware_address(iface)) {
+            DEBUG("Auto init radio address on interface %d to 0x%04x\n", iface, CONF_RADIO_ADDR);
+            DEBUG("Change this value at compile time with macro CONF_RADIO_ADDR\n");
+            net_if_set_hardware_address(iface, CONF_RADIO_ADDR);
+        }
+
+#endif /* CPUID_ID_LEN && defined(MODULE_HASHES) */
+
         if (net_if_set_src_address_mode(iface, NET_IF_TRANS_ADDR_M_SHORT)) {
             DEBUG("Auto init source address mode to short on interface %d\n",
                   iface);
@@ -173,13 +181,6 @@ void auto_init_net_if(void)
                   iface);
         }
 
-        if (!net_if_get_hardware_address(iface)) {
-            DEBUG("Auto init radio address on interface %d to 0x%04x\n", iface, CONF_RADIO_ADDR);
-            DEBUG("Change this value at compile time with macro CONF_RADIO_ADDR\n");
-            net_if_set_hardware_address(iface, CONF_RADIO_ADDR);
-        }
-
-#endif /* CPUID_ID_LEN && defined(MODULE_HASHES) */
 
         if (net_if_get_pan_id(iface) <= 0) {
             DEBUG("Auto init PAN ID on interface %d to 0x%04x\n", iface, CONF_PAN_ID);
-- 
GitLab