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
zzha zzha
OpenXG-RAN
Commits
7e327ae8
Commit
7e327ae8
authored
Sep 11, 2020
by
zhenghuangkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add UplinkNASTransport Message
parent
05033b0b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
45 deletions
+43
-45
openair2/LAYER2/MAC/eNB_scheduler_mch.c
openair2/LAYER2/MAC/eNB_scheduler_mch.c
+2
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+0
-1
openair3/NGAP/ngap_common.h
openair3/NGAP/ngap_common.h
+10
-0
openair3/NGAP/ngap_gNB_handlers.c
openair3/NGAP/ngap_gNB_handlers.c
+0
-4
openair3/NGAP/ngap_gNB_nas_procedures.c
openair3/NGAP/ngap_gNB_nas_procedures.c
+31
-37
No files found.
openair2/LAYER2/MAC/eNB_scheduler_mch.c
View file @
7e327ae8
...
...
@@ -209,9 +209,8 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
msi_pos
=
0
;
if
((
frameP
&
3
)
==
0
)
msi_pos
++
;
while
((
non_mbsfn_SubframeConfig
&
(
0x100
>>
msi_pos
))
==
(
0x100
>>
msi_pos
))
{
while
((
non_mbsfn_SubframeConfig
&
(
0x100
>>
msi_pos
))
==
(
0x100
>>
msi_pos
))
msi_pos
++
;
}
mbms_mch_i
=
0
;
if
((
subframeP
==
0
)){
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
7e327ae8
...
...
@@ -837,7 +837,6 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP,
else
if
(
mu
==
2
)
K2
=
2
;
else
K2
=
3
;
}
LOG_D
(
MAC
,
"nr_schedule_uss_ulsch_phytest K2 %d
\n
"
,
K2
);
pusch_pdu
->
pdu_bit_map
=
PUSCH_PDU_BITMAP_PUSCH_DATA
;
pusch_pdu
->
rnti
=
rnti
;
...
...
openair3/NGAP/ngap_common.h
View file @
7e327ae8
...
...
@@ -58,6 +58,16 @@
#include "NGAP_BroadcastPLMNItem.h"
#include "NGAP_SliceSupportItem.h"
#include "NGAP_PLMNSupportItem.h"
#include "NGAP_PDUSessionResourceSetupResponseTransfer.h"
#include "NGAP_PDUSessionResourceSetupUnsuccessfulTransfer.h"
#include "NGAP_PDUSessionResourceSetupItemCxtRes.h"
#include "NGAP_PDUSessionResourceFailedToSetupItemCxtRes.h"
#include "NGAP_AssociatedQosFlowItem.h"
#include "NGAP_PDUSessionResourceSetupRequestTransfer.h"
#include "NGAP_PDUSessionResourceSetupItemCxtReq.h"
#include "NGAP_QosFlowSetupRequestItem.h"
#include "NGAP_AllowedNSSAI-Item.h"
/* Checking version of ASN1C compiler */
#if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
...
...
openair3/NGAP/ngap_gNB_handlers.c
View file @
7e327ae8
...
...
@@ -49,10 +49,6 @@
#include "assertions.h"
#include "conversions.h"
#include "msc.h"
#include "NGAP_PDUSessionResourceSetupRequestTransfer.h"
#include "NGAP_PDUSessionResourceSetupItemCxtReq.h"
#include "NGAP_QosFlowSetupRequestItem.h"
#include "NGAP_AllowedNSSAI-Item.h"
static
int
ngap_gNB_handle_ng_setup_response
(
uint32_t
assoc_id
,
...
...
openair3/NGAP/ngap_gNB_nas_procedures.c
View file @
7e327ae8
...
...
@@ -47,11 +47,6 @@
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_management_procedures.h"
#include "msc.h"
#include "NGAP_PDUSessionResourceSetupResponseTransfer.h"
#include "NGAP_PDUSessionResourceSetupUnsuccessfulTransfer.h"
#include "NGAP_PDUSessionResourceSetupItemCxtRes.h"
#include "NGAP_PDUSessionResourceFailedToSetupItemCxtRes.h"
#include "NGAP_AssociatedQosFlowItem.h"
//------------------------------------------------------------------------------
int
ngap_gNB_handle_nas_first_req
(
...
...
@@ -430,12 +425,12 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id,
int
ngap_gNB_nas_uplink
(
instance_t
instance
,
ngap_uplink_nas_t
*
ngap_uplink_nas_p
)
//------------------------------------------------------------------------------
{
#if 0
struct
ngap_gNB_ue_context_s
*
ue_context_p
;
ngap_gNB_instance_t
*
ngap_gNB_instance_p
;
NGAP_NGAP_PDU_t
pdu
;
NGAP_UplinkNASTransport_t
*
out
;
NGAP_UplinkNASTransport_IEs_t
*
ie
;
NGAP_UserLocationInformationNR_t
*
userinfo_nr_p
=
NULL
;
uint8_t
*
buffer
;
uint32_t
length
;
DevAssert
(
ngap_uplink_nas_p
!=
NULL
);
...
...
@@ -445,7 +440,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
if
((
ue_context_p
=
ngap_gNB_get_ue_context
(
ngap_gNB_instance_p
,
ngap_uplink_nas_p
->
gNB_ue_ngap_id
))
==
NULL
)
{
/* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */
NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %0
6
x\n",
NGAP_WARN
(
"Failed to find ue context associated with gNB ue ngap id: %0
8
x
\n
"
,
ngap_uplink_nas_p
->
gNB_ue_ngap_id
);
return
-
1
;
}
...
...
@@ -464,7 +459,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
/* Prepare the NGAP message to encode */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
NGAP_NGAP_PDU_PR_initiatingMessage
;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_
u
plinkNASTransport;
pdu
.
choice
.
initiatingMessage
.
procedureCode
=
NGAP_ProcedureCode_id_
U
plinkNASTransport
;
pdu
.
choice
.
initiatingMessage
.
criticality
=
NGAP_Criticality_ignore
;
pdu
.
choice
.
initiatingMessage
.
value
.
present
=
NGAP_InitiatingMessage__value_PR_UplinkNASTransport
;
out
=
&
pdu
.
choice
.
initiatingMessage
.
value
.
choice
.
UplinkNASTransport
;
...
...
@@ -473,14 +468,15 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
ie
->
id
=
NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID
;
ie
->
criticality
=
NGAP_Criticality_reject
;
ie
->
value
.
present
=
NGAP_UplinkNASTransport_IEs__value_PR_AMF_UE_NGAP_ID
;
ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id;
//ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id;
asn_uint642INTEGER
(
&
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
,
ue_context_p
->
amf_ue_ngap_id
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
ie
=
(
NGAP_UplinkNASTransport_IEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_UplinkNASTransport_IEs_t
));
ie->id = NGAP_ProtocolIE_ID_id_
gNB
_UE_NGAP_ID;
ie
->
id
=
NGAP_ProtocolIE_ID_id_
RAN
_UE_NGAP_ID
;
ie
->
criticality
=
NGAP_Criticality_reject
;
ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_
GNB
_UE_NGAP_ID;
ie->value.choice.
GNB
_UE_NGAP_ID = ue_context_p->gNB_ue_ngap_id;
ie
->
value
.
present
=
NGAP_UplinkNASTransport_IEs__value_PR_
RAN
_UE_NGAP_ID
;
ie
->
value
.
choice
.
RAN
_UE_NGAP_ID
=
ue_context_p
->
gNB_ue_ngap_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
ie
=
(
NGAP_UplinkNASTransport_IEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_UplinkNASTransport_IEs_t
));
...
...
@@ -492,34 +488,32 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
ie
=
(
NGAP_UplinkNASTransport_IEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_UplinkNASTransport_IEs_t
));
ie->id = NGAP_ProtocolIE_ID_id_
EUTRAN_CGI
;
ie
->
id
=
NGAP_ProtocolIE_ID_id_
UserLocationInformation
;
ie
->
criticality
=
NGAP_Criticality_ignore
;
ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_EUTRAN_CGI;
MCC_MNC_TO_PLMNID(
ngap_gNB_instance_p->mcc[ue_context_p->selected_plmn_identity],
ie
->
value
.
present
=
NGAP_UplinkNASTransport_IEs__value_PR_UserLocationInformation
;
ie
->
value
.
choice
.
UserLocationInformation
.
present
=
NGAP_UserLocationInformation_PR_userLocationInformationNR
;
userinfo_nr_p
=
&
ie
->
value
.
choice
.
UserLocationInformation
.
choice
.
userLocationInformationNR
;
/* Set nRCellIdentity. default userLocationInformationNR */
MACRO_GNB_ID_TO_CELL_IDENTITY
(
ngap_gNB_instance_p
->
gNB_id
,
0
,
// Cell ID
&
userinfo_nr_p
->
nR_CGI
.
nRCellIdentity
);
MCC_MNC_TO_TBCD
(
ngap_gNB_instance_p
->
mcc
[
ue_context_p
->
selected_plmn_identity
],
ngap_gNB_instance_p
->
mnc
[
ue_context_p
->
selected_plmn_identity
],
ngap_gNB_instance_p
->
mnc_digit_length
[
ue_context_p
->
selected_plmn_identity
],
&ie->value.choice.EUTRAN_CGI.pLMNidentity);
//#warning "TODO get cell id from RRC"
MACRO_GNB_ID_TO_CELL_IDENTITY(ngap_gNB_instance_p->gNB_id,
0,
&ie->value.choice.EUTRAN_CGI.cell_ID);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t));
ie->id = NGAP_ProtocolIE_ID_id_TAI;
ie->criticality = NGAP_Criticality_ignore;
ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_TAI;
MCC_MNC_TO_PLMNID(
ngap_gNB_instance_p->mcc[ue_context_p->selected_plmn_identity],
&
userinfo_nr_p
->
nR_CGI
.
pLMNIdentity
);
/* Set TAI */
INT24_TO_OCTET_STRING
(
ngap_gNB_instance_p
->
tac
,
&
userinfo_nr_p
->
tAI
.
tAC
);
MCC_MNC_TO_PLMNID
(
ngap_gNB_instance_p
->
mcc
[
ue_context_p
->
selected_plmn_identity
],
ngap_gNB_instance_p
->
mnc
[
ue_context_p
->
selected_plmn_identity
],
ngap_gNB_instance_p
->
mnc_digit_length
[
ue_context_p
->
selected_plmn_identity
],
&ie->value.choice.TAI.pLMNidentity);
TAC_TO_ASN1(ngap_gNB_instance_p->tac, &ie->value.choice.TAI.tAC);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* optional */
&
userinfo_nr_p
->
tAI
.
pLMNIdentity
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
if
(
ngap_gNB_encode_pdu
(
&
pdu
,
&
buffer
,
&
length
)
<
0
)
{
NGAP_ERROR
(
"Failed to encode uplink NAS transport
\n
"
);
/* Encode procedure has failed... */
...
...
@@ -539,7 +533,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
ngap_gNB_itti_send_sctp_data_req
(
ngap_gNB_instance_p
->
instance
,
ue_context_p
->
amf_ref
->
assoc_id
,
buffer
,
length
,
ue_context_p
->
tx_stream
);
#endif
return
0
;
}
...
...
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