[PATCH] osmo-bts[master]: Check for suitable lchan type when detecting HO

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

Max gerrit-no-reply at lists.osmocom.org
Thu Mar 2 11:28:33 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1960

to look at the new patch set (#2).

Check for suitable lchan type when detecting HO

Log error when handover RACH is detected on wrong channel: according to
3GPP TS 44.018 it can only be seen on SACCH and DCCH.

Change-Id: Iacbcc8441d6cfbb8f808948a8baddde1ebca488a
Related: OS#1898
---
M src/common/handover.c
M tests/handover/handover_test.c
2 files changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/1960/2

diff --git a/src/common/handover.c b/src/common/handover.c
index 03433ea..45ed040 100644
--- a/src/common/handover.c
+++ b/src/common/handover.c
@@ -106,9 +106,17 @@
 		return;
 	}
 
+	/* Ignore handover on channels other than DCCH and SACCH */
+	if (lchan->type != GSM_LCHAN_SDCCH && lchan->type != GSM_LCHAN_TCH_H &&
+		lchan->type != GSM_LCHAN_TCH_F) {
+		LOGP(DHO, LOGL_ERROR, "%s handover RACH received on %s?!\n",
+		     gsm_lchan_name(lchan), gsm_lchant_name(lchan->type));
+		return;
+	}
+
 	LOGP(DHO, LOGL_NOTICE,
-		"%s RACH on dedicated channel received with TA=%u\n",
-		gsm_lchan_name(lchan), acc_delay);
+	     "%s RACH on dedicated channel type %s received with TA=%u, ref=%u\n",
+	     gsm_lchan_name(lchan), gsm_lchant_name(lchan->type), acc_delay, ra);
 
 	/* Set timing advance */
 	lchan->rqd_ta = acc_delay;
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index a7a66d0..611c441 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -103,8 +103,10 @@
 
 	/* create two lchans for handover */
 	lchan = &trx->ts[1].lchan[0];
+	lchan->type = GSM_LCHAN_SDCCH;
 	l1sap_chan_act(lchan->ts->trx, 0x09, NULL);
 	lchan = &trx->ts[2].lchan[0];
+	lchan->type = GSM_LCHAN_TCH_F;
 	lchan->ho.active = HANDOVER_ENABLED;
 	lchan->ho.ref = 23;
 	l1sap_chan_act(lchan->ts->trx, 0x0a, NULL);

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iacbcc8441d6cfbb8f808948a8baddde1ebca488a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list