Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
c0fc6010
Commit
c0fc6010
authored
Oct 28, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check all RA procs in nr_rx_sdu() if unknown RNTI
parent
b6aec6b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
40 deletions
+48
-40
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+48
-40
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
c0fc6010
...
...
@@ -322,51 +322,12 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
UE_info
=
&
gNB_mac
->
UE_info
;
int
target_snrx10
=
gNB_mac
->
pusch_target_snrx10
;
NR_RA_t
*
ra
=
&
gNB_mac
->
common_channels
[
CC_idP
].
ra
[
0
];
if
(
sduP
!=
NULL
)
{
T
(
T_GNB_MAC_UL_PDU_WITH_DATA
,
T_INT
(
gnb_mod_idP
),
T_INT
(
CC_idP
),
T_INT
(
rntiP
),
T_INT
(
frameP
),
T_INT
(
slotP
),
T_INT
(
-
1
)
/* harq_pid */
,
T_BUFFER
(
sduP
,
sdu_lenP
));
}
// random access pusch with TC-RNTI
if
(
ra
->
state
==
WAIT_Msg3
)
{
if
(
sduP
!=
NULL
)
{
// if the CRC passed
if
(
ra
->
rnti
!=
current_rnti
)
{
LOG_E
(
MAC
,
"expected TC-RNTI %04x to match current RNTI %04x
\n
"
,
ra
->
rnti
,
current_rnti
);
return
;
}
free
(
ra
->
preambles
.
preamble_list
);
ra
->
state
=
RA_IDLE
;
LOG_I
(
MAC
,
"reset RA state information for RA-RNTI %04x
\n
"
,
ra
->
rnti
);
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
ra
->
secondaryCellGroup
;
compute_csi_bitlen
(
ra
->
secondaryCellGroup
,
UE_info
,
UE_id
);
UE_info
->
UE_beam_index
[
UE_id
]
=
ra
->
beam_id
;
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
AssertFatal
(
bwpList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
bwpList
->
list
.
count
);
const
int
bwp_id
=
1
;
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_bwp
=
bwpList
->
list
.
array
[
bwp_id
-
1
];
LOG_I
(
MAC
,
"[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly, "
"adding UE MAC Context UE_id %d/RNTI %04x
\n
"
,
gnb_mod_idP
,
current_rnti
,
UE_id
,
ra
->
rnti
);
// re-initialize ta update variables afrer RA procedure completion
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
}
return
;
}
if
(
UE_id
!=
-
1
)
{
UE_scheduling_control
=
&
(
UE_info
->
UE_sched_ctrl
[
UE_id
]);
...
...
@@ -410,6 +371,53 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
else
{
}
}
else
{
if
(
!
sduP
)
// check that CRC passed
return
;
/* we don't know this UE (yet). Check whether there is a ongoing RA (Msg 3)
* and check the corresponding UE's RNTI match, in which case we activate
* it. */
for
(
int
i
=
0
;
i
<
NR_NB_RA_PROC_MAX
;
++
i
)
{
NR_RA_t
*
ra
=
&
gNB_mac
->
common_channels
[
CC_idP
].
ra
[
i
];
if
(
ra
->
state
!=
WAIT_Msg3
)
continue
;
// random access pusch with TC-RNTI
if
(
ra
->
rnti
!=
current_rnti
)
{
LOG_W
(
MAC
,
"expected TC-RNTI %04x to match current RNTI %04x
\n
"
,
ra
->
rnti
,
current_rnti
);
continue
;
}
}
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
ra
->
secondaryCellGroup
;
compute_csi_bitlen
(
ra
->
secondaryCellGroup
,
UE_info
,
UE_id
);
UE_info
->
UE_beam_index
[
UE_id
]
=
ra
->
beam_id
;
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
AssertFatal
(
bwpList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
bwpList
->
list
.
count
);
const
int
bwp_id
=
1
;
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_bwp
=
bwpList
->
list
.
array
[
bwp_id
-
1
];
LOG_I
(
MAC
,
"[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly, "
"adding UE MAC Context UE_id %d/RNTI %04x
\n
"
,
gnb_mod_idP
,
current_rnti
,
UE_id
,
ra
->
rnti
);
// re-initialize ta update variables afrer RA procedure completion
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
free
(
ra
->
preambles
.
preamble_list
);
ra
->
state
=
RA_IDLE
;
LOG_I
(
MAC
,
"reset RA state information for RA-RNTI %04x/index %d
\n
"
,
ra
->
rnti
,
i
);
return
;
}
}
}
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