Commit 3d4ba1a3 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

fix the errors related to multiple carriers (for a given UE considering only...

fix the errors related to multiple carriers (for a given UE considering only the CCs which this UE belongs to)
parent c124e32a
...@@ -520,25 +520,27 @@ schedule_ue_spec( ...@@ -520,25 +520,27 @@ schedule_ue_spec(
// mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n"); // mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n");
continue_flag=1; continue_flag=1;
} }
switch(mac_xface->get_transmission_mode(module_idP,CC_id,rnti)){ if (continue_flag != 1){
case 1: switch(mac_xface->get_transmission_mode(module_idP,CC_id,rnti)){
case 2: case 1:
case 7: case 2:
aggregation = get_aggregation(get_bw_index(module_idP,CC_id), case 7:
aggregation = get_aggregation(get_bw_index(module_idP,CC_id),
eNB_UE_stats->DL_cqi[0], eNB_UE_stats->DL_cqi[0],
format1); format1);
break; break;
case 3: case 3:
aggregation = get_aggregation(get_bw_index(module_idP,CC_id), aggregation = get_aggregation(get_bw_index(module_idP,CC_id),
eNB_UE_stats->DL_cqi[0], eNB_UE_stats->DL_cqi[0],
format2A); format2A);
break; break;
default: default:
LOG_W(MAC,"Unsupported transmission mode %d\n", mac_xface->get_transmission_mode(module_idP,CC_id,rnti)); LOG_W(MAC,"Unsupported transmission mode %d\n", mac_xface->get_transmission_mode(module_idP,CC_id,rnti));
aggregation = 2; aggregation = 2;
} }
} /* if (continue_flag != 1 */
if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated
CCE_allocation_infeasible(module_idP,CC_id,0,subframeP,aggregation,rnti) CCE_allocation_infeasible(module_idP,CC_id,0,subframeP,aggregation,rnti)
) { ) {
......
...@@ -71,9 +71,14 @@ ...@@ -71,9 +71,14 @@
int phy_stats_exist(module_id_t Mod_id, int rnti) int phy_stats_exist(module_id_t Mod_id, int rnti)
{ {
int CC_id; int CC_id;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++){
if (mac_xface->get_eNB_UE_stats(Mod_id, CC_id, rnti) == NULL) int UE_id = find_UE_id(Mod_id,rnti);
return 0; if (UE_id == -1)
continue; //skip if UE is not valid
if (CC_id == UE_PCCID(Mod_id,UE_id)) //get stats for only the CCs which the UE belongs to
if (mac_xface->get_eNB_UE_stats(Mod_id, CC_id, rnti) == NULL)
return 0;
}
return 1; return 1;
} }
......
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