[MERGED] osmo-bts[master]: dyn TS: be less strict on chan_nr, to allow arbitrary pchan ...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 10 10:12:28 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: dyn TS: be less strict on chan_nr, to allow arbitrary pchan switches
......................................................................


dyn TS: be less strict on chan_nr, to allow arbitrary pchan switches

To allow switching a dyn TS also between TCH/H <-> TCH/F and anything else,
don't thwart RSL messages just because their chan_nr doesn't reflect the
current pchan mode. For dyn TS, leave that to message handling.

In particular, a TS switch is invoked by a Chan Activ message, in which case
the current pchan by definition mismatches the incoming chan_nr's reflected
channel type.

With this patch, I have tested successful direct TCH/H<->TCH/F switchover on
sysmoBTS, with osmo-bsc patch I72d5d833b186b1e1925d513885b405d8c19aa496 (and
'msc'/'codec-list' vty config to change TCH kinds while gprs mode was none).

Change-Id: I19e5e509101ec91204de9baff04582d99bc8dcb8
---
M src/common/gsm_data_shared.c
1 file changed, 4 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c
index 328b57e..2a1f9c8 100644
--- a/src/common/gsm_data_shared.c
+++ b/src/common/gsm_data_shared.c
@@ -716,19 +716,13 @@
 		lch_idx = 0;	/* TCH/F */	
 		if (ts->pchan != GSM_PCHAN_TCH_F &&
 		    ts->pchan != GSM_PCHAN_PDCH &&
-		    ts->pchan != GSM_PCHAN_TCH_F_PDCH
-		    && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
-			 && (ts->dyn.pchan_is == GSM_PCHAN_TCH_F
-			     || ts->dyn.pchan_is == GSM_PCHAN_NONE
-			     || ts->dyn.pchan_want == GSM_PCHAN_TCH_F)))
+		    ts->pchan != GSM_PCHAN_TCH_F_PDCH &&
+		    ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
 			ok = false;
 	} else if ((cbits & 0x1e) == 0x02) {
 		lch_idx = cbits & 0x1;	/* TCH/H */
-		if (ts->pchan != GSM_PCHAN_TCH_H
-		    && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
-			 && (ts->dyn.pchan_is == GSM_PCHAN_TCH_H
-			     || ts->dyn.pchan_is == GSM_PCHAN_NONE
-			     || ts->dyn.pchan_want == GSM_PCHAN_TCH_H)))
+		if (ts->pchan != GSM_PCHAN_TCH_H &&
+		    ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
 			ok = false;
 	} else if ((cbits & 0x1c) == 0x04) {
 		lch_idx = cbits & 0x3;	/* SDCCH/4 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19e5e509101ec91204de9baff04582d99bc8dcb8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list