diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 07ef3be1d4..c783d17b28 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -227,11 +227,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) if (nr_prach == 1) { L1_nsa_prach_procedures(ul_info.frame_tx, ul_info.slot_tx); - /* Fill rach indication here and send to proxy. Basically take pieces from - L1_nr_prach_procedures() and send it to the proxy. prach from ue->gNb->gnb sends rach->ue receives rach - The UE is basically filling the rach and proxy will receive and think that it came from the gNB. The - received rach in the proxy will trigger gNB to send back the RAR. RAR will go to proxy then goes to UE - and the UE will get the DCI for RAR and the payload. have to handle receving the RAR once we get it. */ LOG_I(NR_PHY, "Calling nr_Msg1_transmitted for slot %d\n", ul_info.slot_tx); nr_Msg1_transmitted(mod_id, CC_id, ul_info.frame_tx, gNB_id); //This is called when phy layer has sent the prach } diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 9a6ad89d86..62905f74f1 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -704,21 +704,7 @@ int phy_nr_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_nr_rach_ind { if(NFAPI_MODE == NFAPI_MODE_VNF) { - for (int i = 0; i < ind->number_of_pdus; i++) { - LOG_I(NR_MAC, "%s() NFAPI SFN:%d/SLOT:%d number_of_preambles:%u\n", __FUNCTION__, ind->sfn, ind->slot, ind->pdu_list[i].num_preamble); - - UL_INFO.rach_ind = *ind; - - const int num_p = ind->pdu_list[i].num_preamble; - if (num_p > 0) - { - UL_INFO.rach_ind.pdu_list[i].preamble_list = calloc(num_p, sizeof(nfapi_nr_prach_indication_preamble_t)); - for (int j = 0; j < num_p; j++) - { - UL_INFO.rach_ind.pdu_list[i].preamble_list[j] = ind->pdu_list[i].preamble_list[j]; - } - } - } + UL_INFO.rach_ind = *ind; } else { LOG_E(NR_MAC, "NFAPI_MODE = %d not NFAPI_MODE_VNF(2)\n", nfapi_getmode()); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index ac3a4e77d2..bb831bdea7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -286,7 +286,11 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP }else if (N_RA_slot <= 1) { //1 PRACH slot in a subframe slot_index = 0; } - + const uint8_t slots_per_frame[5] = {10, 20, 40, 80, 160}; + const int n = slots_per_frame[*scc->ssbSubcarrierSpacing]; + for (int i = 0; i < n; ++i) { + RC.nrmac[module_idP]->UL_tti_req_ahead[0][i].SFN = (frameP != 1023) ? frameP + 1 : 0; + } UL_tti_req->SFN = frameP; UL_tti_req->Slot = slotP; for (int fdm_index=0; fdm_index < fdm; fdm_index++) { // one structure per frequency domain occasion diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index 7f6654aaf2..4735a3f2bd 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -57,7 +57,7 @@ extern NR_UL_IND_t UL_INFO; void handle_nr_rach(NR_UL_IND_t *UL_info) { if (UL_INFO.rach_ind.number_of_pdus>0) { - LOG_I(MAC,"Melissa UL_INFO[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n", + LOG_I(MAC,"UL_INFO[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n", UL_INFO.frame,UL_INFO.slot, UL_INFO.rach_ind.sfn,UL_INFO.rach_ind.slot); int npdus = UL_INFO.rach_ind.number_of_pdus; for(int i = 0; i < npdus; i++) {