From 6eed836f761bb46c66eec8b15db878502862b24e Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Tue, 3 Oct 2017 16:19:37 +0200 Subject: [PATCH] bugfix: fix frame/subframe --- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 6 +++--- openair2/PHY_INTERFACE/IF_Module.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index ea1caf53a9b..6d1be4c4e69 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -370,7 +370,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t add_msg3(module_idP,CC_idP, RA_template,frameP,subframeP); fill_rar_br(eNB,CC_idP,RA_template,frameP,subframeP,cc[CC_idP].RAR_pdu.payload,RA_template->rach_resource_type-1); // DL request - eNB->TX_req[CC_idP].sfn_sf = (frameP<<3)+subframeP; + eNB->TX_req[CC_idP].sfn_sf = (frameP<<4)+subframeP; TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus]; TX_req->pdu_length = 7; // This should be changed if we have more than 1 preamble TX_req->pdu_index = eNB->pdu_index[CC_idP]++; @@ -464,7 +464,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t add_msg3(module_idP,CC_idP, RA_template,frameP,subframeP); // DL request - eNB->TX_req[CC_idP].sfn_sf = (frameP<<3)+subframeP; + eNB->TX_req[CC_idP].sfn_sf = (frameP<<4)+subframeP; TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus]; TX_req->pdu_length = 7; // This should be changed if we have more than 1 preamble TX_req->pdu_index = eNB->pdu_index[CC_idP]++; @@ -758,7 +758,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t rrc_sdu_length); // DL request - eNB->TX_req[CC_idP].sfn_sf = (frameP<<3)+subframeP; + eNB->TX_req[CC_idP].sfn_sf = (frameP<<4)+subframeP; TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus]; TX_req->pdu_length = rrc_sdu_length; TX_req->pdu_index = eNB->pdu_index[CC_idP]++; diff --git a/openair2/PHY_INTERFACE/IF_Module.c b/openair2/PHY_INTERFACE/IF_Module.c index 1deb9503317..d5398f1aac3 100644 --- a/openair2/PHY_INTERFACE/IF_Module.c +++ b/openair2/PHY_INTERFACE/IF_Module.c @@ -193,14 +193,14 @@ void UL_indication(UL_IND_t *UL_info) if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) { eNB_dlsch_ulsch_scheduler(module_id, - UL_info->frame+((UL_info->subframe>5)?1:0), + (UL_info->frame+((UL_info->subframe>5)?1:0)) % 1024, (UL_info->subframe+4)%10); ifi->CC_mask = 0; sched_info->module_id = module_id; sched_info->CC_id = CC_id; - sched_info->frame = UL_info->frame + ((UL_info->subframe>5) ? 1 : 0); + sched_info->frame = (UL_info->frame + ((UL_info->subframe>5) ? 1 : 0)) % 1024; sched_info->subframe = (UL_info->subframe+4)%10; sched_info->DL_req = &mac->DL_req[CC_id]; sched_info->HI_DCI0_req = &mac->HI_DCI0_req[CC_id]; -- GitLab