Change in osmocom-bb[master]: l1ctl: preserve TS configuration for HR channels

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
Thu May 7 09:59:24 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/18095 )


Change subject: l1ctl: preserve TS configuration for HR channels
......................................................................

l1ctl: preserve TS configuration for HR channels

When L1CTL_DM_EST_REQ is received, the respective timeslot is
reconfigured to the requested channel type (TCH/H or TCH/F). The
reconfiguration is done every time, an existing timeslot configuration
including the lchans is overwritten. This works fine with all channel
types that exclusively use the timeslot. But in the case of a TCH/H a
single timeslot is shared by two independed channels, so if we see that
the timeslot we intend to configure as TCH/H is already configured as
TCH/H, we must leave the the configuration as it is in order not to
disturb the other TCH/H

Change-Id: I3ac0ae22c40e3cb99c44f1156000c6909f739ad4
Related: OS#4365
---
M src/host/trxcon/l1ctl.c
1 file changed, 16 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/18095/1

diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 04325bc..17bd698 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -658,11 +658,23 @@
 	l1l->trx->tsc = est_req->tsc;
 
 	/* Configure requested TS */
-	rc = sched_trx_configure_ts(l1l->trx, tn, config);
+	/* NOTE: When (re)configuring a timeslot for TCH/H we need to be
+	 * careful not to disturb an already existing HR channel.
+	 * sched_trx_configure_ts() resets the TS configuration, including
+	 * all lchans completely. This is safe for all types uses, except
+	 * for HR, where two independed channels share one timeslot. So
+	 * if we see that the TS is already set up for HR and the channel
+	 * we intend to set up is HR too, we leave the TS configuration
+	 * as it is. */
 	ts = l1l->trx->ts_list[tn];
-	if (rc) {
-		rc = -EINVAL;
-		goto exit;
+	if (ts == NULL || config != GSM_PCHAN_TCH_H
+	    || ts->mf_layout->chan_config != GSM_PCHAN_TCH_H) {
+		rc = sched_trx_configure_ts(l1l->trx, tn, config);
+		if (rc) {
+			rc = -EINVAL;
+			goto exit;
+		}
+		ts = l1l->trx->ts_list[tn];
 	}
 
 	/* Activate only requested lchans */

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3ac0ae22c40e3cb99c44f1156000c6909f739ad4
Gerrit-Change-Number: 18095
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200507/15e7817a/attachment.htm>


More information about the gerrit-log mailing list