fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29959 )
Change subject: trxcon: l1sched_handle_data_cnf(): make the cnf struct scoped ......................................................................
trxcon: l1sched_handle_data_cnf(): make the cnf struct scoped
Change-Id: I526116c2a20970aee7881e19e283e083bc6b1911 Related: OS#5599 --- M src/host/trxcon/src/trxcon.c 1 file changed, 12 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/59/29959/1
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 6b5bdb5..b6bd56d 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -247,6 +247,7 @@ const struct l1sched_lchan_desc *lchan_desc; struct l1sched_state *sched = lchan->ts->sched; struct trxcon_inst *trxcon = sched->priv; + bool is_traffic = false; const uint8_t *data; uint8_t ra_buf[2]; size_t data_len; @@ -254,24 +255,26 @@
lchan_desc = &l1sched_lchan_desc[lchan->type];
- struct trxcon_param_tx_data_cnf cnf = { - /* .traffic is set below */ - .chan_nr = lchan_desc->chan_nr | lchan->ts->index, - .link_id = lchan_desc->link_id, - .band_arfcn = trxcon->l1p.band_arfcn, - .frame_nr = fn, - }; - switch (dt) { case L1SCHED_DT_TRAFFIC: case L1SCHED_DT_PACKET_DATA: - cnf.traffic = true; + is_traffic = true; /* fall-through */ case L1SCHED_DT_SIGNALING: + { + struct trxcon_param_tx_data_cnf cnf = { + .traffic = is_traffic, + .chan_nr = lchan_desc->chan_nr | lchan->ts->index, + .link_id = lchan_desc->link_id, + .band_arfcn = trxcon->l1p.band_arfcn, + .frame_nr = fn, + }; + rc = osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_TX_DATA_CNF, &cnf); data_len = lchan->prim->payload_len; data = lchan->prim->payload; break; + } case L1SCHED_DT_OTHER: if (L1SCHED_PRIM_IS_RACH(lchan->prim)) { const struct l1sched_ts_prim_rach *rach;