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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
b5f58b7d
Commit
b5f58b7d
authored
Sep 25, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RRCReconfigurationComplete message
Modify compilation warning
parent
9c462934
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
239 additions
and
38 deletions
+239
-38
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+1
-1
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+1
-1
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+2
-0
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+6
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+195
-20
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+24
-15
openair2/RRC/NR/rrc_gNB_NGAP.h
openair2/RRC/NR/rrc_gNB_NGAP.h
+9
-0
openair2/RRC/NR/rrc_gNB_UE_context.c
openair2/RRC/NR/rrc_gNB_UE_context.c
+1
-1
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
b5f58b7d
...
@@ -639,7 +639,7 @@ uint8_t do_RRCReject(uint8_t Mod_id,
...
@@ -639,7 +639,7 @@ uint8_t do_RRCReject(uint8_t Mod_id,
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
uint8_t
do_RRCSetup
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
do_RRCSetup
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_
e
NB_ue_context_t
*
const
ue_context_pP
,
rrc_
g
NB_ue_context_t
*
const
ue_context_pP
,
int
CC_id
,
int
CC_id
,
uint8_t
*
const
buffer
,
uint8_t
*
const
buffer
,
const
uint8_t
transaction_id
,
const
uint8_t
transaction_id
,
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
b5f58b7d
...
@@ -87,7 +87,7 @@ uint8_t do_RRCReject(uint8_t Mod_id,
...
@@ -87,7 +87,7 @@ uint8_t do_RRCReject(uint8_t Mod_id,
uint8_t
*
const
buffer
);
uint8_t
*
const
buffer
);
uint8_t
do_RRCSetup
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
do_RRCSetup
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_
e
NB_ue_context_t
*
const
ue_context_pP
,
rrc_
g
NB_ue_context_t
*
const
ue_context_pP
,
int
CC_id
,
int
CC_id
,
uint8_t
*
const
buffer
,
uint8_t
*
const
buffer
,
const
uint8_t
transaction_id
,
const
uint8_t
transaction_id
,
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
b5f58b7d
...
@@ -134,6 +134,8 @@ typedef enum UE_STATE_NR_e {
...
@@ -134,6 +134,8 @@ typedef enum UE_STATE_NR_e {
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define NR_RRC_TRANSACTION_IDENTIFIER_NUMBER 3
#define NR_RRC_TRANSACTION_IDENTIFIER_NUMBER 3
#define ENABLE_SECURITY 1
typedef
struct
{
typedef
struct
{
unsigned
short
transport_block_size
;
/*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
short
transport_block_size
;
/*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
short
max_transport_blocks
;
/*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
short
max_transport_blocks
;
/*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
...
...
openair2/RRC/NR/nr_rrc_proto.h
View file @
b5f58b7d
...
@@ -102,6 +102,12 @@ rrc_gNB_get_next_transaction_identifier(
...
@@ -102,6 +102,12 @@ rrc_gNB_get_next_transaction_identifier(
module_id_t
gnb_mod_idP
module_id_t
gnb_mod_idP
);
);
void
rrc_gNB_generate_UECapabilityEnquiry
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
);
/**\brief RRC eNB task.
/**\brief RRC eNB task.
\param void *args_p Pointer on arguments to start the task. */
\param void *args_p Pointer on arguments to start the task. */
void
*
rrc_gnb_task
(
void
*
args_p
);
void
*
rrc_gnb_task
(
void
*
args_p
);
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
b5f58b7d
...
@@ -90,7 +90,6 @@
...
@@ -90,7 +90,6 @@
//#define XER_PRINT
//#define XER_PRINT
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
mui_t
rrc_gNB_mui
=
0
;
mui_t
rrc_gNB_mui
=
0
;
...
@@ -329,7 +328,7 @@ rrc_gNB_generate_RRCSetup(
...
@@ -329,7 +328,7 @@ rrc_gNB_generate_RRCSetup(
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
LOG_I
(
RRC
,
"rrc_gNB_generate_RRCSetup
\n
"
);
LOG_I
(
RRC
,
"rrc_gNB_generate_RRCSetup
\n
"
);
NR_SRB_ToAddModList_t
*
SRB_configList
;
NR_SRB_ToAddModList_t
*
SRB_configList
=
NULL
;
// T(T_GNB_RRC_SETUP,
// T(T_GNB_RRC_SETUP,
// T_INT(ctxt_pP->module_id),
// T_INT(ctxt_pP->module_id),
...
@@ -337,7 +336,7 @@ rrc_gNB_generate_RRCSetup(
...
@@ -337,7 +336,7 @@ rrc_gNB_generate_RRCSetup(
// T_INT(ctxt_pP->subframe),
// T_INT(ctxt_pP->subframe),
// T_INT(ctxt_pP->rnti));
// T_INT(ctxt_pP->rnti));
gNB_RRC_UE_t
*
ue_p
=
&
ue_context_pP
->
ue_context
;
gNB_RRC_UE_t
*
ue_p
=
&
ue_context_pP
->
ue_context
;
SRB_configList
=
&
ue_p
->
SRB_configList
;
SRB_configList
=
ue_p
->
SRB_configList
;
do_RRCSetup
(
ctxt_pP
,
do_RRCSetup
(
ctxt_pP
,
ue_context_pP
,
ue_context_pP
,
CC_id
,
CC_id
,
...
@@ -466,7 +465,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
...
@@ -466,7 +465,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
)
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
gNB_RRC_UE_t
*
ue_p
=
&
ue_context_pP
->
ue_context
;
//
gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
uint8_t
buffer
[
RRC_BUF_SIZE
];
uint8_t
buffer
[
RRC_BUF_SIZE
];
uint16_t
size
;
uint16_t
size
;
gNB_RRC_INST
*
gnb_rrc_inst
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
gNB_RRC_INST
*
gnb_rrc_inst
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
...
@@ -500,18 +499,160 @@ rrc_gNB_generate_defaultRRCReconfiguration(
...
@@ -500,18 +499,160 @@ rrc_gNB_generate_defaultRRCReconfiguration(
ue_context_pP
->
ue_context
.
rnti
,
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
rrc_gNB_mui
,
size
);
size
);
//
rrc_data_req(ctxt_pP,
rrc_data_req
(
ctxt_pP
,
//
DCCH,
DCCH
,
//
rrc_gNB_mui++,
rrc_gNB_mui
++
,
//
SDU_CONFIRM_NO,
SDU_CONFIRM_NO
,
//
size,
size
,
//
buffer,
buffer
,
//
PDCP_TRANSMISSION_MODE_CONTROL);
PDCP_TRANSMISSION_MODE_CONTROL
);
// rrc_pdcp_config_asn1_req
// rrc_pdcp_config_asn1_req
// rrc_rlc_config_asn1_req
// rrc_rlc_config_asn1_req
}
}
//-----------------------------------------------------------------------------
/*
* Process the RRC Reconfiguration Complete from the UE
*/
void
rrc_gNB_process_RRCReconfigurationComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
ue_context_pP
,
const
uint8_t
xid
)
{
int
drb_id
;
uint8_t
*
kRRCenc
=
NULL
;
uint8_t
*
kRRCint
=
NULL
;
uint8_t
*
kUPenc
=
NULL
;
NR_DRB_ToAddModList_t
*
DRB_configList
=
ue_context_pP
->
ue_context
.
DRB_configList2
[
xid
];
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList2
[
xid
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
=
ue_context_pP
->
ue_context
.
DRB_Release_configList2
[
xid
];
NR_DRB_Identity_t
*
drb_id_p
=
NULL
;
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
rnti_t
rnti
=
ue_context_pP
->
ue_id_rnti
;
module_id_t
module_id
=
ctxt_pP
->
module_id
;
int
UE_id_mac
=
find_UE_id
(
module_id
,
rnti
);
if
(
UE_id_mac
==
-
1
)
{
LOG_E
(
RRC
,
"Can't find UE_id(MAC) of UE rnti %x
\n
"
,
rnti
);
return
;
}
/* Derive the keys from kenb */
if
(
DRB_configList
!=
NULL
)
{
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
ue_context_pP
->
ue_context
.
kenb
,
&
kUPenc
);
}
derive_key_rrc_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
ue_context_pP
->
ue_context
.
kenb
,
&
kRRCenc
);
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
ue_context_pP
->
ue_context
.
kenb
,
&
kRRCint
);
/* Refresh SRBs/DRBs */
MSC_LOG_TX_MESSAGE
(
MSC_RRC_GNB
,
MSC_PDCP_ENB
,
NULL
,
0
,
MSC_AS_TIME_FMT
" CONFIG_REQ UE %x DRB (security unchanged)"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_pP
->
ue_context
.
rnti
);
nr_rrc_pdcp_config_asn1_req
(
ctxt_pP
,
SRB_configList
,
// NULL,
DRB_configList
,
DRB_Release_configList2
,
0xff
,
// already configured during the securitymodecommand
kRRCenc
,
kRRCint
,
kUPenc
,
NULL
,
NULL
);
/* Refresh SRBs/DRBs */
nr_rrc_rlc_config_asn1_req
(
ctxt_pP
,
SRB_configList
,
// NULL,
DRB_configList
,
DRB_Release_configList2
,
NULL
,
0
,
0
);
/* Loop through DRBs and establish if necessary */
if
(
DRB_configList
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
DRB_configList
->
list
.
count
;
i
++
)
{
if
(
DRB_configList
->
list
.
array
[
i
])
{
drb_id
=
(
int
)
DRB_configList
->
list
.
array
[
i
]
->
drb_Identity
;
LOG_I
(
NR_RRC
,
"[gNB %d] Frame %d : Logical Channel UL-DCCH, Received NR_RRCReconfigurationComplete from UE rnti %x, reconfiguring DRB %d/LCID %d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ctxt_pP
->
rnti
,
(
int
)
DRB_configList
->
list
.
array
[
i
]
->
drb_Identity
,
(
int
)
*
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
);
if
(
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
==
0
)
{
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
=
1
;
LOG_D
(
NR_RRC
,
"[gNB %d] Frame %d: Establish RLC UM Bidirectional, DRB %d Active
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
(
int
)
DRB_configList
->
list
.
array
[
i
]
->
drb_Identity
);
LOG_D
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RRC_gNB --- MAC_CONFIG_REQ (DRB) ---> MAC_gNB
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
if
(
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
)
{
DRB2LCHAN
[
i
]
=
(
uint8_t
)
*
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
;
}
// rrc_mac_config_req_eNB
}
else
{
// remove LCHAN from MAC/PHY
if
(
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
==
1
)
{
// DRB has just been removed so remove RLC + PDCP for DRB
/* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE,
(ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE);
*/
rrc_rlc_config_req
(
ctxt_pP
,
SRB_FLAG_NO
,
MBMS_FLAG_NO
,
CONFIG_ACTION_REMOVE
,
DRB2LCHAN
[
i
],
Rlc_info_um
);
}
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
=
0
;
LOG_D
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
// rrc_mac_config_req_eNB
}
// end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0)
}
// end if (DRB_configList->list.array[i])
}
// end for (int i = 0; i < DRB_configList->list.count; i++)
free
(
DRB_configList
);
ue_context_pP
->
ue_context
.
DRB_configList2
[
xid
]
=
NULL
;
}
// end if DRB_configList != NULL
if
(
DRB_Release_configList2
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
DRB_Release_configList2
->
list
.
count
;
i
++
)
{
if
(
DRB_Release_configList2
->
list
.
array
[
i
])
{
drb_id_p
=
DRB_Release_configList2
->
list
.
array
[
i
];
drb_id
=
*
drb_id_p
;
if
(
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
==
1
)
{
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
=
0
;
}
}
}
free
(
DRB_Release_configList2
);
ue_context_pP
->
ue_context
.
DRB_Release_configList2
[
xid
]
=
NULL
;
}
}
//-----------------------------------------------------------------------------
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
int
nr_rrc_gNB_decode_ccch
(
protocol_ctxt_t
*
const
ctxt_pP
,
int
nr_rrc_gNB_decode_ccch
(
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
*
buffer
,
const
uint8_t
*
buffer
,
...
@@ -627,7 +768,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
...
@@ -627,7 +768,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
ue_context_p
->
ue_context
.
ue_release_timer_s1
=
0
;
ue_context_p
->
ue_context
.
ue_release_timer_s1
=
0
;
ue_context_p
->
ue_context
.
ue_release_timer_rrc
=
0
;
ue_context_p
->
ue_context
.
ue_release_timer_rrc
=
0
;
}
else
{
}
else
{
LOG_I
(
NR_RRC
,
" 5G-S-TMSI-Part1 doesn't exist, setting ng_5G_S_TMSI_Part1 to %p => %
x
\n
"
,
LOG_I
(
NR_RRC
,
" 5G-S-TMSI-Part1 doesn't exist, setting ng_5G_S_TMSI_Part1 to %p => %
ld
\n
"
,
ue_context_p
,
s_tmsi_part1
);
ue_context_p
,
s_tmsi_part1
);
ue_context_p
=
rrc_gNB_get_next_free_ue_context
(
ctxt_pP
,
RC
.
nrrrc
[
ctxt_pP
->
module_id
],
s_tmsi_part1
);
ue_context_p
=
rrc_gNB_get_next_free_ue_context
(
ctxt_pP
,
RC
.
nrrrc
[
ctxt_pP
->
module_id
],
s_tmsi_part1
);
...
@@ -683,7 +824,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
...
@@ -683,7 +824,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
break
;
break
;
}
}
}
}
return
0
;
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
@@ -699,7 +840,7 @@ rrc_gNB_decode_dcch(
...
@@ -699,7 +840,7 @@ rrc_gNB_decode_dcch(
asn_dec_rval_t
dec_rval
;
asn_dec_rval_t
dec_rval
;
NR_UL_DCCH_Message_t
*
ul_dcch_msg
=
NULL
;
NR_UL_DCCH_Message_t
*
ul_dcch_msg
=
NULL
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
NR_RRCSetupComplete_t
*
rrcSetupComplete
=
NULL
;
//
NR_RRCSetupComplete_t *rrcSetupComplete = NULL;
int
i
;
int
i
;
...
@@ -751,7 +892,40 @@ rrc_gNB_decode_dcch(
...
@@ -751,7 +892,40 @@ rrc_gNB_decode_dcch(
break
;
break
;
case
NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete
:
case
NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete
:
/* TODO */
if
(
!
ue_context_p
)
{
LOG_I
(
NR_RRC
,
"Processing NR_RRCReconfigurationComplete UE %x, ue_context_p is NULL
\n
"
,
ctxt_pP
->
rnti
);
break
;
}
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,
(
char
*
)(
Rx_sdu
),
sdu_sizeP
,
"[MSG] RRC Connection Reconfiguration Complete
\n
"
);
MSC_LOG_RX_MESSAGE
(
MSC_RRC_GNB
,
MSC_RRC_UE
,
Rx_sdu
,
sdu_sizeP
,
MSC_AS_TIME_FMT
" NR_RRCReconfigurationComplete UE %x size %u"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_p
->
ue_context
.
rnti
,
sdu_sizeP
);
LOG_D
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(RRCReconfigurationComplete) ---> RRC_gNB]
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
DCCH
,
sdu_sizeP
);
if
(
ul_dcch_msg
->
message
.
choice
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete
)
{
if
(
ul_dcch_msg
->
message
.
choice
.
c1
->
choice
.
rrcReconfigurationComplete
->
criticalExtensions
.
present
==
NR_RRCReconfigurationComplete__criticalExtensions_PR_rrcReconfigurationComplete
)
rrc_gNB_process_RRCReconfigurationComplete
(
ctxt_pP
,
ue_context_p
,
ul_dcch_msg
->
message
.
choice
.
c1
->
choice
.
rrcReconfigurationComplete
->
rrc_TransactionIdentifier
);
}
rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP
(
ctxt_pP
,
ue_context_p
);
break
;
break
;
case
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
:
case
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
:
...
@@ -760,20 +934,20 @@ rrc_gNB_decode_dcch(
...
@@ -760,20 +934,20 @@ rrc_gNB_decode_dcch(
break
;
break
;
}
}
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
Rx_sdu
,
sdu_sizeP
,
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
Rx_sdu
,
sdu_sizeP
,
"[MSG] RRC SetupComplete
\n
"
);
"[MSG] RRC SetupComplete
\n
"
);
MSC_LOG_RX_MESSAGE
(
MSC_LOG_RX_MESSAGE
(
MSC_RRC_GNB
,
MSC_RRC_GNB
,
MSC_RRC_UE
,
MSC_RRC_UE
,
Rx_sdu
,
Rx_sdu
,
sdu_sizeP
,
sdu_sizeP
,
MSC_AS_TIME_FMT
"
LTE
_RRCSetupComplete UE %x size %u"
,
MSC_AS_TIME_FMT
"
NR
_RRCSetupComplete UE %x size %u"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
rnti
,
sdu_sizeP
);
sdu_sizeP
);
LOG_D
(
NR_RRC
,
LOG_D
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RLC RB %02d --- RLC_DATA_IND %d bytes "
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(RRCSetupComplete) ---> RRC_
e
NB
\n
"
,
"(RRCSetupComplete) ---> RRC_
g
NB
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
DCCH
,
DCCH
,
sdu_sizeP
);
sdu_sizeP
);
...
@@ -966,6 +1140,7 @@ rrc_gNB_decode_dcch(
...
@@ -966,6 +1140,7 @@ rrc_gNB_decode_dcch(
break
;
break
;
}
}
}
}
return
0
;
}
}
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
...
@@ -1199,7 +1374,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
...
@@ -1199,7 +1374,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
uint8_t
size
;
uint8_t
size
;
T
(
T_ENB_RRC_UE_CAPABILITY_ENQUIRY
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T
(
T_ENB_RRC_UE_CAPABILITY_ENQUIRY
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
size
=
do_NR_UECapabilityEnquiry
(
size
=
do_NR_UECapabilityEnquiry
_nr
(
ctxt_pP
,
ctxt_pP
,
buffer
,
buffer
,
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
));
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
));
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
b5f58b7d
...
@@ -19,6 +19,15 @@
...
@@ -19,6 +19,15 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file rrc_gNB_NGAP.h
* \brief rrc NGAP procedures for gNB
* \author Yoshio INOUE, Masayuki HARADA
* \date 2020
* \version 0.1
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com
* (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include "rrc_gNB_NGAP.h"
#include "rrc_gNB_NGAP.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "rrc_eNB_S1AP.h"
#include "rrc_eNB_S1AP.h"
...
@@ -118,10 +127,10 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
...
@@ -118,10 +127,10 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
)
)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{
{
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
//
gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id];
MessageDef
*
message_p
=
NULL
;
MessageDef
*
message_p
=
NULL
;
rrc_ue_ngap_ids_t
*
rrc_ue_ngap_ids_p
=
NULL
;
rrc_ue_ngap_ids_t
*
rrc_ue_ngap_ids_p
=
NULL
;
hashtable_rc_t
h_rc
;
//
hashtable_rc_t h_rc;
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
NGAP_NAS_FIRST_REQ
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
NGAP_NAS_FIRST_REQ
);
memset
(
&
message_p
->
ittiMsg
.
ngap_nas_first_req
,
0
,
sizeof
(
ngap_nas_first_req_t
));
memset
(
&
message_p
->
ittiMsg
.
ngap_nas_first_req
,
0
,
sizeof
(
ngap_nas_first_req_t
));
...
@@ -267,32 +276,32 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
...
@@ -267,32 +276,32 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
}
}
/* TODO security */
/* TODO security */
rrc_gNB_process_security
(
&
ctxt
,
ue_context_p
,
&
(
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
security_capabilities
));
uint8_t
send_security_mode_command
=
TRUE
;
uint8_t
send_security_mode_command
=
TRUE
;
/* TODO rrc_pdcp_config_security */
rrc_pdcp_config_security
(
// rrc_pdcp_config_security(
&
ctxt
,
// &ctxt,
ue_context_p
,
// ue_context_p,
send_security_mode_command
);
// send_security_mode_command);
if
(
send_security_mode_command
)
{
if
(
send_security_mode_command
)
{
rrc_gNB_generate_SecurityModeCommand
(
&
ctxt
,
ue_context_p
);
rrc_gNB_generate_SecurityModeCommand
(
&
ctxt
,
ue_context_p
);
send_security_mode_command
=
FALSE
;
send_security_mode_command
=
FALSE
;
/* TODO rrc_pdcp_config_security */
rrc_pdcp_config_security
(
// rrc_pdcp_config_security(
&
ctxt
,
// &ctxt,
ue_context_p
,
// ue_context_p,
send_security_mode_command
);
// send_security_mode_command);
}
else
{
}
else
{
/*
TODO
rrc_gNB_generate_UECapabilityEnquiry */
/* rrc_gNB_generate_UECapabilityEnquiry */
// rrc_gNB_generate_UECapabilityEnquiry
(&ctxt, ue_context_p);
rrc_gNB_generate_UECapabilityEnquiry
(
&
ctxt
,
ue_context_p
);
}
}
// in case, send the S1SP initial context response if it is not sent with the attach complete message
// in case, send the S1SP initial context response if it is not sent with the attach complete message
if
(
ue_context_p
->
ue_context
.
Status
==
NR_RRC_RECONFIGURED
)
{
if
(
ue_context_p
->
ue_context
.
Status
==
NR_RRC_RECONFIGURED
)
{
LOG_I
(
NR_RRC
,
"Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld
\n
"
,
ue_context_p
->
ue_context
.
reestablishment_cause
);
LOG_I
(
NR_RRC
,
"Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld
\n
"
,
ue_context_p
->
ue_context
.
reestablishment_cause
);
//
rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP
(
&
ctxt
,
ue_context_p
);
}
}
return
0
;
return
0
;
...
...
openair2/RRC/NR/rrc_gNB_NGAP.h
View file @
b5f58b7d
...
@@ -19,6 +19,15 @@
...
@@ -19,6 +19,15 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file rrc_gNB_NGAP.h
* \brief rrc NGAP procedures for gNB
* \author Yoshio INOUE, Masayuki HARADA
* \date 2020
* \version 0.1
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com
* (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#ifndef RRC_GNB_NGAP_H_
#ifndef RRC_GNB_NGAP_H_
#define RRC_GNB_NGAP_H_
#define RRC_GNB_NGAP_H_
...
...
openair2/RRC/NR/rrc_gNB_UE_context.c
View file @
b5f58b7d
...
@@ -248,7 +248,7 @@ rrc_gNB_ue_context_5g_s_tmsi_exist(
...
@@ -248,7 +248,7 @@ rrc_gNB_ue_context_5g_s_tmsi_exist(
{
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
)
{
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
)
{
LOG_I
(
NR_RRC
,
"checking for UE 5G S-TMSI %
x: rnti %x
\n
"
,
LOG_I
(
NR_RRC
,
"checking for UE 5G S-TMSI %
ld: rnti %d
\n
"
,
s_TMSI
,
ue_context_p
->
ue_context
.
rnti
);
s_TMSI
,
ue_context_p
->
ue_context
.
rnti
);
if
(
ue_context_p
->
ue_context
.
ng_5G_S_TMSI_Part1
==
s_TMSI
)
{
if
(
ue_context_p
->
ue_context
.
ng_5G_S_TMSI_Part1
==
s_TMSI
)
{
...
...
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