Remove old RA process(es) when removing UE

In handover, we might need to remove a UE that we knew under it's
C-RNTI, for which we also have the RA process. Hence, when removing a UE
by RNTI, remove it also from RA.
This commit is contained in:
rmagueta
2024-10-25 20:10:25 +02:00
committed by Robert Schmidt
parent cddffe6f30
commit ecd941e946
@@ -2675,6 +2675,16 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti)
memcpy(UE_info->list, newUEs, sizeof(UE_info->list));
NR_SCHED_UNLOCK(&UE_info->mutex);
const int CC_id = 0;
NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id];
for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) {
NR_RA_t *ra = &cc->ra[i];
if (ra->rnti == UE->rnti) {
nr_clear_ra_proc(ra);
ra->cfra = 0;
}
}
delete_nr_ue_data(UE, nr_mac->common_channels, &UE_info->uid_allocator);
}