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
spbro
OpenXG-RAN
Commits
0a603a10
Commit
0a603a10
authored
Jun 17, 2024
by
Teodora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly store GUAMI in gNB_RRC_UE_t
parent
b09d2411
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
44 deletions
+49
-44
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+49
-44
No files found.
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
0a603a10
...
...
@@ -200,59 +200,55 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
// ue_context_pP);
/* Fill UE identities with available information */
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_NONE
;
if
(
UE
->
Initialue_identity_5g_s_TMSI
.
presence
)
{
/* Fill s-TMSI */
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_FiveG_s_tmsi
;
req
->
ue_identity
.
s_tmsi
.
amf_set_id
=
UE
->
Initialue_identity_5g_s_TMSI
.
amf_set_id
;
req
->
ue_identity
.
s_tmsi
.
amf_pointer
=
UE
->
Initialue_identity_5g_s_TMSI
.
amf_pointer
;
req
->
ue_identity
.
s_tmsi
.
m_tmsi
=
UE
->
Initialue_identity_5g_s_TMSI
.
fiveg_tmsi
;
}
}
else
if
(
rrcSetupComplete
->
registeredAMF
!=
NULL
)
{
NR_RegisteredAMF_t
*
r_amf
=
rrcSetupComplete
->
registeredAMF
;
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_guami
;
/* The IE AMF-Identifier (AMFI) comprises of an AMF Region ID (8b), an AMF Set ID (10b) and an AMF Pointer (6b) as specified in TS 23.003 [21], clause 2.10.1. */
uint32_t
amf_Id
=
BIT_STRING_to_uint32
(
&
r_amf
->
amf_Identifier
);
req
->
ue_identity
.
guami
.
amf_region_id
=
(
amf_Id
>>
16
)
&
0xff
;
req
->
ue_identity
.
guami
.
amf_set_id
=
(
amf_Id
>>
6
)
&
0x3ff
;
req
->
ue_identity
.
guami
.
amf_pointer
=
amf_Id
&
0x3f
;
UE
->
ue_guami
.
amf_region_id
=
req
->
ue_identity
.
guami
.
amf_region_id
;
UE
->
ue_guami
.
amf_set_id
=
req
->
ue_identity
.
guami
.
amf_set_id
;
UE
->
ue_guami
.
amf_pointer
=
req
->
ue_identity
.
guami
.
amf_pointer
;
if
(
r_amf
->
plmn_Identity
!=
NULL
)
{
AssertFatal
(
false
,
"At the moment, OAI RAN does not support multiple PLMN IDs. Therefore, this part has not been tested
\n
"
);
/* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */
int
selected_plmn_identity
=
rrcSetupComplete
->
selectedPLMN_Identity
-
1
;
req
->
selected_plmn_identity
=
selected_plmn_identity
;
if
((
r_amf
->
plmn_Identity
->
mcc
!=
NULL
)
&&
(
r_amf
->
plmn_Identity
->
mcc
->
list
.
count
>
0
))
{
/* Use first indicated PLMN MCC if it is defined */
req
->
ue_identity
.
guami
.
mcc
=
*
r_amf
->
plmn_Identity
->
mcc
->
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mcc
,
UE
->
rnti
);
}
/* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */
int
selected_plmn_identity
=
rrcSetupComplete
->
selectedPLMN_Identity
-
1
;
req
->
selected_plmn_identity
=
selected_plmn_identity
;
if
(
rrcSetupComplete
->
registeredAMF
!=
NULL
)
{
NR_RegisteredAMF_t
*
r_amf
=
rrcSetupComplete
->
registeredAMF
;
req
->
ue_identity
.
presenceMask
|=
NGAP_UE_IDENTITIES_guami
;
if
(
r_amf
->
plmn_Identity
!=
NULL
)
{
if
((
r_amf
->
plmn_Identity
->
mcc
!=
NULL
)
&&
(
r_amf
->
plmn_Identity
->
mcc
->
list
.
count
>
0
))
{
/* Use first indicated PLMN MCC if it is defined */
req
->
ue_identity
.
guami
.
mcc
=
*
r_amf
->
plmn_Identity
->
mcc
->
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mcc
,
UE
->
rnti
);
}
if
(
r_amf
->
plmn_Identity
->
mnc
.
list
.
count
>
0
)
{
/* Use first indicated PLMN MNC if it is defined */
req
->
ue_identity
.
guami
.
mnc
=
*
r_amf
->
plmn_Identity
->
mnc
.
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mnc
,
UE
->
rnti
);
}
}
else
{
/* TODO */
if
(
r_amf
->
plmn_Identity
->
mnc
.
list
.
count
>
0
)
{
/* Use first indicated PLMN MNC if it is defined */
req
->
ue_identity
.
guami
.
mnc
=
*
r_amf
->
plmn_Identity
->
mnc
.
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mnc
,
UE
->
rnti
);
}
}
else
{
/* TODO */
}
/* amf_Identifier */
uint32_t
amf_Id
=
BIT_STRING_to_uint32
(
&
r_amf
->
amf_Identifier
);
req
->
ue_identity
.
guami
.
amf_region_id
=
amf_Id
>>
16
;
req
->
ue_identity
.
guami
.
amf_set_id
=
UE
->
Initialue_identity_5g_s_TMSI
.
amf_set_id
;
req
->
ue_identity
.
guami
.
amf_pointer
=
UE
->
Initialue_identity_5g_s_TMSI
.
amf_pointer
;
// fixme: illogical place to set UE values, should be in the function that call this one
UE
->
ue_guami
.
mcc
=
req
->
ue_identity
.
guami
.
mcc
;
UE
->
ue_guami
.
mnc
=
req
->
ue_identity
.
guami
.
mnc
;
UE
->
ue_guami
.
mnc_len
=
req
->
ue_identity
.
guami
.
mnc_len
;
UE
->
ue_guami
.
amf_region_id
=
req
->
ue_identity
.
guami
.
amf_region_id
;
UE
->
ue_guami
.
amf_set_id
=
req
->
ue_identity
.
guami
.
amf_set_id
;
UE
->
ue_guami
.
amf_pointer
=
req
->
ue_identity
.
guami
.
amf_pointer
;
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
amf_set_id
,
req
->
ue_identity
.
guami
.
amf_region_id
,
UE
->
rnti
);
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
amf_set_id
,
req
->
ue_identity
.
guami
.
amf_region_id
,
UE
->
rnti
);
}
else
{
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_NONE
;
}
itti_send_msg_to_task
(
TASK_NGAP
,
ctxt_pP
->
instance
,
message_p
);
...
...
@@ -482,6 +478,15 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
GNB_FLAG_YES
,
UE
->
rrc_ue_id
,
0
,
0
);
UE
->
amf_ue_ngap_id
=
req
->
amf_ue_ngap_id
;
/* store guami in gNB_RRC_UE_t context;
* we copy individual members because the guami types are different (nr_rrc_guami_t and ngap_guami_t) */
UE
->
ue_guami
.
mcc
=
req
->
guami
.
mcc
;
UE
->
ue_guami
.
mnc
=
req
->
guami
.
mnc
;
UE
->
ue_guami
.
mnc_len
=
req
->
guami
.
mnc_len
;
UE
->
ue_guami
.
amf_region_id
=
req
->
guami
.
amf_region_id
;
UE
->
ue_guami
.
amf_set_id
=
req
->
guami
.
amf_set_id
;
UE
->
ue_guami
.
amf_pointer
=
req
->
guami
.
amf_pointer
;
/* NAS PDU */
// this is malloced pointers, we pass it for later free()
UE
->
nas_pdu
=
req
->
nas_pdu
;
...
...
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