Change in osmo-bts[master]: gsm_lchan_interf_meas_calc_avg(): fix band calculation

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/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Nov 11 09:01:15 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/26128 )

Change subject: gsm_lchan_interf_meas_calc_avg(): fix band calculation
......................................................................

gsm_lchan_interf_meas_calc_avg(): fix band calculation

This patch makes osmo-bts bahave similar to ip.access nanoBTS.

Change-Id: I1bcc6d6ba154f82aef95d05fb9af0eab490923c9
Related: SYS#5313
---
M src/common/lchan.c
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/common/lchan.c b/src/common/lchan.c
index 29fd247..ec1b175 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -464,8 +464,11 @@
 	/* Calculate the average of all collected samples */
 	meas_avg = meas_sum / (int) meas_num;
 
-	/* Determine the band using interference boundaries from BSC */
-	for (b = 0; b < ARRAY_SIZE(bts->interference.boundary); b++) {
+	/* 3GPP TS 48.008 defines 5 interference bands, and 6 interference level
+	 * boundaries (0, X1, ... X5).  It's not clear how to handle values
+	 * exceeding the outer boundaries (0 or X5), because bands 0 and 6 do
+	 * not exist (sigh).  Let's map such values to closest bands 1 and 5. */
+	for (b = 1; b < ARRAY_SIZE(bts->interference.boundary) - 1; b++) {
 		if (meas_avg >= bts->interference.boundary[b])
 			break; /* Current 'b' is the band value */
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/26128
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1bcc6d6ba154f82aef95d05fb9af0eab490923c9
Gerrit-Change-Number: 26128
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211111/59f03d38/attachment.htm>


More information about the gerrit-log mailing list