Commit bc43eee8 authored by Robert Schmidt's avatar Robert Schmidt

Reduce max_num_ue after successful PUCCH alloc

parent d03493d1
...@@ -802,9 +802,6 @@ void pf_dl(module_id_t module_id, ...@@ -802,9 +802,6 @@ void pf_dl(module_id_t module_id,
LOG_D(NR_MAC, "%4d.%2d could not find CCE for DL DCI UE %d/RNTI %04x\n", frame, slot, UE_id, rnti); LOG_D(NR_MAC, "%4d.%2d could not find CCE for DL DCI UE %d/RNTI %04x\n", frame, slot, UE_id, rnti);
continue; continue;
} }
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
max_num_ue--;
if (max_num_ue < 0) return;
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
* allocation after CCE alloc fail would be more complex) */ * allocation after CCE alloc fail would be more complex) */
...@@ -818,9 +815,14 @@ void pf_dl(module_id_t module_id, ...@@ -818,9 +815,14 @@ void pf_dl(module_id_t module_id,
frame, frame,
slot); slot);
mac->pdcch_cand[cid]--; mac->pdcch_cand[cid]--;
return; continue;
} }
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE
* and PUCCH */
max_num_ue--;
AssertFatal(max_num_ue >= 0, "Illegal max_num_ue %d\n", max_num_ue);
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(mac, fill_pdcch_vrb_map(mac,
......
...@@ -1305,8 +1305,7 @@ void pf_ul(module_id_t module_id, ...@@ -1305,8 +1305,7 @@ void pf_ul(module_id_t module_id,
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
max_num_ue--; max_num_ue--;
if (max_num_ue < 0) AssertFatal(max_num_ue >= 0, "Illegal max_num_ue %d\n", max_num_ue);
return;
NR_CellGroupConfig_t *cg = UE_info->CellGroup[UE_id]; NR_CellGroupConfig_t *cg = UE_info->CellGroup[UE_id];
NR_BWP_UplinkDedicated_t *ubwpd= cg ? cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP:NULL; NR_BWP_UplinkDedicated_t *ubwpd= cg ? cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP:NULL;
......
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