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
5fcea854
Commit
5fcea854
authored
Nov 10, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting rid of duplicate if statement contents
parent
1803b1fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
23 deletions
+3
-23
executables/nr-ue.c
executables/nr-ue.c
+1
-0
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+2
-23
No files found.
executables/nr-ue.c
View file @
5fcea854
...
...
@@ -364,6 +364,7 @@ static void check_nr_prach(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_inf
if
(
nr_prach
==
1
)
{
L1_nsa_prach_procedures
(
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
prach_pdu
);
mac
->
ra
.
generate_nr_prach
=
GENERATE_PREAMBLE
;
ul_config
->
number_pdus
=
0
;
ul_info
->
ue_sched_mode
=
SCHED_ALL
;
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
5fcea854
...
...
@@ -776,7 +776,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
if
(
size_sdu
>
0
&&
ra
->
generate_nr_prach
==
GENERATE_PREAMBLE
)
{
LOG_D
(
NR_MAC
,
"In %s: [UE %d][%d.%d]: starting initialisation Random Access Procedure...
\n
"
,
__FUNCTION__
,
mod_id
,
frame
,
nr_slot_tx
);
AssertFatal
(
TBS_max
>
ra
->
Msg3_size
,
"In %s: allocated resources are not enough for Msg3!
\n
"
,
__FUNCTION__
);
// Init RA procedure
init_RA
(
mod_id
,
prach_resources
,
setup
,
rach_ConfigGeneric
,
rach_ConfigDedicated
);
...
...
@@ -785,7 +784,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
// Padding: fill remainder with 0
if
(
TBS_max
-
ra
->
Msg3_size
>
0
)
{
if
(
TBS_max
-
ra
->
Msg3_size
>
0
&&
get_softmodem_params
()
->
sa
)
{
AssertFatal
(
TBS_max
>
ra
->
Msg3_size
,
"In %s: allocated resources are not enough for Msg3!
\n
"
,
__FUNCTION__
);
LOG_D
(
NR_MAC
,
"In %s: remaining %d bytes, filling with padding
\n
"
,
__FUNCTION__
,
TBS_max
-
ra
->
Msg3_size
);
((
NR_MAC_SUBHEADER_FIXED
*
)
pdu
)
->
R
=
0
;
((
NR_MAC_SUBHEADER_FIXED
*
)
pdu
)
->
LCID
=
UL_SCH_LCID_PADDING
;
...
...
@@ -807,27 +807,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
mac
->
ulsch_pdu
.
Pdu_size
=
TBS_max
;
memcpy
(
mac
->
ulsch_pdu
.
payload
,
payload
,
TBS_max
);
}
else
if
(
size_sdu
>
0
&&
get_softmodem_params
()
->
nsa
)
{
LOG_D
(
NR_MAC
,
"[UE %d][%d.%d]: starting initialisation Random Access Procedure...
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
int
offset
=
0
;
init_RA
(
mod_id
,
prach_resources
,
setup
,
rach_ConfigGeneric
,
rach_ConfigDedicated
);
nr_get_RA_window
(
mac
);
// Fill in preamble and PRACH resources
if
(
ra
->
generate_nr_prach
==
GENERATE_PREAMBLE
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
}
// Padding: fill remainder with 0
if
(
post_padding
>
0
){
for
(
int
j
=
0
;
j
<
(
TBS_max
-
offset
);
j
++
)
payload
[
offset
+
j
]
=
0
;
}
}
else
{
return
0
;
}
}
else
if
(
ra
->
RA_window_cnt
!=
-
1
)
{
// RACH is active
...
...
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