Commit f8f149fd authored by HARADA Masayuki's avatar HARADA Masayuki
Browse files

Fix calculation of ul_total_buffer.

parent b58ecfc5
...@@ -1868,10 +1868,10 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -1868,10 +1868,10 @@ void schedule_ulsch_rnti(module_id_t module_idP,
// increment first rb for next UE allocation // increment first rb for next UE allocation
first_rb[CC_id]+=rb_table[rb_table_index]; first_rb[CC_id]+=rb_table[rb_table_index];
if(ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_FIRST) { if(ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_FIRST) {
LOG_D(MAC,"[eNB %d] CC_id %d UE %d/%x : adjusting ul_total_buffer, old %d, TBS %d\n", module_idP,CC_id,UE_id,rnti,UE_template->ul_total_buffer,UE_template->TBS_UL[harq_pid]); LOG_D(MAC,"[eNB %d] CC_id %d UE %d/%x : adjusting ul_total_buffer, old %d, TBS %d\n", module_idP,CC_id,UE_id,rnti,UE_template->ul_total_buffer,get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]));
if(ulsch_ue_select[CC_id].list[ulsch_ue_num].ul_total_buffer > 0){ if(ulsch_ue_select[CC_id].list[ulsch_ue_num].ul_total_buffer > 0){
if (UE_template->ul_total_buffer > UE_template->TBS_UL[harq_pid]) if (UE_template->ul_total_buffer > get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]))
UE_template->ul_total_buffer -= UE_template->TBS_UL[harq_pid]; UE_template->ul_total_buffer -= get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]);
else else
UE_template->ul_total_buffer = 0; UE_template->ul_total_buffer = 0;
} else { } else {
......
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