Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
216c4235
Commit
216c4235
authored
Nov 12, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary storage of SIBs structures at RRC
parent
086ac798
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
190 deletions
+153
-190
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+85
-123
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+22
-21
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+1
-1
openair2/RRC/NR_UE/rrc_timers_and_constants.c
openair2/RRC/NR_UE/rrc_timers_and_constants.c
+45
-45
No files found.
openair2/RRC/NR_UE/rrc_UE.c
View file @
216c4235
...
...
@@ -185,102 +185,61 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si)
LOG_I
(
NR_RRC
,
"Found SIB%d
\n
"
,
typeandinfo
->
present
+
1
);
switch
(
typeandinfo
->
present
)
{
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib2
:
if
(
!
SI_info
->
sib2
)
SI_info
->
sib2
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib2
));
memcpy
(
SI_info
->
sib2
,
typeandinfo
->
choice
.
sib2
,
sizeof
(
NR_SIB2_t
));
SI_info
->
sib2_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib2_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib3
:
if
(
!
SI_info
->
sib3
)
SI_info
->
sib3
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib3
));
memcpy
(
SI_info
->
sib3
,
typeandinfo
->
choice
.
sib3
,
sizeof
(
NR_SIB3_t
));
SI_info
->
sib3_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib3_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib4
:
if
(
!
SI_info
->
sib4
)
SI_info
->
sib4
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib4
));
memcpy
(
SI_info
->
sib4
,
typeandinfo
->
choice
.
sib4
,
sizeof
(
NR_SIB4_t
));
SI_info
->
sib4_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib4_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib5
:
if
(
!
SI_info
->
sib5
)
SI_info
->
sib5
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib5
));
memcpy
(
SI_info
->
sib5
,
typeandinfo
->
choice
.
sib5
,
sizeof
(
NR_SIB5_t
));
SI_info
->
sib5_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib5_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib6
:
if
(
!
SI_info
->
sib6
)
SI_info
->
sib6
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib6
));
memcpy
(
SI_info
->
sib6
,
typeandinfo
->
choice
.
sib6
,
sizeof
(
NR_SIB6_t
));
SI_info
->
sib6_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib6_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib7
:
if
(
!
SI_info
->
sib7
)
SI_info
->
sib7
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib7
));
memcpy
(
SI_info
->
sib7
,
typeandinfo
->
choice
.
sib7
,
sizeof
(
NR_SIB7_t
));
SI_info
->
sib7_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib7_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib8
:
if
(
!
SI_info
->
sib8
)
SI_info
->
sib8
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib8
));
memcpy
(
SI_info
->
sib8
,
typeandinfo
->
choice
.
sib8
,
sizeof
(
NR_SIB8_t
));
SI_info
->
sib8_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib8_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib9
:
if
(
!
SI_info
->
sib9
)
SI_info
->
sib9
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib9
));
memcpy
(
SI_info
->
sib9
,
typeandinfo
->
choice
.
sib9
,
sizeof
(
NR_SIB9_t
));
SI_info
->
sib9_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib9_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib10_v1610
:
if
(
!
SI_info
->
sib10
)
SI_info
->
sib10
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib10
));
memcpy
(
SI_info
->
sib10
,
typeandinfo
->
choice
.
sib10_v1610
,
sizeof
(
NR_SIB10_r16_t
));
SI_info
->
sib10_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib10_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib11_v1610
:
if
(
!
SI_info
->
sib11
)
SI_info
->
sib11
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib11
));
memcpy
(
SI_info
->
sib11
,
typeandinfo
->
choice
.
sib11_v1610
,
sizeof
(
NR_SIB11_r16_t
));
SI_info
->
sib11_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib11_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib12_v1610
:
if
(
!
SI_info
->
sib12
)
SI_info
->
sib12
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib12
));
memcpy
(
SI_info
->
sib12
,
typeandinfo
->
choice
.
sib12_v1610
,
sizeof
(
NR_SIB12_r16_t
));
SI_info
->
sib12_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib12_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib13_v1610
:
if
(
!
SI_info
->
sib13
)
SI_info
->
sib13
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib13
));
memcpy
(
SI_info
->
sib13
,
typeandinfo
->
choice
.
sib13_v1610
,
sizeof
(
NR_SIB13_r16_t
));
SI_info
->
sib13_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib13_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib14_v1610
:
if
(
!
SI_info
->
sib14
)
SI_info
->
sib14
=
calloc
(
1
,
sizeof
(
*
SI_info
->
sib14
));
memcpy
(
SI_info
->
sib12
,
typeandinfo
->
choice
.
sib14_v1610
,
sizeof
(
NR_SIB14_r16_t
));
SI_info
->
sib14_validity
=
true
;
nr_timer_start
(
&
SI_info
->
sib14_timer
);
break
;
case
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib19_v1700
:
if
(
!
SI_info
->
SInfo_r17
.
sib19
)
SI_info
->
SInfo_r17
.
sib19
=
calloc
(
1
,
sizeof
(
*
SI_info
->
SInfo_r17
.
sib19
));
asn_copy
(
&
asn_DEF_NR_SIB19_r17
,
(
void
**
)
&
SI_info
->
SInfo_r17
.
sib19
,
typeandinfo
->
choice
.
sib19_v1700
);
SI_info
->
SInfo_r17
.
sib19_validity
=
true
;
if
(
g_log
->
log_component
[
NR_RRC
].
level
>=
OAILOG_DEBUG
)
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB19_r17
,
(
const
void
*
)
SI_info
->
SInfo_r17
.
sib19
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB19_r17
,
(
const
void
*
)
typeandinfo
->
choice
.
sib19_v1700
);
nr_timer_start
(
&
SI_info
->
SInfo_r17
.
sib19_timer
);
break
;
default:
...
...
@@ -311,17 +270,10 @@ static void nr_rrc_ue_prepare_RRCSetupRequest(NR_UE_RRC_INST_t *rrc)
nr_rlc_srb_recv_sdu
(
rrc
->
ue_id
,
0
,
buf
,
len
);
}
static
void
nr_rrc_configure_default_SI
(
NR_UE_RRC_SI_INFO
*
SI_info
,
NR_SIB1_t
*
sib1
)
static
void
nr_rrc_configure_default_SI
(
NR_UE_RRC_SI_INFO
*
SI_info
,
struct
NR_SI_SchedulingInfo
*
si_SchedulingInfo
,
struct
NR_SI_SchedulingInfo_v1700
*
si_SchedulingInfo_v1700
)
{
struct
NR_SI_SchedulingInfo
*
si_SchedulingInfo
=
sib1
->
si_SchedulingInfo
;
struct
NR_SI_SchedulingInfo_v1700
*
si_SchedulingInfo_v1700
=
NULL
;
if
(
sib1
->
nonCriticalExtension
&&
sib1
->
nonCriticalExtension
->
nonCriticalExtension
&&
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
&&
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
->
si_SchedulingInfo_v1700
)
{
si_SchedulingInfo_v1700
=
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
->
si_SchedulingInfo_v1700
;
}
if
(
si_SchedulingInfo
)
{
SI_info
->
default_otherSI_map
=
0
;
for
(
int
i
=
0
;
i
<
si_SchedulingInfo
->
schedulingInfoList
.
list
.
count
;
i
++
)
{
...
...
@@ -347,30 +299,34 @@ static void nr_rrc_configure_default_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SIB1_t *s
}
}
static
void
nr_rrc_process_sib1
(
NR_UE_RRC_INST_t
*
rrc
,
NR_UE_RRC_SI_INFO
*
SI_info
,
NR_SIB1_t
*
s
ystemInformationBlockType
1
)
static
void
nr_rrc_process_sib1
(
NR_UE_RRC_INST_t
*
rrc
,
NR_UE_RRC_SI_INFO
*
SI_info
,
NR_SIB1_t
*
s
ib
1
)
{
UPDATE_IE
(
SI_info
->
sib1
,
systemInformationBlockType1
,
NR_SIB1_t
);
if
(
g_log
->
log_component
[
NR_RRC
].
level
>=
OAILOG_DEBUG
)
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,
(
const
void
*
)
SI_info
->
sib1
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,
(
const
void
*
)
sib1
);
LOG_A
(
NR_RRC
,
"SIB1 decoded
\n
"
);
nr_timer_start
(
&
SI_info
->
sib1_timer
);
SI_info
->
sib1_validity
=
true
;
if
(
rrc
->
nrRrcState
==
RRC_STATE_IDLE_NR
)
{
rrc
->
ra_trigger
=
RRC_CONNECTION_SETUP
;
// preparing RRC setup request payload in advance
nr_rrc_ue_prepare_RRCSetupRequest
(
rrc
);
}
// configure default SI
nr_rrc_configure_default_SI
(
SI_info
,
SI_info
->
sib1
);
// configure timers and constant
nr_rrc_set_sib1_timers_and_constants
(
&
rrc
->
timers_and_constants
,
SI_info
->
sib1
);
NR_SI_SchedulingInfo_v1700_t
*
si_SchedulingInfo_v1700
=
NULL
;
if
(
SI_info
->
sib1
->
nonCriticalExtension
&&
SI_info
->
sib1
->
nonCriticalExtension
->
nonCriticalExtension
&&
SI_info
->
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
)
{
si_SchedulingInfo_v1700
=
SI_info
->
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
->
si_SchedulingInfo_v1700
;
NR_SI_SchedulingInfo_v1700_t
*
si_SchedInfo_v1700
=
NULL
;
if
(
sib1
->
nonCriticalExtension
&&
sib1
->
nonCriticalExtension
->
nonCriticalExtension
&&
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
)
{
si_SchedInfo_v1700
=
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
->
si_SchedulingInfo_v1700
;
}
nr_rrc_mac_config_req_sib1
(
rrc
->
ue_id
,
0
,
SI_info
->
sib1
->
si_SchedulingInfo
,
si_SchedulingInfo_v1700
,
SI_info
->
sib1
->
servingCellConfigCommon
);
// configure default SI
nr_rrc_configure_default_SI
(
SI_info
,
sib1
->
si_SchedulingInfo
,
si_SchedInfo_v1700
);
// configure timers and constant
nr_rrc_set_sib1_timers_and_constants
(
&
rrc
->
timers_and_constants
,
sib1
);
// RRC storage of SIB1 timers and constants (eg needed in re-establishment)
UPDATE_IE
(
rrc
->
timers_and_constants
.
sib1_TimersAndConstants
,
sib1
->
ue_TimersAndConstants
,
NR_UE_TimersAndConstants_t
);
nr_rrc_mac_config_req_sib1
(
rrc
->
ue_id
,
0
,
sib1
->
si_SchedulingInfo
,
si_SchedInfo_v1700
,
sib1
->
servingCellConfigCommon
);
}
static
void
nr_rrc_process_reconfiguration_v1530
(
NR_UE_RRC_INST_t
*
rrc
,
NR_RRCReconfiguration_v1530_IEs_t
*
rec_1530
,
int
gNB_index
)
...
...
@@ -655,55 +611,55 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type)
{
switch
(
si_type
)
{
case
NR_SIB_TypeInfo__type_sibType2
:
if
(
!
SI_info
->
sib2
)
if
(
!
SI_info
->
sib2
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType3
:
if
(
!
SI_info
->
sib3
)
if
(
!
SI_info
->
sib3
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType4
:
if
(
!
SI_info
->
sib4
)
if
(
!
SI_info
->
sib4
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType5
:
if
(
!
SI_info
->
sib5
)
if
(
!
SI_info
->
sib5
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType6
:
if
(
!
SI_info
->
sib6
)
if
(
!
SI_info
->
sib6
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType7
:
if
(
!
SI_info
->
sib7
)
if
(
!
SI_info
->
sib7
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType8
:
if
(
!
SI_info
->
sib8
)
if
(
!
SI_info
->
sib8
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType9
:
if
(
!
SI_info
->
sib9
)
if
(
!
SI_info
->
sib9
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType10_v1610
:
if
(
!
SI_info
->
sib10
)
if
(
!
SI_info
->
sib10
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType11_v1610
:
if
(
!
SI_info
->
sib11
)
if
(
!
SI_info
->
sib11
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType12_v1610
:
if
(
!
SI_info
->
sib12
)
if
(
!
SI_info
->
sib12
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType13_v1610
:
if
(
!
SI_info
->
sib13
)
if
(
!
SI_info
->
sib13
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo__type_sibType14_v1610
:
if
(
!
SI_info
->
sib14
)
if
(
!
SI_info
->
sib14
_validity
)
return
false
;
break
;
default
:
...
...
@@ -716,31 +672,31 @@ bool check_si_validity_r17(NR_UE_RRC_SI_INFO_r17 *SI_info, int si_type)
{
switch
(
si_type
)
{
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType15
:
if
(
!
SI_info
->
sib15
)
if
(
!
SI_info
->
sib15
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType16
:
if
(
!
SI_info
->
sib16
)
if
(
!
SI_info
->
sib16
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType17
:
if
(
!
SI_info
->
sib17
)
if
(
!
SI_info
->
sib17
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType18
:
if
(
!
SI_info
->
sib18
)
if
(
!
SI_info
->
sib18
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19
:
if
(
!
SI_info
->
sib19
)
if
(
!
SI_info
->
sib19
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType20
:
if
(
!
SI_info
->
sib20
)
if
(
!
SI_info
->
sib20
_validity
)
return
false
;
break
;
case
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType21
:
if
(
!
SI_info
->
sib21
)
if
(
!
SI_info
->
sib21
_validity
)
return
false
;
break
;
default
:
...
...
@@ -752,10 +708,10 @@ bool check_si_validity_r17(NR_UE_RRC_SI_INFO_r17 *SI_info, int si_type)
int
check_si_status
(
NR_UE_RRC_SI_INFO
*
SI_info
)
{
// schedule reception of SIB1 if RRC doesn't have it
if
(
!
SI_info
->
sib1
)
if
(
!
SI_info
->
sib1
_validity
)
return
1
;
else
{
if
(
SI_info
->
sib1
->
si_SchedulingInfo
)
{
if
(
SI_info
->
default_otherSI_map
)
{
// Check if RRC has configured default SI
// from SIB2 to SIB14 as current ASN1 version
// TODO can be used for on demand SI when (if) implemented
...
...
@@ -2124,18 +2080,15 @@ static void nr_rrc_ue_process_ueCapabilityEnquiry(NR_UE_RRC_INST_t *rrc, NR_UECa
ASN_STRUCT_RESET
(
asn_DEF_NR_UL_DCCH_Message
,
&
ul_dcch_msg
);
}
void
nr_rrc_initiate_rrcReestablishment
(
NR_UE_RRC_INST_t
*
rrc
,
NR_ReestablishmentCause_t
cause
,
const
int
gnb_id
)
static
void
nr_rrc_initiate_rrcReestablishment
(
NR_UE_RRC_INST_t
*
rrc
,
NR_ReestablishmentCause_t
cause
)
{
rrc
->
reestablishment_cause
=
cause
;
NR_UE_Timers_Constants_t
*
timers
=
&
rrc
->
timers_and_constants
;
rrcPerNB_t
*
rrcNB
=
rrc
->
perNB
+
gnb_id
;
// reset timers to SIB1 as part of release of spCellConfig
// it needs to be done before handling timers
set_rlf_sib1_timers_and_constants
(
timers
,
rrc
NB
->
SInfo
.
sib1
);
set_rlf_sib1_timers_and_constants
(
timers
,
rrc
->
timers_and_constants
.
sib1_TimersAndConstants
);
// stop timer T310, if running
nr_timer_stop
(
&
timers
->
T310
);
...
...
@@ -2404,7 +2357,7 @@ void handle_rlf_detection(NR_UE_RRC_INST_t *rrc)
}
if
(
rrc
->
as_security_activated
&&
srb2
&&
any_drb
)
// initiate the connection re-establishment procedure
nr_rrc_initiate_rrcReestablishment
(
rrc
,
NR_ReestablishmentCause_otherFailure
,
0
);
nr_rrc_initiate_rrcReestablishment
(
rrc
,
NR_ReestablishmentCause_otherFailure
);
else
{
NR_Release_Cause_t
cause
=
rrc
->
as_security_activated
?
RRC_CONNECTION_FAILURE
:
OTHER
;
nr_rrc_going_to_IDLE
(
rrc
,
cause
,
NULL
);
...
...
@@ -2499,24 +2452,33 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
rrcPerNB_t
*
nb
=
&
rrc
->
perNB
[
i
];
NR_UE_RRC_SI_INFO
*
SI_info
=
&
nb
->
SInfo
;
init_SI_timers
(
SI_info
);
asn1cFreeStruc
(
asn_DEF_NR_SIB1
,
SI_info
->
sib1
);
asn1cFreeStruc
(
asn_DEF_NR_SIB2
,
SI_info
->
sib2
);
asn1cFreeStruc
(
asn_DEF_NR_SIB3
,
SI_info
->
sib3
);
asn1cFreeStruc
(
asn_DEF_NR_SIB4
,
SI_info
->
sib4
);
asn1cFreeStruc
(
asn_DEF_NR_SIB5
,
SI_info
->
sib5
);
asn1cFreeStruc
(
asn_DEF_NR_SIB6
,
SI_info
->
sib6
);
asn1cFreeStruc
(
asn_DEF_NR_SIB7
,
SI_info
->
sib7
);
asn1cFreeStruc
(
asn_DEF_NR_SIB8
,
SI_info
->
sib8
);
asn1cFreeStruc
(
asn_DEF_NR_SIB9
,
SI_info
->
sib9
);
asn1cFreeStruc
(
asn_DEF_NR_SIB10_r16
,
SI_info
->
sib10
);
asn1cFreeStruc
(
asn_DEF_NR_SIB11_r16
,
SI_info
->
sib11
);
asn1cFreeStruc
(
asn_DEF_NR_SIB12_r16
,
SI_info
->
sib12
);
asn1cFreeStruc
(
asn_DEF_NR_SIB13_r16
,
SI_info
->
sib13
);
asn1cFreeStruc
(
asn_DEF_NR_SIB14_r16
,
SI_info
->
sib14
);
}
if
(
rrc
->
nrRrcState
==
RRC_STATE_DETACH_NR
)
SI_info
->
sib1_validity
=
false
;
SI_info
->
sib2_validity
=
false
;
SI_info
->
sib3_validity
=
false
;
SI_info
->
sib4_validity
=
false
;
SI_info
->
sib5_validity
=
false
;
SI_info
->
sib6_validity
=
false
;
SI_info
->
sib7_validity
=
false
;
SI_info
->
sib8_validity
=
false
;
SI_info
->
sib9_validity
=
false
;
SI_info
->
sib10_validity
=
false
;
SI_info
->
sib11_validity
=
false
;
SI_info
->
sib12_validity
=
false
;
SI_info
->
sib13_validity
=
false
;
SI_info
->
sib14_validity
=
false
;
SI_info
->
SInfo_r17
.
sib15_validity
=
false
;
SI_info
->
SInfo_r17
.
sib16_validity
=
false
;
SI_info
->
SInfo_r17
.
sib17_validity
=
false
;
SI_info
->
SInfo_r17
.
sib18_validity
=
false
;
SI_info
->
SInfo_r17
.
sib19_validity
=
false
;
SI_info
->
SInfo_r17
.
sib20_validity
=
false
;
SI_info
->
SInfo_r17
.
sib21_validity
=
false
;
}
if
(
rrc
->
nrRrcState
==
RRC_STATE_DETACH_NR
)
{
asn1cFreeStruc
(
asn_DEF_NR_UE_NR_Capability
,
rrc
->
UECap
.
UE_NR_Capability
);
asn1cFreeStruc
(
asn_DEF_NR_UE_TimersAndConstants
,
tac
->
sib1_TimersAndConstants
);
}
// reset MAC
NR_UE_MAC_reset_cause_t
cause
=
(
rrc
->
nrRrcState
==
RRC_STATE_DETACH_NR
)
?
DETACH
:
GO_TO_IDLE
;
...
...
openair2/RRC/NR_UE/rrc_defs.h
View file @
216c4235
...
...
@@ -106,51 +106,51 @@ typedef enum RA_trigger_e {
typedef
struct
UE_RRC_SI_INFO_NR_r17_s
{
uint32_t
default_otherSI_map_r17
;
NR_SIB15_r17_t
*
sib15
;
bool
sib15_validity
;
NR_timer_t
sib15_timer
;
NR_SIB16_r17_t
*
sib16
;
bool
sib16_validity
;
NR_timer_t
sib16_timer
;
NR_SIB17_r17_t
*
sib17
;
bool
sib17_validity
;
NR_timer_t
sib17_timer
;
NR_SIB18_r17_t
*
sib18
;
bool
sib18_validity
;
NR_timer_t
sib18_timer
;
NR_SIB19_r17_t
*
sib19
;
bool
sib19_validity
;
NR_timer_t
sib19_timer
;
NR_SIB20_r17_t
*
sib20
;
bool
sib20_validity
;
NR_timer_t
sib20_timer
;
NR_SIB21_r17_t
*
sib21
;
bool
sib21_validity
;
NR_timer_t
sib21_timer
;
}
NR_UE_RRC_SI_INFO_r17
;
typedef
struct
UE_RRC_SI_INFO_NR_s
{
uint32_t
default_otherSI_map
;
NR_SIB1_t
*
sib1
;
bool
sib1_validity
;
NR_timer_t
sib1_timer
;
NR_SIB2_t
*
sib2
;
bool
sib2_validity
;
NR_timer_t
sib2_timer
;
NR_SIB3_t
*
sib3
;
bool
sib3_validity
;
NR_timer_t
sib3_timer
;
NR_SIB4_t
*
sib4
;
bool
sib4_validity
;
NR_timer_t
sib4_timer
;
NR_SIB5_t
*
sib5
;
bool
sib5_validity
;
NR_timer_t
sib5_timer
;
NR_SIB6_t
*
sib6
;
bool
sib6_validity
;
NR_timer_t
sib6_timer
;
NR_SIB7_t
*
sib7
;
bool
sib7_validity
;
NR_timer_t
sib7_timer
;
NR_SIB8_t
*
sib8
;
bool
sib8_validity
;
NR_timer_t
sib8_timer
;
NR_SIB9_t
*
sib9
;
bool
sib9_validity
;
NR_timer_t
sib9_timer
;
NR_SIB10_r16_t
*
sib10
;
bool
sib10_validity
;
NR_timer_t
sib10_timer
;
NR_SIB11_r16_t
*
sib11
;
bool
sib11_validity
;
NR_timer_t
sib11_timer
;
NR_SIB12_r16_t
*
sib12
;
bool
sib12_validity
;
NR_timer_t
sib12_timer
;
NR_SIB13_r16_t
*
sib13
;
bool
sib13_validity
;
NR_timer_t
sib13_timer
;
NR_SIB14_r16_t
*
sib14
;
bool
sib14_validity
;
NR_timer_t
sib14_timer
;
NR_UE_RRC_SI_INFO_r17
SInfo_r17
;
}
NR_UE_RRC_SI_INFO
;
...
...
@@ -175,6 +175,7 @@ typedef struct NR_UE_Timers_Constants_s {
// constants (limits configured by the network)
uint32_t
N310_k
;
uint32_t
N311_k
;
NR_UE_TimersAndConstants_t
*
sib1_TimersAndConstants
;
}
NR_UE_Timers_Constants_t
;
typedef
enum
{
...
...
openair2/RRC/NR_UE/rrc_proto.h
View file @
216c4235
...
...
@@ -55,7 +55,7 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
void
handle_RRCRelease
(
NR_UE_RRC_INST_t
*
rrc
);
void
set_rlf_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_
SIB1_t
*
sib1
);
void
set_rlf_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_
UE_TimersAndConstants_t
*
ue_TimersAndConstants
);
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
...
...
openair2/RRC/NR_UE/rrc_timers_and_constants.c
View file @
216c4235
...
...
@@ -45,80 +45,80 @@ void init_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
void
nr_rrc_SI_timers
(
NR_UE_RRC_SI_INFO
*
SInfo
)
{
if
(
SInfo
->
sib1
)
{
if
(
SInfo
->
sib1
_validity
)
{
bool
sib1_expired
=
nr_timer_tick
(
&
SInfo
->
sib1_timer
);
if
(
sib1_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB1
,
SInfo
->
sib1
)
;
SInfo
->
sib1_validity
=
false
;
}
if
(
SInfo
->
sib2
)
{
if
(
SInfo
->
sib2
_validity
)
{
bool
sib2_expired
=
nr_timer_tick
(
&
SInfo
->
sib2_timer
);
if
(
sib2_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB2
,
SInfo
->
sib2
)
;
SInfo
->
sib2_validity
=
false
;
}
if
(
SInfo
->
sib3
)
{
if
(
SInfo
->
sib3
_validity
)
{
bool
sib3_expired
=
nr_timer_tick
(
&
SInfo
->
sib3_timer
);
if
(
sib3_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB3
,
SInfo
->
sib3
)
;
SInfo
->
sib3_validity
=
false
;
}
if
(
SInfo
->
sib4
)
{
if
(
SInfo
->
sib4
_validity
)
{
bool
sib4_expired
=
nr_timer_tick
(
&
SInfo
->
sib4_timer
);
if
(
sib4_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB4
,
SInfo
->
sib4
)
;
SInfo
->
sib4_validity
=
false
;
}
if
(
SInfo
->
sib5
)
{
if
(
SInfo
->
sib5
_validity
)
{
bool
sib5_expired
=
nr_timer_tick
(
&
SInfo
->
sib5_timer
);
if
(
sib5_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB5
,
SInfo
->
sib5
)
;
SInfo
->
sib5_validity
=
false
;
}
if
(
SInfo
->
sib6
)
{
if
(
SInfo
->
sib6
_validity
)
{
bool
sib6_expired
=
nr_timer_tick
(
&
SInfo
->
sib6_timer
);
if
(
sib6_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB6
,
SInfo
->
sib6
)
;
SInfo
->
sib6_validity
=
false
;
}
if
(
SInfo
->
sib7
)
{
if
(
SInfo
->
sib7
_validity
)
{
bool
sib7_expired
=
nr_timer_tick
(
&
SInfo
->
sib7_timer
);
if
(
sib7_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB7
,
SInfo
->
sib7
)
;
SInfo
->
sib7_validity
=
false
;
}
if
(
SInfo
->
sib8
)
{
if
(
SInfo
->
sib8
_validity
)
{
bool
sib8_expired
=
nr_timer_tick
(
&
SInfo
->
sib8_timer
);
if
(
sib8_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB8
,
SInfo
->
sib8
)
;
SInfo
->
sib8_validity
=
false
;
}
if
(
SInfo
->
sib9
)
{
if
(
SInfo
->
sib9
_validity
)
{
bool
sib9_expired
=
nr_timer_tick
(
&
SInfo
->
sib9_timer
);
if
(
sib9_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB9
,
SInfo
->
sib9
)
;
SInfo
->
sib9_validity
=
false
;
}
if
(
SInfo
->
sib10
)
{
if
(
SInfo
->
sib10
_validity
)
{
bool
sib10_expired
=
nr_timer_tick
(
&
SInfo
->
sib10_timer
);
if
(
sib10_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB10_r16
,
SInfo
->
sib10
)
;
SInfo
->
sib10_validity
=
false
;
}
if
(
SInfo
->
sib11
)
{
if
(
SInfo
->
sib11
_validity
)
{
bool
sib11_expired
=
nr_timer_tick
(
&
SInfo
->
sib11_timer
);
if
(
sib11_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB11_r16
,
SInfo
->
sib11
)
;
SInfo
->
sib11_validity
=
false
;
}
if
(
SInfo
->
sib12
)
{
if
(
SInfo
->
sib12
_validity
)
{
bool
sib12_expired
=
nr_timer_tick
(
&
SInfo
->
sib12_timer
);
if
(
sib12_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB12_r16
,
SInfo
->
sib12
)
;
SInfo
->
sib12_validity
=
false
;
}
if
(
SInfo
->
sib13
)
{
if
(
SInfo
->
sib13
_validity
)
{
bool
sib13_expired
=
nr_timer_tick
(
&
SInfo
->
sib13_timer
);
if
(
sib13_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB13_r16
,
SInfo
->
sib13
)
;
SInfo
->
sib13_validity
=
false
;
}
if
(
SInfo
->
sib14
)
{
if
(
SInfo
->
sib14
_validity
)
{
bool
sib14_expired
=
nr_timer_tick
(
&
SInfo
->
sib14_timer
);
if
(
sib14_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB14_r16
,
SInfo
->
sib14
)
;
SInfo
->
sib14_validity
=
false
;
}
if
(
SInfo
->
SInfo_r17
.
sib19
)
{
if
(
SInfo
->
SInfo_r17
.
sib19
_validity
)
{
bool
sib19_expired
=
nr_timer_tick
(
&
SInfo
->
SInfo_r17
.
sib19_timer
);
if
(
sib19_expired
)
asn1cFreeStruc
(
asn_DEF_NR_SIB19_r17
,
SInfo
->
SInfo_r17
.
sib19
)
;
SInfo
->
SInfo_r17
.
sib19_validity
=
false
;
}
}
...
...
@@ -205,11 +205,11 @@ int nr_rrc_get_T304(long t304)
return
target
;
}
void
set_rlf_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_
SIB1_t
*
sib1
)
void
set_rlf_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_
UE_TimersAndConstants_t
*
ue_TimersAndConstants
)
{
if
(
sib1
&&
sib1
->
ue_TimersAndConstants
)
{
if
(
ue_TimersAndConstants
)
{
int
k
=
0
;
switch
(
sib1
->
ue_TimersAndConstants
->
t301
)
{
switch
(
ue_TimersAndConstants
->
t301
)
{
case
NR_UE_TimersAndConstants__t301_ms100
:
k
=
100
;
break
;
...
...
@@ -235,10 +235,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k
=
2000
;
break
;
default
:
AssertFatal
(
false
,
"Invalid T301 %ld
\n
"
,
sib1
->
ue_TimersAndConstants
->
t301
);
AssertFatal
(
false
,
"Invalid T301 %ld
\n
"
,
ue_TimersAndConstants
->
t301
);
}
nr_timer_setup
(
&
tac
->
T301
,
k
,
10
);
// 10ms step
switch
(
sib1
->
ue_TimersAndConstants
->
t310
)
{
switch
(
ue_TimersAndConstants
->
t310
)
{
case
NR_UE_TimersAndConstants__t310_ms0
:
k
=
0
;
break
;
...
...
@@ -261,10 +261,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k
=
2000
;
break
;
default
:
AssertFatal
(
false
,
"Invalid T310 %ld
\n
"
,
sib1
->
ue_TimersAndConstants
->
t310
);
AssertFatal
(
false
,
"Invalid T310 %ld
\n
"
,
ue_TimersAndConstants
->
t310
);
}
nr_timer_setup
(
&
tac
->
T310
,
k
,
10
);
// 10ms step
switch
(
sib1
->
ue_TimersAndConstants
->
t311
)
{
switch
(
ue_TimersAndConstants
->
t311
)
{
case
NR_UE_TimersAndConstants__t311_ms1000
:
k
=
1000
;
break
;
...
...
@@ -287,10 +287,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k
=
30000
;
break
;
default
:
AssertFatal
(
false
,
"Invalid T311 %ld
\n
"
,
sib1
->
ue_TimersAndConstants
->
t311
);
AssertFatal
(
false
,
"Invalid T311 %ld
\n
"
,
ue_TimersAndConstants
->
t311
);
}
nr_timer_setup
(
&
tac
->
T311
,
k
,
10
);
// 10ms step
switch
(
sib1
->
ue_TimersAndConstants
->
n310
)
{
switch
(
ue_TimersAndConstants
->
n310
)
{
case
NR_UE_TimersAndConstants__n310_n1
:
tac
->
N310_k
=
1
;
break
;
...
...
@@ -316,9 +316,9 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
tac
->
N310_k
=
20
;
break
;
default
:
AssertFatal
(
false
,
"Invalid N310 %ld
\n
"
,
sib1
->
ue_TimersAndConstants
->
n310
);
AssertFatal
(
false
,
"Invalid N310 %ld
\n
"
,
ue_TimersAndConstants
->
n310
);
}
switch
(
sib1
->
ue_TimersAndConstants
->
n311
)
{
switch
(
ue_TimersAndConstants
->
n311
)
{
case
NR_UE_TimersAndConstants__n311_n1
:
tac
->
N311_k
=
1
;
break
;
...
...
@@ -344,16 +344,16 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
tac
->
N311_k
=
10
;
break
;
default
:
AssertFatal
(
false
,
"Invalid N311 %ld
\n
"
,
sib1
->
ue_TimersAndConstants
->
n311
);
AssertFatal
(
false
,
"Invalid N311 %ld
\n
"
,
ue_TimersAndConstants
->
n311
);
}
}
else
LOG_E
(
NR_RRC
,
"
SIB1 should not be NULL and neither UE_Timers_Constants
\n
"
);
LOG_E
(
NR_RRC
,
"
UE_Timers_Constants should not be NULL
\n
"
);
}
void
nr_rrc_set_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_SIB1_t
*
sib1
)
{
set_rlf_sib1_timers_and_constants
(
tac
,
sib1
);
set_rlf_sib1_timers_and_constants
(
tac
,
sib1
->
ue_TimersAndConstants
);
if
(
sib1
&&
sib1
->
ue_TimersAndConstants
)
{
int
k
=
0
;
switch
(
sib1
->
ue_TimersAndConstants
->
t300
)
{
...
...
@@ -430,7 +430,7 @@ void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
switch
(
rlf_TimersAndConstants
->
present
){
case
NR_SetupRelease_RLF_TimersAndConstants_PR_release
:
// use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1
set_rlf_sib1_timers_and_constants
(
tac
,
rrc
->
perNB
[
0
].
SInfo
.
sib1
);
set_rlf_sib1_timers_and_constants
(
tac
,
rrc
->
timers_and_constants
.
sib1_TimersAndConstants
);
break
;
case
NR_SetupRelease_RLF_TimersAndConstants_PR_setup
:
rlf_tac
=
rlf_TimersAndConstants
->
choice
.
setup
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment