aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-18 17:16:26 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-29 10:53:32 +0200
commite2e004e7a91a3cd680c11364d9cb8cd21c714a8b (patch)
treeef0260a7139092f77de07ff39765440fdbae8b30 /src/tbf_dl.cpp
parentace7b570a047b7ee36557091c10918240c4b8ff3 (diff)
tbf: Pass the MS object around instead of old_tbf
Currently the old TBF (either uplink or downlink) is passed around at TBF allocation mainly to get information about the MS. To implement more complex allocation algorithms, the MS object itself will be needed anyway. This commit replaces the old_tbf arguments by MS object arguments. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 853821ca..c7a04bf4 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -155,6 +155,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts,
ul_tbf = ms->ul_tbf();
ta = ms->ta();
}
+ /* TODO: if (!ms) create MS before tbf_alloc is called? */
if (ul_tbf && ul_tbf->m_contention_resolution_done
&& !ul_tbf->m_final_ack_sent) {
@@ -172,7 +173,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts,
tfi = bts->bts->tfi_find_free(GPRS_RLCMAC_DL_TBF, &trx, use_trx);
if (tfi >= 0)
/* set number of downlink slots according to multislot class */
- dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf, tfi, trx, ms_class, ss);
+ dl_tbf = tbf_alloc_dl_tbf(bts, ms, tfi, trx, ms_class, ss);
if (!dl_tbf) {
LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource\n");