diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index ccee11d37e..e297c16c62 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -5266,7 +5266,9 @@ int get_FeedbackDisabled(NR_DownlinkHARQ_FeedbackDisabled_r17_t *downlinkHARQ_Fe return (downlinkHARQ_FeedbackDisabled_r17->buf[byte_index] >> (7 - bit_index)) & 1; } -int nr_get_prach_mu(const NR_MsgA_ConfigCommon_r16_t *msgacc, const NR_RACH_ConfigCommon_t *rach_ConfigCommon) +int nr_get_prach_or_ul_mu(const NR_MsgA_ConfigCommon_r16_t *msgacc, + const NR_RACH_ConfigCommon_t *rach_ConfigCommon, + const int ul_mu) { int mu; @@ -5278,7 +5280,8 @@ int nr_get_prach_mu(const NR_MsgA_ConfigCommon_r16_t *msgacc, const NR_RACH_Conf // Choose Subcarrier Spacing of configuration file of 4-Step mu = *rach_ConfigCommon->msg1_SubcarrierSpacing; } else - AssertFatal(false, "PRACH subcarrier spacing mandatory present for L139, not supported otherwise\n"); + // Return invalid UL mu + mu = ul_mu; return mu; } diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index cb0d5a9611..923585205a 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -334,6 +334,6 @@ int get_nrofHARQ_ProcessesForPDSCH(const NR_UE_ServingCell_Info_t *sc_info); int get_nrofHARQ_ProcessesForPUSCH(const NR_UE_ServingCell_Info_t *sc_info); -int nr_get_prach_mu(const NR_MsgA_ConfigCommon_r16_t *msgacc, const NR_RACH_ConfigCommon_t *rach_ConfigCommon); +int nr_get_prach_or_ul_mu(const NR_MsgA_ConfigCommon_r16_t *msgacc, const NR_RACH_ConfigCommon_t *rach_ConfigCommon, const int ul_mu); #endif diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index e3407c95b3..da72d9d41a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1849,7 +1849,8 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) int unpaired = mac->phy_config.config_req.cell_config.frame_duplex_type; const int64_t *prach_config_info_p = get_prach_config_info(mac->frequency_range, config_index, unpaired); - int mu = nr_get_prach_mu(mac->current_UL_BWP->msgA_ConfigCommon_r16, setup); + const int ul_mu = mac->current_UL_BWP->scs; + const int mu = nr_get_prach_or_ul_mu(mac->current_UL_BWP->msgA_ConfigCommon_r16, setup, ul_mu); // Identify the proper PRACH Configuration Index table according to the operating frequency LOG_D(NR_MAC,"mu = %u, PRACH config index = %u, unpaired = %u\n", mu, config_index, unpaired); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index d4b9c973ee..4fe4574209 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -92,7 +92,8 @@ static int16_t ssb_index_from_prach(module_id_t module_idP, NR_MsgA_ConfigCommon_r16_t *msgacc = NULL; if (scc->uplinkConfigCommon->initialUplinkBWP->ext1 && scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16) msgacc = scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16->choice.setup; - int mu = nr_get_prach_mu(msgacc, rach_ConfigCommon); + const int ul_mu = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; + const int mu = nr_get_prach_or_ul_mu(msgacc, rach_ConfigCommon, ul_mu); get_nr_prach_info_from_index(config_index, (int)frameP, @@ -199,7 +200,8 @@ void find_SSB_and_RO_available(gNB_MAC_INST *nrmac) NR_MsgA_ConfigCommon_r16_t *msgacc = NULL; if (scc->uplinkConfigCommon->initialUplinkBWP->ext1 && scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16) msgacc = scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16->choice.setup; - int mu = nr_get_prach_mu(msgacc, rach_ConfigCommon); + const int ul_mu = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; + const int mu = nr_get_prach_or_ul_mu(msgacc, rach_ConfigCommon, ul_mu); // prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4 get_nr_prach_occasion_info_from_index(config_index, @@ -366,7 +368,6 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP NR_MsgA_ConfigCommon_r16_t *msgacc = NULL; if (scc->uplinkConfigCommon->initialUplinkBWP->ext1 && scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16) msgacc = scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16->choice.setup; - int mu = nr_get_prach_mu(msgacc, rach_ConfigCommon); int slots_frame = gNB->frame_structure.numb_slots_frame; int index = ul_buffer_index(frameP, slotP, slots_frame, gNB->UL_tti_req_ahead_size); nfapi_nr_ul_tti_request_t *UL_tti_req = &RC.nrmac[module_idP]->UL_tti_req_ahead[0][index]; @@ -385,6 +386,8 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP int bwp_start = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); uint8_t fdm = cfg->prach_config.num_prach_fd_occasions.value; + const int ul_mu = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; + const int mu = nr_get_prach_or_ul_mu(msgacc, rach_ConfigCommon, ul_mu); // prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4 if (get_nr_prach_info_from_index(config_index, (int)frameP,