summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-12-18 01:23:03 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-12-18 05:18:07 +0700
commite17bb11c3b29919799b3637dece1c7c0273af304 (patch)
tree9a887e385496e40047ac588e33c4504656b418e4
parent60ff614446fedc7b12767d9520abfc529a65fc7e (diff)
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
-rw-r--r--src/host/trxcon/sched_lchan_common.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c
index c6b287a9..bf475414 100644
--- a/src/host/trxcon/sched_lchan_common.c
+++ b/src/host/trxcon/sched_lchan_common.c
@@ -186,11 +186,14 @@ size_t sched_bad_frame_ind(uint8_t *l2, uint8_t rsl_cmode, uint8_t tch_mode)
}
}
-#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)
{