Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
ee054770
Commit
ee054770
authored
3 years ago
by
Luis Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Fix Segmentation Fault and avoid multiple calloc for the same pointers
parent
b4f8857d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1555
integration_2022_wk19b
,
!1454
Implementation of multiple dedicated BWPs
,
!1175
WIP: Addition of dedicated BWPs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
1 addition, 1 deletion
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+28
-20
28 additions, 20 deletions
openair2/RRC/NR/rrc_gNB_reconfig.c
with
29 additions
and
21 deletions
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+
1
−
1
View file @
ee054770
...
...
@@ -1947,7 +1947,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
add_nr_list
(
&
UE_info
->
list
,
UE_id
);
memset
(
&
UE_info
->
mac_stats
[
UE_id
],
0
,
sizeof
(
NR_mac_stats_t
));
set_Y
(
UE_info
->
Y
[
UE_id
],
rntiP
);
if
(
CellGroup
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
if
(
CellGroup
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
,
UE_id
,
mod_idP
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
memset
(
sched_ctrl
,
0
,
sizeof
(
*
sched_ctrl
));
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_reconfig.c
+
28
−
20
View file @
ee054770
...
...
@@ -375,19 +375,21 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
if
(
servingcellconfigdedicated
)
{
bwp
=
servingcellconfigdedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_loop
];
}
else
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
));
bwp
=
calloc
(
1
,
sizeof
(
*
bwp
));
// copy common BWP size from initial BWP except for bandwdith
bwp
->
bwp_Id
=
bwp_loop
+
1
;
if
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
==
NULL
){
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
));
}
bwp
=
calloc
(
1
,
sizeof
(
*
bwp
));
bwp
->
bwp_Common
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Common
));
bwp
->
bwp_Id
=
bwp_loop
+
1
;
}
if
(
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
==
0
||
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
==
0
)
{
memcpy
((
void
*
)
&
bwp
->
bwp_Common
->
genericParameters
,
&
servingcellconfigcommon
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
,
sizeof
(
bwp
->
bwp_Common
->
genericParameters
));
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
=
1
;
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
PRBalloc_to_locationandbandwidth
(
servingcellconfigcommon
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
0
);
if
(
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
==
0
&&
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
==
0
)
{
// copy common BWP size from initial BWP except for bandwdith
memcpy
((
void
*
)
&
bwp
->
bwp_Common
->
genericParameters
,
&
servingcellconfigcommon
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
,
sizeof
(
bwp
->
bwp_Common
->
genericParameters
));
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
=
1
;
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
PRBalloc_to_locationandbandwidth
(
servingcellconfigcommon
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
0
);
}
bwp
->
bwp_Common
->
pdcch_ConfigCommon
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
));
...
...
@@ -858,16 +860,22 @@ if (!servingcellconfigdedicated) {
if
(
servingcellconfigdedicated
)
{
ubwp
=
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_loop
];
}
else
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
));
if
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
==
NULL
)
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
));
}
ubwp
=
calloc
(
1
,
sizeof
(
*
ubwp
));
ubwp
->
bwp_Common
=
calloc
(
1
,
sizeof
(
*
ubwp
->
bwp_Common
));
ubwp
->
bwp_Id
=
bwp_loop
+
1
;
}
if
(
ubwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
==
0
&&
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
==
0
)
{
// copy bwp_Common from Initial UL BWP except for bandwidth
memcpy
((
void
*
)
&
ubwp
->
bwp_Common
->
genericParameters
,
(
void
*
)
&
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
,
sizeof
(
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
));
ubwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
=
1
;
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
PRBalloc_to_locationandbandwidth
(
servingcellconfigcommon
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
0
);
}
ubwp
->
bwp_Id
=
bwp_loop
+
1
;
ubwp
->
bwp_Common
=
calloc
(
1
,
sizeof
(
*
ubwp
->
bwp_Common
));
// copy bwp_Common from Initial UL BWP except for bandwidth
memcpy
((
void
*
)
&
ubwp
->
bwp_Common
->
genericParameters
,
(
void
*
)
&
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
,
sizeof
(
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
));
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
PRBalloc_to_locationandbandwidth
(
servingcellconfigcommon
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
0
);
ubwp
->
bwp_Common
->
rach_ConfigCommon
=
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
;
ubwp
->
bwp_Common
->
pusch_ConfigCommon
=
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment