diff --git a/cpu/native/net/linuxradio-drv.c b/cpu/native/net/linuxradio-drv.c index da645762f..9f78e9cf1 100644 --- a/cpu/native/net/linuxradio-drv.c +++ b/cpu/native/net/linuxradio-drv.c @@ -164,8 +164,7 @@ on(void) perror("linuxradio socket()"); return 0; } else { - /* TODO: interface should not be hard-coded */ - strncpy((char *)ifr.ifr_name, "wpan0", IFNAMSIZ); + strncpy((char *)ifr.ifr_name, NETSTACK_CONF_LINUXRADIO_DEV, IFNAMSIZ); err = ioctl(sockfd, SIOCGIFINDEX, &ifr); if(err == -1) { perror("linuxradio ioctl()"); diff --git a/platform/minimal-net/contiki-conf.h b/platform/minimal-net/contiki-conf.h index 1e15adc7c..6b6b58e4a 100644 --- a/platform/minimal-net/contiki-conf.h +++ b/platform/minimal-net/contiki-conf.h @@ -174,6 +174,8 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_DS6_AADDR_NBU 0 #endif /* NETSTACK_CONF_WITH_IPV6 */ +#define NETSTACK_CONF_LINUXRADIO_DEV "wpan0" + typedef unsigned long clock_time_t; #define CLOCK_CONF_SECOND 1000 #define INFINITE_TIME ULONG_MAX diff --git a/platform/native/contiki-conf.h b/platform/native/contiki-conf.h index 5ce72c09e..b3c15d48c 100644 --- a/platform/native/contiki-conf.h +++ b/platform/native/contiki-conf.h @@ -101,6 +101,8 @@ typedef unsigned short uip_stats_t; #define NETSTACK_CONF_NETWORK sicslowpan_driver +#define NETSTACK_CONF_LINUXRADIO_DEV "wpan0" + #define UIP_CONF_ROUTER 1 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06