From 33d72f6080a6740034178671c03ac5ab97a15e23 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 27 Nov 2024 18:10:19 +0100 Subject: [PATCH] fix C style, unefficient and complex --- executables/nr-ue.c | 3 --- openair1/SCHED_NR_UE/defs.h | 4 ---- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 4 +++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index d026b4f44a..5a30900c3d 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -586,9 +586,6 @@ void processSlotTX(void *arg) c16_t *txp[fp->nb_antennas_tx]; for (int i = 0; i < fp->nb_antennas_tx; i++) { txp[i] = UE->common_vars.txData[i] + fp->get_samples_slot_timestamp(proc->nr_slot_tx, fp, 0); - // We should not need to set it to 0 - // but in mixed slots, in TDD continuous tx (should not exist), ... we don't know the parts to ignore - memset(txp[i], 0, fp->get_samples_per_slot(proc->nr_slot_tx, fp) * sizeof(**txp)); } if (proc->tx_slot_type == NR_UPLINK_SLOT || proc->tx_slot_type == NR_MIXED_SLOT) { diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index da885d3a83..222788bce1 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -98,10 +98,6 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ void processSlotTX(void *arg); -/*! \brief UE PRACH procedures. - */ -void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txData); - int8_t nr_find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB); /*! \brief UL time alignment procedures for TA application diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index baa6d10449..7fbfa11790 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -81,6 +81,8 @@ static const unsigned int gain_table[31] = {100, 112, 126, 141, 158, 178, 359, 398, 447, 501, 562, 631, 708, 794, 891, 1000, 1122, 1258, 1412, 1585, 1778, 1995, 2239, 2512, 2818, 3162}; +static void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txData); + void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, fapi_nr_dci_indication_t *dci_ind, fapi_nr_rx_indication_t *rx_ind, @@ -1180,7 +1182,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ // todo: // - power control as per 38.213 ch 7.4 -void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txData) +static void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txData) { int gNB_id = proc->gNB_id; int frame_tx = proc->frame_tx, nr_slot_tx = proc->nr_slot_tx, prach_power; // tx_amp