Merge remote-tracking branch 'origin/improve_build_nr_lte_merge' into develop_integration_2020_w04
This commit is contained in:
+13
-33
@@ -37,27 +37,19 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# endif
|
||||
|
||||
# include "PHY/INIT/phy_init.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "gtpv1u_eNB_task.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
extern unsigned char NB_gNB_INST;
|
||||
#endif
|
||||
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#define GNB_REGISTER_RETRY_DELAY 10
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# define GNB_REGISTER_RETRY_DELAY 10
|
||||
# endif
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
@@ -82,7 +74,6 @@ static void configure_nr_rrc(uint32_t gnb_id)
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
# if defined(ENABLE_USE_MME)
|
||||
static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const Enb_properties_array_t *enb_properties)
|
||||
{
|
||||
uint32_t gnb_id;
|
||||
@@ -113,23 +104,15 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
|
||||
|
||||
return register_gnb_pending;
|
||||
}
|
||||
# endif
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
void *gNB_app_task(void *args_p)
|
||||
{
|
||||
#if defined(ENABLE_ITTI)
|
||||
uint32_t gnb_nb = RC.nb_nr_inst;
|
||||
uint32_t gnb_id_start = 0;
|
||||
uint32_t gnb_id_end = gnb_id_start + gnb_nb;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
//uint32_t register_gnb_pending;
|
||||
//uint32_t registered_gnb;
|
||||
//long gnb_register_retry_timer_id;
|
||||
# endif
|
||||
uint32_t gnb_id;
|
||||
MessageDef *msg_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
@@ -166,15 +149,15 @@ void *gNB_app_task(void *args_p)
|
||||
configure_nr_rrc(gnb_id);
|
||||
}
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
/* Try to register each gNB */
|
||||
//registered_gnb = 0;
|
||||
//register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);//, gnb_properties_p);
|
||||
# else
|
||||
} else {
|
||||
/* Start L2L1 task */
|
||||
msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
# endif
|
||||
msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
}
|
||||
|
||||
do {
|
||||
// Wait for a message
|
||||
@@ -193,7 +176,7 @@ void *gNB_app_task(void *args_p)
|
||||
LOG_I(GNB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
|
||||
break;
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
|
||||
/*
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
LOG_I(GNB_APP, "[gNB %d] Received %s: associated MME %d\n", instance, msg_name,
|
||||
@@ -254,7 +237,6 @@ void *gNB_app_task(void *args_p)
|
||||
//}
|
||||
|
||||
break;
|
||||
# endif
|
||||
|
||||
default:
|
||||
LOG_E(GNB_APP, "Received unexpected message %s\n", msg_name);
|
||||
@@ -265,8 +247,6 @@ void *gNB_app_task(void *args_p)
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
} while (1);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -36,13 +36,9 @@
|
||||
#include "gnb_config.h"
|
||||
#include "UTIL/OTG/otg.h"
|
||||
#include "UTIL/OTG/otg_externs.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# endif
|
||||
#endif
|
||||
#include "intertask_interface.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "sctp_default_values.h"
|
||||
// #include "SystemInformationBlockType2.h"
|
||||
// #include "LAYER2/MAC/extern.h"
|
||||
@@ -225,11 +221,10 @@ void RCconfig_nr_flexran()
|
||||
/* gNB ID from configuration, as read in by RCconfig_RRC() */
|
||||
if (!GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr) {
|
||||
// Calculate a default gNB ID
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED)
|
||||
gnb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8);
|
||||
# else
|
||||
else
|
||||
gnb_id = i;
|
||||
# endif
|
||||
} else {
|
||||
gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr);
|
||||
}
|
||||
@@ -648,7 +643,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
AssertFatal (i<num_gnbs,"Failed to parse config file no %ith element in %s \n",i, GNB_CONFIG_STRING_ACTIVE_GNBS);
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
@@ -662,7 +657,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
if (num_gnbs>0) {
|
||||
@@ -671,13 +666,13 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
if (GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default gNB ID
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
gnb_id = i + (hash & 0xFFFF8);
|
||||
# else
|
||||
} else {
|
||||
gnb_id = i;
|
||||
# endif
|
||||
}
|
||||
} else {
|
||||
gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr);
|
||||
}
|
||||
@@ -2739,7 +2734,7 @@ int RCconfig_NR_S1(MessageDef *msg_p, uint32_t i) {
|
||||
config_get( GNBSParams,sizeof(GNBSParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
@@ -2753,7 +2748,7 @@ int RCconfig_NR_S1(MessageDef *msg_p, uint32_t i) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
AssertFatal (i<GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
|
||||
|
||||
@@ -2724,8 +2724,9 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag_MBMS = sib1_MBMS->systemInfoValueTag_r14;
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
|
||||
/*
|
||||
if (EPC_MODE_ENABLED)
|
||||
{
|
||||
int cell_valid = 0;
|
||||
|
||||
@@ -2781,8 +2782,8 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
@@ -2922,8 +2923,8 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag = sib1->systemInfoValueTag;
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
{
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
int cell_valid = 0;
|
||||
|
||||
if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
|
||||
@@ -2982,7 +2983,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user