sched: Pass pdch to *_create_rlcmac_msg() functions
The pdch pointer contains more info than just timeslot number. For
instance, it contains information about the TRX owning the TS.
Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e
diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c
index d4dafe2..207e4d3 100644
--- a/src/tbf_dl_ass_fsm.c
+++ b/src/tbf_dl_ass_fsm.c
@@ -59,9 +59,9 @@
bool old_tfi_is_valid = tbf_is_tfi_assigned(ctx->tbf);
/* We only use this function in control TS (PACCH) so that MS can always answer the poll */
- OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, &tbf_get_trx(ctx->tbf)->pdch[d->ts]));
+ OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, d->pdch));
- rc = tbf_check_polling(ctx->tbf, d->fn, d->ts, &new_poll_fn, &rrbp);
+ rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp);
if (rc < 0)
return NULL;
@@ -113,9 +113,9 @@
LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n");
bts_do_rate_ctr_inc(ms->bts, CTR_PKT_DL_ASSIGNMENT);
- tbf_set_polling(ctx->tbf, new_poll_fn, d->ts, PDCH_ULC_POLL_DL_ASS);
+ tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_DL_ASS);
LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled DL Assignment polling on PACCH (FN=%d, TS=%d)\n",
- new_poll_fn, d->ts);
+ new_poll_fn, d->pdch->ts_no);
talloc_free(mac_control_block);
return msg;
@@ -233,12 +233,14 @@
}
-struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts)
+struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf,
+ const struct gprs_rlcmac_pdch *pdch,
+ uint32_t fn)
{
int rc;
struct tbf_dl_ass_ev_create_rlcmac_msg_ctx data_ctx = {
+ .pdch = pdch,
.fn = fn,
- .ts = ts,
.msg = NULL,
};