Commit c38dfae7 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/bugfix-free-ra-process' into integration_2021_w14

parents 8754cc1f 1a5f10be
...@@ -1705,6 +1705,7 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti) ...@@ -1705,6 +1705,7 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
{ {
int UE_id; int UE_id;
int i; int i;
int cc_id;
NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info; NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info;
for (i = 0; i < MAX_MOBILES_PER_GNB; i++) { for (i = 0; i < MAX_MOBILES_PER_GNB; i++) {
...@@ -1741,6 +1742,20 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti) ...@@ -1741,6 +1742,20 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
rnti_to_remove_count++; rnti_to_remove_count++;
if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1); if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1);
} }
/* clear RA process(es?) associated to the UE */
for (cc_id = 0; cc_id < NFAPI_CC_MAX; cc_id++) {
NR_COMMON_channels_t *cc = &RC.nrmac[mod_id]->common_channels[cc_id];
for (i = 0; i < NR_NB_RA_PROC_MAX; i++) {
if (cc->ra[i].rnti == rnti) {
LOG_D(MAC, "free RA process %d for rnti %d\n", i, rnti);
/* is it enough? */
cc->ra[i].cfra = false;
cc->ra[i].rnti = 0;
cc->ra[i].crnti = 0;
}
}
}
} }
uint8_t nr_get_tpc(int target, uint8_t cqi, int incr) { uint8_t nr_get_tpc(int target, uint8_t cqi, int incr) {
......
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