Skip to content
Snippets Groups Projects
Commit 423a0e4a authored by Robert Schmidt's avatar Robert Schmidt
Browse files

Handle UL HARQ slot wrap around for slot = 0

parent 8bd3ec76
No related branches found
No related tags found
8 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1093Issue in generating NR PRACH for High Speed case,!1074PBCH test case support for non-zero bchpyload,!1045Integration 2021 wk06 c,!1044Integration 2021 wk06 b,!1043Integration 2021 wk06,!1015Draft: Multi-UE + more slots
......@@ -310,6 +310,9 @@ void handle_nr_ul_harq(module_id_t mod_id,
sub_frame_t slot,
const nfapi_nr_crc_t *crc_pdu)
{
const NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
int UE_id = find_nr_UE_id(mod_id, crc_pdu->rnti);
if (UE_id < 0) {
LOG_E(MAC, "%s(): unknown RNTI %04x in PUSCH\n", __func__, crc_pdu->rnti);
......@@ -330,7 +333,11 @@ void handle_nr_ul_harq(module_id_t mod_id,
DevAssert(harq_pid == crc_pdu->harq_id);
remove_front_nr_list(&sched_ctrl->feedback_ul_harq);
NR_UE_ul_harq_t *harq = &sched_ctrl->ul_harq_processes[harq_pid];
DevAssert(harq->feedback_slot == slot - 1);
const int feedback_slot = (slot - 1 + num_slots) % num_slots;
AssertFatal(harq->feedback_slot == feedback_slot,
"expected feedback slot %d, but found %d instead\n",
harq->feedback_slot,
feedback_slot);
DevAssert(harq->is_waiting);
harq->feedback_slot = -1;
harq->is_waiting = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment