From 27a3cff7988dfc45339fc9a124c3d6b79b75fe23 Mon Sep 17 00:00:00 2001 From: Javier Morgade Date: Tue, 21 May 2019 10:59:17 +0200 Subject: [PATCH] BUGFIX and cppcheck/warning suppression --- openair1/PHY/INIT/phy_init.h | 7 +++++-- openair2/LAYER2/MAC/config.c | 3 ++- openair2/LAYER2/MAC/config_ue.c | 5 ++--- openair2/RRC/LTE/rrc_eNB.c | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h index f236a7497c..ac03ec7ded 100644 --- a/openair1/PHY/INIT/phy_init.h +++ b/openair1/PHY/INIT/phy_init.h @@ -35,6 +35,9 @@ #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "LTE_SCellToAddMod-r10.h" #endif +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) +#include "LTE_NonMBSFN-SubframeConfig-r14.h" +#endif /** @addtogroup _PHY_STRUCTURES_ * @{ */ @@ -257,9 +260,9 @@ void phy_config_sib13_ue(module_id_t Mod_id, int CC_id,uint8_t CH_index,int mbsfn_Area_idx, long mbsfn_AreaId_r9); -/*void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id, +void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id, uint8_t eNB_id, - struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);*/ + struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig); /** \brief Configure eNB MBSFN common parameters. diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index 6e6fbdaf28..62c6c43630 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -877,7 +877,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, LOG_D(MAC, "[eNB %d][CONFIG] Received a non MBSFN subframe allocation pattern (%x,%x):%x for FeMBMS-CAS\n", Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 ); - RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7); + //RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7); + RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig; nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP]; cfg->fembms_config.non_mbsfn_config_flag.value = 1; diff --git a/openair2/LAYER2/MAC/config_ue.c b/openair2/LAYER2/MAC/config_ue.c index c196933d4d..50586c37e3 100644 --- a/openair2/LAYER2/MAC/config_ue.c +++ b/openair2/LAYER2/MAC/config_ue.c @@ -571,12 +571,11 @@ rrc_mac_config_req_ue(module_id_t Mod_idP, #endif -#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if(nonMBSFN_SubframeConfig!=NULL) { LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n", Mod_idP); - phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, - nonMBSFN_SubframeConfig); + phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig); } #endif diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 64b504d27b..bbeeeb9cce 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -149,8 +149,8 @@ init_SI( #endif LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__); -if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE){ #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) +if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE){ LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n", (int)configuration->N_RB_DL[CC_id]); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);