Commit 578ce9eb authored by Raymond Knopp's avatar Raymond Knopp

up to RRCConnectionSetupComplete Transmission in UE

parent 3d1faefa
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "rrc_extern.h" #include "rrc_extern.h"
#include "common/ran_context.h" #include "common/ran_context.h"
#include "rrc_eNB_UE_context.h"
// undefine C_RNTI from // undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which // openair1/PHY/LTE_TRANSPORT/transport_common.h which
...@@ -179,7 +180,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -179,7 +180,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
&asn_DEF_DL_CCCH_Message, &asn_DEF_DL_CCCH_Message,
(void**)&dl_ccch_msg, (void**)&dl_ccch_msg,
ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.buf,
ie->value.choice.RRCContainer.size,0,0); rrc_dl_sdu_len,0,0);
switch (dl_ccch_msg->message.choice.c1.present) { switch (dl_ccch_msg->message.choice.c1.present) {
case DL_CCCH_MessageType__c1_PR_NOTHING: case DL_CCCH_MessageType__c1_PR_NOTHING:
...@@ -243,6 +244,18 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -243,6 +244,18 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
// This should be somewhere in the f1ap_cudu_ue_inst_t // This should be somewhere in the f1ap_cudu_ue_inst_t
int macrlc_instance = 0; int macrlc_instance = 0;
rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_ue[0],du_ue_f1ap_id);
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n");
memcpy((void*)ue_p->Srb0.Tx_buffer.Payload,
(void*)ie->value.choice.RRCContainer.buf,
rrc_dl_sdu_len);
ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len;
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
macrlc_instance, macrlc_instance,
0, //primaryCC_id, 0, //primaryCC_id,
...@@ -250,7 +263,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -250,7 +263,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
0, 0,
#endif #endif
f1ap_get_rnti_by_du_id(&f1ap_du_ue[0],du_ue_f1ap_id), //rnti rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
...@@ -462,6 +475,12 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, ...@@ -462,6 +475,12 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
return -1; return -1;
} }
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[module_idP]);
ue_context_p->ue_id_rnti = rntiP;
ue_context_p->ue_context.rnti = rntiP;
ue_context_p->ue_context.random_ue_identity = rntiP;
ue_context_p->ue_context.Srb0.Active = 1;
RB_INSERT(rrc_ue_tree_s, &RC.rrc[module_idP]->rrc_ue_head, ue_context_p);
du_f1ap_itti_send_sctp_data_req(0, f1ap_du_data->assoc_id, buffer, len, 0); du_f1ap_itti_send_sctp_data_req(0, f1ap_du_data->assoc_id, buffer, len, 0);
return 0; return 0;
} }
......
...@@ -1022,6 +1022,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1022,6 +1022,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
UE_RNTI(module_idP,UE_id),1, // 1 transport block UE_RNTI(module_idP,UE_id),1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case &cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
if (rrc_sdu_length > 0) {
LOG_D(MAC, LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n", "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length); module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
...@@ -1031,11 +1032,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1031,11 +1032,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
if (rrc_sdu_length > 0) LOG_I(MAC, LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
else LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 without RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti); module_idP, CC_idP, frameP, subframeP, ra->rnti);
/// Choose first 4 RBs for Msg4, should really check that these are free! /// Choose first 4 RBs for Msg4, should really check that these are free!
...@@ -1218,6 +1215,18 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1218,6 +1215,18 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti); set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
} }
} // CCE Allocation feasible } // CCE Allocation feasible
}
else {
LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
ra->Msg4_subframe ++;
if (ra->Msg4_subframe == 10) {
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
ra->Msg4_subframe = 0;
}
}
} // msg4 frame/subframe } // msg4 frame/subframe
} // else rach_resource_type } // else rach_resource_type
} }
......
...@@ -396,7 +396,9 @@ boolean_t pdcp_data_req( ...@@ -396,7 +396,9 @@ boolean_t pdcp_data_req(
free_mem_block(pdcp_pdu_p, __FUNCTION__); free_mem_block(pdcp_pdu_p, __FUNCTION__);
rlc_status = ack_result; rlc_status = ack_result;
} }
else else
#endif /*UETARGET*/
{ {
//It should never get here //It should never get here
rlc_status = rlc_data_req(ctxt_pP rlc_status = rlc_data_req(ctxt_pP
...@@ -413,7 +415,7 @@ boolean_t pdcp_data_req( ...@@ -413,7 +415,7 @@ boolean_t pdcp_data_req(
#endif #endif
); );
} }
#endif /*UETARGET*/
} }
switch (rlc_status) { switch (rlc_status) {
......
...@@ -690,7 +690,7 @@ void rlc_data_ind ( ...@@ -690,7 +690,7 @@ void rlc_data_ind (
sdu_pP); sdu_pP);
} }
else else
#endif /*UETARGET*/
{ {
switch (RC.rrc[ctxt_pP->module_id]->node_type){ switch (RC.rrc[ctxt_pP->module_id]->node_type){
...@@ -727,6 +727,15 @@ void rlc_data_ind ( ...@@ -727,6 +727,15 @@ void rlc_data_ind (
} }
} }
#else
pdcp_data_ind (
ctxt_pP,
srb_flagP,
MBMS_flagP,
rb_idP,
sdu_sizeP,
sdu_pP);
#endif
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void rlc_data_conf (const protocol_ctxt_t* const ctxt_pP, void rlc_data_conf (const protocol_ctxt_t* const ctxt_pP,
...@@ -797,19 +806,19 @@ rlc_module_init (void) ...@@ -797,19 +806,19 @@ rlc_module_init (void)
pool_buffer_init(); pool_buffer_init();
/*
#ifndef UETARGET #ifndef UETARGET
/* Launch the RLC listening server // Launch the RLC listening server
* as a separate thread // as a separate thread
*/
static int started = 0; static int started = 0;
if (started == 0) if (started == 0)
{ {
async_server_thread_init(); async_server_thread_init();
started = 1; started = 1;
} }
#endif /*UETARGET*/ #endif
*/
return(0); return(0);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
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