diff --git a/drivers/net/slip.c b/drivers/net/slip.c index f1533be8056..2585ac34cb2 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -961,7 +961,8 @@ int slip_initialize(int intf, FAR const char *devname) argv[1] = NULL; priv->rxpid = task_create("rxslip", CONFIG_SLIP_DEFPRIO, - CONFIG_SLIP_STACKSIZE, (main_t)slip_rxtask, argv); + CONFIG_SLIP_STACKSIZE, (main_t)slip_rxtask, + (FAR char * const *)argv); if (priv->rxpid < 0) { ndbg("ERROR: Failed to start receiver task\n"); @@ -975,7 +976,8 @@ int slip_initialize(int intf, FAR const char *devname) /* Start the SLIP transmitter task */ priv->txpid = task_create("txslip", CONFIG_SLIP_DEFPRIO, - CONFIG_SLIP_STACKSIZE, (main_t)slip_txtask, argv); + CONFIG_SLIP_STACKSIZE, (main_t)slip_txtask, + (FAR char * const *)argv); if (priv->txpid < 0) { ndbg("ERROR: Failed to start receiver task\n"); diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h index 72f3c3e5dde..9a6ed516769 100644 --- a/include/nuttx/net/netconfig.h +++ b/include/nuttx/net/netconfig.h @@ -82,17 +82,12 @@ * should be set to 0. */ -#undef CONFIG_NET_ETHERNET -#undef CONFIG_NET_ARP - #ifdef CONFIG_NET_SLIP # ifdef CONFIG_NET_IPv6 -# error "SLIP is not implemented for IPv6" +# error SLIP is not available for IPv6 # endif # define NET_LL_HDRLEN 0 #else -# define CONFIG_NET_ETHERNET 1 -# define CONFIG_NET_ARP 1 # define NET_LL_HDRLEN 14 #endif diff --git a/net/Kconfig b/net/Kconfig index bb4d421a5c3..2eba66c9e92 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -88,42 +88,15 @@ config NET_GUARDSIZE packet size will be chopped down to the size indicated in the TCP header. -source "net/socket/Kconfig" -source "net/netdev/Kconfig" -source "net/ipv6/Kconfig" -source "net/pkt/Kconfig" -source "net/tcp/Kconfig" -source "net/udp/Kconfig" -source "net/icmp/Kconfig" -source "net/igmp/Kconfig" -source "net/arp/Kconfig" -source "net/iob/Kconfig" -source "net/utils/Kconfig" - -config NET_STATISTICS - bool "Collect network statistics" - default n - ---help--- - uIP statistics on or off - -source "net/route/Kconfig" - -config NET_MULTICAST - bool "Multi-cast Tx support" - default n - ---help--- - Outgoing multi-cast address support - -# Select Data Link +menu "Data link support" config NET_MULTILINK bool default n config NET_ETHERNET - bool - default y if !NET_SLIP - default n if NET_SLIP + bool "Ethernet support" + default y select NETDEV_MULTINIC if NET_SLIP select NET_MULTILINK if NET_SLIP ---help--- @@ -182,4 +155,32 @@ config SLIP_DEFPRIO The priority of the SLIP RX and TX tasks. Default: 128 endif # NET_SLIP +endmenu # Data link support + +source "net/socket/Kconfig" +source "net/netdev/Kconfig" +source "net/ipv6/Kconfig" +source "net/pkt/Kconfig" +source "net/tcp/Kconfig" +source "net/udp/Kconfig" +source "net/icmp/Kconfig" +source "net/igmp/Kconfig" +source "net/arp/Kconfig" +source "net/iob/Kconfig" +source "net/utils/Kconfig" + +config NET_STATISTICS + bool "Collect network statistics" + default n + ---help--- + uIP statistics on or off + +source "net/route/Kconfig" + +config NET_MULTICAST + bool "Multi-cast Tx support" + default n + ---help--- + Outgoing multi-cast address support + endif # NET diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c index d03c6005ece..8433aa9647f 100644 --- a/net/arp/arp_send.c +++ b/net/arp/arp_send.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -97,7 +98,7 @@ static uint16_t arp_send_interrupt(FAR struct net_driver_s *dev, #ifdef CONFIG_NETDEV_MULTINIC /* Is this the device that we need to route this request? */ - if (strncmp(dev->d_ifname, state->snd_ifname, IFNAMSIZ) != 0) + if (strncmp((FAR const char *)dev->d_ifname, (FAR const char *)state->snd_ifname, IFNAMSIZ) != 0) { /* No... pass on this one and wait for the device that we want */ @@ -295,7 +296,7 @@ int arp_send(in_addr_t ipaddr) #ifdef CONFIG_NETDEV_MULTINIC /* Remember the routing device name */ - strncpy(state->snd_ifname, dev->d_ifname, IFNAMSIZ); + strncpy((FAR char *)state.snd_ifname, (FAR const char *)dev->d_ifname, IFNAMSIZ); #endif /* Now loop, testing if the address mapping is in the ARP table and re-sending the ARP request if it is not. diff --git a/net/netdev/netdev_register.c b/net/netdev/netdev_register.c index 818a3c7d953..b9464bd723a 100644 --- a/net/netdev/netdev_register.c +++ b/net/netdev/netdev_register.c @@ -147,7 +147,6 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype) dev->d_llhdrlen = 0; break; #endif - break; /* REVISIT: Here we must also set the size of the link header * header the precedes network layer headers. @@ -162,7 +161,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype) /* Remember the verified link type */ - dev->d_lltype = (uint8_t)lltype + dev->d_lltype = (uint8_t)lltype; #endif /* Assign a device name to the interface */