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
This commit is contained in:
Vadim Yanitskiy 2020-09-06 14:05:23 +07:00 committed by laforge
parent 8bc46011e3
commit 2aa02529de
1 changed files with 1 additions and 4 deletions

View File

@ -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 };