diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-06-10 00:27:18 -0400 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-09-22 16:41:31 +0200 |
commit | 29ea40f5387c18a0aeb906039750bbf3a9828e7e (patch) | |
tree | 3c542ed610bceb1d29ecc536ee024592863bb20a /src | |
parent | e9abc5a4f33d8432d81ab896189b7492b07a05cf (diff) |
trx: Assume 100% BER if total decoded bits is 0 in l1if_process_meas_res()
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 6f8cd845..d0cf56d2 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -474,7 +474,8 @@ int l1if_process_meas_res(struct gsm_bts_trx *trx, uint8_t tn, uint32_t fn, uint { struct gsm_lchan *lchan = &trx->ts[tn].lchan[l1sap_chan2ss(chan_nr)]; struct osmo_phsap_prim l1sap; - float ber = (float)n_errors / (float)n_bits_total; + /* 100% BER is n_bits_total is 0 */ + float ber = n_bits_total==0 ? 1.0 : (float)n_errors / (float)n_bits_total; LOGP(DMEAS, LOGL_DEBUG, "RX L1 frame %s fn=%u chan_nr=0x%02x MS pwr=%ddBm rssi=%.1f dBFS " "ber=%.2f%% (%d/%d bits) L1_ta=%d rqd_ta=%d toa=%.2f\n", |