Change in osmo-bts[master]: part 1 of: fix SAPIs for handover to match 48.058 4.1.{3, 4}

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 26 09:22:38 UTC 2020


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

Change subject: part 1 of: fix SAPIs for handover to match 48.058 4.1.{3,4}
......................................................................

part 1 of: fix SAPIs for handover to match 48.058 4.1.{3,4}

This part adds the common lchan flags to indicate whether DL SACCH
should be activated.

Note that currently, osmo-bsc *always* sends the MS Power IE as well as
the TA IE, also for inter-cell HO, so in the osmoverse, nothing will
change until we also adjust osmo-bsc. See OS#4858.

Change-Id: Ibea973ccadf5d424213f141f97a61395856b76de
---
M include/osmo-bts/gsm_data.h
M src/common/handover.c
M src/common/rsl.c
3 files changed, 31 insertions(+), 0 deletions(-)

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



diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 1c1c5d4..7670508 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -194,6 +194,22 @@
 
 	char *name;
 
+	/* For handover, activation is described in 3GPP TS 48.058 4.1.3 and 4.1.4:
+	 *
+	 *          |          | Access ||  transmit         |  activate
+	 *          | MS Power | Delay  ||  on main channel  |  dl SACCH
+	 * ----------------------------------------------------------------------
+	 * async ho   no         *     -->  yes                 no
+	 * async ho   yes        *     -->  yes                 may be started
+	 * sync ho    no         no    -->  yes                 no
+	 * sync ho    yes        no    -->  yes                 may be started
+	 * sync ho    yes        yes   -->  yes                 shall be started
+	 *
+	 * Always start the main channel immediately.
+	 * want_dl_sacch_active indicates whether dl SACCH should be activated on CHAN ACT.
+	 */
+	bool want_dl_sacch_active;
+
 	/* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23.
 	 * Currently we don't share these headers so this is a magic number. */
 	struct llist_head sapi_cmds;
diff --git a/src/common/handover.c b/src/common/handover.c
index b615932..888649d 100644
--- a/src/common/handover.c
+++ b/src/common/handover.c
@@ -112,6 +112,7 @@
 
 	/* Set timing advance */
 	lchan->rqd_ta = acc_delay;
+	lchan->want_dl_sacch_active = true;
 
 	/* Stop handover detection, wait for valid frame */
 	lchan->ho.active = HANDOVER_WAIT_FRAME;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index cb9c19b..a0c1fb2 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1095,6 +1095,7 @@
 	struct tlv_parsed tp;
 	uint8_t type;
 	int rc;
+	bool ms_power_present = false;
 
 	if (lchan->state != LCHAN_S_NONE) {
 		LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n",
@@ -1188,6 +1189,7 @@
 	if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) {
 		lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F;
 		lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
+		ms_power_present = true;
 	}
 	/* 9.3.24 Timing Advance */
 	if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
@@ -1310,6 +1312,18 @@
 		return 0;
 	}
 
+	/* Indicate which SAPIs should be enabled before the first RACH is received, for handover. See 3GPP TS 48.058
+	 * 4.1.3 and 4.1.4. */
+	switch (type) {
+	case RSL_ACT_INTER_ASYNC:
+	case RSL_ACT_INTER_SYNC:
+		lchan->want_dl_sacch_active = ms_power_present;
+		break;
+	default:
+		lchan->want_dl_sacch_active = true;
+		break;
+	}
+
 	/* Remember to send an RSL ACK once the lchan is active */
 	lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
 

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibea973ccadf5d424213f141f97a61395856b76de
Gerrit-Change-Number: 21078
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr 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/20201126/d1be24ee/attachment.htm>


More information about the gerrit-log mailing list