aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-18 02:56:04 +0300
committerfixeria <vyanitskiy@sysmocom.de>2022-04-05 13:45:31 +0000
commitb8b60664504783b999102acdc82c5dd73d0d4452 (patch)
tree2f1e622986ca3e62d1ec65ce1105a1c5b094c5c4 /src
parentda433bba7b70cccd8990ed530593efee4b197470 (diff)
osmo-bts-trx: rx_{tchf,tchh}_fn(): also use meas_avg for BFI
In the current implementation of both TCH/F and TCH/H lchans, we set the 'bfi_flag' to true only if decoding fails. Perhaps this was not the case when I wrote [1], so using meas_avg might result in using uninitialized memory. This is not the case anymore. Pass the *averaged* measurememnts regardless of decoding result. Change-Id: I23f767364a018d30d04885990adf69b50b2c9738 Related: [1] I2b02b51fea5664f161382a4ddc63dbf14ffc9ac5
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c7
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 0388ec07..c6c5532b 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -302,11 +302,8 @@ bfi:
compose_l1sap:
fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_TCH_F);
return _sched_compose_tch_ind(l1ts, fn_begin, bi->chan, tch_data, rc,
- /* FIXME: what should we use for BFI here? */
- bfi_flag ? bi->toa256 : meas_avg.toa256, ber10k,
- bfi_flag ? bi->rssi : meas_avg.rssi,
- bfi_flag ? bi->ci_cb : meas_avg.ci_cb,
- is_sub);
+ meas_avg.toa256, ber10k, meas_avg.rssi,
+ meas_avg.ci_cb, is_sub);
}
/* common section for generation of TCH bursts (TCH/H and TCH/F).
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index e97adbd3..3a663214 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -350,11 +350,8 @@ compose_l1sap:
fn_begin = gsm0502_fn_remap(fn_tch_end, FN_REMAP_TCH_H1);
return _sched_compose_tch_ind(l1ts, fn_begin, bi->chan, tch_data, rc,
- /* FIXME: what should we use for BFI here? */
- bfi_flag ? bi->toa256 : meas_avg.toa256, ber10k,
- bfi_flag ? bi->rssi : meas_avg.rssi,
- bfi_flag ? bi->ci_cb : meas_avg.ci_cb,
- is_sub);
+ meas_avg.toa256, ber10k, meas_avg.rssi,
+ meas_avg.ci_cb, is_sub);
}
/* common section for generation of TCH bursts (TCH/H and TCH/F).