diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 8cc1bda7828bb3f1dfde92f7e862157906e6c9b8..eabadc619387d4441444145aef78e4e32c3f6a19 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -1687,7 +1687,6 @@ int nr_config_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_config_re nfapi_nr_start_request_scf_t req; NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Received NFAPI_CONFIG_RESP idx:%d phy_id:%d\n", p5_idx, resp->header.phy_id); NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Calling oai_enb_init()\n"); - oai_enb_init(); // TODO: change to gnb memset(&req, 0, sizeof(req)); req.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_REQUEST; req.header.phy_id = resp->header.phy_id; diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 0f4e0539f263146b009efcd361edb4d315c5426f..770bae5b5d8e033c1e88111a4acc44600bd1bd16 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -489,23 +489,21 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, scc); LOG_D(NR_MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req); - // if in nFAPI mode - if ( (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) && (RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req == NULL) ){ - while(RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req == NULL) { - // DJP AssertFatal(RC.nrmac[Mod_idP]->if_inst->PHY_config_req != NULL,"if_inst->phy_config_request is null\n"); - usleep(100 * 1000); - printf("Waiting for PHY_config_req\n"); - } + if (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) { + // fake that the gNB is configured in nFAPI mode, which would normally be + // done in a NR_PHY_config_req, but in this mode, there is no PHY + RC.gNB[Mod_idP]->configured = 1; + } else { + NR_PHY_Config_t phycfg = { + .Mod_id = Mod_idP, + .CC_id = 0, + .cfg = &RC.nrmac[Mod_idP]->config[0] + }; + DevAssert(RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req); + RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req(&phycfg); } - RC.nrmac[Mod_idP]->minRXTXTIMEpdsch = minRXTXTIMEpdsch; - - NR_PHY_Config_t phycfg; - phycfg.Mod_id = Mod_idP; - phycfg.CC_id = 0; - phycfg.cfg = &RC.nrmac[Mod_idP]->config[0]; - - if (RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req) RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req(&phycfg); + RC.nrmac[Mod_idP]->minRXTXTIMEpdsch = minRXTXTIMEpdsch; find_SSB_and_RO_available(Mod_idP); const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;