From b28b14411e1f1d6039f9e1ae176f102985e35563 Mon Sep 17 00:00:00 2001 From: nepes Date: Mon, 25 Feb 2019 13:29:43 +0100 Subject: [PATCH] modifications for LTE-M testing --- .../lte_ul_channel_estimation.c | 2 +- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 8 +-- openair1/PHY/LTE_TRANSPORT/print_stats.c | 2 +- openair1/PHY/LTE_TRANSPORT/pucch.c | 12 ++--- openair1/PHY/LTE_TRANSPORT/transport_eNB.h | 2 + openair1/PHY/LTE_TRANSPORT/transport_proto.h | 6 ++- .../PHY/LTE_TRANSPORT/ulsch_demodulation.c | 2 +- .../PHY/LTE_UE_TRANSPORT/transport_proto_ue.h | 2 +- openair1/SCHED/fapi_l1.c | 4 +- openair1/SCHED/phy_procedures_lte_eNb.c | 53 ++++++++++++++----- openair2/COMMON/platform_types.h | 2 +- openair2/COMMON/rrc_messages_types.h | 2 +- openair2/LAYER2/MAC/defs.h | 24 ++++----- openair2/LAYER2/MAC/eNB_scheduler.c | 7 +-- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 7 +-- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 4 +- openair2/RRC/LTE/rrc_eNB.c | 4 +- 17 files changed, 86 insertions(+), 57 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index cb50b7b5d3..2780702843 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -86,7 +86,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB, int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0; else #endif diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index cdf043a64b..94dd0f5cbf 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -300,7 +300,8 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t dlsch0 = eNB->dlsch[UE_id][0]; dlsch1 = eNB->dlsch[UE_id][1]; - + dlsch0->ue_type = 0; + dlsch1->ue_type = 0; beamforming_mode = eNB->transmission_mode[(uint8_t)UE_id]<7?0:eNB->transmission_mode[(uint8_t)UE_id]; dlsch0_harq = dlsch0->harq_processes[rel8->harq_process]; dlsch0_harq->codeword = 0; @@ -1559,7 +1560,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc case 10: // Format 6-1A dci_alloc->format = format6_1A; - dlsch0->active = 1; switch (fp->N_RB_DL) { case 25: @@ -1630,7 +1630,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc break; case 11: // Format 6-1B dci_alloc->format = format6_1B; - dlsch0->active = 1; switch (fp->N_RB_DL) { case 25: @@ -1670,7 +1669,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc } case 12: // Format 6-2 dci_alloc->format = format6_2; - dlsch0->active = 1; switch (fp->N_RB_DL) { case 25: dci_alloc->dci_length = sizeof_DCI6_2_5MHz_t; @@ -1719,6 +1717,8 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc } AssertFatal (rel13->harq_process < 8, "ERROR: Format 6_1A: harq_pid=%d >= 8\n", rel13->harq_process); + dlsch0->ue_type = rel13->ce_mode; + dlsch0_harq = dlsch0->harq_processes[rel13->harq_process]; dlsch0_harq->codeword = 0; diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c index 005287935e..e86b7ff376 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 (LTE_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/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index ac12ee4427..48d35e5304 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -719,7 +719,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, int frame, uint8_t subframe, uint8_t pucch1_thres -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,uint8_t br_flag #endif ) @@ -989,7 +989,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, //for (j=0,l=0;l<(nsymb-1);l++) { for (j=0,l=0; l= MAKE_VERSION(14, 0, 0)) if (br_flag > 0 ) { if ((m&1) == 0) re_offset = (m*6) + frame_parms->first_carrier_offset; @@ -1226,9 +1226,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, } //phase stat_max/=(12); //normalize to energy per symbol and RE -#ifdef DEBUG_PUCCH_RX - printf("[eNB] PUCCH fmt1a/b: stat_max : %d, phase_max : %d\n",stat_max,phase_max); -#endif +//#ifdef DEBUG_PUCCH_RX + LOG_I(PHY,"[eNB] PUCCH fmt1a/b: stat_max : %d (%d : sigma2 %d), phase_max : %d\n",stat_max,dB_fixed(stat_max),sigma2_dB,phase_max); +//#endif stat_re=0; stat_im=0; @@ -1385,7 +1385,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, #if defined(USRP_REC_PLAY) LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); #else - LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); + LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); #endif *payload = 4; // DTX ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); diff --git a/openair1/PHY/LTE_TRANSPORT/transport_eNB.h b/openair1/PHY/LTE_TRANSPORT/transport_eNB.h index ddf3594880..35e7beeeab 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_eNB.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_eNB.h @@ -153,6 +153,8 @@ typedef struct { #else uint8_t active; #endif + /// indicator of UE type (0 = LTE, 1,2 = Cat-M) + int ue_type; /// HARQ process mask, indicates which processes are currently active uint16_t harq_mask; /// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK. diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h index f4919c6403..41dff9c5c0 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h @@ -553,7 +553,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, uint8_t *payload, int frame, uint8_t subframe, - uint8_t pucch1_thres); + uint8_t pucch1_thres +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + ,int br_flag +#endif + ); /*! diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 8fab8cd0df..da213c3919 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1127,7 +1127,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB, int16_t *llrp; int subframe = proc->subframe_rx; -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) if (ulsch[UE_id]->ue_type > 0) harq_pid =0; else #endif diff --git a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h index dc841075b4..2dfc886f50 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h +++ b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h @@ -1361,7 +1361,7 @@ void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms); @param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/ int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB); -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void init_mpdcch(PHY_VARS_eNB *eNB); #endif diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 29d8953f91..91571f944b 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -652,7 +652,7 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu if (nfapi_mode==2) return; - LOG_D(PHY,"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)\n",frame,subframe,HARQ); + LOG_I(PHY,"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)\n",frame,subframe,HARQ); uci->frame = frame; uci->subframe = subframe; uci->rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti; @@ -744,7 +744,7 @@ rel8->resource_block_start,rel8->number_of_resource_blocks); AssertFatal((UE_id = find_uci(ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti, proc->frame_tx,proc->subframe_tx,eNB,SEARCH_EXIST_OR_FREE))>=0, "No available UE UCI for rnti %x\n",ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti); - LOG_D(PHY,"Applying UL UCI_HARQ config for UE %d, rnti %x for frame %d, subframe %d\n", + LOG_I(PHY,"Applying UL UCI_HARQ config for UE %d, rnti %x for frame %d, subframe %d\n", UE_id,ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,frame,subframe); handle_uci_harq_pdu(eNB,UE_id,ul_config_pdu,frame,subframe,srs_present); diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 6ae51c5d21..099216048c 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -566,8 +566,11 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, harq_pid = dlsch0->harq_ids[frame%2][subframe]; AssertFatal(harq_pid>=0,"harq_pid is negative\n"); - if (harq_pid>=8) - { + if (harq_pid>=8) { + +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + if (dlsch0->ue_type==0) +#endif LOG_E(PHY,"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x [ %1d.%1d.%1d.%1d.%1d.%1d.%1d.%1d\n", harq_pid,UE_id,frame,subframe,dlsch0->rnti, dlsch0->harq_ids[frame%2][0], dlsch0->harq_ids[frame%2][1], @@ -577,9 +580,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, dlsch0->harq_ids[frame%2][5], dlsch0->harq_ids[frame%2][6], dlsch0->harq_ids[frame%2][7]); - } - else - { + } else + { // generate pdsch pdsch_procedures(eNB, @@ -589,7 +591,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, dlsch1, &eNB->UE_stats[(uint32_t)UE_id], 0); - } + } } @@ -743,7 +745,11 @@ void uci_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) &SR_payload, frame, subframe, - PUCCH1_THRES); + PUCCH1_THRES +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + ,uci->ue_type +#endif + ); LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Checking SR is %d (uci.type %d SR n1pucch is %d)\n", eNB->Mod_id, uci->rnti, @@ -763,7 +769,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) } case HARQ: if (fp->frame_type == FDD) { - LOG_D(PHY,"Frame %d Subframe %d Demodulating PUCCH (UCI %d) for ACK/NAK (uci->pucch_fmt %d,uci->type %d.uci->frame %d, uci->subframe %d): n1_pucch0 %d SR_payload %d\n", + LOG_I(PHY,"Frame %d Subframe %d Demodulating PUCCH (UCI %d) for ACK/NAK (uci->pucch_fmt %d,uci->type %d.uci->frame %d, uci->subframe %d): n1_pucch0 %d SR_payload %d\n", frame,subframe,i, uci->pucch_fmt,uci->type, uci->frame,uci->subframe,uci->n_pucch_1[0][0], @@ -778,7 +784,12 @@ void uci_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) pucch_b0b1[0], frame, subframe, - PUCCH1a_THRES); + PUCCH1a_THRES +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + ,uci->ue_type +#endif + ); + /* cancel SR detection if reception on n1_pucch0 is better than on SR PUCCH resource index, otherwise send it up to MAC */ @@ -798,11 +809,15 @@ void uci_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) pucch_b0b1[0], frame, subframe, - PUCCH1a_THRES); + PUCCH1a_THRES +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + ,uci->ue_type +#endif + ); } - LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d pucch1a (FDD) payload %d (metric %d)\n", + LOG_I(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d pucch1a (FDD) payload %d (metric %d)\n", eNB->Mod_id, uci->rnti, frame,subframe, @@ -828,7 +843,12 @@ void uci_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) pucch_b0b1[0], frame, subframe, - PUCCH1a_THRES); + PUCCH1a_THRES +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + ,uci->ue_type +#endif + ); + if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0; else if (SR_payload == 1) fill_sr_indication(eNB,uci->rnti,frame,subframe,metric_SR); @@ -843,7 +863,12 @@ void uci_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) pucch_b0b1[0], frame, subframe, - PUCCH1a_THRES); + PUCCH1a_THRES +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + ,uci->ue_type +#endif + ); + } #else // if SR was detected, use the n1_pucch from SR @@ -1289,7 +1314,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) stop_meas(&eNB->ulsch_decoding_stats); - LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]\n", + LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]\n", eNB->Mod_id,harq_pid, frame,subframe, ulsch->rnti, diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index ee8d6abcc9..6bee42f51b 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -236,7 +236,7 @@ typedef struct protocol_ctxt_s { sub_frame_t subframe; /*!< \brief LTE sub frame number.*/ eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */ boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */ -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) boolean_t brOption; #endif } protocol_ctxt_t; diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index f6e2216c1b..4034e33c5a 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -146,7 +146,7 @@ typedef struct RadioResourceConfig_s { long ue_TimersAndConstants_n311; long ue_TransmissionMode; long ue_multiple_max; -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //SIB2 BR Options long* preambleTransMax_CE_r13; BOOLEAN_t prach_ConfigCommon_v1310; diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 6af0fd66ca..0ec0f6a723 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -61,13 +61,13 @@ #include "RACH-ConfigCommon.h" #include "MeasObjectToAddModList.h" #include "MobilityControlInfo.h" -#if defined(Rel10) || defined(Rel14) +#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #include "MBSFN-AreaInfoList-r9.h" #include "MBSFN-SubframeConfigList.h" #include "PMCH-InfoList-r9.h" #include "SCellToAddMod-r10.h" #endif -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #include "SystemInformationBlockType1-v1310-IEs.h" #endif @@ -87,7 +87,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 (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) // Mask for identifying subframe for MBMS #define MBSFN_TDD_SF3 0x80// for TDD @@ -283,7 +283,7 @@ typedef struct { uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ; } __attribute__((__packed__))PCCH_PDU; -#if defined(Rel10) || defined(Rel14) +#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /*! \brief MCCH payload */ typedef struct { uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ; @@ -340,7 +340,7 @@ typedef struct { /*!\brief LCID of padding LCID for DLSCH */ #define SHORT_PADDING 31 -#if defined(Rel10) || defined(Rel14) +#if (LTE_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 @@ -759,7 +759,7 @@ typedef struct { eNB_UE_estimated_distances distance; #endif -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint8_t rach_resource_type; uint16_t mpdcch_repetition_cnt; @@ -923,7 +923,7 @@ typedef struct { uint8_t msg4_rrc_sdu_length; uint32_t msg4_delay; -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) uint8_t rach_resource_type; uint8_t msg2_mpdcch_repetition_cnt; uint8_t msg2_mpdcch_done; @@ -985,7 +985,7 @@ typedef struct { uint32_t dl_CarrierFreq; BCCH_BCH_Message_t *mib; RadioResourceConfigCommonSIB_t *radioResourceConfigCommon; -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR; #endif TDD_Config_t *tdd_Config; @@ -1012,7 +1012,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 (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// MBMS Flag uint8_t MBMS_flag; /// Outgoing MCCH pdu for PHY @@ -1034,7 +1034,7 @@ typedef struct { /// Outgoing MCH pdu for PHY MCH_PDU MCH_pdu; #endif -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) /// Rel13 parameters from SIB1 SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext; /// Counter for SIB1-BR scheduling @@ -1222,7 +1222,7 @@ typedef struct { struct RACH_ConfigDedicated *rach_ConfigDedicated; /// pointer to RRC PHY configuration struct PhysicalConfigDedicated *physicalConfigDedicated; -#if defined(Rel10) || defined(Rel14) +#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) /// pointer to RRC PHY configuration SCEll struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10; #endif @@ -1298,7 +1298,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 (LTE_RRC_VERSION >= MAKE_VERSION(10, 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 4ebe7313e8..4d32b4014a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -261,12 +261,9 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ul_req_body = &ul_req->ul_config_request_body; // drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet - if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue; + //if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue; - AssertFatal(UE_list-> - UE_template[CC_id][UE_id].physicalConfigDedicated!= NULL, - "physicalConfigDedicated is null for UE %d\n", - UE_id); + if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated== NULL) continue; if ((SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig) != NULL) { if (SRconfig->present == LTE_SchedulingRequestConfig_PR_setup) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index ff4b1e6517..bd98edacf8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -1201,16 +1201,17 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP, dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu]; N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth); - LOG_D(MAC, + LOG_I(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d), UE_id: %d \n", module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id); if (round != 8) { #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) - if (ra->rach_resource_type > 0) { + if (ra->rach_resource_type > 0 && round > 0) { AssertFatal(1 == 0, - "Msg4 Retransmissions not handled yet for BL/CE UEs\n"); + "Msg4 Retransmissions not handled yet for BL/CE UEs, Frame %d, subframeP %d harq_pid %d round %d, UE_id: %d \n", + frameP, subframeP, ra->harq_pid, round, UE_id); } else #endif { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 8698c14b95..b612700889 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -1444,7 +1444,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, MBMS_FLAG_NO, lcid, TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , 0, 0 #endif ); @@ -1465,7 +1465,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, lcid, TBS, //not used (char *)&dlsch_buffer[sdu_length_total] -#ifdef Rel14 +#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) , 0, 0 #endif ); diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 5a30ad4822..97c3ecc10d 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -5371,7 +5371,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc NULL, NULL, NULL -#if defined(Rel10) || defined(Rel14) +#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (LTE_PMCH_InfoList_r9_t *) NULL #endif , NULL); @@ -5379,7 +5379,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc ue_context_p->ue_context.SRB_configList, (LTE_DRB_ToAddModList_t *) NULL, (LTE_DRB_ToReleaseList_t *) NULL -#if defined(Rel10) || defined(Rel14) +#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) , (LTE_PMCH_InfoList_r9_t *) NULL , 0, 0 #endif