Move fill_default_secondaryCellGroup() and change signature

fill_default_secondaryCellGroup() is moved to nr_rrc_config.c.
Furthermore, the signature is changes to return the NR_CellGroupConfig
from the functions, instead of filling a pre-allocated structure (which
is, in all cases, allocated just before calling
fill_default_secondaryCellGroup().

There is a problem with this function: the function also fills the
ServingCellConfig (a parameter to this function). This behavior has not
been changed.
This commit is contained in:
Robert Schmidt
2023-04-11 10:33:27 +02:00
parent c1a2b65697
commit b62474bd83
8 changed files with 433 additions and 395 deletions
+1 -2
View File
@@ -717,8 +717,7 @@ int main(int argc, char **argv)
.do_SRS = 0,
.force_256qam_off = false
};
NR_CellGroupConfig_t *secondaryCellGroup = calloc(1, sizeof(*secondaryCellGroup));
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, &conf, 0);
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */
fix_scd(scd);
+1 -2
View File
@@ -631,7 +631,6 @@ int main(int argc, char **argv)
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
prepare_scd(scd);
NR_CellGroupConfig_t *secondaryCellGroup=calloc(1,sizeof(*secondaryCellGroup));
// TODO do a UECAP for phy-sim
const gNB_RrcConfigurationReq conf = {
.pdsch_AntennaPorts = { .N1 = 1, .N2 = 1, .XP = 1 },
@@ -641,7 +640,7 @@ int main(int argc, char **argv)
.do_SRS = 0,
.force_256qam_off = false
};
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, &conf, 0);
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, NULL, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */
fix_scd(scd);