Skip to content
Snippets Groups Projects
Commit 8d6b6676 authored by Robert Schmidt's avatar Robert Schmidt
Browse files

Reorganize sequence of reestablishment checks

Reorganize the sequence of checks done in reestablishment to make it
more logical:

- check conditions of request (correct C-RNTI)
- check conditions of DU (has MIB/SIB1, MTC)
- check the UE, and from which DU it comes

This will also help to extend it towards reestablishment coming from
different DUs in the case of handover.
parent 31bad32b
No related branches found
No related tags found
2 merge requests!2956Integration Branch : 2024 Week 36,!2950Preparation for F1 Handover
......@@ -1130,6 +1130,13 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
return;
}
// 3GPP TS 38.321 version 15.13.0 Section 7.1 Table 7.1-1: RNTI values
if (req->ue_Identity.c_RNTI < 0x1 || req->ue_Identity.c_RNTI > 0xffef) {
/* c_RNTI range error should not happen */
LOG_E(NR_RRC, "NR_RRCReestablishmentRequest c_RNTI %04lx range error, fallback to RRC setup\n", req->ue_Identity.c_RNTI);
goto fallback_rrc_setup;
}
if (du->mib == NULL || du->sib1 == NULL) {
/* we don't have MIB/SIB1 of the DU, and therefore cannot generate the
* Reestablishment (as we would need the SSB's ARFCN, which we cannot
......@@ -1138,12 +1145,22 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
goto fallback_rrc_setup;
}
if (du->mtc == NULL) {
// some UEs don't send MeasurementTimingConfiguration, so we don't know the
// SSB ARFCN and can't do reestablishment. handle it gracefully by doing
// RRC setup procedure instead
LOG_E(NR_RRC, "no MeasurementTimingConfiguration for this cell, cannot perform reestablishment\n");
ngap_cause = NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_NGRAN_GENERATED_REASON;
goto fallback_rrc_setup;
}
rnti_t old_rnti = req->ue_Identity.c_RNTI;
ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc, assoc_id, old_rnti);
if (ue_context_p == NULL) {
LOG_E(NR_RRC, "NR_RRCReestablishmentRequest without UE context, fallback to RRC setup\n");
goto fallback_rrc_setup;
}
gNB_RRC_UE_t *UE = &ue_context_p->ue_context;
const f1ap_served_cell_info_t *cell_info = &du->setup_req->cell[0].info;
if (physCellId != cell_info->nr_pci) {
......@@ -1160,14 +1177,6 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
goto fallback_rrc_setup;
}
gNB_RRC_UE_t *UE = &ue_context_p->ue_context;
// 3GPP TS 38.321 version 15.13.0 Section 7.1 Table 7.1-1: RNTI values
if (req->ue_Identity.c_RNTI < 0x1 || req->ue_Identity.c_RNTI > 0xffef) {
/* c_RNTI range error should not happen */
LOG_E(NR_RRC, "NR_RRCReestablishmentRequest c_RNTI %04lx range error, fallback to RRC setup\n", req->ue_Identity.c_RNTI);
goto fallback_rrc_setup;
}
if (!UE->as_security_active) {
/* no active security context, need to restart entire connection */
LOG_E(NR_RRC, "UE requested Reestablishment without activated AS security\n");
......@@ -1175,15 +1184,6 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
goto fallback_rrc_setup;
}
if (du->mtc == NULL) {
// some UEs don't send MeasurementTimingConfiguration, so we don't know the
// SSB ARFCN and can't do reestablishment. handle it gracefully by doing
// RRC setup procedure instead
LOG_E(NR_RRC, "no MeasurementTimingConfiguration for this cell, cannot perform reestablishment\n");
ngap_cause = NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_NGRAN_GENERATED_REASON;
goto fallback_rrc_setup;
}
/* TODO: start timer in ITTI and drop UE if it does not come back */
// update with new RNTI, and update secondary UE association
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment