From 3fd119ff2972bbdfb9c57e9c0d4903b9c8d613bf Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 24 May 2024 13:08:38 +0200 Subject: [PATCH 1/2] Do not send PUCCH ACK on DLSCH that doesnt require it. UE was attempting to send ACK on MSG2 - was caused by missing brackets in if statement. --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 91dd4830ed..c5eadb7a3c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -787,23 +787,24 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac, return -1; } - if (dci_ind->rnti != mac->ra.ra_rnti && dci_ind->rnti != SI_RNTI) + if (dci_ind->rnti != mac->ra.ra_rnti && dci_ind->rnti != SI_RNTI) { AssertFatal(1 + dci->pdsch_to_harq_feedback_timing_indicator.val > DURATION_RX_TO_TX, "PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%d).\n", 1 + dci->pdsch_to_harq_feedback_timing_indicator.val, DURATION_RX_TO_TX); - // set the harq status at MAC for feedback - set_harq_status(mac, - dci->pucch_resource_indicator, - dci->harq_pid, - dlsch_pdu->accumulated_delta_PUCCH, - 1 + dci->pdsch_to_harq_feedback_timing_indicator.val, - dci->dai[0].val, - dci_ind->n_CCE, - dci_ind->N_CCE, - frame, - slot); + // set the harq status at MAC for feedback + set_harq_status(mac, + dci->pucch_resource_indicator, + dci->harq_pid, + dlsch_pdu->accumulated_delta_PUCCH, + 1 + dci->pdsch_to_harq_feedback_timing_indicator.val, + dci->dai[0].val, + dci_ind->n_CCE, + dci_ind->N_CCE, + frame, + slot); + } LOG_D(MAC, "(nr_ue_procedures.c) rnti = %x dl_config->number_pdus = %d\n", From 4a5d9243752660b952b19d348c164024cf213f28 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 24 May 2024 12:58:16 +0200 Subject: [PATCH 2/2] Remove accumulated_delta_PUCCH from UE nfapi interface. --- .../nfapi/public_inc/fapi_nr_ue_interface.h | 1 - openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h index 44669564d6..921f44133f 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h @@ -474,7 +474,6 @@ typedef struct { vrb_to_prb_mapping_t vrb_to_prb_mapping; uint8_t dai; double scaling_factor_S; - int8_t accumulated_delta_PUCCH; uint8_t pucch_resource_id; uint8_t pdsch_to_harq_feedback_time_ind; uint8_t n_dmrs_cdm_groups; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index c5eadb7a3c..681fca1a73 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -762,8 +762,7 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac, LOG_E(MAC, "invalid tpc %d\n", dci->tpc); return -1; } - const int tcp[] = {-1, 0, 1, 3}; - dlsch_pdu->accumulated_delta_PUCCH = tcp[dci->tpc]; + // Sanity check for pucch_resource_indicator value received to check for false DCI. bool valid = false; NR_PUCCH_Config_t *pucch_Config = mac->current_UL_BWP ? mac->current_UL_BWP->pucch_Config : NULL; @@ -792,12 +791,12 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac, "PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%d).\n", 1 + dci->pdsch_to_harq_feedback_timing_indicator.val, DURATION_RX_TO_TX); - // set the harq status at MAC for feedback + const int tpc[] = {-1, 0, 1, 3}; set_harq_status(mac, dci->pucch_resource_indicator, dci->harq_pid, - dlsch_pdu->accumulated_delta_PUCCH, + tpc[dci->tpc], 1 + dci->pdsch_to_harq_feedback_timing_indicator.val, dci->dai[0].val, dci_ind->n_CCE, @@ -830,7 +829,7 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac, dlsch_pdu->harq_process_nbr, dci->dai[0].val, dlsch_pdu->scaling_factor_S, - dlsch_pdu->accumulated_delta_PUCCH, + dci->tpc, dci->pucch_resource_indicator, 1 + dci->pdsch_to_harq_feedback_timing_indicator.val); @@ -1015,8 +1014,6 @@ static int nr_ue_process_dci_dl_11(NR_UE_MAC_INST_t *mac, LOG_E(MAC, "invalid tpc %d\n", dci->tpc); return -1; } - const int tcp[] = {-1, 0, 1, 3}; - dlsch_pdu->accumulated_delta_PUCCH = tcp[dci->tpc]; // Sanity check for pucch_resource_indicator value received to check for false DCI. bool valid = false; @@ -1127,10 +1124,11 @@ static int nr_ue_process_dci_dl_11(NR_UE_MAC_INST_t *mac, DURATION_RX_TO_TX); // set the harq status at MAC for feedback + const int tpc[] = {-1, 0, 1, 3}; set_harq_status(mac, dci->pucch_resource_indicator, dci->harq_pid, - dlsch_pdu->accumulated_delta_PUCCH, + tpc[dci->tpc], feedback_ti, dci->dai[0].val, dci_ind->n_CCE,