From 5808ce3934dff6bdd64d9fff1f431b6d01179893 Mon Sep 17 00:00:00 2001 From: "Wang.shanshan" <wang.shanshan@cn.fujitsu.com> Date: Mon, 26 Feb 2018 20:21:16 +0900 Subject: [PATCH] Fix:harq_pid for TDD is not completely fixed in pre processer. --- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 9 ++------- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 6 +----- openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 2 ++ openair2/LAYER2/MAC/pre_processor.c | 18 ++++++------------ 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index f14cce1707..03ec9ddcf9 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -853,10 +853,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, // set HARQ process round to 0 for this UE - if (cc->tdd_Config) ra->harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); - else - ra->harq_pid = ((frameP * 10) + subframeP) & 7; // Get RRCConnectionSetup for Piggyback rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block @@ -1310,10 +1307,8 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, lcid = 0; // put HARQ process round to 0 - if (cc->tdd_Config) - ra->harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); - else - ra->harq_pid = ((frameP * 10) + subframeP) & 7; + ra->harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); + UE_list->UE_sched_ctrl[UE_id].round[CC_idP][ra->harq_pid] = 0; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index bb73f8c8bb..768a9926f5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -689,10 +689,7 @@ schedule_ue_spec(module_id_t module_idP, nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id]; - if (cc->tdd_Config) harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); - else - harq_pid = ((frameP * 10) + subframeP) & 7; round = ue_sched_ctl->round[CC_id][harq_pid]; @@ -1609,8 +1606,7 @@ fill_DLSCH_dci( // clear scheduling flag eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING; rnti = UE_RNTI(module_idP,UE_id); - if (cc->tdd_Config) harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); - else harq_pid = ((frameP*10)+subframeP)&7; + harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 272e8b383a..41db5b3d90 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -3789,6 +3789,8 @@ uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, su return harq_pid; break; } + }else{ + return ((abs_frameP*10)+subframeP)&7; } return -1; } diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 6ff45e732f..0a0a3e014e 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -299,10 +299,8 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame, cc = &RC.mac[Mod_id]->common_channels[CC_id]; UE_id = find_UE_id(Mod_id, rnti); - if (cc->tdd_Config) - harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame ,subframe); - else - harq_pid = ((frame * 10) + subframe) & 7; + + harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame ,subframe); round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid]; if (round > round_max) { @@ -676,8 +674,7 @@ void dlsch_scheduler_pre_ue_select( continue; } #endif - if (cc[CC_id].tdd_Config) harq_pid = ((frameP*10)+subframeP)%10; - else harq_pid = ((frameP*10)+subframeP)&7; + harq_pid = frame_subframe2_dl_harq_pid(cc[CC_id].tdd_Config,frameP ,subframeP); round = ue_sched_ctl->round[CC_id][harq_pid]; if (round != 8) { // retransmission @@ -791,8 +788,7 @@ void dlsch_scheduler_pre_ue_select( if(i < dlsch_ue_select[CC_id].ue_num) continue; - if (cc[CC_id].tdd_Config) harq_pid = ((frameP*10)+subframeP)%10; - else harq_pid = ((frameP*10)+subframeP)&7; + harq_pid = frame_subframe2_dl_harq_pid(cc[CC_id].tdd_Config,frameP ,subframeP); round = ue_sched_ctl->round[CC_id][harq_pid]; if (round == 8) { @@ -905,8 +901,7 @@ void dlsch_scheduler_pre_ue_select( if(i < dlsch_ue_select[CC_id].ue_num) continue; - if (cc[CC_id].tdd_Config) harq_pid = ((frameP*10)+subframeP)%10; - else harq_pid = ((frameP*10)+subframeP)&7; + harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); round = ue_sched_ctl->round[CC_id][harq_pid]; if (round == 8) { @@ -1128,8 +1123,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, rnti = dlsch_ue_select[CC_id].list[i].rnti; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - if (cc->tdd_Config) harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); - else harq_pid = ((frameP*10)+subframeP)&7; + harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); Round = ue_sched_ctl->round[CC_id][harq_pid]; //if (mac_eNB_get_rrc_status(Mod_id, rnti) < RRC_RECONFIGURED || round > 0) { -- GitLab