diff options
author | Max <msuraev@sysmocom.de> | 2017-09-28 16:25:25 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2018-01-26 12:56:27 +0100 |
commit | 92e9c17aec02006a38922c41f9c5b59df6c45ea0 (patch) | |
tree | dffc680230522725cbbcf9c470ee15a063ce5bbd | |
parent | 92b7a50605793e59b233c537eb870eee3cc08e31 (diff) |
Simplify TS alloc: avoid TS reassignment
Assign reserved_*_slots only when multislot masks are found to avoid
reassignment and make code easier to follow.
Change-Id: I9b0482f4ea75ead9855cd78e33c8e70d0ccf4484
Related: OS#2282
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index cd82ca73..c2466764 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -770,8 +770,8 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, GprsMs *ms_, struct gprs_rlcm return -EINVAL; } - reserved_dl_slots = dl_slots = ms->reserved_dl_slots(); - reserved_ul_slots = ul_slots = ms->reserved_ul_slots(); + dl_slots = ms->reserved_dl_slots(); + ul_slots = ms->reserved_ul_slots(); first_common_ts = ms->first_common_ts(); trx = ms->current_trx(); @@ -800,11 +800,11 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, GprsMs *ms_, struct gprs_rlcm rc = find_multi_slots(trx, ms->ms_class(), &ul_slots, &dl_slots); if (rc < 0) return rc; - - reserved_dl_slots = dl_slots; - reserved_ul_slots = ul_slots; } + reserved_dl_slots = dl_slots; + reserved_ul_slots = ul_slots; + /* Step 3: Derive the slot set for the current TBF */ if (single) { /* Make sure to consider the first common slot only */ |