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
promise
OpenXG-RAN
Commits
ac902811
Commit
ac902811
authored
Nov 23, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add NGAP_UERadioCapabilityInfoIndication
parent
2ed816d9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
1 deletion
+62
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+5
-1
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+50
-0
openair2/RRC/NR/rrc_gNB_NGAP.h
openair2/RRC/NR/rrc_gNB_NGAP.h
+7
-0
No files found.
openair2/RRC/NR/rrc_gNB.c
View file @
ac902811
...
...
@@ -1279,7 +1279,11 @@ rrc_gNB_decode_dcch(
if
(
eutra_index
==
-
1
)
break
;
}
if
(
AMF_MODE_ENABLED
==
1
)
{
rrc_gNB_send_NGAP_UE_CAPABILITIES_IND
(
ctxt_pP
,
ue_context_p
,
ul_dcch_msg
);
}
rrc_gNB_generate_defaultRRCReconfiguration
(
ctxt_pP
,
ue_context_p
);
break
;
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
ac902811
...
...
@@ -55,6 +55,8 @@
#include "ngap_gNB_management_procedures.h"
#include "NR_ULInformationTransfer.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "NR_UERadioAccessCapabilityInformation.h"
#include "NR_UE-CapabilityRAT-ContainerList.h"
extern
RAN_CONTEXT_t
RC
;
...
...
@@ -1107,3 +1109,51 @@ rrc_gNB_NGAP_remove_ue_ids(
}
}
}
void
rrc_gNB_send_NGAP_UE_CAPABILITIES_IND
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
NR_UL_DCCH_Message_t
*
const
ul_dcch_msg
)
//------------------------------------------------------------------------------
{
NR_UE_CapabilityRAT_ContainerList_t
*
ueCapabilityRATContainerList
=
ul_dcch_msg
->
message
.
choice
.
c1
->
choice
.
ueCapabilityInformation
->
criticalExtensions
.
choice
.
ueCapabilityInformation
->
ue_CapabilityRAT_ContainerList
;
/* 4096 is arbitrary, should be big enough */
unsigned
char
buf
[
4096
];
unsigned
char
*
buf2
;
NR_UERadioAccessCapabilityInformation_t
rac
;
if
(
ueCapabilityRATContainerList
->
list
.
count
==
0
)
{
LOG_W
(
RRC
,
"[gNB %d][UE %x] bad UE capabilities
\n
"
,
ctxt_pP
->
module_id
,
ue_context_pP
->
ue_context
.
rnti
);
}
asn_enc_rval_t
ret
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UE_CapabilityRAT_ContainerList
,
NULL
,
ueCapabilityRATContainerList
,
buf
,
4096
);
if
(
ret
.
encoded
==
-
1
)
abort
();
memset
(
&
rac
,
0
,
sizeof
(
NR_UERadioAccessCapabilityInformation_t
));
rac
.
criticalExtensions
.
present
=
NR_UERadioAccessCapabilityInformation__criticalExtensions_PR_c1
;
rac
.
criticalExtensions
.
choice
.
c1
=
calloc
(
1
,
sizeof
(
*
rac
.
criticalExtensions
.
choice
.
c1
));
rac
.
criticalExtensions
.
choice
.
c1
->
present
=
NR_UERadioAccessCapabilityInformation__criticalExtensions__c1_PR_ueRadioAccessCapabilityInformation
;
rac
.
criticalExtensions
.
choice
.
c1
->
choice
.
ueRadioAccessCapabilityInformation
=
calloc
(
1
,
sizeof
(
NR_UERadioAccessCapabilityInformation_IEs_t
));
rac
.
criticalExtensions
.
choice
.
c1
->
choice
.
ueRadioAccessCapabilityInformation
->
ue_RadioAccessCapabilityInfo
.
buf
=
buf
;
rac
.
criticalExtensions
.
choice
.
c1
->
choice
.
ueRadioAccessCapabilityInformation
->
ue_RadioAccessCapabilityInfo
.
size
=
(
ret
.
encoded
+
7
)
/
8
;
rac
.
criticalExtensions
.
choice
.
c1
->
choice
.
ueRadioAccessCapabilityInformation
->
nonCriticalExtension
=
NULL
;
/* 8192 is arbitrary, should be big enough */
buf2
=
malloc16
(
8192
);
if
(
buf2
==
NULL
)
abort
();
ret
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UERadioAccessCapabilityInformation
,
NULL
,
&
rac
,
buf2
,
8192
);
if
(
ret
.
encoded
==
-
1
)
abort
();
MessageDef
*
msg_p
;
msg_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
NGAP_UE_CAPABILITIES_IND
);
NGAP_UE_CAPABILITIES_IND
(
msg_p
).
gNB_ue_ngap_id
=
ue_context_pP
->
ue_context
.
gNB_ue_ngap_id
;
NGAP_UE_CAPABILITIES_IND
(
msg_p
).
ue_radio_cap
.
length
=
(
ret
.
encoded
+
7
)
/
8
;
NGAP_UE_CAPABILITIES_IND
(
msg_p
).
ue_radio_cap
.
buffer
=
buf2
;
itti_send_msg_to_task
(
TASK_NGAP
,
ctxt_pP
->
instance
,
msg_p
);
LOG_I
(
NR_RRC
,
"Send message to ngap: NGAP_UE_CAPABILITIES_IND
\n
"
);
}
openair2/RRC/NR/rrc_gNB_NGAP.h
View file @
ac902811
...
...
@@ -135,4 +135,11 @@ rrc_gNB_NGAP_remove_ue_ids(
struct
rrc_ue_ngap_ids_s
*
const
ue_ids_pP
);
void
rrc_gNB_send_NGAP_UE_CAPABILITIES_IND
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
NR_UL_DCCH_Message_t
*
const
ul_dcch_msg
);
#endif
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