diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2014-05-30 17:58:01 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-30 18:23:17 +0200 |
commit | cf1fae7f383b9166a7cce0cbe0b9c11d165fc4ba (patch) | |
tree | d347e2dc2ea61195fb38be08e263be9a963f6e00 /src/gprs_rlcmac_ts_alloc.cpp | |
parent | 73191a443f4be0a6a6ae7058625912150e07e3c7 (diff) |
tbf: Re-send dl assignment if we can upgrade to multislot
The current code would only ever assign one PDCH for the initial
assignment (from CCCH). Only if reuse_tbf is called the algorithm would
actually use multiple DL PDCHs if possible.
This patch introduced a tbf attribute upgrade_to_multislot that is set
if we have multiple PDCH configured, and support multislot assignment,
but can only assign a single PDCH (alloc_algorithm_b, parameter single
is set). In this case after the assignment completes (and the MS is
listening on a PDCH) we resend a DL assignment though the PACCH and this
time we can assign multiple timeslots.
Diffstat (limited to 'src/gprs_rlcmac_ts_alloc.cpp')
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 4825db12..13fc636f 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -175,6 +175,8 @@ int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, /* the only one TS is the common TS */ tbf->first_ts = tbf->first_common_ts = ts; + tbf->upgrade_to_multislot = 0; + return 0; } @@ -665,10 +667,17 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, } } if (single && slotcount) { + uint8_t ts_count = 0; + for (ts = 0; ts < 8; ts++) + if ((tx_window & (1 << ts))) + ts_count++; + + tbf->upgrade_to_multislot = (ts_count > 1); LOGP(DRLCMAC, LOGL_INFO, "Using single slot at TS %d for %s\n", tbf->first_ts, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); } else { + tbf->upgrade_to_multislot = 0; LOGP(DRLCMAC, LOGL_INFO, "Using %d slots for %s\n", slotcount, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); } |