Commit d463d549 authored by Haruki NAOI's avatar Haruki NAOI

Fix: ReestablishmentComplete not received using multi bearer.

(cherry picked from commit 145d2c08e057b8cedfa3e2fc459cd86aa224c185)

# Conflicts:
#	targets/RT/USER/lte-softmodem.c
parent 3823bdeb
...@@ -394,6 +394,7 @@ void select_ul_ue_candidate( ...@@ -394,6 +394,7 @@ void select_ul_ue_candidate(
int UE_id_idx; int UE_id_idx;
rnti_t rnti; rnti_t rnti;
uint8_t ulsch_ue_max_num[MAX_NUM_CCs]; uint8_t ulsch_ue_max_num[MAX_NUM_CCs];
uint8_t ulsch_ue_max_num_volte[MAX_NUM_CCs];
uint8_t cc_id_flag[MAX_NUM_CCs]={0}; uint8_t cc_id_flag[MAX_NUM_CCs]={0};
int rrc_status; int rrc_status;
int tdd_sfa; int tdd_sfa;
...@@ -402,6 +403,11 @@ void select_ul_ue_candidate( ...@@ -402,6 +403,11 @@ void select_ul_ue_candidate(
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max; ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max;
if(eNB->volte_ul_cycle[CC_id] != 0){
ulsch_ue_max_num_volte[CC_id] = (uint16_t)(ulsch_ue_max_num[CC_id] / 2);
}else{
ulsch_ue_max_num_volte[CC_id] = 0;
}
} }
for(i=0;i<MAX_UE_MULTIPLEX;i++){ for(i=0;i<MAX_UE_MULTIPLEX;i++){
ul_ue_candidate[i]=-1; ul_ue_candidate[i]=-1;
...@@ -496,19 +502,10 @@ void select_ul_ue_candidate( ...@@ -496,19 +502,10 @@ void select_ul_ue_candidate(
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
continue; continue;
if ( (index_volte >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) { if (index_volte >= ulsch_ue_max_num_volte[CC_id]) {
cc_id_flag[CC_id] = 1;
ret = cc_id_end(cc_id_flag);
if ( ret == 0 ) {
continue; continue;
} }
if ( ret == 1 ) {
return;
}
}
int bytes_to_schedule = UE_list->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes; int bytes_to_schedule = UE_list->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes;
if (bytes_to_schedule < 0) { if (bytes_to_schedule < 0) {
...@@ -518,7 +515,7 @@ void select_ul_ue_candidate( ...@@ -518,7 +515,7 @@ void select_ul_ue_candidate(
UE_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; UE_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
if ((UE_sched_ctl->volte_configured == TRUE) if ((UE_sched_ctl->volte_configured == TRUE)
&& (index_volte < ulsch_ue_max_num[CC_id]) && (index_volte < ulsch_ue_max_num_volte[CC_id])
&& (UE_sched_ctl->ul_periodic_timer_exp_flag == TRUE) ) && (UE_sched_ctl->ul_periodic_timer_exp_flag == TRUE) )
{ {
volte_lcg = UE_sched_ctl->volte_lcg; volte_lcg = UE_sched_ctl->volte_lcg;
...@@ -548,7 +545,7 @@ void select_ul_ue_candidate( ...@@ -548,7 +545,7 @@ void select_ul_ue_candidate(
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
continue; continue;
if ( (index >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) { if ( ((index+ index_volte) >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) {
cc_id_flag[CC_id] = 1; cc_id_flag[CC_id] = 1;
ret = cc_id_end(cc_id_flag); ret = cc_id_end(cc_id_flag);
......
...@@ -1671,7 +1671,7 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1671,7 +1671,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
/* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */ /* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */
RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1; RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
/* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */ /* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */
RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 100; RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 1000;
} else { } else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x\n", LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
......
...@@ -262,12 +262,12 @@ void exit_function(const char *file, const char *function, const int line, const ...@@ -262,12 +262,12 @@ void exit_function(const char *file, const char *function, const int line, const
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s); printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
} }
oai_exit = 1;
if(log_mem_initflag) { if(log_mem_initflag) {
close_log_mem(); close_log_mem();
} }
oai_exit = 1;
if (RC.ru == NULL) if (RC.ru == NULL)
exit(-1); // likely init not completed, prevent crash or hang, exit now... exit(-1); // likely init not completed, prevent crash or hang, exit now...
......
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