summaryrefslogtreecommitdiff
path: root/cesar/bsu/ntb
diff options
context:
space:
mode:
authorNicolas Schodet2011-08-17 11:44:43 +0200
committerNicolas Schodet2011-09-08 16:22:56 +0200
commitd8bf835826891120685d2976e734327e122ee755 (patch)
tree669b94773fdd83d61ed099f426c741790d5282c6 /cesar/bsu/ntb
parent5abe923a4e56cb5627eb0c378f67939b5565eef9 (diff)
cesar/bsu/ntb: remove unused delay_systck field
Diffstat (limited to 'cesar/bsu/ntb')
-rw-r--r--cesar/bsu/ntb/ntb_sync.h2
-rw-r--r--cesar/bsu/ntb/src/ntb.c10
-rw-r--r--cesar/bsu/ntb/test/utest/src/ntb_compute.c1
3 files changed, 4 insertions, 9 deletions
diff --git a/cesar/bsu/ntb/ntb_sync.h b/cesar/bsu/ntb/ntb_sync.h
index e515ab3897..9bdf7ad93a 100644
--- a/cesar/bsu/ntb/ntb_sync.h
+++ b/cesar/bsu/ntb/ntb_sync.h
@@ -36,8 +36,6 @@ struct bsu_ntb_sync_t
u32 sta_numerator;
/** NTB clock tick offset. */
u32 ntb_offset_tck;
- /** Delay before processing the beacon. */
- u32 delay_systck;
};
typedef struct bsu_ntb_sync_t bsu_ntb_sync_t;
diff --git a/cesar/bsu/ntb/src/ntb.c b/cesar/bsu/ntb/src/ntb.c
index fe4a49a7f0..a78a1999d1 100644
--- a/cesar/bsu/ntb/src/ntb.c
+++ b/cesar/bsu/ntb/src/ntb.c
@@ -78,11 +78,10 @@ bsu_ntb_offset (bsu_ntb_sync_t *ctx, phy_t *phy, double freq_error,
offset = bts - preamble_stadate;
if (ctx->init)
{
- /* Get the delay in system ticks. */
- ctx->delay_systck = phy_sysdate () - preamble_sysdate;
- dbg_assert ((s32) ctx->delay_systck >= 0);
- offset += ((ctx->fe * ctx->delay_systck)
- - (freq_error * ctx->delay_systck));
+ /* Add offset for the update delay. */
+ int delay_systck = phy_sysdate () - preamble_sysdate;
+ dbg_assert (delay_systck >= 0);
+ offset += ctx->fe * delay_systck - freq_error * delay_systck;
}
return offset;
}
@@ -99,7 +98,6 @@ bsu_ntb_init (bsu_ntb_sync_t *ctx)
ctx->preamble_stadate = 0;
ctx->sta_numerator = 0;
ctx->ntb_offset_tck = 0;
- ctx->delay_systck = 0;
}
void
diff --git a/cesar/bsu/ntb/test/utest/src/ntb_compute.c b/cesar/bsu/ntb/test/utest/src/ntb_compute.c
index 19745c4c65..618563212f 100644
--- a/cesar/bsu/ntb/test/utest/src/ntb_compute.c
+++ b/cesar/bsu/ntb/test/utest/src/ntb_compute.c
@@ -71,7 +71,6 @@ test_case_ntb_ntb_sync (test_t test, bsu_ntb_test_type_t type)
sync.bts = bts[0];
sync.preamble_sysdate = preamble_sysdate[0];
sync.preamble_stadate = preamble_stadate[0];
- sync.delay_systck = delay_systck [0];
for (i = 1; i < bts_nb; i++)
{
t.phy.preamble_sysdate = preamble_sysdate[i];