Timur Davydov has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/42691?usp=email )
Change subject: trx: factor out burst submission into helper ......................................................................
trx: factor out burst submission into helper
Extract TRXD burst submission logic from bts_sched_flush_buffers() into trx_sched_submit_bursts()
No functional changes intended, this prepares for alternative backends reusing the same scheduling logic
Change-Id: I7ce61bee4ca7ca50ef190982f1a0e4ce57c8c838 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 16 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/91/42691/1
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 99efdf6..bac66da 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -210,27 +210,28 @@ br->att = ts->c0_power_red_db; } } +static void trx_sched_submit_bursts(struct phy_instance *pinst) +{ + unsigned int tn; + struct trx_l1h *l1h = pinst->u.osmotrx.hdl; + for (tn = 0; tn < TRX_NR_TS; tn++) { + const struct trx_dl_burst_req *br; + br = &pinst->u.osmotrx.br[tn]; + if (!br->burst_len) + continue; + trx_if_send_burst(l1h, br); + } + /* Batch all timeslots into a single TRXD PDU */ + trx_if_send_burst(l1h, NULL); +} +
static void bts_sched_flush_buffers(struct gsm_bts *bts) { const struct gsm_bts_trx *trx; - unsigned int tn;
llist_for_each_entry(trx, &bts->trx_list, list) { - const struct phy_instance *pinst = trx->pinst; - struct trx_l1h *l1h = pinst->u.osmotrx.hdl; - - for (tn = 0; tn < TRX_NR_TS; tn++) { - const struct trx_dl_burst_req *br; - - br = &pinst->u.osmotrx.br[tn]; - if (!br->burst_len) - continue; - trx_if_send_burst(l1h, br); - } - - /* Batch all timeslots into a single TRXD PDU */ - trx_if_send_burst(l1h, NULL); + trx_sched_submit_bursts(trx->pinst); } }