Change in osmo-bts[master]: part 4 of: fix SAPIs for handover, osmo-bts-lc15

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

neels gerrit-no-reply at lists.osmocom.org
Sat Nov 21 21:03:00 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/21277 )


Change subject: part 4 of: fix SAPIs for handover, osmo-bts-lc15
......................................................................

part 4 of: fix SAPIs for handover, osmo-bts-lc15

Change-Id: I2ac6b0d498edb8facfac4feea7fccbba725d16e8
---
M src/osmo-bts-lc15/oml.c
1 file changed, 15 insertions(+), 17 deletions(-)



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

diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c
index 70be419..eb506da 100644
--- a/src/osmo-bts-lc15/oml.c
+++ b/src/osmo-bts-lc15/oml.c
@@ -655,10 +655,6 @@
 #endif
 };
 
-static const struct sapi_dir ho_sapis[] = {
-	{ GsmL1_Sapi_Rach,	GsmL1_Dir_RxUplink },
-};
-
 struct lchan_sapis {
 	const struct sapi_dir *sapis;
 	unsigned int num_sapis;
@@ -691,11 +687,6 @@
 	},
 };
 
-static const struct lchan_sapis sapis_for_ho = {
-	.sapis = ho_sapis,
-	.num_sapis = ARRAY_SIZE(ho_sapis),
-};
-
 static int mph_send_activate_req(struct gsm_lchan *lchan, struct sapi_cmd *cmd);
 static int mph_send_deactivate_req(struct gsm_lchan *lchan, struct sapi_cmd *cmd);
 static int mph_send_config_ciphering(struct gsm_lchan *lchan, struct sapi_cmd *cmd);
@@ -1168,10 +1159,10 @@
 			"%s Trying to activate lchan, but commands in queue\n",
 			gsm_lchan_name(lchan));
 
-	/* override the regular SAPIs if this is the first hand-over
-	 * related activation of the LCHAN */
+	/* For handover, always start the main channel immediately. lchan->dl_sacch.want_active indicates whether dl
+	 * SACCH should be activated. Also, for HO, start the RACH SAPI. */
 	if (lchan->ho.active == HANDOVER_ENABLED)
-		s4l = &sapis_for_ho;
+		enqueue_sapi_act_cmd(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink);
 
 	for (i = 0; i < s4l->num_sapis; i++) {
 		int sapi = s4l->sapis[i].sapi;
@@ -1184,6 +1175,14 @@
 			fl1h->alive_prim_cnt = 0;
 			osmo_timer_schedule(&fl1h->alive_timer, 5, 0);
 		}
+
+		/* For handover, possibly postpone activating the dl SACCH until the HO RACH is received. */
+		if (sapi == GsmL1_Sapi_Sacch && dir == GsmL1_Dir_TxDownlink) {
+			if (!lchan->dl_sacch.want_active)
+				continue;
+			else
+				lchan->dl_sacch.activated = true;
+		}
 		enqueue_sapi_act_cmd(lchan, sapi, dir);
 	}
 
@@ -1996,11 +1995,10 @@
 	/* Give up listening to RACH bursts */
 	release_sapi_ul_rach(lchan);
 
-	/* Activate the normal SAPIs */
-	for (i = 0; i < s4l->num_sapis; i++) {
-		int sapi = s4l->sapis[i].sapi;
-		int dir = s4l->sapis[i].dir;
-		enqueue_sapi_act_cmd(lchan, sapi, dir);
+	/* All the normal SAPIs have already been activated, only DL SACCH may still be missing. */
+	if (lchan->dl_sacch.want_active) {
+		enqueue_sapi_act_cmd(lchan, GsmL1_Sapi_Sacch, GsmL1_Dir_TxDownlink);
+		lchan->dl_sacch.activated = true;
 	}
 
 	return 0;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2ac6b0d498edb8facfac4feea7fccbba725d16e8
Gerrit-Change-Number: 21277
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201121/8009b06d/attachment.htm>


More information about the gerrit-log mailing list