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
7f100b72
Commit
7f100b72
authored
Dec 15, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor nr_write_ce_dlsch_pdu(): Refactor TA command
parent
6aaa0f19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+9
-17
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
7f100b72
...
...
@@ -67,7 +67,7 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
{
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
NR_MAC_SUBHEADER_FIXED
*
mac_pdu_ptr
=
(
NR_MAC_SUBHEADER_FIXED
*
)
mac_pdu
;
int
mac_ce_size
,
timing_advance_cmd
,
tag_id
=
0
;
int
mac_ce_size
;
// MAC CEs
uint8_t
mac_header_control_elements
[
16
],
*
ce_ptr
;
ce_ptr
=
&
mac_header_control_elements
[
0
];
...
...
@@ -85,27 +85,19 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
// this is done to avoid issues with the timeAlignmentTimer which is
// supposed to monitor if the UE received TA or not */
if
(
ue_sched_ctl
->
ta_apply
)
{
const
int
mac_ce_size
=
sizeof
(
NR_MAC_CE_TA
);
if
(
size
<
mac_ce_size
+
1
)
return
(
unsigned
char
*
)
mac_pdu_ptr
-
mac_pdu
;
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_TA_COMMAND
;
mac_pdu_ptr
++
;
// TA MAC CE (1 octet)
timing_advance_cmd
=
ue_sched_ctl
->
ta_update
;
const
int
timing_advance_cmd
=
ue_sched_ctl
->
ta_update
;
AssertFatal
(
timing_advance_cmd
<
64
,
"timing_advance_cmd %d > 63
\n
"
,
timing_advance_cmd
);
((
NR_MAC_CE_TA
*
)
ce_ptr
)
->
TA_COMMAND
=
timing_advance_cmd
;
//(timing_advance_cmd+31)&0x3f;
if
(
gNB
->
tag
->
tag_Id
!=
0
)
{
tag_id
=
gNB
->
tag
->
tag_Id
;
((
NR_MAC_CE_TA
*
)
ce_ptr
)
->
TAGID
=
tag_id
;
}
LOG_D
(
MAC
,
"NR MAC CE timing advance command = %d (%d) TAG ID = %d
\n
"
,
timing_advance_cmd
,
((
NR_MAC_CE_TA
*
)
ce_ptr
)
->
TA_COMMAND
,
tag_id
);
mac_ce_size
=
sizeof
(
NR_MAC_CE_TA
);
// Copying bytes for MAC CEs to the mac pdu pointer
memcpy
((
void
*
)
mac_pdu_ptr
,
(
void
*
)
ce_ptr
,
mac_ce_size
);
ce_ptr
+=
mac_ce_size
;
int
tag_id
=
gNB
->
tag
->
tag_Id
;
((
NR_MAC_CE_TA
*
)
mac_pdu_ptr
)
->
TA_COMMAND
=
timing_advance_cmd
;
//(timing_advance_cmd+31)&0x3f;
((
NR_MAC_CE_TA
*
)
mac_pdu_ptr
)
->
TAGID
=
tag_id
;
LOG_D
(
MAC
,
"NR MAC CE timing advance command = %d TAG ID = %d
\n
"
,
timing_advance_cmd
,
tag_id
);
mac_pdu_ptr
+=
(
unsigned
char
)
mac_ce_size
;
}
// Contention resolution fixed subheader and MAC CE
...
...
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