Commit 7df82575 authored by Robert Schmidt's avatar Robert Schmidt

F1AP: when UL_sync failure, send UEContextRelReq

When a phone loses connection, it should not simply be removed but first
CU should be informed which will send a ContextRelCmd. Correspondingly,
when the RRC releases the UE, it does not send a UE Context Release Req
parent 0699e539
......@@ -407,20 +407,24 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
// check threshold
if (UE_list->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) {
// note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311)
if (RC.rrc[module_idP]->node_type == ngran_eNB_DU
|| RC.rrc[module_idP]->node_type == ngran_gNB_DU) {
MessageDef *m = itti_alloc_new_message(TASK_MAC_ENB, F1AP_UE_CONTEXT_RELEASE_REQ);
F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = rnti;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_DU_F1, module_idP, m);
} else {
// inform RRC of failure and clear timer
LOG_I(MAC,
"UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n",
UE_id, rnti);
mac_eNB_rrc_ul_failure(module_idP, CC_id, frameP, subframeP,rnti);
}
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 1;
//Inform the controller about the UE deactivation. Should be moved to RRC agent in the future
if (flexran_agent_get_rrc_xface(module_idP)) {
LOG_W(MAC, "notify flexran Agent of UE state change\n");
flexran_agent_get_rrc_xface(module_idP)->flexran_agent_notify_ue_state_change(module_idP,
rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
}
}
} // ul_failure_timer>0
}
......
......@@ -391,17 +391,6 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
}
if (RC.rrc[Mod_instP]->node_type == ngran_eNB_DU
&& RC.rrc[Mod_instP]->node_type == ngran_gNB_DU) {
MessageDef *m = itti_alloc_new_message(TASK_MAC_ENB, F1AP_UE_CONTEXT_RELEASE_REQ);
F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = rntiP;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_DU_F1, Mod_instP, m);
}
rrc_mac_remove_ue(Mod_instP,rntiP);
}
......
......@@ -950,14 +950,6 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
ue_context_pP,
S1AP_CAUSE_RADIO_NETWORK,
21); // send cause 21: connection with ue lost
} else { // DU
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_REQ);
F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = ue_context_pP->ue_context.rnti;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_DU_F1, enb_mod_idP, m);
}
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
......
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