Reset SRS power control adjustment state if p0 or alpha is provided
Reset h_b_f_c (SRS power control adjustment state) when SRS-ResourceSet p0 or alpha is provided by higher layers, accroding to 38.213 7.3.1.
This commit is contained in:
@@ -1280,7 +1280,7 @@ static void handle_aperiodic_srs_type(struct NR_SRS_ResourceSet__resourceType__a
|
|||||||
struct NR_SRS_ResourceSet__resourceType__aperiodic__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_UE_UL_BWP_t *bwp, 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)
|
||||||
@@ -1311,15 +1311,20 @@ static void setup_srsresourceset(NR_SRS_ResourceSet_t *target, NR_SRS_ResourceSe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
target->usage = source->usage;
|
target->usage = source->usage;
|
||||||
|
if (source->alpha) {
|
||||||
|
bwp->h_b_f_c = 0;
|
||||||
|
}
|
||||||
UPDATE_IE(target->alpha, source->alpha, NR_Alpha_t);
|
UPDATE_IE(target->alpha, source->alpha, NR_Alpha_t);
|
||||||
if (source->p0)
|
if (source->p0) {
|
||||||
|
bwp->h_b_f_c = 0;
|
||||||
UPDATE_IE(target->p0, source->p0, long);
|
UPDATE_IE(target->p0, source->p0, long);
|
||||||
|
}
|
||||||
if (source->pathlossReferenceRS)
|
if (source->pathlossReferenceRS)
|
||||||
UPDATE_IE(target->pathlossReferenceRS, source->pathlossReferenceRS, struct NR_PathlossReferenceRS_Config);
|
UPDATE_IE(target->pathlossReferenceRS, source->pathlossReferenceRS, struct NR_PathlossReferenceRS_Config);
|
||||||
UPDATE_IE(target->srs_PowerControlAdjustmentStates, source->srs_PowerControlAdjustmentStates, long);
|
UPDATE_IE(target->srs_PowerControlAdjustmentStates, source->srs_PowerControlAdjustmentStates, long);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_srsconfig(NR_SRS_Config_t *source, NR_SRS_Config_t *target)
|
static void setup_srsconfig(NR_UE_UL_BWP_t *bwp, NR_SRS_Config_t *source, NR_SRS_Config_t *target)
|
||||||
{
|
{
|
||||||
UPDATE_IE(target->tpc_Accumulation, source->tpc_Accumulation, long);
|
UPDATE_IE(target->tpc_Accumulation, source->tpc_Accumulation, long);
|
||||||
// SRS-Resource
|
// SRS-Resource
|
||||||
@@ -1337,14 +1342,25 @@ static void setup_srsconfig(NR_SRS_Config_t *source, NR_SRS_Config_t *target)
|
|||||||
srs_ResourceId);
|
srs_ResourceId);
|
||||||
}
|
}
|
||||||
// SRS-ResourceSet
|
// SRS-ResourceSet
|
||||||
if (source->srs_ResourceSetToAddModList) {
|
struct NR_SRS_Config__srs_ResourceSetToAddModList *source_srs_list = source->srs_ResourceSetToAddModList;
|
||||||
|
if (source_srs_list) {
|
||||||
if (!target->srs_ResourceSetToAddModList)
|
if (!target->srs_ResourceSetToAddModList)
|
||||||
target->srs_ResourceSetToAddModList = calloc(1, sizeof(*target->srs_ResourceSetToAddModList));
|
target->srs_ResourceSetToAddModList = calloc(1, sizeof(*target->srs_ResourceSetToAddModList));
|
||||||
ADDMOD_IE_FROMLIST_WFUNCTION(source->srs_ResourceSetToAddModList,
|
struct NR_SRS_Config__srs_ResourceSetToAddModList *target_srs_list = target->srs_ResourceSetToAddModList;
|
||||||
target->srs_ResourceSetToAddModList,
|
|
||||||
srs_ResourceSetId,
|
for (int i = 0; i < source_srs_list->list.count; i++) {
|
||||||
NR_SRS_ResourceSet_t,
|
long srs_resource_id = source_srs_list->list.array[i]->srs_ResourceSetId;
|
||||||
setup_srsresourceset);
|
int j;
|
||||||
|
for (j = 0; j < target_srs_list->list.count; j++) {
|
||||||
|
if (srs_resource_id == target_srs_list->list.array[j]->srs_ResourceSetId)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (j == target_srs_list->list.count) {
|
||||||
|
NR_SRS_ResourceSet_t *new = calloc(1, sizeof(*new));
|
||||||
|
ASN_SEQUENCE_ADD(&target_srs_list->list, new);
|
||||||
|
}
|
||||||
|
setup_srsresourceset(bwp, target_srs_list->list.array[j], source_srs_list->list.array[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (source->srs_ResourceSetToReleaseList) {
|
if (source->srs_ResourceSetToReleaseList) {
|
||||||
RELEASE_IE_FROMLIST(source->srs_ResourceSetToReleaseList,
|
RELEASE_IE_FROMLIST(source->srs_ResourceSetToReleaseList,
|
||||||
@@ -1459,7 +1475,7 @@ static void configure_dedicated_BWP_ul(NR_UE_MAC_INST_t *mac, int bwp_id, NR_BWP
|
|||||||
if (ul_dedicated->srs_Config->present == NR_SetupRelease_SRS_Config_PR_setup) {
|
if (ul_dedicated->srs_Config->present == NR_SetupRelease_SRS_Config_PR_setup) {
|
||||||
if (!bwp->srs_Config)
|
if (!bwp->srs_Config)
|
||||||
bwp->srs_Config = calloc(1, sizeof(*bwp->srs_Config));
|
bwp->srs_Config = calloc(1, sizeof(*bwp->srs_Config));
|
||||||
setup_srsconfig(ul_dedicated->srs_Config->choice.setup, bwp->srs_Config);
|
setup_srsconfig(bwp, ul_dedicated->srs_Config->choice.setup, bwp->srs_Config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssertFatal(!ul_dedicated->configuredGrantConfig, "configuredGrantConfig not supported\n");
|
AssertFatal(!ul_dedicated->configuredGrantConfig, "configuredGrantConfig not supported\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user