From 5c23af773abaebf8425b45f745e3c8efd6a6e4a9 Mon Sep 17 00:00:00 2001 From: "Bi-Ruei, Chiu" <biruei.chiu@gmail.com> Date: Sun, 15 Apr 2018 00:39:41 +0800 Subject: [PATCH] Compare version number using MAKE_VERSION macro to provide better SW configuration: 1. Previous SW configuration for different RRC version relies on whether macro Rel10, Rel14 defined or not by checking #ifdef Rel14 or #if defined(Rel10) || defined(R14). Whenever there is a newer RRC version, e.g. Rel15, it will be very a tedious and error-prone job to add defined(Rel15) in every place. 2. Some RRC messages are defined in release 13 instead of release 14, NB-IoT feature is one of such example. Our code shall reflect this fact instead of using an afterward version number in software configuration. 3. Some RRC messages or some fields of certain RRC messages are added in the middle a release, e.g. SystemInformationBlockType1_v1310_IEs_t defined in RRC 13.1.0 and RRC 9.2.0 made some changes to SIB12 and SIB13 so we have sib12_v920 and sib13_v920 fields in SIB12 and SIB13's struct. We need a finer grain of control when using ASN1 from different RRC version. 4. S1AP also has this problem that it use UPDATE_RELEASE_9 and UPDATE_RELEASE_10 to differentiate between various S1AP version. This commit propose using MAKE_VERSION(x,y,z) to designate the version number and modify current conditional compilation accordingly. Note: 2018/04/16, Modified based on Cedric's comment. --- cmake_targets/CMakeLists.txt | 66 ++++--- openair1/PHY/INIT/defs.h | 4 +- openair1/PHY/INIT/defs_NB_IoT.h | 2 +- openair1/PHY/INIT/lte_init.c | 10 +- openair1/PHY/INIT/lte_init_ru.c | 4 +- openair1/PHY/INIT/lte_init_ue.c | 2 +- openair1/PHY/LTE_TRANSPORT/dci.c | 2 +- openair1/PHY/LTE_TRANSPORT/defs.h | 8 +- openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c | 6 +- openair1/PHY/LTE_TRANSPORT/edci.c | 2 +- openair1/PHY/LTE_TRANSPORT/if4_tools.c | 8 +- openair1/PHY/LTE_TRANSPORT/prach.c | 24 +-- openair1/PHY/LTE_TRANSPORT/print_stats.c | 2 +- openair1/PHY/LTE_TRANSPORT/proto.h | 2 +- openair1/PHY/defs.h | 44 ++--- openair1/PHY/defs_L1_NB_IoT.h | 2 +- openair1/PHY/impl_defs_lte.h | 8 +- openair1/SCHED/defs.h | 4 +- openair1/SCHED/fapi_l1.c | 18 +- openair1/SCHED/phy_procedures_lte_eNb.c | 4 +- openair1/SCHED/phy_procedures_lte_ue.c | 14 +- openair1/SCHED/prach_procedures.c | 10 +- openair2/COMMON/mac_rrc_primitives.h | 4 +- openair2/COMMON/platform_constants.h | 2 +- openair2/COMMON/rrc_messages_types.h | 2 +- openair2/ENB_APP/enb_config.c | 14 +- openair2/ENB_APP/enb_paramdef.h | 2 +- openair2/LAYER2/MAC/config.c | 38 ++-- openair2/LAYER2/MAC/config_ue.c | 18 +- openair2/LAYER2/MAC/defs.h | 26 +-- openair2/LAYER2/MAC/eNB_scheduler.c | 8 +- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 26 +-- openair2/LAYER2/MAC/eNB_scheduler_bch.c | 6 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 4 + openair2/LAYER2/MAC/eNB_scheduler_mch.c | 6 +- .../LAYER2/MAC/eNB_scheduler_primitives.c | 27 +-- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 6 +- openair2/LAYER2/MAC/proto.h | 26 +-- openair2/LAYER2/MAC/rar_tools.c | 2 +- openair2/LAYER2/MAC/ue_procedures.c | 2 +- openair2/LAYER2/MAC/vars.h | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 14 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.h | 8 +- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 2 +- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c | 4 +- .../RLC/UM_v9.3.0/rlc_um_control_primitives.c | 6 +- openair2/LAYER2/RLC/rlc.c | 14 +- openair2/LAYER2/RLC/rlc.h | 6 +- openair2/LAYER2/RLC/rlc_rrc.c | 18 +- openair2/PHY_INTERFACE/IF_Module.c | 4 +- openair2/PHY_INTERFACE/IF_Module.h | 2 +- openair2/PHY_INTERFACE/defs.h | 8 +- openair2/RRC/LITE/L2_interface.c | 6 +- openair2/RRC/LITE/L2_interface_ue.c | 4 +- openair2/RRC/LITE/MESSAGES/asn1_msg.c | 32 +-- openair2/RRC/LITE/MESSAGES/asn1_msg.h | 4 +- openair2/RRC/LITE/defs.h | 22 ++- openair2/RRC/LITE/defs_NB_IoT.h | 4 +- openair2/RRC/LITE/rrc_UE.c | 89 +++++---- openair2/RRC/LITE/rrc_eNB.c | 187 +++++++++--------- openair2/RRC/LITE/rrc_eNB_S1AP.c | 2 +- openair2/RRC/LITE/vars.h | 6 +- openair3/S1AP/s1ap_common.h | 8 +- openair3/S1AP/s1ap_eNB_handlers.c | 2 +- targets/RT/USER/lte-enb.c | 26 +-- targets/RT/USER/lte-ru.c | 30 +-- targets/SIMU/USER/oaisim_functions.c | 6 +- 67 files changed, 509 insertions(+), 472 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 7bfb0ab611..bcdfcf8dee 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -113,6 +113,14 @@ macro(add_list_string_option name val helpstr) add_definitions("-D${name}=\"${value}\"") endif() endmacro(add_list_string_option) + +function(make_version VERSION_VALUE) + math(EXPR RESULT "0") + foreach (ARG ${ARGN}) + math(EXPR RESULT "${RESULT} * 16 + ${ARG}") + endforeach() + set(${VERSION_VALUE} "${RESULT}" PARENT_SCOPE) +endfunction() #################################################### # compilation flags ############################################# @@ -162,7 +170,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ") # add autotools definitions that were maybe used! set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP" + "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 " @@ -284,16 +292,21 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR}) add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA") if (${RRC_ASN1_VERSION} STREQUAL "Rel8") + make_version(RRC_VERSION 8 6 0) set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn) elseif (${RRC_ASN1_VERSION} STREQUAL "CBA") + make_version(RRC_VERSION 10 2 0) + add_definitions(-DCBA) set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn) elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10") + make_version(RRC_VERSION 10 2 0) set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn) else() + make_version(RRC_VERSION 14 3 0) set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/RRC-e30.asn) endif (${RRC_ASN1_VERSION} STREQUAL "Rel8") - -set (RRC_FULL_DIR ${asn1_generated_dir}/${RRC_ASN1_VERSION}) +add_definitions(-DRRC_VERSION=${RRC_VERSION}) +set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION}) if(NOT EXISTS ${asn1c_call}) message( FATAL_ERROR "The script ${asn1c_call} must be present" ) endif(NOT EXISTS ${asn1c_call}) @@ -332,18 +345,20 @@ add_custom_command ( # Same limitation as described in RRC: unknown generated file list # so we generate it at cmake time ############## -add_list1_option(S1AP_VERSION R10 "S1AP Asn.1 grammar version" R8 R9 R10) +add_list1_option(S1AP_RELEASE R10 "S1AP ASN.1 grammar version" R8 R9 R10) set(S1AP_DIR ${OPENAIR3_DIR}/S1AP) -if (${S1AP_VERSION} STREQUAL "R10") - set (ASN1RELDIR R10.5) - add_definitions("-DUPDATE_RELEASE_9 -DUPDATE_RELEASE_10") -elseif (${S1AP_VERSION} STREQUAL "R9") - set (ASN1RELDIR R9.8) - add_definitions("-DUPDATE_RELEASE_9") -else(${S1AP_VERSION} STREQUAL "R8") +if (${S1AP_RELEASE} STREQUAL "R8") + make_version(S1AP_VERSION 8 10 0) set (ASN1RELDIR R8.10) -endif(${S1AP_VERSION} STREQUAL "R10") +elseif (${S1AP_RELEASE} STREQUAL "R9") + make_version(S1AP_VERSION 9 8 0) + set (ASN1RELDIR R9.8) +elseif (${S1AP_RELEASE} STREQUAL "R10") + make_version(S1AP_VERSION 10 5 0) + set (ASN1RELDIR R10.5) +endif(${S1AP_RELEASE} STREQUAL "R8") +add_definitions(-DS1AP_VERSION=${S1AP_VERSION}) set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(S1AP_ASN_FILES ${S1AP_ASN_DIR}/S1AP-CommonDataTypes.asn @@ -351,7 +366,7 @@ set(S1AP_ASN_FILES ${S1AP_ASN_DIR}/S1AP-IEs.asn ${S1AP_ASN_DIR}/S1AP-PDU.asn ) -set(S1AP_C_DIR ${asn1_generated_dir}/${ASN1RELDIR}) +set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${ASN1RELDIR}) #message("calling ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}") execute_process(COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES} RESULT_VARIABLE ret) @@ -363,7 +378,7 @@ execute_process(COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1A if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "asn1tostruct.py: error") endif (NOT ${ret} STREQUAL 0) -execute_process(COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_VERSION} +execute_process(COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_RELEASE} RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${fix_asn1c_call}: error") @@ -384,7 +399,7 @@ add_custom_command ( OUTPUT ${S1AP_OAI_generated} COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES} COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1AP_ASN_DIR}/S1AP-PDU-Contents.asn -o${S1AP_C_DIR} - COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_VERSION} + COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_RELEASE} DEPENDS ${S1AP_ASN_FILES} ) add_library(S1AP_LIB @@ -418,13 +433,16 @@ add_library(S1AP_ENB # Same limitation as described in RRC/S1AP: unknown generated file list # so we generate it at cmake time ############## -add_list1_option(X2AP_VERSION R11 "X2AP Asn.1 grammar version" R10 R11) +add_list1_option(X2AP_RELEASE R11 "X2AP ASN.1 grammar version" R10 R11) set(X2AP_DIR ${OPENAIR2_DIR}/X2AP) -if (${X2AP_VERSION} STREQUAL "R11") - set (ASN1RELDIR R11.2) -elseif (${X2AP_VERSION} STREQUAL "R10") +if (${X2AP_RELEASE} STREQUAL "R10") + make_version(S1AP_VERSION 10 0 0) set (ASN1RELDIR R.UNKNOWN) -endif(${X2AP_VERSION} STREQUAL "R11") +elseif (${X2AP_RELEASE} STREQUAL "R11") + make_version(S1AP_VERSION 11 2 0) + set (ASN1RELDIR R11.2) +endif(${X2AP_RELEASE} STREQUAL "R10") +add_definitions(-DX2AP_VERSION=${X2AP_VERSION}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(X2AP_ASN_FILES ${X2AP_ASN_DIR}/X2AP-CommonDataTypes.asn @@ -434,7 +452,7 @@ set(X2AP_ASN_FILES ${X2AP_ASN_DIR}/X2AP-Containers.asn ) -set(X2AP_C_DIR ${asn1_generated_dir}/${ASN1RELDIR}) +set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${ASN1RELDIR}) #message("calling ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}") execute_process(COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES} RESULT_VARIABLE ret) @@ -446,7 +464,7 @@ execute_process(COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2 if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "asn1tostruct.py: error") endif (NOT ${ret} STREQUAL 0) -execute_process(COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION} +execute_process(COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_RELEASE} RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${fix_asn1c_call}: error") @@ -467,7 +485,7 @@ add_custom_command ( OUTPUT ${X2AP_OAI_generated} COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES} COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2AP_ASN_DIR}/X2AP-PDU-Contents.asn -o ${X2AP_C_DIR} - COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION} + COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_RELEASE} DEPENDS ${X2AP_ASN_FILES} ) @@ -2350,7 +2368,7 @@ endforeach() # castxml doesn't work with c11 (gcc 5 default) # force castxml and clang compilation with gnu89 standard # we can't use cXX standard as pthread_rwlock_t is gnu standard -list(APPEND itti_compiler_options "-std=gnu89") +list(APPEND itti_compiler_options "-std=gnu89;-D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'") set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h) if(EXISTS /usr/bin/gccxml) set(xml_command gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H}) diff --git a/openair1/PHY/INIT/defs.h b/openair1/PHY/INIT/defs.h index be3e5c160b..a676af1fbf 100644 --- a/openair1/PHY/INIT/defs.h +++ b/openair1/PHY/INIT/defs.h @@ -32,7 +32,7 @@ #include "PHICH-Config.h" #include "MBSFN-SubframeConfigList.h" #include "MobilityControlInfo.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "SCellToAddMod-r10.h" #endif /** @addtogroup _PHY_STRUCTURES_ @@ -349,7 +349,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp, uint32_t perfect_ce); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) void phy_config_dedicated_scell_ue(uint8_t Mod_id, uint8_t eNB_index, SCellToAddMod_r10_t *sCellToAddMod_r10, diff --git a/openair1/PHY/INIT/defs_NB_IoT.h b/openair1/PHY/INIT/defs_NB_IoT.h index 8a83cbd038..b49936770f 100644 --- a/openair1/PHY/INIT/defs_NB_IoT.h +++ b/openair1/PHY/INIT/defs_NB_IoT.h @@ -33,7 +33,7 @@ //#include "TDD-Config.h" //#include "MBSFN-SubframeConfigList.h" //#include "MobilityControlInfo.h" -//#if defined(Rel10) || defined(Rel14) +//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) //#include "SCellToAddMod-r10.h" //#endif diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 474207a407..a20536e895 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -179,7 +179,7 @@ void phy_config_request(PHY_Config_t *phy_config) { fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) fp->prach_emtc_config_common.prach_Config_enabled=1; fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value; @@ -750,7 +750,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars; LTE_eNB_SRS* const srs_vars = eNB->srs_vars; LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br; #endif int i, UE_id; @@ -846,7 +846,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, prach_vars->rxsigF[0] = (int16_t**)malloc16_clear(64*sizeof(int16_t*)); // PRACH BR -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) ); // assume maximum of 64 RX antennas for PRACH receiver @@ -914,7 +914,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars; LTE_eNB_SRS* const srs_vars = eNB->srs_vars; LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br; #endif int i, UE_id; @@ -947,7 +947,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]); free_and_zero(prach_vars->prach_ifft[0]); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) for (int ce_level = 0; ce_level < 4; ce_level++) { for (i = 0; i < 64; i++) free_and_zero(prach_vars_br->prach_ifft[ce_level][i]); free_and_zero(prach_vars_br->prach_ifft[ce_level]); diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c index 9168193074..3c01a5bbdc 100644 --- a/openair1/PHY/INIT/lte_init_ru.c +++ b/openair1/PHY/INIT/lte_init_ru.c @@ -99,7 +99,7 @@ int phy_init_RU(RU_t *ru) { for (i=0; i<ru->nb_rx; i++) { ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) ); LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) for (j=0;j<4;j++) { ru->prach_rxsigF_br[j][i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) ); LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]); @@ -177,7 +177,7 @@ void phy_free_RU(RU_t *ru) for (i = 0; i < ru->nb_rx; i++) { free_and_zero(ru->prach_rxsigF[i]); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]); #endif } diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c index 16274d6878..639d39813f 100644 --- a/openair1/PHY/INIT/lte_init_ue.c +++ b/openair1/PHY/INIT/lte_init_ue.c @@ -340,7 +340,7 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) void phy_config_dedicated_scell_ue(uint8_t Mod_id, uint8_t eNB_index, SCellToAddMod_r10_t *sCellToAddMod_r10, diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 71cc8130b2..f0cfdbef8b 100755 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -219,7 +219,7 @@ uint8_t *generate_dci0(uint8_t *dci, (aggregation_level==2) || (aggregation_level==4) || (aggregation_level==8) -#ifdef Rel14 // Added for EPDCCH/MPDCCH +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Added for EPDCCH/MPDCCH || (aggregation_level==16) || (aggregation_level==24) || diff --git a/openair1/PHY/LTE_TRANSPORT/defs.h b/openair1/PHY/LTE_TRANSPORT/defs.h index f1f4be3072..73775af4d5 100644 --- a/openair1/PHY/LTE_TRANSPORT/defs.h +++ b/openair1/PHY/LTE_TRANSPORT/defs.h @@ -254,7 +254,7 @@ typedef struct { uint8_t decode_phich; } LTE_UL_UE_HARQ_t; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) typedef enum { CEmodeA = 0, CEmodeB = 1 @@ -302,7 +302,7 @@ typedef struct { int16_t sqrt_rho_a; /// amplitude of PDSCH (compared to RS) in symbols containing pilots int16_t sqrt_rho_b; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling uint8_t sib1_br_flag; /// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling @@ -534,7 +534,7 @@ typedef enum { HARQ_SR_CQI } UCI_type_t; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) typedef enum { NOCE, CEMODEA, @@ -572,7 +572,7 @@ typedef struct { uint8_t tdd_bundling; /// Received Energy uint32_t stat; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// non BL/CE, CEmodeA, CEmodeB UE_type_t ue_type; /// Indicates the symbols that are left empty due to eMTC retuning. diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c index 8d650bbe21..63b9c7ff17 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c @@ -87,7 +87,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Rule for accumulation of subframes for BL/CE UEs uint8_t Nacc=4; uint16_t j0,j,idelta; @@ -110,7 +110,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, // reset = 1; // x1 is set in lte_gold_generic if (mbsfn_flag == 0) { -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (dlsch->i0 != 0xFFFF) { // rule for BL/CE UEs from Section 6.3.1 in 36.211 x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell; @@ -124,7 +124,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, } #ifdef DEBUG_SCRAMBLING -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2); #else printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2); diff --git a/openair1/PHY/LTE_TRANSPORT/edci.c b/openair1/PHY/LTE_TRANSPORT/edci.c index 5caf5bcd71..13bce27e48 100755 --- a/openair1/PHY/LTE_TRANSPORT/edci.c +++ b/openair1/PHY/LTE_TRANSPORT/edci.c @@ -46,7 +46,7 @@ //#define DEBUG_DCI_DECODING 1 //#define DEBUG_PHY -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) { } diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 88312e4a46..abdfe1b85e 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -47,7 +47,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { int32_t **txdataF = ru->common.txdataF_BF; int32_t **rxdataF = ru->common.rxdataF; int16_t **prach_rxsigF = ru->prach_rxsigF; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br; #endif void *tx_buffer = ru->ifbuffer.tx[subframe&1]; @@ -221,7 +221,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { int16_t *rxF; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (packet_type > IF4p5_PRACH) rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0]; else @@ -262,7 +262,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint int32_t **txdataF = ru->common.txdataF_BF; int32_t **rxdataF = ru->common.rxdataF; int16_t **prach_rxsigF = ru->prach_rxsigF; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br; #endif void *rx_buffer = ru->ifbuffer.rx; @@ -359,7 +359,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint int16_t *rxF; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (*packet_type > IF4p5_PRACH) rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][0][0]; else diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index b58aa91636..23d3ef5676 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -586,7 +586,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex; int prach_mask = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int i; for (i=0;i<4;i++) { @@ -1089,7 +1089,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 } //__m128i mmtmpX0,mmtmpX1,mmtmpX2,mmtmpX3; -#ifndef Rel14 +#if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) #define rx_prach0 rx_prach #endif @@ -1100,7 +1100,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, uint16_t *max_preamble_delay, uint16_t Nf, uint8_t tdd_mapindex -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,uint8_t br_flag, uint8_t ce_level #endif @@ -1150,7 +1150,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32))); int32_t *prach_ifft=(int32_t*)NULL; int32_t **prach_ifftp=(int32_t **)NULL; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int prach_ifft_cnt=0; #endif #ifdef PRACH_DEBUG @@ -1169,7 +1169,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, frame_type = fp->frame_type; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag == 1) { AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1, "emtc prach_Config is not enabled\n"); @@ -1204,7 +1204,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, uint16_t N_ZC = (prach_fmt <4)?839:139; if (eNB) { -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag == 1) { prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level]; #ifdef PRACH_DEBUG @@ -1238,7 +1238,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, } } else { -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag == 1) { #ifdef PRACH_DEBUG frame = ru->proc.frame_prach_br; @@ -1501,7 +1501,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, if ((eNB==NULL) && (ru!=NULL) && ru->function == NGFI_RRU_IF4p5) { /// **** send_IF4 of rxsigF to RAU **** /// -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level); else @@ -1644,7 +1644,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, if (new_dft == 1) { new_dft = 0; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag == 1) { Xu=(int16_t*)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx]; prach_ifft = prach_ifftp[prach_ifft_cnt++]; @@ -1701,7 +1701,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, } // new dft // check energy in nth time shift, for -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if ((br_flag==0) || (eNB->prach_vars_br.repetition_number[ce_level]== eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) @@ -1768,7 +1768,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void rx_prach(PHY_VARS_eNB *eNB, RU_t *ru, @@ -1810,7 +1810,7 @@ void rx_prach(PHY_VARS_eNB *eNB, } } -#endif /* Rel14 */ +#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */ void init_prach_tables(int N_ZC) { diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c index 9e328353a4..1afdac01f7 100644 --- a/openair1/PHY/LTE_TRANSPORT/print_stats.c +++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c @@ -507,7 +507,7 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]); len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]); len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int i=0; //len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]); diff --git a/openair1/PHY/LTE_TRANSPORT/proto.h b/openair1/PHY/LTE_TRANSPORT/proto.h index e706bbbaeb..99e397cacc 100644 --- a/openair1/PHY/LTE_TRANSPORT/proto.h +++ b/openair1/PHY/LTE_TRANSPORT/proto.h @@ -2183,7 +2183,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru, uint16_t *max_preamble_energy, uint16_t *max_preamble_delay, uint16_t Nf, uint8_t tdd_mapindex -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , uint8_t br_flag #endif diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 1d2b622e7e..bebc5fe70a 100644 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -316,7 +316,7 @@ typedef struct RU_proc_t_s { int subframe_tx; /// subframe to act upon for reception of prach int subframe_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// subframe to act upon for reception of prach BL/CE UEs int subframe_prach_br; #endif @@ -328,7 +328,7 @@ typedef struct RU_proc_t_s { int frame_tx_unwrap; /// frame to act upon for reception of prach int frame_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// frame to act upon for reception of prach int frame_prach_br; #endif @@ -340,7 +340,7 @@ typedef struct RU_proc_t_s { int instance_cnt_FH1; /// \internal This variable is protected by \ref mutex_prach. int instance_cnt_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// \internal This variable is protected by \ref mutex_prach. int instance_cnt_prach_br; #endif @@ -362,7 +362,7 @@ typedef struct RU_proc_t_s { pthread_t pthread_FH1; /// pthread structure for RU prach processing thread pthread_t pthread_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// pthread structure for RU prach processing thread BL/CE UEs pthread_t pthread_prach_br; #endif @@ -385,7 +385,7 @@ typedef struct RU_proc_t_s { pthread_attr_t attr_FH1; /// pthread attributes for RU prach pthread_attr_t attr_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// pthread attributes for RU prach BL/CE UEs pthread_attr_t attr_prach_br; #endif @@ -404,7 +404,7 @@ typedef struct RU_proc_t_s { struct sched_param sched_param_FH1; /// scheduling parameters for RU prach thread struct sched_param sched_param_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// scheduling parameters for RU prach thread BL/CE UEs struct sched_param sched_param_prach_br; #endif @@ -417,7 +417,7 @@ typedef struct RU_proc_t_s { pthread_cond_t cond_FH1; /// condition variable for RU prach thread pthread_cond_t cond_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// condition variable for RU prach thread BL/CE UEs pthread_cond_t cond_prach_br; #endif @@ -438,7 +438,7 @@ typedef struct RU_proc_t_s { pthread_mutex_t mutex_FH1; /// mutex for RU prach pthread_mutex_t mutex_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// mutex for RU prach BL/CE UEs pthread_mutex_t mutex_prach_br; #endif @@ -479,7 +479,7 @@ typedef struct eNB_proc_t_s { int subframe_rx; /// subframe to act upon for PRACH int subframe_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// subframe to act upon for reception of prach BL/CE UEs int subframe_prach_br; #endif @@ -489,7 +489,7 @@ typedef struct eNB_proc_t_s { int frame_tx; /// frame to act upon for PRACH int frame_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// frame to act upon for PRACH BL/CE UEs int frame_prach_br; #endif @@ -499,7 +499,7 @@ typedef struct eNB_proc_t_s { //int instance_cnt_te[3]; /// \internal This variable is protected by \ref mutex_prach. int instance_cnt_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// \internal This variable is protected by \ref mutex_prach for BL/CE UEs. int instance_cnt_prach_br; #endif @@ -523,7 +523,7 @@ typedef struct eNB_proc_t_s { pthread_attr_t attr_single; /// pthread attributes for prach processing thread pthread_attr_t attr_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// pthread attributes for prach processing thread BL/CE UEs pthread_attr_t attr_prach_br; #endif @@ -537,7 +537,7 @@ typedef struct eNB_proc_t_s { struct sched_param sched_param_single; /// scheduling parameters for prach thread struct sched_param sched_param_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// scheduling parameters for prach thread struct sched_param sched_param_prach_br; #endif @@ -549,7 +549,7 @@ typedef struct eNB_proc_t_s { //pthread_t pthread_te[3]; /// pthread structure for PRACH thread pthread_t pthread_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// pthread structure for PRACH thread BL/CE UEs pthread_t pthread_prach_br; #endif @@ -559,7 +559,7 @@ typedef struct eNB_proc_t_s { //pthread_cond_t cond_te[3]; /// condition variable for PRACH processing thread; pthread_cond_t cond_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// condition variable for PRACH processing thread BL/CE UEs; pthread_cond_t cond_prach_br; #endif @@ -571,7 +571,7 @@ typedef struct eNB_proc_t_s { //pthread_mutex_t mutex_te[3]; /// mutex for PRACH thread pthread_mutex_t mutex_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// mutex for PRACH thread for BL/CE UEs pthread_mutex_t mutex_prach_br; #endif @@ -587,7 +587,7 @@ typedef struct eNB_proc_t_s { int RU_mask; /// mask for RUs serving eNB (PRACH) int RU_mask_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// mask for RUs serving eNB (PRACH) int RU_mask_prach_br; #endif @@ -792,7 +792,7 @@ typedef struct RU_t_s{ int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru); /// function pointer to wakeup routine in lte-enb. void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// function pointer to wakeup routine in lte-enb. void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe); #endif @@ -1025,14 +1025,14 @@ typedef struct PHY_VARS_eNB_s { nfapi_cqi_indication_raw_pdu_t cqi_raw_pdu_list[NFAPI_CQI_IND_MAX_PDU]; /// NFAPI PRACH information nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// NFAPI PRACH information BL/CE UEs nfapi_preamble_pdu_t preamble_list_br[MAX_NUM_RX_PRACH_PREAMBLES]; #endif Sched_Rsp_t Sched_INFO; LTE_eNB_PDCCH pdcch_vars[2]; LTE_eNB_PHICH phich_vars[2]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LTE_eNB_EPDCCH epdcch_vars[2]; LTE_eNB_MPDCCH mpdcch_vars[2]; LTE_eNB_PRACH prach_vars_br; @@ -1064,7 +1064,7 @@ typedef struct PHY_VARS_eNB_s { uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t X_u[64][839]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint32_t X_u_br[4][64][839]; #endif uint8_t pbch_configured; @@ -1642,7 +1642,7 @@ typedef struct RRU_config_s { int prach_FreqOffset[MAX_BANDS_PER_RRU]; /// prach_ConfigIndex for IF4p5 int prach_ConfigIndex[MAX_BANDS_PER_RRU]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int emtc_prach_CElevel_enable[MAX_BANDS_PER_RRU][4]; /// emtc_prach_FreqOffset for IF4p5 per CE Level int emtc_prach_FreqOffset[MAX_BANDS_PER_RRU][4]; diff --git a/openair1/PHY/defs_L1_NB_IoT.h b/openair1/PHY/defs_L1_NB_IoT.h index 25ee646548..6b74d16b00 100644 --- a/openair1/PHY/defs_L1_NB_IoT.h +++ b/openair1/PHY/defs_L1_NB_IoT.h @@ -427,7 +427,7 @@ typedef struct eNB_proc_NB_IoT_t_s { int RU_mask; /// mask for RUs serving nbiot (PRACH) int RU_mask_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// mask for RUs serving eNB (PRACH) int RU_mask_prach_br; #endif diff --git a/openair1/PHY/impl_defs_lte.h b/openair1/PHY/impl_defs_lte.h index 066dc7012c..3084b2226a 100644 --- a/openair1/PHY/impl_defs_lte.h +++ b/openair1/PHY/impl_defs_lte.h @@ -118,7 +118,7 @@ typedef struct { PRACH_CONFIG_INFO prach_ConfigInfo; } PRACH_CONFIG_COMMON; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// PRACH-eMTC-Config from 36.331 RRC spec typedef struct { @@ -151,7 +151,7 @@ typedef struct { /// prach_Config_enabled=1 means enabled. \vr{[0..1]} uint8_t prach_Config_enabled; /// PRACH Configuration Information -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) PRACH_eMTC_CONFIG_INFO prach_ConfigInfo; #endif } PRACH_eMTC_CONFIG_COMMON; @@ -603,7 +603,7 @@ typedef struct { uint8_t nb_antenna_ports_eNB; /// PRACH_CONFIG PRACH_CONFIG_COMMON prach_config_common; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// PRACH_eMTC_CONFIG PRACH_eMTC_CONFIG_COMMON prach_emtc_config_common; #endif @@ -1233,7 +1233,7 @@ typedef struct { int32_t **prach_ifft[4]; /// repetition number -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// indicator of first frame in a group of PRACH repetitions int first_frame[4]; /// current repetition for each CE level diff --git a/openair1/SCHED/defs.h b/openair1/SCHED/defs.h index 3c232a82b7..ec2928af6c 100644 --- a/openair1/SCHED/defs.h +++ b/openair1/SCHED/defs.h @@ -105,7 +105,7 @@ void phy_procedures_eNB_lte(uint8_t subframe,PHY_VARS_eNB **phy_vars_eNB,uint8_t */ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /*! \brief Top-level entry routine for relay node procedures when acting as eNB. This proc will make us of the existing eNB procs. @param last_slot Index of last slot (0-19) @param next_slot Index of next_slot (0-19) @@ -208,7 +208,7 @@ void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,re @param phy_vars_eNB Pointer to eNB variables on which to act @param br_flag indicator for eMTC PRACH */ -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void prach_procedures(PHY_VARS_eNB *eNB, int br_flag); #else diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index df01fad136..c2f4d998a9 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -62,7 +62,7 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB, LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",proc->frame_tx,proc->subframe_tx, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, @@ -127,7 +127,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, // adjust transmit amplitude here based on NFAPI info } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) extern uint32_t localRIV2alloc_LUT6[32]; extern uint32_t localRIV2alloc_LUT25[512]; extern uint32_t localRIV2alloc_LUT50_0[1600]; @@ -144,10 +144,10 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr uint8_t *sdu) { nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8; -#ifndef Rel8 +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10; #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13; #endif LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL; @@ -162,7 +162,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr dlsch0 = eNB->dlsch[UE_id][0]; dlsch1 = eNB->dlsch[UE_id][1]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[subframe] = 0; #endif @@ -216,7 +216,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr rel8->rnti,UE_id,harq_pid); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) dlsch0->sib1_br_flag=0; if ((rel13->pdsch_payload_type <2) && (rel13->ue_type>0)) { // this is a BR/CE UE and SIB1-BR/SI-BR @@ -270,7 +270,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr dlsch0->i0 = rel13->initial_transmission_sf_io; #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n", dlsch0->i0, dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status, dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0], @@ -774,12 +774,10 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) case NFAPI_DL_CONFIG_EPDCCH_DL_PDU_TYPE: // handle_nfapi_epdcch_pdu(eNB,dl_config_pdu); break; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE: -#ifdef Rel14 handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu); eNB->mpdcch_vars[subframe&1].num_dci++; -#endif break; #endif } diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index ecdf8e5756..09bccc88c2 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -58,7 +58,7 @@ int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,relaying_type_t r_type) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) MCH_PDU *mch_pduP=NULL; MCH_PDU mch_pdu; // uint8_t sync_area=255; @@ -75,7 +75,7 @@ void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,rel subframe<<1,1); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // if mcch is active, send regardless of the node type: eNB or RN // when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing /* diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 151a74f620..d905469b23 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -3108,7 +3108,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs int subframe_rx = proc->subframe_rx; int frame_rx = proc->frame_rx; int pmch_mcs=-1; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int CC_id = ue->CC_id; #endif uint8_t sync_area=255; @@ -3121,7 +3121,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n", ue->Mod_id,(subframe_rx==9?-1:0)+frame_rx,subframe_rx); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) pmch_mcs = ue_query_mch(ue->Mod_id, CC_id, @@ -3212,7 +3212,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs // if (subframe_rx==9) // mac_xface->macphy_exit("Why are we exiting here?"); } else { // decoding successful -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (mcch_active == 1) { ue_send_mch_sdu(ue->Mod_id, @@ -3235,7 +3235,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs } -#endif // Rel10 || Rel14 +#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) } // decoding sucessful } // pmch_mcs>=0 } // is_pmch_subframe=true @@ -5131,7 +5131,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, return (0); } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int phy_procedures_RN_UE_RX(uint8_t slot_rx, uint8_t next_slot, relaying_type_t r_type) { @@ -5229,7 +5229,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u if ((subframe_select(&ue->frame_parms,subframe_rx)==SF_DL) || (ue->frame_parms.frame_type == FDD)) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (phy_procedures_RN_UE_RX(subframe_rx, subframe_tx, r_type) != 0 ) #endif @@ -5243,7 +5243,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u if ((subframe_select(&ue->frame_parms,subframe_rx)==SF_S) && (slot==0)) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (phy_procedures_RN_UE_RX(subframe_rx, subframe_tx, r_type) != 0 ) #endif diff --git a/openair1/SCHED/prach_procedures.c b/openair1/SCHED/prach_procedures.c index 4730eed613..092636d9d8 100644 --- a/openair1/SCHED/prach_procedures.c +++ b/openair1/SCHED/prach_procedures.c @@ -56,7 +56,7 @@ extern uint32_t nfapi_mode; extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); void prach_procedures(PHY_VARS_eNB *eNB -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , int br_flag #endif @@ -65,7 +65,7 @@ void prach_procedures(PHY_VARS_eNB *eNB uint16_t i; int frame,subframe; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag==1) { subframe = eNB->proc.subframe_prach_br; frame = eNB->proc.frame_prach_br; @@ -95,7 +95,7 @@ void prach_procedures(PHY_VARS_eNB *eNB ru=eNB->RU_list[i]; for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) { eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int ce_level; if (br_flag==1) @@ -111,7 +111,7 @@ void prach_procedures(PHY_VARS_eNB *eNB &max_preamble_delay[0], frame, 0 -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,br_flag #endif ); @@ -123,7 +123,7 @@ void prach_procedures(PHY_VARS_eNB *eNB max_preamble_delay[0], eNB->prach_energy_counter); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (br_flag==1) { int prach_mask; diff --git a/openair2/COMMON/mac_rrc_primitives.h b/openair2/COMMON/mac_rrc_primitives.h index 3a73000e50..3b87abb1c1 100644 --- a/openair2/COMMON/mac_rrc_primitives.h +++ b/openair2/COMMON/mac_rrc_primitives.h @@ -34,7 +34,7 @@ #include "RadioResourceConfigDedicated.h" #include "MeasGapConfig.h" #include "TDD-Config.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "MBSFN-AreaInfoList-r9.h" #include "MBSFN-SubframeConfigList.h" #endif @@ -356,7 +356,7 @@ typedef struct { TDD_Config_t *tdd_Config, uint8_t *SIwindowsize, uint16_t *SIperiod -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , MBMS_flag_t MBMS_Flag, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList, diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index 4debccc7b0..399c5d7b12 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -84,7 +84,7 @@ #define DEFAULT_RAB_ID 1 #define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */ -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount) #else // Do not allocate unused memory diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 9bd25d3b3a..c514037bef 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -117,7 +117,7 @@ typedef struct RrcConfigurationReq_s { long pucch_delta_shift[MAX_NUM_CCs]; long pucch_nRB_CQI[MAX_NUM_CCs]; long pucch_nCS_AN[MAX_NUM_CCs]; -#if !defined(Rel10) && !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) long pucch_n1_AN[MAX_NUM_CCs]; #endif long pdsch_referenceSignalPower[MAX_NUM_CCs]; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 19c168503f..90a08381ba 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -377,7 +377,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t pucch_delta_shift = 0; int32_t pucch_nRB_CQI = 0; int32_t pucch_nCS_AN = 0; -//#if !defined(Rel10) && !defined(Rel14) +//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int32_t pucch_n1_AN = 0; //#endif int32_t pdsch_referenceSignalPower = 0; @@ -643,7 +643,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", RC.config_file_name, i, prefix_type); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (!pbch_repetition) AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n", @@ -808,7 +808,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", RC.config_file_name, i, pucch_nCS_AN); -#if !defined(Rel10) && !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN; if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047)) @@ -988,7 +988,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", RC.config_file_name, i, pusch_p0_Nominal); -#ifndef Rel14 +#if (RRC_VERSION <= MAKE_VERSION(12, 0, 0)) if (strcmp(pusch_alpha,"AL0")==0) { RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0; } else if (strcmp(pusch_alpha,"AL04")==0) { @@ -1006,7 +1006,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { } else if (strcmp(pusch_alpha,"AL1")==0) { RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1; } -#else +#endif + +#if (RRC_VERSION >= MAKE_VERSION(12, 0, 0)) if (strcmp(pusch_alpha,"AL0")==0) { RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0; } else if (strcmp(pusch_alpha,"AL04")==0) { @@ -1209,7 +1211,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { switch (rach_preambleTransMax) { -#ifndef Rel14 +#if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) case 3: RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; break; diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index fe2b5a8515..ebbe8ae4c7 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -259,7 +259,7 @@ typedef enum { #define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift" #define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI" #define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN" -//#if !defined(Rel10) && !defined(Rel14) +//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN" //#endif #define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower" diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index 42ed105f23..35a43102fb 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -36,7 +36,7 @@ #include "SystemInformationBlockType2.h" //#include "RadioResourceConfigCommonSIB.h" #include "RadioResourceConfigDedicated.h" -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #include "PRACH-ConfigSIB-v1310.h" #endif #include "MeasGapConfig.h" @@ -50,7 +50,7 @@ #include "UTIL/LOG/vcd_signal_dumper.h" #include "common/ran_context.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "MBSFN-AreaInfoList-r9.h" #include "MBSFN-AreaInfo-r9.h" #include "MBSFN-SubframeConfigList.h" @@ -194,7 +194,7 @@ void config_mib(int Mod_idP, int p_eNBP, uint32_t dl_CarrierFreqP, uint32_t ul_CarrierFreqP -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , uint32_t pbch_repetitionP #endif @@ -266,14 +266,14 @@ void config_mib(int Mod_idP, cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG; cfg->num_tlv++; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) cfg->emtc_config.pbch_repetitions_enable_r13.value = pbch_repetitionP; cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG; cfg->num_tlv++; #endif LOG_I(MAC, "%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d" -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) " PBCH repetition %d" #endif @@ -291,7 +291,7 @@ void config_mib(int Mod_idP, ,cfg->sch_config.primary_synchronization_signal_epre_eprers.value ,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value ,cfg->sch_config.physical_cell_id.value -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,cfg->emtc_config.pbch_repetitions_enable_r13.value #endif ); @@ -330,7 +330,7 @@ void config_sib2(int Mod_idP, int CC_idP, RadioResourceConfigCommonSIB_t * radioResourceConfigCommonP, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BRP, #endif ARFCN_ValueEUTRA_t *ul_CArrierFreqP, @@ -446,7 +446,7 @@ config_sib2(int Mod_idP, cfg->num_tlv++; } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) { AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n"); AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n"); @@ -677,20 +677,20 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, int physCellId, int p_eNB, int Ncp, int eutra_band, uint32_t dl_CarrierFreq, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int pbch_repetition, #endif rnti_t rntiP, BCCH_BCH_Message_t * mib, RadioResourceConfigCommonSIB_t * radioResourceConfigCommon, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BR, #endif struct PhysicalConfigDedicated *physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) SCellToAddMod_r10_t * sCellToAddMod_r10, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -708,12 +708,12 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, additionalSpectrumEmission, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , uint8_t MBMS_Flag, MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList, PMCH_InfoList_r9_t * pmch_InfoList #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , SystemInformationBlockType1_v1310_IEs_t * sib1_v13ext @@ -764,7 +764,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, p_eNB, dl_CarrierFreq, ul_CarrierFreq -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , pbch_repetition #endif ); @@ -776,7 +776,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList = schedulingInfoList; config_sib1(Mod_idP,CC_idP,tdd_Config); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) if (sib1_v13ext != NULL) { RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext; } @@ -835,7 +835,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, dl_Bandwidth; config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) radioResourceConfigCommon_BR, #endif NULL, ul_Bandwidth, additionalSpectrumEmission, @@ -877,7 +877,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (sCellToAddMod_r10 != NULL) { UE_id = find_UE_id(Mod_idP, rntiP); @@ -910,11 +910,11 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, subframeAllocation.choice.oneFrame.buf[0]); } -#ifdef Rel10 +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag; #endif } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (mbsfn_AreaInfoList != NULL) { // One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time diff --git a/openair2/LAYER2/MAC/config_ue.c b/openair2/LAYER2/MAC/config_ue.c index 5ef18f5bda..fd9ec7bd67 100644 --- a/openair2/LAYER2/MAC/config_ue.c +++ b/openair2/LAYER2/MAC/config_ue.c @@ -36,7 +36,7 @@ #include "SystemInformationBlockType2.h" //#include "RadioResourceConfigCommonSIB.h" #include "RadioResourceConfigDedicated.h" -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #include "PRACH-ConfigSIB-v1310.h" #endif #include "MeasGapConfig.h" @@ -50,7 +50,7 @@ #include "UTIL/LOG/vcd_signal_dumper.h" #include "common/ran_context.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "MBSFN-AreaInfoList-r9.h" #include "MBSFN-AreaInfo-r9.h" #include "MBSFN-SubframeConfigList.h" @@ -108,7 +108,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, radioResourceConfigCommon, struct PhysicalConfigDedicated *physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) SCellToAddMod_r10_t * sCellToAddMod_r10, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -127,7 +127,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, additionalSpectrumEmission, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , uint8_t MBMS_Flag, MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList, PMCH_InfoList_r9_t * pmch_InfoList @@ -211,7 +211,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, mac_MainConfig->ul_SCH_Config->periodicBSR_Timer; } else { UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = -#ifndef Rel14 +#if (RRC_VERSION < MAKE_VERSION(12, 0, 0)) (uint16_t) MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity #else @@ -237,7 +237,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, (uint16_t) mac_MainConfig->ul_SCH_Config-> retxBSR_Timer; } else { -#ifndef Rel14 +#if (RRC_VERSION < MAKE_VERSION(12, 0, 0)) UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t) MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560; @@ -247,7 +247,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, #endif } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (mac_MainConfig->ext1 && mac_MainConfig->ext1->sr_ProhibitTimer_r9) { @@ -352,7 +352,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, physicalConfigDedicated); UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (sCellToAddMod_r10 != NULL) { @@ -522,7 +522,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, // UE_mac_inst[Mod_idP].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]); } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (mbsfn_AreaInfoList != NULL) { LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n", diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 107483b35a..abde74b558 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -55,13 +55,15 @@ #include "RACH-ConfigCommon.h" #include "MeasObjectToAddModList.h" #include "MobilityControlInfo.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "MBSFN-AreaInfoList-r9.h" #include "MBSFN-SubframeConfigList.h" #include "PMCH-InfoList-r9.h" +#endif +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "SCellToAddMod-r10.h" #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #include "SystemInformationBlockType1-v1310-IEs.h" #endif @@ -81,7 +83,7 @@ #define SCH_PAYLOAD_SIZE_MAX 4096 /// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB) -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Mask for identifying subframe for MBMS #define MBSFN_TDD_SF3 0x80 // for TDD @@ -281,7 +283,7 @@ typedef struct { uint8_t payload[PCCH_PAYLOAD_SIZE_MAX]; } __attribute__ ((__packed__)) PCCH_PDU; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /*! \brief MCCH payload */ typedef struct { uint8_t payload[MCCH_PAYLOAD_SIZE_MAX]; @@ -338,7 +340,7 @@ typedef struct { /*!\brief LCID of padding LCID for DLSCH */ #define SHORT_PADDING 31 -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // MCH LCHAN IDs (table6.2.1-4 TS36.321) /*!\brief LCID of MCCH for DL */ #define MCCH_LCHANID 0 @@ -784,7 +786,7 @@ typedef struct { eNB_UE_estimated_distances distance; #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint8_t rach_resource_type; uint16_t mpdcch_repetition_cnt; frame_t Msg2_frame; @@ -926,7 +928,7 @@ typedef struct { int msg4_TBsize; /// MCS used for Msg4 int msg4_mcs; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint8_t rach_resource_type; uint8_t msg2_mpdcch_repetition_cnt; uint8_t msg4_mpdcch_repetition_cnt; @@ -991,7 +993,7 @@ typedef struct { uint32_t dl_CarrierFreq; BCCH_BCH_Message_t *mib; RadioResourceConfigCommonSIB_t *radioResourceConfigCommon; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR; #endif TDD_Config_t *tdd_Config; @@ -1022,7 +1024,7 @@ typedef struct { struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; /// number of subframe allocation pattern available for MBSFN sync area uint8_t num_sf_allocation_pattern; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// MBMS Flag uint8_t MBMS_flag; /// Outgoing MCCH pdu for PHY @@ -1044,7 +1046,7 @@ typedef struct { /// Outgoing MCH pdu for PHY MCH_PDU MCH_pdu; #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) /// Rel13 parameters from SIB1 SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext; /// Counter for SIB1-BR scheduling @@ -1241,7 +1243,7 @@ typedef struct { struct RACH_ConfigDedicated *rach_ConfigDedicated; /// pointer to RRC PHY configuration struct PhysicalConfigDedicated *physicalConfigDedicated; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// pointer to RRC PHY configuration SCEll struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10; @@ -1318,7 +1320,7 @@ typedef struct { struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA? /// number of subframe allocation pattern available for MBSFN sync area uint8_t num_sf_allocation_pattern; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) /// number of active MBSFN area uint8_t num_active_mbsfn_area; /// MBSFN Area Info diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 874b63c6c8..77c47af38e 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -211,7 +211,7 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ul_req->number_of_pdus++; ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // PUT rel10-13 UCI options here #endif } else @@ -314,7 +314,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x is_harq:%d\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti, is_harq); // check Rel10 or Rel8 SR -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2) && (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020) && (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) { @@ -527,7 +527,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, memset(cc[CC_id].vrb_map_UL, 0, 100); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) cc[CC_id].mcch_active = 0; #endif @@ -628,7 +628,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, rrc_rx_tx(&ctxt, CC_id); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { if (cc[CC_id].MBMS_flag > 0) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 3005ecf464..22321f41e5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -118,7 +118,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP, AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n", ra->rnti); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (ra->rach_resource_type > 0) { LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n", @@ -267,7 +267,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP, dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int rmax = 0; int rep = 0; int reps = 0; @@ -620,7 +620,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, uint8_t offset; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int rmax = 0; int rep = 0; int reps = 0; @@ -711,7 +711,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (ra->rach_resource_type > 0) { // Generate DCI + repetitions first @@ -1185,7 +1185,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP, int round; /* - #ifdef Rel14 + #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) COMMON_channels_t *cc = mac->common_channels; int rmax = 0; @@ -1238,7 +1238,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP, if (round != 8) { -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (ra->rach_resource_type > 0) { AssertFatal(1 == 0, "Msg4 Retransmissions not handled yet for BL/CE UEs\n"); @@ -1393,7 +1393,7 @@ initiate_ra_proc(module_id_t module_idP, sub_frame_t subframeP, uint16_t preamble_index, int16_t timing_offset, uint16_t ra_rnti -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , uint8_t rach_resource_type #endif ) @@ -1404,7 +1404,7 @@ initiate_ra_proc(module_id_t module_idP, COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; RA_t *ra = &cc->ra[0]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) struct PRACH_ConfigSIB_v1310 *ext4_prach = NULL; PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL; @@ -1415,12 +1415,12 @@ initiate_ra_proc(module_id_t module_idP, prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13; } -#endif /* Rel14 */ +#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */ LOG_D(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n", module_idP, CC_id, frameP, subframeP, preamble_index); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LOG_D(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n", module_idP, CC_id, frameP, subframeP, rach_resource_type); @@ -1430,7 +1430,7 @@ initiate_ra_proc(module_id_t module_idP, uint16_t msg2_subframe = subframeP; int offset; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) if (prach_ParametersListCE_r13 && prach_ParametersListCE_r13->list.count < rach_resource_type) { @@ -1441,7 +1441,7 @@ initiate_ra_proc(module_id_t module_idP, return; } -#endif /* Rel14 */ +#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0); @@ -1454,7 +1454,7 @@ initiate_ra_proc(module_id_t module_idP, ra[i].state = MSG2; ra[i].timing_offset = timing_offset; ra[i].preamble_subframe = subframeP; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ra[i].rach_resource_type = rach_resource_type; ra[i].msg2_mpdcch_repetition_cnt = 0; ra[i].msg4_mpdcch_repetition_cnt = 0; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c index f12702fbb8..fbe4c991fb 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c @@ -62,7 +62,7 @@ // NEED TO ADD schedule_SI_BR for SIB1_BR and SIB23_BR // CCE_allocation_infeasible to be done for EPDCCH/MPDCCH -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #define size_Sj25 2 int Sj25[size_Sj25] = { 0, 3 }; @@ -538,7 +538,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length); if ((frameP & 1023) < 40) -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LOG_D(MAC, "[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n", module_idP, frameP, CC_id, mib_sdu_length, @@ -794,7 +794,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) } } } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) schedule_SIB1_BR(module_idP, frameP, subframeP); schedule_SI_BR(module_idP, frameP, subframeP); #endif diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 0729073eba..6315806484 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -1992,11 +1992,15 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; // Rel10 fields +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3; +#endif // Rel13 fields +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; +#endif if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, P_RNTI)) { LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for P_RNTI\n", frameP,subframeP); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c index 37b13d2de7..8a9dbcee02 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c @@ -62,7 +62,7 @@ extern RAN_CONTEXT_t RC; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int8_t get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area) @@ -588,7 +588,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, TBS = get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth)); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // do not let mcch and mtch multiplexing when relaying is active // for sync area 1, so not transmit data //if ((i == 0) && ((RC.mac[module_idP]->MBMS_flag != multicast_relay) || (RC.mac[module_idP]->mcch_active==0))) { @@ -668,7 +668,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, header_len_mtch = 0; } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // } #endif diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 110afc1a5a..48349961d7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -891,7 +891,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode, else if (ri >= 2 && cc->p_eNB == 4) return (4 + (N << 1) + 4 + (N << 1) + 4); break; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0)) case CQI_ReportModeAperiodic_rm32_v1250: AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10, @@ -925,7 +925,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode, return (4 + 4 + 4); break; -#endif /* Rel14 */ +#endif /* #if (RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */ } AssertFatal(1 == 0, "Shouldn't get here\n"); return (0); @@ -1031,7 +1031,7 @@ program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP, nfapi_ul_config_ulsch_harq_information *ulsch_harq_information = NULL; nfapi_ul_config_harq_information *harq_information = NULL; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0)) if ((UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2) && (UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020) @@ -1201,12 +1201,15 @@ fill_nfapi_ulsch_harq_information(module_id_t module_ UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pusch_ConfigDedicated) != NULL, "physicalConfigDedicated->puschConfigDedicated for rnti %x is null\n", rntiP); -#if defined(Rel14) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0)) /* if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2) puschConfigDedicated_v1020 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2->pusch_ConfigDedicated_v1020; #endif - #ifdef Rel14 + #if (RRC_VERSION >= MAKE_VERSION(11, 3, 0)) if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4) puschConfigDedicated_v1130 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4->pusch_ConfigDedicated_v1130; + #endif + #if (RRC_VERSION >= MAKE_VERSION(12, 5, 0)) if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250; + #endif */ #endif harq_information->harq_information_rel10.delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index; @@ -1522,7 +1525,7 @@ fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pd } } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) void fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t * ul_config_pdu, uint8_t ue_type, @@ -1823,7 +1826,7 @@ void dump_ue_list(UE_list_t * listP, int ul_flag) } int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , uint8_t rach_resource_type #endif ) @@ -1857,7 +1860,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0; #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) UE_list->UE_template[cc_idP][UE_id].rach_resource_type = rach_resource_type; #endif @@ -3201,7 +3204,7 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id, int i, j; uint8_t *pdu; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) if (UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated != NULL && UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL && (UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->ext7) @@ -3945,7 +3948,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id, } break; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0)) case CQI_ReportModeAperiodic_rm32_v1250: AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8 || tmode == 9 @@ -3954,6 +3957,8 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id, tmode); AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm32 to be done\n"); break; +#endif +#if (RRC_VERSION >= MAKE_VERSION(13, 1, 0)) case CQI_ReportModeAperiodic_rm10_v1310: AssertFatal(tmode == 1 || tmode == 2 || tmode == 3 || tmode == 7, @@ -3969,7 +3974,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id, tmode); AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm11 to be done\n"); break; -#endif /* Rel14 */ +#endif /* #if (RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */ } } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 9ccb0e66ab..e66220ad66 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -547,7 +547,7 @@ rx_sdu(const module_id_t enb_mod_idP, if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, mac->common_channels[CC_idP]. ra[ii].rnti, harq_pid -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , mac->common_channels[CC_idP]. ra[ii].rach_resource_type @@ -1438,7 +1438,7 @@ schedule_ulsch_rnti(module_id_t module_idP, mcs_UL[harq_pid], rb_table [rb_table_index])); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (UE_template->rach_resource_type > 0) { // This is a BL/CE UE allocation fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions 1, //repetition_number @@ -1521,7 +1521,7 @@ schedule_ulsch_rnti(module_id_t module_idP, 0, // n_srs UE_template-> TBS_UL[harq_pid]); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (UE_template->rach_resource_type > 0) { // This is a BL/CE UE allocation fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions 1, //repetition_number diff --git a/openair2/LAYER2/MAC/proto.h b/openair2/LAYER2/MAC/proto.h index 64daede100..d2f038d81f 100644 --- a/openair2/LAYER2/MAC/proto.h +++ b/openair2/LAYER2/MAC/proto.h @@ -275,7 +275,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame void initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t subframeP, uint16_t preamble_index, int16_t timing_offset, uint16_t rnti -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , uint8_t rach_resource_type #endif ); @@ -294,7 +294,7 @@ unsigned short fill_rar(const module_id_t module_idP, const uint16_t N_RB_UL, const uint8_t input_buffer_length); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) unsigned short fill_rar_br(eNB_MAC_INST * eNB, int CC_id, RA_t * ra, @@ -521,7 +521,7 @@ void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame, uint8_t CH_index); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /* \brief Called by PHY to transfer MCH transport block to ue MAC. @param Mod_id Index of module instance @param frame Frame index @@ -645,7 +645,7 @@ int l2_init(LTE_DL_FRAME_PARMS * frame_parms, int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active); int mac_init(void); int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , uint8_t rach_resource_type #endif ); @@ -896,20 +896,20 @@ int rrc_mac_config_req_eNB(module_id_t module_idP, int p_eNB, int Ncp, int eutra_band, uint32_t dl_CarrierFreq, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int pbch_repetition, #endif rnti_t rntiP, BCCH_BCH_Message_t * mib, RadioResourceConfigCommonSIB_t * radioResourceConfigCommon, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BR, #endif struct PhysicalConfigDedicated *physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) SCellToAddMod_r10_t * sCellToAddMod_r10, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -927,13 +927,13 @@ int rrc_mac_config_req_eNB(module_id_t module_idP, additionalSpectrumEmission, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , uint8_t MBMS_Flag, MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList, PMCH_InfoList_r9_t * pmch_InfoList #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , SystemInformationBlockType1_v1310_IEs_t * sib1_ext_r13 @@ -967,7 +967,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP, radioResourceConfigCommon, struct PhysicalConfigDedicated *physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) SCellToAddMod_r10_t * sCellToAddMod_r10, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -986,7 +986,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP, additionalSpectrumEmission, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , uint8_t MBMS_Flag, MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList, @@ -1087,7 +1087,7 @@ void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t * uint8_t current_tx_nb, uint8_t n_srs, uint16_t size); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t * ul_config_pdu, uint8_t ue_type, uint16_t @@ -1163,7 +1163,7 @@ uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP); uint8_t get_ul_req_index(module_id_t module_idP, int CC_idP, sub_frame_t subframeP); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int get_numnarrowbandbits(long dl_Bandwidth); int mpdcch_sf_condition(eNB_MAC_INST * eNB, int CC_id, frame_t frameP, diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index 6261eaf356..03b73c599b 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -98,7 +98,7 @@ fill_rar(const module_id_t module_idP, return (ra->rnti); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //------------------------------------------------------------------------------ unsigned short fill_rar_br(eNB_MAC_INST * eNB, diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 5ca6d10bb5..c3d318305b 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -646,7 +646,7 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP, } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) unsigned char *parse_mch_header(unsigned char *mac_header, unsigned char *num_sdu, unsigned char *rx_lcids, diff --git a/openair2/LAYER2/MAC/vars.h b/openair2/LAYER2/MAC/vars.h index d153c82aee..f10501f36e 100644 --- a/openair2/LAYER2/MAC/vars.h +++ b/openair2/LAYER2/MAC/vars.h @@ -124,7 +124,7 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu; DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu; DCI1_5MHz_TDD_t DLSCH_alloc_pdu; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) DCI1C_5MHz_t MCCH_alloc_pdu; #endif diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index bd95808bc3..2997f99ee0 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1143,7 +1143,7 @@ rrc_pdcp_config_asn1_req ( uint8_t *const kRRCenc_pP, uint8_t *const kRRCint_pP, uint8_t *const kUPenc_pP -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP #endif ,rb_id_t *const defaultDRB @@ -1170,7 +1170,7 @@ rrc_pdcp_config_asn1_req ( hashtable_rc_t h_rc; hash_key_t key_defaultDRB = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_defaultDRB_rc; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) int i,j; MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL; MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL; @@ -1468,7 +1468,7 @@ rrc_pdcp_config_asn1_req ( } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) if (pmch_InfoList_r9_pP != NULL) { for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) { @@ -1678,7 +1678,7 @@ pdcp_config_req_asn1 ( memset(pdcp_pP, 0, sizeof(pdcp_t)); break; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) case CONFIG_ACTION_MBMS_ADD: case CONFIG_ACTION_MBMS_MODIFY: @@ -1998,7 +1998,7 @@ void pdcp_layer_init(void) module_id_t instance; int i,j; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) mbms_session_id_t session_id; mbms_service_id_t service_id; #endif @@ -2010,7 +2010,7 @@ void pdcp_layer_init(void) AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed"); for (instance = 0; instance < NUMBER_OF_UE_MAX; instance++) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) for (service_id = 0; service_id < maxServiceCount; service_id++) { for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) { @@ -2024,7 +2024,7 @@ void pdcp_layer_init(void) for (instance = 0; instance < NUMBER_OF_eNB_MAX; instance++) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) for (service_id = 0; service_id < maxServiceCount; service_id++) { for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) { diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 7c8f2dd033..9aa3d72a2a 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -74,7 +74,7 @@ #include "DRB-ToAddModList.h" #include "SRB-ToAddMod.h" #include "SRB-ToAddModList.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "MBMS-SessionInfoList-r9.h" #include "PMCH-InfoList-r9.h" #endif @@ -223,7 +223,7 @@ typedef struct pdcp_s { } pdcp_t; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) typedef struct pdcp_mbms_s { boolean_t instanciated_instance; rb_id_t rb_id; @@ -323,7 +323,7 @@ public_pdcp( uint8_t *const kRRCenc, uint8_t *const kRRCint, uint8_t *const kUPenc -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,PMCH_InfoList_r9_t *pmch_InfoList_r9 #endif ,rb_id_t *const defaultDRB @@ -493,7 +493,7 @@ public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];) protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[NUMBER_OF_UE_MAX];) protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[NUMBER_OF_UE_MAX];) // for noS1 mode protected_pdcp(unsigned int pdcp_eNB_UE_instance_to_rnti_index;) -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_pdcp(pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h #endif diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index 50663cdc4f..e8bf3a3c49 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -488,7 +488,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) if ((data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ || (data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST) /*TRAFFIC_IPV4_TYPE_MULTICAST */ || (data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_BROADCAST) /*TRAFFIC_IPV4_TYPE_BROADCAST */ ) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) PDCP_TRANSMISSION_MODE_TRANSPARENT; #else pdcp_mode= PDCP_TRANSMISSION_MODE_DATA; diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c index 0e21d5cfac..527b46a8c0 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c @@ -240,7 +240,7 @@ config_req_rlc_am ( uint16_t pollPDU_tab[PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now uint32_t maxRetxThreshold_tab[UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32}; uint32_t pollByte_tab[PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now -#if defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint32_t PollRetransmit_tab[T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000}; uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600}; uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400}; @@ -271,7 +271,7 @@ void config_req_rlc_am_asn1 ( if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= UL_AM_RLC__maxRetxThreshold_t32) && (config_am_pP->ul_AM_RLC.pollPDU<=PollPDU_pInfinity) && (config_am_pP->ul_AM_RLC.pollByte<PollByte_spare1) && -#if defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare5) && (config_am_pP->dl_AM_RLC.t_Reordering<32) && (config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare2) ) { diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c index 4e2723a8f4..16566cecb4 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c @@ -78,7 +78,7 @@ void config_req_rlc_um ( } } //----------------------------------------------------------------------------- -#if defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) const uint32_t t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600}; #else const uint32_t t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200}; @@ -103,7 +103,7 @@ void config_req_rlc_um_asn1 ( hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); hashtable_rc_t h_rc; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (mbms_flagP) { AssertFatal(dl_rlc_pP, "No RLC UM DL config"); @@ -198,7 +198,7 @@ void config_req_rlc_um_asn1 ( return; } -#if defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (dl_rlc_pP->t_Reordering<32) { #else if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) { diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index 783441bd58..a00664f621 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -323,7 +323,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_rc; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) rlc_mbms_id_t *mbms_id_p = NULL; logical_chan_id_t log_ch_id = 0; #endif @@ -337,7 +337,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, sdu_sizeP, sdu_pP); #endif -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #else AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP); #endif @@ -356,13 +356,13 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, DevAssert(sdu_pP != NULL); DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0); -#if !defined(Rel10) && !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0); #endif VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flagP == TRUE) { if (ctxt_pP->enb_flag) { @@ -498,7 +498,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) } else { /* MBMS_flag != 0 */ // LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id); if (sdu_pP != NULL) { @@ -616,7 +616,7 @@ rlc_module_init (void) AssertFatal(rlc_coll_p != NULL, "UNRECOVERABLE error, RLC hashtable_create failed"); for (module_id1=0; module_id1 < NUMBER_OF_UE_MAX; module_id1++) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) for (k=0; k < RLC_MAX_MBMS_LC; k++) { rlc_mbms_lcid2service_session_id_ue[module_id1][k].service_id = 0; @@ -631,7 +631,7 @@ rlc_module_init (void) } for (module_id1=0; module_id1 < NUMBER_OF_eNB_MAX; module_id1++) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) for (k=0; k < RLC_MAX_MBMS_LC; k++) { rlc_mbms_lcid2service_session_id_eNB[module_id1][k].service_id = 0; diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index ffd963204e..bf236538f6 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -55,7 +55,7 @@ # include "SRB-ToAddModList.h" # include "DRB-ToReleaseList.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "PMCH-InfoList-r9.h" #endif @@ -224,7 +224,7 @@ typedef struct rlc_mbms_id_s { mbms_session_id_t session_id; } rlc_mbms_id_t; -#if !defined(Rel10) && !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) # if !defined(maxServiceCount) //unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB # define maxServiceCount 1 @@ -309,7 +309,7 @@ private_rlc_mac(struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t, //----------------------------------------------------------------------------- // PUBLIC INTERFACE WITH RRC //----------------------------------------------------------------------------- -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP) * \brief Function for RRC to configure a Radio Bearer. * \param[in] ctxtP Running context. diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c index dee6ba7000..d2609f300c 100644 --- a/openair2/LAYER2/RLC/rlc_rrc.c +++ b/openair2/LAYER2/RLC/rlc_rrc.c @@ -39,7 +39,7 @@ #include "SRB-ToAddMod.h" #include "SRB-ToAddModList.h" #include "DL-UM-RLC.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "PMCH-InfoList-r9.h" #endif @@ -50,7 +50,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP const SRB_ToAddModList_t * const srb2add_listP, const DRB_ToAddModList_t * const drb2add_listP, const DRB_ToReleaseList_t * const drb2release_listP -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,const PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP #endif ) @@ -66,7 +66,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP rlc_union_t *rlc_union_p = NULL; hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_rc; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) int i, j; MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL; MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL; @@ -335,7 +335,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (pmch_InfoList_r9_pP != NULL) { for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) { @@ -478,14 +478,14 @@ rlc_op_status_t rrc_rlc_remove_rlc ( hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_lcid_rc; rlc_union_t *rlc_union_p = NULL; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) rlc_mbms_id_t *mbms_id_p = NULL; #endif /* for no gcc warnings */ (void)lcid; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flagP == TRUE) { if (ctxt_pP->enb_flag) { @@ -579,7 +579,7 @@ rlc_union_t* rrc_rlc_add_rlc ( hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_lcid_rc; rlc_union_t *rlc_union_p = NULL; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) rlc_mbms_id_t *mbms_id_p = NULL; logical_chan_id_t lcid = 0; #endif @@ -589,7 +589,7 @@ rlc_union_t* rrc_rlc_add_rlc ( AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC); } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flagP == TRUE) { if (ctxt_pP->enb_flag) { @@ -631,7 +631,7 @@ rlc_union_t* rrc_rlc_add_rlc ( h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p); if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flagP == TRUE) { LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n", diff --git a/openair2/PHY_INTERFACE/IF_Module.c b/openair2/PHY_INTERFACE/IF_Module.c index d0b8e57558..b6ae9ad53b 100644 --- a/openair2/PHY_INTERFACE/IF_Module.c +++ b/openair2/PHY_INTERFACE/IF_Module.c @@ -33,13 +33,13 @@ void handle_rach(UL_IND_t *UL_info) { UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble, UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance, UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,0 #endif ); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) { AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n"); diff --git a/openair2/PHY_INTERFACE/IF_Module.h b/openair2/PHY_INTERFACE/IF_Module.h index 3b1c88dda0..b2908775a6 100644 --- a/openair2/PHY_INTERFACE/IF_Module.h +++ b/openair2/PHY_INTERFACE/IF_Module.h @@ -75,7 +75,7 @@ typedef struct{ /// RACH indication list nfapi_rach_indication_t rach_ind; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// RACH indication list for BR UEs nfapi_rach_indication_t rach_ind_br; #endif diff --git a/openair2/PHY_INTERFACE/defs.h b/openair2/PHY_INTERFACE/defs.h index deb07443f1..371f4468d5 100644 --- a/openair2/PHY_INTERFACE/defs.h +++ b/openair2/PHY_INTERFACE/defs.h @@ -125,7 +125,7 @@ typedef struct { AdditionalSpectrumEmission_t *additionalSpectrumEmission, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// Configure Common PHY parameters from SIB13 void (*phy_config_sib13_eNB)(module_id_t Mod_id,int CC_id, int mbsfn_Area_idx, long mbsfn_AreaId_r9); @@ -140,7 +140,7 @@ typedef struct { void (*phy_config_dedicated_eNB)(module_id_t Mod_id,int CC_id,rnti_t rnti, struct PhysicalConfigDedicated *physicalConfigDedicated); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// Get MCH sdu and corresponding MCS for particular MBSFN subframe MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id, int CC_id, frame_t frameP,sub_frame_t subframe); #endif @@ -167,7 +167,7 @@ typedef struct { /// Send a received DLSCH sdu to MAC void (*ue_send_sdu)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,sub_frame_t subframe,uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// Send a received MCH sdu to MAC void (*ue_send_mch_sdu)(module_id_t Mod_id,uint8_t CC_id, frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area); @@ -215,7 +215,7 @@ typedef struct { AdditionalSpectrumEmission_t *additionalSpectrumEmission, struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// Configure Common PHY parameters from SIB13 void (*phy_config_sib13_ue)(uint8_t Mod_id,int CC_id, uint8_t eNB_index,int mbsfn_Area_idx, long mbsfn_AreaId_r9); diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c index 91834d9c9d..c2b4666ff4 100644 --- a/openair2/RRC/LITE/L2_interface.c +++ b/openair2/RRC/LITE/L2_interface.c @@ -285,7 +285,7 @@ mac_rrc_data_req( return (Sdu_size); } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if((Srb_id & RAB_OFFSET) == MCCH) { if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) { @@ -338,9 +338,9 @@ mac_rrc_data_req( //return(0); } -#endif //Rel10 || Rel14 +#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR){ memcpy(&buffer_pP[0], RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR, diff --git a/openair2/RRC/LITE/L2_interface_ue.c b/openair2/RRC/LITE/L2_interface_ue.c index 244f0d2253..66031aa656 100644 --- a/openair2/RRC/LITE/L2_interface_ue.c +++ b/openair2/RRC/LITE/L2_interface_ue.c @@ -211,7 +211,7 @@ mac_rrc_data_ind_ue( } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if ((srb_idP & RAB_OFFSET) == MCCH) { LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %d from eNB %d\n", @@ -242,7 +242,7 @@ mac_rrc_data_ind_ue( #endif } -#endif // Rel10 || Rel14 +#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) return(0); diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.c b/openair2/RRC/LITE/MESSAGES/asn1_msg.c index 77ba0c4cad..44cfc531ae 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.c @@ -52,7 +52,7 @@ #include "RRCConnectionSetup.h" #include "SRB-ToAddModList.h" #include "DRB-ToAddModList.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "MCCH-Message.h" //#define MRB1 1 #endif @@ -229,7 +229,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich mib->message.systemFrameNumber.size = 1; mib->message.systemFrameNumber.bits_unused=0; mib->message.spare.buf = (uint8_t *)spare; -#ifndef Rel14 +#if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) mib->message.spare.size = 2; mib->message.spare.bits_unused = 6; // This makes a spare of 10 bits #else @@ -488,7 +488,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ) { struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part; MBSFN_SubframeConfigList_t *MBSFNSubframeConfigList; MBSFN_AreaInfoList_r9_t *MBSFNArea_list; @@ -500,7 +500,7 @@ uint8_t do_SIB23(uint8_t Mod_id, BCCH_DL_SCH_Message_t *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation; SystemInformationBlockType2_t **sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2; SystemInformationBlockType3_t **sib3 = &RC.rrc[Mod_id]->carrier[CC_id].sib3; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) SystemInformationBlockType13_r9_t **sib13 = &RC.rrc[Mod_id]->carrier[CC_id].sib13; uint8_t MBMS_flag = RC.rrc[Mod_id]->carrier[CC_id].MBMS_flag; #endif @@ -522,7 +522,7 @@ uint8_t do_SIB23(uint8_t Mod_id, exit(-1); } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) LOG_I(RRC,"[eNB %d] Configuration SIB2/3, MBMS = %d\n", Mod_id, MBMS_flag); #else LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id); @@ -538,7 +538,7 @@ uint8_t do_SIB23(uint8_t Mod_id, *sib2 = &sib2_part->choice.sib2; *sib3 = &sib3_part->choice.sib3; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flag > 0) { sib13_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); @@ -552,7 +552,7 @@ uint8_t do_SIB23(uint8_t Mod_id, // sib2 (*sib2)->ac_BarringInfo = NULL; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #if 0 (*sib2)->ssac_BarringForMMTEL_Voice_r9 = NULL; (*sib2)->ssac_BarringForMMTEL_Video_r9 = NULL; @@ -641,7 +641,7 @@ uint8_t do_SIB23(uint8_t Mod_id, = configuration->pucch_nRB_CQI[CC_id]; (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = configuration->pucch_nCS_AN[CC_id]; -#if !defined(Rel10) && !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = configuration->pucch_n1_AN[CC_id]; #endif @@ -799,7 +799,7 @@ uint8_t do_SIB23(uint8_t Mod_id, (*sib2)->freqInfo.ul_Bandwidth = NULL; // (*sib2)->mbsfn_SubframeConfigList = NULL; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flag > 0) { LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2\n"); @@ -848,7 +848,7 @@ uint8_t do_SIB23(uint8_t Mod_id, (*sib2)->timeAlignmentTimerCommon=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120; /// (*SIB3) -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (*sib3)->ext1 = NULL; #if 0 (*sib3)->s_IntraSearch_v920=NULL; @@ -883,7 +883,7 @@ uint8_t do_SIB23(uint8_t Mod_id, // SIB13 // fill in all elements of SIB13 if present -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flag > 0 ) { // Notification for mcch change @@ -959,7 +959,7 @@ uint8_t do_SIB23(uint8_t Mod_id, sib2_part); ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib3_part); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (MBMS_flag > 0) { ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part); @@ -1411,7 +1411,7 @@ do_RRCConnectionSetup( // CQI ReportConfig physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic)); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic= CQI_ReportModeAperiodic_rm30; #else *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CQI_ReportConfig__cqi_ReportModeAperiodic_rm30; // HLC CQI, no PMI @@ -1800,7 +1800,7 @@ do_RRCConnectionReconfiguration( struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , SCellToAddMod_r10_t *SCell_config #endif ) @@ -2297,7 +2297,7 @@ uint8_t do_RRCConnectionRelease( uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) uint8_t do_MBSFNAreaConfig(uint8_t Mod_id, uint8_t sync_area, uint8_t *buffer, @@ -2469,7 +2469,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_ sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension)); measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId=measid; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrpResult=rsrp_s; measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrqResult=rsrq_s; #else diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.h b/openair2/RRC/LITE/MESSAGES/asn1_msg.h index 05396bf727..76fe6dcfca 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.h +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.h @@ -187,7 +187,7 @@ do_RRCConnectionReconfiguration( RSRP_Range_t *rsrp, C_RNTI_t *cba_rnti, struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , SCellToAddMod_r10_t *SCell_config #endif ); @@ -250,7 +250,7 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_ * @returns Size of encoded bit stream in bytes */ uint8_t do_MCCHMessage(uint8_t *buffer); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /*** * \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data) * @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h index 08ac30f836..b9d312d2ef 100644 --- a/openair2/RRC/LITE/defs.h +++ b/openair2/RRC/LITE/defs.h @@ -55,9 +55,11 @@ #include "RRCConnectionReestablishmentRequest.h" #include "BCCH-DL-SCH-Message.h" #include "BCCH-BCH-Message.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #include "MCCH-Message.h" #include "MBSFNAreaConfiguration-r9.h" +#endif +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "SCellToAddMod-r10.h" #endif #include "AS-Config.h" @@ -71,7 +73,7 @@ /* correct Rel(8|10)/Rel14 differences * the code is in favor of Rel14, those defines do the translation */ -#if !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) # define CipheringAlgorithm_r12_t e_SecurityAlgorithmConfig__cipheringAlgorithm # define CipheringAlgorithm_r12_eea0 SecurityAlgorithmConfig__cipheringAlgorithm_eea0 # define CipheringAlgorithm_r12_eea1 SecurityAlgorithmConfig__cipheringAlgorithm_eea1 @@ -120,7 +122,7 @@ #endif // This corrects something generated by asn1c which is different between Rel8 and Rel10 -#if !defined(Rel10) && !defined(Rel14) +#if (RRC_VERSION <= MAKE_VERSION(10, 0, 0)) #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member SystemInformation_r8_IEs_sib_TypeAndInfo_Member #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2 #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib3 @@ -141,7 +143,7 @@ #define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE /* -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920 #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920 #endif @@ -261,7 +263,7 @@ typedef struct UE_RRC_INFO_s { uint8_t SIB1systemInfoValueTag; uint32_t SIStatus; uint32_t SIcnt; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA #endif uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40 @@ -371,7 +373,7 @@ typedef struct HANDOVER_INFO_UE_s { typedef struct eNB_RRC_UE_s { uint8_t primaryCC_id; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) SCellToAddMod_r10_t sCell_config[2]; #endif SRB_ToAddModList_t* SRB_configList; @@ -485,7 +487,7 @@ typedef struct { uint8_t sizeof_SIB1; uint8_t *SIB23; uint8_t sizeof_SIB23; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint8_t *SIB1_BR; uint8_t sizeof_SIB1_BR; uint8_t *SIB23_BR; @@ -504,12 +506,12 @@ typedef struct { SystemInformationBlockType1_t *sib1; SystemInformationBlockType2_t *sib2; SystemInformationBlockType3_t *sib3; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) SystemInformationBlockType1_t *sib1_BR; SystemInformationBlockType2_t *sib2_BR; SystemInformationBlockType2_t *sib3_BR; #endif -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) SystemInformationBlockType13_r9_t *sib13; uint8_t MBMS_flag; uint8_t num_mbsfn_sync_area; @@ -611,7 +613,7 @@ typedef struct UE_RRC_INST_s { SystemInformationBlockType10_t *sib10[NB_CNX_UE]; SystemInformationBlockType11_t *sib11[NB_CNX_UE]; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) uint8_t MBMS_flag; uint8_t *MCCH_MESSAGE[NB_CNX_UE]; uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE]; diff --git a/openair2/RRC/LITE/defs_NB_IoT.h b/openair2/RRC/LITE/defs_NB_IoT.h index c8565d52bd..b4aef74625 100644 --- a/openair2/RRC/LITE/defs_NB_IoT.h +++ b/openair2/RRC/LITE/defs_NB_IoT.h @@ -122,7 +122,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s { uint8_t SIB1systemInfoValueTag; uint32_t SIStatus; uint32_t SIcnt; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA #endif uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40 @@ -513,7 +513,7 @@ typedef struct UE_RRC_INST_NB_IoT_s { SystemInformationBlockType10_t *sib10[NB_CNX_UE]; SystemInformationBlockType11_t *sib11[NB_CNX_UE]; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) uint8_t MBMS_flag; uint8_t *MCCH_MESSAGE[NB_CNX_UE]; uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE]; diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c index 3edf230ac2..1ff748b7b4 100644 --- a/openair2/RRC/LITE/rrc_UE.c +++ b/openair2/RRC/LITE/rrc_UE.c @@ -53,7 +53,7 @@ #include "DL-DCCH-Message.h" #include "BCCH-DL-SCH-Message.h" #include "PCCH-Message.h" -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "MCCH-Message.h" #endif #include "MeasConfig.h" @@ -139,7 +139,7 @@ static uint8_t check_trigger_meas_event( Q_OffsetRange_t ofn, Q_OffsetRange_t ocn, Hysteresis_t hys, Q_OffsetRange_t ofs, Q_OffsetRange_t ocs, long a3_offset, TimeToTrigger_t ttt); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area); #endif @@ -274,7 +274,7 @@ static void init_SI_UE( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ UE_rrc_inst[ctxt_pP->module_id].sib9[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType9_t) ); UE_rrc_inst[ctxt_pP->module_id].sib10[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType10_t) ); UE_rrc_inst[ctxt_pP->module_id].sib11[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType11_t) ); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) UE_rrc_inst[ctxt_pP->module_id].sib12[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType12_r9_t) ); UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType13_r9_t) ); #endif @@ -286,7 +286,7 @@ static void init_SI_UE( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt = 0; } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) //----------------------------------------------------------------------------- #if 0 static void init_MCCH_UE(module_id_t ue_mod_idP, uint8_t eNB_index) @@ -347,7 +347,7 @@ char openair_rrc_ue_init( const module_id_t ue_mod_idP, const unsigned char eNB_ UE_rrc_inst[ctxt.module_id].Srb2[eNB_index].Active=0; UE_rrc_inst[ctxt.module_id].HandoverInfoUe.measFlag=1; UE_rrc_inst[ctxt.module_id].ciphering_algorithm = CipheringAlgorithm_r12_eea0; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 2, 0)) UE_rrc_inst[ctxt.module_id].integrity_algorithm = SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920; #else UE_rrc_inst[ctxt.module_id].integrity_algorithm = SecurityAlgorithmConfig__integrityProtAlgorithm_reserved; @@ -873,7 +873,7 @@ rrc_ue_process_measConfig( rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -890,7 +890,7 @@ rrc_ue_process_measConfig( NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,0, (MBSFN_AreaInfoList_r9_t *)NULL, (PMCH_InfoList_r9_t *)NULL @@ -1335,7 +1335,7 @@ rrc_ue_process_radioResourceConfigDedicated( kRRCenc, kRRCint, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,(PMCH_InfoList_r9_t *)NULL #endif ,NULL); @@ -1345,7 +1345,7 @@ rrc_ue_process_radioResourceConfigDedicated( radioResourceConfigDedicated->srb_ToAddModList, (DRB_ToAddModList_t*)NULL, (DRB_ToReleaseList_t*)NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,(PMCH_InfoList_r9_t *)NULL #endif ); @@ -1385,7 +1385,7 @@ rrc_ue_process_radioResourceConfigDedicated( rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index], -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -1402,7 +1402,7 @@ rrc_ue_process_radioResourceConfigDedicated( NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *)NULL, @@ -1443,7 +1443,7 @@ rrc_ue_process_radioResourceConfigDedicated( rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index], -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -1460,7 +1460,7 @@ rrc_ue_process_radioResourceConfigDedicated( NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *)NULL, @@ -1517,7 +1517,7 @@ rrc_ue_process_radioResourceConfigDedicated( NULL, NULL, kUPenc -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,(PMCH_InfoList_r9_t *)NULL #endif , UE_rrc_inst[ctxt_pP->module_id].defaultDRB); @@ -1527,7 +1527,7 @@ rrc_ue_process_radioResourceConfigDedicated( (SRB_ToAddModList_t*)NULL, radioResourceConfigDedicated->drb_ToAddModList, (DRB_ToReleaseList_t*)NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,(PMCH_InfoList_r9_t *)NULL #endif ); @@ -1551,7 +1551,7 @@ rrc_ue_process_radioResourceConfigDedicated( rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index], -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, #endif @@ -1568,7 +1568,7 @@ rrc_ue_process_radioResourceConfigDedicated( NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *)NULL, @@ -2062,7 +2062,7 @@ rrc_ue_process_mobilityControlInfo( NULL, // key rrc encryption NULL, // key rrc integrity NULL // key encryption -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) ,NULL #endif ,NULL); @@ -2071,7 +2071,7 @@ rrc_ue_process_mobilityControlInfo( NULL,// SRB_ToAddModList NULL,// DRB_ToAddModList drb2release_list // DRB_ToReleaseList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) ,NULL #endif ,NULL); @@ -2106,7 +2106,7 @@ rrc_ue_process_mobilityControlInfo( eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -2123,7 +2123,7 @@ rrc_ue_process_mobilityControlInfo( NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,0, (MBSFN_AreaInfoList_r9_t *)NULL, (PMCH_InfoList_r9_t *)NULL @@ -2476,11 +2476,11 @@ rrc_ue_decode_dcch( case DL_DCCH_MessageType__c1_PR_counterCheck: break; -#if defined(Rel10) || defined(Rel14) - +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) case DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9: break; - +#endif +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) case DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10: break; @@ -2491,7 +2491,7 @@ rrc_ue_decode_dcch( case DL_DCCH_MessageType__c1_PR_spare1: case DL_DCCH_MessageType__c1_PR_spare2: case DL_DCCH_MessageType__c1_PR_spare3: -#if !defined(Rel14) +#if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) case DL_DCCH_MessageType__c1_PR_spare4: #endif break; @@ -2962,7 +2962,7 @@ static int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ rrc_mac_config_req_ue(ctxt_pP->module_id, 0, eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -2979,7 +2979,7 @@ static int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ NULL, NULL, (MBSFN_SubframeConfigList_t *)NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,0, (MBSFN_AreaInfoList_r9_t *)NULL, (PMCH_InfoList_r9_t *)NULL @@ -3237,7 +3237,7 @@ static void dump_sib2( SystemInformationBlockType2_t *sib2 ) LOG_I( RRC, "radioResourceConfigCommon.ul_CyclicPrefixLength : %ld\n", sib2->radioResourceConfigCommon.ul_CyclicPrefixLength ); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0)) // UplinkPowerControlCommon_v1020 // ... #endif @@ -3269,13 +3269,14 @@ static void dump_sib2( SystemInformationBlockType2_t *sib2 ) LOG_I( RRC, "timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon ); -#if defined(Rel10) || defined(Rel14) - +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) if (sib2->lateNonCriticalExtension) { LOG_I( RRC, "lateNonCriticalExtension : %p\n", sib2->lateNonCriticalExtension ); } else LOG_I( RRC, "lateNonCriticalExtension : not defined\n" ); +#endif +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) if (sib2->ext1 && sib2->ext1->ssac_BarringForMMTEL_Voice_r9) { LOG_I( RRC, "ssac_BarringForMMTEL_Voice_r9->ac_BarringFactor : %ld\n", sib2->ext1->ssac_BarringForMMTEL_Voice_r9->ac_BarringFactor ); @@ -3295,7 +3296,9 @@ static void dump_sib2( SystemInformationBlockType2_t *sib2 ) BIT_STRING_to_uint32(&sib2->ext1->ssac_BarringForMMTEL_Video_r9->ac_BarringForSpecialAC) ); } else LOG_I( RRC, "ssac_BarringForMMTEL_Video_r9 : not defined\n" ); +#endif +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (sib2->ext2 && sib2->ext2->ac_BarringForCSFB_r10) { LOG_I( RRC, "ac_BarringForCSFB_r10->ac_BarringFactor : %ld\n", sib2->ext2->ac_BarringForCSFB_r10->ac_BarringFactor ); @@ -3538,7 +3541,7 @@ static void dump_sib5( SystemInformationBlockType5_t *sib5 ) } } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) if (ifcfInfo->ext1 && ifcfInfo->ext1->q_QualMin_r9) LOG_I(RRC," Q_QualMin_r9 : %ld\n",*ifcfInfo->ext1->q_QualMin_r9); @@ -3551,7 +3554,7 @@ static void dump_sib5( SystemInformationBlockType5_t *sib5 ) } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) static void dump_sib13( SystemInformationBlockType13_r9_t *sib13 ) { LOG_I( RRC, "[UE] Dumping SIB13\n" ); @@ -3600,7 +3603,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in rrc_mac_config_req_ue(ctxt_pP->module_id, 0, eNB_index, &UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->radioResourceConfigCommon, (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, #endif (MeasObjectToAddMod_t **)NULL, @@ -3616,7 +3619,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth, &UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.additionalSpectrumEmission, UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->mbsfn_SubframeConfigList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) ,0, (MBSFN_AreaInfoList_r9_t *)NULL, (PMCH_InfoList_r9_t *)NULL @@ -3628,7 +3631,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in #endif ); // After SI is received, prepare RRCConnectionRequest -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option #endif @@ -3759,7 +3762,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in } break; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 2, 0)) case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920: if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&2048) == 0) { @@ -4150,7 +4153,7 @@ static uint8_t check_trigger_meas_event( return 0; } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) //----------------------------------------------------------------------------- int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t* const Sdu, const uint8_t Sdu_len, const uint8_t mbsfn_sync_area ) { @@ -4225,7 +4228,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i rrc_mac_config_req_ue(ue_mod_idP,0,eNB_index, (RadioResourceConfigCommonSIB_t *)NULL, (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -4242,7 +4245,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i NULL, NULL, (MBSFN_SubframeConfigList_t *)NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *)NULL, @@ -4269,7 +4272,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i NULL, // key rrc encryption NULL, // key rrc integrity NULL // key encryption -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) ,&(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9) #endif ,NULL); @@ -4278,7 +4281,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i NULL,// SRB_ToAddModList NULL,// DRB_ToAddModList NULL,// DRB_ToReleaseList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) &(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9) #endif ); @@ -4382,7 +4385,7 @@ void *rrc_ue_task( void *args_p ) RRC_MAC_CCCH_DATA_IND (msg_p).enb_index); break; -# if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) case RRC_MAC_MCCH_DATA_IND: LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d, mbsfn SA %d\n", ue_mod_id, msg_name, @@ -4805,7 +4808,7 @@ openair_rrc_top_init_ue( UE_rrc_inst[module_id].UECapability_size = UECap->sdu_size; } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) LOG_I(RRC,"[UE] eMBMS active state is %d \n", eMBMS_active); for (module_id=0; module_id<NB_UE_INST; module_id++) { diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index 9faa686ef6..72907667b0 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -60,7 +60,7 @@ #include "T.h" -//#if defined(Rel10) || defined(Rel14) +//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "MeasResults.h" //#endif @@ -142,11 +142,11 @@ init_SI( ) //----------------------------------------------------------------------------- { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int i; #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 1, 0)) SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(SystemInformationBlockType1_v1310_IEs_t *)NULL; #endif @@ -159,7 +159,7 @@ init_SI( RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Ncp = configuration->prefix_type[CC_id]; RC.rrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id]; RC.rrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].pbch_repetition = configuration->pbch_repetition[CC_id]; #endif LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n", @@ -239,9 +239,8 @@ init_SI( PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon. ul_ReferenceSignalsPUSCH.cyclicShift); - -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MBMS_flag > 0) { for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count; i++) { // SIB 2 @@ -260,7 +259,8 @@ init_SI( PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset); } - + +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) // SIB13 for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count; i++) { LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/%d (partial)\n", @@ -274,6 +274,7 @@ init_SI( PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9); } +#endif } else memset((void*)&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13,0,sizeof(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13)); #endif @@ -282,7 +283,7 @@ init_SI( PROTOCOL_RRC_CTXT_FMT" RRC_UE --- MAC_CONFIG_REQ (SIB1.tdd & SIB2 params) ---> MAC_UE\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) if ((RC.rrc[ctxt_pP->module_id]->carrier[CC_id].mib.message.schedulingInfoSIB1_BR_r13>0) && (RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR!=NULL)) { AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension!=NULL, @@ -307,7 +308,7 @@ init_SI( RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Ncp, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1->freqBandIndicator, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].pbch_repetition, #endif 0, // rnti @@ -315,12 +316,12 @@ init_SI( &RC.rrc[ctxt_pP->module_id]->carrier[CC_id].mib, (RadioResourceConfigCommonSIB_t *) & RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->radioResourceConfigCommon, -#if defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) & RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2_BR->radioResourceConfigCommon, #endif (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -335,20 +336,20 @@ init_SI( RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->freqInfo.ul_Bandwidth, &RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->freqInfo.additionalSpectrumEmission, (MBSFN_SubframeConfigList_t*) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MBMS_flag, (MBSFN_AreaInfoList_r9_t*) & RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9, (PMCH_InfoList_r9_t *) NULL #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , sib1_v13ext #endif ); } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /*------------------------------------------------------------------------------*/ static void init_MCCH( @@ -406,17 +407,17 @@ init_MCCH( // LOG_I(RRC, "DUY: session ID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->sessionId_r9->buf[0]); rrc_mac_config_req_eNB(enb_mod_idP, CC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif 0,//rnti (BCCH_BCH_Message_t *)NULL, (RadioResourceConfigCommonSIB_t *) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) NULL, #endif (struct PhysicalConfigDedicated *)NULL, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -429,16 +430,16 @@ init_MCCH( (MobilityControlInfo_t *)NULL, (SchedulingInfoList_t *) NULL, 0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) & (RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9) -# endif -# ifdef Rel14 +#endif +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , (SystemInformationBlockType1_v1310_IEs_t *)NULL -# endif +#endif ); //LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9); @@ -470,9 +471,9 @@ static void init_MBMS( NULL, // key rrc encryption NULL, // key rrc integrity NULL // key encryption -# if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9) -# endif +#endif ,NULL); rrc_rlc_config_asn1_req(&ctxt, @@ -692,7 +693,7 @@ rrc_eNB_free_mem_UE_context( PROTOCOL_RRC_CTXT_UE_FMT" Clearing UE context 0x%p (free internal structs)\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ue_context_pP); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[0]); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[1]); #endif @@ -1166,17 +1167,17 @@ rrc_eNB_generate_RRCConnectionReestablishment( rrc_mac_config_req_eNB(ctxt_pP->module_id, ue_context_pP->ue_context.primaryCC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif ctxt_pP->rnti, (BCCH_BCH_Message_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) NULL, #endif (struct PhysicalConfigDedicated* ) ue_context_pP->ue_context.physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -1189,10 +1190,10 @@ rrc_eNB_generate_RRCConnectionReestablishment( NULL, (SchedulingInfoList_t *) NULL, 0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL #endif -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) ,(SystemInformationBlockType1_v1310_IEs_t *)NULL #endif ); @@ -1748,7 +1749,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( (RSRP_Range_t*)rsrp, // rsrp, (C_RNTI_t*)cba_RNTI, // cba_RNTI (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList //dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (SCellToAddMod_r10_t*)NULL #endif ); @@ -2183,7 +2184,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (SCellToAddMod_r10_t*)NULL #endif ); @@ -2451,7 +2452,7 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* cons NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (SCellToAddMod_r10_t*)NULL #endif ); @@ -2574,7 +2575,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release( const protocol_ NULL, NULL, (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (SCellToAddMod_r10_t*)NULL #endif ); @@ -2669,7 +2670,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons *ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5; MeasIdToAddModList_t *MeasId_list = NULL; MeasIdToAddMod_t *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) long *sr_ProhibitTimer_r9 = NULL; // uint8_t sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1); //uint8_t sCellIndexToAdd = 0; @@ -2889,7 +2890,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long)); *sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR mac_MainConfig->ext1 = CALLOC(1, sizeof(struct MAC_MainConfig__ext1)); @@ -2956,7 +2957,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons //feedback mode needs to be set as well //TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable printf("setting cqi reporting mode to rm31\n"); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportModeAperiodic_rm31; #else *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, no PMI @@ -3302,7 +3303,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons (RSRP_Range_t*)rsrp, (C_RNTI_t*)cba_RNTI, (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (SCellToAddMod_r10_t*)NULL #endif ); @@ -3688,7 +3689,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt //feedback mode needs to be set as well //TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable printf("setting cqi reporting mode to rm31\n"); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportModeAperiodic_rm31; #else *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, no PMI @@ -3892,7 +3893,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt (RSRP_Range_t*)rsrp, (C_RNTI_t*)cba_RNTI, (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (SCellToAddMod_r10_t*)NULL #endif ); @@ -3962,7 +3963,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell( uint8_t size; uint8_t buffer[100]; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) uint8_t sCellIndexToAdd = 0; //one SCell so far // uint8_t sCellIndexToAdd; @@ -3996,7 +3997,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell( (C_RNTI_t*)NULL, (struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , ue_context_pP->ue_context.sCell_config #endif ); @@ -4079,7 +4080,7 @@ rrc_eNB_process_MeasurementReport( } } -// #if defined(Rel10) || defined(Rel14) +// #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // #else @@ -4346,7 +4347,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( // HandoverCommand_t handoverCommand; //uint8_t sourceModId = // get_adjacent_cell_mod_id(ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->sourcePhysCellId); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) long *sr_ProhibitTimer_r9; #endif @@ -4590,17 +4591,17 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ctxt_pP->module_id, ue_context_pP->ue_context.primaryCC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif ue_context_pP->ue_context.rnti, (BCCH_BCH_Message_t *) NULL, (RadioResourceConfigCommonSIB_t*) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t*) NULL, #endif ue_context_pP->ue_context.physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -4616,13 +4617,13 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL #endif -# ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , (SystemInformationBlockType1_v1310_IEs_t *)NULL -# endif +#endif ); // Configure target eNB SRB2 @@ -4738,7 +4739,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long)); *sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR mac_MainConfig->ext1 = CALLOC(1, sizeof(struct MAC_MainConfig__ext1)); @@ -5100,7 +5101,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( rrc_pdcp_config_asn1_req(&ctxt, ue_context_pP->ue_context.SRB_configList, (DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL, 0xff, NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL #endif ,NULL); @@ -5108,7 +5109,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( rrc_rlc_config_asn1_req(&ctxt, ue_context_pP->ue_context.SRB_configList, (DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL #endif ); @@ -5139,7 +5140,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( NULL, NULL, dedicatedInfoNASList -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , NULL // SCellToAddMod_r10_t #endif ); @@ -5171,17 +5172,17 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ctxt_pP->module_id, ue_context_pP->ue_context.primaryCC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif ue_context_pP->ue_context.rnti, (BCCH_BCH_Message_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) NULL, #endif ue_context_pP->ue_context.physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -5193,13 +5194,13 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( (TDD_Config_t *) NULL, (MobilityControlInfo_t *) mobilityInfo, (SchedulingInfoList_t *) NULL, 0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL #endif -# ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , (SystemInformationBlockType1_v1310_IEs_t *)NULL -# endif +#endif ); /* @@ -5323,7 +5324,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( kRRCenc, kRRCint, kUPenc -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL #endif ,NULL); @@ -5334,7 +5335,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( DRB_configList, // (DRB_ToReleaseList_t *) NULL DRB_Release_configList2 -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL #endif ); @@ -5443,17 +5444,17 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ctxt_pP->module_id, ue_context_pP->ue_context.primaryCC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif ue_context_pP->ue_context.rnti, (BCCH_BCH_Message_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) NULL, #endif ue_context_pP->ue_context.physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -5466,13 +5467,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( NULL, (SchedulingInfoList_t *) NULL, 0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL #endif -# ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , (SystemInformationBlockType1_v1310_IEs_t *)NULL -# endif +#endif ); } else { // remove LCHAN from MAC/PHY @@ -5498,17 +5499,17 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( rrc_mac_config_req_eNB(ctxt_pP->module_id, ue_context_pP->ue_context.primaryCC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif ue_context_pP->ue_context.rnti, (BCCH_BCH_Message_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) NULL, #endif ue_context_pP->ue_context.physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -5521,13 +5522,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( NULL, (SchedulingInfoList_t *) NULL, 0, NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL #endif -# ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , (SystemInformationBlockType1_v1310_IEs_t *)NULL -# endif +#endif ); } } @@ -5616,17 +5617,17 @@ rrc_eNB_generate_RRCConnectionSetup( ctxt_pP->module_id, ue_context_pP->ue_context.primaryCC_id, 0,0,0,0,0, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 0, #endif ue_context_pP->ue_context.rnti, (BCCH_BCH_Message_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL, -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) (RadioResourceConfigCommonSIB_t *) NULL, #endif ue_context_pP->ue_context.physicalConfigDedicated, -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) (SCellToAddMod_r10_t *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, #endif @@ -5639,13 +5640,13 @@ rrc_eNB_generate_RRCConnectionSetup( NULL, (SchedulingInfoList_t *) NULL, 0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL #endif -# ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) , (SystemInformationBlockType1_v1310_IEs_t *)NULL -# endif +#endif ); break; } @@ -5750,14 +5751,14 @@ openair_rrc_eNB_init( LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n", PROTOCOL_RRC_CTXT_ARGS(&ctxt)); -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // can clear it at runtime RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag = 0; // This has to come from some top-level configuration // only CC_id 0 is logged -#if defined(Rel10) +#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel10 RRC detected, MBMS flag %d\n", #else LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel14 RRC detected, MBMS flag %d\n", @@ -5807,7 +5808,7 @@ openair_rrc_eNB_init( rrc_init_global_param(); for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) switch (RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag) { case 1: case 2: @@ -6112,18 +6113,18 @@ rrc_eNB_decode_ccch( NULL, NULL, NULL -# if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL -# endif +#endif ,NULL); rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, (DRB_ToAddModList_t*) NULL, (DRB_ToReleaseList_t*) NULL -# if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL -# endif +#endif ); #endif //NO_RRM } @@ -6351,18 +6352,18 @@ rrc_eNB_decode_ccch( NULL, NULL, NULL -# if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL -# endif +#endif ,NULL); rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, (DRB_ToAddModList_t*) NULL, (DRB_ToReleaseList_t*) NULL -# if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , (PMCH_InfoList_r9_t *) NULL -# endif +#endif ); #endif //NO_RRM @@ -6983,7 +6984,7 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { break; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) case UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9: T(T_ENB_RRC_UE_INFORMATION_RESPONSE_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), @@ -6996,7 +6997,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); break; +#endif +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) case UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10: T(T_ENB_RRC_RECONFIGURATION_COMPLETE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); @@ -7249,7 +7252,7 @@ openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active) RC.rrc[module_id]->HO_flag = (uint8_t)HO_active; } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) LOG_I(RRC,"[eNB] eMBMS active state is %d \n", eMBMS_active); for (module_id=0; module_id<NB_eNB_INST; module_id++) { diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c index 80ae1c9ba5..eb82c41c12 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c @@ -76,7 +76,7 @@ static const uint16_t S1AP_ENCRYPTION_EEA2_MASK = 0x4000; static const uint16_t S1AP_INTEGRITY_EIA1_MASK = 0x8000; static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x4000; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 2, 0)) # define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920 #else #ifdef EXMIMO_IOT diff --git a/openair2/RRC/LITE/vars.h b/openair2/RRC/LITE/vars.h index e3bab5f5eb..920c41f776 100644 --- a/openair2/RRC/LITE/vars.h +++ b/openair2/RRC/LITE/vars.h @@ -59,7 +59,7 @@ struct LogicalChannelConfig__ul_SpecificParameters LCSRB2 = {3, }; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) struct LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = { logicalChannelSR_Mask_r9: &logicalChannelSR_Mask_r9 }; @@ -67,14 +67,14 @@ struct LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = { // These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6) LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB1 -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , ext1: &logicalChannelSR_Mask_r9_ext1 #endif }; LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB2 -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) , ext1: &logicalChannelSR_Mask_r9_ext1 #endif diff --git a/openair3/S1AP/s1ap_common.h b/openair3/S1AP/s1ap_common.h index 003bdd2d62..a2c380a684 100644 --- a/openair3/S1AP/s1ap_common.h +++ b/openair3/S1AP/s1ap_common.h @@ -333,7 +333,7 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "S1ap-IE.h" #include "S1AP-PDU.h" -#if defined (UPDATE_RELEASE_9) +#if (MAKE_VERSION(9, 0, 0) <= S1AP_VERSION) # include "S1ap-BroadcastCancelledAreaList.h" # include "S1ap-CancelledCellinEAI.h" # include "S1ap-CancelledCellinEAI-Item.h" @@ -364,9 +364,9 @@ inline void ASN_DEBUG(const char *fmt, ...); # include "S1ap-UplinkUEAssociatedLPPaTransport.h" # include "S1ap-DownlinkNonUEAssociatedLPPaTransport.h" # include "S1ap-UplinkNonUEAssociatedLPPaTransport.h" -#endif /* (UPDATE_RELEASE_9) */ +#endif /* #if (MAKE_VERSION(9, 0, 0) <= S1AP_VERSION) */ -#if defined(UPDATE_RELEASE_10) +#if (MAKE_VERSION(10, 0, 0) <= S1AP_VERSION) # include "S1ap-PagingPriority.h" # include "S1ap-RelayNode-Indicator.h" # include "S1ap-GWContextReleaseIndication.h" @@ -375,7 +375,7 @@ inline void ASN_DEBUG(const char *fmt, ...); # include "S1ap-PrivacyIndicator.h" # include "S1ap-TrafficLoadReductionIndication.h" # include "S1ap-GUMMEIList.h" -#endif /* (UPDATE_RELEASE_10) */ +#endif /* #if (MAKE_VERSION(10, 0, 0) <= S1AP_VERSION) */ /* Checking version of ASN1C compiler */ #if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION) diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c index 0b02fc6db9..44b0a5b1e8 100644 --- a/openair3/S1AP/s1ap_eNB_handlers.c +++ b/openair3/S1AP/s1ap_eNB_handlers.c @@ -141,7 +141,7 @@ s1ap_message_decoded_callback messages_callback[][3] = { { 0, 0, 0 }, /* eNBConfigurationTransfer */ { 0, 0, 0 }, /* MMEConfigurationTransfer */ { 0, 0, 0 }, /* CellTrafficTrace */ -#if defined(UPDATE_RELEASE_9) +#if (MAKE_VERSION(9, 0, 0) <= S1AP_VERSION) { 0, 0, 0 }, /* Kill */ { 0, 0, 0 }, /* DownlinkUEAssociatedLPPaTransport */ { 0, 0, 0 }, /* UplinkUEAssociatedLPPaTransport */ diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 7dcfd432de..a7f94f9531 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -151,7 +151,7 @@ void stop_eNB(int nb_inst); int wakeup_tx(PHY_VARS_eNB *eNB,RU_proc_t *ru_proc); int wakeup_txfh(eNB_rxtx_proc_t *proc,RU_proc_t *ru_proc); void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #endif extern int codingw; @@ -213,7 +213,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam // if this is IF5 or 3GPP_eNB if (eNB && eNB->RU_list && eNB->RU_list[0] && eNB->RU_list[0]->function < NGFI_RAU_IF4p5) { wakeup_prach_eNB(eNB,NULL,proc->frame_rx,proc->subframe_rx); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx); #endif } @@ -705,7 +705,7 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) { } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) { eNB_proc_t *proc = &eNB->proc; @@ -794,7 +794,7 @@ static void* eNB_thread_prach( void* param ) { LOG_D(PHY,"Running eNB prach procedures\n"); prach_procedures(eNB -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,0 #endif ); @@ -808,7 +808,7 @@ static void* eNB_thread_prach( void* param ) { return &eNB_thread_prach_status; } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /*! * \brief The prach receive thread of eNB for BL/CE UEs. * \param param is a \ref eNB_proc_t structure which contains the info what to process. @@ -891,7 +891,7 @@ void init_eNB_proc(int inst) { eNB_proc_t *proc; eNB_rxtx_proc_t *proc_rxtx; pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_prach=NULL; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_attr_t *attr_prach_br=NULL; #endif @@ -937,7 +937,7 @@ void init_eNB_proc(int inst) { pthread_attr_init( &proc->attr_asynch_rxtx); pthread_attr_init( &proc_rxtx[0].attr_rxtx); pthread_attr_init( &proc_rxtx[1].attr_rxtx); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) proc->instance_cnt_prach_br = -1; proc->RU_mask_prach_br=0; pthread_mutex_init( &proc->mutex_prach_br, NULL); @@ -949,7 +949,7 @@ void init_eNB_proc(int inst) { attr0 = &proc_rxtx[0].attr_rxtx; attr1 = &proc_rxtx[1].attr_rxtx; attr_prach = &proc->attr_prach; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) attr_prach_br = &proc->attr_prach_br; #endif @@ -973,7 +973,7 @@ void init_eNB_proc(int inst) { pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] ); } pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB ); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNB ); #endif char name[16]; @@ -1057,7 +1057,7 @@ void kill_eNB_proc(int inst) { LOG_I(PHY, "Destroying prach mutex/cond\n"); pthread_mutex_destroy( &proc->mutex_prach ); pthread_cond_destroy( &proc->cond_prach ); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) proc->instance_cnt_prach_br = 0; pthread_cond_signal( &proc->cond_prach_br ); pthread_join( proc->pthread_prach_br, (void**)&status ); @@ -1207,7 +1207,7 @@ void init_eNB_afterRU(void) { LOG_I(PHY,"Overwriting eNB->prach_vars.rxsigF[0]:%p\n", eNB->prach_vars.rxsigF[0]); eNB->prach_vars.rxsigF[0] = (int16_t**)malloc16(64*sizeof(int16_t*)); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) for (int ce_level=0;ce_level<4;ce_level++) { LOG_I(PHY,"Overwriting eNB->prach_vars_br.rxsigF.rxsigF[0]:%p\n", eNB->prach_vars_br.rxsigF[ce_level]); eNB->prach_vars_br.rxsigF[ce_level] = (int16_t**)malloc16(64*sizeof(int16_t*)); @@ -1230,7 +1230,7 @@ void init_eNB_afterRU(void) { for (i=0;i<eNB->RU_list[ru_id]->nb_rx;aa++,i++) { LOG_I(PHY,"Attaching RU %d antenna %d to eNB antenna %d\n",eNB->RU_list[ru_id]->idx,i,aa); eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[ru_id]->prach_rxsigF[i]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) for (int ce_level=0;ce_level<4;ce_level++) eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[ru_id]->prach_rxsigF_br[ce_level][i]; #endif @@ -1283,7 +1283,7 @@ void init_eNB_afterRU(void) { RC.ru[ru_id]->wakeup_rxtx = wakeup_rxtx; RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_eNB; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RC.ru[ru_id]->wakeup_prach_eNB_br = wakeup_prach_eNB_br; #endif RC.ru[ru_id]->eNB_top = eNB_top; diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 1cbe73c309..f58a9a3aa3 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -527,7 +527,7 @@ void fh_if4p5_south_asynch_in(RU_t *ru,int *frame,int *subframe) { } if (packet_type == IF4p5_PULFFT) symbol_mask &= (~(1<<symbol_number)); else if (packet_type == IF4p5_PRACH) prach_rx &= (~0x1); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) else if (packet_type == IF4p5_PRACH_BR_CE0) prach_rx &= (~0x2); else if (packet_type == IF4p5_PRACH_BR_CE1) prach_rx &= (~0x4); else if (packet_type == IF4p5_PRACH_BR_CE2) prach_rx &= (~0x8); @@ -1010,7 +1010,7 @@ static void* ru_thread_prach( void* param ) { if (ru->eNB_list[0]){ prach_procedures( ru->eNB_list[0] -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,0 #endif ); @@ -1023,7 +1023,7 @@ static void* ru_thread_prach( void* param ) { NULL, proc->frame_prach, 0 -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,0 #endif ); @@ -1038,7 +1038,7 @@ static void* ru_thread_prach( void* param ) { return &ru_thread_prach_status; } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) static void* ru_thread_prach_br( void* param ) { static int ru_thread_prach_status; @@ -1237,7 +1237,7 @@ static inline int wakeup_prach_ru(RU_t *ru) { return(0); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) static inline int wakeup_prach_ru_br(RU_t *ru) { struct timespec wait; @@ -1627,7 +1627,7 @@ static void* ru_thread( void* param ) { if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) { wakeup_prach_ru(ru); } -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) else if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)>1)) { wakeup_prach_ru_br(ru); } @@ -1785,7 +1785,7 @@ void init_RU_proc(RU_t *ru) { RU_proc_t *proc; pthread_attr_t *attr_FH=NULL,*attr_FH1=NULL,*attr_prach=NULL,*attr_asynch=NULL,*attr_synch=NULL,*attr_emulateRF=NULL; //pthread_attr_t *attr_fep=NULL; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_attr_t *attr_prach_br=NULL; #endif char name[100]; @@ -1838,7 +1838,7 @@ void init_RU_proc(RU_t *ru) { pthread_attr_init( &proc->attr_asynch_rxtx); pthread_attr_init( &proc->attr_fep); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) proc->instance_cnt_prach_br = -1; pthread_mutex_init( &proc->mutex_prach_br, NULL); pthread_cond_init( &proc->cond_prach_br, NULL); @@ -1852,7 +1852,7 @@ void init_RU_proc(RU_t *ru) { attr_synch = &proc->attr_synch; attr_asynch = &proc->attr_asynch_rxtx; attr_emulateRF = &proc->attr_emulateRF; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) attr_prach_br = &proc->attr_prach_br; #endif #endif @@ -1866,7 +1866,7 @@ void init_RU_proc(RU_t *ru) { if (ru->function == NGFI_RRU_IF4p5) { pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru ); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_create( &proc->pthread_prach_br, attr_prach_br, ru_thread_prach_br, (void*)ru ); #endif if (ru->is_slave == 1) pthread_create( &proc->pthread_synch, attr_synch, ru_thread_synch, (void*)ru); @@ -1916,7 +1916,7 @@ void kill_RU_proc(int inst) pthread_cond_signal(&proc->cond_prach); pthread_mutex_unlock(&proc->mutex_prach); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_mutex_lock(&proc->mutex_prach_br); proc->instance_cnt_prach_br = 0; pthread_cond_signal(&proc->cond_prach_br); @@ -1946,7 +1946,7 @@ void kill_RU_proc(int inst) if (ru->function == NGFI_RRU_IF4p5) { LOG_D(PHY, "Joining pthread_prach\n"); pthread_join(proc->pthread_prach, NULL); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) LOG_D(PHY, "Joining pthread_prach_br\n"); pthread_join(proc->pthread_prach_br, NULL); #endif @@ -2010,7 +2010,7 @@ void kill_RU_proc(int inst) pthread_attr_destroy(&proc->attr_asynch_rxtx); pthread_attr_destroy(&proc->attr_fep); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_mutex_destroy(&proc->mutex_prach_br); pthread_cond_destroy(&proc->cond_prach_br); pthread_attr_destroy(&proc->attr_prach_br); @@ -2106,7 +2106,7 @@ void configure_ru(int idx, LOG_I(PHY,"REMOTE_IF4p5: prach_FrequOffset %d, prach_ConfigIndex %d\n", config->prach_FreqOffset[0],config->prach_ConfigIndex[0]); -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) int i; for (i=0;i<4;i++) { config->emtc_prach_CElevel_enable[0][i] = ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i]; @@ -2150,7 +2150,7 @@ void configure_rru(int idx, config->prach_FreqOffset[0],config->prach_ConfigIndex[0],ru->att_tx,ru->att_rx); ru->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset = config->prach_FreqOffset[0]; ru->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex = config->prach_ConfigIndex[0]; -#ifdef Rel14 +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) for (int i=0;i<4;i++) { ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] = config->emtc_prach_CElevel_enable[0][i]; ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[i] = config->emtc_prach_FreqOffset[0][i]; diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index 5900170480..684c924d25 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -163,7 +163,7 @@ extern channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs]; extern channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs]; extern mapping small_scale_names[]; -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) extern pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH]; extern pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; #endif @@ -1631,7 +1631,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) } } -#if defined(Rel10) || defined(Rel14) +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) mbms_service_id_t service_id; mbms_session_id_t session_id; rb_id_t rb_id; @@ -1666,7 +1666,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) */ // old version /* // MBSM multicast traffic - #if defined(Rel10) || defined(Rel14) + #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value) for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH -- GitLab