From 6f812f70033b6377b731f41cf3decb408b1b913c Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Wed, 30 Aug 2017 09:38:11 +0200 Subject: [PATCH] fix the prach hack, only deals with fdd prach config 0 --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index c3cb968053c..6d3044813c3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -674,11 +674,16 @@ void schedule_ulsch(module_id_t module_idP, * We need to get the information from config/phy/wherever * as done in the commented code below. * For the moment, we hardcode for the config used by default. - * Only tested with FDD. + * Only deals with FDD, PRACH config 0. */ - int frame_ul = (frameP + (subframeP >= 6)) & 1023; - int subframe_ul = (subframeP + 4) % 10; - if ((frame_ul & 1) == 0 && subframe_ul == 1) first_rb[CC_id] = 8; + LTE_DL_FRAME_PARMS *frame_parms; + frame_parms = mac_xface->get_lte_frame_parms(module_idP,CC_id); + if (frame_parms->frame_type == FDD && + frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex == 0) { + int frame_ul = (frameP + (subframeP >= 6)) & 1023; + int subframe_ul = (subframeP + 4) % 10; + if ((frame_ul & 1) == 0 && subframe_ul == 1) first_rb[CC_id] = 8; + } /* if (mac_xface->is_prach_subframe(&(mac_xface->lte_frame_parms),frameP,subframeP)) { -- GitLab