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
wangwenhui
OpenXG-RAN
Commits
143fd5ea
Commit
143fd5ea
authored
Mar 12, 2020
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
86dc600c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
35 deletions
+38
-35
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+38
-35
No files found.
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
143fd5ea
...
@@ -42,9 +42,10 @@
...
@@ -42,9 +42,10 @@
void
rrc_parse_ue_capabilities
(
gNB_RRC_INST
*
rrc
,
LTE_UE_CapabilityRAT_ContainerList_t
*
UE_CapabilityRAT_ContainerList
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
void
rrc_parse_ue_capabilities
(
gNB_RRC_INST
*
rrc
,
LTE_UE_CapabilityRAT_ContainerList_t
*
UE_CapabilityRAT_ContainerList
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
OCTET_STRING_t
*
ueCapabilityRAT_Container_nr
;
OCTET_STRING_t
*
ueCapabilityRAT_Container_nr
=
NULL
;
OCTET_STRING_t
*
ueCapabilityRAT_Container_MRDC
;
OCTET_STRING_t
*
ueCapabilityRAT_Container_MRDC
=
NULL
;
int
list_size
;
int
list_size
;
asn_dec_rval_t
dec_rval
;
AssertFatal
(
UE_CapabilityRAT_ContainerList
!=
NULL
,
"UE_CapabilityRAT_ContainerList is null
\n
"
);
AssertFatal
(
UE_CapabilityRAT_ContainerList
!=
NULL
,
"UE_CapabilityRAT_ContainerList is null
\n
"
);
AssertFatal
((
list_size
=
UE_CapabilityRAT_ContainerList
->
list
.
count
)
>=
2
,
"UE_CapabilityRAT_ContainerList->list.size %d < 2
\n
"
,
UE_CapabilityRAT_ContainerList
->
list
.
count
);
AssertFatal
((
list_size
=
UE_CapabilityRAT_ContainerList
->
list
.
count
)
>=
2
,
"UE_CapabilityRAT_ContainerList->list.size %d < 2
\n
"
,
UE_CapabilityRAT_ContainerList
->
list
.
count
);
for
(
int
i
=
0
;
i
<
list_size
;
i
++
)
{
for
(
int
i
=
0
;
i
<
list_size
;
i
++
)
{
...
@@ -52,46 +53,48 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, LTE_UE_CapabilityRAT_Container
...
@@ -52,46 +53,48 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, LTE_UE_CapabilityRAT_Container
else
if
(
UE_CapabilityRAT_ContainerList
->
list
.
array
[
i
]
->
rat_Type
==
LTE_RAT_Type_eutra_nr
)
ueCapabilityRAT_Container_MRDC
=
&
UE_CapabilityRAT_ContainerList
->
list
.
array
[
i
]
->
ueCapabilityRAT_Container
;
else
if
(
UE_CapabilityRAT_ContainerList
->
list
.
array
[
i
]
->
rat_Type
==
LTE_RAT_Type_eutra_nr
)
ueCapabilityRAT_Container_MRDC
=
&
UE_CapabilityRAT_ContainerList
->
list
.
array
[
i
]
->
ueCapabilityRAT_Container
;
}
}
AssertFatal
(
ueCapabilityRAT_Container_nr
!=
NULL
,
"ueCapabilityRAT_Container_nr is NULL
\n
"
);
AssertFatal
(
ueCapabilityRAT_Container_MRDC
!=
NULL
,
"ueCapabilityRAT_Container_MRDC is NULL
\n
"
);
// decode and store capabilities
// decode and store capabilities
ue_context_p
=
rrc_gNB_allocate_new_UE_context
(
rrc
);
ue_context_p
=
rrc_gNB_allocate_new_UE_context
(
rrc
);
asn_dec_rval_t
dec_rval
=
uper_decode
(
NULL
,
if
(
ueCapabilityRAT_Container_nr
!=
NULL
)
{
&
asn_DEF_NR_UE_NR_Capability
,
dec_rval
=
uper_decode
(
NULL
,
(
void
**
)
&
ue_context_p
->
ue_context
.
UE_Capability_nr
,
&
asn_DEF_NR_UE_NR_Capability
,
ueCapabilityRAT_Container_nr
->
buf
,
(
void
**
)
&
ue_context_p
->
ue_context
.
UE_Capability_nr
,
ueCapabilityRAT_Container_nr
->
size
,
0
,
0
);
ueCapabilityRAT_Container_nr
->
buf
,
ueCapabilityRAT_Container_nr
->
size
,
0
,
0
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
RRC
,
"Failed to decode UE NR capabilities (%zu bytes) container size %lu
\n
"
,
dec_rval
.
consumed
,
ueCapabilityRAT_Container_nr
->
size
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
ASN_STRUCT_FREE
(
asn_DEF_NR_UE_NR_Capability
,
LOG_E
(
RRC
,
"Failed to decode UE NR capabilities (%zu bytes) container size %lu
\n
"
,
dec_rval
.
consumed
,
ueCapabilityRAT_Container_nr
->
size
);
ue_context_p
->
ue_context
.
UE_Capability_nr
);
ASN_STRUCT_FREE
(
asn_DEF_NR_UE_NR_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_nr
=
0
;
ue_context_p
->
ue_context
.
UE_Capability_nr
);
AssertFatal
(
1
==
0
,
"exiting
\n
"
);
ue_context_p
->
ue_context
.
UE_Capability_nr
=
0
;
AssertFatal
(
1
==
0
,
"exiting
\n
"
);
}
}
}
dec_rval
=
uper_decode
(
NULL
,
if
(
ueCapabilityRAT_Container_MRDC
!=
NULL
)
{
&
asn_DEF_NR_UE_MRDC_Capability
,
dec_rval
=
uper_decode
(
NULL
,
(
void
**
)
&
ue_context_p
->
ue_context
.
UE_Capability_MRDC
,
&
asn_DEF_NR_UE_MRDC_Capability
,
ueCapabilityRAT_Container_MRDC
->
buf
,
(
void
**
)
&
ue_context_p
->
ue_context
.
UE_Capability_MRDC
,
ueCapabilityRAT_Container_MRDC
->
size
,
0
,
0
);
ueCapabilityRAT_Container_MRDC
->
buf
,
ueCapabilityRAT_Container_MRDC
->
size
,
0
,
0
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
RRC
,
"Failed to decode UE MRDC capabilities (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
ASN_STRUCT_FREE
(
asn_DEF_NR_UE_MRDC_Capability
,
LOG_E
(
RRC
,
"Failed to decode UE MRDC capabilities (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
ue_context_p
->
ue_context
.
UE_Capability_MRDC
);
ASN_STRUCT_FREE
(
asn_DEF_NR_UE_MRDC_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_MRDC
=
0
;
ue_context_p
->
ue_context
.
UE_Capability_MRDC
);
AssertFatal
(
1
==
0
,
"exiting
\n
"
);
ue_context_p
->
ue_context
.
UE_Capability_MRDC
=
0
;
AssertFatal
(
1
==
0
,
"exiting
\n
"
);
}
}
}
// dump ue_capabilities
// dump ue_capabilities
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
&&
ueCapabilityRAT_Container_nr
!=
NULL
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UE_NR_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_nr
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UE_NR_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_nr
);
}
}
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
&&
ueCapabilityRAT_Container_MRDC
!=
NULL
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UE_MRDC_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_MRDC
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UE_MRDC_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_MRDC
);
}
}
...
@@ -110,7 +113,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
...
@@ -110,7 +113,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
gtpv1u_enb_create_tunnel_resp_t
create_tunnel_resp
;
gtpv1u_enb_create_tunnel_resp_t
create_tunnel_resp
;
uint8_t
inde_list
[
m
->
nb_e_rabs_tobeadded
];
uint8_t
inde_list
[
m
->
nb_e_rabs_tobeadded
];
memset
(
inde_list
,
0
,
m
->
nb_e_rabs_tobeadded
*
sizeof
(
uint8_t
));
memset
(
inde_list
,
0
,
m
->
nb_e_rabs_tobeadded
*
sizeof
(
uint8_t
));
protocol_ctxt_t
*
ctxt
=
NULL
;
protocol_ctxt_t
ctxt
;
// NR RRCReconfiguration
// NR RRCReconfiguration
...
@@ -156,13 +159,13 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
...
@@ -156,13 +159,13 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
//PM: Is this where we should extract the rnti from?
//PM: Is this where we should extract the rnti from?
create_tunnel_req
.
rnti
=
ue_context_p
->
ue_id_rnti
;
create_tunnel_req
.
rnti
=
ue_context_p
->
ue_id_rnti
;
create_tunnel_req
.
num_tunnels
=
m
->
nb_e_rabs_tobeadded
;
create_tunnel_req
.
num_tunnels
=
m
->
nb_e_rabs_tobeadded
;
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
NOT_A_RNTI
,
0
,
0
,
rrc
->
module_id
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
NOT_A_RNTI
,
0
,
0
,
rrc
->
module_id
);
gtpv1u_create_s1u_tunnel
(
gtpv1u_create_s1u_tunnel
(
ctxt
->
instance
,
ctxt
.
instance
,
&
create_tunnel_req
,
&
create_tunnel_req
,
&
create_tunnel_resp
);
&
create_tunnel_resp
);
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP
(
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP
(
ctxt
,
&
ctxt
,
&
create_tunnel_resp
,
&
create_tunnel_resp
,
&
inde_list
[
0
]);
&
inde_list
[
0
]);
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
nb_e_rabs_admitted_tobeadded
=
m
->
nb_e_rabs_tobeadded
;
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
nb_e_rabs_admitted_tobeadded
=
m
->
nb_e_rabs_tobeadded
;
...
...
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