From 8c421698c4cdcbb47ebd3359c24108455a17f17d Mon Sep 17 00:00:00 2001 From: Xue Song Date: Tue, 13 Oct 2020 09:07:19 +0000 Subject: [PATCH 1/3] modify do_RRCSetup --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index cf3daa8a18..6442214379 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -665,6 +665,7 @@ uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP, dl_ccch_msg.message.present = NR_DL_CCCH_MessageType_PR_c1; dl_ccch_msg.message.choice.c1 = CALLOC(1, sizeof(struct NR_DL_CCCH_MessageType__c1)); dl_ccch_msg.message.choice.c1->present = NR_DL_CCCH_MessageType__c1_PR_rrcSetup; + dl_ccch_msg.message.choice.c1->choice.rrcSetup = calloc(1, sizeof(NR_RRCSetup_t)); rrcSetup = dl_ccch_msg.message.choice.c1->choice.rrcSetup; rrcSetup->criticalExtensions.present = NR_RRCSetup__criticalExtensions_PR_rrcSetup; From 0f378cf3da49d5b13477a0ec82592bc9d7fba2da Mon Sep 17 00:00:00 2001 From: Xue Song Date: Tue, 13 Oct 2020 10:48:01 +0000 Subject: [PATCH 2/3] modify RRCSetup --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 6442214379..f1682d0674 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -670,6 +670,7 @@ uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP, rrcSetup = dl_ccch_msg.message.choice.c1->choice.rrcSetup; rrcSetup->criticalExtensions.present = NR_RRCSetup__criticalExtensions_PR_rrcSetup; rrcSetup->rrc_TransactionIdentifier = transaction_id; + rrcSetup->criticalExtensions.choice.rrcSetup = calloc(1, sizeof(NR_RRCSetup_IEs_t)); ie = rrcSetup->criticalExtensions.choice.rrcSetup; /****************************** radioBearerConfig ******************************/ @@ -703,15 +704,18 @@ uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP, cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); rlc_BearerConfig = calloc(1, sizeof(NR_RLC_BearerConfig_t)); rlc_BearerConfig->logicalChannelIdentity = 1; + rlc_BearerConfig->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig->servedRadioBearer)); rlc_BearerConfig->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity; rlc_BearerConfig->servedRadioBearer->choice.srb_Identity = 1; rlc_BearerConfig->reestablishRLC = NULL; rlc_Config = calloc(1, sizeof(NR_RLC_Config_t)); rlc_Config->present = NR_RLC_Config_PR_am; rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am)); + rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); *(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35; rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0; + rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); *(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45; rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity; @@ -719,6 +723,7 @@ uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP, rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; rlc_BearerConfig->rlc_Config = rlc_Config; logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); + logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); logicalChannelConfig->ul_SpecificParameters->priority = 1; logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity; logicalChannelGroup = CALLOC(1, sizeof(long)); From 9812545c61331e9c011c342a86c9b4b3dff37a06 Mon Sep 17 00:00:00 2001 From: Xue Song Date: Tue, 13 Oct 2020 11:36:52 +0000 Subject: [PATCH 3/3] modify rrc_gNB_generate_RRCSetup --- openair2/RRC/NR/rrc_gNB.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 9612bf625d..aa814bdb5c 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -347,7 +347,7 @@ rrc_gNB_generate_RRCSetup( ) //----------------------------------------------------------------------------- { - LOG_I(RRC, "rrc_gNB_generate_RRCSetup \n"); + LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup \n"); NR_SRB_ToAddModList_t *SRB_configList = NULL; // T(T_GNB_RRC_SETUP, @@ -357,7 +357,7 @@ rrc_gNB_generate_RRCSetup( // T_INT(ctxt_pP->rnti)); gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; SRB_configList = ue_p->SRB_configList; - do_RRCSetup(ctxt_pP, + ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ctxt_pP, ue_context_pP, CC_id, (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,