From 0c4f7bed8fa2b3436b87e30c0b663745cce3529c Mon Sep 17 00:00:00 2001 From: nvt-se Date: Thu, 6 Nov 2008 20:45:06 +0000 Subject: [PATCH] temporary fix to get sicslowpan.c working on the Sky platform: conventional MAC implementations require a call to the MAC driver's read function. --- core/net/sicslowpan.c | 8 +++++++- platform/sky/contiki-conf.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/net/sicslowpan.c b/core/net/sicslowpan.c index cc235bf45..12aff099e 100644 --- a/core/net/sicslowpan.c +++ b/core/net/sicslowpan.c @@ -32,7 +32,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sicslowpan.c,v 1.3 2008/10/14 13:39:12 julienabeille Exp $ + * $Id: sicslowpan.c,v 1.4 2008/11/06 20:45:06 nvt-se Exp $ */ /** * \file @@ -1209,6 +1209,12 @@ input(const struct mac_driver *r) u16_t frag_tag = 0; #endif /*SICSLOWPAN_CONF_FRAG*/ +#ifdef SICSLOWPAN_CONF_CONVENTIONAL_MAC + if(r->read() <= 0) { + return; + } +#endif /* SICSLOWPAN_CONF_CONVENTIONAL_MAC */ + /* init */ uncomp_hdr_len = 0; rime_hdr_len = 0; diff --git a/platform/sky/contiki-conf.h b/platform/sky/contiki-conf.h index a007cf93c..c4457c652 100644 --- a/platform/sky/contiki-conf.h +++ b/platform/sky/contiki-conf.h @@ -1,5 +1,5 @@ /* -*- C -*- */ -/* @(#)$Id: contiki-conf.h,v 1.30 2008/11/06 15:14:24 nvt-se Exp $ */ +/* @(#)$Id: contiki-conf.h,v 1.31 2008/11/06 20:45:06 nvt-se Exp $ */ #ifndef CONTIKI_CONF_H #define CONTIKI_CONF_H @@ -74,6 +74,7 @@ #define SICSLOWPAN_CONF_COMPRESSION_HC01 2 #define SICSLOWPAN_CONF_COMPRESSION SICS_LOWPAN_CONF_COMPRESSION_HC1 #define SICSLOWPAN_CONF_FRAG 0 +#define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1 #else #define UIP_CONF_IP_FORWARD 1 #endif /* WITH_UIP6 */