Commit 24c61fe1 authored by Robert Schmidt's avatar Robert Schmidt

Completely read ServingCellConfigCommon when reading conf

Before this commit, we did not read the ServingCellConfigCommon (SCC)
completely at start; rather, we read most (but not all) of it, then also
the minRXTXTIME, and at RRC initialization in
openair_rrc_gNB_configuration(), we filled the
pusch-TimeDomainAllocationList into the SCC, depending on the
minRXTXTIME.

The reason might be that we read part of the SCC, use that to fill the
NRRRC_CONFIGURATION_REQ, read also the minRXTXTIME (part of the RRC
config), and then we have all we need to "finalize the SCC". Since we
move everything to the MAC, I avoid too much upfront code changes,
hardcode the minRXTXTIME (and check with an assert), and undo this in a
later commit when the "RRC config" relevant for radio parameters, e.g.,
minRXTXTIME, is moved to MAC.

I verified the equality of the SCC before (at the end
openair_rrc_gNB_configuration()) and after (at the end of
get_scc_config()) this commit manually using a printf, assuming that
after RRC initialization, we didn't do any further modifications to the
SCC.  But in fact, I cannot know that we don't do it...
parent ddd37ca1
......@@ -875,7 +875,7 @@ void RCconfig_NR_L1(void)
static void check_ssb_raster(uint64_t freq, int band, int scs);
static NR_ServingCellConfigCommon_t *get_scc_config(void)
static NR_ServingCellConfigCommon_t *get_scc_config(int minRXTXTIME)
{
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));
uint64_t ssb_bitmap=0xff;
......@@ -911,6 +911,7 @@ static NR_ServingCellConfigCommon_t *get_scc_config(void)
*scc->ssbSubcarrierSpacing);
fix_scc(scc, ssb_bitmap);
}
nr_rrc_config_ul_tda(scc, minRXTXTIME);
return scc;
}
......@@ -1222,7 +1223,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc)
paramdef_t GNBParams[] = GNBPARAMS_DESC;
paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST,NULL,0};
NR_ServingCellConfigCommon_t *scc = get_scc_config();
int minRXTXTIME = 6;
NR_ServingCellConfigCommon_t *scc = get_scc_config(minRXTXTIME);
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
// Serving Cell Config Dedicated
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
......@@ -1376,6 +1379,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc)
NRRRC_CONFIGURATION_REQ (msg_p).pusch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr;
LOG_I(GNB_APP,"minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).minRXTXTIME = *GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr;
DevAssert(NRRRC_CONFIGURATION_REQ (msg_p).minRXTXTIME == minRXTXTIME);
LOG_I(GNB_APP,"SIB1 TDA %d\n",*GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).sib1_tda = *GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr;
LOG_I(GNB_APP,"Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr);
......
......@@ -222,6 +222,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
if((get_softmodem_params()->sa) && ( (NODE_IS_DU(rrc->node_type) || NODE_IS_MONOLITHIC(rrc->node_type)))) {
NR_BCCH_DL_SCH_Message_t *sib1 = get_SIB1_NR(configuration);
//xer_fprint(stdout, &asn_DEF_NR_BCCH_DL_SCH_Message, sib1);
rrc->carrier.SIB1 = calloc(NR_MAX_SIB_LENGTH / 8, sizeof(*rrc->carrier.SIB1));
AssertFatal(rrc->carrier.SIB1 != NULL, "out of memory\n");
rrc->carrier.sizeof_SIB1 = encode_SIB1_NR(sib1, rrc->carrier.SIB1, NR_MAX_SIB_LENGTH / 8);
......@@ -312,7 +313,6 @@ static void openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_Rrc
RB_INIT(&rrc->rrc_ue_head);
rrc->configuration = *configuration;
rrc->carrier.servingcellconfigcommon = configuration->scc;
nr_rrc_config_ul_tda(configuration->scc,configuration->minRXTXTIME);
/// System Information INIT
pthread_mutex_init(&rrc->cell_info_mutex,NULL);
rrc->cell_info_configured = 0;
......
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