aboutsummaryrefslogtreecommitdiffstats
path: root/bsc/BSC_Tests.ttcn
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-06 14:05:23 +0700
committerlaforge <laforge@osmocom.org>2020-09-07 07:53:59 +0000
commit2aa02529de5497773fe28b4fe327e4b03dbc33d4 (patch)
tree38dc9edea81af35728639f9236cb26d4074dd4e2 /bsc/BSC_Tests.ttcn
parent8bc46011e309cee9d73bfb45f7fe41f234ab8eaf (diff)
BSC_Tests/hopping: fix: do not reduce Mobile Allocation bit-mask
My initial assumption was that we can skip redundant '0'B bits or even '00'O octets in the Mobile Allocation IE, and thus reduce the overall size of this element. Unfortunately, this is wrong. 3GPP TS 44.018, section 10.5.2.21 clearly states that the Mobile Allocation IE contains a bit-string of size NF, where NF is the number of frequencies in the cell allocation. If NF % 8 != 0, then '0'B padding bits must be appended to make it octet-aligned. In other words, if the cell allocation contains let's say 13 frequencies, but a hopping timeslot makes use of only a small fraction of it (e.g. 4 first channels), we would still need to transmit at least 13 bits (+padding), including all redundant bits and octets. Change-Id: Ia79efc9aa07b5088913d6679715f351d30f48d13 Related: SYS#4868, OS#4545
Diffstat (limited to 'bsc/BSC_Tests.ttcn')
-rw-r--r--bsc/BSC_Tests.ttcn5
1 files changed, 1 insertions, 4 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 89444475..de35e23e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6889,7 +6889,6 @@ return template MobileAllocationLV {
var bitstring full_mask := f_pad_bit(''B, 1024, '0'B);
var bitstring slot_mask := f_pad_bit(''B, 1024, '0'B);
var bitstring ma_mask := ''B;
- var integer ma_mask_len := 0;
/* Compose the full bit-mask (all channels, up to 1024 entries) */
for (var integer i := 0; i < lengthof(fhp); i := i + 1) {
@@ -6913,15 +6912,13 @@ return template MobileAllocationLV {
/* FIXME: ma_mask := ma_mask & slot_mask[i]; // triggers a bug in TITAN */
if (slot_mask[i] == '1'B) {
ma_mask := ma_mask & '1'B;
- ma_mask_len := lengthof(ma_mask);
} else {
ma_mask := ma_mask & '0'B;
}
}
/* Ensure that ma_mask is octet-aligned */
- ma_mask := substr(ma_mask, 0, ma_mask_len);
- ma_mask_len := (ma_mask_len + 8 - 1) / 8;
+ var integer ma_mask_len := (lengthof(ma_mask) + 8 - 1) / 8;
ma_mask := f_pad_bit(ma_mask, ma_mask_len * 8, '0'B);
return { len := ma_mask_len, ma := ma_mask };