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
alex037yang
OpenXG-RAN
Commits
2ec6ee5f
Commit
2ec6ee5f
authored
Apr 07, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Msg4 mac pdu with padding
parent
79864d00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+5
-11
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+10
-0
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
2ec6ee5f
...
...
@@ -1782,25 +1782,19 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
((
uint16_t
)((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
&
0xff
);
mac_subheader_len
=
3
;
}
else
{
mac_sdu_len
=
((
NR_MAC_SUBHEADER_
LONG
*
)
pduP
)
->
L1
;
mac_sdu_len
=
((
NR_MAC_SUBHEADER_
SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
}
// Check if it is a valid CCCH message, we get all 00's messages very often
if
(
pdu_len
!=
(
mac_subheader_len
+
mac_sdu_len
)
)
{
LOG_D
(
NR_MAC
,
"%s() Invalid CCCH message!, pdu_len: %d
\n
"
,
__func__
,
pdu_len
);
return
;
}
if
(
mac_sdu_len
>
0
)
{
if
(
pdu_len
>=
mac_sdu_len
)
{
LOG_D
(
NR_MAC
,
"DL_SCH_LCID_CCCH with payload len %d
: bits
\n
"
,
mac_sdu_len
);
LOG_D
(
NR_MAC
,
"DL_SCH_LCID_CCCH with payload len %d
\n
"
,
mac_sdu_len
);
LOG_D
(
NR_MAC
,
"RRCSetup received at nr_ue_process_mac_pdu with payload len %d:
\n
bits, rx bytes:
\n
"
,
mac_sdu_len
);
LOG_D
(
NR_MAC
,
"RRCSetup received at nr_ue_process_mac_pdu with payload len %d:
\n
"
,
mac_sdu_len
);
for
(
int
i
=
0
;
i
<
mac_subheader_len
;
i
++
)
{
LOG_D
(
NR_MAC
,
"MAC header %d: 0x%x
\n
"
,
i
,
pduP
[
i
]);
}
for
(
int
i
=
0
;
i
<
mac_sdu_len
/
8
;
i
++
)
{
for
(
int
i
=
0
;
i
<
mac_sdu_len
;
i
++
)
{
LOG_D
(
NR_MAC
,
"%d: 0x%x
\n
"
,
i
,
pduP
[
mac_subheader_len
+
i
]);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
2ec6ee5f
...
...
@@ -1377,6 +1377,16 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
BWPSize
,
nr_mac
->
sched_ctrlCommon
->
active_bwp
->
bwp_Id
);
// Add padding header and zero rest out if there is space left
if
(
mac_pdu_length
<
harq
->
tb_size
)
{
NR_MAC_SUBHEADER_FIXED
*
padding
=
(
NR_MAC_SUBHEADER_FIXED
*
)
&
buf
[
mac_pdu_length
];
padding
->
R
=
0
;
padding
->
LCID
=
DL_SCH_LCID_PADDING
;
for
(
int
k
=
mac_pdu_length
+
1
;
k
<
harq
->
tb_size
;
k
++
)
{
buf
[
k
]
=
0
;
}
}
// DL TX request
nfapi_nr_pdu_t
*
tx_req
=
&
nr_mac
->
TX_req
[
CC_id
].
pdu_list
[
nr_mac
->
TX_req
[
CC_id
].
Number_of_PDUs
];
memcpy
(
tx_req
->
TLVs
[
0
].
value
.
direct
,
harq
->
tb
,
sizeof
(
uint8_t
)
*
harq
->
tb_size
);
...
...
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