summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorlaranjeiro2010-04-12 16:00:31 +0000
committerlaranjeiro2010-04-12 16:00:31 +0000
commit15d8e6405d69ad6f962b59b565d1ebba29c02fcc (patch)
tree13c907930a8ade15e7e0548ef62c20609e78b621 /cesar
parent30d9209face12d524bc7a5c9432ddcce070c8f6e (diff)
cesar/cp/av/cco/bw: add a slack to the lonely CSMA allocation
The default allocation was based on a perfect beacon period length (i.e. 1e6 ticks to 50Hz, 833333 for 60Hz). This value converted onto ATU and reconverted onto ticks does not match (1000000 tck -> 3906 ATU -> 999936 tck). To avoid the station to have a hole in the beacon period schedule, the CCo provides an allocation bigger than the beacon period. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6919 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cp/av/cco/bw/src/bw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cesar/cp/av/cco/bw/src/bw.c b/cesar/cp/av/cco/bw/src/bw.c
index d593e6eb82..7c62d6ebbe 100644
--- a/cesar/cp/av/cco/bw/src/bw.c
+++ b/cesar/cp/av/cco/bw/src/bw.c
@@ -19,6 +19,9 @@
#include "cp/inc/context.h"
+/** Define the Minimum allocation size. */
+#define CP_AV_CCO_BW_ALLOC_MIN_SIZE_TCK (MAC_AIFS_TCK + MAC_US_TO_TCK (100))
+
void
cp_av_cco_bw_schedules_default (cp_t *ctx)
{
@@ -28,7 +31,8 @@ cp_av_cco_bw_schedules_default (cp_t *ctx)
/* Create an allocation for the station. */
alloc = cp_cco_bw_alloc_init (ctx);
alloc->stpf = false;
- alloc->end_time_atu = MAC_TCK_TO_ATU(CP_PWL_BP_50);
+ alloc->end_time_atu =
+ MAC_TCK_TO_ATU(CP_PWL_BP_50 + CP_AV_CCO_BW_ALLOC_MIN_SIZE_TCK);
alloc->glid = MAC_LID_SHARED_CSMA;
alloc->persistence = CP_CCO_BW_ALLOC_PERSISTENCE_PERSISTENT;
alloc->pscd = 0;