Oops.. a couple of hunks failed in the last patch. Hope I got them fixed correctly.

This commit is contained in:
Gregory Nutt
2016-10-24 15:25:40 -06:00
parent 146d7e7921
commit 3d4ce55ebd
2 changed files with 28 additions and 16 deletions
+3 -1
View File
@@ -72,7 +72,9 @@ enum xtal_freq_e
void esp32_clockconfig(void) void esp32_clockconfig(void)
{ {
#ifndef CONFIG_SUPPRESS_CLOCK_CONFIG #ifdef CONFIG_SUPPRESS_CLOCK_CONFIG
# warning WARNING: Clock coniguration disabled
#else
uint32_t freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ; uint32_t freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
enum xtal_freq_e freq; enum xtal_freq_e freq;
+25 -15
View File
@@ -429,24 +429,34 @@ static void tun_net_receive(FAR struct tun_device_s *priv)
#if defined(CONFIG_NET_IPv4) #if defined(CONFIG_NET_IPv4)
ninfo("IPv4 frame\n"); ninfo("IPv4 frame\n");
NETDEV_RXIPV4(&priv->dev); NETDEV_RXIPV4(&priv->dev);
#################################################################################
@@ -429,20 +431,27 @@ static void tun_receive(FAR struct tun_device_s *priv)
/* Give the IPv4 packet to the network layer */ /* Give the IPv4 packet to the network layer */
ipv4_input(&priv->dev); ret = ipv4_input(&priv->dev);
/* If the above function invocation resulted in data that should be if (ret == OK)
* sent out on the network, the field d_len will set to a value > 0. {
*/ /* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
*/
if (priv->dev.d_len > 0) if (priv->dev.d_len > 0)
{ {
priv->write_d_len = priv->dev.d_len; priv->write_d_len = priv->dev.d_len;
tun_transmit(priv); tun_fd_transmit(priv);
} }
else else
{ {
priv->write_d_len = 0; tun_pollnotify(priv, POLLOUT);
tun_pollnotify(priv, POLLOUT); }
}
else
{
priv->dev.d_len = 0;
tun_pollnotify(priv, POLLOUT);
}
} }
#elif defined(CONFIG_NET_IPv6) #elif defined(CONFIG_NET_IPv6)
@@ -464,7 +474,7 @@ static void tun_net_receive(FAR struct tun_device_s *priv)
if (priv->dev.d_len > 0) if (priv->dev.d_len > 0)
{ {
priv->write_d_len = priv->dev.d_len; priv->write_d_len = priv->dev.d_len;
tun_transmit(priv); tun_fd_transmit(priv);
} }
else else
{ {