Commit c243aaf8 authored by Robert Schmidt's avatar Robert Schmidt

Bugfix: check that retransmission can be allocated

parent 8ec4be0b
...@@ -425,7 +425,6 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id, ...@@ -425,7 +425,6 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
if (sched_ctrl->dl_harq_pid >= 0) { /* retransmission */ if (sched_ctrl->dl_harq_pid >= 0) { /* retransmission */
NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[sched_ctrl->dl_harq_pid]; NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[sched_ctrl->dl_harq_pid];
sched_ctrl->time_domain_allocation = retInfo->time_domain_allocation;
/* ensure that there is a free place for RB allocation */ /* ensure that there is a free place for RB allocation */
int rbSize = 0; int rbSize = 0;
...@@ -435,16 +434,27 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id, ...@@ -435,16 +434,27 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
while (rbStart < bwpSize && vrb_map[rbStart]) rbStart++; while (rbStart < bwpSize && vrb_map[rbStart]) rbStart++;
if (rbStart >= bwpSize) { if (rbStart >= bwpSize) {
LOG_E(MAC, LOG_E(MAC,
"cannot allocate retransmission for UE %d/RNTI %04x: no resources\n", "%4d.%2d cannot allocate retransmission for UE %d/RNTI %04x: no resources\n",
frame,
slot,
UE_id, UE_id,
rnti); rnti);
return; /* not enough resources: drop retransmission attempt and make a new
* transmission instead */
sched_ctrl->dl_harq_pid = -1;
break;
} }
while (rbStart + rbSize < bwpSize while (rbStart + rbSize < bwpSize
&& !vrb_map[rbStart + rbSize] && !vrb_map[rbStart + rbSize]
&& rbSize < retInfo->rbSize) && rbSize < retInfo->rbSize)
rbSize++; rbSize++;
} }
}
if (sched_ctrl->dl_harq_pid >= 0) {
/* this retransmission can be allocated (i.e., enough resources) */
NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[sched_ctrl->dl_harq_pid];
sched_ctrl->time_domain_allocation = retInfo->time_domain_allocation;
sched_ctrl->rbSize = retInfo->rbSize; sched_ctrl->rbSize = retInfo->rbSize;
sched_ctrl->rbStart = rbStart; sched_ctrl->rbStart = rbStart;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment