pdu: fix bug in BSR table lookup

the bug causes the BSR to return a bsr_idx of 0, i.e. no data
pending, when the buff_size was reported to be 1 B only.

Instead, the UE should return BSR idx 1, i.e. between 0 < BSR <= 10.
This commit is contained in:
Andre Puschmann 2020-11-13 13:10:42 +01:00
parent e227fec3d8
commit 5f7f818abb
1 changed files with 3 additions and 3 deletions

View File

@ -979,9 +979,9 @@ uint8_t sch_subh::buff_size_table(uint32_t buffer_size)
} else if (buffer_size > 150000) {
return 63;
} else {
for (int i = 0; i < 61; i++) {
if (buffer_size < btable[i + 2]) {
return 1 + i;
for (int i = 1; i < 62; i++) {
if (buffer_size <= btable[i + 1]) {
return i;
}
}
return 62;