[PATCH] osmocom-bb[master]: trxcon/scheduler: BUGFIX: distinguish between SACCH and FACCH

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 22 15:33:32 UTC 2018


Review at  https://gerrit.osmocom.org/6806

trxcon/scheduler: BUGFIX: distinguish between SACCH and FACCH

Both SACCH and FACCH messages have the same 23-byte length, both
are being queued together within a single transimt queue. So,
previously a SACCH frame could be picked by TCH burst handler,
and then sent as a FACCH frame. Let's fix this.

A FACCH primitive may have one of the TRXC_TCH* logical channel
types, while SACCH primitives have one of the TRXC_SACCH*.

Change-Id: Ia7090384f3ff74c9d94997265135acbceffa0ffe
---
M src/host/trxcon/sched_lchan_common.c
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/06/6806/1

diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c
index c6b287a..bf47541 100644
--- a/src/host/trxcon/sched_lchan_common.c
+++ b/src/host/trxcon/sched_lchan_common.c
@@ -186,11 +186,14 @@
 	}
 }
 
-#define PRIM_IS_FACCH(prim) \
-	prim->payload_len == GSM_MACBLOCK_LEN
+#define CHAN_IS_TCH(chan) \
+	(chan == TRXC_TCHF || chan == TRXC_TCHH_0 || chan == TRXC_TCHH_1)
 
 #define PRIM_IS_TCH(prim) \
-	prim->payload_len != GSM_MACBLOCK_LEN
+	CHAN_IS_TCH(prim->chan) && prim->payload_len != GSM_MACBLOCK_LEN
+
+#define PRIM_IS_FACCH(prim) \
+	CHAN_IS_TCH(prim->chan) && prim->payload_len == GSM_MACBLOCK_LEN
 
 struct trx_ts_prim *sched_dequeue_tch_prim(struct llist_head *queue)
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7090384f3ff74c9d94997265135acbceffa0ffe
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>


More information about the gerrit-log mailing list