aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-04-30 14:15:46 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-05-12 14:24:02 +0200
commit48517620b92709967a212e4927bb6f6a5d4d6899 (patch)
tree5c8834caf3e64e470aa603884e880009c6b5ef93
parent9b63cd04e48e2b75d2b747cc042b763e12961f11 (diff)
sched: Clean up param passing and improve logging
-rw-r--r--src/gprs_rlcmac_sched.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 527d152e..0068eae5 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -41,8 +41,9 @@ struct tbf_sched_candidates {
struct gprs_rlcmac_ul_tbf *ul_ack;
};
-static void get_ctrl_msg_tbf_candidates(const struct gprs_rlcmac_bts *bts, uint8_t trx,
- uint8_t ts, struct tbf_sched_candidates *tbf_cand)
+static void get_ctrl_msg_tbf_candidates(const struct gprs_rlcmac_bts *bts,
+ const struct gprs_rlcmac_pdch *pdch,
+ struct tbf_sched_candidates *tbf_cand)
{
struct gprs_rlcmac_ul_tbf *ul_tbf;
struct gprs_rlcmac_dl_tbf *dl_tbf;
@@ -52,7 +53,7 @@ static void get_ctrl_msg_tbf_candidates(const struct gprs_rlcmac_bts *bts, uint8
ul_tbf = as_ul_tbf((struct gprs_rlcmac_tbf *)pos->entry);
OSMO_ASSERT(ul_tbf);
/* this trx, this ts */
- if (ul_tbf->trx->trx_no != trx || !ul_tbf->is_control_ts(ts))
+ if (ul_tbf->trx->trx_no != pdch->trx->trx_no || !ul_tbf->is_control_ts(pdch->ts_no))
continue;
if (ul_tbf->ul_ack_state_is(GPRS_RLCMAC_UL_ACK_SEND_ACK))
tbf_cand->ul_ack = ul_tbf;
@@ -71,7 +72,7 @@ states? */
dl_tbf = as_dl_tbf((struct gprs_rlcmac_tbf *)pos->entry);
OSMO_ASSERT(dl_tbf);
/* this trx, this ts */
- if (dl_tbf->trx->trx_no != trx || !dl_tbf->is_control_ts(ts))
+ if (dl_tbf->trx->trx_no != pdch->trx->trx_no || !dl_tbf->is_control_ts(pdch->ts_no))
continue;
if (dl_tbf->dl_ass_state_is(GPRS_RLCMAC_DL_ASS_SEND_ASS))
tbf_cand->dl_ass = dl_tbf;
@@ -480,7 +481,7 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
if (usf_tbf && req_mcs_kind == EGPRS && ms_mode(usf_tbf->ms()) != EGPRS)
req_mcs_kind = EGPRS_GMSK;
- get_ctrl_msg_tbf_candidates(bts, trx, ts, &tbf_cand);
+ get_ctrl_msg_tbf_candidates(bts, pdch, &tbf_cand);
/* Prio 1: select control message */
if ((msg = sched_select_ctrl_msg(pdch, fn, block_nr, &tbf_cand))) {