Commit 05eb88f0 authored by masayuki.harada's avatar masayuki.harada Committed by shono.takafumi

Fix scheduled_ul_bytes size remain when no crc report has come from L1.

(cherry picked from commit ce10221c2761fb3058ccb77b73ba87f97d5e2cd2)
parent ffdc67da
......@@ -3192,6 +3192,17 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
UE_template->mcs_UL[harq_pid]=10;//cmin (10, openair_daq_vars.target_ue_ul_mcs);
rb_table_index=5; // for PHR
}
if( (UE_sched_ctrl->ul_scheduled | (1<<harq_pid))>0 ){
UE_template->scheduled_ul_bytes -= UE_template->TBS_UL[harq_pid];
if (UE_template->scheduled_ul_bytes < 0) {
UE_template->scheduled_ul_bytes = 0;
}
UE_template->estimated_ul_buffer -= UE_template->TBS_UL[harq_pid];
if (UE_template->estimated_ul_buffer < 0) {
UE_template->estimated_ul_buffer = 0;
}
}
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=UE_template->mcs_UL[harq_pid];
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]);
......
......@@ -200,6 +200,10 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_template_ptr->scheduled_ul_bytes < 0) {
UE_template_ptr->scheduled_ul_bytes = 0;
}
UE_template_ptr->estimated_ul_buffer -= UE_template_ptr->TBS_UL[harq_pid];
if (UE_template_ptr->estimated_ul_buffer < 0) {
UE_template_ptr->estimated_ul_buffer = 0;
}
} else { // sduP == NULL => error
UE_scheduling_control->pusch_rx_error_num[CC_idP]++;
LOG_W(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d, UE_id %d, RNTI %x (len %d)\n",
......@@ -233,6 +237,10 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_template_ptr->scheduled_ul_bytes < 0) {
UE_template_ptr->scheduled_ul_bytes = 0;
}
UE_template_ptr->estimated_ul_buffer -= UE_template_ptr->TBS_UL[harq_pid];
if (UE_template_ptr->estimated_ul_buffer < 0) {
UE_template_ptr->estimated_ul_buffer = 0;
}
if (find_RA_id(enb_mod_idP, CC_idP, current_rnti) != -1) {
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment