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.
master
Andre Puschmann 4 years ago
parent e227fec3d8
commit 5f7f818abb

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

Loading…
Cancel
Save