Use F1 UE Context Release Command in stack
Use the new type and remove the old one.
This commit is contained in:
@@ -49,7 +49,7 @@ MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_r
|
||||
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_RESP, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_resp_t, f1ap_initial_context_setup_resp)
|
||||
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_FAILURE, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_failure_t, f1ap_initial_context_setup_failure)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_rel_req_t, f1ap_ue_context_release_req)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_cmd)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, f1ap_ue_context_rel_cmd_t, f1ap_ue_context_release_cmd)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_COMPLETE, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_complete_t, f1ap_ue_context_release_complete)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_MODIFICATION_REQUIRED, MESSAGE_PRIORITY_MED, f1ap_ue_context_modif_required_t, f1ap_ue_context_modification_required)
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ typedef struct f1ap_ue_context_release_s {
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
int srb_id;
|
||||
} f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_complete_t;
|
||||
} f1ap_ue_context_release_complete_t;
|
||||
|
||||
typedef struct f1ap_paging_ind_s {
|
||||
uint16_t ueidentityindexvalue;
|
||||
|
||||
@@ -199,6 +199,7 @@ void *F1AP_CU_task(void *arg) {
|
||||
case F1AP_UE_CONTEXT_RELEASE_CMD: // from rrc
|
||||
CU_send_UE_CONTEXT_RELEASE_COMMAND(assoc_id,
|
||||
&F1AP_UE_CONTEXT_RELEASE_CMD(received_msg));
|
||||
free_ue_context_rel_cmd(&F1AP_UE_CONTEXT_RELEASE_CMD(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_PAGING_IND:
|
||||
|
||||
@@ -104,93 +104,19 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_send_UE_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, f1ap_ue_context_release_cmd_t *cmd)
|
||||
int CU_send_UE_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, f1ap_ue_context_rel_cmd_t *cmd)
|
||||
{
|
||||
F1AP_F1AP_PDU_t pdu= {0};
|
||||
F1AP_UEContextReleaseCommand_t *out;
|
||||
uint8_t *buffer=NULL;
|
||||
uint32_t len=0;
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
|
||||
asn1cCalloc(pdu.choice.initiatingMessage, tmp);
|
||||
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease;
|
||||
tmp->criticality = F1AP_Criticality_reject;
|
||||
tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseCommand;
|
||||
out = &tmp->value.choice.UEContextReleaseCommand;
|
||||
/* mandatory */
|
||||
/* c1. GNB_CU_UE_F1AP_ID */
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie1);
|
||||
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
|
||||
ie1->criticality = F1AP_Criticality_reject;
|
||||
ie1->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_GNB_CU_UE_F1AP_ID;
|
||||
ie1->value.choice.GNB_CU_UE_F1AP_ID = cmd->gNB_CU_ue_id;
|
||||
/* mandatory */
|
||||
/* c2. GNB_DU_UE_F1AP_ID */
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie2);
|
||||
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
|
||||
ie2->criticality = F1AP_Criticality_reject;
|
||||
ie2->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_GNB_DU_UE_F1AP_ID;
|
||||
ie2->value.choice.GNB_DU_UE_F1AP_ID = cmd->gNB_DU_ue_id;
|
||||
/* mandatory */
|
||||
/* c3. Cause */
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie3);
|
||||
ie3->id = F1AP_ProtocolIE_ID_id_Cause;
|
||||
ie3->criticality = F1AP_Criticality_ignore;
|
||||
ie3->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_Cause;
|
||||
F1AP_F1AP_PDU_t *pdu = encode_ue_context_rel_cmd(cmd);
|
||||
|
||||
switch (cmd->cause) {
|
||||
case F1AP_CAUSE_RADIO_NETWORK:
|
||||
ie3->value.choice.Cause.present = F1AP_Cause_PR_radioNetwork;
|
||||
ie3->value.choice.Cause.choice.radioNetwork = cmd->cause_value;
|
||||
break;
|
||||
|
||||
case F1AP_CAUSE_TRANSPORT:
|
||||
ie3->value.choice.Cause.present = F1AP_Cause_PR_transport;
|
||||
ie3->value.choice.Cause.choice.transport = cmd->cause_value;
|
||||
break;
|
||||
|
||||
case F1AP_CAUSE_PROTOCOL:
|
||||
ie3->value.choice.Cause.present = F1AP_Cause_PR_protocol;
|
||||
ie3->value.choice.Cause.choice.protocol = cmd->cause_value;
|
||||
break;
|
||||
|
||||
case F1AP_CAUSE_MISC:
|
||||
ie3->value.choice.Cause.present = F1AP_Cause_PR_misc;
|
||||
ie3->value.choice.Cause.choice.misc = cmd->cause_value;
|
||||
break;
|
||||
|
||||
case F1AP_CAUSE_NOTHING:
|
||||
default:
|
||||
ie3->value.choice.Cause.present = F1AP_Cause_PR_NOTHING;
|
||||
break;
|
||||
}
|
||||
|
||||
/* optional */
|
||||
/* c4. RRCContainer */
|
||||
if(cmd->rrc_container!=NULL){
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie4);
|
||||
ie4->id = F1AP_ProtocolIE_ID_id_RRCContainer;
|
||||
ie4->criticality = F1AP_Criticality_ignore;
|
||||
ie4->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_RRCContainer;
|
||||
OCTET_STRING_fromBuf(&ie4->value.choice.RRCContainer, (const char *)cmd->rrc_container,
|
||||
cmd->rrc_container_length);
|
||||
|
||||
// conditionally have SRBID if RRC Container
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie5);
|
||||
ie5->id = F1AP_ProtocolIE_ID_id_SRBID;
|
||||
ie5->criticality = F1AP_Criticality_ignore;
|
||||
ie5->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_SRBID;
|
||||
ie5->value.choice.SRBID = cmd->srb_id;
|
||||
}
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
uint8_t *buffer = NULL;
|
||||
uint32_t len = 0;
|
||||
if (f1ap_encode_pdu(pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 context release command\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(assoc_id, buffer, len);
|
||||
ASN_STRUCT_FREE(asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,8 +50,7 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc
|
||||
/*
|
||||
* UE Context Release (gNB-CU initiated)
|
||||
*/
|
||||
int CU_send_UE_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id,
|
||||
f1ap_ue_context_release_cmd_t *cmd);
|
||||
int CU_send_UE_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, f1ap_ue_context_rel_cmd_t *cmd);
|
||||
|
||||
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
|
||||
@@ -94,61 +94,15 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_context_re
|
||||
|
||||
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_UEContextReleaseCommand_t *container;
|
||||
F1AP_UEContextReleaseCommandIEs_t *ie;
|
||||
|
||||
f1ap_ue_context_release_cmd_t ue_context_release = {0};
|
||||
f1ap_ue_context_release_cmd_t *f1ap_ue_context_release_cmd = &ue_context_release;
|
||||
|
||||
DevAssert(pdu);
|
||||
container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
|
||||
// GNB_CU_UE_F1AP_ID
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
|
||||
f1ap_ue_context_release_cmd->gNB_CU_ue_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
|
||||
// GNB_DU_UE_F1AP_ID
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
f1ap_ue_context_release_cmd->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
|
||||
// We don't need the Cause
|
||||
// Optional RRC Container: if present, send to UE
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_RRCContainer, false);
|
||||
|
||||
if (ie != NULL) {
|
||||
f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size);
|
||||
AssertFatal(f1ap_ue_context_release_cmd->rrc_container != NULL, "out of memory\n");
|
||||
memcpy(f1ap_ue_context_release_cmd->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
|
||||
f1ap_ue_context_release_cmd->rrc_container_length = ie->value.choice.RRCContainer.size;
|
||||
|
||||
// conditionally have SRB ID if there is RRC container
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_ProtocolIE_ID_id_SRBID, true);
|
||||
f1ap_ue_context_release_cmd->srb_id = ie->value.choice.SRBID;
|
||||
f1ap_ue_context_rel_cmd_t cmd = {0};
|
||||
if (!decode_ue_context_rel_cmd(pdu, &cmd)) {
|
||||
LOG_E(F1AP, "cannot decode F1 UE Context Release Command\n");
|
||||
free_ue_context_rel_cmd(&cmd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_Cause, true);
|
||||
switch (ie->value.choice.Cause.present){
|
||||
case F1AP_Cause_PR_radioNetwork:
|
||||
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||
break;
|
||||
case F1AP_Cause_PR_transport:
|
||||
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_TRANSPORT;
|
||||
break;
|
||||
case F1AP_Cause_PR_protocol:
|
||||
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_PROTOCOL;
|
||||
break;
|
||||
case F1AP_Cause_PR_misc:
|
||||
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_MISC;
|
||||
break;
|
||||
default:
|
||||
LOG_W(F1AP, "Unknown cause for UE context release command\n");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
ue_context_release_command(f1ap_ue_context_release_cmd);
|
||||
ue_context_release_command(&cmd);
|
||||
free_ue_context_rel_cmd(&cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@ void ue_context_modification_refuse(const f1ap_ue_context_modif_refuse_t *refuse
|
||||
mac->mac_rrc.ue_context_release_request(&request);
|
||||
}
|
||||
|
||||
void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
|
||||
void ue_context_release_command(const f1ap_ue_context_rel_cmd_t *cmd)
|
||||
{
|
||||
/* mark UE as to be deleted after PUSCH failure */
|
||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
@@ -881,14 +881,15 @@ void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
|
||||
if (f1inst >= 0)
|
||||
newGtpuDeleteAllTunnels(f1inst, cmd->gNB_DU_ue_id);
|
||||
|
||||
if (UE->UE_sched_ctrl.ul_failure || cmd->rrc_container_length == 0) {
|
||||
if (UE->UE_sched_ctrl.ul_failure || !cmd->rrc_container) {
|
||||
/* The UE is already not connected anymore or we have nothing to forward*/
|
||||
nr_mac_release_ue(mac, cmd->gNB_DU_ue_id);
|
||||
nr_mac_trigger_release_complete(mac, cmd->gNB_DU_ue_id);
|
||||
} else {
|
||||
} else if (cmd->rrc_container && cmd->srb_id){
|
||||
/* UE is in sync: forward release message and mark to be deleted
|
||||
* after UL failure */
|
||||
nr_rlc_srb_recv_sdu(cmd->gNB_DU_ue_id, cmd->srb_id, cmd->rrc_container, cmd->rrc_container_length);
|
||||
byte_array_t *rrc_cont = cmd->rrc_container;
|
||||
nr_rlc_srb_recv_sdu(cmd->gNB_DU_ue_id, *cmd->srb_id, (char *)rrc_cont->buf, rrc_cont->len);
|
||||
nr_mac_trigger_release_timer(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs);
|
||||
}
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
|
||||
@@ -36,7 +36,7 @@ void ue_context_setup_request(const f1ap_ue_context_setup_req_t *req);
|
||||
void ue_context_modification_request(const f1ap_ue_context_mod_req_t *req);
|
||||
void ue_context_modification_confirm(const f1ap_ue_context_modif_confirm_t *confirm);
|
||||
void ue_context_modification_refuse(const f1ap_ue_context_modif_refuse_t *refuse);
|
||||
void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd);
|
||||
void ue_context_release_command(const f1ap_ue_context_rel_cmd_t *cmd);
|
||||
|
||||
void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef void (*ue_context_setup_request_func_t)(sctp_assoc_t assoc_id, const f1a
|
||||
typedef void (*ue_context_modification_request_func_t)(sctp_assoc_t assoc_id, const f1ap_ue_context_mod_req_t *req);
|
||||
typedef void (*ue_context_modification_confirm_func_t)(sctp_assoc_t assoc_id, const f1ap_ue_context_modif_confirm_t *confirm);
|
||||
typedef void (*ue_context_modification_refuse_func_t)(sctp_assoc_t assoc_id, const f1ap_ue_context_modif_refuse_t *refuse);
|
||||
typedef void (*ue_context_release_command_func_t)(sctp_assoc_t assoc_id, const f1ap_ue_context_release_cmd_t *cmd);
|
||||
typedef void (*ue_context_release_command_func_t)(sctp_assoc_t assoc_id, const f1ap_ue_context_rel_cmd_t *cmd);
|
||||
|
||||
typedef void (*dl_rrc_message_transfer_func_t)(sctp_assoc_t assoc_id, const f1ap_dl_rrc_message_t *dl_rrc);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ static void ue_context_modification_refuse_direct(sctp_assoc_t assoc_id, const f
|
||||
ue_context_modification_refuse(refuse);
|
||||
}
|
||||
|
||||
static void ue_context_release_command_direct(sctp_assoc_t assoc_id, const f1ap_ue_context_release_cmd_t *cmd)
|
||||
static void ue_context_release_command_direct(sctp_assoc_t assoc_id, const f1ap_ue_context_rel_cmd_t *cmd)
|
||||
{
|
||||
AssertFatal(assoc_id == -1, "illegal assoc_id %d\n", assoc_id);
|
||||
ue_context_release_command(cmd);
|
||||
|
||||
@@ -119,18 +119,11 @@ static void ue_context_modification_refuse_f1ap(sctp_assoc_t assoc_id, const f1a
|
||||
itti_send_msg_to_task(TASK_CU_F1, 0, msg);
|
||||
}
|
||||
|
||||
static void ue_context_release_command_f1ap(sctp_assoc_t assoc_id, const f1ap_ue_context_release_cmd_t *cmd)
|
||||
static void ue_context_release_command_f1ap(sctp_assoc_t assoc_id, const f1ap_ue_context_rel_cmd_t *cmd)
|
||||
{
|
||||
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
message_p->ittiMsgHeader.originInstance = assoc_id;
|
||||
f1ap_ue_context_release_cmd_t *msg = &F1AP_UE_CONTEXT_RELEASE_CMD(message_p);
|
||||
*msg = *cmd;
|
||||
if (cmd->rrc_container_length > 0) {
|
||||
msg->rrc_container = calloc(cmd->rrc_container_length, sizeof(*msg->rrc_container));
|
||||
AssertFatal(msg->rrc_container != NULL, "out of memory\n");
|
||||
msg->rrc_container_length = cmd->rrc_container_length;
|
||||
memcpy(msg->rrc_container, cmd->rrc_container, cmd->rrc_container_length);
|
||||
}
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(message_p) = cp_ue_context_rel_cmd(cmd);
|
||||
itti_send_msg_to_task (TASK_CU_F1, 0, message_p);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ mui_t rrc_gNB_mui = 0;
|
||||
|
||||
typedef struct deliver_ue_ctxt_release_data_t {
|
||||
gNB_RRC_INST *rrc;
|
||||
f1ap_ue_context_release_cmd_t *release_cmd;
|
||||
f1ap_ue_context_rel_cmd_t *release_cmd;
|
||||
sctp_assoc_t assoc_id;
|
||||
} deliver_ue_ctxt_release_data_t;
|
||||
|
||||
@@ -121,8 +121,8 @@ static void rrc_deliver_ue_ctxt_release_cmd(void *deliver_pdu_data, ue_id_t ue_i
|
||||
{
|
||||
DevAssert(deliver_pdu_data != NULL);
|
||||
deliver_ue_ctxt_release_data_t *data = deliver_pdu_data;
|
||||
data->release_cmd->rrc_container = (uint8_t*) buf;
|
||||
data->release_cmd->rrc_container_length = size;
|
||||
byte_array_t rrc_cont = {.buf = (uint8_t *)buf, .len = size};
|
||||
data->release_cmd->rrc_container = &rrc_cont;
|
||||
data->rrc->mac_rrc.ue_context_release_command(data->assoc_id, data->release_cmd);
|
||||
}
|
||||
|
||||
@@ -2142,12 +2142,12 @@ static void rrc_CU_process_ue_context_release_request(MessageDef *msg_p, sctp_as
|
||||
LOG_W(RRC, "could not find UE context for CU UE ID %u: auto-generate release command\n", req->gNB_CU_ue_id);
|
||||
uint8_t buffer[NR_RRC_BUF_SIZE] = {0};
|
||||
int size = do_NR_RRCRelease(buffer, NR_RRC_BUF_SIZE, rrc_gNB_get_next_transaction_identifier(0));
|
||||
f1ap_ue_context_release_cmd_t ue_context_release_cmd = {
|
||||
f1ap_ue_context_rel_cmd_t ue_context_release_cmd = {
|
||||
.gNB_CU_ue_id = req->gNB_CU_ue_id,
|
||||
.gNB_DU_ue_id = req->gNB_DU_ue_id,
|
||||
.cause = F1AP_CAUSE_RADIO_NETWORK,
|
||||
.cause_value = 10, // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||
.srb_id = srbid,
|
||||
.srb_id = &srbid, // C-ifRRCContainer => is added below
|
||||
};
|
||||
deliver_ue_ctxt_release_data_t data = {.rrc = rrc, .release_cmd = &ue_context_release_cmd};
|
||||
nr_pdcp_data_req_srb(req->gNB_CU_ue_id, srbid, rrc_gNB_mui++, size, buffer, rrc_deliver_ue_ctxt_release_cmd, &data);
|
||||
@@ -2163,12 +2163,11 @@ static void rrc_CU_process_ue_context_release_request(MessageDef *msg_p, sctp_as
|
||||
// ongoing; free the UE, and remove the HO context.
|
||||
LOG_W(NR_RRC, "UE %d: release request from source DU ID %ld during HO, marking HO as complete\n", UE->rrc_ue_id, source_ctx->du->setup_req->gNB_DU_id);
|
||||
RETURN_IF_INVALID_ASSOC_ID(source_ctx->du->assoc_id);
|
||||
f1ap_ue_context_release_cmd_t cmd = {
|
||||
f1ap_ue_context_rel_cmd_t cmd = {
|
||||
.gNB_CU_ue_id = UE->rrc_ue_id,
|
||||
.gNB_DU_ue_id = source_ctx->du_ue_id,
|
||||
.cause = F1AP_CAUSE_RADIO_NETWORK,
|
||||
.cause_value = 5, // 5 = F1AP_CauseRadioNetwork_interaction_with_other_procedure
|
||||
.srb_id = DL_SCH_LCID_DCCH,
|
||||
};
|
||||
rrc->mac_rrc.ue_context_release_command(assoc_id, &cmd);
|
||||
nr_rrc_finalize_ho(UE);
|
||||
@@ -2914,12 +2913,13 @@ void rrc_gNB_generate_RRCRelease(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE)
|
||||
LOG_UE_DL_EVENT(UE, "Send RRC Release\n");
|
||||
f1_ue_data_t ue_data = cu_get_f1_ue_data(UE->rrc_ue_id);
|
||||
RETURN_IF_INVALID_ASSOC_ID(ue_data.du_assoc_id);
|
||||
f1ap_ue_context_release_cmd_t ue_context_release_cmd = {
|
||||
int srbid = 1;
|
||||
f1ap_ue_context_rel_cmd_t ue_context_release_cmd = {
|
||||
.gNB_CU_ue_id = UE->rrc_ue_id,
|
||||
.gNB_DU_ue_id = ue_data.secondary_ue,
|
||||
.cause = F1AP_CAUSE_RADIO_NETWORK,
|
||||
.cause_value = 10, // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||
.srb_id = DL_SCH_LCID_DCCH,
|
||||
.srb_id = &srbid, // C-ifRRCContainer => is added below
|
||||
};
|
||||
deliver_ue_ctxt_release_data_t data = {.rrc = rrc, .release_cmd = &ue_context_release_cmd, .assoc_id = ue_data.du_assoc_id};
|
||||
nr_pdcp_data_req_srb(UE->rrc_ue_id, DL_SCH_LCID_DCCH, rrc_gNB_mui++, size, buffer, rrc_deliver_ue_ctxt_release_cmd, &data);
|
||||
|
||||
@@ -307,12 +307,11 @@ static void nr_rrc_f1_ho_complete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE)
|
||||
nr_ho_source_cu_t *source_ctx = UE->ho_context->source;
|
||||
DevAssert(source_ctx != NULL);
|
||||
RETURN_IF_INVALID_ASSOC_ID(source_ctx->du->assoc_id);
|
||||
f1ap_ue_context_release_cmd_t cmd = {
|
||||
f1ap_ue_context_rel_cmd_t cmd = {
|
||||
.gNB_CU_ue_id = UE->rrc_ue_id,
|
||||
.gNB_DU_ue_id = source_ctx->du_ue_id,
|
||||
.cause = F1AP_CAUSE_RADIO_NETWORK,
|
||||
.cause_value = 5, // 5 = F1AP_CauseRadioNetwork_interaction_with_other_procedure
|
||||
.srb_id = DL_SCH_LCID_DCCH,
|
||||
};
|
||||
rrc->mac_rrc.ue_context_release_command(source_ctx->du->assoc_id, &cmd);
|
||||
LOG_I(NR_RRC, "UE %d Handover: trigger release on DU assoc_id %d\n", UE->rrc_ue_id, source_ctx->du->assoc_id);
|
||||
@@ -323,12 +322,11 @@ static void nr_rrc_cancel_f1_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE)
|
||||
DevAssert(UE->ho_context != NULL);
|
||||
nr_ho_target_cu_t *target_ctx = UE->ho_context->target;
|
||||
DevAssert(target_ctx != NULL);
|
||||
f1ap_ue_context_release_cmd_t cmd = {
|
||||
f1ap_ue_context_rel_cmd_t cmd = {
|
||||
.gNB_CU_ue_id = UE->rrc_ue_id,
|
||||
.gNB_DU_ue_id = target_ctx->du_ue_id,
|
||||
.cause = F1AP_CAUSE_RADIO_NETWORK, // better
|
||||
.cause_value = 5, // 5 = F1AP_CauseRadioNetwork_interaction_with_other_procedure
|
||||
.srb_id = DL_SCH_LCID_DCCH,
|
||||
};
|
||||
rrc->mac_rrc.ue_context_release_command(target_ctx->du->assoc_id, &cmd);
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ void rrc_release_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context)
|
||||
gNB_RRC_UE_t *UE = &ue_context->ue_context;
|
||||
f1_ue_data_t ue_data = cu_get_f1_ue_data(UE->rrc_ue_id);
|
||||
RETURN_IF_INVALID_ASSOC_ID(ue_data.du_assoc_id);
|
||||
f1ap_ue_context_release_cmd_t cmd = {
|
||||
f1ap_ue_context_rel_cmd_t cmd = {
|
||||
.gNB_CU_ue_id = UE->rrc_ue_id,
|
||||
.gNB_DU_ue_id = ue_data.secondary_ue,
|
||||
.cause = F1AP_CAUSE_RADIO_NETWORK,
|
||||
|
||||
Reference in New Issue
Block a user