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
lizhongxiao
OpenXG-RAN
Commits
429f406c
Commit
429f406c
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
93 additions
and
74 deletions
+93
-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
+9
-0
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
429f406c
...
...
@@ -977,21 +977,7 @@ static void setup_pdschconfig(NR_PDSCH_Config_t *source, NR_PDSCH_Config_t *targ
target
->
rbg_Size
=
source
->
rbg_Size
;
UPDATE_MAC_IE
(
target
->
mcs_Table
,
source
->
mcs_Table
,
long
);
UPDATE_MAC_IE
(
target
->
maxNrofCodeWordsScheduledByDCI
,
source
->
maxNrofCodeWordsScheduledByDCI
,
long
);
target
->
prb_BundlingType
.
present
=
source
->
prb_BundlingType
.
present
;
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
;
}
UPDATE_MAC_NP_IE
(
target
->
prb_BundlingType
,
source
->
prb_BundlingType
,
struct
NR_PDSCH_Config__prb_BundlingType
);
AssertFatal
(
source
->
zp_CSI_RS_ResourceToAddModList
==
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
"
);
...
...
@@ -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
)
{
target
->
srs_ResourceSetId
=
source
->
srs_ResourceSetId
;
if
(
source
->
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
)
{
case
NR_SRS_ResourceSet__resourceType_PR_aperiodic
:
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
aperiodic
,
source
->
resourceType
.
choice
.
aperiodic
,
struct
NR_SRS_ResourceSet__resourceType__aperiodic
);
handle_aperiodic_srs_type
(
source
->
resourceType
.
choice
.
aperiodic
,
target
->
resourceType
.
choice
.
aperiodic
);
break
;
case
NR_SRS_ResourceSet__resourceType_PR_periodic
:
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
periodic
,
source
->
resourceType
.
choice
.
periodic
,
struct
NR_SRS_ResourceSet__resourceType__periodic
);
if
(
source
->
resourceType
.
choice
.
periodic
->
associatedCSI_RS
)
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
periodic
->
associatedCSI_RS
,
source
->
resourceType
.
choice
.
periodic
->
associatedCSI_RS
,
NR_NZP_CSI_RS_ResourceId_t
);
break
;
case
NR_SRS_ResourceSet__resourceType_PR_semi_persistent
:
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
semi_persistent
,
source
->
resourceType
.
choice
.
semi_persistent
,
struct
NR_SRS_ResourceSet__resourceType__semi_persistent
);
if
(
source
->
resourceType
.
choice
.
semi_persistent
->
associatedCSI_RS
)
UPDATE_MAC_IE
(
target
->
resourceType
.
choice
.
semi_persistent
->
associatedCSI_RS
,
source
->
resourceType
.
choice
.
semi_persistent
->
associatedCSI_RS
,
NR_NZP_CSI_RS_ResourceId_t
);
break
;
default:
break
;
}
}
target
->
usage
=
source
->
usage
;
UPDATE_MAC_IE
(
target
->
alpha
,
source
->
alpha
,
NR_Alpha_t
);
if
(
source
->
p0
)
...
...
@@ -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
)
{
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
)
{
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row1
:
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
default:
AssertFatal
(
false
,
"Invalid entry
\n
"
);
}
}
target
->
nrofPorts
=
source
->
nrofPorts
;
target
->
firstOFDMSymbolInTimeDomain
=
source
->
firstOFDMSymbolInTimeDomain
;
UPDATE_MAC_IE
(
target
->
firstOFDMSymbolInTimeDomain2
,
source
->
firstOFDMSymbolInTimeDomain2
,
long
);
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
429f406c
...
...
@@ -49,6 +49,15 @@
DESTINATION = tmp; \
} while(0); \
// Macro updates DESTINATION with configuration from ORIGIN by swapping elements
// Old configuration is freed after completing configuration
#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)
// 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
...
...
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