Commit 5744749e authored by luis_pereira87's avatar luis_pereira87

Make NR_BCCH_DL_SCH_Message_t (SIB1) available at MAC gNB

parent aa9e3069
......@@ -796,9 +796,9 @@ int main(int argc, char **argv)
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, scc, NULL, 0, 0, NULL);
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, scc, NULL, NULL, 0, 0, NULL);
// UE dedicated configuration
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, scc, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, scc, NULL, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
// reset preprocessor to the one of DLSIM after it has been set during
// rrc_mac_config_req_gNB
gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
......
......@@ -732,9 +732,9 @@ int main(int argc, char **argv)
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, scc, &rrc.carrier.mib,0, 0, NULL);
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 0, 0, NULL);
// UE dedicated configuration
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, scc, &rrc.carrier.mib,1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
frame_parms->nb_antennas_tx = n_tx;
frame_parms->nb_antennas_rx = n_rx;
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
......
......@@ -2035,6 +2035,7 @@ void configure_gnb_du_mac(int inst) {
rrc->configuration.sib1_tda,
rrc->configuration.scc,
NULL,
NULL,
0,
0, // rnti
(NR_CellGroupConfig_t *)NULL
......
......@@ -431,9 +431,10 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int sib1_tda,
NR_ServingCellConfigCommon_t *scc,
NR_BCCH_BCH_Message_t *mib,
int add_ue,
NR_BCCH_DL_SCH_Message_t *sib1,
int add_ue,
uint32_t rnti,
NR_CellGroupConfig_t *CellGroup) {
NR_CellGroupConfig_t *CellGroup) {
if (scc != NULL ) {
AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present);
......@@ -531,8 +532,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
}
}
if (mib) RC.nrmac[Mod_idP]->common_channels[0].mib = mib;
if (mib) RC.nrmac[Mod_idP]->common_channels[0].mib = mib;
if (sib1) RC.nrmac[Mod_idP]->common_channels[0].sib1 = sib1;
if (CellGroup) {
const NR_ServingCellConfig_t *servingCellConfig = CellGroup->spCellConfig->spCellConfigDedicated;
......
......@@ -52,8 +52,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int sib1_tda,
NR_ServingCellConfigCommon_t *scc,
NR_BCCH_BCH_Message_t *mib,
int add_ue,
uint32_t rnti,
NR_BCCH_DL_SCH_Message_t *sib1,
int add_ue,
uint32_t rnti,
NR_CellGroupConfig_t *CellGroup);
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
......
......@@ -186,6 +186,7 @@ typedef struct {
lte_frame_type_t frame_type;
uint64_t dl_CarrierFreq;
NR_BCCH_BCH_Message_t *mib;
NR_BCCH_DL_SCH_Message_t *sib1;
NR_ServingCellConfigCommon_t *ServingCellConfigCommon;
NR_ARFCN_ValueEUTRA_t ul_CarrierFreq;
long ul_Bandwidth;
......
......@@ -183,16 +183,16 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
if (NODE_IS_MONOLITHIC(rrc->node_type)){
rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts,
rrc->carrier.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts,
rrc->carrier.sib1_tda,
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon,
&rrc->carrier.mib,
0,
0, // WIP hardcoded rnti
(NR_CellGroupConfig_t *)NULL
);
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon,
&rrc->carrier.mib,
rrc->carrier.siblock1,
0,
0, // WIP hardcoded rnti
(NR_CellGroupConfig_t *)NULL);
}
/* set flag to indicate that cell information is configured. This is required
......@@ -294,16 +294,17 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
rrc_gNB_ue_context_t *const ue_context_pP,
const protocol_ctxt_t *const ctxt_pP ) {
rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts,
rrc->carrier.sib1_tda,
NULL,
NULL,
0,
ue_context_pP->ue_context.rnti,
get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : (NR_CellGroupConfig_t *)NULL);
rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts,
rrc->carrier.sib1_tda,
NULL,
NULL,
NULL,
0,
ue_context_pP->ue_context.rnti,
get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : (NR_CellGroupConfig_t *)NULL);
nr_rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_pP->ue_context.SRB_configList,
......@@ -494,6 +495,7 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
rrc_instance_p->carrier.sib1_tda,
(NR_ServingCellConfigCommon_t *)rrc_instance_p->carrier.servingcellconfigcommon,
&rrc_instance_p->carrier.mib,
rrc_instance_p->carrier.siblock1,
0,
ue_context_pP->ue_context.rnti,
(NR_CellGroupConfig_t *)NULL
......@@ -1259,6 +1261,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
rrc->carrier.sib1_tda,
NULL,
NULL,
NULL,
0,
ue_context_pP->ue_context.rnti,
ue_context_pP->ue_context.masterCellGroup
......
......@@ -384,6 +384,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
rrc->carrier.sib1_tda,
rrc->carrier.servingcellconfigcommon,
&rrc->carrier.mib,
NULL,
1, // add_ue flag
ue_context_p->ue_id_rnti,
ue_context_p->ue_context.secondaryCellGroup);
......@@ -395,6 +396,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
rrc->carrier.sib1_tda,
NULL,
NULL,
NULL,
1, // add_ue flag
ue_context_p->ue_id_rnti,
ue_context_p->ue_context.secondaryCellGroup);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment