diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-23 14:06:27 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-26 15:01:08 +0100 |
commit | 0d6c3e811007be828207c0f69ff4e2dddeeb64db (patch) | |
tree | 99e78b2e96e684174c3bf5b4d32392f7a3a79e09 /src | |
parent | 3a80a56b9befe5f47cae5e4210ebc81d343b04f8 (diff) |
measurement.c: Don't silently copy "FULL" measurements to "SUB"
The existing code contained an ugly hack that if we didn't have any
"SUB" measurements we would simply use the "FULL" values. That's wrong
as TS 45.008 contains quite detailed rules on how the "SUB" values are
to be computed. In some cases, they are identical to "FULL", but in
most they are not.
Let's remove the hack and replace it with an ERROR message, as clearly
something is wrong if we ever encounter a measurement period end in
which no single "SUB" measurement was received. The only situation in
which this can occur is if the related uplink burst/block was missing,
so let's set BER to 100% and level to lowest possible.
Change-Id: I358f7b97fd4ea19264a77eff7abef13da7d5fbcd
Diffstat (limited to 'src')
-rw-r--r-- | src/common/measurement.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c index 87bd4db3..98d9403d 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -380,8 +380,11 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn) ber_sub_sum = ber_sub_sum / num_meas_sub; irssi_sub_sum = irssi_sub_sum / num_meas_sub; } else { - ber_sub_sum = ber_full_sum; - irssi_sub_sum = irssi_full_sum; + LOGP(DMEAS, LOGL_ERROR, "%s No measurements for SUB!!!\n", gsm_lchan_name(lchan)); + /* The only situation in which this can occur is if the related uplink burst/block was + * missing, so let's set BER to 100% and level to lowest possible. */ + ber_sub_sum = 10000; /* 100% */ + irssi_sub_sum = 120; /* -120 dBm */ } LOGP(DMEAS, LOGL_INFO, "%s Computed TA(% 4dqb) BER-FULL(%2u.%02u%%), RSSI-FULL(-%3udBm), " |