summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro2010-11-25 16:59:19 +0100
committerNicolas Schodet2010-12-07 13:33:25 +0100
commite5f6c04c3d5a071b95ff3be238010dd0c20ac509 (patch)
tree6b291c857c76e69474c3904750a5d41fbc3aaed9 /cesar
parent6f0c6291f1f6ee6de992252fcb023f5413edc046 (diff)
cesar/bsu: remove aclf timer and prepare bsu to handle timer, closes #1945
Diffstat (limited to 'cesar')
-rw-r--r--cesar/bsu/aclf/aclf.h33
-rw-r--r--cesar/bsu/aclf/src/aclf.c95
-rw-r--r--cesar/bsu/aclf/test/utest/src/bpsd.c11
-rw-r--r--cesar/bsu/aclf/test/utest/src/common.c4
-rw-r--r--cesar/bsu/aclf/test/utest/src/misc.c51
-rw-r--r--cesar/bsu/src/bsu.c22
-rw-r--r--cesar/bsu/test/utest/src/schedules.c8
-rw-r--r--cesar/bsu/test/utest/src/tests.c3
-rw-r--r--cesar/station/src/station.c2
-rw-r--r--cesar/test_general/maximus/integration/interface-dp/src/station.c3
10 files changed, 58 insertions, 174 deletions
diff --git a/cesar/bsu/aclf/aclf.h b/cesar/bsu/aclf/aclf.h
index f4a2df5294..5e70c91dc3 100644
--- a/cesar/bsu/aclf/aclf.h
+++ b/cesar/bsu/aclf/aclf.h
@@ -94,14 +94,6 @@ struct bsu_aclf_t
* Last value read in PRATIC register.
*/
u32 date;
- /** Track the ACL. */
- bool aclsc;
- /** Hal timer context. */
- hal_timer_t *hal_timer;
- /** Timer instance. */
- hal_timer_instance_t timer;
- /** Activated status. */
- bool activate;
};
typedef struct bsu_aclf_t bsu_aclf_t;
@@ -111,11 +103,10 @@ BEGIN_DECLS
* Initialise the module.
* \param phy the phy context.
* \param mac_config the mac config structure.
- * \param timer the hal_timer.
* \return the module context pointer.
*/
bsu_aclf_t*
-bsu_aclf_init (phy_t *phy, mac_config_t *mac_config, hal_timer_t *timer);
+bsu_aclf_init (phy_t *phy, mac_config_t *mac_config);
/**
* Uninitialise the module.
@@ -125,6 +116,18 @@ void
bsu_aclf_uninit (bsu_aclf_t *ctx);
/**
+ * Compute the frequency of the power line using the PRATIC register.
+ * \param ctx the module context.
+ *
+ * It shall read the PRATIC register twice with a gap of BSU_ACLF_ZC_50. This
+ * function shall update the data in the object.
+ *
+ * \warn If the medium is a coaxial cable, the 50Hz will be chosen.
+ */
+void
+bsu_aclf_acl_frequency_detection (bsu_aclf_t *ctx);
+
+/**
* Compute the beacon period start date from the data contained in the
* beacon.
* \param ctx the module context.
@@ -187,20 +190,18 @@ u32
bsu_aclf_beacon_period_atu (bsu_aclf_t *ctx);
/**
- * ACLF must synchronise on the ACL frequency.
+ * Shift the date to correspond to the current date.
* \param ctx the module context.
- * \param aclsc the boolean to inform the ACL.
*/
void
-bsu_aclf_aclsc (bsu_aclf_t *ctx, bool aclsc);
+bsu_aclf_shift_beacon_period_start_date (bsu_aclf_t *ctx);
/**
- * Activate the BSU ACLF
+ * Compute the beacon period start date from the AC Line.
* \param ctx the module context.
- * \param status true to activate, false otherwise.
*/
void
-bsu_aclf_activate (bsu_aclf_t *ctx, bool status);
+bsu_aclf_ac_compute_beacon_period_start_date (bsu_aclf_t *ctx);
END_DECLS
diff --git a/cesar/bsu/aclf/src/aclf.c b/cesar/bsu/aclf/src/aclf.c
index 4816c043de..0d68d6e3d0 100644
--- a/cesar/bsu/aclf/src/aclf.c
+++ b/cesar/bsu/aclf/src/aclf.c
@@ -55,37 +55,21 @@ bsu_aclf_compute_beacon_period_from_acl (bsu_aclf_t *ctx)
ctx->beacon_period += BSU_ACLF_WP * ((s32) diff - (s32)ctx->beacon_period);
}
-/**
- * Shift the date to correspond to the current date.
- * \param ctx the module context.
- *
- * Used when the station is acting as STA and the central beacon has not been
- * received.
- */
void
bsu_aclf_shift_beacon_period_start_date (bsu_aclf_t *ctx)
{
uint i;
dbg_assert (ctx);
- u32 now = phy_date ();
- if (lesseq_mod2p32 (ctx->bpsd[1], now))
- {
- for (i = 0; i < BSU_ACLF_BPSD_NB - 1; i++)
- ctx->bpsd[i] = ctx->bpsd[i+1];
- ctx->bpsd[i] += ctx->bp;
- ctx->beacon_period = ctx->bpsd[1] - ctx->bpsd[0];
- }
+ for (i = 0; i < BSU_ACLF_BPSD_NB - 1; i++)
+ ctx->bpsd[i] = ctx->bpsd[i+1];
+ ctx->bpsd[i] += ctx->bp;
+ ctx->beacon_period = ctx->bpsd[1] - ctx->bpsd[0];
}
-/**
- * Compute the beacon period start date from the AC Line.
- * \param ctx the module context.
- */
void
bsu_aclf_ac_compute_beacon_period_start_date (bsu_aclf_t *ctx)
{
dbg_assert (ctx);
- dbg_assert (ctx->aclsc);
uint i;
u32 now = phy_date ();
u32 bts;
@@ -99,8 +83,7 @@ bsu_aclf_ac_compute_beacon_period_start_date (bsu_aclf_t *ctx)
for (i = 1; i < BSU_ACLF_BPSD_NB; i++)
ctx->bpsd[i] = ctx->bpsd[i-1] + ctx->beacon_period;
}
- /* Compute only if the current beacon period is over. */
- else if (lesseq_mod2p32 (ctx->bpsd[1], now))
+ else
{
/* Update the beacon period start time. */
for (i = 0; i < BSU_ACLF_BPSD_NB - 1; i++)
@@ -123,31 +106,6 @@ bsu_aclf_ac_compute_beacon_period_start_date (bsu_aclf_t *ctx)
}
}
-/**
- * Timer event function call.
- * \param user_data the module context.
- */
-void
-bsu_aclf_timer_event (void *user_data)
-{
- bsu_aclf_t *ctx = (bsu_aclf_t*) user_data;
- dbg_assert (less_mod2p32 (phy_date (), ctx->bpsd[2]));
- if (ctx->aclsc)
- bsu_aclf_ac_compute_beacon_period_start_date (ctx);
- else
- bsu_aclf_shift_beacon_period_start_date (ctx);
- hal_timer_instance_program (ctx->hal_timer, &ctx->timer, ctx->bpsd[1]);
-}
-
-/**
- * Compute the frequency of the power line using the PRATIC register.
- * \param ctx the module context.
- *
- * It shall read the PRATIC register twice with a gap of BSU_ACLF_ZC_50. This
- * function shall update the data in the object.
- *
- * \warn If the medium is a coaxial cable, the 50Hz will be chosen.
- */
void
bsu_aclf_acl_frequency_detection (bsu_aclf_t *ctx)
{
@@ -193,11 +151,10 @@ bsu_aclf_clear (bsu_aclf_t *ctx)
for (i = 0; i < COUNT (ctx->bto); i++)
ctx->bto[i] = 0;
ctx->date = 0;
- ctx->aclsc = false;
}
bsu_aclf_t*
-bsu_aclf_init (phy_t *phy, mac_config_t *mac_config, hal_timer_t *timer)
+bsu_aclf_init (phy_t *phy, mac_config_t *mac_config)
{
bsu_aclf_t *ctx = &bsu_aclf_global;
dbg_assert (phy);
@@ -205,8 +162,6 @@ bsu_aclf_init (phy_t *phy, mac_config_t *mac_config, hal_timer_t *timer)
memset (ctx, 0, sizeof (bsu_aclf_t));
ctx->phy = phy;
ctx->mac_config = mac_config;
- ctx->hal_timer = timer;
- hal_timer_instance_init (timer, &ctx->timer, ctx, bsu_aclf_timer_event);
return ctx;
}
@@ -225,22 +180,24 @@ bsu_aclf_compute_beacon_period_start_date (bsu_aclf_t *ctx, const u32 bts_ntb,
uint i;
dbg_assert (ctx);
u32 bts_date = bts_ntb - ntb_offset_tck - bpsto;
- ctx->bpsd[0] = bts_date;
- for (i = 0; i < BSU_ACLF_BPSD_NB - 1; i++)
+ u32 reference;
+ for (i = 0, reference = bts_date + ctx->bp;
+ i < BSU_ACLF_BPSD_NB - 1;
+ i++, reference = ctx->bpsd[i] + ctx->bp)
{
if (i < HPAV_BEACON_BTO_NB)
{
ctx->bto[i] = bto[i];
/* BTO is valid use it to compute. */
if (bto[i] != HPAV_BEACON_BTO_INVALID)
- ctx->bpsd[i+1] = ctx->bpsd[i] + ctx->bp + bto[i];
+ ctx->bpsd[i+1] = reference + bto[i];
/* BTO is not valid, STA assumes the beacon period start date has
* no offset (FIXME: Good idea ?) */
else
- ctx->bpsd[i+1] = ctx->bpsd[i] + ctx->bp;
+ ctx->bpsd[i+1] = reference ;
}
else
- ctx->bpsd[i+1] = ctx->bpsd[i] + ctx->bp;
+ ctx->bpsd[i+1] = reference;
}
}
@@ -254,29 +211,3 @@ bsu_aclf_bto (bsu_aclf_t *ctx, s16 btos[], uint nb)
for (i = 0; i < nb; i++)
btos[i] = ctx->bto[i];
}
-
-void
-bsu_aclf_aclsc (bsu_aclf_t *ctx, bool aclsc)
-{
- dbg_assert (ctx);
- ctx->aclsc = aclsc;
-}
-
-void
-bsu_aclf_activate (bsu_aclf_t *ctx, bool status)
-{
- dbg_assert (ctx);
- dbg_assert (ctx->activate != status);
- ctx->activate = status;
- if (status)
- {
- bsu_aclf_acl_frequency_detection (ctx);
- bsu_aclf_ac_compute_beacon_period_start_date (ctx);
- hal_timer_instance_program (ctx->hal_timer, &ctx->timer, ctx->bpsd[1]);
- }
- else
- {
- hal_timer_instance_cancel (ctx->hal_timer, &ctx->timer);
- bsu_aclf_clear (ctx);
- }
-}
diff --git a/cesar/bsu/aclf/test/utest/src/bpsd.c b/cesar/bsu/aclf/test/utest/src/bpsd.c
index 476b8881e7..6f6428cfc2 100644
--- a/cesar/bsu/aclf/test/utest/src/bpsd.c
+++ b/cesar/bsu/aclf/test/utest/src/bpsd.c
@@ -151,7 +151,9 @@ test_case_aclf_compute_bto (test_t t)
*((uint*) &test_sta.aclf->bp) = BSU_ACLF_BP_50HZ_TCK;
*((uint*) &test_sta.aclf->zc) = BSU_ACLF_ZC_50HZ_TCK;
test_cco.aclf->beacon_period = test_cco.aclf->bp;
+ test_cco.aclf->bpsd[0] = 0;
test_sta.aclf->beacon_period = test_sta.aclf->bp;
+ test_sta.aclf->bpsd[0] = test_cco.aclf->bpsd[1];
for (nb_iter = 0; nb_iter < ac_stable_length; nb_iter ++)
{
test_cco.phy->phy += tables[i][nb_iter];
@@ -160,6 +162,8 @@ test_case_aclf_compute_bto (test_t t)
bsu_aclf_bto (test_cco.aclf, btos_cco, bto_nb);
bsu_aclf_beacon_period_start_date (test_cco.aclf, bpsd_cco,
bpsd_nb);
+ /* At the end of the beacon period, the aclf timer expires. */
+ bsu_aclf_shift_beacon_period_start_date (test_sta.aclf);
/* BTS value is use to simulate the STA beacon reception which
* compute the beacon period start date using the BTS and the
* BTOs of the central beacon. */
@@ -191,6 +195,8 @@ test_case_aclf_compute_bto (test_t t)
test_fail_unless (btos_cco[j] ==
HPAV_BEACON_BTO_INVALID);
}
+ bsu_aclf_beacon_period_start_date (test_cco.aclf, bpsd_cco,
+ bpsd_nb);
}
bsu_aclf_test_uninit (&test_cco);
}
@@ -249,7 +255,10 @@ test_case_aclf_shift_compute_shift_bpsd (test_t t)
u32 bts = test.aclf->bpsd[0] + ntb_tick_offset + test.aclf->bp;
s16 bto[4] = {0, 0, 0, 0};
uint k;
- for (k = 0; k < BSU_ACLF_BPSD_NB; k++)
+ /* BPSD 0 is only touch by timer event. In this case like
+ * timer event is not called, bpsd[0] is the bts. */
+ test.aclf->bpsd[0] = bts - ntb_tick_offset;
+ for (k = 1; k < BSU_ACLF_BPSD_NB; k++)
test.aclf->bpsd[k] = 0;
bsu_aclf_compute_beacon_period_start_date (test.aclf,
bts, bto, 0,
diff --git a/cesar/bsu/aclf/test/utest/src/common.c b/cesar/bsu/aclf/test/utest/src/common.c
index a71115aaf4..66622f9557 100644
--- a/cesar/bsu/aclf/test/utest/src/common.c
+++ b/cesar/bsu/aclf/test/utest/src/common.c
@@ -24,10 +24,8 @@ bsu_aclf_test_init (bsu_aclf_test_t *t)
dbg_assert (t);
memset (t, 0, sizeof (bsu_aclf_test_t));
memset (&phy_test_global, 0, sizeof (bsu_aclf_test_phy_t));
- hal_timer_t *timer = hal_timer_init ();
- t->aclf = bsu_aclf_init ((phy_t *) &phy_test_global, &t->mac_config, timer);
+ t->aclf = bsu_aclf_init ((phy_t *) &phy_test_global, &t->mac_config);
t->phy = &phy_test_global;
- bsu_aclf_aclsc (t->aclf, true);
}
void
diff --git a/cesar/bsu/aclf/test/utest/src/misc.c b/cesar/bsu/aclf/test/utest/src/misc.c
index 811c112d3e..4d184cc130 100644
--- a/cesar/bsu/aclf/test/utest/src/misc.c
+++ b/cesar/bsu/aclf/test/utest/src/misc.c
@@ -17,12 +17,6 @@
#include "bsu/aclf/test/utest/common.h"
void
-bsu_aclf_shift_beacon_period_start_date (bsu_aclf_t *ctx);
-
-void
-bsu_aclf_timer_event (void *user_data);
-
-void
test_case_aclf__beacon_period (test_t test)
{
test_case_begin (test, "ACLF beacon period");
@@ -46,53 +40,8 @@ test_case_aclf__beacon_period (test_t test)
}
void
-test_case_aclf__timer (test_t test)
-{
- bsu_aclf_test_t ctx;
- uint i;
- u32 bpsd[4];
- bsu_aclf_test_init (&ctx);
- test_case_begin (test, "Timer event");
- test_begin (test, "ACL tracker")
- {
- bsu_aclf_activate (ctx.aclf, true);
- bsu_aclf_beacon_period_start_date (ctx.aclf, bpsd, COUNT (bpsd));
- /* Already in tracker mode. */
- for (i = 0; i < COUNT (bpsd) - 1; i++)
- test_fail_unless (bpsd[i+1] - bpsd[i]
- == bsu_aclf_beacon_period_tck (ctx.aclf));
- u32 old = bpsd[0];
- ctx.phy->phy = bpsd[1];
- bsu_aclf_timer_event (ctx.aclf);
- bsu_aclf_beacon_period_start_date (ctx.aclf, bpsd, COUNT (bpsd));
- /* Already in tracker mode. */
- for (i = 0; i < COUNT (bpsd) - 1; i++)
- test_fail_unless (bpsd[i+1] - bpsd[i]
- == bsu_aclf_beacon_period_tck (ctx.aclf));
- test_fail_unless (old + ctx.aclf->bp == bpsd[0]);
- }
- test_end;
- test_begin (test, "Station behavior")
- {
- bsu_aclf_aclsc (ctx.aclf, false);
- u32 old = bpsd[0];
- ctx.phy->phy = bpsd[1];
- bsu_aclf_timer_event (ctx.aclf);
- bsu_aclf_beacon_period_start_date (ctx.aclf, bpsd, COUNT (bpsd));
- /* Already in tracker mode. */
- for (i = 0; i < COUNT (bpsd) - 1; i++)
- test_fail_unless (bpsd[i+1] - bpsd[i]
- == bsu_aclf_beacon_period_tck (ctx.aclf));
- test_fail_unless (old + ctx.aclf->bp == bpsd[0]);
- }
- test_end;
- bsu_aclf_test_uninit (&ctx);
-}
-
-void
test_suite_aclf__misc (test_t test)
{
test_suite_begin (test, "Miscellaneous tests");
test_case_aclf__beacon_period (test);
- test_case_aclf__timer (test);
}
diff --git a/cesar/bsu/src/bsu.c b/cesar/bsu/src/bsu.c
index 0f9dfa2559..4c76b1c245 100644
--- a/cesar/bsu/src/bsu.c
+++ b/cesar/bsu/src/bsu.c
@@ -599,7 +599,12 @@ bsu_timer_event_process (void *ud)
bsu_ca_schedules (ctx, ctx->sta_avln);
bsu_avln_countdown_beacon_entries_apply_changes (ctx, ctx->sta_avln);
bsu_avln_countdown_beacon_entries (ctx, ctx->sta_avln);
- bsu_reprogram_timer (ctx, bpsd[2]);
+ if (ctx->is_sta == BSU_UPDATE_STA_TYPE_STA)
+ bsu_aclf_shift_beacon_period_start_date (ctx->aclf);
+ else
+ bsu_aclf_ac_compute_beacon_period_start_date (ctx->aclf);
+ bsu_reprogram_timer (
+ ctx, bsu_aclf_beacon_period_start_date_next (ctx->aclf));
}
}
@@ -691,8 +696,7 @@ bsu_beacon_process__avln_tracked (bsu_t *ctx, bsu_beacon_t *beacon,
pbproc_rx_beacon_params_t *params,
u8 tei)
{
- u32 bpsd, i;
- bsu_aclf_beacon_period_start_date (ctx->aclf, &bpsd, 1);
+ u32 i;
/* Inform PBProc we received the central beacon. */
pbproc_beacon_detected (
ctx->pbproc, params->preamble_date
@@ -716,10 +720,6 @@ bsu_beacon_process__avln_tracked (bsu_t *ctx, bsu_beacon_t *beacon,
bsu_ca_schedules (ctx, ctx->sta_avln);
bsu_reprogram_timer (
ctx, bsu_aclf_beacon_period_start_date_next (ctx->aclf));
- BSU_TRACE (
- BEACON_PROCESS, phy_date (), params->snid, tei,
- ctx->sta_avln->sync.ntb_offset_tck,
- FIXED (ctx->sta_avln->sync.fe, BSU_NTB_FIXED_POINT));
BSU_TRACE (BEACON_DATA, params->bts, params->bto[0],
params->bto[1], params->bto[2]);
/* A discover beacon had been requested ? */
@@ -866,7 +866,6 @@ bsu_update (bsu_beacon_t *beacon, bsu_update_sta_type_t is_sta)
dbg_assert (beacon);
arch_dsr_lock ();
ctx->is_sta = is_sta;
- bsu_aclf_aclsc (ctx->aclf, is_sta != BSU_UPDATE_STA_TYPE_STA);
dbg_assert ((beacon->bmis.ps.nb
&& beacon->bmis.ps.ps[0].ns > 0)
|| beacon->bmis.nps.ns);
@@ -958,7 +957,6 @@ bsu_track_avln (u64 nid, u16 snid, u8 tei)
arch_dsr_lock ();
/* Station acts as STA now. */
ctx->is_sta = BSU_UPDATE_STA_TYPE_STA;
- bsu_aclf_aclsc (ctx->aclf, false);
ctx->nid_track = nid;
ctx->snid_track = snid;
ctx->tei_track = tei;
@@ -1004,9 +1002,9 @@ bsu_activate (bool status)
ctx->activate = status;
if (status)
{
- bsu_aclf_aclsc (ctx->aclf, true);
- bsu_aclf_activate (ctx->aclf, true);
/* Program the first schedules in the CA. */
+ bsu_aclf_acl_frequency_detection (ctx->aclf);
+ bsu_aclf_ac_compute_beacon_period_start_date (ctx->aclf);
bsu_ca_schedules (ctx, ctx->sta_avln);
bsu_reprogram_timer (
ctx, bsu_aclf_beacon_period_start_date_next (ctx->aclf));
@@ -1020,8 +1018,6 @@ bsu_activate (bool status)
bsu_ntb_init (&ctx->avlns[i].sync);
ctx->sta_avln = NULL;
ctx->avlns_nb = 0;
- bsu_aclf_aclsc (ctx->aclf, false);
- bsu_aclf_activate (ctx->aclf, false);
}
}
diff --git a/cesar/bsu/test/utest/src/schedules.c b/cesar/bsu/test/utest/src/schedules.c
index 3eb1c64782..5f440297e1 100644
--- a/cesar/bsu/test/utest/src/schedules.c
+++ b/cesar/bsu/test/utest/src/schedules.c
@@ -188,10 +188,12 @@ test_case_bsu_schedules_countdowns (test_t t)
memset (ca_alloc_get_schedule (INVALID_PTR, j), 0xff,
sizeof (ca_schedule_t));
/* station does not receive the last beacon. */
- ctx.bsu->sta_avln->beacon.beacon_period_start_date =
+ ctx.bsu->aclf->bpsd[0] =
+ ctx.bsu->sta_avln->beacon.beacon_period_start_date =
phy_date () - BSU_ACLF_BP_50HZ_TCK;
if (i != 1)
{
+ beacon.bmis.bpsto.bpsto = 0;
pb_beacon_t *b = bsu_beacon_write (
&beacon, BSU_BEACON_TYPE_CENTRAL, &ctx.mac_config, &bparams);
((pb_t *) b)->phy_pb.pb_rx.pb_measurement.crc_error = false;
@@ -260,7 +262,7 @@ test_case_ca_schedules_intellon (test_t test)
beacon.bmis.ps.ps[0].sais[0].glid = MAC_LID_SHARED_CSMA & 0x7f;
uint i;
for (i = 0; i < COUNT (t.bsu->aclf->bpsd); i++)
- t.bsu->aclf->bpsd[i] = i * BSU_ACLF_BP_50HZ_TCK;
+ t.bsu->aclf->bpsd[i] = i * BSU_ACLF_BP_50HZ_TCK - 10;
t.bsu->aclf->beacon_period = BSU_ACLF_BP_50HZ_TCK;
*((uint*) &t.bsu->aclf->bp) = BSU_ACLF_BP_50HZ_TCK;
pbproc_tx_beacon_params_t btx;
@@ -291,7 +293,7 @@ test_case_ca_schedules_intellon (test_t test)
t.bsu->sta_avln->beacon.bmis.ps.ps[0].sais[0].stpf == false);
u32 bpsd[4];
bsu_aclf_beacon_period_start_date (t.bsu->aclf, bpsd, COUNT (bpsd));
- for (i = 0; i < COUNT (bpsd); i++)
+ for (i = 1; i < COUNT (bpsd); i++)
test_fail_unless (brx.bts + i * BSU_ACLF_BP_50HZ_TCK == bpsd[i] +
t.bsu->sta_avln->sync.ntb_offset_tck);
blk_release_desc ((blk_t*) pbbeacon);
diff --git a/cesar/bsu/test/utest/src/tests.c b/cesar/bsu/test/utest/src/tests.c
index 85e47ec05d..deb64ad81c 100644
--- a/cesar/bsu/test/utest/src/tests.c
+++ b/cesar/bsu/test/utest/src/tests.c
@@ -57,8 +57,7 @@ bsu_test_init (bsu_test_t *ctx)
ctx->mac_config.sta_mac_address = 0x123456789abcull;
ctx->mac_store = mac_store_init ();
ctx->timer = hal_timer_init ();
- bsu_aclf_t *aclf = bsu_aclf_init ((phy_t*) &ctx->phy, &ctx->mac_config,
- ctx->timer);
+ bsu_aclf_t *aclf = bsu_aclf_init ((phy_t*) &ctx->phy, &ctx->mac_config);
ctx->bsu = bsu_init (aclf, &ctx->mac_config, (phy_t*) &ctx->phy,
ctx->mac_store, (ca_t*) &ctx->ca, (sar_t*) ctx,
ctx->timer, INVALID_PTR);
diff --git a/cesar/station/src/station.c b/cesar/station/src/station.c
index 491e9cfa03..0ca458229c 100644
--- a/cesar/station/src/station.c
+++ b/cesar/station/src/station.c
@@ -83,7 +83,7 @@ cesar_init (void)
/* Initialise the ACLF. */
cesar.bsu_aclf = bsu_aclf_init (pbproc_get_phy(cesar.pbproc),
- &cesar.mac_config, cesar.hal_timer);
+ &cesar.mac_config);
/* Initialise the bsu. */
cesar.bsu = bsu_init (cesar.bsu_aclf, &cesar.mac_config,
diff --git a/cesar/test_general/maximus/integration/interface-dp/src/station.c b/cesar/test_general/maximus/integration/interface-dp/src/station.c
index d7ee5ae8f9..6dd7d0d978 100644
--- a/cesar/test_general/maximus/integration/interface-dp/src/station.c
+++ b/cesar/test_general/maximus/integration/interface-dp/src/station.c
@@ -231,8 +231,7 @@ cyg_user_start (void)
pbproc_get_ca (station_test.pbproc),
station_test.mac_config.seed);
station_test.aclf = bsu_aclf_init (pbproc_get_phy (station_test.pbproc),
- &station_test.mac_config,
- station_test.hal_timer);
+ &station_test.mac_config);
station_test.bsu = bsu_init (station_test.aclf, &station_test.mac_config,
pbproc_get_phy (station_test.pbproc),
station_test.mac_store,