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: 300e31ed13
Change-Id: I57e215fedeb415db4e67fdc56bf0f1410b5f7130
This commit is contained in:
Pau Espin 2021-10-25 17:05:00 +02:00 committed by laforge
parent 991b4f6283
commit 8a85b71167
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}