Commit 2a4153eb authored by Thomas Schlichter's avatar Thomas Schlichter

fixup previous merge with develop branch

parent a389e6f5
...@@ -474,7 +474,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -474,7 +474,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_reception_msg3(module_idP, 0, frame, slot); nr_schedule_reception_msg3(module_idP, 0, frame, slot);
} }
if (UE_list->fiveG_connected[UE_id]) { if (UE_info->active[UE_id]) {
// TbD once RACH is available, start ta_timer when UE is connected // TbD once RACH is available, start ta_timer when UE is connected
if (ue_sched_ctl->ta_timer) if (ue_sched_ctl->ta_timer)
ue_sched_ctl->ta_timer--; ue_sched_ctl->ta_timer--;
...@@ -504,9 +504,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -504,9 +504,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
//nr_update_pucch_scheduling(module_idP, UE_id, frame, slot, num_slots_per_tdd,&pucch_sched); //nr_update_pucch_scheduling(module_idP, UE_id, frame, slot, num_slots_per_tdd,&pucch_sched);
//nr_schedule_uss_dlsch_phytest(module_idP, frame, slot, &UE_info->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], NULL); //nr_schedule_uss_dlsch_phytest(module_idP, frame, slot, &UE_info->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], NULL);
nr_schedule_ue_spec(module_idP, frame, slot, num_slots_per_tdd); nr_schedule_ue_spec(module_idP, frame, slot, num_slots_per_tdd);
// resetting ta flag
gNB->ta_len = 0;
// TO BE CHECKED IF IT IS CORRECT TO KEEP THIS LINE!
ue_sched_ctl->ta_apply = false; ue_sched_ctl->ta_apply = false;
} }
......
...@@ -624,8 +624,8 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, ...@@ -624,8 +624,8 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
unsigned char sdu_lcids[NB_RB_MAX] = {0}; unsigned char sdu_lcids[NB_RB_MAX] = {0};
uint16_t sdu_lengths[NB_RB_MAX] = {0}; uint16_t sdu_lengths[NB_RB_MAX] = {0};
uint16_t rnti = UE_list->rnti[UE_id]; uint16_t rnti = UE_info->rnti[UE_id];
NR_UE_sched_ctrl_t *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *ue_sched_ctl = &UE_info->UE_sched_ctrl[UE_id];
uint8_t mac_sdus[MAX_NR_DLSCH_PAYLOAD_BYTES]; uint8_t mac_sdus[MAX_NR_DLSCH_PAYLOAD_BYTES];
......
...@@ -1633,8 +1633,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){ ...@@ -1633,8 +1633,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
UE_info->num_UEs); UE_info->num_UEs);
dump_nr_ue_list(&UE_info->list); dump_nr_ue_list(&UE_info->list);
for (i = 0; i < MAX_MOBILES_PER_GNB; i++) { for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) {
if (UE_list->active[i] == TRUE) if (UE_info->active[i])
continue; continue;
int UE_id = i; int UE_id = i;
...@@ -1645,11 +1645,11 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){ ...@@ -1645,11 +1645,11 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
memset((void *) &UE_info->UE_sched_ctrl[UE_id], memset((void *) &UE_info->UE_sched_ctrl[UE_id],
0, 0,
sizeof(NR_UE_sched_ctrl_t)); sizeof(NR_UE_sched_ctrl_t));
UE_list->UE_sched_ctrl[UE_id].ta_timer = 100; UE_info->UE_sched_ctrl[UE_id].ta_timer = 100;
UE_list->UE_sched_ctrl[UE_id].ta_update = 31; UE_info->UE_sched_ctrl[UE_id].ta_update = 31;
UE_list->UE_sched_ctrl[UE_id].ul_rssi = 0; UE_info->UE_sched_ctrl[UE_id].ul_rssi = 0;
UE_list->UE_sched_ctrl[UE_id].sched_pucch = (NR_sched_pucch *)malloc(num_slots_ul*sizeof(NR_sched_pucch)); UE_info->UE_sched_ctrl[UE_id].sched_pucch = (NR_sched_pucch *)malloc(num_slots_ul*sizeof(NR_sched_pucch));
UE_list->UE_sched_ctrl[UE_id].sched_pusch = (NR_sched_pusch *)malloc(num_slots_ul*sizeof(NR_sched_pusch)); UE_info->UE_sched_ctrl[UE_id].sched_pusch = (NR_sched_pusch *)malloc(num_slots_ul*sizeof(NR_sched_pusch));
for (int k=0; k<num_slots_ul; k++) { for (int k=0; k<num_slots_ul; k++) {
memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k], memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k],
0, 0,
...@@ -1681,23 +1681,22 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti) ...@@ -1681,23 +1681,22 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
{ {
int UE_id; int UE_id;
int i; int i;
NR_UE_list_t *UE_list = &RC.nrmac[mod_id]->UE_list; 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++) {
if (UE_list->active[i] != TRUE) if (UE_info->active[i] != TRUE)
continue; continue;
if (UE_list->rnti[i] != rnti) if (UE_info->rnti[i] != rnti)
continue; continue;
/* UE found, remove it */ /* UE found, remove it */
UE_id = i; UE_id = i;
UE_list->num_UEs--; UE_info->num_UEs--;
UE_list->fiveG_connected[UE_id] = FALSE; UE_info->active[UE_id] = FALSE;
UE_list->active[UE_id] = FALSE; UE_info->rnti[UE_id] = 0;
UE_list->rnti[UE_id] = 0; free(UE_info->UE_sched_ctrl[UE_id].sched_pucch);
free(UE_list->UE_sched_ctrl[UE_id].sched_pucch); free(UE_info->UE_sched_ctrl[UE_id].sched_pusch);
free(UE_list->UE_sched_ctrl[UE_id].sched_pusch); memset((void *) &UE_info->UE_sched_ctrl[UE_id],
memset((void *) &UE_list->UE_sched_ctrl[UE_id],
0, 0,
sizeof(NR_UE_sched_ctrl_t)); sizeof(NR_UE_sched_ctrl_t));
LOG_I(MAC, "[gNB %d] Remove NR UE_id %d : rnti %x\n", LOG_I(MAC, "[gNB %d] Remove NR UE_id %d : rnti %x\n",
......
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