summaryrefslogtreecommitdiff
path: root/nuttx/net/net-timeo.c
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/net-timeo.c
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/net-timeo.c')
-rw-r--r--nuttx/net/net-timeo.c5
1 files changed, 5 insertions, 0 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 */
+