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
bb826978
Commit
bb826978
authored
Feb 22, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix segmentation fault at UE in nr_schedule_csi_for_im and nr_schedule_csirs_reception
parent
cf284d76
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+26
-18
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+0
-6
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
bb826978
...
@@ -2357,20 +2357,25 @@ void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot) {
...
@@ -2357,20 +2357,25 @@ void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot) {
NR_CSI_IM_Resource_t
*
imcsi
;
NR_CSI_IM_Resource_t
*
imcsi
;
int
period
,
offset
;
int
period
,
offset
;
NR_BWP_Id_t
dl_bwp_id
=
mac
->
DL_BWP_Id
;
NR_BWP_Id_t
dl_bwp_id
=
mac
->
DL_BWP_Id
;
int
mu
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
?
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
:
NR_BWP_t
*
genericParameters
=
NULL
;
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
subcarrierSpacing
;
if
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
])
{
genericParameters
=
&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
;
}
else
{
genericParameters
=
&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
int
mu
=
genericParameters
->
subcarrierSpacing
;
uint16_t
bwp_size
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
uint16_t
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
for
(
int
id
=
0
;
id
<
csi_measconfig
->
csi_IM_ResourceToAddModList
->
list
.
count
;
id
++
){
for
(
int
id
=
0
;
id
<
csi_measconfig
->
csi_IM_ResourceToAddModList
->
list
.
count
;
id
++
){
imcsi
=
csi_measconfig
->
csi_IM_ResourceToAddModList
->
list
.
array
[
id
];
imcsi
=
csi_measconfig
->
csi_IM_ResourceToAddModList
->
list
.
array
[
id
];
csi_period_offset
(
NULL
,
imcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
csi_period_offset
(
NULL
,
imcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
if
((
frame
*
nr_slots_per_frame
[
mu
]
+
slot
-
offset
)
%
period
==
0
)
{
if
((
frame
*
nr_slots_per_frame
[
mu
]
+
slot
-
offset
)
%
period
==
0
)
{
fapi_nr_dl_config_csiim_pdu_rel15_t
*
csiim_config_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
csiim_config_pdu
.
csiim_config_rel15
;
fapi_nr_dl_config_csiim_pdu_rel15_t
*
csiim_config_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
csiim_config_pdu
.
csiim_config_rel15
;
const
NR_BWP_Downlink_t
*
dlbwp
=
mac
->
DLbwp
[
dl_bwp_id
-
1
];
csiim_config_pdu
->
bwp_size
=
bwp_size
;
const
int
locationAndBandwidth
=
dlbwp
!=
NULL
?
dlbwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
:
csiim_config_pdu
->
bwp_start
=
bwp_start
;
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
locationAndBandwidth
;
csiim_config_pdu
->
bwp_size
=
NRRIV2BW
(
locationAndBandwidth
,
MAX_BWP_SIZE
);
csiim_config_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
locationAndBandwidth
,
MAX_BWP_SIZE
);
csiim_config_pdu
->
subcarrier_spacing
=
mu
;
csiim_config_pdu
->
subcarrier_spacing
=
mu
;
csiim_config_pdu
->
start_rb
=
imcsi
->
freqBand
->
startingRB
;
csiim_config_pdu
->
start_rb
=
imcsi
->
freqBand
->
startingRB
;
csiim_config_pdu
->
nr_of_rbs
=
imcsi
->
freqBand
->
nrofRBs
;
csiim_config_pdu
->
nr_of_rbs
=
imcsi
->
freqBand
->
nrofRBs
;
...
@@ -2418,9 +2423,17 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
...
@@ -2418,9 +2423,17 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
NR_NZP_CSI_RS_Resource_t
*
nzpcsi
;
NR_NZP_CSI_RS_Resource_t
*
nzpcsi
;
int
period
,
offset
;
int
period
,
offset
;
NR_BWP_Id_t
dl_bwp_id
=
mac
->
DL_BWP_Id
;
NR_BWP_Id_t
dl_bwp_id
=
mac
->
DL_BWP_Id
;
int
mu
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
?
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
:
NR_BWP_t
*
genericParameters
=
NULL
;
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
subcarrierSpacing
;
if
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
])
{
genericParameters
=
&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
;
}
else
{
genericParameters
=
&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
int
mu
=
genericParameters
->
subcarrierSpacing
;
uint16_t
bwp_size
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
uint16_t
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
...
@@ -2428,14 +2441,9 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
...
@@ -2428,14 +2441,9 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
if
((
frame
*
nr_slots_per_frame
[
mu
]
+
slot
-
offset
)
%
period
==
0
)
{
if
((
frame
*
nr_slots_per_frame
[
mu
]
+
slot
-
offset
)
%
period
==
0
)
{
LOG_D
(
MAC
,
"Scheduling reception of CSI-RS in frame %d slot %d
\n
"
,
frame
,
slot
);
LOG_D
(
MAC
,
"Scheduling reception of CSI-RS in frame %d slot %d
\n
"
,
frame
,
slot
);
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
csirs_config_pdu
.
csirs_config_rel15
;
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
csirs_config_pdu
.
csirs_config_rel15
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
csirs_config_pdu
->
bwp_size
=
bwp_size
;
const
NR_BWP_Downlink_t
*
dlbwp
=
mac
->
DLbwp
[
dl_bwp_id
-
1
];
csirs_config_pdu
->
bwp_start
=
bwp_start
;
const
int
locationAndBandwidth
=
dlbwp
!=
NULL
?
dlbwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
:
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
locationAndBandwidth
;
csirs_config_pdu
->
bwp_size
=
NRRIV2BW
(
locationAndBandwidth
,
MAX_BWP_SIZE
);
csirs_config_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
locationAndBandwidth
,
MAX_BWP_SIZE
);
csirs_config_pdu
->
subcarrier_spacing
=
mu
;
csirs_config_pdu
->
subcarrier_spacing
=
mu
;
csirs_config_pdu
->
start_rb
=
resourceMapping
.
freqBand
.
startingRB
;
csirs_config_pdu
->
start_rb
=
resourceMapping
.
freqBand
.
startingRB
;
csirs_config_pdu
->
nr_of_rbs
=
resourceMapping
.
freqBand
.
nrofRBs
;
csirs_config_pdu
->
nr_of_rbs
=
resourceMapping
.
freqBand
.
nrofRBs
;
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
bb826978
...
@@ -1360,12 +1360,6 @@ static void rrc_ue_generate_RRCSetupComplete(
...
@@ -1360,12 +1360,6 @@ static void rrc_ue_generate_RRCSetupComplete(
int
nas_msg_length
;
int
nas_msg_length
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
if
(
mac
->
cg
&&
mac
->
cg
->
spCellConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
)
AssertFatal
(
1
==
0
,
"2 > csi_MeasConfig is not null
\n
"
);
if
(
AMF_MODE_ENABLED
)
{
if
(
AMF_MODE_ENABLED
)
{
#if defined(ITTI_SIM)
#if defined(ITTI_SIM)
as_nas_info_t
initialNasMsg
;
as_nas_info_t
initialNasMsg
;
...
...
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