fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32058 )
Change subject: trxcon: do not call l1sched_prim_dequeue() at ul_bid != 0 ......................................................................
trxcon: do not call l1sched_prim_dequeue() at ul_bid != 0
It may happen that the Tx queue is empty at TDMA Fn corresponding to ul_bid == 0, and then shortly after something appears at ul_bid != 0.
Change-Id: Ic0bbe2ab6c0ccd96c1f8af8aa17ac88adf7f88ed Related: OS#5500 --- M src/host/trxcon/src/sched_trx.c 1 file changed, 22 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/58/32058/1
diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index ac55f92..23c8f3f 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -120,14 +120,16 @@ return;
/* If no primitive is being processed, try obtaining one from Tx queue */ - if (lchan->prim == NULL) - lchan->prim = l1sched_prim_dequeue(&ts->tx_prims, br->fn, lchan); - if (lchan->prim == NULL) { - /* If CBTX (Continuous Burst Transmission) is required */ - if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) - l1sched_prim_dummy(lchan); + if (frame->ul_bid == 0) { if (lchan->prim == NULL) - return; + lchan->prim = l1sched_prim_dequeue(&ts->tx_prims, br->fn, lchan); + if (lchan->prim == NULL) { + /* If CBTX (Continuous Burst Transmission) is required */ + if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) + l1sched_prim_dummy(lchan); + if (lchan->prim == NULL) + return; + } }
/* TODO: report TX buffers health to the higher layers */