Commit 2ddfafb7 authored by abs's avatar abs

Send UE Context Release Command for HO

parent fedbc709
......@@ -166,6 +166,7 @@ void *F1AP_DU_task(void *arg) {
break;
case F1AP_UE_CONTEXT_RELEASE_COMPLETE:
LOG_I(NR_RRC, "DU Task Received F1AP_UE_CONTEXT_RELEASE_COMPLETE\n");
DU_send_UE_CONTEXT_RELEASE_COMPLETE(myInstance, &F1AP_UE_CONTEXT_RELEASE_COMPLETE(msg));
break;
......
......@@ -30,7 +30,7 @@ typedef void (*ue_context_setup_response_func_t)(instance_t instance,
const f1ap_ue_context_setup_t *resp);
typedef void (*ue_context_modification_response_func_t)(const f1ap_ue_context_modif_req_t *req,
const f1ap_ue_context_modif_resp_t *resp);
typedef void (*ue_context_release_request_func_t)(const f1ap_ue_context_release_req_t* req);
typedef void (*ue_context_release_request_func_t)(const f1ap_ue_context_release_req_t *req);
typedef void (*ue_context_release_complete_func_t)(const f1ap_ue_context_release_complete_t *complete);
typedef void (*initial_ul_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc);
......
......@@ -2360,19 +2360,35 @@ static void handle_rrcReconfigurationComplete(const protocol_ctxt_t *const ctxt_
}
}
gNB_RRC_INST *rrc = RC.nrrrc[0];
f1ap_ue_context_modif_req_t ue_context_modif_req = {
.gNB_CU_ue_id = 0xffffffff, /* filled by F1 for the moment */
.gNB_DU_ue_id = 0xffffffff, /* filled by F1 for the moment */
.rnti = UE->rnti,
.mcc = rrc->configuration.mcc[0],
.mnc = rrc->configuration.mnc[0],
.mnc_digit_length = rrc->configuration.mnc_digit_length[0],
.nr_cellid = rrc->nr_cellid,
.servCellId = 0, /* TODO: correct value? */
.ReconfigComplOutcome = successful_reconfig ? RRCreconf_success : RRCreconf_failure,
};
rrc->mac_rrc.ue_context_modification_request(&ue_context_modif_req);
if (UE->handover_info) {
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
f1ap_ue_context_release_cmd_t *rel_cmd = &F1AP_UE_CONTEXT_RELEASE_CMD(message_p);
const uint8_t modid_s = UE->handover_info->modid_s;
rel_cmd->rnti = find_ho_rnti_by_modid_s(modid_s);
rel_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
rel_cmd->cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
gNB_RRC_INST *rrc_instance_source = RC.nrrrc[modid_s];
itti_send_msg_to_task(TASK_CU_F1, rrc_instance_source->f1_instance, message_p);
free(UE->handover_info);
UE->handover_info = NULL;
nr_update_ngu_tunnel_after_handover(rrc_instance_source, rel_cmd->rnti, ue_context_p, ctxt_pP->rntiMaybeUEid);
} else {
gNB_RRC_INST *rrc = RC.nrrrc[0];
f1ap_ue_context_modif_req_t ue_context_modif_req = {
.gNB_CU_ue_id = 0xffffffff, /* filled by F1 for the moment */
.gNB_DU_ue_id = 0xffffffff, /* filled by F1 for the moment */
.rnti = UE->rnti,
.mcc = rrc->configuration.mcc[0],
.mnc = rrc->configuration.mnc[0],
.mnc_digit_length = rrc->configuration.mnc_digit_length[0],
.nr_cellid = rrc->nr_cellid,
.servCellId = 0, /* TODO: correct value? */
.ReconfigComplOutcome = successful_reconfig ? RRCreconf_success : RRCreconf_failure,
};
rrc->mac_rrc.ue_context_modification_request(&ue_context_modif_req);
}
}
//-----------------------------------------------------------------------------
int rrc_gNB_decode_dcch(const protocol_ctxt_t *const ctxt_pP,
......
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