From 4d97a47e8e529116926d6fc6042aecf3175afe14 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Mon, 19 Sep 2022 14:08:40 +0100 Subject: [PATCH] Add comment and break in get_pusch_nb_antenna_ports() function --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 1635187848..5d63f1be0e 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -2717,10 +2717,14 @@ uint8_t get_pusch_nb_antenna_ports(NR_PUSCH_Config_t *pusch_Config, if(srs_config != NULL) { for(int rs = 0; rs < srs_config->srs_ResourceSetToAddModList->list.count; rs++) { NR_SRS_ResourceSet_t *srs_resource_set = srs_config->srs_ResourceSetToAddModList->list.array[rs]; - if(srs_resource_set->usage == NR_SRS_ResourceSet__usage_codebook) { + // When multiple SRS resources are configured by SRS-ResourceSet with usage set to 'codebook', + // the UE shall expect that higher layer parameters nrofSRS-Ports in SRS-Resource in SRS-ResourceSet + // shall be configured with the same value for all these SRS resources. + if (srs_resource_set->usage == NR_SRS_ResourceSet__usage_codebook) { NR_SRS_Resource_t *srs_resource = srs_config->srs_ResourceToAddModList->list.array[sri]; - AssertFatal(srs_resource != NULL,"SRS resource indicated by DCI does not exist\n"); - n_antenna_port = 1<nrofSRS_Ports; + AssertFatal(srs_resource != NULL, "SRS resource indicated by DCI does not exist\n"); + n_antenna_port = 1 << srs_resource->nrofSRS_Ports; + break; } } }