fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27553 )
Change subject: osmo-bts-trx: rx_{tchf,tchh}_fn(): also use meas_avg for BFI ......................................................................
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 --- M src/osmo-bts-trx/sched_lchan_tchf.c M src/osmo-bts-trx/sched_lchan_tchh.c 2 files changed, 4 insertions(+), 10 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index 0388ec0..c6c5532 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -302,11 +302,8 @@ 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 e97adbd..3a66321 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -350,11 +350,8 @@ 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).