Commit 1d66b5c4 authored by francescomani's avatar francescomani

attempting to fix wrong implementation in NSA UE configuration

parent 09665eeb
...@@ -316,7 +316,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, ...@@ -316,7 +316,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
// carrier config // carrier config
LOG_D(MAC, "Entering UE Config Common\n"); LOG_D(MAC, "Entering UE Config Common\n");
AssertFatal(scc==NULL,"scc cannot be null\n"); AssertFatal(scc!=NULL,"scc cannot be null\n");
if (scc) { if (scc) {
cfg->carrier_config.dl_bandwidth = config_bandwidth(scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing, cfg->carrier_config.dl_bandwidth = config_bandwidth(scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
......
...@@ -201,25 +201,23 @@ extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * con ...@@ -201,25 +201,23 @@ extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * con
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list); struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded) // from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded)
int8_t nr_rrc_ue_decode_secondary_cellgroup_config( int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const module_id_t module_id,
const module_id_t module_id,
const uint8_t *buffer, const uint8_t *buffer,
const uint32_t size ){ const uint32_t size){
NR_CellGroupConfig_t *cell_group_config = NULL; NR_CellGroupConfig_t *cell_group_config = NULL;
uint32_t i; uint32_t i;
asn_dec_rval_t dec_rval = uper_decode_complete( NULL, asn_dec_rval_t dec_rval = uper_decode(NULL,
&asn_DEF_NR_CellGroupConfig, &asn_DEF_NR_CellGroupConfig,
(void **)&cell_group_config, (void **)&cell_group_config,
(uint8_t *)buffer, (uint8_t *)buffer,
size ); size, 0, 0);
if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) {
printf("NR_CellGroupConfig decode error\n"); printf("NR_CellGroupConfig decode error\n");
for (i=0; i<size; i++){ for (i=0; i<size; i++)
printf("%02x ",buffer[i]); printf("%02x ",buffer[i]);
}
printf("\n"); printf("\n");
// free the memory // free the memory
SEQUENCE_free( &asn_DEF_NR_CellGroupConfig, (void *)cell_group_config, 1 ); SEQUENCE_free( &asn_DEF_NR_CellGroupConfig, (void *)cell_group_config, 1 );
...@@ -234,8 +232,6 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config( ...@@ -234,8 +232,6 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config(
SEQUENCE_free(&asn_DEF_NR_CellGroupConfig, (void *)cell_group_config, 0); SEQUENCE_free(&asn_DEF_NR_CellGroupConfig, (void *)cell_group_config, 0);
} }
//nr_rrc_mac_config_req_ue( 0,0,0,NULL, cell_group_config->mac_CellGroupConfig, cell_group_config->physicalCellGroupConfig, cell_group_config->spCellConfig );
return 0; return 0;
} }
...@@ -262,6 +258,9 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR ...@@ -262,6 +258,9 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR
} }
} }
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->secondaryCellGroup != NULL){ if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->secondaryCellGroup != NULL){
if(get_softmodem_params()->sa) {
NR_CellGroupConfig_t *cellGroupConfig = NULL; NR_CellGroupConfig_t *cellGroupConfig = NULL;
uper_decode(NULL, uper_decode(NULL,
&asn_DEF_NR_CellGroupConfig, //might be added prefix later &asn_DEF_NR_CellGroupConfig, //might be added prefix later
...@@ -282,6 +281,11 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR ...@@ -282,6 +281,11 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR
nr_rrc_ue_process_scg_config(module_id,cellGroupConfig); nr_rrc_ue_process_scg_config(module_id,cellGroupConfig);
} }
} }
else
nr_rrc_ue_decode_secondary_cellgroup_config(module_id,
rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->secondaryCellGroup->buf,
rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->secondaryCellGroup->size);
}
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->measConfig != NULL){ if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->measConfig != NULL){
if(NR_UE_rrc_inst[module_id].meas_config == NULL){ if(NR_UE_rrc_inst[module_id].meas_config == NULL){
NR_UE_rrc_inst[module_id].meas_config = rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->measConfig; NR_UE_rrc_inst[module_id].meas_config = rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->measConfig;
...@@ -317,7 +321,7 @@ int8_t nr_rrc_ue_process_meas_config(NR_MeasConfig_t *meas_config){ ...@@ -317,7 +321,7 @@ int8_t nr_rrc_ue_process_meas_config(NR_MeasConfig_t *meas_config){
int8_t nr_rrc_ue_process_scg_config(const module_id_t module_id, NR_CellGroupConfig_t *cell_group_config){ int8_t nr_rrc_ue_process_scg_config(const module_id_t module_id, NR_CellGroupConfig_t *cell_group_config){
int i; int i;
if(NR_UE_rrc_inst[module_id].cell_group_config==NULL){ if(cell_group_config==NULL){
// initial list // initial list
if(cell_group_config->spCellConfig != NULL){ if(cell_group_config->spCellConfig != NULL){
if(cell_group_config->spCellConfig->spCellConfigDedicated != NULL){ if(cell_group_config->spCellConfig->spCellConfigDedicated != NULL){
......
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