Change in osmocom-bb[master]: trxcon/scheduler: fix: don't send BFI in GSM48_CMODE_SIGN mode

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
Sat Sep 15 07:51:53 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10941 )

Change subject: trxcon/scheduler: fix: don't send BFI in GSM48_CMODE_SIGN mode
......................................................................

trxcon/scheduler: fix: don't send BFI in GSM48_CMODE_SIGN mode

GSM48_CMODE_SIGN means 'signaling only', so we shall not send
bad frame indications in this state. Instead, it makes sense
to send dummy L2 frames like we do for xCCH channels.

Change-Id: Ie39d53522cafab265099076b3194fa96aff217ba
---
M src/host/trxcon/sched_lchan_common.c
M src/host/trxcon/sched_lchan_tchf.c
2 files changed, 11 insertions(+), 4 deletions(-)

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



diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c
index 2767b90..95e496b 100644
--- a/src/host/trxcon/sched_lchan_common.c
+++ b/src/host/trxcon/sched_lchan_common.c
@@ -145,7 +145,6 @@
 size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan)
 {
 	switch (lchan->tch_mode) {
-	case GSM48_CMODE_SIGN:
 	case GSM48_CMODE_SPEECH_V1:
 		if (lchan->type == TRXC_TCHF) { /* Full Rate */
 			memset(l2, 0x00, GSM_FR_BYTES);
@@ -163,6 +162,9 @@
 	case GSM48_CMODE_SPEECH_AMR: /* Adaptive Multi Rate */
 		/* FIXME: AMR is not implemented yet */
 		return 0;
+	case GSM48_CMODE_SIGN:
+		LOGP(DSCH, LOGL_ERROR, "BFI is not allowed in signalling mode\n");
+		return 0;
 	default:
 		LOGP(DSCH, LOGL_ERROR, "Invalid TCH mode: %u\n", lchan->tch_mode);
 		return 0;
diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c
index f6465f9..09d504f 100644
--- a/src/host/trxcon/sched_lchan_tchf.c
+++ b/src/host/trxcon/sched_lchan_tchf.c
@@ -151,13 +151,18 @@
 		n_errors, false, true);
 
 bfi:
-	/* Bad frame indication */
-	l2_len = sched_bad_frame_ind(l2, lchan);
-
 	/* Didn't try to decode */
 	if (n_errors < 0)
 		n_errors = 116 * 4;
 
+	/* BFI is not applicable in signalling mode */
+	if (lchan->tch_mode == GSM48_CMODE_SIGN)
+		return sched_send_dt_ind(trx, ts, lchan, NULL, 0,
+			n_errors, true, false);
+
+	/* Bad frame indication */
+	l2_len = sched_bad_frame_ind(l2, lchan);
+
 	/* Send a BFI frame to the higher layers */
 	return sched_send_dt_ind(trx, ts, lchan, l2, l2_len,
 		n_errors, true, true);

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie39d53522cafab265099076b3194fa96aff217ba
Gerrit-Change-Number: 10941
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180915/52d56af7/attachment.htm>


More information about the gerrit-log mailing list