From c7e5b6873782de5e57b02e281f50ff88c7086f6b Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Mon, 5 Nov 2012 11:24:41 +0100 Subject: cesar/cp/av/cco/bw: add start_time_atu on allocation for Gigle, closes #2437 --- cesar/bsu/src/bsu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cesar/bsu') diff --git a/cesar/bsu/src/bsu.c b/cesar/bsu/src/bsu.c index 2b98eadd85..578ae14047 100644 --- a/cesar/bsu/src/bsu.c +++ b/cesar/bsu/src/bsu.c @@ -402,6 +402,7 @@ PRIVATE inline void bsu_schedules_merge__allocation_add (bsu_t *ctx, ca_schedule_t *schedules, uint pos, u32 end_time_atu, u8 glid) { + dbg_claim (end_time_atu); schedules->allocations[pos].end_offset_tck = MAC_ATU_TO_TCK (end_time_atu); schedules->allocations[pos].glid = glid; @@ -440,10 +441,11 @@ bsu_schedules_merge (bsu_t *ctx, bsu_beacon_t *beacon, ctx, schedule, alloc, sai->start_time_atu, glid); alloc++; } - /* Add a hole between the previous allocation end this one. */ - else if (sai->stpf + /* Add a hole between the previous allocation and this one. */ + else if (alloc + && sai->stpf && MAC_ATU_TO_TCK(sai->start_time_atu) - != schedule->allocations[alloc-1].end_offset_tck) + != schedule->allocations[alloc-1].end_offset_tck) { bsu_schedules_merge__allocation_add ( ctx, schedule, alloc, sai->start_time_atu, MAC_LID_SPC_HOLE); -- cgit v1.2.3