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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
lizhongxiao
OpenXG-RAN
Commits
7c280fe6
Commit
7c280fe6
authored
Feb 12, 2024
by
Giulio Carota
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cu): use the correct MIB data structure
parent
a4090b86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
openair2/RRC/NR/rrc_gNB_du.c
openair2/RRC/NR/rrc_gNB_du.c
+11
-16
No files found.
openair2/RRC/NR/rrc_gNB_du.c
View file @
7c280fe6
...
...
@@ -48,25 +48,24 @@ static bool rrc_gNB_plmn_matches(const gNB_RRC_INST *rrc, const f1ap_served_cell
&&
conf
->
mnc
[
0
]
==
info
->
plmn
.
mnc
;
}
static
bool
extract_sys_info
(
const
f1ap_gnb_du_system_info_t
*
sys_info
,
NR_
BCCH_BCH_Message
_t
**
mib
,
NR_SIB1_t
**
sib1
)
static
bool
extract_sys_info
(
const
f1ap_gnb_du_system_info_t
*
sys_info
,
NR_
MIB
_t
**
mib
,
NR_SIB1_t
**
sib1
)
{
DevAssert
(
sys_info
!=
NULL
);
DevAssert
(
mib
!=
NULL
);
DevAssert
(
sib1
!=
NULL
);
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_BCCH_BCH_Message
,
(
void
**
)
mib
,
sys_info
->
mib
,
sys_info
->
mib_length
);
if
(
dec_rval
.
code
!=
RC_OK
||
(
*
mib
)
->
message
.
present
!=
NR_BCCH_BCH_MessageType_PR_mib
||
(
*
mib
)
->
message
.
choice
.
messageClassExtension
==
NULL
)
{
LOG_E
(
RRC
,
"Failed to decode NR_BCCH_BCH_MESSAGE (%zu bits) of DU
\n
"
,
dec_rval
.
consumed
);
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_Message
,
*
mib
);
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_MIB
,
(
void
**
)
mib
,
sys_info
->
mib
,
sys_info
->
mib_length
);
if
(
dec_rval
.
code
!=
RC_OK
)
{
LOG_E
(
RRC
,
"Failed to decode NR_MIB (%zu bits) of DU
\n
"
,
dec_rval
.
consumed
);
ASN_STRUCT_FREE
(
asn_DEF_NR_MIB
,
*
mib
);
return
false
;
}
if
(
sys_info
->
sib1
)
{
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_SIB1
,
(
void
**
)
sib1
,
sys_info
->
sib1
,
sys_info
->
sib1_length
);
if
(
dec_rval
.
code
!=
RC_OK
)
{
ASN_STRUCT_FREE
(
asn_DEF_NR_
BCCH_BCH_Message
,
*
mib
);
ASN_STRUCT_FREE
(
asn_DEF_NR_
MIB
,
*
mib
);
ASN_STRUCT_FREE
(
asn_DEF_NR_SIB1
,
*
sib1
);
LOG_E
(
RRC
,
"Failed to decode NR_SIB1 (%zu bits), rejecting DU
\n
"
,
dec_rval
.
consumed
);
return
false
;
...
...
@@ -74,7 +73,7 @@ static bool extract_sys_info(const f1ap_gnb_du_system_info_t *sys_info, NR_BCCH_
}
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
))
xer_fprint
(
stdout
,
&
asn_DEF_NR_
BCCH_BCH_Message
,
*
mib
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_
MIB
,
*
mib
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
))
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,
*
sib1
);
...
...
@@ -144,7 +143,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id)
}
const
f1ap_gnb_du_system_info_t
*
sys_info
=
req
->
cell
[
0
].
sys_info
;
NR_
BCCH_BCH_Message
_t
*
mib
=
NULL
;
NR_
MIB
_t
*
mib
=
NULL
;
NR_SIB1_t
*
sib1
=
NULL
;
if
(
sys_info
!=
NULL
&&
sys_info
->
mib
!=
NULL
&&
!
(
sys_info
->
sib1
==
NULL
&&
get_softmodem_params
()
->
sa
))
{
...
...
@@ -171,9 +170,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id)
*
du
->
setup_req
=
*
req
;
// MIB can be null and configured later via DU Configuration Update
if
(
mib
!=
NULL
){
du
->
mib
=
mib
->
message
.
choice
.
mib
;
mib
->
message
.
choice
.
mib
=
NULL
;
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_MessageType
,
mib
);
du
->
mib
=
mib
;
}
du
->
sib1
=
sib1
;
RB_INSERT
(
rrc_du_tree
,
&
rrc
->
dus
,
du
);
...
...
@@ -284,14 +281,12 @@ void rrc_gNB_process_f1_du_configuration_update(f1ap_gnb_du_configuration_update
if
(
sys_info
->
sib1
!=
NULL
)
ASN_STRUCT_FREE
(
asn_DEF_NR_SIB1
,
du
->
sib1
);
NR_
BCCH_BCH_Message
_t
*
mib
=
NULL
;
NR_
MIB
_t
*
mib
=
NULL
;
if
(
!
extract_sys_info
(
sys_info
,
&
mib
,
&
du
->
sib1
))
{
LOG_W
(
RRC
,
"cannot update sys_info for DU %ld
\n
"
,
du
->
setup_req
->
gNB_DU_id
);
}
else
{
DevAssert
(
mib
!=
NULL
);
du
->
mib
=
mib
->
message
.
choice
.
mib
;
mib
->
message
.
choice
.
mib
=
NULL
;
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_MessageType
,
mib
);
du
->
mib
=
mib
;
LOG_I
(
RRC
,
"update system information of DU %ld
\n
"
,
du
->
setup_req
->
gNB_DU_id
);
}
}
...
...
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