[PATCH] osmo-bts[master]: measurement.c: Don't silently copy "FULL" measurements to "SUB"

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Feb 23 13:13:43 UTC 2018


Review at  https://gerrit.osmocom.org/6857

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
---
M src/common/measurement.c
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/57/6857/1

diff --git a/src/common/measurement.c b/src/common/measurement.c
index 1406fef..85c5515 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -425,8 +425,11 @@
 		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), "

-- 
To view, visit https://gerrit.osmocom.org/6857
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I358f7b97fd4ea19264a77eff7abef13da7d5fbcd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list