summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaranjeiro2010-05-17 09:48:54 +0000
committerlaranjeiro2010-05-17 09:48:54 +0000
commit60dc11a2c7f3ad0e630059af7e08dc6d7b971a6c (patch)
treec8028b4bc662e308fd053324958475ef7f0ede40
parentd18e05993d443898250f6b18492f9ac882fb19be (diff)
cesar/bsu: schedules merging function
replaces schedules name for ca_schedule_t to schedule. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7050 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--cesar/bsu/src/bsu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/cesar/bsu/src/bsu.c b/cesar/bsu/src/bsu.c
index 836f5d6a07..e9e3126963 100644
--- a/cesar/bsu/src/bsu.c
+++ b/cesar/bsu/src/bsu.c
@@ -209,7 +209,7 @@ bsu_schedules_merge__allocation_add (bsu_t *ctx, ca_schedule_t *schedules,
*/
inline void
bsu_schedules_merge (bsu_t *ctx, bsu_beacon_schedules_t *asched,
- ca_schedule_t *schedules, uint bp_index)
+ ca_schedule_t *schedule, uint bp_index)
{
uint alloc = 0;
bsu_beacon_sai_t *sai;
@@ -221,26 +221,26 @@ bsu_schedules_merge (bsu_t *ctx, bsu_beacon_schedules_t *asched,
if ((alloc
&& sai->stpf
&& MAC_ATU_TO_TCK(sai->start_time_atu) !=
- schedules->allocations[alloc-1].end_offset_tck)
+ schedule->allocations[alloc-1].end_offset_tck)
|| (alloc == 0 && sai->start_time_atu != 0))
{
- bsu_schedules_merge__allocation_add (ctx, schedules, alloc,
+ bsu_schedules_merge__allocation_add (ctx, schedule, alloc,
sai->start_time_atu,
MAC_LID_SPC_HOLE);
alloc++;
}
/* Add this allocation. */
- bsu_schedules_merge__allocation_add (ctx, schedules, alloc,
+ bsu_schedules_merge__allocation_add (ctx, schedule, alloc,
sai->end_time_atu,
sai->glid);
alloc++;
}
/* store the number of allocations. */
- schedules->allocations_nb = alloc;
+ schedule->allocations_nb = alloc;
/* Store the end of data for this schedule-> */
- schedules->coexistence_mode = asched->hm[bp_index];
- schedules->nek_switch = asched->nek_switch[bp_index];
- schedules->snid = asched->snid[bp_index];
+ schedule->coexistence_mode = asched->hm[bp_index];
+ schedule->nek_switch = asched->nek_switch[bp_index];
+ schedule->snid = asched->snid[bp_index];
}
/**
@@ -259,15 +259,15 @@ bsu_ca_schedules (bsu_t *ctx, bsu_avln_t *avln)
{
dbg_assert (avln);
ca_beacon_period_t beacon_period[BSU_BEACON_PERIOD_NB];
- ca_schedule_t *schedules;
+ ca_schedule_t *schedule;
u32 bpsd[BSU_BEACON_PERIOD_NB];
uint i;
bsu_aclf_beacon_period_start_date (ctx->aclf, bpsd, COUNT (bpsd));
/* Get the CA schedules from the next one and for BPSD_NB. */
for (i = 0; i < BSU_BEACON_PERIOD_NB; i++)
{
- schedules = ca_alloc_get_schedule (ctx->ca, ctx->ca_index);
- bsu_schedules_merge (ctx, &avln->bs.schedules, schedules, i);
+ schedule = ca_alloc_get_schedule (ctx->ca, ctx->ca_index);
+ bsu_schedules_merge (ctx, &avln->bs.schedules, schedule, i);
beacon_period[i].start_date = bpsd[i];
beacon_period[i].schedule_index = ctx->ca_index;
ctx->ca_index = (ctx->ca_index + 1) % CA_SCHEDULE_NB;