Commit aa4d373c authored by winckel's avatar winckel

Updated some log messages format.

Added PHY_FIND_CELL_REQ sent to PHY when starting RRC.
Fixed an issue with ITTI tasks creation with RTAI builds.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4726 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b610aa4c
......@@ -208,7 +208,7 @@ static Enb_properties_t *enb_properties[] =
};
/*------------------------------------------------------------------------------*/
static void configure_rrc()
static void configure_rrc(void)
{
uint32_t eNB_id_start = 0;
uint32_t eNB_id_end = 1;
......
......@@ -709,8 +709,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
uint8_t MBMS_flag
#endif
) {
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part,*sib3_part;
#ifdef Rel10
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib13_part;
......@@ -723,23 +721,23 @@ uint8_t do_SIB23(uint8_t Mod_id,
if (bcch_message)
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
else {
LOG_E(RRC,"BCCH_MESSAGE is null, exiting\n");
LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id);
exit(-1);
}
if (!sib2) {
LOG_E(RRC,"sib2 is null, exiting\n");
LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id);
exit(-1);
}
if (!sib3) {
LOG_E(RRC,"sib3 is null, exiting\n");
LOG_E(RRC,"[eNB %d] sib3 is null, exiting\n", Mod_id);
exit(-1);
}
#ifdef Rel10
LOG_I(RRC,"Configuration SIB2/3, MBMS = %d\n",MBMS_flag);
LOG_I(RRC,"[eNB %d] Configuration SIB2/3, MBMS = %d\n", Mod_id, MBMS_flag);
#else
LOG_I(RRC,"Configuration SIB2/3\n");
LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id);
#endif
sib2_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
sib3_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
......
......@@ -2431,7 +2431,7 @@ void *rrc_ue_task(void *args_p) {
/* MAC messages */
case RRC_MAC_IN_SYNC_IND:
LOG_I(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name,
LOG_D(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name,
RRC_MAC_IN_SYNC_IND (msg_p).frame, RRC_MAC_IN_SYNC_IND (msg_p).enb_index);
UE_rrc_inst[Mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N310_cnt = 0;
......@@ -2447,7 +2447,7 @@ void *rrc_ue_task(void *args_p) {
break;
case RRC_MAC_BCCH_DATA_IND:
LOG_I(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name,
LOG_D(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name,
RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index);
decode_BCCH_DLSCH_Message (Mod_id, RRC_MAC_BCCH_DATA_IND (msg_p).frame,
......@@ -2525,12 +2525,23 @@ void *rrc_ue_task(void *args_p) {
itti_send_msg_to_task(TASK_L2L1, NB_eNB_INST + Mod_id, message_p);
UE_rrc_inst[Mod_id].RrcState = RRC_STATE_IDLE;
break;
/* Fall through to next case */
}
case RRC_STATE_IDLE:
{
/* Ask to layer 1 to find a cell matching the criterion */
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_CELL_REQ);
PHY_FIND_CELL_REQ (message_p).earfcn_start = 1;
PHY_FIND_CELL_REQ (message_p).earfcn_end = 1;
itti_send_msg_to_task(TASK_PHY_UE, NB_eNB_INST + Mod_id, message_p);
break;
}
case RRC_STATE_CONNECTED:
/* should not happen */
......
......@@ -186,7 +186,7 @@ static void init_SI (u8 Mod_id
);
else
{
LOG_E (RRC, "[eNB] init_SI: FATAL, no memory for SIB1 allocated\n");
LOG_E (RRC, "[eNB %d] init_SI: FATAL, no memory for SIB1 allocated\n", Mod_id);
mac_xface->macphy_exit ("");
}
/*
......@@ -200,16 +200,12 @@ static void init_SI (u8 Mod_id
eNB_rrc_inst[Mod_id].SIB23 = (u8 *) malloc16 (64);
if (eNB_rrc_inst[Mod_id].SIB23) {
eNB_rrc_inst[Mod_id].sizeof_SIB23 = do_SIB23 (Mod_id,
mac_xface->
lte_frame_parms,
eNB_rrc_inst[Mod_id].
SIB23,
&eNB_rrc_inst[Mod_id].
systemInformation,
&eNB_rrc_inst[Mod_id].
sib2,
eNB_rrc_inst[Mod_id].SIB23,
&eNB_rrc_inst[Mod_id].systemInformation,
&eNB_rrc_inst[Mod_id].sib2,
&eNB_rrc_inst[Mod_id].sib3
#ifdef Rel10
,
......@@ -259,10 +255,8 @@ static void init_SI (u8 Mod_id
eNB_rrc_inst[Mod_id].sib2->radioResourceConfigCommon.
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
#ifdef Rel10
if (eNB_rrc_inst[Mod_id].MBMS_flag > 0) {
for (i=0;
i< eNB_rrc_inst[Mod_id].sib2->mbsfn_SubframeConfigList->list.count;
i++){
......@@ -289,13 +283,11 @@ static void init_SI (u8 Mod_id
eNB_rrc_inst[Mod_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_D (RRC, "[eNB %d] MCCH Offset: %d\n", Mod_id,
eNB_rrc_inst[Mod_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
}
}
#endif
LOG_D (RRC,
"[MSC_MSG][FRAME unknown][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SIB1.tdd & SIB2 params) --->][MAC_UE][MOD %02d][]\n",
LOG_D (RRC, "[MSC_MSG][FRAME unknown][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SIB1.tdd & SIB2 params) --->][MAC_UE][MOD %02d][]\n",
Mod_id, Mod_id);
rrc_mac_config_req (Mod_id, 1, 0, 0,
......@@ -2421,6 +2413,8 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
LOG_D (RRC, "[MSC_NEW][FRAME 00000][RRC_eNB][MOD %02d][]\n", Mod_id);
LOG_D (RRC, "[MSC_NEW][FRAME 00000][IP][MOD %02d][]\n", Mod_id);
DevAssert(eNB_rrc_inst != NULL);
for (j = 0; j < NUMBER_OF_UE_MAX; j++)
eNB_rrc_inst[Mod_id].Info.UE[j].Status = RRC_IDLE; //CH_READY;
......@@ -2460,15 +2454,14 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
/// System Information INIT
LOG_I (RRC, "Checking release \n");
LOG_I (RRC, "[eNB %d] Checking release \n", Mod_id);
#ifdef Rel10
// Thishas to come from some top-level configuration
printf ("Rel10 RRC detected, MBMS flag %d\n",
eNB_rrc_inst[Mod_id].MBMS_flag);
// This has to come from some top-level configuration
LOG_I (RRC, "[eNB %d] Rel10 RRC detected, MBMS flag %d\n", Mod_id, eNB_rrc_inst[Mod_id].MBMS_flag);
#else
printf ("Rel8 RRC\n");
LOG_I (RRC, "[eNB %d] Rel8 RRC\n", Mod_id);
#endif
#ifdef CBA
for (j = 0; j < NUM_MAX_CBA_GROUP; j++)
......@@ -2477,8 +2470,7 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
if (eNB_rrc_inst[Mod_id].num_active_cba_groups > NUM_MAX_CBA_GROUP)
eNB_rrc_inst[Mod_id].num_active_cba_groups = NUM_MAX_CBA_GROUP;
LOG_D (RRC,
"[eNB %d] Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
LOG_D (RRC, "[eNB %d] Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
Mod_id, eNB_rrc_inst[Mod_id].cba_rnti[0],
eNB_rrc_inst[Mod_id].cba_rnti[1], eNB_rrc_inst[Mod_id].cba_rnti[2],
eNB_rrc_inst[Mod_id].cba_rnti[3],
......
......@@ -755,12 +755,6 @@ int main(int argc, char **argv)
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info,
messages_definition_xml, itti_dump_file);
if (create_tasks(1, 0)) {
exit(EXIT_FAILURE); // need a softer mode
}
printf("After create tasks\n");
#endif
#ifdef NAS_NETLINK
......@@ -948,6 +942,12 @@ int main(int argc, char **argv)
mac_xface->macphy_exit = &exit_fun;
#if defined(ENABLE_ITTI)
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
exit(-1); // need a softer mode
}
printf("ITTI tasks created\n");
#endif
number_of_cards = openair0_num_detected_cards;
if (p_exmimo_id->board_exmimoversion==1) { //ExpressMIMO1
......@@ -1088,6 +1088,7 @@ int main(int argc, char **argv)
// rt_sleep_ns(FRAME_PERIOD);
#if defined(ENABLE_ITTI)
printf("Entering ITTI signals handler\n");
itti_wait_tasks_end();
#else
rt_sem_wait(mutex);
......
......@@ -1248,10 +1248,6 @@ int main(int argc, char **argv) {
}
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, itti_dump_file);
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
exit(-1); // need a softer mode
}
#endif
#ifdef NAS_NETLINK
......@@ -1486,8 +1482,6 @@ int main(int argc, char **argv) {
// frame_parms->rfmode[i] = rf_mode_max[i];
rf_mode[i] = (rf_mode[i] & (~LNAGAINMASK)) | LNAMax;
}
}
// Initialize card
......@@ -1603,7 +1597,14 @@ int main(int argc, char **argv) {
mac_xface->macphy_exit = &exit_fun;
#ifdef OPENAIR2
#if defined(ENABLE_ITTI)
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
exit(-1); // need a softer mode
}
printf("ITTI tasks created\n");
#endif
#ifdef OPENAIR2
//if (otg_enabled) {
init_all_otg(0);
g_otg->seed = 0;
......@@ -1853,6 +1854,7 @@ int main(int argc, char **argv) {
//getchar();
#if defined(ENABLE_ITTI)
printf("Entering ITTI signals handler\n");
itti_wait_tasks_end();
#else
while (oai_exit==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