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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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-RAN
Commits
805c968b
Commit
805c968b
authored
Nov 27, 2025
by
francescomani
Committed by
Robert Schmidt
Dec 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a check for BWP start and size validity in configuration
parent
ca0cc079
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+9
-8
No files found.
openair2/GNB_APP/gnb_config.c
View file @
805c968b
...
@@ -1368,7 +1368,7 @@ void nfapi_stop_l1()
...
@@ -1368,7 +1368,7 @@ void nfapi_stop_l1()
}
}
}
}
static
void
get_bwp_config
(
nr_mac_config_t
*
configuration
)
static
void
get_bwp_config
(
nr_mac_config_t
*
configuration
,
const
NR_ServingCellConfigCommon_t
*
scc
)
{
{
char
path
[
MAX_OPTNAME_SIZE
*
2
+
8
];
char
path
[
MAX_OPTNAME_SIZE
*
2
+
8
];
snprintf
(
path
,
sizeof
(
path
),
"%s.[%i]"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
);
snprintf
(
path
,
sizeof
(
path
),
"%s.[%i]"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
);
...
@@ -1377,10 +1377,13 @@ static void get_bwp_config(nr_mac_config_t *configuration)
...
@@ -1377,10 +1377,13 @@ static void get_bwp_config(nr_mac_config_t *configuration)
AssertFatal
(
configuration
->
num_additional_bwps
>=
0
&&
configuration
->
num_additional_bwps
<=
4
,
AssertFatal
(
configuration
->
num_additional_bwps
>=
0
&&
configuration
->
num_additional_bwps
<=
4
,
"Invalid number of additional BWPs %d
\n
"
,
"Invalid number of additional BWPs %d
\n
"
,
configuration
->
num_additional_bwps
);
configuration
->
num_additional_bwps
);
int
bw
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
;
for
(
int
i
=
0
;
i
<
configuration
->
num_additional_bwps
;
i
++
)
{
for
(
int
i
=
0
;
i
<
configuration
->
num_additional_bwps
;
i
++
)
{
configuration
->
bwp_config
[
i
].
id
=
i
+
1
;
configuration
->
bwp_config
[
i
].
id
=
i
+
1
;
int
bwp_start
=
*
BWPParamList
.
paramarray
[
i
][
GNB_BWP_START_IDX
].
iptr
;
int
bwp_start
=
*
BWPParamList
.
paramarray
[
i
][
GNB_BWP_START_IDX
].
iptr
;
AssertFatal
(
bwp_start
>=
0
&&
bwp_start
<
bw
,
"Invalid BWP start value %d
\n
"
,
bwp_start
);
int
bwp_size
=
*
BWPParamList
.
paramarray
[
i
][
GNB_BWP_SIZE_IDX
].
iptr
;
int
bwp_size
=
*
BWPParamList
.
paramarray
[
i
][
GNB_BWP_SIZE_IDX
].
iptr
;
AssertFatal
(
bwp_start
+
bwp_size
<=
bw
,
"BWP start %d and BWP size %d exceeds full BW %d
\n
"
,
bwp_start
,
bwp_size
,
bw
);
configuration
->
bwp_config
[
i
].
location_and_bw
=
PRBalloc_to_locationandbandwidth
(
bwp_size
,
bwp_start
);
configuration
->
bwp_config
[
i
].
location_and_bw
=
PRBalloc_to_locationandbandwidth
(
bwp_size
,
bwp_start
);
configuration
->
bwp_config
[
i
].
scs
=
*
BWPParamList
.
paramarray
[
i
][
GNB_BWP_SCS_IDX
].
iptr
;
configuration
->
bwp_config
[
i
].
scs
=
*
BWPParamList
.
paramarray
[
i
][
GNB_BWP_SCS_IDX
].
iptr
;
LOG_I
(
GNB_APP
,
LOG_I
(
GNB_APP
,
...
@@ -1418,12 +1421,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
...
@@ -1418,12 +1421,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
config
.
pdsch_AntennaPorts
.
XP
,
config
.
pdsch_AntennaPorts
.
XP
,
config
.
pusch_AntennaPorts
);
config
.
pusch_AntennaPorts
);
// BWP
get_bwp_config
(
&
config
);
AssertFatal
(
config
.
num_additional_bwps
<=
4
,
"Impossible to configure more than 4 additional BWPs
\n
"
);
config
.
first_active_bwp
=
*
GNBParamList
.
paramarray
[
0
][
GNB_1ST_ACTIVE_BWP_IDX
].
iptr
;
AssertFatal
(
config
.
first_active_bwp
<=
config
.
num_additional_bwps
,
"1st active BWP does not belog to the configured BWPs
\n
"
);
// RU
// RU
GET_PARAMS_LIST
(
RUParamList
,
RUParams
,
RUPARAMS_DESC
,
CONFIG_STRING_RU_LIST
,
NULL
);
GET_PARAMS_LIST
(
RUParamList
,
RUParams
,
RUPARAMS_DESC
,
CONFIG_STRING_RU_LIST
,
NULL
);
int
num_tx
=
0
;
int
num_tx
=
0
;
...
@@ -1524,7 +1521,11 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
...
@@ -1524,7 +1521,11 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
config
.
num_agg_level_candidates
[
PDCCH_AGG_LEVEL16
]);
config
.
num_agg_level_candidates
[
PDCCH_AGG_LEVEL16
]);
NR_ServingCellConfigCommon_t
*
scc
=
get_scc_config
(
cfg
,
config
.
minRXTXTIME
,
config
.
do_SRS
);
NR_ServingCellConfigCommon_t
*
scc
=
get_scc_config
(
cfg
,
config
.
minRXTXTIME
,
config
.
do_SRS
);
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
// BWP
get_bwp_config
(
&
config
,
scc
);
AssertFatal
(
config
.
num_additional_bwps
<=
4
,
"Impossible to configure more than 4 additional BWPs
\n
"
);
config
.
first_active_bwp
=
*
GNBParamList
.
paramarray
[
0
][
GNB_1ST_ACTIVE_BWP_IDX
].
iptr
;
AssertFatal
(
config
.
first_active_bwp
<=
config
.
num_additional_bwps
,
"1st active BWP does not belog to the configured BWPs
\n
"
);
if
(
MacRLC_ParamList
.
numelt
>
0
)
{
if
(
MacRLC_ParamList
.
numelt
>
0
)
{
/* NR RLC config is needed by mac_top_init_gNB() */
/* NR RLC config is needed by mac_top_init_gNB() */
...
...
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