summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-02 03:36:19 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-02 04:04:08 +0700
commit91d5e5e1912fb0181ab2f69b88ed82f43b1ee9c6 (patch)
tree8ef9d269aa19dc5e36d07e46d4215345f58f7380
parent6e9808662f66f62d6c2c03396e48b966d5c43eaa (diff)
trxcon/scheduler: fix: do not ignore SACCH prims with odd length
Before this patch, prim_dequeue_sacch() used to ignore SACCH primitives with odd length (e.g. 21, when sender forgot to push 2 octets of L1 SACCH header), so neither they were transmitted, nor rejected. As a result, they would stay in the Tx queue until a dedicated connection is released. The only way to notice such problem was looking at the constantly growing talloc's report. Instead of ignoring the primitives with odd length and keeping them in the queue, let's pass them to a logical channel handler, so they would be dequeued and rejected with a proper logging event. Also, to simplify further debugging, let's print the final decision of SACCH prioritization: whether it's a Measurement Report or not. Change-Id: I3149fa518439470b397953306209eb859c83450a
-rw-r--r--src/host/trxcon/sched_prim.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c
index 275a0509..50dfd6e9 100644
--- a/src/host/trxcon/sched_prim.c
+++ b/src/host/trxcon/sched_prim.c
@@ -253,10 +253,6 @@ static struct trx_ts_prim *prim_dequeue_sacch(struct llist_head *queue,
if (prim->chan != lchan->type)
continue;
- /* Just to be sure... */
- if (prim->payload_len != GSM_MACBLOCK_LEN)
- continue;
-
/* Look for a Measurement Report */
if (!prim_mr && PRIM_IS_MR(prim))
prim_mr = prim;
@@ -307,6 +303,10 @@ static struct trx_ts_prim *prim_dequeue_sacch(struct llist_head *queue,
/* Update the MR transmission state */
lchan->sacch.mr_tx_last = PRIM_IS_MR(prim);
+ LOGP(DSCHD, LOGL_DEBUG, "SACCH decision on lchan=%s: %s\n",
+ trx_lchan_desc[lchan->type].name, PRIM_IS_MR(prim) ?
+ "Measurement Report" : "data frame");
+
return prim;
}