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
c6c11e07
Commit
c6c11e07
authored
Dec 15, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor nr_write_ce_dlsch_pdu(): remove last_size
parent
eac0f1ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+2
-8
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
c6c11e07
...
@@ -66,7 +66,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -66,7 +66,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
{
{
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
NR_MAC_SUBHEADER_FIXED
*
mac_pdu_ptr
=
(
NR_MAC_SUBHEADER_FIXED
*
)
mac_pdu
;
NR_MAC_SUBHEADER_FIXED
*
mac_pdu_ptr
=
(
NR_MAC_SUBHEADER_FIXED
*
)
mac_pdu
;
uint8_t
last_size
=
0
;
int
mac_ce_size
,
i
,
timing_advance_cmd
,
tag_id
=
0
;
int
mac_ce_size
,
i
,
timing_advance_cmd
,
tag_id
=
0
;
// MAC CEs
// MAC CEs
uint8_t
mac_header_control_elements
[
16
],
*
ce_ptr
;
uint8_t
mac_header_control_elements
[
16
],
*
ce_ptr
;
...
@@ -76,7 +75,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -76,7 +75,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
if
(
drx_cmd
!=
255
)
{
if
(
drx_cmd
!=
255
)
{
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_DRX
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_DRX
;
//last_size = 1;
mac_pdu_ptr
++
;
mac_pdu_ptr
++
;
}
}
...
@@ -88,7 +86,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -88,7 +86,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
if
(
ue_sched_ctl
->
ta_apply
)
{
if
(
ue_sched_ctl
->
ta_apply
)
{
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_TA_COMMAND
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_TA_COMMAND
;
//last_size = 1;
mac_pdu_ptr
++
;
mac_pdu_ptr
++
;
// TA MAC CE (1 octet)
// TA MAC CE (1 octet)
timing_advance_cmd
=
ue_sched_ctl
->
ta_update
;
timing_advance_cmd
=
ue_sched_ctl
->
ta_update
;
...
@@ -115,7 +112,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -115,7 +112,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_CON_RES_ID
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_CON_RES_ID
;
mac_pdu_ptr
++
;
mac_pdu_ptr
++
;
//last_size = 1;
// contention resolution identity MAC ce has a fixed 48 bit size
// contention resolution identity MAC ce has a fixed 48 bit size
// this contains the UL CCCH SDU. If UL CCCH SDU is longer than 48 bits,
// this contains the UL CCCH SDU. If UL CCCH SDU is longer than 48 bits,
// it contains the first 48 bits of the UL CCCH SDU
// it contains the first 48 bits of the UL CCCH SDU
...
@@ -185,9 +181,8 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -185,9 +181,8 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
LCID
=
DL_SCH_LCID_TCI_STATE_ACT_UE_SPEC_PDSCH
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
LCID
=
DL_SCH_LCID_TCI_STATE_ACT_UE_SPEC_PDSCH
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
L
=
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
);
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
L
=
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
);
last_size
=
2
;
//Incrementing the PDU pointer
//Incrementing the PDU pointer
mac_pdu_ptr
+=
last_size
;
mac_pdu_ptr
+=
2
;
//allocating memory for CE Structure
//allocating memory for CE Structure
NR_TCI_PDSCH_APERIODIC_CSI
*
nr_UESpec_TCI_StateInd_PDSCH
=
(
NR_TCI_PDSCH_APERIODIC_CSI
*
)
malloc
(
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
));
NR_TCI_PDSCH_APERIODIC_CSI
*
nr_UESpec_TCI_StateInd_PDSCH
=
(
NR_TCI_PDSCH_APERIODIC_CSI
*
)
malloc
(
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
));
//initializing to zero
//initializing to zero
...
@@ -220,9 +215,8 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -220,9 +215,8 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
LCID
=
DL_SCH_LCID_APERIODIC_CSI_TRI_STATE_SUBSEL
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
LCID
=
DL_SCH_LCID_APERIODIC_CSI_TRI_STATE_SUBSEL
;
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
L
=
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
);
((
NR_MAC_SUBHEADER_SHORT
*
)
mac_pdu_ptr
)
->
L
=
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
);
last_size
=
2
;
//Incrementing the PDU pointer
//Incrementing the PDU pointer
mac_pdu_ptr
+=
last_size
;
mac_pdu_ptr
+=
2
;
//allocating memory for CE structure
//allocating memory for CE structure
NR_TCI_PDSCH_APERIODIC_CSI
*
nr_Aperiodic_CSI_Trigger
=
(
NR_TCI_PDSCH_APERIODIC_CSI
*
)
malloc
(
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
));
NR_TCI_PDSCH_APERIODIC_CSI
*
nr_Aperiodic_CSI_Trigger
=
(
NR_TCI_PDSCH_APERIODIC_CSI
*
)
malloc
(
sizeof
(
NR_TCI_PDSCH_APERIODIC_CSI
)
+
num_octects
*
sizeof
(
uint8_t
));
//initializing to zero
//initializing to zero
...
...
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