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
wangjie
OpenXG-RAN
Commits
f690fe04
Commit
f690fe04
authored
Dec 22, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set secondaryCellGroup + default values in add_new_nr_ue()
parent
fa406c47
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
33 deletions
+21
-33
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-16
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+18
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-14
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
f690fe04
...
...
@@ -397,22 +397,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
if
(
add_ue
==
1
&&
get_softmodem_params
()
->
phy_test
)
{
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
compute_csi_bitlen
(
secondaryCellGroup
,
UE_info
,
UE_id
);
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
AssertFatal
(
bwpList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
bwpList
->
list
.
count
);
const
int
bwp_id
=
1
;
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_bwp
=
bwpList
->
list
.
array
[
bwp_id
-
1
];
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
AssertFatal
(
ubwpList
->
list
.
count
==
1
,
"uplinkBWP_ToAddModList has %d BWP!
\n
"
,
ubwpList
->
list
.
count
);
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_ubwp
=
ubwpList
->
list
.
array
[
bwp_id
-
1
];
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
,
secondaryCellGroup
);
LOG_I
(
PHY
,
"Added new UE_id %d/%x with initial secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
else
if
(
add_ue
==
1
&&
!
get_softmodem_params
()
->
phy_test
)
{
/* TODO: should check for free RA process */
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
f690fe04
...
...
@@ -1591,8 +1591,8 @@ int find_nr_RA_id(module_id_t mod_idP, int CC_idP, rnti_t rntiP) {
}
//------------------------------------------------------------------------------
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
){
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
,
NR_CellGroupConfig_t
*
secondaryCellGroup
)
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_idP
]
->
UE_info
;
LOG_W
(
MAC
,
"[gNB %d] Adding UE with rnti %x (num_UEs %d)
\n
"
,
mod_idP
,
...
...
@@ -1608,9 +1608,11 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
UE_info
->
num_UEs
++
;
UE_info
->
active
[
UE_id
]
=
true
;
UE_info
->
rnti
[
UE_id
]
=
rntiP
;
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
add_nr_list
(
&
UE_info
->
list
,
UE_id
);
memset
(
&
UE_info
->
mac_stats
[
UE_id
],
0
,
sizeof
(
NR_mac_stats_t
));
set_Y
(
UE_info
->
Y
[
UE_id
],
rntiP
);
compute_csi_bitlen
(
secondaryCellGroup
,
UE_info
,
UE_id
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
memset
(
sched_ctrl
,
0
,
sizeof
(
*
sched_ctrl
));
sched_ctrl
->
ta_frame
=
0
;
...
...
@@ -1619,6 +1621,20 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
sched_ctrl
->
ul_rssi
=
0
;
/* set illegal time domain allocation to force recomputation of all fields */
sched_ctrl
->
pusch_save
.
time_domain_allocation
=
-
1
;
const
NR_ServingCellConfig_t
*
servingCellConfig
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
;
/* Set default BWPs */
const
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
servingCellConfig
->
downlinkBWP_ToAddModList
;
AssertFatal
(
bwpList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
bwpList
->
list
.
count
);
const
int
bwp_id
=
1
;
sched_ctrl
->
active_bwp
=
bwpList
->
list
.
array
[
bwp_id
-
1
];
const
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
servingCellConfig
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
AssertFatal
(
ubwpList
->
list
.
count
==
1
,
"uplinkBWP_ToAddModList has %d BWP!
\n
"
,
ubwpList
->
list
.
count
);
sched_ctrl
->
active_ubwp
=
ubwpList
->
list
.
array
[
bwp_id
-
1
];
LOG_I
(
MAC
,
"gNB %d] Add NR UE_id %d : rnti %x
\n
"
,
mod_idP
,
UE_id
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
f690fe04
...
...
@@ -395,21 +395,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
current_rnti
);
continue
;
}
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
ra
->
secondaryCellGroup
;
compute_csi_bitlen
(
ra
->
secondaryCellGroup
,
UE_info
,
UE_id
);
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
,
ra
->
secondaryCellGroup
);
UE_info
->
UE_beam_index
[
UE_id
]
=
ra
->
beam_id
;
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
AssertFatal
(
bwpList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
bwpList
->
list
.
count
);
const
int
bwp_id
=
1
;
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_bwp
=
bwpList
->
list
.
array
[
bwp_id
-
1
];
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
AssertFatal
(
ubwpList
->
list
.
count
==
1
,
"uplinkBWP_ToAddModList has %d BWP!
\n
"
,
ubwpList
->
list
.
count
);
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_ubwp
=
ubwpList
->
list
.
array
[
bwp_id
-
1
];
LOG_I
(
MAC
,
"[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly, "
"adding UE MAC Context UE_id %d/RNTI %04x
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
f690fe04
...
...
@@ -307,7 +307,7 @@ int find_nr_UE_id(module_id_t mod_idP, rnti_t rntiP);
int
find_nr_RA_id
(
module_id_t
mod_idP
,
int
CC_idP
,
rnti_t
rntiP
);
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
,
NR_CellGroupConfig_t
*
secondaryCellGroup
);
void
mac_remove_nr_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
...
...
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