From 8f0d9aab89625c7536a83acfb727a454883b18c2 Mon Sep 17 00:00:00 2001 From: bg- Date: Thu, 28 Jun 2007 15:08:53 +0000 Subject: [PATCH] * Change max life of neigbour entries from 60 to 30 seconds by changing the time unit (quanta) from 4 to 2 seconds. --- core/dev/cc2420.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/dev/cc2420.c b/core/dev/cc2420.c index dcd0a213b..f63fa96d4 100644 --- a/core/dev/cc2420.c +++ b/core/dev/cc2420.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: cc2420.c,v 1.19 2007/06/01 14:37:02 bg- Exp $ + * @(#)$Id: cc2420.c,v 1.20 2007/06/28 15:08:53 bg- Exp $ */ /* * This code is almost device independent and should be easy to port. @@ -560,12 +560,12 @@ PROCESS_THREAD(cc2420_retransmit_process, ev, data) #define MAX_SCALE_RETRANS 15 /* - * Expiration timestamps are 4-bits wide, in units of 4 seconds, and + * Expiration timestamps are 4-bits wide, in units of 2 seconds, and * relative to cc2420_check_remote::toff. */ -#define SCALE_DIV_EXPIRE 4 -#define MAX_EXPIRE 15 -#define AGE_INTERVAL 5 /* 20 seconds */ +#define SCALE_DIV_EXPIRE 2 +#define MAX_EXPIRE 15 /* 30 seconds */ +#define AGE_INTERVAL 5 /* 10 seconds */ struct cc2420_neigbour neigbours[NNEIGBOURS]; @@ -644,7 +644,7 @@ cc2420_check_remote(u16_t mac) struct cc2420_neigbour *t; /* - * Age neigbour table every 5*SCALE_DIV_EXPIRE=20 seconds. + * Age neigbour table every 5*SCALE_DIV_EXPIRE=10 seconds. */ static clock_time_t toff; unsigned now = ((clock_time() - toff)/CLOCK_SECOND)/SCALE_DIV_EXPIRE;