Skip to content
Snippets Groups Projects
Commit 0628d544 authored by Abhijith Atreya's avatar Abhijith Atreya
Browse files

scs and bwp location error fixed

parent 0afec1e3
No related branches found
No related tags found
6 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1555integration_2022_wk19b,!1454Implementation of multiple dedicated BWPs,!1268Integration 2021 wk37,!1238integration_2021_wk34,!1175WIP: Addition of dedicated BWPs
...@@ -326,20 +326,17 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) { ...@@ -326,20 +326,17 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
} }
/* Function to allocate dedicated serving cell config strutures */ /* Function to allocate dedicated serving cell config strutures */
void prepare_scd(NR_ServingCellConfig_t *scd, int scd_present) { void prepare_scd(NR_ServingCellConfig_t *scd) {
// Allocate downlink structures // Allocate downlink structures
scd->downlinkBWP_ToAddModList = CALLOC(1, sizeof(*scd->downlinkBWP_ToAddModList)); scd->downlinkBWP_ToAddModList = CALLOC(1, sizeof(*scd->downlinkBWP_ToAddModList));
scd->uplinkConfig = CALLOC(1, sizeof(*scd->uplinkConfig)); scd->uplinkConfig = CALLOC(1, sizeof(*scd->uplinkConfig));
scd->uplinkConfig->uplinkBWP_ToAddModList = CALLOC(1, sizeof(*scd->uplinkConfig->uplinkBWP_ToAddModList)); scd->uplinkConfig->uplinkBWP_ToAddModList = CALLOC(1, sizeof(*scd->uplinkConfig->uplinkBWP_ToAddModList));
if(scd_present)
{
scd->bwp_InactivityTimer = CALLOC(1, sizeof(*scd->bwp_InactivityTimer)); scd->bwp_InactivityTimer = CALLOC(1, sizeof(*scd->bwp_InactivityTimer));
scd->uplinkConfig->firstActiveUplinkBWP_Id = CALLOC(1, sizeof(*scd->uplinkConfig->firstActiveUplinkBWP_Id)); scd->uplinkConfig->firstActiveUplinkBWP_Id = CALLOC(1, sizeof(*scd->uplinkConfig->firstActiveUplinkBWP_Id));
scd->firstActiveDownlinkBWP_Id = CALLOC(1, sizeof(*scd->firstActiveDownlinkBWP_Id)); scd->firstActiveDownlinkBWP_Id = CALLOC(1, sizeof(*scd->firstActiveDownlinkBWP_Id));
*scd->firstActiveDownlinkBWP_Id = 1; *scd->firstActiveDownlinkBWP_Id = 1;
*scd->uplinkConfig->firstActiveUplinkBWP_Id = 1; *scd->uplinkConfig->firstActiveUplinkBWP_Id = 1;
}
for (int j = 0 ;j < 4 ; j++) for (int j = 0 ;j < 4 ; j++)
{ {
...@@ -845,9 +842,10 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { ...@@ -845,9 +842,10 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
// Serving Cell Config Dedicated // Serving Cell Config Dedicated
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t)); NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
memset((void*)scd,0,sizeof(NR_ServingCellConfig_t)); memset((void*)scd,0,sizeof(NR_ServingCellConfig_t));
paramlist_def_t SCDsParamList = {GNB_CONFIG_STRING_SERVINGCELLCONFIGDEDICATED, NULL, 0}; prepare_scd(scd);
prepare_scd(scd, SCDsParamList.numelt);
paramdef_t SCDsParams[] = SCDPARAMS_DESC(scd); paramdef_t SCDsParams[] = SCDPARAMS_DESC(scd);
paramlist_def_t SCDsParamList = {GNB_CONFIG_STRING_SERVINGCELLCONFIGDEDICATED, NULL, 0};
////////// Physical parameters ////////// Physical parameters
......
...@@ -473,12 +473,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -473,12 +473,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp=calloc(1,sizeof(*bwp)); bwp=calloc(1,sizeof(*bwp));
// copy common BWP size from initial BWP except for bandwdith // copy common BWP size from initial BWP except for bandwdith
bwp->bwp_Id = bwp_loop +1; bwp->bwp_Id = bwp_loop +1;
}
memcpy((void*)&bwp->bwp_Common->genericParameters, if(bwp->bwp_Common->genericParameters.subcarrierSpacing == 0 || bwp->bwp_Common->genericParameters.locationAndBandwidth == 0)
{
memcpy((void*)&bwp->bwp_Common->genericParameters,
&servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters, &servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters,
sizeof(bwp->bwp_Common->genericParameters)); sizeof(bwp->bwp_Common->genericParameters));
bwp->bwp_Common->genericParameters.subcarrierSpacing = 1; bwp->bwp_Common->genericParameters.subcarrierSpacing = 1;
bwp->bwp_Common->genericParameters.locationAndBandwidth=PRBalloc_to_locationandbandwidth(servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,0); bwp->bwp_Common->genericParameters.locationAndBandwidth=PRBalloc_to_locationandbandwidth(servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,0);
} }
bwp->bwp_Common->pdcch_ConfigCommon=calloc(1,sizeof(*bwp->bwp_Common->pdcch_ConfigCommon)); bwp->bwp_Common->pdcch_ConfigCommon=calloc(1,sizeof(*bwp->bwp_Common->pdcch_ConfigCommon));
...@@ -762,10 +764,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -762,10 +764,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list,bwp); ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list,bwp);
} }
if (!servingcellconfigdedicated) { //TODO : check if code goes here
secondaryCellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id));
*secondaryCellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id=1;
}
secondaryCellGroup->spCellConfig->spCellConfigDedicated->bwp_InactivityTimer = NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->bwp_InactivityTimer = NULL;
secondaryCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id = NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id = NULL;
secondaryCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id = calloc(1, sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id)); secondaryCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id = calloc(1, sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id));
......
...@@ -204,7 +204,7 @@ gNBs = ...@@ -204,7 +204,7 @@ gNBs =
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
bwp4_subcarrierSpacing = 1 ; bwp4_subcarrierSpacing = 1 ;
firstActiveDownlinkBWP-Id = 2; #BWP-Id firstActiveDownlinkBWP-Id = 1; #BWP-Id
# bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, # bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30,
# ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500, # ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500,
...@@ -214,7 +214,7 @@ gNBs = ...@@ -214,7 +214,7 @@ gNBs =
defaultDownlinkBWP-Id = 1; #BWP-Id defaultDownlinkBWP-Id = 1; #BWP-Id
# UplinkConfig # UplinkConfig
firstActiveUplinkBWP-Id = 2 ; #BWP-Id firstActiveUplinkBWP-Id = 1 ; #BWP-Id
#BWP-Uplink #BWP-Uplink
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment