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
littleBu
OpenXG-RAN
Commits
b3bbb1e4
Commit
b3bbb1e4
authored
Jul 19, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move SCC to MAC
parent
39635424
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
202 additions
and
157 deletions
+202
-157
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+8
-8
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+7
-7
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+0
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+8
-10
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+4
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+2
-3
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+5
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+18
-17
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+17
-19
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+32
-31
openair2/RRC/NR/nr_rrc_config.h
openair2/RRC/NR/nr_rrc_config.h
+3
-2
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+0
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+89
-50
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+7
-3
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
b3bbb1e4
...
...
@@ -632,11 +632,17 @@ int main(int argc, char **argv)
frame_parms
->
N_RB_DL
=
N_RB_DL
;
frame_parms
->
N_RB_UL
=
N_RB_DL
;
NR_ServingCellConfigCommon_t
*
scc
=
calloc
(
1
,
sizeof
(
*
scc
));;
prepare_scc
(
scc
);
uint64_t
ssb_bitmap
=
1
;
// Enable only first SSB with index ssb_indx=0
fill_scc_sim
(
scc
,
&
ssb_bitmap
,
N_RB_DL
,
N_RB_DL
,
mu
,
mu
);
fix_scc
(
scc
,
ssb_bitmap
);
RC
.
nb_nr_macrlc_inst
=
1
;
RC
.
nb_nr_mac_CC
=
(
int
*
)
malloc
(
RC
.
nb_nr_macrlc_inst
*
sizeof
(
int
));
for
(
i
=
0
;
i
<
RC
.
nb_nr_macrlc_inst
;
i
++
)
RC
.
nb_nr_mac_CC
[
i
]
=
1
;
mac_top_init_gNB
(
ngran_gNB
);
mac_top_init_gNB
(
ngran_gNB
,
scc
);
gNB_mac
=
RC
.
nrmac
[
0
];
gNB_mac
->
dl_bler
.
harq_round_max
=
num_rounds
;
...
...
@@ -683,12 +689,6 @@ int main(int argc, char **argv)
NR_ServingCellConfigCommon_t *scc = secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
*/
NR_ServingCellConfigCommon_t
*
scc
=
calloc
(
1
,
sizeof
(
*
scc
));;
prepare_scc
(
scc
);
uint64_t
ssb_bitmap
=
1
;
// Enable only first SSB with index ssb_indx=0
fill_scc_sim
(
scc
,
&
ssb_bitmap
,
N_RB_DL
,
N_RB_DL
,
mu
,
mu
);
fix_scc
(
scc
,
ssb_bitmap
);
NR_ServingCellConfig_t
*
scd
=
calloc
(
1
,
sizeof
(
*
scd
));
prepare_scd
(
scd
);
...
...
@@ -733,7 +733,7 @@ int main(int argc, char **argv)
gNB
->
if_inst
->
NR_PHY_config_req
=
nr_phy_config_request
;
// common configuration
nr_mac_config_scc
(
RC
.
nrmac
[
0
],
pdsch_AntennaPorts
,
n_tx
,
0
,
6
,
scc
);
nr_mac_config_scc
(
RC
.
nrmac
[
0
],
pdsch_AntennaPorts
,
n_tx
,
0
,
6
);
// UE dedicated configuration
nr_mac_add_test_ue
(
RC
.
nrmac
[
0
],
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
,
secondaryCellGroup
);
// reset preprocessor to the one of DLSIM after it has been set during
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
b3bbb1e4
...
...
@@ -613,18 +613,18 @@ int main(int argc, char **argv)
r_re
=
malloc
(
n_rx
*
sizeof
(
double
*
));
r_im
=
malloc
(
n_rx
*
sizeof
(
double
*
));
RC
.
nb_nr_macrlc_inst
=
1
;
RC
.
nb_nr_mac_CC
=
(
int
*
)
malloc
(
RC
.
nb_nr_macrlc_inst
*
sizeof
(
int
));
for
(
i
=
0
;
i
<
RC
.
nb_nr_macrlc_inst
;
i
++
)
RC
.
nb_nr_mac_CC
[
i
]
=
1
;
mac_top_init_gNB
(
ngran_gNB
);
NR_ServingCellConfigCommon_t
*
scc
=
calloc
(
1
,
sizeof
(
*
scc
));;
prepare_scc
(
scc
);
uint64_t
ssb_bitmap
;
fill_scc_sim
(
scc
,
&
ssb_bitmap
,
N_RB_DL
,
N_RB_DL
,
mu
,
mu
);
fix_scc
(
scc
,
ssb_bitmap
);
RC
.
nb_nr_macrlc_inst
=
1
;
RC
.
nb_nr_mac_CC
=
(
int
*
)
malloc
(
RC
.
nb_nr_macrlc_inst
*
sizeof
(
int
));
for
(
i
=
0
;
i
<
RC
.
nb_nr_macrlc_inst
;
i
++
)
RC
.
nb_nr_mac_CC
[
i
]
=
1
;
mac_top_init_gNB
(
ngran_gNB
,
scc
);
NR_ServingCellConfig_t
*
scd
=
calloc
(
1
,
sizeof
(
NR_ServingCellConfig_t
));
prepare_scd
(
scd
);
...
...
@@ -651,7 +651,7 @@ int main(int argc, char **argv)
gNB
->
if_inst
->
NR_PHY_config_req
=
nr_phy_config_request
;
// common configuration
nr_mac_config_scc
(
RC
.
nrmac
[
0
],
conf
.
pdsch_AntennaPorts
,
n_tx
,
0
,
6
,
scc
);
nr_mac_config_scc
(
RC
.
nrmac
[
0
],
conf
.
pdsch_AntennaPorts
,
n_tx
,
0
,
6
);
nr_mac_config_mib
(
RC
.
nrmac
[
0
],
mib
);
// UE dedicated configuration
nr_mac_add_test_ue
(
RC
.
nrmac
[
0
],
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
,
secondaryCellGroup
);
...
...
openair2/COMMON/rrc_messages_types.h
View file @
b3bbb1e4
...
...
@@ -415,7 +415,6 @@ typedef struct NRRrcConfigurationReq_s {
uint16_t
mnc
[
PLMN_LIST_MAX_SIZE
];
uint8_t
mnc_digit_length
[
PLMN_LIST_MAX_SIZE
];
uint8_t
num_plmn
;
NR_ServingCellConfigCommon_t
*
scc
;
NR_ServingCellConfig_t
*
scd
;
int
sib1_tda
;
rrc_pdsch_AntennaPorts_t
pdsch_AntennaPorts
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
b3bbb1e4
...
...
@@ -947,6 +947,8 @@ static NR_ServingCellConfig_t *get_scd_config(void)
return
scd
;
}
// temporary minRXTXTIME, to be taken out once all radio config is read at DU
static
int
minRXTXTIME
=
6
;
void
RCconfig_nr_macrlc
()
{
int
j
=
0
;
uint16_t
prbbl
[
275
]
=
{
0
};
...
...
@@ -983,10 +985,13 @@ void RCconfig_nr_macrlc() {
MacRLC_Params
[
i
].
chkPptr
=
&
(
config_check_MacRLCParams
[
i
]);
config_getlist
(
&
MacRLC_ParamList
,
MacRLC_Params
,
sizeof
(
MacRLC_Params
)
/
sizeof
(
paramdef_t
),
NULL
);
NR_ServingCellConfigCommon_t
*
scc
=
get_scc_config
(
minRXTXTIME
);
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
if
(
MacRLC_ParamList
.
numelt
>
0
)
{
RC
.
nb_nr_macrlc_inst
=
MacRLC_ParamList
.
numelt
;
ngran_node_t
node_type
=
get_node_type
();
mac_top_init_gNB
(
node_type
);
mac_top_init_gNB
(
node_type
,
scc
);
RC
.
nb_nr_mac_CC
=
(
int
*
)
malloc
(
RC
.
nb_nr_macrlc_inst
*
sizeof
(
int
));
for
(
j
=
0
;
j
<
RC
.
nb_nr_macrlc_inst
;
j
++
)
{
...
...
@@ -1256,10 +1261,6 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc)
paramdef_t
GNBParams
[]
=
GNBPARAMS_DESC
;
paramlist_def_t
GNBParamList
=
{
GNB_CONFIG_STRING_GNB_LIST
,
NULL
,
0
};
int
minRXTXTIME
=
6
;
NR_ServingCellConfigCommon_t
*
scc
=
get_scc_config
(
minRXTXTIME
);
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
NR_ServingCellConfig_t
*
scd
=
get_scd_config
();
////////// Physical parameters
...
...
@@ -1399,7 +1400,6 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc)
nrrrc_config
.
do_SRS
=
*
GNBParamList
.
paramarray
[
i
][
GNB_DO_SRS_IDX
].
iptr
;
nrrrc_config
.
force_256qam_off
=
*
GNBParamList
.
paramarray
[
i
][
GNB_FORCE256QAMOFF_IDX
].
iptr
;
LOG_I
(
GNB_APP
,
"256 QAM: %s
\n
"
,
nrrrc_config
.
force_256qam_off
?
"force off"
:
"may be on"
);
nrrrc_config
.
scc
=
scc
;
nrrrc_config
.
scd
=
scd
;
nrrrc_config
.
enable_sdap
=
*
GNBParamList
.
paramarray
[
i
][
GNB_ENABLE_SDAP_IDX
].
iptr
;
LOG_I
(
GNB_APP
,
"SDAP layer is %s
\n
"
,
nrrrc_config
.
enable_sdap
?
"enabled"
:
"disabled"
);
...
...
@@ -1991,8 +1991,7 @@ int RC_config_trigger_F1Setup()
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
DevAssert
(
rrc
);
// wait until RRC cell information is configured
const
NR_ServingCellConfigCommon_t
*
scc
=
rrc
->
configuration
.
scc
;
const
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
0
]
->
common_channels
[
0
].
ServingCellConfigCommon
;
DevAssert
(
scc
!=
NULL
);
req
->
cell
[
0
].
info
.
nr_pci
=
*
scc
->
physCellId
;
LOG_W
(
GNB_APP
,
"no slices transported via F1 Setup Request!
\n
"
);
...
...
@@ -2090,13 +2089,12 @@ int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_up
AssertFatal
(
RC
.
nb_nr_inst
==
1
,
"expected one instance
\n
"
);
for
(
j
=
0
;
j
<
gnb_cu_cfg_update
->
num_cells_to_activate
;
j
++
)
{
for
(
i
=
0
;
i
<
RC
.
nb_nr_inst
;
i
++
)
{
rrc_gNB_carrier_data_t
*
carrier
=
&
RC
.
nrrrc
[
i
]
->
carrier
;
f1ap_setup_req_t
*
setup_req
=
RC
.
nrmac
[
i
]
->
f1_config
.
setup_req
;
// identify local index of cell j by nr_cellid, plmn identity and physical cell ID
LOG_I
(
GNB_APP
,
"Checking cell %d, rrc inst %d : rrc->nr_cellid %lx, gnb_cu_cfg_updatenr_cellid %lx
\n
"
,
j
,
i
,
RC
.
nrrrc
[
i
]
->
nr_cellid
,
gnb_cu_cfg_update
->
cells_to_activate
[
j
].
nr_cellid
);
if
(
RC
.
nrrrc
[
i
]
->
nr_cellid
==
gnb_cu_cfg_update
->
cells_to_activate
[
j
].
nr_cellid
if
(
setup_req
->
cell
[
0
].
info
.
nr_cellid
==
gnb_cu_cfg_update
->
cells_to_activate
[
j
].
nr_cellid
&&
check_plmn_identity
(
&
setup_req
->
cell
[
0
].
info
.
plmn
,
&
gnb_cu_cfg_update
->
cells_to_activate
[
j
].
plmn
)
>
0
&&
setup_req
->
cell
[
0
].
info
.
nr_pci
==
gnb_cu_cfg_update
->
cells_to_activate
[
j
].
nrpci
)
{
// copy system information and decode it
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
b3bbb1e4
...
...
@@ -448,13 +448,14 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
rrc_pdsch_AntennaPorts_t
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
int
sib1_tda
,
int
minRXTXTIMEpdsch
,
NR_ServingCellConfigCommon_t
*
scc
)
int
minRXTXTIMEpdsch
)
{
int
CC_id
=
0
;
DevAssert
(
nrmac
!=
NULL
);
AssertFatal
(
nrmac
->
common_channels
[
0
].
ServingCellConfigCommon
==
NULL
,
"logic error: multiple configurations of SC
C
\n
"
);
AssertFatal
(
nrmac
->
common_channels
[
0
].
ServingCellConfigCommon
!=
NULL
,
"logic error: SCC not in MA
C
\n
"
);
NR_SCHED_LOCK
(
&
nrmac
->
sched_lock
);
NR_ServingCellConfigCommon_t
*
scc
=
nrmac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
DevAssert
(
scc
!=
NULL
);
AssertFatal
(
scc
->
ssb_PositionsInBurst
->
present
>
0
&&
scc
->
ssb_PositionsInBurst
->
present
<
4
,
"SSB Bitmap type %d is not valid
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
b3bbb1e4
...
...
@@ -2925,8 +2925,9 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
/* Note: relying on the RRC is a hack, as we are in the DU; there should be
* no RRC, remove in the future */
module_id_t
mod_id
=
0
;
int
CC_id
=
0
;
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
mod_id
];
const
NR_ServingCellConfigCommon_t
*
scc
=
rrc
->
carrier
.
servingcellconfigc
ommon
;
const
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
common_channels
[
CC_id
].
ServingCellConfigC
ommon
;
const
NR_ServingCellConfig_t
*
sccd
=
rrc
->
configuration
.
scd
;
NR_CellGroupConfig_t
*
cellGroupConfig
=
get_initial_cellGroupConfig
(
UE
->
uid
,
scc
,
sccd
,
&
rrc
->
configuration
);
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
b3bbb1e4
...
...
@@ -38,7 +38,7 @@
void
set_cset_offset
(
uint16_t
);
void
mac_top_init_gNB
(
ngran_node_t
node_type
);
void
mac_top_init_gNB
(
ngran_node_t
node_type
,
NR_ServingCellConfigCommon_t
*
scc
);
int
nr_mac_enable_ue_rrc_processing_timer
(
module_id_t
Mod_idP
,
rnti_t
rnti
,
...
...
@@ -49,8 +49,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
rrc_pdsch_AntennaPorts_t
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
int
sib1_tda
,
int
minRXTXTIMEpdsch
,
NR_ServingCellConfigCommon_t
*
scc
);
int
minRXTXTIMEpdsch
);
void
nr_mac_config_mib
(
gNB_MAC_INST
*
nrmac
,
NR_BCCH_BCH_Message_t
*
mib
);
void
nr_mac_config_sib1
(
gNB_MAC_INST
*
nrmac
,
NR_BCCH_DL_SCH_Message_t
*
sib1
);
bool
nr_mac_add_test_ue
(
gNB_MAC_INST
*
nrmac
,
uint32_t
rnti
,
NR_CellGroupConfig_t
*
CellGroup
);
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
b3bbb1e4
...
...
@@ -205,11 +205,13 @@ static void mac_rrc_init(gNB_MAC_INST *mac, ngran_node_t node_type)
}
}
void
mac_top_init_gNB
(
ngran_node_t
node_type
)
void
mac_top_init_gNB
(
ngran_node_t
node_type
,
NR_ServingCellConfigCommon_t
*
scc
)
{
module_id_t
i
;
gNB_MAC_INST
*
nrmac
;
AssertFatal
(
RC
.
nb_nr_macrlc_inst
==
1
,
"what is the point of calling %s() if you don't need exactly one MAC?
\n
"
,
__func__
);
LOG_I
(
MAC
,
"[MAIN] Init function start:nb_nr_macrlc_inst=%d
\n
"
,
RC
.
nb_nr_macrlc_inst
);
if
(
RC
.
nb_nr_macrlc_inst
>
0
)
{
...
...
@@ -239,6 +241,8 @@ void mac_top_init_gNB(ngran_node_t node_type)
RC
.
nrmac
[
i
]
->
ul_handle
=
0
;
RC
.
nrmac
[
i
]
->
common_channels
[
0
].
ServingCellConfigCommon
=
scc
;
RC
.
nrmac
[
i
]
->
first_MIB
=
true
;
RC
.
nrmac
[
i
]
->
cset0_bwp_start
=
0
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
b3bbb1e4
...
...
@@ -730,9 +730,8 @@ int16_t do_RRCReconfiguration(
NR_MeasConfig_t
*
meas_config
,
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
rrc_gNB_carrier_data_t
*
carrier
,
const
gNB_RrcConfigurationReq
*
configuration
,
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
,
const
NR_ServingCellConfigCommon_t
*
scc
,
NR_CellGroupConfig_t
*
cellGroupConfig
)
//------------------------------------------------------------------------------
{
...
...
@@ -783,7 +782,17 @@ int16_t do_RRCReconfiguration(
}
if
(
cellGroupConfig
!=
NULL
){
update_cellGroupConfig
(
cellGroupConfig
,
ue_context_pP
->
ue_context
.
rrc_ue_id
,
ue_context_pP
?
ue_context_pP
->
ue_context
.
UE_Capability_nr
:
NULL
,
configuration
);
/* TODO UECAP: update_cellGroupConfig should not even be here, it is
* updated by DU */
if
(
scc
!=
NULL
)
{
update_cellGroupConfig
(
cellGroupConfig
,
ue_context_pP
->
ue_context
.
rrc_ue_id
,
ue_context_pP
?
ue_context_pP
->
ue_context
.
UE_Capability_nr
:
NULL
,
configuration
,
scc
);
}
else
{
LOG_W
(
RRC
,
"no scc, cannot update cellGroup
\n
"
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
...
...
@@ -1105,7 +1114,7 @@ int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
size_t
buffer_size
,
const
uint8_t
Transaction_id
,
uint16_t
pci
,
NR_
ServingCellConfigCommon_t
*
scc
)
NR_
ARFCN_ValueNR_t
absoluteFrequencySSB
)
{
asn_enc_rval_t
enc_rval
;
NR_DL_DCCH_Message_t
dl_dcch_msg
=
{
0
};
...
...
@@ -1122,15 +1131,14 @@ int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
rrcReestablishment
->
criticalExtensions
.
present
=
NR_RRCReestablishment__criticalExtensions_PR_rrcReestablishment
;
rrcReestablishment
->
criticalExtensions
.
choice
.
rrcReestablishment
=
CALLOC
(
1
,
sizeof
(
NR_RRCReestablishment_IEs_t
));
uint32_t
nr_arfcn_dl
=
(
uint64_t
)
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
;
LOG_I
(
NR_RRC
,
"Reestablishment update key pci=%d, earfcn_dl=%u
\n
"
,
pci
,
nr_arfcn_dl
);
LOG_I
(
NR_RRC
,
"Reestablishment update key pci=%d, earfcn_dl=%lu
\n
"
,
pci
,
absoluteFrequencySSB
);
// 3GPP TS 33.501 Section 6.11 Security handling for RRC connection re-establishment procedure
if
(
ue_context_pP
->
ue_context
.
nh_ncc
>=
0
)
{
nr_derive_key_ng_ran_star
(
pci
,
nr_arfcn_dl
,
ue_context_pP
->
ue_context
.
nh
,
ue_context_pP
->
ue_context
.
kgnb
);
nr_derive_key_ng_ran_star
(
pci
,
absoluteFrequencySSB
,
ue_context_pP
->
ue_context
.
nh
,
ue_context_pP
->
ue_context
.
kgnb
);
rrcReestablishment
->
criticalExtensions
.
choice
.
rrcReestablishment
->
nextHopChainingCount
=
ue_context_pP
->
ue_context
.
nh_ncc
;
}
else
{
// first HO
nr_derive_key_ng_ran_star
(
pci
,
nr_arfcn_dl
,
ue_context_pP
->
ue_context
.
kgnb
,
ue_context_pP
->
ue_context
.
kgnb
);
nr_derive_key_ng_ran_star
(
pci
,
absoluteFrequencySSB
,
ue_context_pP
->
ue_context
.
kgnb
,
ue_context_pP
->
ue_context
.
kgnb
);
// LG: really 1
rrcReestablishment
->
criticalExtensions
.
choice
.
rrcReestablishment
->
nextHopChainingCount
=
0
;
}
...
...
@@ -1185,15 +1193,8 @@ int do_RRCReestablishmentComplete(uint8_t *buffer, size_t buffer_size, int64_t r
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
NR_MeasConfig_t
*
get_defaultMeasConfig
(
const
gNB_RrcConfigurationReq
*
conf
)
NR_MeasConfig_t
*
get_defaultMeasConfig
(
int
arfcn
,
int
band
,
int
scs
)
{
const
NR_FrequencyInfoDL_t
*
freqInfoDL
=
conf
->
scc
->
downlinkConfigCommon
->
frequencyInfoDL
;
const
NR_ARFCN_ValueNR_t
absFreqSSB
=
*
freqInfoDL
->
absoluteFrequencySSB
;
DevAssert
(
freqInfoDL
->
scs_SpecificCarrierList
.
list
.
count
==
1
);
const
NR_SubcarrierSpacing_t
scs
=
freqInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
DevAssert
(
freqInfoDL
->
frequencyBandList
.
list
.
count
==
1
);
const
NR_FreqBandIndicatorNR_t
band
=
*
freqInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
NR_MeasConfig_t
*
mc
=
calloc
(
1
,
sizeof
(
*
mc
));
mc
->
measObjectToAddModList
=
calloc
(
1
,
sizeof
(
*
mc
->
measObjectToAddModList
));
mc
->
reportConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
mc
->
reportConfigToAddModList
));
...
...
@@ -1204,7 +1205,7 @@ NR_MeasConfig_t *get_defaultMeasConfig(const gNB_RrcConfigurationReq *conf)
mo1
->
measObjectId
=
1
;
mo1
->
measObject
.
present
=
NR_MeasObjectToAddMod__measObject_PR_measObjectNR
;
NR_MeasObjectNR_t
*
monr1
=
calloc
(
1
,
sizeof
(
*
monr1
));
asn1cCallocOne
(
monr1
->
ssbFrequency
,
a
bsFreqSSB
);
asn1cCallocOne
(
monr1
->
ssbFrequency
,
a
rfcn
);
asn1cCallocOne
(
monr1
->
ssbSubcarrierSpacing
,
scs
);
monr1
->
referenceSignalConfig
.
ssb_ConfigMobility
=
calloc
(
1
,
sizeof
(
*
monr1
->
referenceSignalConfig
.
ssb_ConfigMobility
));
monr1
->
referenceSignalConfig
.
ssb_ConfigMobility
->
deriveSSB_IndexFromCell
=
true
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
b3bbb1e4
...
...
@@ -120,23 +120,21 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
int
do_NR_RRCRelease
(
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
Transaction_id
);
int16_t
do_RRCReconfiguration
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
Transaction_id
,
NR_SRB_ToAddModList_t
*
SRB_configList
,
NR_DRB_ToAddModList_t
*
DRB_configList
,
NR_DRB_ToReleaseList_t
*
DRB_releaseList
,
NR_SecurityConfig_t
*
security_config
,
NR_SDAP_Config_t
*
sdap_config
,
NR_MeasConfig_t
*
meas_config
,
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
rrc_gNB_carrier_data_t
*
carrier
,
const
gNB_RrcConfigurationReq
*
configuration
,
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
,
NR_CellGroupConfig_t
*
cellGroupConfig
);
int16_t
do_RRCReconfiguration
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
Transaction_id
,
NR_SRB_ToAddModList_t
*
SRB_configList
,
NR_DRB_ToAddModList_t
*
DRB_configList
,
NR_DRB_ToReleaseList_t
*
DRB_releaseList
,
NR_SecurityConfig_t
*
security_config
,
NR_SDAP_Config_t
*
sdap_config
,
NR_MeasConfig_t
*
meas_config
,
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
const
gNB_RrcConfigurationReq
*
configuration
,
const
NR_ServingCellConfigCommon_t
*
scc
,
NR_CellGroupConfig_t
*
cellGroupConfig
);
uint8_t
do_RRCSetupComplete
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
...
...
@@ -177,11 +175,11 @@ int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
size_t
buffer_size
,
const
uint8_t
Transaction_id
,
uint16_t
pci
,
NR_
ServingCellConfigCommon_t
*
scc
);
NR_
ARFCN_ValueNR_t
absoluteFrequencySSB
);
int
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
int64_t
rrc_TransactionIdentifier
);
NR_MeasConfig_t
*
get_defaultMeasConfig
(
const
gNB_RrcConfigurationReq
*
conf
);
NR_MeasConfig_t
*
get_defaultMeasConfig
(
int
absFreqSSB
,
int
band
,
int
scs
);
uint8_t
do_NR_Paging
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint32_t
tmsi
);
#endif
/* __RRC_NR_MESSAGES_ASN1_MSG__H__ */
openair2/RRC/NR/nr_rrc_config.c
View file @
b3bbb1e4
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_config.h
View file @
b3bbb1e4
...
...
@@ -53,7 +53,7 @@ int encode_MIB_NR(NR_BCCH_BCH_Message_t *mib, int frame, uint8_t *buf, int buf_s
#define NR_MAX_SIB_LENGTH 2976 // 3GPP TS 38.331 section 5.2.1
NR_BCCH_DL_SCH_Message_t
*
get_SIB1_NR
(
const
gNB_RrcConfigurationReq
*
configuration
);
NR_BCCH_DL_SCH_Message_t
*
get_SIB1_NR
(
const
gNB_RrcConfigurationReq
*
configuration
,
const
NR_ServingCellConfigCommon_t
*
scc
);
void
free_SIB1_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib1
);
int
encode_SIB1_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib1
,
uint8_t
*
buffer
,
int
max_buffer_size
);
...
...
@@ -64,7 +64,8 @@ NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
void
update_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
const
int
uid
,
NR_UE_NR_Capability_t
*
uecap
,
const
gNB_RrcConfigurationReq
*
configuration
);
const
gNB_RrcConfigurationReq
*
configuration
,
const
NR_ServingCellConfigCommon_t
*
scc
);
void
free_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
);
int
encode_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
uint8_t
*
buffer
,
int
max_buffer_size
);
NR_CellGroupConfig_t
*
decode_cellGroupConfig
(
const
uint8_t
*
buffer
,
int
max_buffer_size
);
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
b3bbb1e4
...
...
@@ -338,7 +338,6 @@ typedef struct {
NR_SIB3_t
*
sib3
;
NR_BCCH_DL_SCH_Message_t
systemInformation
;
// SIB23
NR_BCCH_DL_SCH_Message_t
*
siblock1
;
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
;
NR_CellGroupConfig_t
*
secondaryCellGroup
[
MAX_NR_RRC_UE_CONTEXTS
];
}
rrc_gNB_carrier_data_t
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
b3bbb1e4
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
b3bbb1e4
...
...
@@ -119,7 +119,6 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
{
AssertFatal
(
!
get_softmodem_params
()
->
sa
,
"%s() cannot be called in SA mode, it is intrinsically for NSA
\n
"
,
__func__
);
// generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331)
rrc_gNB_carrier_data_t
*
carrier
=&
rrc
->
carrier
;
const
gNB_RrcConfigurationReq
*
configuration
=
&
rrc
->
configuration
;
MessageDef
*
msg
;
msg
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
0
,
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
);
...
...
@@ -243,7 +242,12 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
}
NR_ServingCellConfig_t
*
scc
=
UE
->
spCellConfig
?
UE
->
spCellConfig
->
spCellConfigDedicated
:
NULL
;
UE
->
secondaryCellGroup
=
get_default_secondaryCellGroup
(
carrier
->
servingcellconfigcommon
,
AssertFatal
(
false
,
"Get servingcellconfigcommon from MAC
\n
"
);
// The MAC has the ServingCellConfigCommon; the below code is incorrect: the
// CU should send a UE Context Setup Request to request the creating of the
// MAC Context
NR_ServingCellConfigCommon_t
*
sccc
=
RC
.
nrmac
[
0
]
->
common_channels
[
0
].
ServingCellConfigCommon
;
UE
->
secondaryCellGroup
=
get_default_secondaryCellGroup
(
sccc
,
scc
,
UE
->
UE_Capability_nr
,
1
,
...
...
@@ -253,7 +257,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
AssertFatal
(
UE
->
secondaryCellGroup
!=
NULL
,
"out of memory
\n
"
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
UE
->
secondaryCellGroup
);
fill_default_reconfig
(
carrier
->
servingcellconfigcommon
,
scc
,
reconfig_ies
,
UE
->
secondaryCellGroup
,
UE
->
UE_Capability_nr
,
configuration
,
ue_context_p
->
ue_context
.
rrc_ue_id
);
fill_default_reconfig
(
sccc
,
scc
,
reconfig_ies
,
UE
->
secondaryCellGroup
,
UE
->
UE_Capability_nr
,
configuration
,
ue_context_p
->
ue_context
.
rrc_ue_id
);
UE
->
rnti
=
UE
->
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
NR_CG_Config_t
*
CG_Config
=
calloc
(
1
,
sizeof
(
*
CG_Config
));
memset
((
void
*
)
CG_Config
,
0
,
sizeof
(
*
CG_Config
));
...
...
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