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
zzha zzha
OpenXG-RAN
Commits
e8893bcc
Commit
e8893bcc
authored
Dec 07, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get data from SRB 1 when generating Msg4
For example in the case of a RRCReestablishment
parent
f7c3874e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
25 deletions
+30
-25
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+30
-25
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
e8893bcc
...
...
@@ -1410,9 +1410,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
ra
->
rnti
=
ra
->
crnti
;
}
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
nr_mac
->
UE_info
,
ra
->
rnti
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
nr_mac
->
UE_info
,
ra
->
rnti
);
if
(
!
UE
)
{
LOG_E
(
NR_MAC
,
"want to generate Msg4, but rnti %04x not in the table
\n
"
,
ra
->
rnti
);
LOG_E
(
NR_MAC
,
"want to generate Msg4, but rnti %04x not in the table
\n
"
,
ra
->
rnti
);
return
;
}
...
...
@@ -1420,20 +1420,22 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
/* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */
int
current_harq_pid
=
sched_ctrl
->
retrans_dl_harq
.
head
;
logical_chan_id_t
lcid
=
DL_SCH_LCID_CCCH
;
if
(
ra
->
msg3_dcch_dtch
==
false
&&
current_harq_pid
<
0
)
{
/* need to wait until RRCSetup is ready */
mac_rlc_status_resp_t
srb0_status
=
mac_rlc_status_ind
(
module_idP
,
ra
->
rnti
,
module_idP
,
frameP
,
slotP
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
0
/* lcid 0 */
,
0
,
0
);
if
(
srb0_status
.
bytes_in_buffer
==
0
)
return
;
mac_sdu_length
=
srb0_status
.
bytes_in_buffer
;
// Check for data on SRB0 (RRCSetup)
mac_rlc_status_resp_t
srb_status
=
mac_rlc_status_ind
(
module_idP
,
ra
->
rnti
,
module_idP
,
frameP
,
slotP
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
if
(
srb_status
.
bytes_in_buffer
==
0
)
{
lcid
=
DL_SCH_LCID_DCCH
;
// Check for data on SRB1 (RRCReestablishment)
srb_status
=
mac_rlc_status_ind
(
module_idP
,
ra
->
rnti
,
module_idP
,
frameP
,
slotP
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
}
// Need to wait until data for Msg4 is ready
if
(
srb_status
.
bytes_in_buffer
==
0
)
return
;
LOG_I
(
NR_MAC
,
"(%4d.%2d) SRB%d has %d bytes
\n
"
,
frameP
,
slotP
,
lcid
,
srb_status
.
bytes_in_buffer
);
mac_sdu_length
=
srb_status
.
bytes_in_buffer
;
}
long
BWPStart
=
0
;
...
...
@@ -1568,33 +1570,36 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Just send padding LCID
ra
->
mac_pdu_length
=
0
;
}
else
{
// UE Contention Resolution Identity MAC CE
uint16_t
mac_pdu_length
=
nr_write_ce_dlsch_pdu
(
module_idP
,
nr_mac
->
sched_ctrlCommon
,
buf
,
255
,
ra
->
cont_res_id
);
LOG_D
(
NR_MAC
,
"Encoded contention resolution mac_pdu_length %d
\n
"
,
mac_pdu_length
);
uint8_t
buffer
[
CCCH_SDU_SIZE
];
uint8_t
mac_subheader_len
=
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
// Get RLC data on the SRB (RRCSetup, RRCReestablishment)
mac_sdu_length
=
mac_rlc_data_req
(
module_idP
,
ra
->
rnti
,
module_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
CCCH
,
lcid
,
CCCH_SDU_SIZE
,
(
char
*
)
buffer
,
0
,
0
);
if
(
mac_sdu_length
<
256
)
{
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
R
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
LCID
=
DL_SCH_LCID_CCCH
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
L
=
mac_sdu_length
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
R
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
LCID
=
lcid
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
L
=
mac_sdu_length
;
ra
->
mac_pdu_length
=
mac_pdu_length
+
mac_sdu_length
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
}
else
{
mac_subheader_len
=
sizeof
(
NR_MAC_SUBHEADER_LONG
);
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
R
=
0
;
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
F
=
1
;
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
LCID
=
DL_SCH_LCID_CCCH
;
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
L
=
htons
(
mac_sdu_length
);
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
R
=
0
;
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
F
=
1
;
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
LCID
=
lcid
;
((
NR_MAC_SUBHEADER_LONG
*
)
&
buf
[
mac_pdu_length
])
->
L
=
htons
(
mac_sdu_length
);
ra
->
mac_pdu_length
=
mac_pdu_length
+
mac_sdu_length
+
sizeof
(
NR_MAC_SUBHEADER_LONG
);
}
LOG_I
(
NR_MAC
,
"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d
\n
"
,
mac_sdu_length
,
mac_subheader_len
,
ra
->
mac_pdu_length
);
...
...
@@ -1829,7 +1834,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
void
nr_check_Msg4_Ack
(
module_id_t
module_id
,
int
CC_id
,
frame_t
frame
,
sub_frame_t
slot
,
NR_RA_t
*
ra
)
{
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
RC
.
nrmac
[
module_id
]
->
UE_info
,
ra
->
rnti
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
RC
.
nrmac
[
module_id
]
->
UE_info
,
ra
->
rnti
);
const
int
current_harq_pid
=
ra
->
harq_pid
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
...
...
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