Commit 57755e27 authored by Bing-Kai Hong's avatar Bing-Kai Hong

Check node type for the MAC API calls (find_UE)

parent ba609ca9
...@@ -1399,7 +1399,9 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1399,7 +1399,9 @@ rrc_eNB_generate_RRCConnectionReestablishment(
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionReestablishment (bytes %d)\n", PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionReestablishment (bytes %d)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
ue_p->Srb0.Tx_buffer.payload_size); ue_p->Srb0.Tx_buffer.payload_size);
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) &&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU)&&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id != -1){ if(UE_id != -1){
// activate release timer, if RRCComplete not received after 100 frames, remove UE // activate release timer, if RRCComplete not received after 100 frames, remove UE
...@@ -1411,6 +1413,7 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1411,6 +1413,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
PROTOCOL_RRC_CTXT_UE_FMT" Generating RRCConnectionReestablishment without UE_id(MAC) rnti %x\n", PROTOCOL_RRC_CTXT_UE_FMT" Generating RRCConnectionReestablishment without UE_id(MAC) rnti %x\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
} }
}
// activate release timer, if RRCComplete not received after 100 frames, remove UE // activate release timer, if RRCComplete not received after 100 frames, remove UE
ue_context_pP->ue_context.ue_reestablishment_timer = 1; ue_context_pP->ue_context.ue_reestablishment_timer = 1;
// remove UE after 100 frames after RRCConnectionReestablishmentRelease is triggered // remove UE after 100 frames after RRCConnectionReestablishmentRelease is triggered
...@@ -2055,6 +2058,9 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject( ...@@ -2055,6 +2058,9 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) &&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU)&&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id != -1){ if(UE_id != -1){
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1; RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
...@@ -2064,7 +2070,7 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject( ...@@ -2064,7 +2070,7 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
PROTOCOL_RRC_CTXT_UE_FMT" Generating RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n", PROTOCOL_RRC_CTXT_UE_FMT" Generating RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
} }
}
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
...@@ -6248,6 +6254,9 @@ rrc_eNB_decode_ccch( ...@@ -6248,6 +6254,9 @@ rrc_eNB_decode_ccch(
rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id); rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
break; break;
} }
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) &&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU)&&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
int UE_id = find_UE_id(ctxt_pP->module_id, c_rnti); int UE_id = find_UE_id(ctxt_pP->module_id, c_rnti);
if(UE_id == -1){ if(UE_id == -1){
LOG_E(RRC, LOG_E(RRC,
...@@ -6256,7 +6265,6 @@ rrc_eNB_decode_ccch( ...@@ -6256,7 +6265,6 @@ rrc_eNB_decode_ccch(
rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id); rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
break; break;
} }
if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) && if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)){ (RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)){
LOG_E(RRC, LOG_E(RRC,
...@@ -6265,7 +6273,7 @@ rrc_eNB_decode_ccch( ...@@ -6265,7 +6273,7 @@ rrc_eNB_decode_ccch(
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000; RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
ue_context_p->ue_context.ue_reestablishment_timer = 0; ue_context_p->ue_context.ue_reestablishment_timer = 0;
} }
}
if(ue_context_p->ue_context.ue_reestablishment_timer > 0){ if(ue_context_p->ue_context.ue_reestablishment_timer > 0){
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRRCConnectionReconfigurationComplete(Previous) don't receive, delete the Previous UE\n", PROTOCOL_RRC_CTXT_UE_FMT" RRRCConnectionReconfigurationComplete(Previous) don't receive, delete the Previous UE\n",
...@@ -6790,6 +6798,10 @@ rrc_eNB_decode_dcch( ...@@ -6790,6 +6798,10 @@ rrc_eNB_decode_dcch(
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
//clear //clear
// FIX ME: MAC context does not exist in CU
if ((RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) &&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU)&&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id == -1){ if(UE_id == -1){
LOG_E(RRC, LOG_E(RRC,
...@@ -6797,6 +6809,7 @@ rrc_eNB_decode_dcch( ...@@ -6797,6 +6809,7 @@ rrc_eNB_decode_dcch(
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
break; break;
} }
if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1){ if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1){
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n",
...@@ -6804,7 +6817,14 @@ rrc_eNB_decode_dcch( ...@@ -6804,7 +6817,14 @@ rrc_eNB_decode_dcch(
dedicated_DRB = 2; dedicated_DRB = 2;
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
} }
} else { else {
dedicated_DRB = 0;
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
}
} else{
dedicated_DRB = 0; dedicated_DRB = 0;
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.Status = RRC_RECONFIGURED;
LOG_I(RRC, LOG_I(RRC,
...@@ -6819,6 +6839,7 @@ rrc_eNB_decode_dcch( ...@@ -6819,6 +6839,7 @@ rrc_eNB_decode_dcch(
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
} }
}
rrc_eNB_process_RRCConnectionReconfigurationComplete( rrc_eNB_process_RRCConnectionReconfigurationComplete(
ctxt_pP, ctxt_pP,
...@@ -6955,6 +6976,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { ...@@ -6955,6 +6976,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
break; break;
} }
//clear //clear
if ((RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) &&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU)&&
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id == -1){ if(UE_id == -1){
LOG_E(RRC, LOG_E(RRC,
...@@ -6962,9 +6986,10 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { ...@@ -6962,9 +6986,10 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
break; break;
} }
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0;
ue_context_p->ue_context.ue_reestablishment_timer = 0; ue_context_p->ue_context.ue_reestablishment_timer = 0;
}
if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionReestablishmentComplete.criticalExtensions.present == if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionReestablishmentComplete.criticalExtensions.present ==
RRCConnectionReestablishmentComplete__criticalExtensions_PR_rrcConnectionReestablishmentComplete_r8) { RRCConnectionReestablishmentComplete__criticalExtensions_PR_rrcConnectionReestablishmentComplete_r8) {
rrc_eNB_process_RRCConnectionReestablishmentComplete(ctxt_pP, reestablish_rnti, ue_context_p, rrc_eNB_process_RRCConnectionReestablishmentComplete(ctxt_pP, reestablish_rnti, ue_context_p,
......
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