Commit 71d56e78 authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

Remove MAC layer context from phy_procedures_lte_eNb.c to prevent phy-sim build from fail

parent 49ba4e56
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "assertions.h" #include "assertions.h"
#include "msc.h" #include "msc.h"
...@@ -1238,7 +1236,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { ...@@ -1238,7 +1236,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
//compute the expected ULSCH RX power (for the stats) //compute the expected ULSCH RX power (for the stats)
ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered
if (RC.mac != NULL) { /* ulsim dose not use RC.mac context. */ if (RC.mac != NULL) { /* ulsim does not use RC.mac context. */
if (ulsch_harq->cqi_crc_status == 1) { if (ulsch_harq->cqi_crc_status == 1) {
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
//if (((frame%10) == 0) || (frame < 50)) //if (((frame%10) == 0) || (frame < 50))
...@@ -1501,10 +1499,11 @@ static void do_release_harq(PHY_VARS_eNB *eNB, ...@@ -1501,10 +1499,11 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
LTE_DL_eNB_HARQ_t *dlsch0_harq = NULL; LTE_DL_eNB_HARQ_t *dlsch0_harq = NULL;
LTE_DL_eNB_HARQ_t *dlsch1_harq = NULL; LTE_DL_eNB_HARQ_t *dlsch1_harq = NULL;
int UE_id_mac = -1; int UE_id_mac = -1;
UE_sched_ctrl *UE_scheduling_control = NULL;
int harq_pid; int harq_pid;
int subframe_tx; int subframe_tx;
int frame_tx; int frame_tx;
UE_sched_ctrl *UE_scheduling_control = NULL;
UE_list_t *UE_list = NULL
AssertFatal(UE_id != -1, "No existing dlsch context\n"); AssertFatal(UE_id != -1, "No existing dlsch context\n");
AssertFatal(UE_id < NUMBER_OF_UE_MAX, "Returned UE_id %d >= %d (NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX); AssertFatal(UE_id < NUMBER_OF_UE_MAX, "Returned UE_id %d >= %d (NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX);
...@@ -1512,8 +1511,23 @@ static void do_release_harq(PHY_VARS_eNB *eNB, ...@@ -1512,8 +1511,23 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
dlsch0 = eNB->dlsch[UE_id][0]; dlsch0 = eNB->dlsch[UE_id][0];
dlsch1 = eNB->dlsch[UE_id][1]; dlsch1 = eNB->dlsch[UE_id][1];
UE_id_mac = find_UE_id(eNB->Mod_id, dlsch0->rnti); if (RC.mac != NULL) { /* dlsim does not use RC.mac context */
UE_scheduling_control = &(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[UE_id_mac]); UE_list = &(RC.mac[eNB->Mod_id]->UE_list);
/* Replicate "find_UE_id" from openair2/LAYER2/MAC/mac_proto.h */
for (int UE_id_temp = 0; UE_id_temp < MAX_MOBILES_PER_ENB; UE_id_temp++) {
if (UE_list->active[UE_id_temp] == TRUE) {
if (UE_list->UE_template[UE_list->pCC_id[UE_id_temp]][UE_id_temp].rnti == dlsch0->rnti) {
UE_id_mac = UE_id_temp;
break;
}
}
}
if (UE_id_mac != -1) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id_mac]);
}
}
if (eNB->frame_parms.frame_type == FDD) { if (eNB->frame_parms.frame_type == FDD) {
subframe_tx = (subframe + 6) % 10; subframe_tx = (subframe + 6) % 10;
...@@ -1555,9 +1569,11 @@ static void do_release_harq(PHY_VARS_eNB *eNB, ...@@ -1555,9 +1569,11 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
dlsch0_harq->status = SCH_IDLE; dlsch0_harq->status = SCH_IDLE;
dlsch0->harq_mask &= ~(1 << harq_pid); dlsch0->harq_mask &= ~(1 << harq_pid);
if (UE_scheduling_control != NULL) {
/* CDRX: PUCCH gives an ACK or no more repetitions, so reset corresponding HARQ RTT */ /* CDRX: PUCCH gives an ACK or no more repetitions, so reset corresponding HARQ RTT */
UE_scheduling_control->harq_rtt_timer[eNB->CC_id][harq_pid] = 0; UE_scheduling_control->harq_rtt_timer[eNB->CC_id][harq_pid] = 0;
} }
}
} else { } else {
/* Release all processes in the bundle that was acked, based on mask */ /* Release all processes in the bundle that was acked, based on mask */
......
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