[MERGED] osmo-bts[master]: osmo-bts-sysmo: Include frame number in MEAS IND

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
Mon May 29 16:46:45 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: osmo-bts-sysmo: Include frame number in MEAS IND
......................................................................


osmo-bts-sysmo: Include frame number in MEAS IND

l1_if.c does not generate struct osmo_phsap_prim l1sap properly.
The (logical) frame number is not included in this struct. This
renders the logic that processes the reported measurements non
functional, since the logic (see measurement.c) is no longer
able to detect the end of the measurement period.

This commit fixes the problem by adding the missing frame number
to the l1sap structure.

Change-Id: I2bab40c30d727395eb3096026810917407419cd7
---
M src/osmo-bts-sysmo/l1_if.c
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index ea7fc93..8820f08 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -897,7 +897,7 @@
 }
 
 static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr,
-				GsmL1_MeasParam_t *m)
+			    uint32_t fn, GsmL1_MeasParam_t *m)
 {
 	struct osmo_phsap_prim l1sap;
 	memset(&l1sap, 0, sizeof(l1sap));
@@ -908,6 +908,11 @@
 	l1sap.u.info.u.meas_ind.ta_offs_qbits = m->i16BurstTiming;
 	l1sap.u.info.u.meas_ind.ber10k = (unsigned int) (m->fBer * 100);
 	l1sap.u.info.u.meas_ind.inv_rssi = (uint8_t) (m->fRssi * -1);
+
+	/* The MEAS IND data structure expects a logical frame number. On the
+	 * physical radio link, the uplink is delayed by 3 timeslots, we need
+	 * to compensate for that delay. */
+	l1sap.u.info.u.meas_ind.fn = fn + 3;
 
 	/* l1sap wants to take msgb ownership.  However, as there is no
 	 * msg, it will msgb_free(l1sap.oph.msg == NULL) */
@@ -936,7 +941,7 @@
 	fn = data_ind->u32Fn;
 	link_id =  (data_ind->sapi == GsmL1_Sapi_Sacch) ? LID_SACCH : LID_DEDIC;
 
-	process_meas_res(trx, chan_nr, &data_ind->measParam);
+	process_meas_res(trx, chan_nr, fn, &data_ind->measParam);
 
 	if (data_ind->measParam.fLinkQuality < btsb->min_qual_norm
 	 && data_ind->msgUnitParam.u8Size != 0) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bab40c30d727395eb3096026810917407419cd7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list