From 9e6b6ef9650cb5b2a99a154f44a414847eac5e8e Mon Sep 17 00:00:00 2001 From: matzakos Date: Tue, 11 Feb 2020 18:45:35 +0100 Subject: [PATCH] nr-ip-ul-nos1: Remove warnings --- cmake_targets/CMakeLists.txt | 1 - openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 8 ++++---- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 3 +-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 8 ++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 2 +- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 0699bb08c5..350a2a1f50 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1723,7 +1723,6 @@ set(NR_L2_SRC_UE ${NR_UE_RRC_DIR}/L2_interface_ue.c ${NR_UE_RRC_DIR}/main_ue.c ${NR_UE_RRC_DIR}/rrc_UE.c - ${LTE_RLC_SRC} ) set (MAC_SRC diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index be504a1587..348774b08a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -1076,7 +1076,7 @@ void nr_pusch_codeword_scrambling(uint8_t *in, - transform precoding */ -uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, +void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, unsigned char harq_pid, uint8_t frame, uint8_t slot, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 547dd523ca..4360149e60 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -42,6 +42,7 @@ #include "PHY/defs_nr_common.h" #include "PHY/TOOLS/tools_defs.h" #include "executables/nr-softmodem.h" +#include "LAYER2/NR_MAC_UE/mac_proto.h" //#define DEBUG_SCFDMA //#define DEBUG_PUSCH_MAPPING @@ -88,7 +89,7 @@ void nr_pusch_codeword_scrambling(uint8_t *in, } -uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, +void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, unsigned char harq_pid, uint8_t frame, uint8_t slot, @@ -205,7 +206,7 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, } //else if(uplink_counter == 0){ //if(!IS_SOFTMODEM_NOS1){ else{ - LOG_E(PHY, "Random data to be tranmsitted: \n"); + LOG_D(PHY, "Random data to be tranmsitted: \n"); for (i = 0; i < harq_process_ul_ue->TBS / 8; i++) { harq_process_ul_ue->a[i] = (unsigned char) rand(); //printf(" input encoder a[%d]=0x%02x\n",i,harq_process_ul_ue->a[i]); @@ -214,7 +215,7 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, } } else { LOG_E(PHY, "[phy_procedures_nrUE_TX] harq_process_ul_ue is NULL !!\n"); - return 0; + return; } //-----------------------------------------------------// @@ -427,7 +428,6 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, //////////////////////////////////////////////////////////////////////// LOG_D(PHY, "Is data existing ?: %d \n", data_existing); - return data_existing; } diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 6282e81066..1b62cb8731 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -2483,9 +2483,8 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, #endif uint8_t harq_pid = 0; //temporary implementation - uint8_t data_existing = 0; - data_existing = nr_ue_ulsch_procedures(ue, + nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 02749a70dd..bfbec72981 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -43,6 +43,7 @@ #include #include +//int mbms_rab_id = 2047; //#define ENABLE_MAC_PAYLOAD_DEBUG 1 @@ -2482,7 +2483,7 @@ uint8_t nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t subframe, uint8_t eNB_index, uint8_t *ulsch_buffer, uint16_t buflen, uint8_t *access_mode) { - uint8_t total_rlc_pdu_header_len = 0, rlc_pdu_header_len_last = 0; + uint8_t total_rlc_pdu_header_len = 0; int16_t buflen_remain = 0; uint8_t lcid = 0; uint16_t sdu_lengths[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -2490,8 +2491,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, uint16_t payload_offset = 0, num_sdus = 0; uint8_t ulsch_sdus[MAX_ULSCH_PAYLOAD_BYTES]; uint16_t sdu_length_total = 0; - unsigned short post_padding = 0, padding_len = 0; - int j; // used for padding + unsigned short post_padding = 0; rlc_buffer_occupancy_t lcid_buffer_occupancy_old = 0, lcid_buffer_occupancy_new = 0; @@ -2504,7 +2504,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, start_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu); #endif - NR_UE_MAC_INST_t *nr_ue_mac_inst = get_mac_inst(0); + //NR_UE_MAC_INST_t *nr_ue_mac_inst = get_mac_inst(0); // Check for DCCH first // TO DO: Multiplex in the order defined by the logical channel prioritization diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 4a8602d272..99f893506f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -561,7 +561,7 @@ void nr_process_mac_pdu( // This function is adapting code from the old // parse_header(...) and ue_send_sdu(...) functions of OAI LTE - uint8_t *pdu_ptr = pduP, rx_lcid, done = 0, i; + uint8_t *pdu_ptr = pduP, rx_lcid, done = 0; int pdu_len = mac_pdu_len; uint16_t mac_ce_len, mac_subheader_len, mac_sdu_len;