Section: 5.3.13.4 Reception of the RRCResume by the UE
Content: The UE shall: 1> stop timer T319, if running; 1> stop timer T319a, if running and consider SDT procedure is not ongoing; 1> stop timer T380, if running; 1> if T331 is running: 2> stop timer T331; 2> perform the actions as specified in 5.7.8.3; 1> if the RRCResume includes the fullConfig: 2> perform the full configuration procedure as specified in 5.3.5.11; 1> else: 2> if the RRCResume does not include the restoreMCG-SCells: 3> release the MCG SCell(s) from the UE Inactive AS context, if stored; 2> if the RRCResume does not include the restoreSCG: 3> release the MR-DC related configurations (i.e., as specified in 5.3.5.10) from the UE Inactive AS context, if stored; 2> restore the masterCellGroup, mrdc-SecondaryCellGroup, if stored, and pdcp-Config from the UE Inactive AS context; 2> configure lower layers to consider the restored MCG and SCG SCell(s) (if any) to be in deactivated state; 1> discard the UE Inactive AS context; 1> store the used nextHopChainingCount value associated to the current KgNB; 1> if sdt-MAC-PHY-CG-Config is configured: 2> instruct the MAC entity to stop the cg-SDT-TimeAlignmentTimer, if it is running; 2> instruct the MAC entity to start the timeAlignmentTimer associated with the PTAG, if it is not running; 1> if srs-PosRRC-Inactive is configured: 2> instruct the MAC entity to stop inactivePosSRS-TimeAlignmentTimer, if it is running; 1> if srs-PosRRC-InactiveValidityAreaConfig is configured: 2> instruct the MAC entity to stop inactivePosSRS-ValidityAreaTAT, if it is running; 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 mrdc-SecondaryCellGroup: 2> if the received mrdc-SecondaryCellGroup is set to nr-SCG: 3> perform the RRC reconfiguration according to 5.3.5.3 for the RRCReconfiguration message included in nr-SCG; 2> if the received mrdc-SecondaryCellGroup is set to eutra-SCG: 3> perform the RRC connection reconfiguration as specified in TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10], clause 5.3.5.3 for the RRCConnectionReconfiguration message included in eutra-SCG; 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> if the RRCResume message includes the needForGapsConfigNR: 2> if needForGapsConfigNR is set to setup: 3> consider itself to be configured to provide the measurement gap requirement information of NR target bands; 2> else: 3> consider itself not to be configured to provide the measurement gap requirement information of NR target bands; 1> if the RRCResume message includes the needForGapNCSG-ConfigNR: 2> if needForGapNCSG-ConfigNR is set to setup: 3> consider itself to be configured to provide the measurement gap and NCSG requirement information of NR target bands; 2> else: 3> consider itself not to be configured to provide the measurement gap and NCSG requirement information of NR target bands; 1> if the RRCResume message includes the needForGapNCSG-ConfigEUTRA: 2> if needForGapNCSG-ConfigEUTRA is set to setup: 3> consider itself to be configured to provide the measurement gap and NCSG requirement information of E-UTRA target bands; 2> else: 3> consider itself not to be configured to provide the measurement gap and NCSG requirement information of E-UTRA target bands; 1> if idleInactiveReportAllowed is not included in the RRCResume message: 2> for each application layer measurement configuration with configforRRC-IdleInactive set to true: 3> forward the measConfigAppLayerId and inform upper layers about the release of the application layer measurement configuration; 3> discard any application layer measurement reports which were not yet submitted to lower layers for transmission; 3> release the application layer measurement configuration in UE variables VarAppLayerIdleConfig and VarAppLayerPLMN-ListConfig; 3> consider itself not to be configured to send application layer measurement report for the measConfigAppLayerId; 1> if the RRCResume message includes the appLayerMeasConfig: 2> perform the application layer measurement configuration procedure as specified in 5.3.5.13d; 1> if the RRCResume message includes the sl-L2RemoteUE-Config (i.e. the UE is a L2 U2N Remote UE): 2> perform the L2 U2N Remote UE configuration procedure as specified in 5.3.5.16; 1> if the RRCResume message includes the sl-ConfigDedicatedNR: 2> perform the sidelink dedicated configuration procedure as specified in 5.3.5.14; 1> resume SRB2 (if suspended), SRB3 (if configured), SRB4 (if configured), all DRBs (that are suspended) and multicast MRBs (that are suspended); NOTE 1: If the SCG is deactivated, resuming SRB3 and all DRBs does not imply that PDCP or RRC PDUs can be transmitted or received on SCG RLC bearers. 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> stop relay reselection procedure if any for L2 U2N Remote UE; 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 upper layers provides a PLMN: 3> if the UE is either allowed or instructed to access the PLMN via a cell for which at least one CAG ID is broadcast: 4> set the selectedPLMN-Identity from the npn-IdentityInfoList; 3> else: 4> set the selectedPLMN-Identity to the PLMN selected by upper layers from the plmn-IdentityInfoList; 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; 2> if the masterCellGroup contains the reportUplinkTxDirectCurrentTwoCarrier: 3> include in the uplinkTxDirectCurrentTwoCarrierList the list of uplink Tx DC locations for the configured uplink carrier aggregation in the MCG; 2> if the masterCellGroup contains the reportUplinkTxDirectCurrentMoreCarrier: 3> include in the uplinkTxDirectCurrentMoreCarrierList the list of uplink Tx DC locations for the configured uplink carrier aggregation in the MCG; 2> if the UE has idle/inactive measurement information concerning cells other than the PCell available in VarMeasIdleReport: 3> if the idleModeMeasurementReq is included in the RRCResume message: 4> set the measResultIdleEUTRA in the RRCResumeComplete message to the value of measReportIdleEUTRA in the VarMeasIdleReport, if available; 4> set the measResultIdleNR in the RRCResumeComplete message to the value of measReportIdleNR in the VarMeasIdleReport, if available; 4> discard the VarMeasIdleReport upon successful delivery of the RRCResumeComplete message is confirmed by lower layers; 3> else: 4> if the SIB1 contains idleModeMeasurementsNR and the UE has NR idle/inactive measurement information concerning cells other than the PCell available in VarMeasIdleReport; or 4> if the SIB1 contains idleModeMeasurementsEUTRA and the UE has E-UTRA idle/inactive measurement information available in VarMeasIdleReport: 5> include the idleMeasAvailable; 2> if the RRCResume message includes mrdc-SecondaryCellGroup set to eutra-SCG: 3> include in the eutra-SCG-Response the E-UTRA RRCConnectionReconfigurationComplete message in accordance with TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10] clause 5.3.5.3; 2> if the RRCResume message includes mrdc-SecondaryCellGroup set to nr-SCG: 3> include in the nr-SCG-Response the SCG RRCReconfigurationComplete message; 2> if the UE has logged measurements available for NR and if the RPLMN is included in plmn-IdentityList stored in VarLogMeasReport; or 2> if the UE has logged measurements available for NR and if the current registered SNPN is included in snpn-ConfigIDList stored in VarLogMeasReport: 3> include the logMeasAvailable in the RRCResumeComplete message; 3> if Bluetooth measurement results are included in the logged measurements the UE has available for NR: 4> include the logMeasAvailableBT in the RRCResumeComplete message; 3> if WLAN measurement results are included in the logged measurements the UE has available for NR: 4> include the logMeasAvailableWLAN in the RRCResumeComplete message; 2> if the sigLoggedMeasType in VarLogMeasReport is included; or 2> if the UE is capable of reporting availability of signalling based logged MDT for inter-RAT (i.e. LTE to NR), and if the sigLoggedMeasType in VarLogMeasReport of TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10] is included: 3> if T330 timer is running (associated to the logged measurement configuration for NR or for LTE): 4> set sigLogMeasConfigAvailable to true in the RRCResumeComplete message; 3> else: 4> if the UE has logged measurements: 5> set sigLogMeasConfigAvailable to false in the RRCResumeComplete message; 2> if the UE has connection establishment failure or connection resume failure information available in VarConnEstFailReport or VarConnEstFailReportList and if the RPLMN is equal to plmn-Identity stored in VarConnEstFailReport or in at least one of the entries of VarConnEstFailReportList; or 2> if the UE has connection establishment failure information or connection resume failure information available in VarConnEstFailReport or VarConnEstFailReportList and if the registered SNPN identity is equal to snpn-identity stored in VarConnEstFailReport or any entry of VarConnEstFailReportList: 3> include connEstFailInfoAvailable in the RRCResumeComplete message; 2> if the UE has radio link failure or handover failure information available in VarRLF-Report and if the RPLMN is included in plmn-IdentityList stored in VarRLF-Report; or 2> if the UE has radio link failure or handover failure information available in VarRLF-Report of TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10] and if the UE is capable of cross-RAT RLF reporting and if the RPLMN is included in plmn-IdentityList stored in VarRLF-Report of TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10]; or 2> if the UE has radio link failure or handover failure information available in VarRLF-Report and if the current registered SNPN are included in snpn-IdentityList stored in VarRLF-Report; or 3> include rlf-InfoAvailable in the RRCResumeComplete message; 2> if the UE has successful PSCell change or addition related information available in VarSuccessPSCell-Report and if the RPLMN is included in plmn-IdentityList stored in VarSuccessPSCell-Report; or 2> if the UE has successful PSCell change or addition information available in VarSuccessPSCell-Report and if the current registered SNPN is included in snpn-IdentityList stored in the VarSuccessPSCell-Report: 3> include successPSCell-InfoAvailable in the RRCResumeComplete message; 2> if the UE has successful handover information available in VarSuccessHO-Report and if the RPLMN is included in plmn-IdentityList stored in VarSuccessHO-Report; or 2> if the UE has successful handover information available in VarSuccessHO-Report and if the current registered SNPN is included in snpn-IdentityList stored in the VarSuccessHO-Report: 3> include successHO-InfoAvailable in the RRCResumeComplete message; 2> if the UE supports storage of mobility history information and the UE has mobility history information available in VarMobilityHistoryReport: 3> include the mobilityHistoryAvail in the RRCResumeComplete message; 2> if speedStateReselectionPars is configured in the SIB2: 3> include the mobilityState in the RRCResumeComplete message and set it to the mobility state (as specified in TS 38.304[ NR; User Equipment (UE) procedures in Idle mode and in RRC Inactive state ]  [20]) of the UE just prior to entering RRC_CONNECTED state; 2> if the UE is configured with at least one application layer measurement with configForRRC-IdleInactive set to true: 3> for each application layer measurement configuration with configForRRC-IdleInactive set to true: 4> if the RPLMN is not included in plmn-IdentityList in VarAppLayerPLMN-ListConfig: 5> forward the measConfigAppLayerId and inform upper layers about the release of the application layer measurement configuration; 5> discard any application layer measurement reports which were not yet submitted to lower layers for transmission; 5> release the application layer measurement configuration in UE variables VarAppLayerIdleConfig and VarAppLayerPLMN-ListConfig; 5> consider itself not to be configured to send application layer measurement report for the measConfigAppLayerId; 3> if at least one stored application layer measurement configuration or application layer measurement report container has not been released: 4> include measConfigReportAppLayerAvailable in the RRCResumeComplete message; 2> if the UE is configured to provide the measurement gap requirement information of NR target bands: 3> include the NeedForGapsInfoNR and set the contents as follows: 4> include intraFreq-needForGap and set the gap requirement information of intra-frequency measurement for each NR serving cell; 4> if requestedTargetBandFilterNR is configured, for each supported NR band that is also included in requestedTargetBandFilterNR, include an entry in interFreq-needForGap and set the gap requirement information for that band; otherwise, include an entry in interFreq-needForGap and set the corresponding gap requirement information for each supported NR band; 3> if the needForInterruptionConfigNR is enabled: 4> include the needForInterruptionInfoNR and set the contents as follows: 5> include intraFreq-needForInterruption with the same number of entries, and listed in the same order, as in intraFreq-needForGap; 5> for each entry in intraFreq-needForInterruption, include interruptionIndication and set the interruption requirement information if the corresponding entry in intraFreq-needForGap is set to no-gap; 5> include interFreq-needForInterruption with the same number of entries, and listed in the same order, as in interFreq-needForGap; 5> for each entry in interFreq-needForInterruption, include interruptionIndication and set the interruption requirement information if the corresponding entry in interFreq-needForGap is set to no-gap; 2> if the UE is configured to provide the measurement gap and NCSG requirement information of NR target bands: 3> include the NeedForGapNCSG-InfoNR and set the contents as follows: 4> include intraFreq-needForNCSG and set the gap and NCSG requirement information of intra-frequency measurement for each NR serving cell; 4> if requestedTargetBandFilterNCSG-NR is configured: 5> for each supported NR band included in requestedTargetBandFilterNCSG-NR, include an entry in interFreq-needForNCSG and set the NCSG requirement information for that band; 4> else: 5> include an entry for each supported NR band in interFreq-needForNCSG and set the corresponding NCSG requirement information; 2> if the UE is configured to provide the measurement gap and NCSG requirement information of E-UTRA target bands: 3> include the NeedForGapNCSG-InfoEUTRA and set the contents as follows: 4> if requestedTargetBandFilterNCSG-EUTRA is configured: 5> for each supported E-UTRA band included in requestedTargetBandFilterNCSG-EUTRA, include an entry in needForNCSG-EUTRA and set the NCSG requirement information for that band; 4> else: 5> include an entry for each supported E-UTRA band in needForNCSG-EUTRA and set the corresponding NCSG requirement information; 2> if the SIB1 contains musim-CapRestrictionAllowed and the UE capability is restricted for MUSIM operation: 3> if supported, include the musim-CapRestrictionInd in the RRCResumeComplete message upon determining it has temporary capability restriction; 2> if the UE has flight path information available: 3> include flightPathInfoAvailable; 1> submit the RRCResumeComplete message to lower layers for transmission; 1> the procedure ends. NOTE 2: Network only configures at most one of reportUplinkTxDirectCurrent, reportUplinkTxDirectCurrentTwoCarrier or reportUplinkTxDirectCurrentMoreCarrier in one RRC message.