Change in ...osmo-bts[master]: bts: Bypass T200 DCCH values for CCCH

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 Jun 27 01:20:21 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-bts/+/14568 )

Change subject: bts: Bypass T200 DCCH values for CCCH
......................................................................

bts: Bypass T200 DCCH values for CCCH

Otherwise t200_ms_dcch array values are left uninitialized with random
values, and passed later on to lapdm_channel_init2().

lapdm_channel_init2() will anyways fail during initial check on
get_n200_dcch() and return -EINVAL, so let's not print garbage or call a
function which will anyways simply return an error.

Catched due to some strange values seen in log (see D0 and D3):
osmo-bts/src/common/bts.c:421 (bts=0,trx=0,ts=0,ss=4) Setting T200 D0=1028672, D3=2, S0=520, S3=520 (all in ms)

Related: OS#4066
Change-Id: I3d7e1883811acf97aac97325739f2ff97fc2aa08
---
M src/common/bts.c
1 file changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/src/common/bts.c b/src/common/bts.c
index b912f33..f582ebd 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -405,6 +405,7 @@
 		t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_FACCH_H] + fn_advance_ms;
 		break;
 	default:
+		/* Channels such as CCCH don't use lapdm DL, and hence no T200 is needed */
 		return -1;
 	}
 	return 0;
@@ -415,14 +416,16 @@
 	struct lapdm_channel *lc = &lchan->lapdm_ch;
 	int t200_ms_dcch[_NR_DL_SAPI], t200_ms_acch[_NR_DL_SAPI];
 
-	t200_by_lchan(t200_ms_dcch, t200_ms_acch, lchan);
-
-	LOGPLCHAN(lchan, DLLAPD, LOGL_DEBUG, "Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n",
-		  t200_ms_dcch[DL_SAPI0], t200_ms_dcch[DL_SAPI3], t200_ms_acch[DL_SAPI0], t200_ms_acch[DL_SAPI3]);
-
-	lapdm_channel_init2(lc, LAPDM_MODE_BTS, t200_ms_dcch, t200_ms_acch, lchan->type);
-	lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY);
-	lapdm_channel_set_l1(lc, NULL, lchan);
+	if (t200_by_lchan(t200_ms_dcch, t200_ms_acch, lchan) == 0) {
+		LOGPLCHAN(lchan, DLLAPD, LOGL_DEBUG,
+			  "Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n",
+			  t200_ms_dcch[DL_SAPI0], t200_ms_dcch[DL_SAPI3],
+			  t200_ms_acch[DL_SAPI0], t200_ms_acch[DL_SAPI3]);
+		lapdm_channel_init2(lc, LAPDM_MODE_BTS, t200_ms_dcch, t200_ms_acch, lchan->type);
+		lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY);
+		lapdm_channel_set_l1(lc, NULL, lchan);
+	}
+	/* We still need to set Rx callback to receive RACH requests: */
 	lapdm_channel_set_l3(lc, lapdm_rll_tx_cb, lchan);
 
 	return 0;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I3d7e1883811acf97aac97325739f2ff97fc2aa08
Gerrit-Change-Number: 14568
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
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/20190627/19502658/attachment.htm>


More information about the gerrit-log mailing list