From 8a85b71167c4580ddf9e6c59ea602475fd462b3a Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 25 Oct 2021 17:05:00 +0200 Subject: bts-trx: sched: tx_pdtch_fn: Handle PCU idle blocks properly PCU idle blocks are identified by being 0 length, and hence msg->l2h being null. Don't try to encode those, but simply discard them silently. In case there's a missing block in C0, we want to log the event since the BTS is expected to send something on C0. Related: SYS#5676 Related: SYS#4919 Fixes: 300e31ed135c674cd44526b7503d4664a45a9ec3 Change-Id: I57e215fedeb415db4e67fdc56bf0f1410b5f7130 --- src/osmo-bts-trx/sched_lchan_pdtch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c index 4c63acb1..e9e1e828 100644 --- a/src/osmo-bts-trx/sched_lchan_pdtch.c +++ b/src/osmo-bts-trx/sched_lchan_pdtch.c @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -161,8 +162,10 @@ int tx_pdtch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br) /* get mac block from queue */ msg = _sched_dequeue_prim(l1ts, br); - if (!msg) { - LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No prim for transmit.\n"); + if (!msg || !msg->l2h) { + const struct gsm_bts_trx *trx = l1ts->ts->trx; + if (!msg || trx == trx->bts->c0) + LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No prim for transmit.\n"); goto no_msg; } -- cgit v1.2.3