diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-06-10 00:27:18 -0400 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2015-07-17 13:51:54 +0300 |
commit | cefa52b42170032b2f2d6eca1ff63cb7d8030040 (patch) | |
tree | effe8e6a94911ff576895256154863a82dd4a1e1 | |
parent | c35c0cd6c8b055f9487661751866f437b34a8e3b (diff) |
trx: Assume 100% BER if total decoded bits is 0 in l1if_process_meas_res()
-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 e9d98a3e..24d21feb 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -477,7 +477,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", |