From f1efd727fb97c63037942e4a962315f381373a6d Mon Sep 17 00:00:00 2001 From: Harld Welte Date: Sun, 22 Mar 2020 12:22:12 +0000 Subject: trx: Fix reported BER for TCH/H This fixes a regression introduced in I710d0b7cf193afa8515807836ee69b8b7db84a84 We (obviously!) cannot compute the BER before performing convolutional decoding. Change-Id: I4e57f45d49cb513e4843e56f50c8de6980958fdc Related: OS#2977 Related: OS#4667 --- src/osmo-bts-trx/scheduler_trx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d703f7f1..585e8872 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1375,13 +1375,12 @@ int rx_tchh_fn(struct l1sched_trx *l1t, enum trx_chan_type chan, } *mask = 0x0; - ber10k = compute_ber10k(n_bits_total, n_errors); - /* skip second of two TCH frames of FACCH was received */ if (chan_state->ul_ongoing_facch) { chan_state->ul_ongoing_facch = 0; memcpy(*bursts_p, *bursts_p + 232, 232); memcpy(*bursts_p + 232, *bursts_p + 464, 232); + ber10k = 0; goto bfi; } @@ -1428,6 +1427,8 @@ int rx_tchh_fn(struct l1sched_trx *l1t, enum trx_chan_type chan, } memcpy(*bursts_p, *bursts_p + 232, 232); memcpy(*bursts_p + 232, *bursts_p + 464, 232); + ber10k = compute_ber10k(n_bits_total, n_errors); + /* Check if the frame is bad */ if (rc < 0) { -- cgit v1.2.3