Merge remote-tracking branch 'origin/fix-measGaps' into integration_2025_w48 (!3764)
Avoid measGap configuration on handover in intra-freq scenarios During the handover, we are incorrectly configuring the measGap, even though neighboring cells are on the same frequency. Since gNB is not expecting this measGap, the SRS scheduling is performed. Therefore, we are periodically receiving these logs after the handover: [NR_MAC] Invalid timing advance offset for RNTI 58e2 [NR_MAC] Invalid timing advance offset for RNTI 58e2 [NR_MAC] Invalid timing advance offset for RNTI 58e2 [NR_MAC] Invalid timing advance offset for RNTI 58e2 [NR_MAC] Invalid timing advance offset for RNTI 58e2 [NR_MAC] Invalid timing advance offset for RNTI 58e2 These logs occur at a time when UE is performing a MeasGap operation and not sending the SRS, while gNB thinks it will receive the SRS, but will not receive any SRS. This MR resolves this issue, and after the handover, these logs no longer appear.
This commit is contained in:
@@ -3407,26 +3407,7 @@ void rrc_gNB_generate_UeContextSetupRequest(const gNB_RRC_INST *rrc,
|
||||
}
|
||||
|
||||
nr_rrc_du_container_t *du = get_du_for_ue((gNB_RRC_INST *)rrc, ue_p->rrc_ue_id);
|
||||
byte_array_t *meas_timing_config = NULL;
|
||||
if (du->mtc && ue_p->measConfig && ue_p->measConfig->measObjectToAddModList) {
|
||||
NR_MeasObjectToAddModList_t *mo_list = ue_p->measConfig->measObjectToAddModList;
|
||||
NR_ARFCN_ValueNR_t ssbFrequency0;
|
||||
for (int i = 0; i < mo_list->list.count; i++) {
|
||||
NR_MeasObjectToAddMod_t *mo = mo_list->list.array[i];
|
||||
if (mo->measObject.present == NR_MeasObjectToAddMod__measObject_PR_measObjectNR) {
|
||||
NR_MeasObjectNR_t *monr = mo->measObject.choice.measObjectNR;
|
||||
if (i == 0) {
|
||||
ssbFrequency0 = *monr->ssbFrequency;
|
||||
} else if (ssbFrequency0 != *monr->ssbFrequency) {
|
||||
meas_timing_config = calloc_or_fail(1, sizeof(*meas_timing_config));
|
||||
meas_timing_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE);
|
||||
meas_timing_config->len = do_NR_MeasurementTimingConfiguration(du->mtc, meas_timing_config->buf, NR_RRC_BUF_SIZE);
|
||||
cu2du.meas_timing_config = meas_timing_config;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cu2du.meas_timing_config = get_meas_timing_config(du->mtc, ue_p->measConfig);
|
||||
|
||||
int nb_srb = 1;
|
||||
f1ap_srb_to_setup_t *srbs = calloc_or_fail(nb_srb, sizeof(*srbs));
|
||||
|
||||
@@ -192,12 +192,7 @@ static void nr_initiate_handover(const gNB_RRC_INST *rrc,
|
||||
meas_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE);
|
||||
meas_config->len = do_NR_MeasConfig(ue->measConfig, meas_config->buf, NR_RRC_BUF_SIZE);
|
||||
|
||||
byte_array_t *meas_timing_config = NULL;
|
||||
if (target_du->mtc) {
|
||||
meas_timing_config = calloc_or_fail(1, sizeof(*meas_timing_config));
|
||||
meas_timing_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE);
|
||||
meas_timing_config->len = do_NR_MeasurementTimingConfiguration(target_du->mtc, meas_timing_config->buf, NR_RRC_BUF_SIZE);
|
||||
}
|
||||
byte_array_t *meas_timing_config = get_meas_timing_config(target_du->mtc, ue->measConfig);
|
||||
|
||||
byte_array_t *hpi = malloc_or_fail(sizeof(*hpi));
|
||||
*hpi = copy_byte_array(*ho_prep_info);
|
||||
@@ -618,3 +613,31 @@ void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, uint32_t
|
||||
|
||||
nr_rrc_trigger_n2_ho(rrc, UE, scell_du->nr_pci, neighbour);
|
||||
}
|
||||
|
||||
// This function detects if there are at least two different ssbFrequency values, and if so, returns meas_timing_config;
|
||||
// otherwise, it returns NULL. When you return NULL, the measurement gaps will not be configured.
|
||||
byte_array_t *get_meas_timing_config(const NR_MeasurementTimingConfiguration_t *mtc, const NR_MeasConfig_t *measConfig)
|
||||
{
|
||||
if (!mtc || !measConfig || !measConfig->measObjectToAddModList)
|
||||
return NULL;
|
||||
|
||||
byte_array_t *meas_timing_config = NULL;
|
||||
NR_MeasObjectToAddModList_t *mo_list = measConfig->measObjectToAddModList;
|
||||
NR_ARFCN_ValueNR_t ssbFrequency0 = 0;
|
||||
for (int i = 0; i < mo_list->list.count; i++) {
|
||||
NR_MeasObjectToAddMod_t *mo = mo_list->list.array[i];
|
||||
if (mo->measObject.present != NR_MeasObjectToAddMod__measObject_PR_measObjectNR)
|
||||
continue;
|
||||
NR_MeasObjectNR_t *monr = mo->measObject.choice.measObjectNR;
|
||||
if (i == 0) {
|
||||
ssbFrequency0 = *monr->ssbFrequency;
|
||||
} else if (ssbFrequency0 != *monr->ssbFrequency) {
|
||||
meas_timing_config = calloc_or_fail(1, sizeof(*meas_timing_config));
|
||||
meas_timing_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE);
|
||||
meas_timing_config->len = do_NR_MeasurementTimingConfiguration(mtc, meas_timing_config->buf, NR_RRC_BUF_SIZE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return meas_timing_config;
|
||||
}
|
||||
|
||||
@@ -108,4 +108,6 @@ void rrc_gNB_trigger_reconfiguration_for_handover(gNB_RRC_INST *rrc, gNB_RRC_UE_
|
||||
|
||||
void nr_rrc_trigger_n2_ho_target(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue);
|
||||
|
||||
byte_array_t *get_meas_timing_config(const NR_MeasurementTimingConfiguration_t *mtc, const NR_MeasConfig_t *measConfig);
|
||||
|
||||
#endif /* RRC_GNB_MOBILITY_H_ */
|
||||
|
||||
Reference in New Issue
Block a user