aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/measurement.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-01-15 11:01:24 +0100
committerlaforge <laforge@osmocom.org>2020-01-20 14:33:49 +0000
commita0403d3769d3027639e35874c09808ce5c0ba860 (patch)
tree2cce8edf58ad8fd11864475886b5028d4d0e1570 /src/common/measurement.c
parente7d835ca8c704f7cd256702a31a15b79824e21a4 (diff)
ta_control: move timing advance code from osmo-bts-trx to common
The timing advance controller that is implemented in loops.c of osmo-bts-trx only works for osmo-bts-trx and not for any of the phy based bts. Lets move the timing advance controller into the common part and make it available for every bts. Also lets add a unit-test. Change-Id: If7ddf74db3abc9b9872abe620a0aeebe3327e70a Related: SYS#4567
Diffstat (limited to 'src/common/measurement.c')
-rw-r--r--src/common/measurement.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c
index 3e0daf19..ddc17474 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -10,6 +10,7 @@
#include <osmo-bts/measurement.h>
#include <osmo-bts/scheduler.h>
#include <osmo-bts/rsl.h>
+#include <osmo-bts/ta_control.h>
/* Tables as per TS 45.008 Section 8.3 */
static const uint8_t ts45008_83_tch_f[] = { 52, 53, 54, 55, 56, 57, 58, 59 };
@@ -696,6 +697,11 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
lchan_meas_compute_extended(lchan);
+ /* Compute new ta_req value. This has to be done here since the value
+ * in lchan->meas.num_ul_meas together with lchan->meas.ms_toa256
+ * is needed for the computation. */
+ lchan_ms_ta_ctrl(lchan);
+
lchan->meas.num_ul_meas = 0;
/* return 1 to indicate that the computation has been done and the next