From 44fc252381ebd61de080dcd36e87c0af0a0742c5 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 22 Oct 2020 17:02:45 +0200 Subject: 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 --- src/osmo-bts-trx/sched_lchan_tchf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 */ -- cgit v1.2.3