Commit a26fad9e authored by Robert Schmidt's avatar Robert Schmidt

F1AP: Correct UEContextReleaseReq path, send corresp. S1AP message

parent 05e08d50
......@@ -40,6 +40,7 @@
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "rrc_extern.h"
#include "rrc_eNB_UE_context.h"
#include "rrc_eNB_S1AP.h"
extern f1ap_setup_req_t *f1ap_du_data_from_du;
extern f1ap_cudu_ue_inst_t f1ap_cu_ue[MAX_eNB];
......@@ -821,8 +822,14 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
}
*/
LOG_I(CU_F1AP, "Received UE_CONTEXT_RELEASE_REQUEST for RNTI %x, signalling to RRC\n", rnti);
rrc_mac_signal_ue_release(instance, rnti);
LOG_I(CU_F1AP, "Received UE CONTEXT RELEASE REQUEST: Trigger RRC for RNTI %x\n", rnti);
struct rrc_eNB_ue_context_s *ue_context_pP;
ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[instance], rnti);
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(
instance,
ue_context_pP,
S1AP_CAUSE_RADIO_NETWORK,
21); // send cause 21: connection with ue lost
return 0;
}
......
......@@ -66,6 +66,9 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
case F1AP_ProcedureCode_id_UEContextRelease:
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__);
break;
case F1AP_ProcedureCode_id_UEContextReleaseRequest:
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextReleaseRequest\n", __func__);
break;
// case F1AP_ProcedureCode_id_InitialContextSetup:
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
// message_id = F1AP_INITIAL_CONTEXT_SETUP_LOG;
......
......@@ -574,7 +574,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
memset(&pdu, 0, sizeof(pdu));
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t));
pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_UEContextRelease;
pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_UEContextReleaseRequest;
pdu.choice.initiatingMessage->criticality = F1AP_Criticality_reject;
pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest;
out = &pdu.choice.initiatingMessage->value.choice.UEContextReleaseRequest;
......
......@@ -56,7 +56,7 @@ f1ap_message_decoded_callback f1ap_messages_callback[][3] = {
{ 0, 0, 0 }, /* UEContextModification */
{ 0, 0, 0 }, /* UEContextModificationRequired */
{ 0, 0, 0 }, /* UEMobilityCommand */
{ 0, 0, 0 }, /* UEContextReleaseRequest */
{ CU_handle_UE_CONTEXT_RELEASE_REQUEST, 0, 0 }, /* UEContextReleaseRequest */
{ CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER, 0, 0 }, /* InitialULRRCMessageTransfer */
{ DU_handle_DL_RRC_MESSAGE_TRANSFER, 0, 0 }, /* DLRRCMessageTransfer */
{ CU_handle_UL_RRC_MESSAGE_TRANSFER, 0, 0 }, /* ULRRCMessageTransfer */
......
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