From cd67c33ba296cdc7c790f82bcd012f8def28da96 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Mon, 26 May 2025 09:52:10 +0200 Subject: [PATCH] Fix NR UE mislabeling MSG2 as DLSCH PDU --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 9 +++++++-- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 783ae0489f..741842319e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -755,8 +755,13 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac, dlsch_pdu->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon + 2; } else { dlsch_pdu->SubcarrierSpacing = current_DL_BWP->scs; - if (nr_timer_is_active(&mac->ra.response_window_timer) && rnti_type == TYPE_RA_RNTI_) { - dl_conf_req->pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH; + if (rnti_type == TYPE_RA_RNTI_) { + if (nr_timer_is_active(&mac->ra.response_window_timer)) { + dl_conf_req->pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH; + } else { + // Discard the DCI + return -1; + } } else { dl_conf_req->pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; } diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index de5ae571ca..dcd4a85f5d 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -1312,7 +1312,7 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio // resume RAR response window timer if MSG2 decoding failed nr_timer_suspension(&mac->ra.response_window_timer); } else { - LOG_I(PHY, "RAR-Msg2 decoded\n"); + LOG_I(PHY, "[UE %d] RAR-Msg2 decoded\n", mac->ue_id); } ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_RAR; break;