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
4582a952
Commit
4582a952
authored
Jan 09, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix to handle a scenario where a CHOICE ASN1 structure changes type in a reconfiguration
parent
f918be96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
74 deletions
+92
-74
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+84
-74
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+8
-0
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
4582a952
...
@@ -977,21 +977,7 @@ static void setup_pdschconfig(NR_PDSCH_Config_t *source, NR_PDSCH_Config_t *targ
...
@@ -977,21 +977,7 @@ static void setup_pdschconfig(NR_PDSCH_Config_t *source, NR_PDSCH_Config_t *targ
target
->
rbg_Size
=
source
->
rbg_Size
;
target
->
rbg_Size
=
source
->
rbg_Size
;
UPDATE_MAC_IE
(
target
->
mcs_Table
,
source
->
mcs_Table
,
long
);
UPDATE_MAC_IE
(
target
->
mcs_Table
,
source
->
mcs_Table
,
long
);
UPDATE_MAC_IE
(
target
->
maxNrofCodeWordsScheduledByDCI
,
source
->
maxNrofCodeWordsScheduledByDCI
,
long
);
UPDATE_MAC_IE
(
target
->
maxNrofCodeWordsScheduledByDCI
,
source
->
maxNrofCodeWordsScheduledByDCI
,
long
);
target
->
prb_BundlingType
.
present
=
source
->
prb_BundlingType
.
present
;
UPDATE_MAC_NP_IE
(
target
->
prb_BundlingType
,
source
->
prb_BundlingType
,
struct
NR_PDSCH_Config__prb_BundlingType
);
switch
(
source
->
prb_BundlingType
.
present
)
{
case
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
:
UPDATE_MAC_IE
(
target
->
prb_BundlingType
.
choice
.
staticBundling
,
source
->
prb_BundlingType
.
choice
.
staticBundling
,
struct
NR_PDSCH_Config__prb_BundlingType__staticBundling
);
break
;
case
NR_PDSCH_Config__prb_BundlingType_PR_dynamicBundling
:
UPDATE_MAC_IE
(
target
->
prb_BundlingType
.
choice
.
dynamicBundling
,
source
->
prb_BundlingType
.
choice
.
dynamicBundling
,
struct
NR_PDSCH_Config__prb_BundlingType__dynamicBundling
);
break
;
default:
break
;
}
AssertFatal
(
source
->
zp_CSI_RS_ResourceToAddModList
==
NULL
,
"Not handled
\n
"
);
AssertFatal
(
source
->
zp_CSI_RS_ResourceToAddModList
==
NULL
,
"Not handled
\n
"
);
AssertFatal
(
source
->
aperiodic_ZP_CSI_RS_ResourceSetsToAddModList
==
NULL
,
"Not handled
\n
"
);
AssertFatal
(
source
->
aperiodic_ZP_CSI_RS_ResourceSetsToAddModList
==
NULL
,
"Not handled
\n
"
);
AssertFatal
(
source
->
sp_ZP_CSI_RS_ResourceSetsToAddModList
==
NULL
,
"Not handled
\n
"
);
AssertFatal
(
source
->
sp_ZP_CSI_RS_ResourceSetsToAddModList
==
NULL
,
"Not handled
\n
"
);
...
@@ -1117,31 +1103,49 @@ static void setup_pucchconfig(NR_PUCCH_Config_t *source, NR_PUCCH_Config_t *targ
...
@@ -1117,31 +1103,49 @@ static void setup_pucchconfig(NR_PUCCH_Config_t *source, NR_PUCCH_Config_t *targ
}
}
}
}
static
void
handle_aperiodic_srs_type
(
struct
NR_SRS_ResourceSet__resourceType__aperiodic
*
source
,
struct
NR_SRS_ResourceSet__resourceType__aperiodic
*
target
)
{
target
->
aperiodicSRS_ResourceTrigger
=
source
->
aperiodicSRS_ResourceTrigger
;
if
(
source
->
csi_RS
)
UPDATE_MAC_IE
(
target
->
csi_RS
,
source
->
csi_RS
,
NR_NZP_CSI_RS_ResourceId_t
);
UPDATE_MAC_IE
(
target
->
slotOffset
,
source
->
slotOffset
,
long
);
if
(
source
->
ext1
&&
source
->
ext1
->
aperiodicSRS_ResourceTriggerList
)
UPDATE_MAC_IE
(
target
->
ext1
->
aperiodicSRS_ResourceTriggerList
,
source
->
ext1
->
aperiodicSRS_ResourceTriggerList
,
struct
NR_SRS_ResourceSet__resourceType__aperiodic__ext1__aperiodicSRS_ResourceTriggerList
);
}
static
void
setup_srsresourceset
(
NR_SRS_ResourceSet_t
*
target
,
NR_SRS_ResourceSet_t
*
source
)
static
void
setup_srsresourceset
(
NR_SRS_ResourceSet_t
*
target
,
NR_SRS_ResourceSet_t
*
source
)
{
{
target
->
srs_ResourceSetId
=
source
->
srs_ResourceSetId
;
target
->
srs_ResourceSetId
=
source
->
srs_ResourceSetId
;
if
(
source
->
srs_ResourceIdList
)
if
(
source
->
srs_ResourceIdList
)
UPDATE_MAC_IE
(
target
->
srs_ResourceIdList
,
source
->
srs_ResourceIdList
,
struct
NR_SRS_ResourceSet__srs_ResourceIdList
);
UPDATE_MAC_IE
(
target
->
srs_ResourceIdList
,
source
->
srs_ResourceIdList
,
struct
NR_SRS_ResourceSet__srs_ResourceIdList
);
target
->
resourceType
.
present
=
source
->
resourceType
.
present
;
if
(
target
->
resourceType
.
present
!=
source
->
resourceType
.
present
)
{
UPDATE_MAC_NP_IE
(
target
->
resourceType
,
source
->
resourceType
,
struct
NR_SRS_ResourceSet__resourceType
);
}
else
{
switch
(
source
->
resourceType
.
present
)
{
switch
(
source
->
resourceType
.
present
)
{
case
NR_SRS_ResourceSet__resourceType_PR_aperiodic
:
case
NR_SRS_ResourceSet__resourceType_PR_aperiodic
:
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
aperiodic
,
handle_aperiodic_srs_type
(
source
->
resourceType
.
choice
.
aperiodic
,
target
->
resourceType
.
choice
.
aperiodic
);
source
->
resourceType
.
choice
.
aperiodic
,
struct
NR_SRS_ResourceSet__resourceType__aperiodic
);
break
;
break
;
case
NR_SRS_ResourceSet__resourceType_PR_periodic
:
case
NR_SRS_ResourceSet__resourceType_PR_periodic
:
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
periodic
,
if
(
source
->
resourceType
.
choice
.
periodic
->
associatedCSI_RS
)
source
->
resourceType
.
choice
.
periodic
,
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
periodic
->
associatedCSI_RS
,
struct
NR_SRS_ResourceSet__resourceType__periodic
);
source
->
resourceType
.
choice
.
periodic
->
associatedCSI_RS
,
NR_NZP_CSI_RS_ResourceId_t
);
break
;
break
;
case
NR_SRS_ResourceSet__resourceType_PR_semi_persistent
:
case
NR_SRS_ResourceSet__resourceType_PR_semi_persistent
:
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
semi_persistent
,
if
(
source
->
resourceType
.
choice
.
semi_persistent
->
associatedCSI_RS
)
source
->
resourceType
.
choice
.
semi_persistent
,
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
semi_persistent
->
associatedCSI_RS
,
struct
NR_SRS_ResourceSet__resourceType__semi_persistent
);
source
->
resourceType
.
choice
.
semi_persistent
->
associatedCSI_RS
,
NR_NZP_CSI_RS_ResourceId_t
);
break
;
break
;
default:
default:
break
;
break
;
}
}
}
target
->
usage
=
source
->
usage
;
target
->
usage
=
source
->
usage
;
UPDATE_MAC_IE
(
target
->
alpha
,
source
->
alpha
,
NR_Alpha_t
);
UPDATE_MAC_IE
(
target
->
alpha
,
source
->
alpha
,
NR_Alpha_t
);
if
(
source
->
p0
)
if
(
source
->
p0
)
...
@@ -1546,7 +1550,12 @@ static void configure_maccellgroup(NR_UE_MAC_INST_t *mac, const NR_MAC_CellGroup
...
@@ -1546,7 +1550,12 @@ static void configure_maccellgroup(NR_UE_MAC_INST_t *mac, const NR_MAC_CellGroup
static
void
configure_csi_resourcemapping
(
NR_CSI_RS_ResourceMapping_t
*
target
,
NR_CSI_RS_ResourceMapping_t
*
source
)
static
void
configure_csi_resourcemapping
(
NR_CSI_RS_ResourceMapping_t
*
target
,
NR_CSI_RS_ResourceMapping_t
*
source
)
{
{
target
->
frequencyDomainAllocation
.
present
=
source
->
frequencyDomainAllocation
.
present
;
if
(
target
->
frequencyDomainAllocation
.
present
!=
source
->
frequencyDomainAllocation
.
present
)
{
UPDATE_MAC_NP_IE
(
target
->
frequencyDomainAllocation
,
source
->
frequencyDomainAllocation
,
struct
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation
);
}
else
{
switch
(
source
->
frequencyDomainAllocation
.
present
)
{
switch
(
source
->
frequencyDomainAllocation
.
present
)
{
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row1
:
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row1
:
target
->
frequencyDomainAllocation
.
choice
.
row1
.
size
=
source
->
frequencyDomainAllocation
.
choice
.
row1
.
size
;
target
->
frequencyDomainAllocation
.
choice
.
row1
.
size
=
source
->
frequencyDomainAllocation
.
choice
.
row1
.
size
;
...
@@ -1587,6 +1596,7 @@ static void configure_csi_resourcemapping(NR_CSI_RS_ResourceMapping_t *target, N
...
@@ -1587,6 +1596,7 @@ static void configure_csi_resourcemapping(NR_CSI_RS_ResourceMapping_t *target, N
default:
default:
AssertFatal
(
false
,
"Invalid entry
\n
"
);
AssertFatal
(
false
,
"Invalid entry
\n
"
);
}
}
}
target
->
nrofPorts
=
source
->
nrofPorts
;
target
->
nrofPorts
=
source
->
nrofPorts
;
target
->
firstOFDMSymbolInTimeDomain
=
source
->
firstOFDMSymbolInTimeDomain
;
target
->
firstOFDMSymbolInTimeDomain
=
source
->
firstOFDMSymbolInTimeDomain
;
UPDATE_MAC_IE
(
target
->
firstOFDMSymbolInTimeDomain2
,
source
->
firstOFDMSymbolInTimeDomain2
,
long
);
UPDATE_MAC_IE
(
target
->
firstOFDMSymbolInTimeDomain2
,
source
->
firstOFDMSymbolInTimeDomain2
,
long
);
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
4582a952
...
@@ -49,6 +49,14 @@
...
@@ -49,6 +49,14 @@
DESTINATION = tmp; \
DESTINATION = tmp; \
} while(0); \
} while(0); \
// Same as above but swapping ASN1 elements that are not pointers
#define UPDATE_MAC_NP_IE(DESTINATION, ORIGIN, TYPE) \
do { \
TYPE tmp = ORIGIN; \
ORIGIN = DESTINATION; \
DESTINATION = tmp; \
} while(0); \
// Macro handles reception of SetupRelease element ORIGIN (see NR_SetupRelease.h)
// Macro handles reception of SetupRelease element ORIGIN (see NR_SetupRelease.h)
// If release (NR_SetupRelease_xxx_PR_release equivalent to 1), removing structure from DESTINATION
// If release (NR_SetupRelease_xxx_PR_release equivalent to 1), removing structure from DESTINATION
// If setup (NR_SetupRelease_xxx_PR_setup equivalent to 2), add or modify structure in DESTINATION
// If setup (NR_SetupRelease_xxx_PR_setup equivalent to 2), add or modify structure in DESTINATION
...
...
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