diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-25 17:05:00 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-10-25 15:57:24 +0000 |
commit | 8a85b71167c4580ddf9e6c59ea602475fd462b3a (patch) | |
tree | 142e1bc7ca6a4eb640345034ef16afa25d5fb7f9 /src | |
parent | 991b4f62838d23a243d35cda4950fea5d218486a (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/sched_lchan_pdtch.c | 7 |
1 files changed, 5 insertions, 2 deletions
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 <osmo-bts/logging.h> #include <osmo-bts/scheduler.h> #include <osmo-bts/scheduler_backend.h> +#include <osmo-bts/bts_trx.h> #include <sched_utils.h> @@ -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; } |