Remove CONFIG_NET_MULTILINK. This increases code size by a little, but greatly reduces the complexity of the network code.

This commit is contained in:
Gregory Nutt
2017-08-08 15:26:09 -06:00
parent bd7c84b23e
commit aeb59383cf
33 changed files with 171 additions and 554 deletions
+2 -35
View File
@@ -196,9 +196,8 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile)
status = "DOWN";
}
#if defined(CONFIG_NET_MULTILINK)
/* If there are multiple link types being supported, then selected the
* output appropriate for the link type associated with this device.
/* Select the output appropriate for the link type associated with
* this device.
*/
switch (dev->d_lltype)
@@ -256,38 +255,6 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile)
len += snprintf(&netfile->line[len], NET_LINELEN - len,
" at %s\n", status);
#elif defined(CONFIG_NET_ETHERNET)
len += snprintf(&netfile->line[len], NET_LINELEN - len,
"%s\tLink encap:Ethernet HWaddr %s at %s\n",
dev->d_ifname, ether_ntoa(&dev->d_mac.ether), status);
#elif defined(CONFIG_NET_6LOWPAN)
len += netprocfs_6lowpan_linklayer(netfile, len);
len += snprintf(&netfile->line[len], NET_LINELEN - len,
" at %s\n", status);
#elif defined(CONFIG_NET_LOOPBACK)
len += snprintf(&netfile->line[len], NET_LINELEN - len,
"%s\tLink encap:Local Loopback at %s\n",
dev->d_ifname, status);
#elif defined(CONFIG_NET_SLIP)
len += snprintf(&netfile->line[len], NET_LINELEN - len,
"%s\tLink encap:SLIP at %s\n",
dev->d_ifname, status);
#elif defined(CONFIG_NET_PPP)
len += snprintf(&netfile->line[len], NET_LINELEN - len,
"%s\tLink encap:P-t-P at %s\n",
dev->d_ifname, status);
#elif defined(CONFIG_NET_TUN)
len += snprintf(&netfile->line[len], NET_LINELEN - len,
"%s\tLink encap:TUN at %s\n",
dev->d_ifname, status);
#endif
return len;
}