[PATCH] osmo-bts[master]: osmo-bts-octphy: normalize 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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Jun 9 15:11:01 UTC 2017


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

osmo-bts-octphy: normalize frame number in MEAS IND

The higher layers will no longer care for the alignment of the frame number
in order to detect when a measurement period ends. This patch normalizes the
frame number directly in the measurement indication so that the higher layers
can detect the end of a measurement period properly.

Change-Id: I0d369ff9e6da34f4bd98afd3c5d030cac73e54c0
---
M src/osmo-bts-octphy/l1_if.c
1 file changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c
index 042ecc3..24a8646 100644
--- a/src/osmo-bts-octphy/l1_if.c
+++ b/src/osmo-bts-octphy/l1_if.c
@@ -792,7 +792,7 @@
  ***********************************************************************/
 
 static void process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr,
-			     uint32_t fn, uint32_t data_len,
+			     uint8_t sc, uint32_t fn, uint32_t data_len,
 			     tOCTVC1_GSM_MEASUREMENT_INFO * m)
 {
 	struct osmo_phsap_prim l1sap;
@@ -830,6 +830,12 @@
 
 	/* copy logical frame number to MEAS IND data structure */
 	l1sap.u.info.u.meas_ind.fn = fn;
+
+	/* Align frame number with measurement period ends */
+	if (sc == 0)
+		l1sap.u.info.u.meas_ind.fn += 2; /* tchh0 */
+	else
+		l1sap.u.info.u.meas_ind.fn += 1; /* tchh1 and tchf */
 
 	/* l1sap wants to take msgb ownership.  However, as there is no
 	 * msg, it will msgb_free(l1sap.oph.msg == NULL) */
@@ -1035,7 +1041,7 @@
 	memset(&l1sap, 0, sizeof(l1sap));
 
 	/* uplink measurement */
-	process_meas_res(trx, chan_nr, fn, data_ind->Data.ulDataLength,
+	process_meas_res(trx, chan_nr, sc, fn, data_ind->Data.ulDataLength,
 			 &data_ind->MeasurementInfo);
 
 	/* FIXME: check min_qual_norm! */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d369ff9e6da34f4bd98afd3c5d030cac73e54c0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list