summaryrefslogtreecommitdiff
path: root/cesar/bsu/ntb
diff options
context:
space:
mode:
authorNicolas Schodet2011-08-17 14:58:30 +0200
committerNicolas Schodet2011-09-08 16:22:56 +0200
commitb5eaec6151f503e194cba549b46f877a34ee89fa (patch)
treee71e38dad138250575ae8a7d0e74f059c92843cb /cesar/bsu/ntb
parentd8bf835826891120685d2976e734327e122ee755 (diff)
cesar/bsu: remove unused phy parameter
Diffstat (limited to 'cesar/bsu/ntb')
-rw-r--r--cesar/bsu/ntb/ntb.h5
-rw-r--r--cesar/bsu/ntb/src/ntb.c12
-rw-r--r--cesar/bsu/ntb/test/utest/src/ntb_compute.c16
3 files changed, 14 insertions, 19 deletions
diff --git a/cesar/bsu/ntb/ntb.h b/cesar/bsu/ntb/ntb.h
index ce01f409da..cd8dc08426 100644
--- a/cesar/bsu/ntb/ntb.h
+++ b/cesar/bsu/ntb/ntb.h
@@ -24,14 +24,13 @@ BEGIN_DECLS
* Synchronize local clock to be as close as possible to estimated value
* of the NTB clock reference.
* \param ctx the module context data.
- * \param phy the phy context.
* \param beacon_bts beacon time stamp
* \param beacon_sta_ltmr STA local time captured when receiving beacon
* \param weight_k the coefficient weight to use to smooth the NTB clock
*/
void
-bsu_ntb_clk_sync (bsu_ntb_sync_t * ctx, phy_t *phy, u32 beacon_bts,
- u32 beacon_sys_ltmr, u32 beacon_sta_ltmr, uint weight_k);
+bsu_ntb_clk_sync (bsu_ntb_sync_t * ctx, u32 beacon_bts, u32 beacon_sys_ltmr,
+ u32 beacon_sta_ltmr, uint weight_k);
/**
* Configure the clock frequency.
diff --git a/cesar/bsu/ntb/src/ntb.c b/cesar/bsu/ntb/src/ntb.c
index a78a1999d1..3cb4574b46 100644
--- a/cesar/bsu/ntb/src/ntb.c
+++ b/cesar/bsu/ntb/src/ntb.c
@@ -61,7 +61,6 @@ bsu_ntb_frequency_error (bsu_ntb_sync_t *ctx, double freq_err, u32 bts,
/** Compute the current offset from the NTB clock and the phy clock.
* \param ctx module context.
- * \param phy the phy context.
* \param freq_error last frequency error computed.
* \param bts the last beacon time stamp received in the last beacon.
* \param preamble_stadata the sta date preamble corresponding to the last
@@ -70,8 +69,8 @@ bsu_ntb_frequency_error (bsu_ntb_sync_t *ctx, double freq_err, u32 bts,
* last beacon received.
*/
PRIVATE u32
-bsu_ntb_offset (bsu_ntb_sync_t *ctx, phy_t *phy, double freq_error,
- u32 bts, u32 preamble_stadate, u32 preamble_sysdate)
+bsu_ntb_offset (bsu_ntb_sync_t *ctx, double freq_error, u32 bts,
+ u32 preamble_stadate, u32 preamble_sysdate)
{
u32 offset;
dbg_assert (ctx);
@@ -107,12 +106,11 @@ bsu_ntb_uninit (bsu_ntb_sync_t *ctx)
}
void
-bsu_ntb_clk_sync (bsu_ntb_sync_t * ctx, phy_t *phy, u32 beacon_bts,
- u32 beacon_sys_ltmr, u32 beacon_sta_ltmr, uint weight_k)
+bsu_ntb_clk_sync (bsu_ntb_sync_t * ctx, u32 beacon_bts, u32 beacon_sys_ltmr,
+ u32 beacon_sta_ltmr, uint weight_k)
{
double freq_error;
dbg_assert (ctx);
- dbg_assert (phy);
freq_error = ctx->fe;
/**
* Check the beacon received is not received N MS after the previous one,
@@ -133,7 +131,7 @@ bsu_ntb_clk_sync (bsu_ntb_sync_t * ctx, phy_t *phy, u32 beacon_bts,
ctx->second_shoot = false;
}
}
- ctx->ntb_offset_tck= bsu_ntb_offset (ctx, phy, freq_error, beacon_bts,
+ ctx->ntb_offset_tck= bsu_ntb_offset (ctx, freq_error, beacon_bts,
beacon_sta_ltmr, beacon_sys_ltmr);
ctx->preamble_sysdate = beacon_sys_ltmr;
ctx->preamble_stadate = beacon_sta_ltmr;
diff --git a/cesar/bsu/ntb/test/utest/src/ntb_compute.c b/cesar/bsu/ntb/test/utest/src/ntb_compute.c
index 618563212f..f2a8f266ab 100644
--- a/cesar/bsu/ntb/test/utest/src/ntb_compute.c
+++ b/cesar/bsu/ntb/test/utest/src/ntb_compute.c
@@ -77,8 +77,8 @@ test_case_ntb_ntb_sync (test_t test, bsu_ntb_test_type_t type)
t.phy.sys_date = t.phy.preamble_sysdate + delay_systck[i];
/* In this test the sys_date_preamble is the same as the station
* date preamble. */
- bsu_ntb_clk_sync (&sync, (phy_t*) &t.phy, bts[i],
- preamble_sysdate[i], preamble_stadate[i], 2);
+ bsu_ntb_clk_sync (&sync, bts[i], preamble_sysdate[i],
+ preamble_stadate[i], 2);
test_fail_unless (ABS(sync.fe - freqerr[i]) < 1.0e-12,
"Freq different in loop %d", i);
test_fail_unless (sync.ntb_offset_tck == offset[i],
@@ -117,8 +117,7 @@ test_case_freq_error (test_t test)
sync.preamble_sysdate = 0x6f04181;
sync.preamble_stadate = 0x6f04181;
/* Compute new Frequency error. */
- bsu_ntb_clk_sync (&sync, (phy_t*) &t.phy, 0x21e04ad,
- 0x1ddf30d3, 0x1ddf30d3, 2);
+ bsu_ntb_clk_sync (&sync, 0x21e04ad, 0x1ddf30d3, 0x1ddf30d3, 2);
test_fail_unless (sync.fe == 0);
test_fail_unless (sync.init == true);
test_fail_unless (sync.second_shoot == false);
@@ -133,8 +132,8 @@ test_case_freq_error (test_t test)
sync.preamble_sysdate = 0x6f04181;
sync.preamble_stadate = 0x6f04181;
/* Compute new Frequency error. */
- bsu_ntb_clk_sync (&sync, (phy_t*) &t.phy, sync.bts + 1,
- sync.preamble_sysdate + 1, 0x1ddf30d3, 2);
+ bsu_ntb_clk_sync (&sync, sync.bts + 1, sync.preamble_sysdate + 1,
+ 0x1ddf30d3, 2);
test_fail_unless (sync.fe == 0);
test_fail_unless (sync.init == true);
test_fail_unless (sync.second_shoot == false);
@@ -158,9 +157,8 @@ test_case_freq_error (test_t test)
scmp.preamble_sysdate = sync.preamble_sysdate + MAC_MS_TO_TCK (500);
scmp.preamble_stadate = sync.preamble_stadate + MAC_MS_TO_TCK (500);
/* Compute new Frequency error. */
- bsu_ntb_clk_sync (
- &sync, (phy_t*) &t.phy, scmp.bts, scmp.preamble_sysdate,
- scmp.preamble_stadate, 2);
+ bsu_ntb_clk_sync (&sync, scmp.bts, scmp.preamble_sysdate,
+ scmp.preamble_stadate, 2);
test_fail_unless (sync.fe == scmp.fe);
test_fail_unless (scmp.bts == sync.bts);
test_fail_unless (scmp.preamble_sysdate == sync.preamble_sysdate);