From f88a1e394b3df952645512c66326c157652bf996 Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Fri, 9 Dec 2011 08:18:22 +0100 Subject: [PATCH 1/3] Made collect retransmissions and broadcast announcements timers depend on the rdc wakeup rate --- core/net/rime/collect.c | 2 +- core/net/rime/rime.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/net/rime/collect.c b/core/net/rime/collect.c index cb18d6fbd..f6b43ab5e 100644 --- a/core/net/rime/collect.c +++ b/core/net/rime/collect.c @@ -126,7 +126,7 @@ struct ack_msg { full, incoming packets are dropped instead of being forwarded. */ #define MAX_MAC_REXMITS 2 #define MAX_ACK_MAC_REXMITS 5 -#define REXMIT_TIME CLOCK_SECOND * 4 +#define REXMIT_TIME CLOCK_SECOND * 32 / NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE #define FORWARD_PACKET_LIFETIME_BASE REXMIT_TIME * 2 #define MAX_SENDING_QUEUE 3 * QUEUEBUF_NUM / 4 #define MIN_AVAILABLE_QUEUE_ENTRIES 4 diff --git a/core/net/rime/rime.c b/core/net/rime/rime.c index 08db5b8aa..b64be1c5c 100644 --- a/core/net/rime/rime.c +++ b/core/net/rime/rime.c @@ -72,7 +72,7 @@ const struct mac_driver *rime_mac; #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_BUMP_TIME #define BROADCAST_ANNOUNCEMENT_BUMP_TIME RIME_CONF_BROADCAST_ANNOUNCEMENT_BUMP_TIME #else /* RIME_CONF_BROADCAST_ANNOUNCEMENT_BUMP_TIME */ -#define BROADCAST_ANNOUNCEMENT_BUMP_TIME CLOCK_SECOND * 8 +#define BROADCAST_ANNOUNCEMENT_BUMP_TIME CLOCK_SECOND * 32 / NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE #endif /* RIME_CONF_BROADCAST_ANNOUNCEMENT_BUMP_TIME */ #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_MIN_TIME From 1086299f25e553c163f3968b7a41d392172cc82f Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 9 Dec 2011 08:23:43 -0500 Subject: [PATCH 2/3] fix typo --- core/net/rpl/rpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/rpl/rpl.h b/core/net/rpl/rpl.h index 77d577988..66660e29f 100644 --- a/core/net/rpl/rpl.h +++ b/core/net/rpl/rpl.h @@ -110,7 +110,7 @@ #if RPL_MAX_DODAG_PER_INSTANCE > 1 #define RPL_DAO_SPECIFY_DODAG 1 #else /* RPL_MAX_DODAG_PER_INSTANCE > 1*/ -#define RPL__DAO_SPECIFY_DODAG 0 +#define RPL_DAO_SPECIFY_DODAG 0 #endif /* RPL_MAX_DODAG_PER_INSTANCE > 1 */ #else /* RPL_CONF_DAO_SPECIFY_DODAG */ #define RPL_DAO_SPECIFY_DODAG RPL_CONF_DAO_SPECIFY_DODAG From c9ac19b919844542d8629d0c300ac54763aca713 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 9 Dec 2011 08:36:23 -0500 Subject: [PATCH 3/3] Allocate the default_instance pointer in rpl-dag.c instead of the header file to fix "multiple definition of `default_instance'" errors. --- core/net/rpl/rpl-dag.c | 1 + core/net/rpl/rpl-private.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 0ce3e0f87..e9d15ee57 100755 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -96,6 +96,7 @@ MEMB(parent_memb, struct rpl_parent, RPL_MAX_PARENTS_PER_DODAG*RPL_MAX_INSTANCES /************************************************************************/ /* Allocate instance table. */ rpl_instance_t instance_table[RPL_MAX_INSTANCES]; +rpl_instance_t *default_instance; /************************************************************************/ /* Remove DAG parents with a rank that is at least the same as minimum_rank. */ diff --git a/core/net/rpl/rpl-private.h b/core/net/rpl/rpl-private.h index 1936c124a..ac4eba542 100644 --- a/core/net/rpl/rpl-private.h +++ b/core/net/rpl/rpl-private.h @@ -253,7 +253,7 @@ extern rpl_stats_t rpl_stats; /*---------------------------------------------------------------------------*/ /* Instances */ extern rpl_instance_t instance_table[]; -rpl_instance_t *default_instance; +extern rpl_instance_t *default_instance; /* ICMPv6 functions for RPL. */ void dis_output(uip_ipaddr_t *addr);