mirror of https://github.com/PentHertz/srsLTE.git
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:
parent
e227fec3d8
commit
5f7f818abb
|
@ -979,9 +979,9 @@ uint8_t sch_subh::buff_size_table(uint32_t buffer_size)
|
||||||
} else if (buffer_size > 150000) {
|
} else if (buffer_size > 150000) {
|
||||||
return 63;
|
return 63;
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < 61; i++) {
|
for (int i = 1; i < 62; i++) {
|
||||||
if (buffer_size < btable[i + 2]) {
|
if (buffer_size <= btable[i + 1]) {
|
||||||
return 1 + i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 62;
|
return 62;
|
||||||
|
|
Loading…
Reference in New Issue