5.3 Connection control

38.3313GPPNRProtocol specificationRadio Resource Control (RRC)Release 15TS

5.3.1 Introduction

5.3.1.1 RRC connection control

RRC connection establishment involves the establishment of SRB1. The network completes RRC connection establishment prior to completing the establishment of the NG connection, i.e. prior to receiving the UE context information from the 5GC. Consequently, AS security is not activated during the initial phase of the RRC connection. During this initial phase of the RRC connection, the network may configure the UE to perform measurement reporting, but the UE only sends the corresponding measurement reports after successful AS security activation. However, the UE only accepts a re-configuration with sync message when AS security has been activated.

Upon receiving the UE context from the 5GC, the RAN activates AS security (both ciphering and integrity protection) using the initial AS security activation procedure. The RRC messages to activate AS security (command and successful response) are integrity protected, while ciphering is started only after completion of the procedure. That is, the response to the message used to activate AS security is not ciphered, while the subsequent messages (e.g. used to establish SRB2 and DRBs) are both integrity protected and ciphered. After having initiated the initial AS security activation procedure, the network may initiate the establishment of SRB2 and DRBs, i.e. the network may do this prior to receiving the confirmation of the initial AS security activation from the UE. In any case, the network will apply both ciphering and integrity protection for the RRC reconfiguration messages used to establish SRB2 and DRBs. The network should release the RRC connection if the initial AS security activation and/ or the radio bearer establishment fails. A configuration with SRB2 without DRB or with DRB without SRB2 is not supported (i.e., SRB2 and at least one DRB must be configured in the same RRC Reconfiguration message, and it is not allowed to release all the DRBs without releasing the RRC Connection).

The release of the RRC connection normally is initiated by the network. The procedure may be used to re-direct the UE to an NR frequency or an E-UTRA carrier frequency.

The suspension of the RRC connection is initiated by the network. When the RRC connection is suspended, the UE stores the UE Inactive AS context and any configuration received from the network, and transits to RRC_INACTIVE state. If the UE is configured with SCG, the UE releases the SCG configuration upon initiating a RRC Connection Resume procedure. The RRC message to suspend the RRC connection is integrity protected and ciphered.

The resumption of a suspended RRC connection is initiated by upper layers when the UE needs to transit from RRC_INACTIVE state to RRC_CONNECTED state or by RRC layer to perform a RNA update or by RAN paging from NG-RAN. When the RRC connection is resumed, network configures the UE according to the RRC connection resume procedure based on the stored UE Inactive AS context and any RRC configuration received from the network. The RRC connection resume procedure re-activates AS security and re-establishes SRB(s) and DRB(s).

In response to a request to resume the RRC connection, the network may resume the suspended RRC connection and send UE to RRC_CONNECTED, or reject the request to resume and send UE to RRC_INACTIVE (with a wait timer), or directly re-suspend the RRC connection and send UE to RRC_INACTIVE, or directly release the RRC connection and send UE to RRC_IDLE, or instruct the UE to initiate NAS level recovery (in this case the network sends an RRC setup message).

5.3.1.2 AS Security

AS security comprises of the integrity protection and ciphering of RRC signalling (SRBs) and user data (DRBs).

RRC handles the configuration of the AS security parameters which are part of the AS configuration: the integrity protection algorithm, the ciphering algorithm, if integrity protection and/or ciphering is enabled for a DRB and two parameters, namely the keySetChangeIndicator and the nextHopChainingCount, which are used by the UE to determine the AS security keys upon reconfiguration with sync (with key change), connection re-establishment and/or connection resume.

The integrity protection algorithm is common for SRB1, SRB2, SRB3 (if configured) and DRBs configured with integrity protection, with the same keyToUse value. The ciphering algorithm is common for SRB1, SRB2, SRB3 (if configured) and DRBs configured with the same keyToUse value. For MR-DC, integrity protection is not enabled for DRBs terminated in eNB. Neither integrity protection nor ciphering applies for SRB0.

NOTE 0: All DRBs related to the same PDU session have the same enable/disable setting for ciphering and the same enable/disable setting for integrity protection, as specified in TS 33.501 [11].

RRC integrity protection and ciphering are always activated together, i.e. in one message/procedure. RRC integrity protection and ciphering for SRBs are never de-activated. However, it is possible to switch to a ‘NULL‘ ciphering algorithm (nea0).

The ‘NULL‘ integrity protection algorithm (nia0) is used only for SRBs and for the UE in limited service mode, see TS 33.501 [11] and when used for SRBs, integrity protection is disabled for DRBs. In case the ′NULL‘ integrity protection algorithm is used, ‘NULL‘ ciphering algorithm is also used.

NOTE 1: Lower layers discard RRC messages for which the integrity protection check has failed and indicate the integrity protection verification check failure to RRC.

The AS applies four different security keys: one for the integrity protection of RRC signalling (KRRCint), one for the ciphering of RRC signalling (KRRCenc), one for integrity protection of user data (KUPint) and one for the ciphering of user data (KUPenc). All four AS keys are derived from the KgNB key. The KgNB key is based on the KAMF key (as specified in TS 33.501 [11]), which is handled by upper layers.

The integrity protection and ciphering algorithms can only be changed with reconfiguration with sync. The AS keys (KgNB, KRRCint, KRRCenc, KUPint and KUPenc) change upon reconfiguration with sync (if masterKeyUpdate is included), and upon connection re-establishment and connection resume.

For each radio bearer an independent counter (COUNT, as specified in TS 38.323 [5]) is maintained for each direction. For each radio bearer, the COUNT is used as input for ciphering and integrity protection.

It is not allowed to use the same COUNT value more than once for a given security key. As specified in TS 33.501 [11], subclause 6.9.4.1, the network is responsible for avoiding reuse of the COUNT with the same RB identity and with the same key, e.g. due to the transfer of large volumes of data, release and establishment of new RBs, and multiple termination point changes for RLC-UM bearers and multiple termination point changes for RLC-AM bearer with SN terminated PDCP re-establishment (COUNT reset) due to SN only full configuration whilst the key stream inputs (i.e. bearer ID, security key) at MN have not been updated. In order to avoid such re-use, the network may e.g. use different RB identities for RB establishments, change the AS security key, or an RRC_CONNECTED to RRC_IDLE/RRC_INACTIVE and then to RRC_CONNECTED transition.

In order to limit the signalling overhead, individual messages/ packets include a short sequence number (PDCP SN, as specified in TS 38.323 [5]). In addition, an overflow counter mechanism is used: the hyper frame number (HFN, as specified in TS 38.323 [5]). The HFN needs to be synchronized between the UE and the network.

For each SRB, the value provided by RRC to lower layers to derive the 5-bit BEARER parameter used as input for ciphering and for integrity protection is the value of the corresponding srb-Identity with the MSBs padded with zeroes.

For a UE provided with an sk-counter, keyToUse indicates whether the UE uses the master key (KgNB) or the secondary key (S-KeNB or S-KgNB) for a particular DRB. The secondary key is derived from the master key and sk-Counter, as defined in TS 33.501[11]. Whenever there is a need to refresh the secondary key, e.g. upon change of MN with KgNB change or to avoid COUNT reuse, the security key update is used (see 5.3.5.7). When the UE is in NR-DC, the network may provide a UE configured with an SCG with an sk-Counter even when no DRB is setup using the secondary key (S-KgNB) in order to allow the configuration of SRB3. The network can also provide the UE with an sk-Counter, even if no SCG is configured, when using SN terminated MCG bearers.

5.3.2 Paging

5.3.2.1 General

Figure 5.3.2.1-1: Paging

The purpose of this procedure is:

– to transmit paging information to a UE in RRC_IDLE or RRC_INACTIVE.

5.3.2.2 Initiation

The network initiates the paging procedure by transmitting the Paging message at the UE’s paging occasion as specified in TS 38.304 [20]. The network may address multiple UEs within a Paging message by including one PagingRecord for each UE.

5.3.2.3 Reception of the Paging message by the UE

Upon receiving the Paging message, the UE shall:

1> if in RRC_IDLE, for each of the PagingRecord, if any, included in the Paging message:

2> if the ue-Identity included in the PagingRecord matches the UE identity allocated by upper layers:

3> forward the ue-Identity and accessType (if present) to the upper layers;

1> if in RRC_INACTIVE, for each of the PagingRecord, if any, included in the Paging message:

2> if the ue-Identity included in the PagingRecord matches the UE’s stored fullI-RNTI:

3> if the UE is configured by upper layers with Access Identity 1:

4> initiate the RRC connection resumption procedure according to 5.3.13 with resumeCause set to mps-PriorityAccess;

3> else if the UE is configured by upper layers with Access Identity 2:

4> initiate the RRC connection resumption procedure according to 5.3.13 with resumeCause set to mcs-PriorityAccess;

3> else if the UE is configured by upper layers with one or more Access Identities equal to 11-15:

4> initiate the RRC connection resumption procedure according to 5.3.13 with resumeCause set to highPriorityAccess;

3> else:

4> initiate the RRC connection resumption procedure according to 5.3.13 with resumeCause set to mt-Access;

2> else if the ue-Identity included in the PagingRecord matches the UE identity allocated by upper layers:

3> forward the ue-Identity to upper layers and accessType (if present) to the upper layers;

3> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with release cause ‘other’.

5.3.3 RRC connection establishment

5.3.3.1 General

Figure 5.3.3.1-1: RRC connection establishment, successful

Figure 5.3.3.1-2: RRC connection establishment, network reject

The purpose of this procedure is to establish an RRC connection. RRC connection establishment involves SRB1 establishment. The procedure is also used to transfer the initial NAS dedicated information/ message from the UE to the network.

The network applies the procedure e.g.as follows:

– When establishing an RRC connection;

– When UE is resuming or re-establishing an RRC connection, and the network is not able to retrieve or verify the UE context. In this case, UE receives RRCSetup and responds with RRCSetupComplete.

5.3.3.2 Initiation

The UE initiates the procedure when upper layers request establishment of an RRC connection while the UE is in RRC_IDLE and it has acquired essential system information.

The UE shall ensure having valid and up to date essential system information as specified in clause 5.2.2.2 before initiating this procedure.

Upon initiation of the procedure, the UE shall:

1> if the upper layers provide an Access Category and one or more Access Identities upon requesting establishment of an RRC connection:

2> perform the unified access control procedure as specified in 5.3.14 using the Access Category and Access Identities provided by upper layers;

3> if the access attempt is barred, the procedure ends;

1> apply the default L1 parameter values as specified in corresponding physical layer specifications except for the parameters for which values are provided in SIB1;

1> apply the default MAC Cell Group configuration as specified in 9.2.2;

1> apply the CCCH configuration as specified in 9.1.1.2;

1> apply the timeAlignmentTimerCommon included in SIB1;

1> start timer T300;

1> initiate transmission of the RRCSetupRequest message in accordance with 5.3.3.3;

5.3.3.3 Actions related to transmission of RRCSetupRequest message

The UE shall set the contents of RRCSetupRequest message as follows:

1> set the ue-Identity as follows:

2> if upper layers provide a 5G-S-TMSI:

3> set the ue-Identity to ng-5G-S-TMSI-Part1;

2> else:

3> draw a 39-bit random value in the range 0..239-1 and set the ue-Identity to this value;

NOTE 1: Upper layers provide the 5G-S-TMSI if the UE is registered in the TA of the current cell.

1> set the establishmentCause in accordance with the information received from upper layers;

The UE shall submit the RRCSetupRequest message to lower layers for transmission.

The UE shall continue cell re-selection related measurements as well as cell re-selection evaluation. If the conditions for cell re-selection are fulfilled, the UE shall perform cell re-selection as specified in 5.3.3.6.

5.3.3.4 Reception of the RRCSetup by the UE

The UE shall perform the following actions upon reception of the RRCSetup:

1> if the RRCSetup is received in response to an RRCReestablishmentRequest; or

1> if the RRCSetup is received in response to an RRCResumeRequest or RRCResumeRequest1:

2> discard any stored UE Inactive AS context and suspendConfig;

2> discard any current AS security context including the KRRCenc key, the KRRCint key, the KUPint key and the KUPenc key;

2> release radio resources for all established RBs except SRB0, including release of the RLC entities, of the associated PDCP entities and of SDAP;

2> release the RRC configuration except for the default L1 parameter values, default MAC Cell Group configuration and CCCH configuration;

2> indicate to upper layers fallback of the RRC connection;

2> stop timer T380, if running;

1> perform the cell group configuration procedure in accordance with the received masterCellGroup and as specified in 5.3.5.5;

1> perform the radio bearer configuration procedure in accordance with the received radioBearerConfig and as specified in 5.3.5.6;

1> if stored, discard the cell reselection priority information provided by the cellReselectionPriorities or inherited from another RAT;

1> stop timer T300, T301 or T319 if running;

1> if T390 is running:

2> stop timer T390 for all access categories;

2> perform the actions as specified in 5.3.14.4;

1> if T302 is running:

2> stop timer T302;

2> perform the actions as specified in 5.3.14.4;

1> stop timer T320, if running;

1> if the RRCSetup is received in response to an RRCResumeRequest, RRCResumeRequest1 or RRCSetupRequest:

2> enter RRC_CONNECTED;

2> stop the cell re-selection procedure;

1> consider the current cell to be the PCell;

1> set the content of RRCSetupComplete message as follows:

2> if upper layers provide a 5G-S-TMSI:

3> if the RRCSetup is received in response to an RRCSetupRequest:

4> set the ng-5G-S-TMSI-Value to ng-5G-S-TMSI-Part2;

3> else:

4> set the ng-5G-S-TMSI-Value to ng-5G-S-TMSI;

2> set the selectedPLMN-Identity to the PLMN selected by upper layers (TS 24.501 [23]) from the PLMN(s) included in the plmn-IdentityInfoList in SIB1;

2> if upper layers provide the ‘Registered AMF’:

3> include and set the registeredAMF as follows:

4> if the PLMN identity of the ‘Registered AMF’ is different from the PLMN selected by the upper layers:

5> include the plmnIdentity in the registeredAMF and set it to the value of the PLMN identity in the ‘Registered AMF’ received from upper layers;

4> set the amf-Identifier to the value received from upper layers;

3> include and set the guami-Type to the value provided by the upper layers;

2> if upper layers provide one or more S-NSSAI (see TS 23.003 [21]):

3> include the s-NSSAI-List and set the content to the values provided by the upper layers;

2> set the dedicatedNAS-Message to include the information received from upper layers;

1> submit the RRCSetupComplete message to lower layers for transmission, upon which the procedure ends.

5.3.3.5 Reception of the RRCReject by the UE

The UE shall:

1> perform the actions as specified in 5.3.15;

5.3.3.6 Cell re-selection or cell selection while T390, T300 or T302 is running (UE in RRC_IDLE)

The UE shall:

1> if cell reselection occurs while T300 or T302 is running:

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with release cause ‘RRC connection failure’;

1> else if cell selection or reselection occurs while T390 is running:

2> stop T390 for all access categories;

2> perform the actions as specified in 5.3.14.4.

5.3.3.7 T300 expiry

The UE shall:

1> if timer T300 expires:

2> reset MAC, release the MAC configuration and re-establish RLC for all RBs that are established;

2> if the UE supports RRC Connection Establishment failure with temporary offset and the T300 has expired a consecutive connEstFailCount times on the same cell for which connEstFailureControl is included in SIB1:

3> for a period as indicated by connEstFailOffsetValidity:

4> use connEstFailOffset for the parameter Qoffsettemp for the concerned cell when performing cell selection and reselection according to TS 38.304 [20] and TS 36.304 [27];

NOTE: When performing cell selection, if no suitable or acceptable cell can be found, it is up to UE implementation whether to stop using connEstFailOffset for the parameter Qoffsettemp during connEstFailOffsetValidity for the concerned cell.

2> inform upper layers about the failure to establish the RRC connection, upon which the procedure ends;

5.3.3.8 Abortion of RRC connection establishment

If upper layers abort the RRC connection establishment procedure, due to a NAS procedure being aborted as specified in TS 24.501 [23], while the UE has not yet entered RRC_CONNECTED, the UE shall:

1> stop timer T300, if running;

1> reset MAC, release the MAC configuration and re-establish RLC for all RBs that are established.

5.3.4 Initial AS security activation

5.3.4.1 General

Figure 5.3.4.1-1: Security mode command, successful

Figure 5.3.4.1-2: Security mode command, failure

The purpose of this procedure is to activate AS security upon RRC connection establishment.

5.3.4.2 Initiation

The network initiates the security mode command procedure to a UE in RRC_CONNECTED. Moreover, the network applies the procedure as follows:

– when only SRB1 is established, i.e. prior to establishment of SRB2 and/ or DRBs.

5.3.4.3 Reception of the SecurityModeCommand by the UE

The UE shall:

1> derive the KgNB key, as specified in TS 33.501 [11];

1> derive the KRRCint key associated with the integrityProtAlgorithm indicated in the SecurityModeCommand message, as specified in TS 33.501 [11];

1> request lower layers to verify the integrity protection of the SecurityModeCommand message, using the algorithm indicated by the integrityProtAlgorithm as included in the SecurityModeCommand message and the KRRCint key;

1> if the SecurityModeCommand message passes the integrity protection check:

2> derive the KRRCenc key and the KUPenc key associated with the cipheringAlgorithm indicated in the SecurityModeCommand message, as specified in TS 33.501 [11];

2> derive the KUPint key associated with the integrityProtAlgorithm indicated in the SecurityModeCommand message, as specified in TS 33.501 [11];

2> configure lower layers to apply SRB integrity protection using the indicated algorithm and the KRRCint key immediately, i.e. integrity protection shall be applied to all subsequent messages received and sent by the UE, including the SecurityModeComplete message;

2> configure lower layers to apply SRB ciphering using the indicated algorithm, the KRRCenc keyafter completing the procedure, i.e. ciphering shall be applied to all subsequent messages received and sent by the UE, except for the SecurityModeComplete message which is sent unciphered;

2> consider AS security to be activated;

2> submit the SecurityModeComplete message to lower layers for transmission, upon which the procedure ends;

1> else:

2> continue using the configuration used prior to the reception of the SecurityModeCommand message, i.e. neither apply integrity protection nor ciphering.

2> submit the SecurityModeFailure message to lower layers for transmission, upon which the procedure ends.

5.3.5 RRC reconfiguration

5.3.5.1 General

Figure 5.3.5.1-1: RRC reconfiguration, successful

Figure 5.3.5.1-2: RRC reconfiguration, failure

The purpose of this procedure is to modify an RRC connection, e.g. to establish/modify/release RBs, to perform reconfiguration with sync, to setup/modify/release measurements, to add/modify/release SCells and cell groups. As part of the procedure, NAS dedicated information may be transferred from the Network to the UE.

RRC reconfiguration to perform reconfiguration with sync includes, but is not limited to, the following cases:

– reconfiguration with sync and security key refresh, involving RA to the PCell/PSCell, MAC reset, refresh of security and re-establishment of RLC and PDCP triggered by explicit L2 indicators;

– reconfiguration with sync but without security key refresh, involving RA to the PCell/PSCell, MAC reset and RLC re-establishment and PDCP data recovery (for AM DRB) triggered by explicit L2 indicators.

In (NG)EN-DC and NR-DC, SRB3 can be used for measurement configuration and reporting, to (re-)configure MAC, RLC, physical layer and RLF timers and constants of the SCG configuration, and to reconfigure PDCP for DRBs associated with the S-KgNB or SRB3, and to reconfigure SDAP for DRBs associated with S-KgNB in NGEN-DC and NR-DC, provided that the (re-)configuration does not require any MN involvement. In (NG)EN-DC and NR-DC, only measConfig, radioBearerConfig and/or secondaryCellGroup are included in RRCReconfiguration received via SRB3.

5.3.5.2 Initiation

The Network may initiate the RRC reconfiguration procedure to a UE in RRC_CONNECTED. The Network applies the procedure as follows:

– the establishment of RBs (other than SRB1, that is established during RRC connection establishment) is performed only when AS security has been activated;

– the addition of Secondary Cell Group and SCells is performed only when AS security has been activated;

– the reconfigurationWithSync is included in secondaryCellGroup only when at least one RLC bearer is setup in SCG;

– the reconfigurationWithSync is included in masterCellGroup only when AS security has been activated, and SRB2 with at least one DRB are setup and not suspended.

5.3.5.3 Reception of an RRCReconfiguration by the UE

The UE shall perform the following actions upon reception of the RRCReconfiguration:

1> if the RRCReconfiguration is received via other RAT (i.e., inter-RAT handover to NR):

2> if the RRCReconfiguration does not include the fullConfig and the UE is connected to 5GC (i.e., delta signalling during intra 5GC handover):

3> re-use the source RAT SDAP and PDCP configurations if available (i.e., current SDAP/PDCP configurations for all RBs from source E-UTRA RAT prior to the reception of the inter-RAT HO RRCReconfiguration message);

1> else:

2> if the RRCReconfiguration includes the fullConfig:

3> perform the full configuration procedure as specified in 5.3.5.11;

1> if the RRCReconfiguration includes the masterCellGroup:

2> perform the cell group configuration for the received masterCellGroup according to 5.3.5.5;

1> if the RRCReconfiguration includes the masterKeyUpdate:

2> perform AS security key update procedure as specified in 5.3.5.7;

1> if the RRCReconfiguration includes the sk-Counter:

2> perform security key update procedure as specified in 5.3.5.7;

1> if the RRCReconfiguration includes the secondaryCellGroup:

2> perform the cell group configuration for the SCG according to 5.3.5.5;

1> if the RRCReconfiguration includes the mrdc-SecondaryCellGroupConfig:

2> if the mrdc-SecondaryCellGroupConfig is set to setup:

3> if the mrdc-SecondaryCellGroupConfig includes mrdc-ReleaseAndAdd:

4> perform MR-DC release as specified in clause 5.3.5.10;

3> if the received mrdc-SecondaryCellGroup is set to nr-SCG:

4> perform the RRC reconfiguration according to 5.3.5.3 for the RRCReconfiguration message included in nr-SCG;

3> if the received mrdc-SecondaryCellGroup is set to eutra-SCG:

4> perform the RRC connection reconfiguration as specified in TS 36.331 [10], clause 5.3.5.3 for the RRCConnectionReconfiguration message included in eutra-SCG;

2> else (mrdc-SecondaryCellGroupConfig is set to release):

3> perform MR-DC release as specified in clause 5.3.5.10;

1> if the RRCReconfiguration message includes the radioBearerConfig:

2> perform the radio bearer configuration according to 5.3.5.6;

1> if the RRCReconfiguration message includes the radioBearerConfig2:

2> perform the radio bearer configuration according to 5.3.5.6;

1> if the RRCReconfiguration message includes the measConfig:

2> perform the measurement configuration procedure as specified in 5.5.2;

1> if the RRCReconfiguration message includes the dedicatedNAS-MessageList:

2> forward each element of the dedicatedNAS-MessageList to upper layers in the same order as listed;

1> if the RRCReconfiguration message includes the dedicatedSIB1-Delivery:

2> perform the action upon reception of SIB1 as specified in 5.2.2.4.2;

1> if the RRCReconfiguration message includes the dedicatedSystemInformationDelivery:

2> perform the action upon reception of System Information as specified in 5.2.2.4;

1> if the RRCReconfiguration message includes the otherConfig:

2> perform the other configuration procedure as specified in 5.3.5.9;

1> set the content of the RRCReconfigurationComplete message as follows:

2> if the RRCReconfiguration includes the masterCellGroup containing the reportUplinkTxDirectCurrent:

3> include the uplinkTxDirectCurrentList for each MCG serving cell with UL;

3> include uplinkDirectCurrentBWP-SUL for each MCG serving cell configured with SUL carrier, if any, within the uplinkTxDirectCurrentList;

2> if the RRCReconfiguration includes the secondaryCellGroup containing the reportUplinkTxDirectCurrent:

3> include the uplinkTxDirectCurrentList for each SCG serving cell with UL;

3> include uplinkDirectCurrentBWP-SUL for each SCG serving cell configured with SUL carrier, if any, within the uplinkTxDirectCurrentList;

2> if the RRCReconfiguration message includes the mrdc-SecondaryCellGroupConfig with mrdc-SecondaryCellGroup set to eutra-SCG:

3> include in the eutra-SCG-Response the E-UTRA RRCConnectionReconfigurationComplete message in accordance with TS 36.331 [10] clause 5.3.5.3;

2> if the RRCReconfiguration message includes the mrdc-SecondaryCellGroupConfig with mrdc-SecondaryCellGroup set to nr-SCG:

3> include in the nr-SCG-Response the RRCReconfigurationComplete message;

1> if the UE is configured with E-UTRA nr-SecondaryCellGroupConfig (UE in (NG)EN-DC):

2> if the RRCReconfiguration message was received via E-UTRA SRB1 as specified in TS 36.331 [10]:

3> submit the RRCReconfigurationComplete via E-UTRA embedded in E-UTRA RRC message RRCConnectionReconfigurationComplete as specified in TS 36.331 [10];

3> if reconfigurationWithSync was included in spCellConfig of an SCG:

4> initiate the Random Access procedure on the SpCell, as specified in TS 38.321 [3];

3> else:

4> the procedure ends;

NOTE 1: The order the UE sends the RRCConnectionReconfigurationComplete message and performs the Random Access procedure towards the SCG is left to UE implementation.

2> else (RRCReconfiguration was received via SRB3):

3> submit the RRCReconfigurationComplete message via SRB3 to lower layers for transmission using the new configuration;

NOTE 2: In (NG)EN-DC and NR-DC, in the case RRCReconfiguration is received via SRB1, the random access is triggered by RRC layer itself as there is not necessarily other UL transmission. In the case RRCReconfiguration is received via SRB3, the random access is triggered by the MAC layer due to arrival of RRCReconfigurationComplete.

1> else if the RRCReconfiguration message was received within the nr-SCG within mrdc-SecondaryCellGroup (UE in NR-DC, mrdc-SecondaryCellGroup was received in RRCReconfiguration via SRB1):

2> if reconfigurationWithSync was included in spCellConfig in nr-SCG:

3> initiate the Random Access procedure on the PSCell, as specified in TS 38.321 [3];

2> else

3> the procedure ends;

NOTE 2a: The order in which the UE sends the RRCReconfigurationComplete message and performs the Random Access procedure towards the SCG is left to UE implementation.

1> else if the RRCReconfiguration message was received via SRB3 (UE in NR-DC):

2> submit the RRCReconfigurationComplete message via SRB3 to lower layers for transmission using the new configuration;

1> else (RRCReconfiguration was received via SRB1):

2> submit the RRCReconfigurationComplete message via SRB1 to lower layers for transmission using the new configuration;

2> if this is the first RRCReconfiguration message after successful completion of the RRC re-establishment procedure:

3> resume SRB2 and DRBs that are suspended;

1> if reconfigurationWithSync was included in spCellConfig of an MCG or SCG, and when MAC of an NR cell group successfully completes a Random Access procedure triggered above;

2> stop timer T304 for that cell group;

2> apply the parts of the CSI reporting configuration, the scheduling request configuration and the sounding RS configuration that do not require the UE to know the SFN of the respective target SpCell, if any;

2> apply the parts of the measurement and the radio resource configuration that require the UE to know the SFN of the respective target SpCell (e.g. measurement gaps, periodic CQI reporting, scheduling request configuration, sounding RS configuration), if any, upon acquiring the SFN of that target SpCell;

2> if the reconfigurationWithSync was included in spCellConfig of an MCG:

3> if T390 is running:

4> stop timer T390 for all access categories;

4> perform the actions as specified in 5.3.14.4.

3> if RRCReconfiguration does not include dedicatedSIB1-Delivery and

3> if the active downlink BWP, which is indicated by the firstActiveDownlinkBWP-Id for the target SpCell of the MCG, has a common search space configured by searchSpaceSIB1:

4> acquire the SIB1, which is scheduled as specified in TS 38.213 [13], of the target SpCell of the MCG;

4> upon acquiring SIB1, perform the actions specified in clause 5.2.2.4.2;

2> if reconfigurationWithSync was included in masterCellGroup; and

2> if the UE initiated transmission of a UEAssistanceInformation message during the last 1 second, and the UE is still configured to provide the concerned UE assistance information:

3> initiate transmission of a UEAssistanceInformation message in accordance with clause 5.7.4.3 to provide the concerned UE assistance information;

3> start or restart the prohibit timer (if exists) associated with the concerned UE assistance information with the timer value set to the value in corresponding configuration;

2> the procedure ends.

NOTE 3: The UE is only required to acquire broadcasted SIB1 if the UE can acquire it without disrupting unicast data reception, i.e. the broadcast and unicast beams are quasi co-located.

NOTE 4: The UE sets the content of UEAssistanceInformation according to latest configuration (i.e. the configuration after applying the RRCReconfiguration message) and latest UE preference. The UE may include more than the concerned UE assistance information within the UEAssistanceInformation according to 5.7.4.2. Therefore, the content of UEAssistanceInformation message might not be the same as the content of the previous UEAssistanceInformation message.

5.3.5.4 Secondary cell group release

The UE shall:

1> as a result of SCG release triggered by E-UTRA (i.e. (NG)EN-DC case) or NR (i.e. NR-DC case):

2> reset SCG MAC, if configured;

2> for each RLC bearer that is part of the SCG configuration:

3> perform RLC bearer release procedure as specified in 5.3.5.5.3;

2> release the SCG configuration;

2> stop timer T310 for the corresponding SpCell, if running;

2> stop timer T304 for the corresponding SpCell, if running.

NOTE: Release of cell group means only release of the lower layer configuration of the cell group but the RadioBearerConfig may not be released.

5.3.5.5 Cell Group configuration

5.3.5.5.1 General

The network configures the UE with Master Cell Group (MCG), and zero or one Secondary Cell Group (SCG). In (NG)EN-DC, the MCG is configured as specified in TS 36.331 [10], and for NE-DC, the SCG is configured as specified in TS 36.331 [10]. The network provides the configuration parameters for a cell group in the CellGroupConfig IE.

The UE performs the following actions based on a received CellGroupConfig IE:

1> if the CellGroupConfig contains the spCellConfig with reconfigurationWithSync:

2> perform Reconfiguration with sync according to 5.3.5.5.2;

2> resume all suspended radio bearers and resume SCG transmission for all radio bearers, if suspended;

1> if the CellGroupConfig contains the rlc-BearerToReleaseList:

2> perform RLC bearer release as specified in 5.3.5.5.3;

1> if the CellGroupConfig contains the rlc-BearerToAddModList:

2> perform the RLC bearer addition/modification as specified in 5.3.5.5.4;

1> if the CellGroupConfig contains the mac-CellGroupConfig:

2> configure the MAC entity of this cell group as specified in 5.3.5.5.5;

1> if the CellGroupConfig contains the sCellToReleaseList:

2> perform SCell release as specified in 5.3.5.5.8;

1> if the CellGroupConfig contains the spCellConfig:

2> configure the SpCell as specified in 5.3.5.5.7;

1> if the CellGroupConfig contains the sCellToAddModList:

2> perform SCell addition/modification as specified in 5.3.5.5.9.

5.3.5.5.2 Reconfiguration with sync

The UE shall perform the following actions to execute a reconfiguration with sync.

1> if the AS security is not activated, perform the actions upon going to RRC_IDLE as specified in 5.3.11 with the release cause ‘other‘ upon which the procedure ends;

1> stop timer T310 for the corresponding SpCell, if running;

1> start timer T304 for the corresponding SpCell with the timer value set to t304, as included in the reconfigurationWithSync;

1> if the frequencyInfoDL is included:

2> consider the target SpCell to be one on the SSB frequency indicated by the frequencyInfoDL with a physical cell identity indicated by the physCellId;

1> else:

2> consider the target SpCell to be one on the SSB frequency of the source SpCell with a physical cell identity indicated by the physCellId;

1> start synchronising to the DL of the target SpCell;

1> apply the specified BCCH configuration defined in 9.1.1.1;

1> acquire the MIB, which is scheduled as specified in TS 38.213 [13];

NOTE 1: The UE should perform the reconfiguration with sync as soon as possible following the reception of the RRC message triggering the reconfiguration with sync, which could be before confirming successful reception (HARQ and ARQ) of this message.

NOTE 2: The UE may omit reading the MIB if the UE already has the required timing information, or the timing information is not needed for random access.

1> reset the MAC entity of this cell group;

1> consider the SCell(s) of this cell group, if configured, to be in deactivated state;

1> apply the value of the newUE-Identity as the C-RNTI for this cell group;

1> configure lower layers in accordance with the received spCellConfigCommon;

1> configure lower layers in accordance with any additional fields, not covered in the previous, if included in the received reconfigurationWithSync.

5.3.5.5.3 RLC bearer release

The UE shall:

1> for each logicalChannelIdentity value included in the rlc-BearerToReleaseList that is part of the current UE configuration within the same cell group (LCH release); or

1> for each logicalChannelIdentity value that is to be released as the result of an SCG release according to 5.3.5.4:

2> release the RLC entity or entities as specified in TS 38.322 [4], clause 5.1.3;

2> release the corresponding logical channel.

5.3.5.5.4 RLC bearer addition/modification

For each RLC-BearerConfig received in the rlc-BearerToAddModList IE the UE shall:

1> if the UE’s current configuration contains an RLC bearer with the received logicalChannelIdentity within the same cell group:

2> if reestablishRLC is received:

3> re-establish the RLC entity as specified in TS 38.322 [4];

2> reconfigure the RLC entity or entities in accordance with the received rlc-Config;

2> reconfigure the logical channel in accordance with the received mac-LogicalChannelConfig;

NOTE: The network does not re-associate an already configured logical channel with another radio bearer. Hence servedRadioBearer is not present in this case.

1> else (a logical channel with the given logicalChannelIdentity is not configured within the same cell group, including the case when full configuration option is used):

2> if the servedRadioBearer associates the logical channel with an SRB and rlc-Config is not included:

3> establish an RLC entity in accordance with the default configuration defined in 9.2 for the corresponding SRB;

2> else:

3> establish an RLC entity in accordance with the received rlc-Config;

2> if the servedRadioBearer associates the logical channel with an SRB and if mac-LogicalChannelConfig is not included:

3> configure this MAC entity with a logical channel in accordance to the default configuration defined in 9.2 for the corresponding SRB;

2> else:

3> configure this MAC entity with a logical channel in accordance to the received mac-LogicalChannelConfig;

2> associate this logical channel with the PDCP entity identified by servedRadioBearer.

5.3.5.5.5 MAC entity configuration

The UE shall:

1> if SCG MAC is not part of the current UE configuration (i.e. SCG establishment):

2> create an SCG MAC entity;

1> reconfigure the MAC main configuration of the cell group in accordance with the received mac-CellGroupConfig excluding tag-ToReleaseList and tag-ToAddModList;

1> if the received mac-CellGroupConfig includes the tag-ToReleaseList:

2> for each TAG-Id value included in the tag-ToReleaseList that is part of the current UE configuration:

3> release the TAG indicated by TAG-Id;

1> if the received mac-CellGroupConfig includes the tag-ToAddModList:

2> for each tag-Id value included in tag-ToAddModList that is not part of the current UE configuration (TAG addition):

3> add the TAG, corresponding to the tag-Id, in accordance with the received timeAlignmentTimer;

2> for each tag-Id value included in tag-ToAddModList that is part of the current UE configuration (TAG modification):

3> reconfigure the TAG, corresponding to the tag-Id, in accordance with the received timeAlignmentTimer.

5.3.5.5.6 RLF Timers & Constants configuration

The UE shall:

1> if the received rlf-TimersAndConstants is set to release:

2> use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1;

1> else:

2> (re-)configure the value of timers and constants in accordance with received rlf-TimersAndConstants;

2> stop timer T310 for this cell group, if running;

2> reset the counters N310 and N311.

5.3.5.5.7 SpCell Configuration

The UE shall:

1> if the SpCellConfig contains the rlf-TimersAndConstants:

2> configure the RLF timers and constants for this cell group as specified in 5.3.5.5.6;

1> else if rlf-TimersAndConstants is not configured for this cell group:

2> use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1;

1> if the SpCellConfig contains spCellConfigDedicated:

2> configure the SpCell in accordance with the spCellConfigDedicated;

2> consider the bandwidth part indicated in firstActiveUplinkBWP-Id if configured to be the active uplink bandwidth part;

2> consider the bandwidth part indicated in firstActiveDownlinkBWP-Id if configured to be the active downlink bandwidth part;

2> if any of the reference signal(s) that are used for radio link monitoring are reconfigured by the received spCellConfigDedicated:

3> stop timer T310 for the corresponding SpCell, if running;

3> reset the counters N310 and N311.

5.3.5.5.8 SCell Release

The UE shall:

1> if the release is triggered by reception of the sCellToReleaseList:

2> for each sCellIndex value included in the sCellToReleaseList:

3> if the current UE configuration includes an SCell with value sCellIndex:

4> release the SCell.

5.3.5.5.9 SCell Addition/Modification

The UE shall:

1> for each sCellIndex value included in the sCellToAddModList that is not part of the current UE configuration (SCell addition):

2> add the SCell, corresponding to the sCellIndex, in accordance with the sCellConfigCommon and sCellConfigDedicated;

2> configure lower layers to consider the SCell to be in deactivated state;

2> for each measId included in the measIdList within VarMeasConfig:

3> if SCells are not applicable for the associated measurement; and

3> if the concerned SCell is included in cellsTriggeredList defined within the VarMeasReportList for this measId:

4> remove the concerned SCell from cellsTriggeredList defined within the VarMeasReportList for this measId;

1> for each sCellIndex value included in the sCellToAddModList that is part of the current UE configuration (SCell modification):

2> modify the SCell configuration in accordance with the sCellConfigDedicated.

5.3.5.6 Radio Bearer configuration

5.3.5.6.1 General

The UE shall perform the following actions based on a received RadioBearerConfig IE:

1> if the RadioBearerConfig includes the srb3-ToRelease:

2> perform the SRB release as specified in 5.3.5.6.2;

1> if the RadioBearerConfig includes the srb-ToAddModList:

2> perform the SRB addition or reconfiguration as specified in 5.3.5.6.3;

1> if the RadioBearerConfig includes the drb-ToReleaseList:

2> perform DRB release as specified in 5.3.5.6.4;

1> if the RadioBearerConfig includes the drb-ToAddModList:

2> perform DRB addition or reconfiguration as specified in 5.3.5.6.5.

1> release all SDAP entities, if any, that have no associated DRB as specified in TS 37.324 [24] clause 5.1.2, and indicate the release of the user plane resources for PDU Sessions associated with the released SDAP entities to upper layers.

5.3.5.6.2 SRB release

The UE shall:

1> release the PDCP entity and the srb-Identity of the SRB3.

5.3.5.6.3 SRB addition/modification

The UE shall:

1> for each srb-Identity value included in the srb-ToAddModList that is not part of the current UE configuration (SRB establishment or reconfiguration from E-UTRA PDCP to NR PDCP):

2> establish a PDCP entity;

2> if AS security has been activated:

3> if target RAT of handover is E-UTRA/5GC; or

3> if the UE is connected to E-UTRA/5GC:

4> if the UE is capable of E-UTRA/5GC, but not capable of NGEN-DC:

5> configure the PDCP entity with the security algorithms and keys (KRRCenc and KRRCint) configured/derived as specified in TS 36.331 [10];

4> else (i.e., UE capable of NGEN-DC):

5> configure the PDCP entity with the security algorithms according to securityConfig and apply the keys (KRRCenc and KRRCint) associated with the master key (KeNB) or secondary key (S-KgNB) as indicated in keyToUse, if applicable;

3> else (i.e., UE connected to NR or UE connected to E-UTRA/EPC):

4> configure the PDCP entity with the security algorithms according to securityConfig and apply the keys (KRRCenc and KRRCint) associated with the master key (KeNB/ KgNB) or secondary key (S-KgNB) as indicated in keyToUse, if applicable;

2> if the current UE configuration as configured by E-UTRA in TS 36.331 [10] includes an SRB identified with the same srb-Identity value:

3> associate the E-UTRA RLC entity and DCCH of this SRB with the NR PDCP entity;

3> release the E-UTRA PDCP entity of this SRB;

2> if the pdcp-Config is included:

3> configure the PDCP entity in accordance with the received pdcp-Config;

2> else:

3> configure the PDCP entity in accordance with the default configuration defined in 9.2.1 for the corresponding SRB;

1> for each srb-Identity value included in the srb-ToAddModList that is part of the current UE configuration:

2> if the reestablishPDCP is set:

3> if target RAT of handover is E-UTRA/5GC; or

3> if the UE is connected to E-UTRA/5GC:

4> if the UE is capable of E-UTRA/5GC, but not capable of NGEN-DC:

5> configure the PDCP entity to apply the integrity protection algorithm and KRRCint key configured/derived as specified in TS 36.331 [10], i.e. the integrity protection configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

5> configure the PDCP entity to apply the ciphering algorithm and KRRCenc key configured/derived as specified in TS 36.331 [10], i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

4> else (i.e., a UE capable of NGEN-DC):

5> configure the PDCP entity to apply the integrity protection algorithm and KRRCint key associated with the master key (KeNB) or secondary key (S-KgNB), as indicated in keyToUse, i.e. the integrity protection configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

5> configure the PDCP entity to apply the ciphering algorithm and KRRCenc key associated with the master key (KeNB) or secondary key (S-KgNB) as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

3> else (i.e., UE connected to NR or UE in EN-DC):

4> configure the PDCP entity to apply the integrity protection algorithm and KRRCint key associated with the master key (KeNB/KgNB) or secondary key (S-KgNB), as indicated in keyToUse , i.e. the integrity protection configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

4> configure the PDCP entity to apply the ciphering algorithm and KRRCenc key associated with the master key (KeNB/KgNB) or secondary key (S-KgNB) as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

3> re-establish the PDCP entity of this SRB as specified in TS 38.323 [5];

2> else, if the discardOnPDCP is set:

3> trigger the PDCP entity to perform SDU discard as specified in TS 38.323 [5];

2> if the pdcp-Config is included:

3> reconfigure the PDCP entity in accordance with the received pdcp-Config.

5.3.5.6.4 DRB release

The UE shall:

1> for each drb-Identity value included in the drb-ToReleaseList that is part of the current UE configuration; or

1> for each drb-Identity value that is to be released as the result of full configuration according to 5.3.5.11:

2> release the PDCP entity and the drb-Identity;

2> if SDAP entity associated with this DRB is configured:

3> indicate the release of the DRB to SDAP entity associated with this DRB (TS 37.324 [24], clause 5.3.3);

2> if the DRB is associated with an eps-BearerIdentity:

3> if a new bearer is not added either with NR or E-UTRA with same eps-BearerIdentity:

4> indicate the release of the DRB and the eps-BearerIdentity of the released DRB to upper layers.

NOTE 1: The UE does not consider the message as erroneous if the drb-ToReleaseList includes any drb-Identity value that is not part of the current UE configuration.

NOTE 2: Whether or not the RLC and MAC entities associated with this PDCP entity are reset or released is determined by the CellGroupConfig.

5.3.5.6.5 DRB addition/modification

The UE shall:

1> for each drb-Identity value included in the drb-ToAddModList that is not part of the current UE configuration (DRB establishment including the case when full configuration option is used):

2> establish a PDCP entity and configure it in accordance with the received pdcp-Config;

2> if the PDCP entity of this DRB is not configured with cipheringDisabled:

3> if target RAT of handover is E-UTRA/5GC; or

3> if the UE is connected to E-UTRA/5GC:

4> if the UE is capable of E-UTRA/5GC but not capable of NGEN-DC:

5> configure the PDCP entity with the ciphering algorithm and KUPenc key configured/derived as specified in TS 36.331 [10];

4> else (i.e., a UE capable of NGEN-DC):

5> configure the PDCP entity with the ciphering algorithms according to securityConfig and apply the key (KUPenc) associated with the master key (KeNB) or secondary key (S-KgNB) as indicated in keyToUse, if applicable;

3> else (i.e., UE connected to NR or UE connected to E-UTRA/EPC):

4> configure the PDCP entity with the ciphering algorithms according to securityConfig and apply the KUPenc key associated with the master key (KeNB/KgNB) or the secondary key (S-KgNB/S-KeNB) as indicated in keyToUse;

2> if the PDCP entity of this DRB is configured with integrityProtection:

3> configure the PDCP entity with the integrity protection algorithms according to securityConfig and apply the KUPint key associated with the master (KgNB) or the secondary key (S-KgNB) as indicated in keyToUse;

2> if an sdap-Config is included:

3> if an SDAP entity with the received pdu-Session does not exist:

4> establish an SDAP entity as specified in TS 37.324 [24] clause 5.1.1;

4> if an SDAP entity with the received pdu-Session did not exist prior to receiving this reconfiguration:

5> indicate the establishment of the user plane resources for the pdu-Session to upper layers;

3> configure the SDAP entity in accordance with the received sdap-Config as specified in TS 37.324 [24] and associate the DRB with the SDAP entity;

3> for each QFI value added in mappedQoS-FlowsToAdd, if the QFI value is previously configured, the QFI value is released from the old DRB;

2> if the DRB is associated with an eps-BearerIdentity:

3> if the DRB was configured with the same eps-BearerIdentity either by NR or E-UTRA prior to receiving this reconfiguration:

4> associate the established DRB with the corresponding eps-BearerIdentity;

3> else:

4> indicate the establishment of the DRB(s) and the eps-BearerIdentity of the established DRB(s) to upper layers;

1> for each drb-Identity value included in the drb-ToAddModList that is part of the current UE configuration:

2> if the reestablishPDCP is set:

3> if target RAT of handover is E-UTRA/5GC; or

3> if the UE is connected to E-UTRA/5GC:

4> if the UE is capable of E-UTRA/5GC but not capable of NGEN-DC:

5> if the PDCP entity of this DRB is not configured with cipheringDisabled:

6> configure the PDCP entity with the ciphering algorithm and KUPenc key configured/derived as specified in TS 36.331 [10], clause 5.4.2.3, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received and sent by the UE;

4> else (i.e., a UE capable of NGEN-DC):

5> if the PDCP entity of this DRB is not configured with cipheringDisabled:

6> configure the PDCP entity with the ciphering algorithm and KUPenc key associated with the master key (KeNB) or the secondary key (S-KgNB), as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received and sent by the UE;

3> else (i.e., UE connected to NR or UE in EN-DC):

4> if the PDCP entity of this DRB is not configured with cipheringDisabled:

5> configure the PDCP entity with the ciphering algorithm and KUPenc key associated with the master key (KeNB/ KgNB) or the secondary key (S-KgNB/S-KeNB), as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received and sent by the UE;

4> if the PDCP entity of this DRB is configured with integrityProtection:

5> configure the PDCP entity with the integrity protection algorithms according to securityConfig and apply the KUPint key associated with the master key (KgNB) or the secondary key (S-KgNB) as indicated in keyToUse;

3> if drb-ContinueROHC is included in pdcp-Config:

4> indicate to lower layer that drb-ContinueROHC is configured;

3> re-establish the PDCP entity of this DRB as specified in TS 38.323 [5], clause 5.1.2;

2> else, if the recoverPDCP is set:

3> trigger the PDCP entity of this DRB to perform data recovery as specified in TS 38.323 [5];

2> if the pdcp-Config is included:

3> reconfigure the PDCP entity in accordance with the received pdcp-Config.

2> if the sdap-Config is included:

3> reconfigure the SDAP entity in accordance with the received sdap-Config as specified in TS37.324 [24];

3> for each QFI value added in mappedQoS-FlowsToAdd, if the QFI value is previously configured, the QFI value is released from the old DRB;

NOTE 1: Void.

NOTE 2: When determining whether a drb-Identity value is part of the current UE configuration, the UE does not distinguish which RadioBearerConfig and DRB-ToAddModList that DRB was originally configured in. To re-associate a DRB with a different key (KeNB to S-KgNB, KgNB to S-KeNB, KgNB to S-KgNB, or vice versa), the network provides the drb-Identity value in the (target) drb-ToAddModList and sets the reestablishPDCP flag. The network does not list the drb-Identity in the (source) drb-ToReleaseList.

NOTE 3: When setting the reestablishPDCP flag for a radio bearer, the network ensures that the RLC receiver entities do not deliver old PDCP PDUs to the re-established PDCP entity. It does that e.g. by triggering a reconfiguration with sync of the cell group hosting the old RLC entity or by releasing the old RLC entity.

NOTE 4: In this specification, UE configuration refers to the parameters configured by NR RRC unless otherwise stated.

NOTE 5: Ciphering and integrity protection can be enabled or disabled for a DRB. The enabling/disabling of ciphering or integrity protection can be changed only by releasing and adding the DRB.

5.3.5.7 AS Security key update

The UE shall:

1> if UE is connected to E-UTRA/EPC or E-UTRA/5GC:

2> upon reception of sk-Counter as specified in TS 36.331 [10]:

3> update the S-KgNB key based on the KeNB key and using the received sk-Counter value, as specified in TS 33.401 [30] for EN-DC, or TS 33.501 [11] for NGEN-DC;

3> derive the KRRCenc and KUPenc keys as specified in TS 33.401 [30] for EN-DC, or TS 33.501 [11] for NGEN-DC;

3> derive the KRRCint and KUPint keys as specified in TS 33.401 [30] for EN-DC or TS 33.501 [11] for NGEN-DC.

1> else if this procedure was initiated due to reception of the masterKeyUpdate:

2> if the nas-Container is included in the received masterKeyUpdate:

3> forward the nas-Container to the upper layers;

2> if the keySetChangeIndicator is set to true:

3> derive or update the KgNB key based on the KAMF key, as specified in TS 33.501 [11];

2> else:

3> derive or update the KgNB key based on the current KgNB key or the NH, using the nextHopChainingCount value indicated in the received masterKeyUpdate, as specified in TS 33.501 [11];

2> store the nextHopChainingCount value;

2> derive the keys associated with the KgNB key as follows:

3> if the securityAlgorithmConfig is included in SecurityConfig:

4> derive the KRRCenc and KUPenc keys associated with the cipheringAlgorithm indicated in the securityAlgorithmConfig, as specified in TS 33.501 [11];

4> derive the KRRCint and KUPint keys associated with the integrityProtAlgorithm indicated in the securityAlgorithmConfig, as specified in TS 33.501 [11];

3> else:

4> derive the KRRCenc and KUPenc keys associated with the current cipheringAlgorithm, as specified in TS 33.501 [11];

4> derive the KRRCint and KUPint keys associated with the current integrityProtAlgorithm, as specified in TS 33.501 [11].

NOTE 1: Ciphering and integrity protection are optional to configure for the DRBs.

1> else if this procedure was initiated due to reception of the sk-Counter (UE is in NE-DC, or NR-DC, or is configured with SN terminated bearer(s)):

2> derive or update the secondary key (S-KgNB or S-KeNB) based on the KgNB key and using the received sk-Counter value, as specified in TS 33.501 [11];

2> derive the KRRCenc key and the KUPenc key as specified in TS 33.501 [11] using the ciphering algorithms indicated in the RadioBearerConfig associated with the secondary key (S-KgNB or S-KeNB) as indicated by keyToUse;

2> derive the KRRCint key and the KUPint key as specified in TS 33.501 [11] using the integrity protection algorithms indicated in the RadioBearerConfig associated with the secondary key (S-KgNB or S-KeNB) as indicated by keyToUse;

NOTE 2: If the UE has no radio bearer configured with keyToUse set to secondary and receives the sk-Counter without any RadioBearerConfig with keyToUse set to secondary, the UE does not consider it as an invalid reconfiguration.

5.3.5.8 Reconfiguration failure

5.3.5.8.1 Void
5.3.5.8.2 Inability to comply with RRCReconfiguration

The UE shall:

1> if the UE is in (NG)EN-DC:

2> if the UE is unable to comply with (part of) the configuration included in the RRCReconfiguration message received over SRB3;

3> continue using the configuration used prior to the reception of RRCReconfiguration message;

3> initiate the SCG failure information procedure as specified in subclause 5.7.3 to report SCG reconfiguration error, upon which the connection reconfiguration procedure ends;

2> else, if the UE is unable to comply with (part of) the configuration included in the RRCReconfiguration message received over SRB1;

3> continue using the configuration used prior to the reception of RRCReconfiguration message;

3> initiate the connection re-establishment procedure as specified in TS 36.331 [10], clause 5.3.7, upon which the connection reconfiguration procedure ends.

1> else if RRCReconfiguration is received via NR (i.e., NR standalone, NE-DC, or NR-DC):

2> if the UE is unable to comply with (part of) the configuration included in the RRCReconfiguration message received over SRB3;

NOTE 0: This case does not apply in NE-DC.

3> continue using the configuration used prior to the reception of RRCReconfiguration message;

3> initiate the SCG failure information procedure as specified in subclause 5.7.3 to report SCG reconfiguration error, upon which the connection reconfiguration procedure ends;

2> else if the UE is unable to comply with (part of) the configuration included in the RRCReconfiguration message received over the SRB1;

NOTE 0a: The compliance also covers the SCG configuration carried within octet strings e.g. field mrdc-SecondaryCellGroupConfig. I.e. the failure behaviour defined also applies in case the UE cannot comply with the embedded SCG configuration or with the combination of (parts of) the MCG and SCG configurations.

3> continue using the configuration used prior to the reception of RRCReconfiguration message;

3> if AS security has not been activated:

4> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘other’

3> else if AS security has been activated but SRB2 and at least one DRB have not been setup:

4> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’;

3> else:

4> initiate the connection re-establishment procedure as specified in 5.3.7, upon which the reconfiguration procedure ends;

1> else if RRCReconfiguration is received via other RAT (Handover to NR failure):

2> if the UE is unable to comply with any part of the configuration included in the RRCReconfiguration message:

3> perform the actions defined for this failure case as defined in the specifications applicable for the other RAT.

NOTE 1: The UE may apply above failure handling also in case the RRCReconfiguration message causes a protocol error for which the generic error handling as defined in clause 10 specifies that the UE shall ignore the message.

NOTE 2: If the UE is unable to comply with part of the configuration, it does not apply any part of the configuration, i.e. there is no partial success/failure.

5.3.5.8.3 T304 expiry (Reconfiguration with sync Failure)

The UE shall:

1> if T304 of the MCG expires:

2> release dedicated preambles provided in rach-ConfigDedicated if configured;

2> revert back to the UE configuration used in the source PCell;

2> initiate the connection re-establishment procedure as specified in subclause 5.3.7.

NOTE 1: In the context above, "the UE configuration" includes state variables and parameters of each radio bearer.

1> else if T304 of a secondary cell group expires:

2> release dedicated preambles provided in rach-ConfigDedicated, if configured;

2> initiate the SCG failure information procedure as specified in subclause 5.7.3 to report SCG reconfiguration with sync failure, upon which the RRC reconfiguration procedure ends;

1> else if T304 expires when RRCReconfiguration is received via other RAT (HO to NR failure):

2> reset MAC;

2> perform the actions defined for this failure case as defined in the specifications applicable for the other RAT.

5.3.5.9 Other configuration

The UE shall:

1> if the received otherConfig includes the delayBudgetReportingConfig:

2> if delayBudgetReportingConfig is set to setup:

3> consider itself to be configured to send delay budget reports in accordance with 5.7.4;

2> else:

3> consider itself not to be configured to send delay budget reports and stop timer T342, if running.

1> if the received otherConfig includes the overheatingAssistanceConfig:

2> if overheatingAssistanceConfig is set to setup:

3> consider itself to be configured to provide overheating assistance information in accordance with 5.7.4;

2> else:

3> consider itself not to be configured to provide overheating assistance information and stop timer T345, if running;

5.3.5.10 MR-DC release

The UE shall:

1> as a result of MR-DC release triggered by E-UTRA or NR:

2> release SRB3, if established, as specified in 5.3.5.6.2;

2> release measConfig associated with SCG;

2> if the UE is configured with NR SCG:

3> release the SCG configuration as specified in clause 5.3.5.4;

2> else if the UE is configured with E-UTRA SCG:

3> release the SCG configuration as specified in TS 36.331 [10], clause 5.3.10.19 to release the E-UTRA SCG;

5.3.5.11 Full configuration

The UE shall:

1> release/ clear all current dedicated radio configurations except for the following:

– the MCG C-RNTI;

– the AS security configurations associated with the master key;

– the SRB1/SRB2 configurations and DRB configurations as configured by radioBearerConfig or radioBearerConfig2.

NOTE 1: Radio configuration is not just the resource configuration but includes other configurations like MeasConfig. Radio configuration also includes the RLC bearer configurations as configured by RLC-BearerConfig. In case NR-DC or NE-DC is configured, this also includes the entire NR or E-UTRA SCG configuration which are released according to the MR-DC release procedure as specified in 5.3.5.10.

NOTE 1a: To establish the RLC bearer of SRB(s) after release due to fullConfig, the network can include the srb-Identity within srb-ToAddModList (i.e. the UE applies RLC default configuration) and/or provide rlc-BearerToAddModList of concerned SRB(s) explicitly.

1> if the spCellConfig in the masterCellGroup includes the reconfigurationWithSync (i.e., SpCell change):

2> release/ clear all current common radio configurations;

2> use the default values specified in 9.2.3 for timers T310, T311 and constants N310, N311;

1> else (full configuration after re-establishment or during RRC resume):

2> use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1;

1> apply the default L1 parameter values as specified in corresponding physical layer specifications except for the following:

– parameters for which values are provided in SIB1;

1> apply the default MAC Cell Group configuration as specified in 9.2.2;

1> for each srb-Identity value included in the srb-ToAddModList (SRB reconfiguration):

2> establish an RLC entity for the corresponding SRB;

2> apply the default SRB configuration defined in 9.2.1 for the corresponding SRB;

NOTE 2: This is to get the SRBs (SRB1 and SRB2 for reconfiguration with sync and SRB2 for resume and reconfiguration after re-establishment) to a known state from which the reconfiguration message can do further configuration.

1> for each pdu-Session that is part of the current UE configuration:

2> release the SDAP entity (clause 5.1.2 in TS 37.324 [24]);

2> release each DRB associated to the pdu-Session as specified in 5.3.5.6.4;

NOTE 3: This will retain the pdu-Session but remove the DRBs including drb-identity of these bearers from the current UE configuration. Setup of the DRBs within the AS is described in clause 5.3.5.6.5 using the new configuration. The pdu-Session acts as the anchor for associating the released and re-setup DRB. In the AS the DRB re-setup is equivalent with a new DRB setup (including new PDCP and logical channel configurations).

1> for each pdu-Session that is part of the current UE configuration but not added with same pdu-Session in the drb-ToAddModList:

2> if the procedure was triggered due to reconfiguration with sync:

3> indicate the release of the user plane resources for the pdu-Session to upper layers after successful reconfiguration with sync;

2> else:

3> indicate the release of the user plane resources for the pdu-Session to upper layers immediately;

5.3.6 Counter check

5.3.6.1 General

Figure 5.3.6.1-1: Counter check procedure

The counter check procedure is used by the network to request the UE to verify the amount of data sent/ received on each DRB. More specifically, the UE is requested to check if, for each DRB, the most significant bits of the COUNT match with the values indicated by the network.

NOTE: The procedure enables the network to detect packet insertion by an intruder (a ‘man in the middle’).

5.3.6.2 Initiation

The network initiates the procedure by sending a CounterCheck message.

NOTE: The network may initiate the procedure when any of the COUNT values reaches a specific value.

5.3.6.3 Reception of the CounterCheck message by the UE

Upon receiving the CounterCheck message, the UE shall:

1> for each DRB that is established:

2> if no COUNT exists for a given direction (uplink or downlink) because it is a uni-directional bearer configured only for the other direction:

3> assume the COUNT value to be 0 for the unused direction;

2> if the drb-Identity is not included in the drb-CountMSB-InfoList:

3> include the DRB in the drb-CountInfoList in the CounterCheckResponse message by including the drb-Identity, the count-Uplink and the count-Downlink set to the value of TX_NEXT – 1 and RX_NEXT – 1 (specified in TS 38.323 [5]), respectively;

2> else if, for at least one direction, the most significant bits of the COUNT are different from the value indicated in the drb-CountMSB-InfoList:

3> include the DRB in the drb-CountInfoList in the CounterCheckResponse message by including the drb-Identity, the count-Uplink and the count-Downlink set to the value of TX_NEXT – 1 and RX_NEXT – 1 (specified in TS 38.323 [5]), respectively;

1> for each DRB that is included in the drb-CountMSB-InfoList in the CounterCheck message that is not established:

2> include the DRB in the drb-CountInfoList in the CounterCheckResponse message by including the drb-Identity, the count-Uplink and the count-Downlink with the most significant bits set identical to the corresponding values in the drb-CountMSB-InfoList and the least significant bits set to zero;

1> submit the CounterCheckResponse message to lower layers for transmission upon which the procedure ends.

5.3.7 RRC connection re-establishment

5.3.7.1 General

Figure 5.3.7.1-1: RRC connection re-establishment, successful

Figure 5.3.7.1-2: RRC re-establishment, fallback to RRC establishment, successful

The purpose of this procedure is to re-establish the RRC connection. A UE in RRC_CONNECTED, for which AS security has been activated with SRB2 and at least one DRB setup, may initiate the procedure in order to continue the RRC connection. The connection re-establishment succeeds if the network is able to find and verify a valid UE context or, if the UE context cannot be retrieved, and the network responds with an RRCSetup according to clause 5.3.3.4.

The network applies the procedure e.g as follows:

– When AS security has been activated and the network retrieves or verifies the UE context:

– to re-activate AS security without changing algorithms;

– to re-establish and resume the SRB1;

– When UE is re-establishing an RRC connection, and the network is not able to retrieve or verify the UE context:

– to discard the stored AS Context and release all RBs;

– to fallback to establish a new RRC connection.

If AS security has not been activated, the UE shall not initiate the procedure but instead moves to RRC_IDLE directly, with release cause ‘other’. If AS security has been activated, but SRB2 and at least one DRB are not setup, the UE does not initiate the procedure but instead moves to RRC_IDLE directly, with release cause ‘RRC connection failure’.

5.3.7.2 Initiation

The UE initiates the procedure when one of the following conditions is met:

1> upon detecting radio link failure of the MCG, in accordance with 5.3.10; or

1> upon re-configuration with sync failure of the MCG, in accordance with sub-clause 5.3.5.8.3; or

1> upon mobility from NR failure, in accordance with sub-clause 5.4.3.5; or

1> upon integrity check failure indication from lower layers concerning SRB1 or SRB2, except if the integrity check failure is detected on the RRCReestablishment message; or

1> upon an RRC connection reconfiguration failure, in accordance with sub-clause 5.3.5.8.2.

Upon initiation of the procedure, the UE shall:

1> stop timer T310, if running;

1> stop timer T304, if running;

1> start timer T311;

1> suspend all RBs, except SRB0;

1> reset MAC;

1> release the MCG SCell(s), if configured;

1> release spCellConfig, if configured;

1> if MR-DC is configured:

2> perform MR-DC release, as specified in clause 5.3.5.10;

1> release delayBudgetReportingConfig, if configured, and stop timer T342, if running;

1> release overheatingAssistanceConfig, if configured, and stop timer T345, if running;

1> perform cell selection in accordance with the cell selection process as specified in TS 38.304 [20].

5.3.7.3 Actions following cell selection while T311 is running

Upon selecting a suitable NR cell, the UE shall:

1> ensure having valid and up to date essential system information as specified in clause 5.2.2.2;

1> stop timer T311;

1> start timer T301;

1> if T390 is running:

2> stop timer T390 for all access categories;

2> perform the actions as specified in 5.3.14.4;

1> apply the default L1 parameter values as specified in corresponding physical layer specifications except for the parameters for which values are provided in SIB1;

1> apply the default MAC Cell Group configuration as specified in 9.2.2;

1> apply the CCCH configuration as specified in 9.1.1.2;

1> apply the timeAlignmentTimerCommon included in SIB1;

1> initiate transmission of the RRCReestablishmentRequest message in accordance with 5.3.7.4;

NOTE: This procedure applies also if the UE returns to the source PCell.

Upon selecting an inter-RAT cell, the UE shall:

1> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’.

5.3.7.4 Actions related to transmission of RRCReestablishmentRequest message

The UE shall set the contents of RRCReestablishmentRequest message as follows:

1> set the ue-Identity as follows:

2> set the c-RNTI to the C-RNTI used in the source PCell (reconfiguration with sync or mobility from NR failure) or used in the PCell in which the trigger for the re-establishment occurred (other cases);

2> set the physCellId to the physical cell identity of the source PCell (reconfiguration with sync or mobility from NR failure) or of the PCell in which the trigger for the re-establishment occurred (other cases);

2> set the shortMAC-I to the 16 least significant bits of the MAC-I calculated:

3> over the ASN.1 encoded as per clause 8 (i.e., a multiple of 8 bits) VarShortMAC-Input;

3> with the KRRCint key and integrity protection algorithm that was used in the source PCell (reconfiguration with sync or mobility from NR failure) or of the PCell in which the trigger for the re-establishment occurred (other cases); and

3> with all input bits for COUNT, BEARER and DIRECTION set to binary ones;

1> set the reestablishmentCause as follows:

2> if the re-establishment procedure was initiated due to reconfiguration failure as specified in 5.3.5.8.2:

3> set the reestablishmentCause to the value reconfigurationFailure;

2> else if the re-establishment procedure was initiated due to reconfiguration with sync failure as specified in 5.3.5.8.3 (intra-NR handover failure) or 5.4.3.5 (inter-RAT mobility from NR failure):

3> set the reestablishmentCause to the value handoverFailure;

2> else:

3> set the reestablishmentCause to the value otherFailure;

1> re-establish PDCP for SRB1;

1> re-establish RLC for SRB1;

1> apply the default configuration defined in 9.2.1 for SRB1;

1> configure lower layers to suspend integrity protection and ciphering for SRB1;

NOTE: Ciphering is not applied for the subsequent RRCReestablishment message used to resume the connection. An integrity check is performed by lower layers, but merely upon request from RRC.

1> resume SRB1;

1> submit the RRCReestablishmentRequest message to lower layers for transmission.

5.3.7.5 Reception of the RRCReestablishment by the UE

The UE shall:

1> stop timer T301;

1> consider the current cell to be the PCell;

1> store the nextHopChainingCount value indicated in the RRCReestablishment message;

1> update the KgNB key based on the current KgNB key or the NH, using the stored nextHopChainingCount value, as specified in TS 33.501 [11];

1> derive the KRRCenc and KUPenc keys associated with the previously configured cipheringAlgorithm, as specified in TS 33.501 [11];

1> derive the KRRCint and KUPint keys associated with the previously configured integrityProtAlgorithm, as specified in TS 33.501 [11].

1> request lower layers to verify the integrity protection of the RRCReestablishment message, using the previously configured algorithm and the KRRCint key;

1> if the integrity protection check of the RRCReestablishment message fails:

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’, upon which the procedure ends;

1> configure lower layers to resume integrity protection for SRB1 using the previously configured algorithm and the KRRCint key immediately, i.e., integrity protection shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

1> configure lower layers to resume ciphering for SRB1 using the previously configured algorithm and, the KRRCenc key immediately, i.e., ciphering shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;

1> release the measurement gap configuration indicated by the measGapConfig, if configured;

1> submit the RRCReestablishmentComplete message to lower layers for transmission;

1> the procedure ends.

5.3.7.6 T311 expiry

Upon T311 expiry, the UE shall:

1> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’.

5.3.7.7 T301 expiry or selected cell no longer suitable

The UE shall:

1> if timer T301 expires; or

1> if the selected cell becomes no longer suitable according to the cell selection criteria as specified in TS 38.304 [20]:

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’.

5.3.7.8 Reception of the RRCSetup by the UE

The UE shall:

1> perform the RRC connection establishment procedure as specified in 5.3.3.4.

5.3.8 RRC connection release

5.3.8.1 General

Figure 5.3.8.1-1: RRC connection release, successful

The purpose of this procedure is:

– to release the RRC connection, which includes the release of the established radio bearers as well as all radio resources; or

– to suspend the RRC connection only if SRB2 and at least one DRB are setup, which includes the suspension of the established radio bearers.

5.3.8.2 Initiation

The network initiates the RRC connection release procedure to transit a UE in RRC_CONNECTED to RRC_IDLE; or to transit a UE in RRC_CONNECTED to RRC_INACTIVE only if SRB2 and at least one DRB is setup in RRC_CONNECTED; or to transit a UE in RRC_INACTIVE back to RRC_INACTIVE when the UE tries to resume; or to transit a UE in RRC_INACTIVE to RRC_IDLE when the UE tries to resume. The procedure can also be used to release and redirect a UE to another frequency.

5.3.8.3 Reception of the RRCRelease by the UE

The UE shall:

1> delay the following actions defined in this sub-clause 60 ms from the moment the RRCRelease message was received or optionally when lower layers indicate that the receipt of the RRCRelease message has been successfully acknowledged, whichever is earlier;

1> stop timer T380, if running;

1> stop timer T320, if running;

1> if the AS security is not activated:

2> ignore any field included in RRCRelease message except waitTime;

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with the release cause ‘other’ upon which the procedure ends;

1> if the RRCRelease message includes redirectedCarrierInfo indicating redirection to eutra:

2> if cnType is included:

3> after the cell selection, indicate the available CN Type(s) and the received cnType to upper layers;

NOTE 1: Handling the case if the E-UTRA cell selected after the redirection does not support the core network type specified by the cnType, is up to UE implementation.

1> if the RRCRelease message includes the cellReselectionPriorities:

2> store the cell reselection priority information provided by the cellReselectionPriorities;

2> if the t320 is included:

3> start timer T320, with the timer value set according to the value of t320;

1> else:

2> apply the cell reselection priority information broadcast in the system information;

1> if deprioritisationReq is included and the UE supports RRC connection release with deprioritisation:

2> start or restart timer T325 with the timer value set to the deprioritisationTimer signalled;

2> store the deprioritisationReq until T325 expiry;

NOTE 2: The UE stores the deprioritisation request irrespective of any cell reselection absolute priority assignments (by dedicated or common signalling) and regardless of RRC connections in NR or other RATs unless specified otherwise.

1> if the RRCRelease includes suspendConfig:

2> apply the received suspendConfig;

2> reset MAC and release the default MAC Cell Group configuration, if any;

2> re-establish RLC entities for SRB1;

2> if the RRCRelease message with suspendConfig was received in response to an RRCResumeRequest or an RRCResumeRequest1:

3> stop the timer T319 if running;

3> in the stored UE Inactive AS context:

4> replace the KgNB and KRRCint keys with the current KgNB and KRRCint keys;

4> replace the C-RNTI with the temporary C-RNTI in the cell the UE has received the RRCRelease message;

4> replace the cellIdentity with the cellIdentity of the cell the UE has received the RRCRelease message;

4> replace the physical cell identity with the physical cell identity of the cell the UE has received the RRCRelease message;

2> else:

3> store in the UE Inactive AS Context the current KgNB and KRRCint keys, the ROHC state, the stored QoS flow to DRB mapping rules, the C-RNTI used in the source PCell, the cellIdentity and the physical cell identity of the source PCell, and all other parameters configured except for the ones within ReconfigurationWithSync and servingCellConfigCommonSIB;

2> suspend all SRB(s) and DRB(s), except SRB0;

2> indicate PDCP suspend to lower layers of all DRBs;

2> if the t380 is included:

3> start timer T380, with the timer value set to t380;

2> if the RRCRelease message is including the waitTime:

3> start timer T302 with the value set to the waitTime;

3> inform upper layers that access barring is applicable for all access categories except categories ‘0’ and ‘2’;

2> if T390 is running:

3> stop timer T390 for all access categories;

3> perform the actions as specified in 5.3.14.4;

2> indicate the suspension of the RRC connection to upper layers;

2> enter RRC_INACTIVE and perform cell selection as specified in TS 38.304 [20];

1> else

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with the release cause ‘other’.

5.3.8.4 T320 expiry

The UE shall:

1> if T320 expires:

2> if stored, discard the cell reselection priority information provided by the cellReselectionPriorities or inherited from another RAT;

2> apply the cell reselection priority information broadcast in the system information.

5.3.8.5 UE actions upon the expiry of DataInactivityTimer

Upon receiving the expiry of DataInactivityTimer from lower layers while in RRC_CONNECTED, the UE shall:

1> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’.

5.3.9 RRC connection release requested by upper layers

5.3.9.1 General

The purpose of this procedure is to release the RRC connection. Access to the current PCell may be barred as a result of this procedure.

5.3.9.2 Initiation

The UE initiates the procedure when upper layers request the release of the RRC connection as specified in TS 24.501 [23]. The UE shall not initiate the procedure for power saving purposes.

The UE shall:

1> if the upper layers indicate barring of the PCell:

2> treat the PCell used prior to entering RRC_IDLE as barred according to TS 38.304 [20];

1> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘other’.

5.3.10 Radio link failure related actions

5.3.10.1 Detection of physical layer problems in RRC_CONNECTED

The UE shall:

1> upon receiving N310 consecutive "out-of-sync" indications for the SpCell from lower layers while neither T300, T301, T304, T311 nor T319 are running:

2> start timer T310 for the corresponding SpCell.

5.3.10.2 Recovery of physical layer problems

Upon receiving N311 consecutive "in-sync" indications for the SpCell from lower layers while T310 is running, the UE shall:

1> stop timer T310 for the corresponding SpCell.

NOTE 1: In this case, the UE maintains the RRC connection without explicit signalling, i.e. the UE maintains the entire radio resource configuration.

NOTE 2: Periods in time where neither "in-sync" nor "out-of-sync" is reported by L1 do not affect the evaluation of the number of consecutive "in-sync" or "out-of-sync" indications.

5.3.10.3 Detection of radio link failure

The UE shall:

1> upon T310 expiry in PCell; or

1> upon random access problem indication from MCG MAC while neither T300, T301, T304, T311 nor T319 are running; or

1> upon indication from MCG RLC that the maximum number of retransmissions has been reached:

2> if the indication is from MCG RLC and CA duplication is configured and activated, and for the corresponding logical channel allowedServingCells only includes SCell(s):

3> initiate the failure information procedure as specified in 5.7.5 to report RLC failure.

2> else:

3> consider radio link failure to be detected for the MCG, i.e. MCG RLF;

3> if AS security has not been activated:

4> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘other’;-

3> else if AS security has been activated but SRB2 and at least one DRB have not been setup:

4> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘RRC connection failure’;

3> else:

4> initiate the connection re-establishment procedure as specified in 5.3.7.

The UE shall:

1> upon T310 expiry in PSCell; or

1> upon random access problem indication from SCG MAC; or

1> upon indication from SCG RLC that the maximum number of retransmissions has been reached:

2> if the indication is from SCG RLC and CA duplication is configured and activated, and for the corresponding logical channel allowedServingCells only includes SCell(s):

3> initiate the failure information procedure as specified in 5.7.5 to report RLC failure.

2> else:

3> consider radio link failure to be detected for the SCG, i.e. SCG RLF;

3> initiate the SCG failure information procedure as specified in 5.7.3 to report SCG radio link failure.

5.3.11 UE actions upon going to RRC_IDLE

The UE shall:

1> reset MAC;

1> set the variable pendingRNA-Update to false, if that is set to true;

1> if going to RRC_IDLE was triggered by reception of the RRCRelease message including a waitTime:

2> if T302 is running:

3> stop timer T302;

2> start timer T302 with the value set to the waitTime;

2> inform upper layers that access barring is applicable for all access categories except categories ‘0’ and ‘2’.

1> else:

2> if T302 is running:

3> stop timer T302;

3> perform the actions as specified in 5.3.14.4;

1> if T390 is running:

2> stop timer T390 for all access categories;

2> perform the actions as specified in 5.3.14.4;

1> if the UE is leaving RRC_INACTIVE:

2> if going to RRC_IDLE was not triggered by reception of the RRCRelease message:

3> if stored, discard the cell reselection priority information provided by the cellReselectionPriorities;

3> stop the timer T320, if running;

1> stop all timers that are running except T302, T320 and T325;

1> discard the UE Inactive AS context, if any;

1> release the suspendConfig, if configured;

1> discard the KgNB key, the S-KgNB key, the S-KeNB key, the KRRCenc key, the KRRCint key, the KUPint key and the KUPenc key, if any;

1> release all radio resources, including release of the RLC entity, the MAC configuration and the associated PDCP entity and SDAP for all established RBs;

1> indicate the release of the RRC connection to upper layers together with the release cause;

1> except if going to RRC_IDLE was triggered by inter-RAT cell reselection while the UE is in RRC_INACTIVE or RRC_IDLE or when selecting an inter-RAT cell while T311 was running:

2> enter RRC_IDLE and perform cell selection as specified in TS 38.304 [20];

5.3.12 UE actions upon PUCCH/SRS release request

Upon receiving a PUCCH release request from lower layers, for all bandwidth parts of an indicated serving cell the UE shall:

1> release PUCCH-CSI-Resources configured in CSI-ReportConfig;

1> release SchedulingRequestResourceConfig instances configured in PUCCH-Config.

Upon receiving an SRS release request from lower layers, for all bandwidth parts of an indicated serving cell the UE shall:

1> release SRS-Resource instances configured in SRS-Config.

5.3.13 RRC connection resume

5.3.13.1 General

Figure 5.3.13.1-1: RRC connection resume, successful

Figure 5.3.13.1-2: RRC connection resume fallback to RRC connection establishment, successful

Figure 5.3.13.1-3: RRC connection resume followed by network release, successful

Figure 5.3.13.1-4: RRC connection resume followed by network suspend, successful

Figure 5.3.13.1-5: RRC connection resume, network reject

The purpose of this procedure is to resume a suspended RRC connection, including resuming SRB(s) and DRB(s) or perform an RNA update.

5.3.13.2 Initiation

The UE initiates the procedure when upper layers or AS (when responding to RAN paging or upon triggering RNA updates while the UE is in RRC_INACTIVE) requests the resume of a suspended RRC connection.

The UE shall ensure having valid and up to date essential system information as specified in clause 5.2.2.2 before initiating this procedure.

Upon initiation of the procedure, the UE shall:

1> if the resumption of the RRC connection is triggered by response to NG-RAN paging:

2> select ‘0’ as the Access Category;

2> perform the unified access control procedure as specified in 5.3.14 using the selected Access Category and one or more Access Identities provided by upper layers;

3> if the access attempt is barred, the procedure ends;

1> else if the resumption of the RRC connection is triggered by upper layers:

2> if the upper layers provide an Access Category and one or more Access Identities:

3> perform the unified access control procedure as specified in 5.3.14 using the Access Category and Access Identities provided by upper layers;

4> if the access attempt is barred, the procedure ends;

2> set the resumeCause in accordance with the information received from upper layers;

1> else if the resumption of the RRC connection is triggered due to an RNA update as specified in 5.3.13.8:

2> if an emergency service is ongoing:

NOTE: How the RRC layer in the UE is aware of an ongoing emergency service is up to UE implementation.

3> select ‘2’ as the Access Category;

3> set the resumeCause to emergency;

2> else:

3> select ‘8’ as the Access Category;

2> perform the unified access control procedure as specified in 5.3.14 using the selected Access Category and one or more Access Identities to be applied as specified in TS 24.501 [23];

3> if the access attempt is barred:

4> set the variable pendingRNA-Update to true;

4> the procedure ends;

1> if the UE is in NE-DC or NR-DC:

2> release the MR-DC related configurations (i.e., as specified in 5.3.5.10) from the UE Inactive AS context, if stored;

1> release the MCG SCell(s) from the UE Inactive AS context, if stored;

1> apply the default L1 parameter values as specified in corresponding physical layer specifications, except for the parameters for which values are provided in SIB1;

1> apply the default SRB1 configuration as specified in 9.2.1;

1> apply the default MAC Cell Group configuration as specified in 9.2.2;

1> release delayBudgetReportingConfig from the UE Inactive AS context, if stored;

1> stop timer T342, if running;

1> release overheatingAssistanceConfig from the UE Inactive AS context, if stored;

1> stop timer T345, if running;

1> apply the CCCH configuration as specified in 9.1.1.2;

1> apply the timeAlignmentTimerCommon included in SIB1;

1> start timer T319;

1> set the variable pendingRNA-Update to false;

1> initiate transmission of the RRCResumeRequest message or RRCResumeRequest1 in accordance with 5.3.13.3.

5.3.13.3 Actions related to transmission of RRCResumeRequest or RRCResumeRequest1 message

The UE shall set the contents of RRCResumeRequest or RRCResumeRequest1 message as follows:

1> if field useFullResumeID is signalled in SIB1:

2> select RRCResumeRequest1 as the message to use;

2> set the resumeIdentity to the stored fullI-RNTI value;

1> else:

2> select RRCResumeRequest as the message to use;

2> set the resumeIdentity to the stored shortI-RNTI value;

1> restore the RRC configuration, RoHC state, the stored QoS flow to DRB mapping rules and the KgNB and KRRCint keys from the stored UE Inactive AS context except the masterCellGroup and pdcp-Config;

1> set the resumeMAC-I to the 16 least significant bits of the MAC-I calculated:

2> over the ASN.1 encoded as per clause 8 (i.e., a multiple of 8 bits) VarResumeMAC-Input;

2> with the KRRCint key in the UE Inactive AS Context and the previously configured integrity protection algorithm; and

2> with all input bits for COUNT, BEARER and DIRECTION set to binary ones;

1> derive the KgNB key based on the current KgNB key or the NH, using the stored nextHopChainingCount value, as specified in TS 33.501 [11];

1> derive the KRRCenc key, the KRRCint key, the KUPint key and the KUPenc key;

1> configure lower layers to apply integrity protection for all radio bearers except SRB0 using the configured algorithm and the KRRCint key and KUPint key derived in this subclause immediately, i.e., integrity protection shall be applied to all subsequent messages received and sent by the UE;

NOTE 1: Only DRBs with previously configured UP integrity protection shall resume integrity protection.

1> configure lower layers to apply ciphering for all radio bearers except SRB0 and to apply the configured ciphering algorithm, the KRRCenc key and the KUPenc key derived in this subclause, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE;

1> re-establish PDCP entities for SRB1;

1> resume SRB1;

1> submit the selected message RRCResumeRequest or RRCResumeRequest1 for transmission to lower layers.

NOTE 2: Only DRBs with previously configured UP ciphering shall resume ciphering.

If lower layers indicate an integrity check failure while T319 is running, perform actions specified in 5.3.13.5.

The UE shall continue cell re-selection related measurements as well as cell re-selection evaluation. If the conditions for cell re-selection are fulfilled, the UE shall perform cell re-selection as specified in 5.3.13.6.

5.3.13.4 Reception of the RRCResume by the UE

The UE shall:

1> stop timer T319;

1> stop timer T380, if running;

1> if the RRCResume includes the fullConfig:

2> perform the full configuration procedure as specified in 5.3.5.11;

1> else:

2> restore the masterCellGroup and pdcp-Config from the UE Inactive AS context;

1> discard the UE Inactive AS context;

1> release the suspendConfig except the ran-NotificationAreaInfo;

1> if the RRCResume includes the masterCellGroup:

2> perform the cell group configuration for the received masterCellGroup according to 5.3.5.5;

1> if the RRCResume includes the radioBearerConfig:

2> perform the radio bearer configuration according to 5.3.5.6;

1> if the RRCResume message includes the sk-Counter:

2> perform security key update procedure as specified in 5.3.5.7;

1> if the RRCResume message includes the radioBearerConfig2:

2> perform the radio bearer configuration according to 5.3.5.6;

1> resume SRB2 and all DRBs;

1> if stored, discard the cell reselection priority information provided by the cellReselectionPriorities or inherited from another RAT;

1> stop timer T320, if running;

1> if the RRCResume message includes the measConfig:

2> perform the measurement configuration procedure as specified in 5.5.2;

1> resume measurements if suspended;

1> if T390 is running:

2> stop timer T390 for all access categories;

2> perform the actions as specified in 5.3.14.4;

1> if T302 is running:

2> stop timer T302;

2> perform the actions as specified in 5.3.14.4;

1> enter RRC_CONNECTED;

1> indicate to upper layers that the suspended RRC connection has been resumed;

1> stop the cell re-selection procedure;

1> consider the current cell to be the PCell;

1> set the content of the of RRCResumeComplete message as follows:

2> if the upper layer provides NAS PDU, set the dedicatedNAS-Message to include the information received from upper layers;

2> if the upper layer provides a PLMN, set the selectedPLMN-Identity to PLMN selected by upper layers (TS 24.501 [23]) from the PLMN(s) included in the plmn-IdentityInfoList in SIB1;

2> if the masterCellGroup contains the reportUplinkTxDirectCurrent:

3> include the uplinkTxDirectCurrentList for each MCG serving cell with UL;

3> include uplinkDirectCurrentBWP-SUL for each MCG serving cell configured with SUL carrier, if any, within the uplinkTxDirectCurrentList;

1> submit the RRCResumeComplete message to lower layers for transmission;

1> the procedure ends.

5.3.13.5 T319 expiry or Integrity check failure from lower layers while T319 is running

The UE shall:

1> if timer T319 expires or upon receiving Integrity check failure indication from lower layers while T319 is running:

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with release cause ‘RRC Resume failure’.

5.3.13.6 Cell re-selection or cell selection while T390, T319 or T302 is running (UE in RRC_INACTIVE)

The UE shall:

1> if cell reselection occurs while T319 or T302 is running:

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with release cause ‘RRC Resume failure’;

1> else if cell selection or reselection occurs while T390 is running:

2> stop T390 for all access categories;

2> perform the actions as specified in 5.3.14.4.

5.3.13.7 Reception of the RRCSetup by the UE

The UE shall:

1> perform the RRC connection setup procedure as specified in 5.3.3.4.

5.3.13.8 RNA update

In RRC_INACTIVE state, the UE shall:

1> if T380 expires; or

1> if RNA Update is triggered at reception of SIB1, as specified in 5.2.2.4.2:

2> initiate RRC connection resume procedure in 5.3.13.2 with resumeCause set to rna-Update;

1> if barring is alleviated for Access Category ‘8’, as specified in 5.3.14.4:

2> if upper layers do not request RRC the resumption of an RRC connection, and

2> if the variable pendingRNA-Update is set to true:

3> initiate RRC connection resume procedure in 5.3.13.2 with resumeCause value set to rna-Update.

If the UE in RRC_INACTIVE state fails to find a suitable cell and camps on the acceptable cell to obtain limited service as defined in TS 38.304 [20], the UE shall:

1> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with release cause ‘other’.

NOTE: It is left to UE implementation how to behave when T380 expires while the UE is camped neither on a suitable nor on an acceptable cell.

5.3.13.9 Reception of the RRCRelease by the UE

The UE shall:

1> perform the actions as specified in 5.3.8.

5.3.13.10 Reception of the RRCReject by the UE

The UE shall:

1> perform the actions as specified in 5.3.15.

5.3.13.11 Inability to comply with RRCResume

The UE shall:

1> if the UE is unable to comply with (part of) the configuration included in the RRCResume message;

2> perform the actions upon going to RRC_IDLE as specified in 5.3.11 with release cause ′RRC Resume failure′.

NOTE 1: The UE may apply above failure handling also in case the RRCResume message causes a protocol error for which the generic error handling as defined in 10 specifies that the UE shall ignore the message.

NOTE 2: If the UE is unable to comply with part of the configuration, it does not apply any part of the configuration, i.e. there is no partial success/failure.

5.3.13.12 Inter RAT cell reselection

Upon reselecting to an inter-RAT cell, the UE shall:

1> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause ‘other’.

5.3.14 Unified Access Control

5.3.14.1 General

The purpose of this procedure is to perform access barring check for an access attempt associated with a given Access Category and one or more Access Identities upon request from upper layers according to TS 24.501 [23] or the RRC layer.

After a PCell change in RRC_CONNECTED the UE shall defer access barring checks until it has obtained SIB1 (as specified in 5.2.2.2) from the target cell.

5.3.14.2 Initiation

Upon initiation of the procedure, the UE shall:

1> if timer T390 is running for the Access Category:

2> consider the access attempt as barred;

1> else if timer T302 is running and the Access Category is neither ‘2’ nor ‘0’:

2> consider the access attempt as barred;

1> else:

2> if the Access Category is ‘0’:

3> consider the access attempt as allowed;

2> else:

3> if SIB1 includes uac-BarringPerPLMN-List and the uac-BarringPerPLMN-List contains an UAC-BarringPerPLMN entry with the plmn-IdentityIndex corresponding to the PLMN selected by upper layers (see TS 24.501 [23]):

4> select the UAC-BarringPerPLMN entry with the plmn-IdentityIndex corresponding to the PLMN selected by upper layers;

4> in the remainder of this procedure, use the selected UAC-BarringPerPLMN entry (i.e. presence or absence of access barring parameters in this entry) irrespective of the uac-BarringForCommon included in SIB1;

3> else if SIB1 includes uac-BarringForCommon:

4> in the remainder of this procedure use the uac-BarringForCommon (i.e. presence or absence of these parameters) included in SIB1;

3> else:

4> consider the access attempt as allowed;

3> if uac-BarringForCommon is applicable or the uac-ACBarringListType indicates that uac-ExplicitACBarringList is used:

4> if the corresponding UAC-BarringPerCatList contains a UAC-BarringPerCat entry corresponding to the Access Category:

5> select the UAC-BarringPerCat entry;

5> if the uac-BarringInfoSetList contains a UAC-BarringInfoSet entry corresponding to the selected uac-barringInfoSetIndex in the UAC-BarringPerCat:

6> select the UAC-BarringInfoSet entry;

6> perform access barring check for the Access Category as specified in 5.3.14.5, using the selected UAC-BarringInfoSet as "UAC barring parameter";

5> else:

6> consider the access attempt as allowed;

4> else:

5> consider the access attempt as allowed;

3> else if the uac-ACBarringListType indicates that uac-ImplicitACBarringList is used:

4> select the uac-BarringInfoSetIndex corresponding to the Access Category in the uac-ImplicitACBarringList;

4> if the uac-BarringInfoSetList contains the UAC-BarringInfoSet entry corresponding to the selected uac-BarringInfoSetIndex:

5> select the UAC-BarringInfoSet entry;

5> perform access barring check for the Access Category as specified in 5.3.14.5, using the selected UAC-BarringInfoSet as "UAC barring parameter";

4> else:

5> consider the access attempt as allowed;

3> else:

4> consider the access attempt as allowed;

1> if the access barring check was requested by upper layers:

2> if the access attempt is considered as barred:

3> if timer T302 is running:

4> if timer T390 is running for Access Category ‘2’:

5> inform the upper layer that access barring is applicable for all access categories except categories ‘0’, upon which the procedure ends;

4> else

5> inform the upper layer that access barring is applicable for all access categories except categories ‘0’ and ‘2’, upon which the procedure ends;

3> else:

4> inform upper layers that the access attempt for the Access Category is barred, upon which the procedure ends;

2> else:

3> inform upper layers that the access attempt for the Access Category is allowed, upon which the procedure ends;

1> else:

2> the procedure ends.

5.3.14.3 Void

5.3.14.4 T302, T390 expiry or stop (Barring alleviation)

The UE shall:

1> if timer T302 expires or is stopped:

2> for each Access Category for which T390 is not running:

3> consider the barring for this Access Category to be alleviated:

1> else if timer T390 corresponding to an Access Category other than ‘2’ expires or is stopped, and if timer T302 is not running:

2> consider the barring for this Access Category to be alleviated;

1> else if timer T390 corresponding to the Access Category ‘2’ expires or is stopped:

2> consider the barring for this Access Category to be alleviated;

1> when barring for an Access Category is considered being alleviated:

2> if the Access Category was informed to upper layers as barred:

3> inform upper layers about barring alleviation for the Access Category.

2> if barring is alleviated for Access Category ‘8’:

3> perform actions specified in 5.3.13.8;

5.3.14.5 Access barring check

The UE shall:

1> if one or more Access Identities are indicated according to TS 24.501 [23], and

1> if for at least one of these Access Identities the corresponding bit in the uac-BarringForAccessIdentity contained in "UAC barring parameter" is set to zero:

2> consider the access attempt as allowed;

1> else:

2> draw a random number ‘rand‘ uniformly distributed in the range: 0 ≤ rand < 1;

2> if ‘rand‘ is lower than the value indicated by uac-BarringFactor included in "UAC barring parameter":

3> consider the access attempt as allowed;

2> else:

3> consider the access attempt as barred;

1> if the access attempt is considered as barred:

2> draw a random number ‘rand‘ that is uniformly distributed in the range 0 ≤ rand < 1;

2> start timer T390 for the Access Category with the timer value calculated as follows, using the uac-BarringTime included in "UAC barring parameter":

T390 = (0.7+ 0.6 * rand) * uac-BarringTime.

5.3.15 RRC connection reject

5.3.15.1 Initiation

The UE initiates the procedure upon the reception of RRCReject when the UE tries to establish or resume an RRC connection.

5.3.15.2 Reception of the RRCReject by the UE

The UE shall:

1> stop timer T300, if running;

1> stop timer T319, if running;

1> stop timer T302, if running;

1> reset MAC and release the default MAC Cell Group configuration;

1> if waitTime is configured in the RRCReject:

2> start timer T302, with the timer value set to the waitTime;

1> if RRCReject is received in response to a request from upper layers:

2> inform the upper layer that access barring is applicable for all access categories except categories ‘0’ and ‘2’;

1> if RRCReject is received in response to an RRCSetupRequest:

2> inform upper layers about the failure to setup the RRC connection, upon which the procedure ends;

1> else if RRCReject is received in response to an RRCResumeRequest or an RRCResumeRequest1:

2> if resume is triggered by upper layers:

3> inform upper layers about the failure to resume the RRC connection;

2> if resume is triggered due to an RNA update:

3> set the variable pendingRNA-Update to true;

2> discard the current KgNB key, the KRRCenc key, the KRRCint key, the KUPint key and the KUPenc key derived in accordance with 5.3.13.3;

2> suspend SRB1, upon which the procedure ends;

The RRC_INACTIVE UE shall continue to monitor paging while the timer T302 is running.