sched: Clean up param passing and improve logging

Change-Id: If137a2aaac7744e60564ca833a1b5564ed7d93bb
changes/94/23994/3
Pau Espin 2021-04-30 14:15:46 +02:00
parent 9b63cd04e4
commit 48517620b9
1 changed files with 6 additions and 5 deletions

View File

@ -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))) {