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
Michael Black
OpenXG-RAN
Commits
129f085b
Commit
129f085b
authored
May 12, 2023
by
Roberto Louro Magueta
Committed by
rmagueta
Jun 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reconfigurationWithSync
parent
c81ed57a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
22 deletions
+72
-22
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+8
-4
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+0
-6
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+57
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
+1
-1
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
129f085b
...
...
@@ -658,6 +658,8 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
UL_BWP
->
configuredGrantConfig
=
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
configuredGrantConfig
?
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
configuredGrantConfig
->
choice
.
setup
:
NULL
;
ul_genericParameters
=
bwp_ulcommon
->
genericParameters
;
if
(
bwp_ulcommon
->
pucch_ConfigCommon
)
UL_BWP
->
pucch_ConfigCommon
=
bwp_ulcommon
->
pucch_ConfigCommon
->
choice
.
setup
;
if
(
bwp_ulcommon
->
rach_ConfigCommon
)
UL_BWP
->
rach_ConfigCommon
=
bwp_ulcommon
->
rach_ConfigCommon
->
choice
.
setup
;
}
...
...
@@ -749,8 +751,6 @@ void nr_rrc_mac_config_req_mcg(module_id_t module_id,
mac
->
scheduling_info
.
periodicBSR_SF
,
mac
->
scheduling_info
.
retxBSR_SF
);
configure_current_BWP
(
mac
,
NULL
,
cell_group_config
);
RA_config_t
*
ra
=
&
mac
->
ra
;
if
(
cell_group_config
->
spCellConfig
&&
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
)
{
LOG_A
(
NR_MAC
,
"Received the reconfigurationWithSync in %s
\n
"
,
__FUNCTION__
);
...
...
@@ -772,11 +772,13 @@ void nr_rrc_mac_config_req_mcg(module_id_t module_id,
mac
->
synch_request
.
synch_req
.
target_Nid_cell
=
mac
->
physCellId
;
mac
->
if_module
->
synch_request
(
&
mac
->
synch_request
);
}
config_common_ue
(
mac
,
module_id
,
cc_idP
);
mac
->
crnti
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
LOG_I
(
NR_
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
configure_current_BWP
(
mac
,
NULL
,
cell_group_config
);
config_common_ue
(
mac
,
module_id
,
cc_idP
);
nr_ue_mac_default_configs
(
mac
);
if
(
!
get_softmodem_params
()
->
emulate_l1
)
{
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
mac
->
phy_config_request_sent
=
true
;
...
...
@@ -784,6 +786,8 @@ void nr_rrc_mac_config_req_mcg(module_id_t module_id,
// Setup the SSB to Rach Occasions mapping according to the config
build_ssb_to_ro_map
(
mac
);
}
else
{
configure_current_BWP
(
mac
,
NULL
,
cell_group_config
);
}
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
129f085b
...
...
@@ -184,12 +184,6 @@ void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac)
mac
->
scheduling_info
.
retxBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
mac
->
BSR_reporting_active
=
BSR_TRIGGER_NONE
;
mac
->
first_sync_frame
=
-
1
;
mac
->
get_sib1
=
false
;
mac
->
phy_config_request_sent
=
false
;
mac
->
state
=
UE_NOT_SYNC
;
memset
(
&
mac
->
ssb_measurements
,
0
,
sizeof
(
mac
->
ssb_measurements
));
for
(
int
i
=
0
;
i
<
NR_MAX_NUM_LCID
;
i
++
)
{
LOG_D
(
NR_MAC
,
"Applying default logical channel config for LCGID %d
\n
"
,
i
);
mac
->
scheduling_info
.
Bj
[
i
]
=
-
1
;
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
129f085b
...
...
@@ -124,7 +124,59 @@ static void process_phr_Config(NR_UE_sched_ctrl_t *sched_ctrl, NR_SetupRelease_P
AssertFatal
(
false
,
"%s() not implemented
\n
"
,
__func__
);
}
void
process_CellGroup
(
NR_CellGroupConfig_t
*
CellGroup
,
NR_UE_sched_ctrl_t
*
sched_ctrl
)
static
void
process_rachConfigDedicated
(
gNB_MAC_INST
*
nrmac
,
uint32_t
rnti
,
NR_CellGroupConfig_t
*
CellGroup
)
{
DevAssert
(
nrmac
!=
NULL
);
DevAssert
(
CellGroup
!=
NULL
);
NR_SCHED_ENSURE_LOCKED
(
&
RC
.
nrmac
[
0
]
->
sched_lock
);
// Checking for free RA process
NR_COMMON_channels_t
*
cc
=
&
nrmac
->
common_channels
[
0
];
uint8_t
ra_index
=
0
;
for
(;
ra_index
<
NR_NB_RA_PROC_MAX
;
ra_index
++
)
{
if
((
cc
->
ra
[
ra_index
].
state
==
RA_IDLE
)
&&
(
!
cc
->
ra
[
ra_index
].
cfra
))
break
;
}
if
(
ra_index
==
NR_NB_RA_PROC_MAX
)
{
LOG_E
(
NR_MAC
,
"%s() %s:%d RA processes are not available for CFRA RNTI :%x
\n
"
,
__FUNCTION__
,
__FILE__
,
__LINE__
,
rnti
);
return
;
}
NR_RA_t
*
ra
=
&
cc
->
ra
[
ra_index
];
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
reconfigurationWithSync
&&
CellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
!=
NULL
)
{
if
(
CellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
!=
NULL
)
{
ra
->
cfra
=
true
;
ra
->
rnti
=
rnti
;
ra
->
CellGroup
=
CellGroup
;
struct
NR_CFRA
*
cfra
=
CellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
;
uint8_t
num_preamble
=
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
count
;
ra
->
preambles
.
num_preambles
=
num_preamble
;
ra
->
preambles
.
preamble_list
=
(
uint8_t
*
)
malloc
(
num_preamble
*
sizeof
(
uint8_t
));
for
(
int
i
=
0
;
i
<
cc
->
num_active_ssb
;
i
++
)
{
for
(
int
j
=
0
;
j
<
num_preamble
;
j
++
)
{
if
(
cc
->
ssb_index
[
i
]
==
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
j
]
->
ssb
)
{
// One dedicated preamble for each beam
ra
->
preambles
.
preamble_list
[
i
]
=
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
j
]
->
ra_PreambleIndex
;
break
;
}
}
}
}
}
else
{
ra
->
cfra
=
false
;
ra
->
rnti
=
0
;
if
(
ra
->
preambles
.
preamble_list
==
NULL
)
{
ra
->
preambles
.
num_preambles
=
MAX_NUM_NR_PRACH_PREAMBLES
;
ra
->
preambles
.
preamble_list
=
(
uint8_t
*
)
malloc
(
MAX_NUM_NR_PRACH_PREAMBLES
*
sizeof
(
uint8_t
));
for
(
int
i
=
0
;
i
<
MAX_NUM_NR_PRACH_PREAMBLES
;
i
++
)
ra
->
preambles
.
preamble_list
[
i
]
=
i
;
}
}
LOG_I
(
NR_MAC
,
"Added new %s process for UE RNTI %04x with initial CellGroup
\n
"
,
ra
->
cfra
?
"CFRA"
:
"CBRA"
,
rnti
);
}
void
process_CellGroup
(
NR_CellGroupConfig_t
*
CellGroup
,
NR_UE_info_t
*
UE
)
{
/* we assume that this function is mutex-protected from outside */
NR_SCHED_ENSURE_LOCKED
(
&
RC
.
nrmac
[
0
]
->
sched_lock
);
...
...
@@ -140,8 +192,8 @@ void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sche
//process_phr_Config(sched_ctrl,mac_CellGroupConfig->phr_Config);
}
process_r
lcBearerConfig
(
CellGroup
->
rlc_BearerToAddModList
,
CellGroup
->
rlc_BearerToReleaseList
,
sched_ctrl
);
process_r
achConfigDedicated
(
RC
.
nrmac
[
0
],
UE
->
rnti
,
CellGroup
);
process_rlcBearerConfig
(
CellGroup
->
rlc_BearerToAddModList
,
CellGroup
->
rlc_BearerToReleaseList
,
&
UE
->
UE_sched_ctrl
);
}
static
void
config_common
(
gNB_MAC_INST
*
nrmac
,
int
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
NR_ServingCellConfigCommon_t
*
scc
)
...
...
@@ -596,7 +648,7 @@ bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t
NR_UE_info_t
*
UE
=
add_new_nr_ue
(
nrmac
,
rnti
,
CellGroup
);
if
(
UE
)
{
LOG_I
(
NR_MAC
,
"Force-added new UE %x with initial CellGroup
\n
"
,
rnti
);
process_CellGroup
(
CellGroup
,
&
UE
->
UE_sched_ctrl
);
process_CellGroup
(
CellGroup
,
UE
);
}
else
{
LOG_E
(
NR_MAC
,
"Error adding UE %04x
\n
"
,
rnti
);
}
...
...
@@ -675,7 +727,7 @@ bool nr_mac_update_cellgroup(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupCon
exit
(
1
);
}
process_CellGroup
(
CellGroup
,
&
UE
->
UE_sched_ctrl
);
process_CellGroup
(
CellGroup
,
UE
);
return
true
;
}
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
129f085b
...
...
@@ -1791,9 +1791,10 @@ static void nr_generate_Msg3_dcch_dtch_response(module_id_t module_idP,
(
UE
->
enc_rval
.
encoded
+
7
)
/
8
,
0
,
0
);
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
process_CellGroup
(
UE
->
CellGroup
,
sched_ctrl
);
process_CellGroup
(
UE
->
CellGroup
,
UE
)
;
// switching to initial BWP
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
configure_UE_BWP
(
nr_mac
,
scc
,
sched_ctrl
,
NULL
,
UE
,
0
,
0
);
// Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
129f085b
...
...
@@ -2820,9 +2820,8 @@ void nr_mac_update_timers(module_id_t module_id,
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
;
LOG_I
(
NR_MAC
,
"Modified rnti %04x with CellGroup
\n
"
,
UE
->
rnti
);
process_CellGroup
(
cg
,
&
UE
->
UE_sched_ctrl
);
process_CellGroup
(
cg
,
UE
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
configure_UE_BWP
(
RC
.
nrmac
[
module_id
],
scc
,
sched_ctrl
,
NULL
,
UE
,
-
1
,
-
1
);
if
(
get_softmodem_params
()
->
sa
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
129f085b
...
...
@@ -760,7 +760,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
reset_ul_harq_list
(
UE_scheduling_control
);
UE_msg3_stage
->
ra_timer
=
0
;
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
process_CellGroup
(
ra
->
CellGroup
,
UE_
scheduling_control
);
process_CellGroup
(
ra
->
CellGroup
,
UE_
msg3_stage
);
}
else
{
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
129f085b
...
...
@@ -433,7 +433,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t frameP, sub_frame_t slotP);
size_t
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
size_t
strlen
,
bool
reset_rsrp
);
void
process_CellGroup
(
NR_CellGroupConfig_t
*
CellGroup
,
NR_UE_
sched_ctrl_t
*
sched_ctrl
);
void
process_CellGroup
(
NR_CellGroupConfig_t
*
CellGroup
,
NR_UE_
info_t
*
UE
);
void
prepare_initial_ul_rrc_message
(
gNB_MAC_INST
*
mac
,
NR_UE_info_t
*
UE
);
void
send_initial_ul_rrc_message
(
gNB_MAC_INST
*
mac
,
int
rnti
,
const
uint8_t
*
sdu
,
sdu_size_t
sdu_len
,
void
*
rawUE
);
...
...
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
View file @
129f085b
...
...
@@ -147,7 +147,7 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
resp
.
du_to_cu_rrc_information
->
cellGroupConfig_length
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
/* TODO: need to apply after UE context reconfiguration confirmed? */
process_CellGroup
(
UE
->
CellGroup
,
&
UE
->
UE_sched_ctrl
);
process_CellGroup
(
UE
->
CellGroup
,
UE
);
NR_SCHED_UNLOCK
(
&
mac
->
sched_lock
);
...
...
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