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
966569c1
Commit
966569c1
authored
Sep 24, 2020
by
heshanyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement RRC release
parent
49eb7108
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
1 deletion
+92
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+28
-0
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+3
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+61
-1
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
966569c1
...
...
@@ -786,10 +786,14 @@ uint8_t do_NR_SecurityModeCommand(
asn_enc_rval_t
enc_rval
;
memset
(
&
dl_dcch_msg
,
0
,
sizeof
(
NR_DL_DCCH_Message_t
));
dl_dcch_msg
.
message
.
present
=
NR_DL_DCCH_MessageType_PR_c1
;
dl_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_DL_DCCH_MessageType__c1
));
dl_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_DL_DCCH_MessageType__c1_PR_securityModeCommand
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeCommand
=
CALLOC
(
1
,
sizeof
(
struct
NR_SecurityModeCommand
));
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeCommand
->
rrc_TransactionIdentifier
=
Transaction_id
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeCommand
->
criticalExtensions
.
present
=
NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeCommand
->
criticalExtensions
.
choice
.
securityModeCommand
=
CALLOC
(
1
,
sizeof
(
struct
NR_SecurityModeCommand_IEs
));
// the two following information could be based on the mod_id
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeCommand
->
criticalExtensions
.
choice
.
securityModeCommand
->
securityConfigSMC
.
securityAlgorithmConfig
.
cipheringAlgorithm
=
(
NR_CipheringAlgorithm_t
)
cipheringAlgorithm
;
...
...
@@ -932,3 +936,27 @@ uint8_t do_NR_UECapabilityEnquiry_nr( const protocol_ctxt_t *const ctxt_pP,
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
uint8_t
do_NR_RRCConnectionRelease
(
uint8_t
*
buffer
,
uint8_t
Transaction_id
)
{
asn_enc_rval_t
enc_rval
;
NR_DL_DCCH_Message_t
dl_dcch_msg
;
NR_RRCRelease_t
*
rrcConnectionRelease
;
memset
(
&
dl_dcch_msg
,
0
,
sizeof
(
NR_DL_DCCH_Message_t
));
dl_dcch_msg
.
message
.
present
=
NR_DL_DCCH_MessageType_PR_c1
;
dl_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_DL_DCCH_MessageType__c1
));
dl_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_DL_DCCH_MessageType__c1_PR_rrcRelease
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcRelease
=
CALLOC
(
1
,
sizeof
(
struct
NR_RRCRelease
));
rrcConnectionRelease
=
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcRelease
;
// RRCConnectionRelease
rrcConnectionRelease
->
rrc_TransactionIdentifier
=
Transaction_id
;
rrcConnectionRelease
->
criticalExtensions
.
present
=
NR_RRCRelease__criticalExtensions_PR_rrcRelease
;
rrcConnectionRelease
->
criticalExtensions
.
choice
.
rrcRelease
=
NULL
;
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_DL_DCCH_Message
,
NULL
,
(
void
*
)
&
dl_dcch_msg
,
buffer
,
RRC_BUF_SIZE
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
966569c1
...
...
@@ -98,3 +98,6 @@ uint8_t do_NR_SecurityModeCommand(
const
uint8_t
Transaction_id
,
const
uint8_t
cipheringAlgorithm
,
NR_IntegrityProtAlgorithm_t
*
integrityProtAlgorithm
);
uint8_t
do_NR_RRCConnectionRelease
(
uint8_t
*
buffer
,
uint8_t
Transaction_id
);
openair2/RRC/NR/rrc_gNB.c
View file @
966569c1
...
...
@@ -1097,7 +1097,7 @@ rrc_gNB_generate_SecurityModeCommand(
size
=
do_NR_SecurityModeCommand
(
ctxt_pP
,
buffer
,
rrc_
e
NB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
),
rrc_
g
NB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
),
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
&
integrity_algorithm
);
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
buffer
,
size
,
"[MSG] RRC Security Mode Command
\n
"
);
...
...
@@ -1176,3 +1176,63 @@ rrc_gNB_generate_UECapabilityEnquiry(
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
//-----------------------------------------------------------------------------
/*
* Generate the RRC Connection Release to UE.
* If received, UE should switch to RRC_IDLE mode.
*/
void
rrc_gNB_generate_RRCConnectionRelease
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
)
//-----------------------------------------------------------------------------
{
uint8_t
buffer
[
RRC_BUF_SIZE
];
uint16_t
size
=
0
;
memset
(
buffer
,
0
,
RRC_BUF_SIZE
);
size
=
do_NR_RRCConnectionRelease
(
buffer
,
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
));
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
ue_context_pP
->
ue_context
.
ue_release_timer
=
0
;
LOG_I
(
NR_RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Logical Channel DL-DCCH, Generate RRCConnectionRelease (bytes %d)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
size
);
LOG_D
(
NR_RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" --- PDCP_DATA_REQ/%d Bytes (rrcConnectionRelease MUI %d) --->[PDCP][RB %u]
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
size
,
rrc_gNB_mui
,
DCCH
);
MSC_LOG_TX_MESSAGE
(
MSC_RRC_GNB
,
MSC_RRC_UE
,
buffer
,
size
,
MSC_AS_TIME_FMT
" LTE_RRCConnectionRelease UE %x MUI %d size %u"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
size
);
if
(
NODE_IS_CU
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
))
{
MessageDef
*
m
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
F1AP_UE_CONTEXT_RELEASE_CMD
);
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
rnti
=
ctxt_pP
->
rnti
;
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
cause
=
F1AP_CAUSE_RADIO_NETWORK
;
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
cause_value
=
10
;
// 10 = F1AP_CauseRadioNetwork_normal_release
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
rrc_container
=
buffer
;
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
rrc_container_length
=
size
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
m
);
}
else
{
rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
}
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