summaryrefslogtreecommitdiff
path: root/nuttx/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-17 14:28:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-17 14:28:10 +0000
commit8bc9aa48a6c10260d599cff7cca8fa89322c3ea5 (patch)
tree59be18d4347e5cfa2d8e0bb87f8c2fb3a6ba333a /nuttx/net
parenta80ff427530ab32907f0d3858b05a8d4fbf13be2 (diff)
downloadpx4-nuttx-8bc9aa48a6c10260d599cff7cca8fa89322c3ea5.tar.gz
px4-nuttx-8bc9aa48a6c10260d599cff7cca8fa89322c3ea5.tar.bz2
px4-nuttx-8bc9aa48a6c10260d599cff7cca8fa89322c3ea5.zip
Fix DM90x0 driver problem that caused TX overruns
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@384 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net')
-rw-r--r--nuttx/net/net-timeo.c5
-rw-r--r--nuttx/net/uip/uip-tcpinput.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/nuttx/net/net-timeo.c b/nuttx/net/net-timeo.c
index 65161ca1d..0bc25c030 100644
--- a/nuttx/net/net-timeo.c
+++ b/nuttx/net/net-timeo.c
@@ -41,7 +41,10 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK)
#include <sys/types.h>
+#include <debug.h>
+
#include <nuttx/clock.h>
+
#include "net-internal.h"
/****************************************************************************
@@ -70,6 +73,7 @@ int net_timeo(uint32 start_time, socktimeo_t timeo)
{
uint32 timeo_ticks = DSEC2TICK(timeo);
uint32 elapsed = g_system_timer - start_time;
+
if (elapsed >= timeo_ticks)
{
return TRUE;
@@ -78,3 +82,4 @@ int net_timeo(uint32 start_time, socktimeo_t timeo)
}
#endif /* CONFIG_NET && CONFIG_NET_SOCKOPTS && !CONFIG_DISABLE_CLOCK */
+
diff --git a/nuttx/net/uip/uip-tcpinput.c b/nuttx/net/uip/uip-tcpinput.c
index 2ecd23d98..5ce3e2df6 100644
--- a/nuttx/net/uip/uip-tcpinput.c
+++ b/nuttx/net/uip/uip-tcpinput.c
@@ -276,7 +276,7 @@ found:
if (BUF->flags & TCP_RST)
{
conn->tcpstateflags = UIP_CLOSED;
- dbg("Recvd reset - TCP state: UIP_CLOSED\n");
+ dbg("RESET - TCP state: UIP_CLOSED\n");
(void)uip_tcpcallback(dev, conn, UIP_ABORT);
goto drop;
@@ -496,7 +496,7 @@ found:
/* The connection is closed after we send the RST */
conn->tcpstateflags = UIP_CLOSED;
- vdbg("TCP state: UIP_CLOSED\n");
+ vdbg("Connection failed - TCP state: UIP_CLOSED\n");
/* We do not send resets in response to resets. */
@@ -643,7 +643,7 @@ found:
if (flags & UIP_ACKDATA)
{
conn->tcpstateflags = UIP_CLOSED;
- vdbg("TCP state: UIP_CLOSED\n");
+ vdbg("UIP_LAST_ACK TCP state: UIP_CLOSED\n");
(void)uip_tcpcallback(dev, conn, UIP_CLOSE);
}