aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_sched.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-05-11 14:04:33 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-05-12 14:23:59 +0200
commit632542348a93b2879bde3c154865893af66e7dc5 (patch)
tree4257a8fe5f5d24bcad1c02a6bb9032c0489ca8cf /src/gprs_rlcmac_sched.cpp
parentc432e062ea3239bf541afc25f14f0e69d074b5c2 (diff)
sched: Clean up helper function and improve logging
Diffstat (limited to 'src/gprs_rlcmac_sched.cpp')
-rw-r--r--src/gprs_rlcmac_sched.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index bb65ae15..527d152e 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -84,8 +84,7 @@ states? */
}
}
-static struct gprs_rlcmac_ul_tbf *sched_select_uplink(uint8_t trx, uint8_t ts, uint32_t fn,
- uint8_t block_nr, struct gprs_rlcmac_pdch *pdch, bool require_gprs_only)
+static struct gprs_rlcmac_ul_tbf *sched_select_uplink(struct gprs_rlcmac_pdch *pdch, bool require_gprs_only)
{
struct gprs_rlcmac_ul_tbf *tbf;
uint8_t i, tfi;
@@ -107,11 +106,7 @@ static struct gprs_rlcmac_ul_tbf *sched_select_uplink(uint8_t trx, uint8_t ts, u
if (require_gprs_only && tbf->is_egprs_enabled())
continue;
- /* use this USF */
- LOGP(DRLCMACSCHED, LOGL_DEBUG, "Received RTS for PDCH: TRX=%d "
- "TS=%d FN=%d block_nr=%d scheduling USF=%d for "
- "required uplink resource of UL TFI=%d\n", trx, ts, fn,
- block_nr, tbf->m_usf[ts], tfi);
+ /* use this USF (tbf) */
/* next TBF to handle resource is the next one */
pdch->next_ul_tfi = (tfi + 1) & 31;
return tbf;
@@ -464,10 +459,9 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
"single block allocation at FN=%d\n", fn, block_nr, sba->fn);
/* else, check uplink resource for polling */
} else if ((poll_tbf = pdch_ulc_get_tbf_poll(pdch->ulc, poll_fn))) {
- LOGP(DRLCMACSCHED, LOGL_DEBUG, "Received RTS for PDCH: TRX=%d "
- "TS=%d FN=%d block_nr=%d scheduling free USF for "
- "polling at FN=%d of %s\n", trx, ts, fn,
- block_nr, poll_fn, tbf_name(poll_tbf));
+ LOGPDCH(pdch, DRLCMACSCHED, LOGL_DEBUG, "Received RTS for PDCH: FN=%d "
+ "block_nr=%d scheduling free USF for polling at FN=%d of %s\n",
+ fn, block_nr, poll_fn, tbf_name(poll_tbf));
/* If POLL TBF is UL and already has a USF assigned on this TS,
* let's set its USF in the DL msg. This is not really needed,
* but it helps understand better the flow when looking at
@@ -475,7 +469,10 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
if (poll_tbf->direction == GPRS_RLCMAC_UL_TBF && as_ul_tbf(poll_tbf)->m_usf[ts] != USF_INVALID)
usf_tbf = as_ul_tbf(poll_tbf);
/* else, search for uplink tbf */
- } else if ((usf_tbf = sched_select_uplink(trx, ts, fn, block_nr, pdch, require_gprs_only))) {
+ } else if ((usf_tbf = sched_select_uplink(pdch, require_gprs_only))) {
+ LOGPDCH(pdch, DRLCMACSCHED, LOGL_DEBUG, "Received RTS for PDCH: FN=%d "
+ "block_nr=%d scheduling USF=%d for %s, expect answer on UL FN=%d\n",
+ fn, block_nr, usf_tbf->m_usf[pdch->ts_no], tbf_name(usf_tbf), poll_fn);
pdch_ulc_reserve_tbf_usf(pdch->ulc, poll_fn, usf_tbf);
}
/* If MS selected for USF is GPRS-only, then it will only be