Skip to content
Snippets Groups Projects
Commit 9d5c3f4c authored by Oleg Hahm's avatar Oleg Hahm
Browse files

auto_init: always set source address mode

parent 8f93b5ce
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment