Commit b15c39d9 authored by francescomani's avatar francescomani

bugfix in pucch resource selection for csi meas report

parent 72fc7bfa
...@@ -2174,14 +2174,17 @@ uint8_t nr_get_csi_measurements(NR_UE_MAC_INST_t *mac, ...@@ -2174,14 +2174,17 @@ uint8_t nr_get_csi_measurements(NR_UE_MAC_INST_t *mac,
int n = pucchresset->resourceList.list.count; int n = pucchresset->resourceList.list.count;
int res_index; int res_index;
int found = -1;
for (res_index = 0; res_index < n; res_index++) { for (res_index = 0; res_index < n; res_index++) {
if (*pucchresset->resourceList.list.array[res_index] == pucchcsires->pucch_Resource) if (*pucchresset->resourceList.list.array[res_index] == pucchcsires->pucch_Resource) {
found = res_index;
break; break;
} }
AssertFatal(res_index < n, }
AssertFatal(found != -1,
"CSI resource not found among PUCCH resources\n"); "CSI resource not found among PUCCH resources\n");
pucch->resource_indicator = pucchcsires->pucch_Resource; pucch->resource_indicator = found;
csi_bits = nr_get_csi_payload(mac, pucch, csi_measconfig); csi_bits = nr_get_csi_payload(mac, pucch, csi_measconfig);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment