[MERGED] openbsc[master]: dyn TS: rsl_lchan_lookup(): add dyn 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 Jul 28 16:56:51 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: dyn TS: rsl_lchan_lookup(): add dyn PCHAN
......................................................................


dyn TS: rsl_lchan_lookup(): add dyn PCHAN

Accept GSM_PCHAN_TCH_F_TCH_H_PDCH for TCH/F and TCH/H if in matching pchan mode
or switching to matching pchan.

Accept RSL_CHAN_OSMO_PDCH chan_nr cbits for GSM_PCHAN_TCH_F_TCH_H_PDCH pchan.

Change-Id: If8f7c118f69e5a9f370bfe25f82f3d5a8de75b51
---
M openbsc/src/libcommon/gsm_data_shared.c
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c
index b5e7e02..8d99ea4 100644
--- a/openbsc/src/libcommon/gsm_data_shared.c
+++ b/openbsc/src/libcommon/gsm_data_shared.c
@@ -658,11 +658,17 @@
 		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_PDCH
+		    && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
+			 && (ts->dyn.pchan_is == GSM_PCHAN_TCH_F
+			     || ts->dyn.pchan_want == GSM_PCHAN_TCH_F)))
 			ok = false;
 	} else if ((cbits & 0x1e) == 0x02) {
 		lch_idx = cbits & 0x1;	/* TCH/H */
-		if (ts->pchan != GSM_PCHAN_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_want == GSM_PCHAN_TCH_H)))
 			ok = false;
 	} else if ((cbits & 0x1c) == 0x04) {
 		lch_idx = cbits & 0x3;	/* SDCCH/4 */
@@ -681,6 +687,10 @@
 		    ts->pchan != GSM_PCHAN_CCCH_SDCCH4_CBCH)
 			ok = false;
 		/* FIXME: we should not return first sdcch4 !!! */
+	} else if ((chan_nr & RSL_CHAN_NR_MASK) == RSL_CHAN_OSMO_PDCH) {
+		lch_idx = 0;
+		if (ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
+			ok = false;
 	} else
 		return NULL;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8f7c118f69e5a9f370bfe25f82f3d5a8de75b51
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list