From e454fc41d1e375bf5906c91a59c42a6cadd0840f Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 8 Sep 2025 10:59:11 +0200 Subject: [PATCH] Trigger MSG3 with C-RNTI in MAC CE if CBRA with newUE-Identity (handover) --- openair2/LAYER2/NR_MAC_UE/config_ue.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 8951ef65e5..729f0b4763 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -1978,12 +1978,23 @@ static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac, LOG_I(NR_MAC, "Configuring CRNTI %x\n", mac->crnti); RA_config_t *ra = &mac->ra; + bool is_cfra = false; if (reconfWithSync->rach_ConfigDedicated) { AssertFatal(reconfWithSync->rach_ConfigDedicated->present == NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink, "RACH on supplementaryUplink not supported\n"); + NR_RACH_ConfigDedicated_t *rach_ConfigDedicated = reconfWithSync->rach_ConfigDedicated->choice.uplink; + if (rach_ConfigDedicated->cfra) + is_cfra = true; + if (rach_ConfigDedicated->ext1 && rach_ConfigDedicated->ext1->cfra_TwoStep_r16) + is_cfra = true; UPDATE_IE(ra->rach_ConfigDedicated, reconfWithSync->rach_ConfigDedicated->choice.uplink, NR_RACH_ConfigDedicated_t); } + // in case of CBRA and reconfiguration with sync (handover) + // the UE sends MSG3 with C-RNTI to identify itself + if (!is_cfra) + mac->msg3_C_RNTI = true; + if (reconfWithSync->spCellConfigCommon) { NR_ServingCellConfigCommon_t *scc = reconfWithSync->spCellConfigCommon; if (scc->physCellId)