Commit 33ba50fd authored by rmagueta's avatar rmagueta

Fix SRB2 warning for SA

parent 662cda8a
...@@ -1185,11 +1185,15 @@ void fill_initial_cellGroupConfig(rnti_t rnti, ...@@ -1185,11 +1185,15 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
NR_ServingCellConfigCommon_t *scc) { NR_ServingCellConfigCommon_t *scc) {
NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL; NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL;
NR_RLC_BearerConfig_t *rlc_BearerConfig2 = NULL;
NR_RLC_Config_t *rlc_Config = NULL; NR_RLC_Config_t *rlc_Config = NULL;
NR_RLC_Config_t *rlc_Config2 = NULL;
NR_LogicalChannelConfig_t *logicalChannelConfig = NULL; NR_LogicalChannelConfig_t *logicalChannelConfig = NULL;
NR_LogicalChannelConfig_t *logicalChannelConfig2= NULL;
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = NULL; NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = NULL;
NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig = NULL; NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig = NULL;
long *logicalChannelGroup = NULL; long *logicalChannelGroup = NULL;
long *logicalChannelGroup2 = NULL;
cellGroupConfig->cellGroupId = 0; cellGroupConfig->cellGroupId = 0;
...@@ -1237,6 +1241,41 @@ void fill_initial_cellGroupConfig(rnti_t rnti, ...@@ -1237,6 +1241,41 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig);
// SRB2
rlc_BearerConfig2 = calloc(1, sizeof(NR_RLC_BearerConfig_t));
rlc_BearerConfig2->logicalChannelIdentity = 2;
rlc_BearerConfig2->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig2->servedRadioBearer));
rlc_BearerConfig2->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity;
rlc_BearerConfig2->servedRadioBearer->choice.srb_Identity = 2;
rlc_BearerConfig2->reestablishRLC = NULL;
rlc_Config2 = calloc(1, sizeof(NR_RLC_Config_t));
rlc_Config2->present = NR_RLC_Config_PR_am;
rlc_Config2->choice.am = calloc(1, sizeof(*rlc_Config2->choice.am));
rlc_Config2->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t));
*(rlc_Config2->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12;
rlc_Config2->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35;
rlc_Config2->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0;
rlc_Config2->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t));
*(rlc_Config2->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12;
rlc_Config2->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45;
rlc_Config2->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity;
rlc_Config2->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity;
rlc_Config2->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8;
rlc_BearerConfig2->rlc_Config = rlc_Config2;
logicalChannelConfig2 = calloc(1, sizeof(NR_LogicalChannelConfig_t));
logicalChannelConfig2->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig2->ul_SpecificParameters));
logicalChannelConfig2->ul_SpecificParameters->priority = 1;
logicalChannelConfig2->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
logicalChannelGroup2 = CALLOC(1, sizeof(long));
*logicalChannelGroup2 = 0;
logicalChannelConfig2->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup2;
logicalChannelConfig2->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig2->ul_SpecificParameters->schedulingRequestID));
*logicalChannelConfig2->ul_SpecificParameters->schedulingRequestID = 0;
logicalChannelConfig2->ul_SpecificParameters->logicalChannelSR_Mask = 0;
logicalChannelConfig2->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0;
rlc_BearerConfig2->mac_LogicalChannelConfig = logicalChannelConfig2;
ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig2);
cellGroupConfig->rlc_BearerToReleaseList = NULL; cellGroupConfig->rlc_BearerToReleaseList = NULL;
/* mac CellGroup Config */ /* mac CellGroup Config */
...@@ -1297,6 +1336,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -1297,6 +1336,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
NR_RRCSetup_t *rrcSetup; NR_RRCSetup_t *rrcSetup;
NR_RRCSetup_IEs_t *ie; NR_RRCSetup_IEs_t *ie;
NR_SRB_ToAddMod_t *SRB1_config = NULL; NR_SRB_ToAddMod_t *SRB1_config = NULL;
NR_SRB_ToAddMod_t *SRB2_config = NULL;
NR_PDCP_Config_t *pdcp_Config = NULL; NR_PDCP_Config_t *pdcp_Config = NULL;
NR_CellGroupConfig_t *cellGroupConfig = NULL; NR_CellGroupConfig_t *cellGroupConfig = NULL;
char masterCellGroup_buf[1000]; char masterCellGroup_buf[1000];
...@@ -1336,6 +1376,11 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -1336,6 +1376,11 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
ie->radioBearerConfig.srb_ToAddModList = *SRB_configList; ie->radioBearerConfig.srb_ToAddModList = *SRB_configList;
ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB1_config); ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB1_config);
SRB2_config = calloc(1, sizeof(NR_SRB_ToAddMod_t));
SRB2_config->srb_Identity = 2;
SRB2_config->pdcp_Config = pdcp_Config;
ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB2_config);
ie->radioBearerConfig.srb3_ToRelease = NULL; ie->radioBearerConfig.srb3_ToRelease = NULL;
ie->radioBearerConfig.drb_ToAddModList = NULL; ie->radioBearerConfig.drb_ToAddModList = NULL;
ie->radioBearerConfig.drb_ToReleaseList = NULL; ie->radioBearerConfig.drb_ToReleaseList = NULL;
......
...@@ -117,8 +117,7 @@ extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * con ...@@ -117,8 +117,7 @@ extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * con
const NR_DRB_ToAddModList_t * const drb2add_listP, const NR_DRB_ToAddModList_t * const drb2add_listP,
const NR_DRB_ToReleaseList_t * const drb2release_listP, const NR_DRB_ToReleaseList_t * const drb2release_listP,
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP, const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_srb_bearer2add_list, struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_drb_bearer2add_list);
static inline uint64_t bitStr_to_uint64(BIT_STRING_t *asn); static inline uint64_t bitStr_to_uint64(BIT_STRING_t *asn);
...@@ -502,8 +501,7 @@ rrc_gNB_generate_RRCSetup( ...@@ -502,8 +501,7 @@ rrc_gNB_generate_RRCSetup(
NULL, NULL,
NULL, NULL,
NULL, NULL,
ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList, ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList);
NULL);
nr_rrc_pdcp_config_asn1_req(ctxt_pP, nr_rrc_pdcp_config_asn1_req(ctxt_pP,
ue_context_pP->ue_context.SRB_configList, ue_context_pP->ue_context.SRB_configList,
NULL, NULL,
...@@ -1285,8 +1283,7 @@ rrc_gNB_process_RRCReconfigurationComplete( ...@@ -1285,8 +1283,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
DRB_configList, DRB_configList,
DRB_Release_configList2, DRB_Release_configList2,
NULL, NULL,
ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList, ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList);
NULL);
} }
#endif #endif
......
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