Commit 310b97f9 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

Fix RRCConnectionSetup Issue during testcase 8.1.2.2

parent c17712d3
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
#include "SIMULATION/TOOLS/sim.h" // for taus #include "SIMULATION/TOOLS/sim.h" // for taus
bool RRCConnSetup_PDU_Present = false; bool RRCConnSetup_PDU_Present = false;
uint8_t RRCConnSetup_PDUSize = 0; uint8_t RRCMsgOnSRB0_PDUSize = 0;
uint8_t RRCConnSetup_PDU[100]; uint8_t RRCMsgOnSRB0_PDU[100];
#define ASN_MAX_ENCODE_SIZE 4096 #define ASN_MAX_ENCODE_SIZE 4096
#define NUMBEROF_DRBS_TOBE_ADDED 1 #define NUMBEROF_DRBS_TOBE_ADDED 1
...@@ -1529,6 +1529,13 @@ rrc_eNB_generate_RRCConnectionReject( ...@@ -1529,6 +1529,13 @@ rrc_eNB_generate_RRCConnectionReject(
ue_p->Srb0.Tx_buffer.payload_size = ue_p->Srb0.Tx_buffer.payload_size =
do_RRCConnectionReject(ctxt_pP->module_id, do_RRCConnectionReject(ctxt_pP->module_id,
(uint8_t *) ue_p->Srb0.Tx_buffer.Payload); (uint8_t *) ue_p->Srb0.Tx_buffer.Payload);
if((RC.ss.mode != SS_ENB) && (RRCMsgOnSRB0_PDUSize > 0)) {
memcpy(ue_p->Srb0.Tx_buffer.Payload,RRCMsgOnSRB0_PDU,RRCMsgOnSRB0_PDUSize);
LOG_A(RRC,"RRC CCCH PDU overwritten , size: %d \n",RRCMsgOnSRB0_PDUSize);
ue_p->Srb0.Tx_buffer.payload_size= RRCMsgOnSRB0_PDUSize;
}
LOG_DUMPMSG(RRC,DEBUG_RRC, LOG_DUMPMSG(RRC,DEBUG_RRC,
(char *)(ue_p->Srb0.Tx_buffer.Payload), (char *)(ue_p->Srb0.Tx_buffer.Payload),
ue_p->Srb0.Tx_buffer.payload_size, ue_p->Srb0.Tx_buffer.payload_size,
...@@ -7055,13 +7062,12 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -7055,13 +7062,12 @@ rrc_eNB_generate_RRCConnectionSetup(
0,//rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id), 0,//rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
SRB_configList, SRB_configList,
&ue_context_pP->ue_context.physicalConfigDedicated); &ue_context_pP->ue_context.physicalConfigDedicated);
if((RRCConnSetup_PDU_Present == true) && (RRCConnSetup_PDUSize > 0))
if((RC.ss.mode != SS_ENB) && (RRCConnSetup_PDU_Present == true) && (RRCConnSetup_PDUSize > 0)) if((RC.ss.mode != SS_ENB) && (RRCConnSetup_PDU_Present == true) && (RRCMsgOnSRB0_PDUSize > 0))
{ {
memcpy(ue_p->Srb0.Tx_buffer.Payload,RRCConnSetup_PDU,RRCConnSetup_PDUSize); memcpy(ue_p->Srb0.Tx_buffer.Payload,RRCMsgOnSRB0_PDU,RRCMsgOnSRB0_PDUSize);
LOG_A(RRC,"RRC CCCH PDU overwritten , size: %d \n",RRCConnSetup_PDUSize); LOG_A(RRC,"RRC CCCH PDU overwritten , size: %d \n",RRCMsgOnSRB0_PDUSize);
ue_p->Srb0.Tx_buffer.payload_size= RRCConnSetup_PDUSize; ue_p->Srb0.Tx_buffer.payload_size= RRCMsgOnSRB0_PDUSize;
} }
} }
...@@ -7290,8 +7296,8 @@ char openair_rrc_eNB_configuration( ...@@ -7290,8 +7296,8 @@ char openair_rrc_eNB_configuration(
LOG_D(RRC,"Update config from TTCN RRCConnSetup_PDU_Present %d \n",RRCConnSetup_PDU_Present); LOG_D(RRC,"Update config from TTCN RRCConnSetup_PDU_Present %d \n",RRCConnSetup_PDU_Present);
if(RRCConnSetup_PDU_Present == true) if(RRCConnSetup_PDU_Present == true)
{ {
RRCConnSetup_PDUSize = configuration->RlcPduCCCH_Size; RRCMsgOnSRB0_PDUSize = configuration->RlcPduCCCH_Size;
memcpy(RRCConnSetup_PDU,configuration->RlcPduCCCH,RRCConnSetup_PDUSize); memcpy(RRCMsgOnSRB0_PDU,configuration->RlcPduCCCH,RRCMsgOnSRB0_PDUSize);
} }
} }
/* /*
...@@ -8141,9 +8147,9 @@ rrc_eNB_decode_ccch( ...@@ -8141,9 +8147,9 @@ rrc_eNB_decode_ccch(
if ((RC.ss.mode == SS_ENB) || (true == RRCConnSetup_PDU_Present)) if ((RC.ss.mode == SS_ENB) || (true == RRCConnSetup_PDU_Present))
{ {
rrc_eNB_generate_RRCConnectionSetup(ctxt_pP, ue_context_p, CC_id); rrc_eNB_generate_RRCConnectionSetup(ctxt_pP, ue_context_p, CC_id);
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT "CALLING RLC CONFIG SRB1 (rbid %d)\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT "CALLING RLC CONFIG SRB1 (rbid %d),RRCConnSetup_PDU_Present: %d \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
Idx); Idx,RRCConnSetup_PDU_Present);
rrc_pdcp_config_asn1_req(ctxt_pP, rrc_pdcp_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList, ue_context_p->ue_context.SRB_configList,
(LTE_DRB_ToAddModList_t *)NULL, (LTE_DRB_ToAddModList_t *)NULL,
...@@ -10441,6 +10447,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -10441,6 +10447,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
else else
{ {
struct rrc_eNB_ue_context_s *ue_context_pP = NULL; struct rrc_eNB_ue_context_s *ue_context_pP = NULL;
LTE_DL_CCCH_Message_t *dl_ccch_msg=NULL;
ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[instance], SS_RRC_PDU_REQ(msg_p).rnti); ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[instance], SS_RRC_PDU_REQ(msg_p).rnti);
LOG_A(RRC, "Genreating RRC-CS from TTCN message RRC_PDU_REQ\n"); LOG_A(RRC, "Genreating RRC-CS from TTCN message RRC_PDU_REQ\n");
module_id_t Idx; module_id_t Idx;
...@@ -10448,9 +10455,16 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -10448,9 +10455,16 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
ctxt.module_id, msg_p->ittiMsgHeader.lte_time.frame, instance); ctxt.module_id, msg_p->ittiMsgHeader.lte_time.frame, instance);
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
RRCConnSetup_PDU_Present = true; uper_decode(NULL,
RRCConnSetup_PDUSize = SS_RRC_PDU_REQ(msg_p).sdu_size; &asn_DEF_LTE_DL_CCCH_Message,
memcpy(RRCConnSetup_PDU, SS_RRC_PDU_REQ(msg_p).sdu, SS_RRC_PDU_REQ(msg_p).sdu_size); (void **)&dl_ccch_msg,
(uint8_t *)SS_RRC_PDU_REQ(msg_p).sdu,
SS_RRC_PDU_REQ(msg_p).sdu_size,0,0);
xer_fprint(stdout,&asn_DEF_LTE_DL_CCCH_Message,(void *)dl_ccch_msg);
RRCMsgOnSRB0_PDUSize = SS_RRC_PDU_REQ(msg_p).sdu_size;
memcpy(RRCMsgOnSRB0_PDU, SS_RRC_PDU_REQ(msg_p).sdu, SS_RRC_PDU_REQ(msg_p).sdu_size);
Idx = DCCH; Idx = DCCH;
// SRB1 // SRB1
...@@ -10472,7 +10486,12 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -10472,7 +10486,12 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
&DCCH_LCHAN_DESC, &DCCH_LCHAN_DESC,
LCHAN_DESC_SIZE); LCHAN_DESC_SIZE);
rrc_eNB_generate_RRCConnectionSetup(&ctxt, ue_context_pP, 0); if (dl_ccch_msg->message.choice.c1.present == LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup) {
RRCConnSetup_PDU_Present = true;
rrc_eNB_generate_RRCConnectionSetup(&ctxt, ue_context_pP, 0);
} else if (dl_ccch_msg->message.choice.c1.present == LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReject) {
rrc_eNB_generate_RRCConnectionReject(&ctxt, ue_context_pP, 0);
}
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT "CALLING RLC CONFIG SRB1 (rbid %d)\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT "CALLING RLC CONFIG SRB1 (rbid %d)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt), PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt),
......
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