Commit 9405e6ad authored by winckel's avatar winckel

Added RRC_MAC_CCCH_SUCCESS_IND and RRC_DCCH_DATA_REQ ITTI messages definition and handling.

Removed RRC_MAC_SYNC_IND that is not used anymore.
Added ITTI messages reception in PDCP (in pdcp_run).
Added pdcp_rrc_data_req in l2 interface.
Fixed warning.

pre-ci ok.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4290 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 33d621c4
...@@ -9,13 +9,14 @@ MESSAGE_DEF(RRC_UE_EUTRA_CAPABILITY, MESSAGE_PRIORITY_MED_PLUS, RrcUeEutraCap ...@@ -9,13 +9,14 @@ MESSAGE_DEF(RRC_UE_EUTRA_CAPABILITY, MESSAGE_PRIORITY_MED_PLUS, RrcUeEutraCap
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages from MAC layer // Messages from MAC layer
MESSAGE_DEF(RRC_MAC_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacSyncInd, rrc_mac_sync_ind)
MESSAGE_DEF(RRC_MAC_IN_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacInSyncInd, rrc_mac_in_sync_ind) MESSAGE_DEF(RRC_MAC_IN_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacInSyncInd, rrc_mac_in_sync_ind)
MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSyncInd, rrc_mac_out_of_sync_ind) MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSyncInd, rrc_mac_out_of_sync_ind)
MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind) MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind) MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind)
MESSAGE_DEF(RRC_MAC_CCCH_SUCCESS_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchSuccessInd, rrc_mac_ccch_success_ind)
MESSAGE_DEF(RRC_MAC_MCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataInd, rrc_mac_mcch_data_ind) MESSAGE_DEF(RRC_MAC_MCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataInd, rrc_mac_mcch_data_ind)
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages from PDCP layer // Messages from/to PDCP layer
MESSAGE_DEF(RRC_DCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcDcchDataReq, rrc_dcch_data_req)
MESSAGE_DEF(RRC_DCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcDcchDataInd, rrc_dcch_data_ind) MESSAGE_DEF(RRC_DCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcDcchDataInd, rrc_dcch_data_ind)
...@@ -13,13 +13,14 @@ ...@@ -13,13 +13,14 @@
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Defines to access message fields. // Defines to access message fields.
#define RRC_MAC_SYNC_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_sync_ind
#define RRC_MAC_IN_SYNC_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_in_sync_ind #define RRC_MAC_IN_SYNC_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_in_sync_ind
#define RRC_MAC_OUT_OF_SYNC_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_out_of_sync_ind #define RRC_MAC_OUT_OF_SYNC_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_out_of_sync_ind
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_bcch_data_ind #define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_bcch_data_ind
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_data_ind #define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_data_ind
#define RRC_MAC_CCCH_SUCCESS_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_success_ind
#define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_mcch_data_ind #define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_mcch_data_ind
#define RRC_DCCH_DATA_REQ(mSGpTR) (mSGpTR)->msg.rrc_dcch_data_req
#define RRC_DCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_dcch_data_ind #define RRC_DCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_dcch_data_ind
typedef UE_EUTRA_Capability_t RrcUeEutraCapability; typedef UE_EUTRA_Capability_t RrcUeEutraCapability;
...@@ -27,10 +28,6 @@ typedef UE_EUTRA_Capability_t RrcUeEutraCapability; ...@@ -27,10 +28,6 @@ typedef UE_EUTRA_Capability_t RrcUeEutraCapability;
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages from MAC layer // Messages from MAC layer
typedef struct {
uint8_t status;
} RrcMacSyncInd;
typedef struct { typedef struct {
uint32_t frame; uint32_t frame;
uint16_t enb_index; uint16_t enb_index;
...@@ -47,6 +44,10 @@ typedef struct { ...@@ -47,6 +44,10 @@ typedef struct {
typedef RrcMacBcchDataInd RrcMacCcchDataInd; typedef RrcMacBcchDataInd RrcMacCcchDataInd;
typedef struct {
uint8_t enb_index;
} RrcMacCcchSuccessInd;
typedef struct { typedef struct {
uint32_t frame; uint32_t frame;
uint32_t sdu_size; uint32_t sdu_size;
...@@ -56,7 +57,18 @@ typedef struct { ...@@ -56,7 +57,18 @@ typedef struct {
} RrcMacMcchDataInd; } RrcMacMcchDataInd;
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages from PDCP layer // Messages from/to PDCP layer
typedef struct {
uint32_t frame;
uint8_t enb_flag;
uint32_t rb_id;
uint32_t muip;
uint32_t confirmp;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t mode;
} RrcDcchDataReq;
typedef struct { typedef struct {
uint32_t frame; uint32_t frame;
......
...@@ -56,6 +56,10 @@ ...@@ -56,6 +56,10 @@
# include "UTIL/OSA/osa_defs.h" # include "UTIL/OSA/osa_defs.h"
#endif #endif
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
#define PDCP_DATA_REQ_DEBUG 0 #define PDCP_DATA_REQ_DEBUG 0
#define PDCP_DATA_IND_DEBUG 0 #define PDCP_DATA_IND_DEBUG 0
...@@ -471,11 +475,16 @@ BOOL pdcp_data_ind(module_id_t module_id, u32_t frame, u8_t eNB_flag, rb_id_t rb ...@@ -471,11 +475,16 @@ BOOL pdcp_data_ind(module_id_t module_id, u32_t frame, u8_t eNB_flag, rb_id_t rb
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pdcp_run (u32_t frame, u8 eNB_flag, u8 UE_index, u8 eNB_index) { void pdcp_run (u32_t frame, u8 eNB_flag, u8 UE_index, u8 eNB_index) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if defined(ENABLE_ITTI)
MessageDef *msg_p;
char *msg_name;
instance_t instance;
#endif
#ifndef NAS_NETLINK #ifndef NAS_NETLINK
#ifdef USER_MODE #ifdef USER_MODE
#define PDCP_DUMMY_BUFFER_SIZE 38 #define PDCP_DUMMY_BUFFER_SIZE 38
unsigned char pdcp_dummy_buffer[PDCP_DUMMY_BUFFER_SIZE]; // unsigned char pdcp_dummy_buffer[PDCP_DUMMY_BUFFER_SIZE];
#endif #endif
#endif #endif
// unsigned int diff, i, k, j; // unsigned int diff, i, k, j;
...@@ -488,6 +497,40 @@ void pdcp_run (u32_t frame, u8 eNB_flag, u8 UE_index, u8 eNB_index) { ...@@ -488,6 +497,40 @@ void pdcp_run (u32_t frame, u8 eNB_flag, u8 UE_index, u8 eNB_index) {
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_IN); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_IN);
#if defined(ENABLE_ITTI)
do {
// Checks if a message has been sent to PDCP sub-task
itti_poll_msg (TASK_PDCP, INSTANCE_ALL, &msg_p);
if (msg_p != NULL) {
msg_name = ITTI_MSG_NAME (msg_p);
instance = ITTI_MSG_INSTANCE (msg_p);
switch (msg_p->header.messageId) {
case RRC_DCCH_DATA_REQ:
LOG_D(PDCP, "Received %s: instance %d, frame %d, eNB_flag %d, rb_id %d, muiP %d, confirmP %d, mode %d\n", msg_name, instance,
RRC_DCCH_DATA_REQ (msg_p).frame, RRC_DCCH_DATA_REQ (msg_p).enb_flag, RRC_DCCH_DATA_REQ (msg_p).rb_id,
RRC_DCCH_DATA_REQ (msg_p).muip, RRC_DCCH_DATA_REQ (msg_p).confirmp, RRC_DCCH_DATA_REQ (msg_p).mode);
pdcp_data_req (instance, RRC_DCCH_DATA_REQ (msg_p).frame, RRC_DCCH_DATA_REQ (msg_p).enb_flag,
RRC_DCCH_DATA_REQ (msg_p).rb_id, RRC_DCCH_DATA_REQ (msg_p).muip,
RRC_DCCH_DATA_REQ (msg_p).confirmp, RRC_DCCH_DATA_REQ (msg_p).sdu_size,
RRC_DCCH_DATA_REQ (msg_p).sdu_p, RRC_DCCH_DATA_REQ (msg_p).mode);
// Message buffer has been processed, free it now.
free (RRC_DCCH_DATA_REQ (msg_p).sdu_p);
break;
default:
LOG_E(PDCP, "Received unexpected message %s\n", itti_get_message_name(msg_p->header.messageId));
break;
}
free (msg_p);
}
} while(msg_p != NULL);
#endif
/* /*
if ((frame % 128) == 0) { if ((frame % 128) == 0) {
for (i=0; i < NB_UE_INST; i++) { for (i=0; i < NB_UE_INST; i++) {
......
...@@ -115,6 +115,17 @@ void rlcrrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, un ...@@ -115,6 +115,17 @@ void rlcrrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, un
#endif //CELLULAR #endif //CELLULAR
} }
/********************************************************************************************************************/
u8 pdcp_rrc_data_req(u8 module_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32 muiP, u32 confirmP,
unsigned int sdu_buffer_size, u8* sdu_buffer, u8 mode) {
/********************************************************************************************************************/
#ifdef CELLULAR
return pdcp_data_req( module_id, frame, eNB_flag, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer, mode);
#else
return rrc_lite_data_req (module_id, frame, eNB_flag, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer, mode);
#endif
}
/********************************************************************************************************************/ /********************************************************************************************************************/
void pdcp_rrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size,u8 *Buffer){ void pdcp_rrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size,u8 *Buffer){
/********************************************************************************************************************/ /********************************************************************************************************************/
......
...@@ -40,16 +40,22 @@ ...@@ -40,16 +40,22 @@
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
s8 mac_rrc_data_req( u8 Mod_id, u32 frame, u16 Srb_id, u8 Nb_tb,u8 *Buffer,u8 eNB_flag,u8 eNB_index, u8 mbsfn_sync_area); s8 mac_rrc_data_req(u8 Mod_id, u32 frame, u16 Srb_id, u8 Nb_tb, u8 *Buffer, u8 eNB_flag, u8 eNB_index,
s8 mac_rrc_data_ind( u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 Sdu_len,u8 eNB_flag, u8 eNB_index,u8 mbsfn_sync_area); u8 mbsfn_sync_area);
void mac_lite_sync_ind( u8 Mod_id, u8 status); s8 mac_rrc_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 Sdu_len, u8 eNB_flag, u8 eNB_index,
void mac_rrc_meas_ind(u8,MAC_MEAS_REQ_ENTRY*); u8 mbsfn_sync_area);
void rlcrrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag,unsigned int Rb_id, u32 sdu_size,u8 *Buffer); void mac_lite_sync_ind(u8 Mod_id, u8 status);
void pdcp_rrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size,u8 *Buffer); void mac_rrc_meas_ind(u8, MAC_MEAS_REQ_ENTRY*);
void mac_out_of_sync_ind(u8 Mod_id,u32 frame,u16 CH_index); void rlcrrc_data_ind(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Rb_id, u32 sdu_size, u8 *Buffer);
u8 pdcp_rrc_data_req(u8 module_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32 muiP, u32 confirmP,
unsigned int sdu_buffer_size, u8* sdu_buffer, u8 mode);
void pdcp_rrc_data_ind(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size, u8 *Buffer);
void mac_out_of_sync_ind(u8 Mod_id, u32 frame, u16 CH_index);
char openair_rrc_eNB_init(u8 Mod_id); char openair_rrc_eNB_init(u8 Mod_id);
char openair_rrc_ue_init(u8 Mod_id, unsigned char eNB_index); char openair_rrc_ue_init(u8 Mod_id, unsigned char eNB_index);
int mac_get_rrc_status(u8 Mod_id,u8 eNB_flag,u8 index); int mac_get_rrc_status(u8 Mod_id, u8 eNB_flag, u8 index);
void mac_in_sync_ind(u8 Mod_id,u32 frame, u16 eNB_index); void mac_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index);
#endif #endif
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
//#include "openair_rrc_utils.h" //#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h" //#include "openair_rrc_main.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "pdcp.h"
#ifdef PHY_EMUL #ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h" #include "SIMULATION/simulation_defs.h"
...@@ -61,15 +62,10 @@ extern UE_MAC_INST *UE_mac_inst; ...@@ -61,15 +62,10 @@ extern UE_MAC_INST *UE_mac_inst;
u32 mui=0; u32 mui=0;
s8 mac_rrc_lite_data_req( u8 Mod_id, //-------------------------------------------------------------------------------------------//
u32 frame, s8 mac_rrc_lite_data_req(u8 Mod_id, u32 frame, u16 Srb_id, u8 Nb_tb, char *Buffer, u8 eNB_flag, u8 eNB_index,
u16 Srb_id, u8 mbsfn_sync_area) {
u8 Nb_tb, //-------------------------------------------------------------------------------------------//
char *Buffer,
u8 eNB_flag,
u8 eNB_index,
u8 mbsfn_sync_area){
SRB_INFO *Srb_info; SRB_INFO *Srb_info;
u8 Sdu_size=0; u8 Sdu_size=0;
...@@ -182,8 +178,9 @@ s8 mac_rrc_lite_data_req( u8 Mod_id, ...@@ -182,8 +178,9 @@ s8 mac_rrc_lite_data_req( u8 Mod_id,
return(0); return(0);
} }
//-------------------------------------------------------------------------------------------//
s8 mac_rrc_lite_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 sdu_size,u8 eNB_flag,u8 eNB_index,u8 mbsfn_sync_area){ s8 mac_rrc_lite_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 sdu_size,u8 eNB_flag,u8 eNB_index,u8 mbsfn_sync_area){
//-------------------------------------------------------------------------------------------//
SRB_INFO *Srb_info; SRB_INFO *Srb_info;
/* /*
int si_window; int si_window;
...@@ -333,27 +330,51 @@ s8 mac_rrc_lite_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 sdu_size ...@@ -333,27 +330,51 @@ s8 mac_rrc_lite_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 sdu_size
} }
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// this function is Not USED anymore
void mac_lite_sync_ind(u8 Mod_id,u8 Status){ void mac_lite_sync_ind(u8 Mod_id,u8 Status){
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
}
//-------------------------------------------------------------------------------------------//
u8 rrc_lite_data_req(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32 muiP, u32 confirmP,
unsigned int sdu_size, u8* Buffer, u8 mode) {
//-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
MessageDef *message_p; MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
u8 *message_buffer;
message_buffer = malloc (sdu_size);
memcpy (message_buffer, Buffer, sdu_size);
message_p = itti_alloc_new_message (TASK_MAC, RRC_MAC_SYNC_IND); message_p = itti_alloc_new_message (TASK_RRC_UE, RRC_DCCH_DATA_REQ);
RRC_MAC_SYNC_IND(message_p).status = Status; RRC_DCCH_DATA_REQ (message_p).frame = frame;
RRC_DCCH_DATA_REQ (message_p).enb_flag = eNB_flag;
RRC_DCCH_DATA_REQ (message_p).rb_id = rb_id;
RRC_DCCH_DATA_REQ (message_p).muip = muiP;
RRC_DCCH_DATA_REQ (message_p).confirmp = confirmP;
RRC_DCCH_DATA_REQ (message_p).sdu_size = sdu_size;
RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer;
RRC_DCCH_DATA_REQ (message_p).mode = mode;
itti_send_msg_to_task (TASK_PDCP, Mod_id, message_p);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
itti_send_msg_to_task (TASK_RRC_UE, Mod_id, message_p);
} }
#else
return pdcp_data_req (Mod_id, frame, eNB_flag, rb_id, muiP, confirmP, sdu_size, Buffer, mode);
#endif #endif
} }
// this function is Not USED anymore //-------------------------------------------------------------------------------------------//
void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag,u32 Srb_id, u32 sdu_size,u8 *Buffer){ void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag,u32 Srb_id, u32 sdu_size,u8 *Buffer){
//-------------------------------------------------------------------------------------------//
u8 UE_index=(Srb_id-1)/NB_RB_MAX; u8 UE_index=(Srb_id-1)/NB_RB_MAX;
u8 DCCH_index = Srb_id % NB_RB_MAX; u8 DCCH_index = Srb_id % NB_RB_MAX;
LOG_N(RRC,"[%s %d] Frame %d: received a DCCH %d message on SRB %d with Size %d (Deprecated function)\n", LOG_N(RRC,"[%s %d] Frame %d: received a DCCH %d message on SRB %d with Size %d\n",
(eNB_flag == 1)? "eNB": "UE", (eNB_flag == 1)? "eNB": "UE",
(eNB_flag == 1)? Mod_id : UE_index, (eNB_flag == 1)? Mod_id : UE_index,
frame, DCCH_index,Srb_id-1,sdu_size); frame, DCCH_index,Srb_id-1,sdu_size);
...@@ -387,7 +408,9 @@ void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag,u32 Srb_id, u32 sdu_si ...@@ -387,7 +408,9 @@ void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag,u32 Srb_id, u32 sdu_si
} }
//-------------------------------------------------------------------------------------------//
void rrc_lite_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index) { void rrc_lite_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index) {
//-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
MessageDef *message_p; MessageDef *message_p;
...@@ -404,8 +427,10 @@ void rrc_lite_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index) { ...@@ -404,8 +427,10 @@ void rrc_lite_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index) {
UE_rrc_inst[Mod_id].Info[eNB_index].N311_cnt++; UE_rrc_inst[Mod_id].Info[eNB_index].N311_cnt++;
#endif #endif
} }
void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index){
//-------------------------------------------------------------------------------------------//
void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index){
//-------------------------------------------------------------------------------------------//
// rlc_info_t rlc_infoP; // rlc_info_t rlc_infoP;
// rlc_infoP.rlc_mode=RLC_UM; // rlc_infoP.rlc_mode=RLC_UM;
...@@ -431,16 +456,30 @@ void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index){ ...@@ -431,16 +456,30 @@ void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index){
} }
//-------------------------------------------------------------------------------------------//
int mac_get_rrc_lite_status(u8 Mod_id,u8 eNB_flag,u8 index){ int mac_get_rrc_lite_status(u8 Mod_id,u8 eNB_flag,u8 index){
//-------------------------------------------------------------------------------------------//
if(eNB_flag == 1) if(eNB_flag == 1)
return(eNB_rrc_inst[Mod_id].Info.Status[index]); return(eNB_rrc_inst[Mod_id].Info.Status[index]);
else else
return(UE_rrc_inst[Mod_id].Info[index].State); return(UE_rrc_inst[Mod_id].Info[index].State);
} }
//-------------------------------------------------------------------------------------------//
int mac_ue_ccch_success_ind(u8 Mod_id, u8 eNB_index) { int mac_ue_ccch_success_ind(u8 Mod_id, u8 eNB_index) {
//-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_MAC, RRC_MAC_CCCH_SUCCESS_IND);
RRC_MAC_CCCH_SUCCESS_IND (message_p).enb_index = eNB_index;
itti_send_msg_to_task (TASK_RRC_UE, Mod_id - NB_eNB_INST, message_p);
}
#else
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds) // reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.payload_size=0; UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.payload_size=0;
#endif
return 0; return 0;
} }
...@@ -146,6 +146,7 @@ uint8_t do_MBSFNAreaConfig(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -146,6 +146,7 @@ uint8_t do_MBSFNAreaConfig(LTE_DL_FRAME_PARMS *frame_parms,
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration); MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
#endif #endif
uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,int rsrq_s,long rsrp_t,long rsrq_t);
OAI_UECapability_t *fill_ue_capability(); OAI_UECapability_t *fill_ue_capability();
......
...@@ -469,6 +469,8 @@ void *rrc_ue_task(void *args_p); ...@@ -469,6 +469,8 @@ void *rrc_ue_task(void *args_p);
s8 mac_rrc_lite_data_req( u8 Mod_id, u32 frame, unsigned short Srb_id, u8 Nb_tb,char *Buffer,u8 eNB_flag, u8 eNB_index, u8 mbsfn_sync_area); s8 mac_rrc_lite_data_req( u8 Mod_id, u32 frame, unsigned short Srb_id, u8 Nb_tb,char *Buffer,u8 eNB_flag, u8 eNB_index, u8 mbsfn_sync_area);
s8 mac_rrc_lite_data_ind( u8 Mod_id, u32 frame, unsigned short Srb_id, u8 *Sdu, unsigned short Sdu_len,u8 eNB_flag,u8 eNB_index, u8 mbsfn_sync_area); s8 mac_rrc_lite_data_ind( u8 Mod_id, u32 frame, unsigned short Srb_id, u8 *Sdu, unsigned short Sdu_len,u8 eNB_flag,u8 eNB_index, u8 mbsfn_sync_area);
void mac_sync_ind( u8 Mod_id, u8 status); void mac_sync_ind( u8 Mod_id, u8 status);
u8 rrc_lite_data_req(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32 muiP, u32 confirmP,
unsigned int sdu_size, u8* Buffer, u8 mode);
void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, u32 Rb_id, u32 sdu_size,u8 *Buffer); void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, u32 Rb_id, u32 sdu_size,u8 *Buffer);
void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, unsigned short eNB_index); void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, unsigned short eNB_index);
......
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
//#include "RRC/LITE/MESSAGES/asn1_msg.h" #ifndef CELLULAR
#include "RRC/LITE/MESSAGES/asn1_msg.h"
#endif
#include "RRCConnectionRequest.h" #include "RRCConnectionRequest.h"
#include "RRCConnectionReconfiguration.h" #include "RRCConnectionReconfiguration.h"
#include "UL-CCCH-Message.h" #include "UL-CCCH-Message.h"
...@@ -73,6 +75,8 @@ ...@@ -73,6 +75,8 @@
# include "UTIL/OSA/osa_defs.h" # include "UTIL/OSA/osa_defs.h"
#endif #endif
#include "pdcp.h"
#ifdef PHY_EMUL #ifdef PHY_EMUL
extern EMULATION_VARS *Emul_vars; extern EMULATION_VARS *Emul_vars;
#endif #endif
...@@ -244,7 +248,7 @@ void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_ind ...@@ -244,7 +248,7 @@ void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_ind
frame, Mod_id+NB_eNB_INST, size, eNB_index, rrc_mui, Mod_id+NB_eNB_INST, DCCH); frame, Mod_id+NB_eNB_INST, size, eNB_index, rrc_mui, Mod_id+NB_eNB_INST, DCCH);
// rrc_rlc_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,size,(char*)buffer); // rrc_rlc_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,size,(char*)buffer);
pdcp_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,size,(char*)buffer,1); pdcp_rrc_data_req (Mod_id + NB_eNB_INST, frame, 0, DCCH, rrc_mui++, 0, size, buffer, 1);
} }
...@@ -262,11 +266,11 @@ void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame, ...@@ -262,11 +266,11 @@ void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame,
frame, Mod_id+NB_eNB_INST, size, eNB_index, rrc_mui, Mod_id+NB_eNB_INST, DCCH); frame, Mod_id+NB_eNB_INST, size, eNB_index, rrc_mui, Mod_id+NB_eNB_INST, DCCH);
//rrc_rlc_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,size,(char*)buffer); //rrc_rlc_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,size,(char*)buffer);
pdcp_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,size,(char*)buffer,1); pdcp_rrc_data_req (Mod_id + NB_eNB_INST, frame, 0, DCCH, rrc_mui++, 0, size, buffer, 1);
} }
void rrc_ue_generate_MeasurementReport(u8 Mod_id,u8 eNB_index) { void rrc_ue_generate_MeasurementReport(u8 Mod_id, u32 frame, u8 eNB_index) {
u8 buffer[32], size; u8 buffer[32], size;
...@@ -277,7 +281,7 @@ void rrc_ue_generate_MeasurementReport(u8 Mod_id,u8 eNB_index) { ...@@ -277,7 +281,7 @@ void rrc_ue_generate_MeasurementReport(u8 Mod_id,u8 eNB_index) {
LOG_D(RLC, "[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionReconfigurationComplete to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n", LOG_D(RLC, "[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionReconfigurationComplete to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
Mac_rlc_xface->frame, Mod_id+NB_eNB_INST, size, eNB_index, rrc_mui, Mod_id+NB_eNB_INST, DCCH); Mac_rlc_xface->frame, Mod_id+NB_eNB_INST, size, eNB_index, rrc_mui, Mod_id+NB_eNB_INST, DCCH);
//rrc_rlc_data_req(Mod_id+NB_eNB_INST,DCCH,rrc_mui++,0,size,(char*)buffer); //rrc_rlc_data_req(Mod_id+NB_eNB_INST,DCCH,rrc_mui++,0,size,(char*)buffer);
pdcp_data_req(Mod_id+NB_eNB_INST,DCCH,rrc_mui++,0,size,(char*)buffer,1); pdcp_rrc_data_req (Mod_id + NB_eNB_INST, frame, 0, DCCH, rrc_mui++, 0, size, buffer, 1);
} }
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
...@@ -287,7 +291,7 @@ int rrc_ue_decode_ccch(u8 Mod_id, u32 frame, SRB_INFO *Srb_info, u8 eNB_index){ ...@@ -287,7 +291,7 @@ int rrc_ue_decode_ccch(u8 Mod_id, u32 frame, SRB_INFO *Srb_info, u8 eNB_index){
//DL_CCCH_Message_t dlccchmsg; //DL_CCCH_Message_t dlccchmsg;
DL_CCCH_Message_t *dl_ccch_msg=NULL;//&dlccchmsg; DL_CCCH_Message_t *dl_ccch_msg=NULL;//&dlccchmsg;
asn_dec_rval_t dec_rval; asn_dec_rval_t dec_rval;
int i,rval=0; int rval=0;
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH, VCD_FUNCTION_IN); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH, VCD_FUNCTION_IN);
...@@ -423,7 +427,9 @@ s32 rrc_ue_establish_srb2(u8 Mod_id,u32 frame,u8 eNB_index, ...@@ -423,7 +427,9 @@ s32 rrc_ue_establish_srb2(u8 Mod_id,u32 frame,u8 eNB_index,
s32 rrc_ue_establish_drb(u8 Mod_id,u32 frame,u8 eNB_index, s32 rrc_ue_establish_drb(u8 Mod_id,u32 frame,u8 eNB_index,
struct DRB_ToAddMod *DRB_config) { // add descriptor from RRC PDU struct DRB_ToAddMod *DRB_config) { // add descriptor from RRC PDU
#ifdef NAS_NETLINK
int oip_ifup=0,ip_addr_offset3=0,ip_addr_offset4=0; int oip_ifup=0,ip_addr_offset3=0,ip_addr_offset4=0;
#endif
LOG_I(RRC,"[UE] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n", LOG_I(RRC,"[UE] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n",
frame,DRB_config->drb_Identity,(int)*DRB_config->logicalChannelIdentity); frame,DRB_config->drb_Identity,(int)*DRB_config->logicalChannelIdentity);
...@@ -484,7 +490,6 @@ void rrc_ue_process_measConfig(u8 Mod_id,u8 eNB_index,MeasConfig_t *measConfig) ...@@ -484,7 +490,6 @@ void rrc_ue_process_measConfig(u8 Mod_id,u8 eNB_index,MeasConfig_t *measConfig)
int i; int i;
long ind; long ind;
MeasObjectToAddMod_t *measObj; MeasObjectToAddMod_t *measObj;
MeasObjectEUTRA_t *measObjd;
if (measConfig->measObjectToRemoveList != NULL) { if (measConfig->measObjectToRemoveList != NULL) {
for (i=0;i<measConfig->measObjectToRemoveList->list.count;i++) { for (i=0;i<measConfig->measObjectToRemoveList->list.count;i++) {
...@@ -839,7 +844,7 @@ void rrc_ue_process_radioResourceConfigDedicated(u8 Mod_id,u32 frame, u8 eNB_ind ...@@ -839,7 +844,7 @@ void rrc_ue_process_radioResourceConfigDedicated(u8 Mod_id,u32 frame, u8 eNB_ind
// Establish DRBs if present // Establish DRBs if present
if (radioResourceConfigDedicated->drb_ToAddModList) { if (radioResourceConfigDedicated->drb_ToAddModList) {
uint8_t *kUPenc; uint8_t *kUPenc = NULL;
#if defined(ENABLE_SECURITY) #if defined(ENABLE_SECURITY)
derive_key_up_enc(UE_rrc_inst[Mod_id].integrity_algorithm, derive_key_up_enc(UE_rrc_inst[Mod_id].integrity_algorithm,
...@@ -927,7 +932,6 @@ void rrc_ue_process_securityModeCommand(uint8_t Mod_id,uint32_t frame,SecurityMo ...@@ -927,7 +932,6 @@ void rrc_ue_process_securityModeCommand(uint8_t Mod_id,uint32_t frame,SecurityMo
UL_DCCH_Message_t ul_dcch_msg; UL_DCCH_Message_t ul_dcch_msg;
// SecurityModeCommand_t SecurityModeCommand; // SecurityModeCommand_t SecurityModeCommand;
DL_DCCH_Message_t *dl_dcch_msg=NULL;
uint8_t buffer[200]; uint8_t buffer[200];
int i, securityMode; int i, securityMode;
...@@ -1001,12 +1005,12 @@ void rrc_ue_process_securityModeCommand(uint8_t Mod_id,uint32_t frame,SecurityMo ...@@ -1001,12 +1005,12 @@ void rrc_ue_process_securityModeCommand(uint8_t Mod_id,uint32_t frame,SecurityMo
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"securityModeComplete Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC, "securityModeComplete Encoded %d bits (%d bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
#endif #endif
for (i=0;i<(enc_rval.encoded+7)/8;i++) for (i = 0; i < (enc_rval.encoded + 7) / 8; i++)
LOG_T(RRC,"%02x.",buffer[i]); LOG_T(RRC, "%02x.", buffer[i]);
LOG_T(RRC,"\n"); LOG_T(RRC, "\n");
pdcp_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,(enc_rval.encoded+7)/8,(char*)buffer,1); pdcp_rrc_data_req (Mod_id + NB_eNB_INST, frame, 0, DCCH, rrc_mui++, 0, (enc_rval.encoded + 7) / 8, buffer, 1);
} }
} }
...@@ -1066,16 +1070,21 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili ...@@ -1066,16 +1070,21 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"UECapabilityInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"UECapabilityInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
for (i=0;i<(enc_rval.encoded+7)/8;i++) for (i = 0; i < (enc_rval.encoded + 7) / 8; i++)
LOG_T(RRC,"%02x.",buffer[i]); LOG_T(RRC, "%02x.", buffer[i]);
LOG_T(RRC,"\n"); LOG_T(RRC, "\n");
pdcp_data_req(Mod_id+NB_eNB_INST,frame, 0 ,DCCH,rrc_mui++,0,(enc_rval.encoded+7)/8,(char*)buffer,1); pdcp_rrc_data_req (Mod_id + NB_eNB_INST, frame, 0, DCCH, rrc_mui++, 0, (enc_rval.encoded + 7) / 8, buffer, 1);
} }
} }
} }
} }
} }
void rrc_ue_process_mobilityControlInfo(u8 Mod_id,u8 eNB_index,struct MobilityControlInfo *mobilityControlInfo) {
}
void rrc_ue_process_rrcConnectionReconfiguration(u8 Mod_id, u32 frame, void rrc_ue_process_rrcConnectionReconfiguration(u8 Mod_id, u32 frame,
RRCConnectionReconfiguration_t *rrcConnectionReconfiguration, RRCConnectionReconfiguration_t *rrcConnectionReconfiguration,
u8 eNB_index) { u8 eNB_index) {
...@@ -1105,11 +1114,6 @@ void rrc_ue_process_rrcConnectionReconfiguration(u8 Mod_id, u32 frame, ...@@ -1105,11 +1114,6 @@ void rrc_ue_process_rrcConnectionReconfiguration(u8 Mod_id, u32 frame,
} // critical extensions present } // critical extensions present
} }
void rrc_ue_process_mobilityControlInfo(u8 Mod_id,u8 eNB_index,struct MobilityControlInfo *mobilityControlInfo) {
}
/*------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------*/
void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index){ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index){
/*------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------*/
...@@ -1117,7 +1121,7 @@ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index) ...@@ -1117,7 +1121,7 @@ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index)
//DL_DCCH_Message_t dldcchmsg; //DL_DCCH_Message_t dldcchmsg;
DL_DCCH_Message_t *dl_dcch_msg=NULL;//&dldcchmsg; DL_DCCH_Message_t *dl_dcch_msg=NULL;//&dldcchmsg;
// asn_dec_rval_t dec_rval; // asn_dec_rval_t dec_rval;
int i; // int i;
if (Srb_id != 1) { if (Srb_id != 1) {
LOG_E(RRC,"[UE %d] Frame %d: Received message on DL-DCCH (SRB1), should not have ...\n",Mod_id,frame); LOG_E(RRC,"[UE %d] Frame %d: Received message on DL-DCCH (SRB1), should not have ...\n",Mod_id,frame);
...@@ -1217,7 +1221,7 @@ int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_le ...@@ -1217,7 +1221,7 @@ int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_le
SystemInformation_t **si=UE_rrc_inst[Mod_id].si[eNB_index]; SystemInformation_t **si=UE_rrc_inst[Mod_id].si[eNB_index];
asn_dec_rval_t dec_rval; asn_dec_rval_t dec_rval;
uint32_t si_window;//, sib1_decoded=0, si_decoded=0; uint32_t si_window;//, sib1_decoded=0, si_decoded=0;
int i; // int i;
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN);
...@@ -1297,7 +1301,6 @@ int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_le ...@@ -1297,7 +1301,6 @@ int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_le
int decode_SIB1(u8 Mod_id,u8 eNB_index) { int decode_SIB1(u8 Mod_id,u8 eNB_index) {
asn_dec_rval_t dec_rval;
SystemInformationBlockType1_t **sib1=&UE_rrc_inst[Mod_id].sib1[eNB_index]; SystemInformationBlockType1_t **sib1=&UE_rrc_inst[Mod_id].sib1[eNB_index];
int i; int i;
......
...@@ -384,8 +384,7 @@ void *rrc_ue_task(void *args_p) { ...@@ -384,8 +384,7 @@ void *rrc_ue_task(void *args_p) {
itti_mark_task_ready (TASK_RRC_UE); itti_mark_task_ready (TASK_RRC_UE);
while(1) while(1) {
{
// Wait for a message // Wait for a message
itti_receive_msg (TASK_RRC_UE, &msg_p); itti_receive_msg (TASK_RRC_UE, &msg_p);
...@@ -445,6 +444,14 @@ void *rrc_ue_task(void *args_p) { ...@@ -445,6 +444,14 @@ void *rrc_ue_task(void *args_p) {
free (RRC_MAC_CCCH_DATA_IND (msg_p).sdu_p); free (RRC_MAC_CCCH_DATA_IND (msg_p).sdu_p);
break; break;
case RRC_MAC_CCCH_SUCCESS_IND:
LOG_D(RRC, "Received %s: instance %d, eNB %d\n", msg_name, instance,
RRC_MAC_CCCH_SUCCESS_IND (msg_p).enb_index);
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst[instance].Srb0[RRC_MAC_CCCH_SUCCESS_IND (msg_p).enb_index].Tx_buffer.payload_size = 0;
break;
#ifdef Rel10 #ifdef Rel10
case RRC_MAC_MCCH_DATA_IND: case RRC_MAC_MCCH_DATA_IND:
LOG_D(RRC, "Received %s: instance %d, frame %d, eNB %d, mbsfn SA %d\n", msg_name, instance, LOG_D(RRC, "Received %s: instance %d, frame %d, eNB %d, mbsfn SA %d\n", msg_name, instance,
...@@ -477,6 +484,6 @@ void *rrc_ue_task(void *args_p) { ...@@ -477,6 +484,6 @@ void *rrc_ue_task(void *args_p) {
} }
free (msg_p); free (msg_p);
} }
} }
#endif #endif
...@@ -384,15 +384,14 @@ void *l2l1_task(void *args_p) { ...@@ -384,15 +384,14 @@ void *l2l1_task(void *args_p) {
for (frame = 0; frame < oai_emulation.info.n_frames; frame++) { for (frame = 0; frame < oai_emulation.info.n_frames; frame++) {
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
do {
// Checks if a message has been sent to L2L1 task // Checks if a message has been sent to L2L1 task
itti_poll_msg(TASK_L2L1, INSTANCE_ALL, &message_p); itti_poll_msg (TASK_L2L1, INSTANCE_ALL, &message_p);
if(message_p != NULL) if (message_p != NULL) {
{ switch (message_p->header.messageId) {
switch(message_p->header.messageId)
{
case TERMINATE_MESSAGE: case TERMINATE_MESSAGE:
itti_exit_task(); itti_exit_task ();
break; break;
case MESSAGE_TEST: case MESSAGE_TEST:
...@@ -404,8 +403,9 @@ void *l2l1_task(void *args_p) { ...@@ -404,8 +403,9 @@ void *l2l1_task(void *args_p) {
break; break;
} }
free(message_p); free (message_p);
} }
} while(message_p != 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