aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-10-22 17:02:45 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-10-26 15:11:27 +0100
commit44fc252381ebd61de080dcd36e87c0af0a0742c5 (patch)
tree959a5e46fdd22695023f732aeeba0364e0f639cf
parent1325443dc32d3dd8b07bb943ba1db98ba7b7cbb6 (diff)
sched_lchan_tchf: count measurements for FACCH/F only once
When the FACCH is generated (while in SPEECH mode), there is also a fake speech indication handed up to l1sap.c. We must make sure that only one of the two indications carry a measurement value, so lets invalidate the measurement values (RSSI in particular) for the generated TCH indication. Change-Id: Ie3f2e620ba2a2ab2fecdbae627ef01c6128fce0b Related: OS#4799
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 9c5bfc22..b1453dc0 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -241,6 +241,16 @@ int rx_tchf_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
meas_avg.rssi, meas_avg.toa256,
meas_avg.ci_cb, ber10k,
PRES_INFO_UNKNOWN);
+
+ /* If we are in SPEECH mode we will generate a fake (BFI) TCH
+ * indication as well. This indication is needed by the higher
+ * layers, however we already have reported the measurement
+ * result for the current block together with the FACCH.
+ * To avoid reporting the same measurement result again with
+ * the fake (BFI) TCH indication we set meas_avg.rssi to zero.
+ * Doing so tells l1sap.c to ignore the measurement result. */
+ meas_avg.rssi = 0;
+
bfi:
if (rsl_cmode == RSL_CMOD_SPD_SPEECH) {
/* indicate bad frame */