Extracted linuxradio device name to contiki-conf

This commit is contained in:
Vladimir Pouzanov 2014-03-01 10:30:41 +00:00 committed by Vladimir Pouzanov
parent 52c90519d9
commit 4c8618e6ba
3 changed files with 5 additions and 2 deletions

View file

@ -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()");