diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 01b33465e7..c945408319 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -498,7 +498,7 @@ static void configure_prach_occasions(NR_UE_MAC_INST_t *mac, int scs) sl *= 2; // if only 1 slot per subframe (or 60kHz slot) in case of 30 or 120kHz it's the odd one // as defined in 5.3.2 of 211 - if (prach_slots_in_sf == 1) + if (((prach_info.format & 0xff) > 3) && prach_slots_in_sf == 1) add_slot = 1; } int slot = sl + add_slot; @@ -624,9 +624,12 @@ static void ra_preamble_msga_transmission(RA_config_t *ra, int scs) prach_resources->ra_preamble_rx_target_power = get_ra_preamble_rx_target_power(ra, scs); - ra->ra_rnti = nr_get_ra_rnti(ra->sched_ro_info.start_symbol, ra->sched_ro_info.slot, ra->sched_ro_info.fdm, 0); + // 3GPP TS 38.321 Section 5.1.3 says t_id for RA-RNTI depends on mu as specified in clause 5.3.2 in TS 38.211 + // so mu = 0 for prach format < 4. + const int slot = ((ra->sched_ro_info.format & 0xff) < 4) ? ra->sched_ro_info.slot >> scs : ra->sched_ro_info.slot; + ra->ra_rnti = nr_get_ra_rnti(ra->sched_ro_info.start_symbol, slot, ra->sched_ro_info.fdm, 0); if (ra->ra_type == RA_2_STEP) - ra->MsgB_rnti = nr_get_MsgB_rnti(ra->sched_ro_info.start_symbol, ra->sched_ro_info.slot, ra->sched_ro_info.fdm, 0); + ra->MsgB_rnti = nr_get_MsgB_rnti(ra->sched_ro_info.start_symbol, slot, ra->sched_ro_info.fdm, 0); } // 38.321 Section 5.1.2 Random Access Resource selection