Merge remote-tracking branch 'origin/NR_RRC_UE_fallback_to_Setup_from_Reestablishment' into integration_2025_w25 (!3428)
NR UE fallback to RRCSetup from RRCReestablishment Implementation of the procedure to handle reception of RRCSetup as response to RRCReestablishment request
This commit is contained in:
@@ -1718,6 +1718,10 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id, NR_UE_MAC_reset_cause_t
|
|||||||
sync_req.ssb_bw_scan = false;
|
sync_req.ssb_bw_scan = false;
|
||||||
nr_ue_send_synch_request(mac, module_id, 0, &sync_req);
|
nr_ue_send_synch_request(mac, module_id, 0, &sync_req);
|
||||||
break;
|
break;
|
||||||
|
case RRC_SETUP_REESTAB_RESUME:
|
||||||
|
release_mac_configuration(mac, cause);
|
||||||
|
nr_ue_mac_default_configs(mac);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
AssertFatal(false, "Invalid MAC reset cause %d\n", cause);
|
AssertFatal(false, "Invalid MAC reset cause %d\n", cause);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,8 @@ typedef enum {
|
|||||||
GO_TO_IDLE,
|
GO_TO_IDLE,
|
||||||
DETACH,
|
DETACH,
|
||||||
T300_EXPIRY,
|
T300_EXPIRY,
|
||||||
RE_ESTABLISHMENT
|
RE_ESTABLISHMENT,
|
||||||
|
RRC_SETUP_REESTAB_RESUME,
|
||||||
} NR_UE_MAC_reset_cause_t;
|
} NR_UE_MAC_reset_cause_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac, NR_UE_MAC_reset_cause_t ca
|
|||||||
|
|
||||||
// in case of re-establishment we don't need to release initial BWP config common
|
// in case of re-establishment we don't need to release initial BWP config common
|
||||||
int first_bwp_rel = 0; // first BWP to release
|
int first_bwp_rel = 0; // first BWP to release
|
||||||
if (cause == RE_ESTABLISHMENT) {
|
if (cause == RE_ESTABLISHMENT || cause == RRC_SETUP_REESTAB_RESUME) {
|
||||||
first_bwp_rel = 1;
|
first_bwp_rel = 1;
|
||||||
// release dedicated BWP0 config
|
// release dedicated BWP0 config
|
||||||
NR_UE_DL_BWP_t *bwp = mac->dl_BWPs.array[0];
|
NR_UE_DL_BWP_t *bwp = mac->dl_BWPs.array[0];
|
||||||
|
|||||||
@@ -1143,16 +1143,64 @@ static void rrc_ue_generate_RRCSetupComplete(const NR_UE_RRC_INST_t *rrc, const
|
|||||||
nr_pdcp_data_req_srb(rrc->ue_id, srb_id, 0, size, buffer, deliver_pdu_srb_rlc, NULL);
|
nr_pdcp_data_req_srb(rrc->ue_id, srb_id, 0, size, buffer, deliver_pdu_srb_rlc, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void nr_rrc_rrcsetup_fallback(NR_UE_RRC_INST_t *rrc)
|
||||||
|
{
|
||||||
|
LOG_W(NR_RRC,
|
||||||
|
"[UE %ld] Recived RRCSetup in response to %s request\n",
|
||||||
|
rrc->ue_id, rrc->ra_trigger == RRC_CONNECTION_REESTABLISHMENT ? "RRCReestablishment" : "RRCResume");
|
||||||
|
|
||||||
|
// discard any stored UE Inactive AS context and suspendConfig
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// discard any current AS security context including
|
||||||
|
// K_RRCenc key, the K_RRCint key, the K_UPint key and the K_UPenc key
|
||||||
|
// TODO only kgnb is stored
|
||||||
|
memset(rrc->kgnb, 0, sizeof(rrc->kgnb));
|
||||||
|
rrc->as_security_activated = false;
|
||||||
|
|
||||||
|
// release radio resources for all established RBs except SRB0,
|
||||||
|
// including release of the RLC entities, of the associated PDCP entities and of SDAP
|
||||||
|
for (int i = 1; i <= MAX_DRBS_PER_UE; i++) {
|
||||||
|
if (get_DRB_status(rrc, i) != RB_NOT_PRESENT) {
|
||||||
|
set_DRB_status(rrc, i, RB_NOT_PRESENT);
|
||||||
|
nr_pdcp_release_drb(rrc->ue_id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 1; i < NR_NUM_SRB; i++) {
|
||||||
|
if (rrc->Srb[i] != RB_NOT_PRESENT) {
|
||||||
|
rrc->Srb[i] = RB_NOT_PRESENT;
|
||||||
|
nr_pdcp_release_srb(rrc->ue_id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 1; i < NR_MAX_NUM_LCID; i++) {
|
||||||
|
if (rrc->active_RLC_entity[i]) {
|
||||||
|
rrc->active_RLC_entity[i] = false;
|
||||||
|
nr_rlc_release_entity(rrc->ue_id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nr_sdap_delete_ue_entities(rrc->ue_id);
|
||||||
|
|
||||||
|
// release the RRC configuration except for the default L1 parameter values,
|
||||||
|
// default MAC Cell Group configuration and CCCH configuration
|
||||||
|
// TODO to be completed
|
||||||
|
NR_UE_MAC_reset_cause_t cause = RRC_SETUP_REESTAB_RESUME;
|
||||||
|
MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_RESET);
|
||||||
|
NR_MAC_RRC_CONFIG_RESET(msg).cause = cause;
|
||||||
|
itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg);
|
||||||
|
|
||||||
|
// indicate to upper layers fallback of the RRC connection
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// stop timer T380, if running
|
||||||
|
// TODO not implemented yet
|
||||||
|
}
|
||||||
|
|
||||||
static void nr_rrc_process_rrcsetup(NR_UE_RRC_INST_t *rrc, const NR_RRCSetup_t *rrcSetup)
|
static void nr_rrc_process_rrcsetup(NR_UE_RRC_INST_t *rrc, const NR_RRCSetup_t *rrcSetup)
|
||||||
{
|
{
|
||||||
// if the RRCSetup is received in response to an RRCReestablishmentRequest
|
// if the RRCSetup is received in response to an RRCReestablishmentRequest
|
||||||
// or RRCResumeRequest or RRCResumeRequest1
|
// or RRCResumeRequest or RRCResumeRequest1
|
||||||
// TODO none of the procedures implemented yet
|
if (rrc->ra_trigger == RRC_CONNECTION_REESTABLISHMENT || rrc->ra_trigger == RRC_RESUME_REQUEST)
|
||||||
if (rrc->ra_trigger == RRC_CONNECTION_REESTABLISHMENT) {
|
nr_rrc_rrcsetup_fallback(rrc);
|
||||||
LOG_E(NR_RRC, "Handling of RRCSetup in response of RRCReestablishment not implemented yet. Going back to IDLE.\n");
|
|
||||||
nr_rrc_going_to_IDLE(rrc, OTHER, NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// perform the cell group configuration procedure in accordance with the received masterCellGroup
|
// perform the cell group configuration procedure in accordance with the received masterCellGroup
|
||||||
nr_rrc_ue_process_masterCellGroup(rrc,
|
nr_rrc_ue_process_masterCellGroup(rrc,
|
||||||
@@ -1182,6 +1230,9 @@ static void nr_rrc_process_rrcsetup(NR_UE_RRC_INST_t *rrc, const NR_RRCSetup_t *
|
|||||||
MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_NAS_CONN_ESTABLISH_IND);
|
MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_NAS_CONN_ESTABLISH_IND);
|
||||||
itti_send_msg_to_task(TASK_NAS_NRUE, rrc->ue_id, msg_p);
|
itti_send_msg_to_task(TASK_NAS_NRUE, rrc->ue_id, msg_p);
|
||||||
|
|
||||||
|
// resetting the RA trigger state after receiving MSG4 with RRCSetup
|
||||||
|
rrc->ra_trigger = RA_NOT_RUNNING;
|
||||||
|
|
||||||
// set the content of RRCSetupComplete message
|
// set the content of RRCSetupComplete message
|
||||||
// TODO procedues described in 5.3.3.4 seems more complex than what we actualy do
|
// TODO procedues described in 5.3.3.4 seems more complex than what we actualy do
|
||||||
rrc_ue_generate_RRCSetupComplete(rrc, rrcSetup->rrc_TransactionIdentifier);
|
rrc_ue_generate_RRCSetupComplete(rrc, rrcSetup->rrc_TransactionIdentifier);
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ typedef enum RA_trigger_e {
|
|||||||
RA_NOT_RUNNING,
|
RA_NOT_RUNNING,
|
||||||
RRC_CONNECTION_SETUP,
|
RRC_CONNECTION_SETUP,
|
||||||
RRC_CONNECTION_REESTABLISHMENT,
|
RRC_CONNECTION_REESTABLISHMENT,
|
||||||
|
RRC_RESUME_REQUEST,
|
||||||
DURING_HANDOVER,
|
DURING_HANDOVER,
|
||||||
NON_SYNCHRONISED,
|
NON_SYNCHRONISED,
|
||||||
TRANSITION_FROM_RRC_INACTIVE,
|
TRANSITION_FROM_RRC_INACTIVE,
|
||||||
|
|||||||
Reference in New Issue
Block a user