diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c index 1b5773320071d8d11eb975575ce27f25eee9bbe0..644391c3e62a073a930ee6d5ff4079f13a8f3aee 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c @@ -1089,6 +1089,7 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t return(9); else return((n+6)%10); + return 0; } uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 69cd78c0adaf2550ce8230e71bbfe28fee4afb46..7a347245e893ee015e183901322727c5c8f03652 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -732,7 +732,6 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) int i; LTE_eNB_UCI *uci; uint16_t tdd_multiplexing_mask=0; - int res; for (i=0;i<NUMBER_OF_UE_MAX;i++) { diff --git a/openair2/LAYER2/MAC/config_NB_IoT.h b/openair2/LAYER2/MAC/config_NB_IoT.h index 0e497e3b0f407b9c3da8fd7d357375a5596f8422..fb8c85ebed22570bd49907f3d3b4021f496ceb65 100644 --- a/openair2/LAYER2/MAC/config_NB_IoT.h +++ b/openair2/LAYER2/MAC/config_NB_IoT.h @@ -21,7 +21,7 @@ typedef enum operationModeInf{ iNB_IoTand_DifferentPCI_r13 = 2, guardband_r13 = 3, standalone_r13 = 4 -}operationModeInf_t; +} operationModeInf_t; ///SIB1_SchedulingInfo_NB_IoT_r13 typedef enum si_Periodicity{ @@ -32,14 +32,14 @@ typedef enum si_Periodicity{ si_Periodicity_rf1024=10240, si_Periodicity_rf2048=20480, si_Periodicity_rf4096=40960 -}si_Periodicity_NB_IoT; +} si_Periodicity_NB_IoT; typedef enum si_RepetitionPattern{ si_RepetitionPattern_every2ndRF=0, si_RepetitionPattern_every4thRF, si_RepetitionPattern_every8thRF, si_RepetitionPattern_every16thRF -}si_RepetitionPattern_NB_IoT; +} si_RepetitionPattern_NB_IoT; typedef enum sib_MappingInfo{ sib2_v=0x1, @@ -48,7 +48,7 @@ typedef enum sib_MappingInfo{ sib5_v=0x8, sib14_v=0x10, sib16_v=0x20 -}sib_MappingInfo_NB_IoT; +} sib_MappingInfo_NB_IoT; typedef enum si_TB{ si_TB_56=2, @@ -59,7 +59,7 @@ typedef enum si_TB{ si_TB_440=8, si_TB_552=8, si_TB_680=8 -}si_TB_NB_IoT; +} si_TB_NB_IoT; ///RACH_ConfigCommon configuration @@ -72,7 +72,7 @@ typedef enum ra_ResponseWindowSize{ ra_ResponseWindowSize_pp7=7, ra_ResponseWindowSize_pp8=8, ra_ResponseWindowSize_pp10=10 -}ra_ResponseWindowSize_NB_IoT; +} ra_ResponseWindowSize_NB_IoT; typedef enum mac_ContentionResolutionTimer{ mac_ContentionResolutionTimer_pp1=1, @@ -83,7 +83,7 @@ typedef enum mac_ContentionResolutionTimer{ mac_ContentionResolutionTimer_pp16=16, mac_ContentionResolutionTimer_pp32=32, mac_ContentionResolutionTimer_pp64=64 -}mac_ContentionResolutionTimer_NB_IoT; +} mac_ContentionResolutionTimer_NB_IoT; ///NPRACH_ConfigSIB configuration @@ -96,7 +96,7 @@ typedef enum nprach_Periodicity{ nprach_Periodicity_ms640=640, nprach_Periodicity_ms1280=1280, nprach_Periodicity_ms2560=2560 -}nprach_Periodicity_NB_IoT; +} nprach_Periodicity_NB_IoT; typedef enum nprach_StartTime{ nprach_StartTime_ms8=8, @@ -107,7 +107,7 @@ typedef enum nprach_StartTime{ nprach_StartTime_ms256=256, nprach_StartTime_ms512=512, nprach_StartTime_ms1024=1024 -}nprach_StartTime_NB_IoT; +} nprach_StartTime_NB_IoT; typedef enum nprach_SubcarrierOffset{ nprach_SubcarrierOffset_n0=0, @@ -117,21 +117,21 @@ typedef enum nprach_SubcarrierOffset{ nprach_SubcarrierOffset_n2=2, nprach_SubcarrierOffset_n18=18, nprach_SubcarrierOffset_n34=34 -}nprach_SubcarrierOffset_NB_IoT; +} nprach_SubcarrierOffset_NB_IoT; typedef enum nprach_NumSubcarriers{ nprach_NumSubcarriers_n12=12, nprach_NumSubcarriers_n24=24, nprach_NumSubcarriers_n36=36, nprach_NumSubcarriers_n48=48 -}nprach_NumSubcarriers_NB_IoT; +} nprach_NumSubcarriers_NB_IoT; typedef enum nprach_SubcarrierMSG3_RangeStart{ nprach_SubcarrierMSG3_RangeStart_zero=0, nprach_SubcarrierMSG3_RangeStart_oneThird=1/3, nprach_SubcarrierMSG3_RangeStart_twoThird=2/3, nprach_SubcarrierMSG3_RangeStart_one=1 -}nprach_SubcarrierMSG3_RangeStart_NB_IoT; +} nprach_SubcarrierMSG3_RangeStart_NB_IoT; typedef enum maxNumPreambleAttemptCE{ maxNumPreambleAttemptCE_n3=3, @@ -141,7 +141,7 @@ typedef enum maxNumPreambleAttemptCE{ maxNumPreambleAttemptCE_n7=7, maxNumPreambleAttemptCE_n8=8, maxNumPreambleAttemptCE_n10=10 -}maxNumPreambleAttemptCE_NB_IoT; +} maxNumPreambleAttemptCE_NB_IoT; typedef enum numRepetitionsPerPreambleAttempt{ numRepetitionsPerPreambleAttempt_n1=1, @@ -152,7 +152,7 @@ typedef enum numRepetitionsPerPreambleAttempt{ numRepetitionsPerPreambleAttempt_n32=32, numRepetitionsPerPreambleAttempt_n64=64, numRepetitionsPerPreambleAttempt_n128=128 -}numRepetitionsPerPreambleAttempt_NB_IoT; +} numRepetitionsPerPreambleAttempt_NB_IoT; typedef enum npdcch_NumRepetitions_RA{ npdcch_NumRepetitions_RA_r1=1, @@ -167,7 +167,7 @@ typedef enum npdcch_NumRepetitions_RA{ npdcch_NumRepetitions_RA_r512=512, npdcch_NumRepetitions_RA_r1024=1024, npdcch_NumRepetitions_RA_r2048=2048 -}npdcch_NumRepetitions_RA_NB_IoT; +} npdcch_NumRepetitions_RA_NB_IoT; typedef enum npdcch_StartSF_CSS_RA{ npdcch_StartSF_CSS_RA_v1dot5=3/2, @@ -178,14 +178,14 @@ typedef enum npdcch_StartSF_CSS_RA{ npdcch_StartSF_CSS_RA_v32=32, npdcch_StartSF_CSS_RA_v48=48, npdcch_StartSF_CSS_RA_v64=64 -}npdcch_StartSF_CSS_RA_NB_IoT; +} npdcch_StartSF_CSS_RA_NB_IoT; typedef enum npdcch_Offset_RA{ zero=0, oneEighth=1/8, oneFourth=1/4, threeEighth=3/8 -}npdcch_Offset_RA_NB_IoT; +} npdcch_Offset_RA_NB_IoT; typedef enum si_window_length_e{ ms160=160, @@ -195,7 +195,7 @@ typedef enum si_window_length_e{ ms960=960, ms1280=1280, ms1600=1600 -}si_window_length_t; +} si_window_length_t; typedef enum si_periodicity_e{ rf64=640, @@ -205,14 +205,14 @@ typedef enum si_periodicity_e{ rf1024=10240, rf2048=20480, rf4096=40960 -}si_periodicity_t; +} si_periodicity_t; typedef enum si_repetition_pattern_e{ every2ndRF=20, every4thRF=40, every8thRF=80, every16thRF=160 -}si_repetition_pattern_t; +} si_repetition_pattern_t; typedef enum si_tb_e{ b56=2, @@ -223,7 +223,7 @@ typedef enum si_tb_e{ b440=8, b552=8, b680=8 -}si_tb_t; +} si_tb_t; typedef struct sibs_NB_IoT_sched_s{ @@ -232,21 +232,21 @@ typedef struct sibs_NB_IoT_sched_s{ sib_MappingInfo_NB_IoT sib_mapping_info; //bit vector si_tb_t si_tb; -}sibs_NB_IoT_sched_t; +} sibs_NB_IoT_sched_t; ///-------------------------------------------------------MAC--------------------------------------------------------------------/// typedef struct sib1_NB_IoT_sched_s{ int repetitions; // 4, 8, 16 int starting_rf; -}sib1_NB_IoT_sched_t; +} sib1_NB_IoT_sched_t; typedef struct { uint32_t mac_ra_ResponseWindowSize_NB_IoT; uint32_t mac_ContentionResolutionTimer_NB_IoT; -}mac_RACH_ConfigCommon_NB_IoT; +} mac_RACH_ConfigCommon_NB_IoT; typedef struct { @@ -262,7 +262,7 @@ typedef struct { uint32_t mac_npdcch_StartSF_CSS_RA_NB_IoT; // G uint32_t mac_npdcch_Offset_RA_NB_IoT; // alpha offset -}mac_NPRACH_ConfigSIB_NB_IoT; +} mac_NPRACH_ConfigSIB_NB_IoT; typedef struct{ //npdcch-NumRepetitions-r13 @@ -271,7 +271,7 @@ typedef struct{ double G; //npdcch-Offset-USS-r13 double a_offset; -}npdcch_ConfigDedicated_NB_IoT; +} npdcch_ConfigDedicated_NB_IoT; typedef struct rrc_config_NB_IoT_s{ @@ -296,6 +296,6 @@ typedef struct rrc_config_NB_IoT_s{ ///NPDCCH Dedicated config npdcch_ConfigDedicated_NB_IoT npdcch_ConfigDedicated[3]; -}rrc_config_NB_IoT_t; +} rrc_config_NB_IoT_t; #endif diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 7e26ceda5255c38b1ab264d6ab94c2c7f899e830..f59d7505ee3fee3c2081c06c2ac79a77cff902d6 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -33,34 +33,9 @@ #ifndef __PDCP_H__ # define __PDCP_H__ -//----------------------------------------------------------------------------- -# ifdef PDCP_C # define private_pdcp(x) x # define protected_pdcp(x) x # define public_pdcp(x) x -# else -# define private_pdcp(x) -# define public_pdcp(x) extern x -# ifdef PDCP_FIFO_C -# define protected_pdcp(x) extern x -# else -# define protected_pdcp(x) -# endif -# endif - -# ifdef PDCP_FIFO_C -# define private_pdcp_fifo(x) x -# define protected_pdcp_fifo(x) x -# define public_pdcp_fifo(x) x -# else -# define private_pdcp_fifo(x) -# define public_pdcp_fifo(x) extern x -# ifdef PDCP_C -# define protected_pdcp_fifo(x) extern x -# else -# define protected_pdcp_fifo(x) -# endif -# endif //----------------------------------------------------------------------------- #ifndef NON_ACCESS_STRATUM #include "UTIL/MEM/mem_block.h" @@ -416,14 +391,10 @@ public_pdcp(int pdcp_netlink_init (void);) #define PDCP2NW_DRIVER_FIFO 21 #define NW_DRIVER2PDCP_FIFO 22 -protected_pdcp_fifo(int pdcp_fifo_flush_sdus ( - const protocol_ctxt_t* const ctxt_pP);) -protected_pdcp_fifo(int pdcp_fifo_read_input_sdus_remaining_bytes ( - const protocol_ctxt_t* const ctxt_pP);) -protected_pdcp_fifo(int pdcp_fifo_read_input_sdus ( - const protocol_ctxt_t* const ctxt_pP);) -protected_pdcp_fifo(void pdcp_fifo_read_input_sdus_from_otg ( - const protocol_ctxt_t* const ctxt_pP);) +int pdcp_fifo_flush_sdus ( const protocol_ctxt_t* const ctxt_pP); +int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t* const ctxt_pP); +int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t* const ctxt_pP); +void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t* const ctxt_pP); //----------------------------------------------------------------------------- diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c index 7af03529645a1415d76c934919020bc8800ac4c1..6951b27074877ae845ab5f74294b8c89b65765a2 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c @@ -200,7 +200,7 @@ void config_req_rlc_am ( const protocol_ctxt_t* const ctxt_pP, const srb_flag_t srb_flagP, - rlc_am_info_t * const config_am_pP, + const rlc_am_info_t * config_am_pP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP ) diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h index 040145f7f03c1da8db15b77f979d0c155ef9e1cf..42ab61c5a9113d4caf475d238dca1d0d14385505 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h @@ -35,21 +35,9 @@ # ifndef __RLC_AM_H__ # define __RLC_AM_H__ -# ifdef RLC_AM_C -# define private_rlc_am(x) -# define protected_rlc_am(x) -# define public_rlc_am(x) -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am(x) -# define protected_rlc_am(x) extern x -# define public_rlc_am(x) extern x -# else -# define private_rlc_am(x) -# define protected_rlc_am(x) -# define public_rlc_am(x) extern x -# endif -# endif +# define private_rlc_am(x) x +# define protected_rlc_am(x) x +# define public_rlc_am(x) x # include "platform_types.h" # include "rlc_def.h" # include "rlc_def_lte.h" @@ -133,12 +121,14 @@ public_rlc_am(void rlc_am_release ( * \param[in] rb_idP Radio bearer identifier. * \param[in] chan_idP Transport channel identifier. */ -public_rlc_am(void config_req_rlc_am ( - const protocol_ctxt_t* const ctxtP, - const srb_flag_t srb_flagP, - const rlc_am_info_t * const config_amP, - const rb_id_t rb_idP, - const logical_chan_id_t chan_idP);) +void +config_req_rlc_am ( + const protocol_ctxt_t* const ctxt_pP, + const srb_flag_t srb_flagP, + const rlc_am_info_t * config_am_pP, + const rb_id_t rb_idP, + const logical_chan_id_t chan_idP +); /*! \fn void config_req_rlc_am_asn1 (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, struct RLC_Config__am * config_amP, rb_id_t rb_idP, logical_chan_id_t chan_idP) * \brief Configure the UL and DL parameters of the RLC AM with the asn1c autogenerated pameters structs @@ -254,7 +244,11 @@ public_rlc_am(void rlc_am_stat_req ( * \param[in] ctxt_pP Running context. * \param[in] rlc_pP RLC AM protocol instance pointer. */ -private_rlc_am( void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP,void * const rlc_pP);) +void +rlc_am_get_pdus ( + const protocol_ctxt_t* const ctxt_pP, + rlc_am_entity_t * const rlc_pP +); /*! \fn void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indication) * \brief Process the received PDUs from lower layer. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h index 43503a1b3a014169ddcc2741044f2cf2e2a385fa..fbf2441f16d8a2137f19c3117929e2a872c41275 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h @@ -34,22 +34,9 @@ */ # ifndef __RLC_AM_IN_SDU_H__ # define __RLC_AM_IN_SDU_H__ -//----------------------------------------------------------------------------- -# ifdef RLC_AM_IN_SDU_C # define private_rlc_am_in_sdu(x) x # define protected_rlc_am_in_sdu(x) x # define public_rlc_am_in_sdu(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_in_sdu(x) -# define protected_rlc_am_in_sdu(x) extern x -# define public_rlc_am_in_sdu(x) extern x -# else -# define private_rlc_am_in_sdu(x) -# define protected_rlc_am_in_sdu(x) -# define public_rlc_am_in_sdu(x) extern x -# endif -# endif /*! \fn void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP) * \brief Free a higher layer SDU stored in input_sdus[] buffer. * \param[in] ctxtP Running context. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h index c69fd3766e4554e043598825f3f61ca68b3de987..16bfe61a210f7ecad0d94e2eed0d3f148e049962 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h @@ -37,21 +37,9 @@ # include "UTIL/MEM/mem_block.h" //----------------------------------------------------------------------------- -# ifdef RLC_AM_INIT_C # define private_rlc_am_init(x) x # define protected_rlc_am_init(x) x # define public_rlc_am_init(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_init(x) -# define protected_rlc_am_init(x) extern x -# define public_rlc_am_init(x) extern x -# else -# define private_rlc_am_init(x) -# define protected_rlc_am_init(x) -# define public_rlc_am_init(x) extern x -# endif -# endif //----------------------------------------------------------------------------- #include "platform_types.h" #include "platform_constants.h" diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h index 82148a4a377899c4a98c5b0a2909e79764a3d846..c6b33f5a0dc4060ce4cfd2927d6476919a2bdc87 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h @@ -34,21 +34,9 @@ */ #ifndef __RLC_AM_REASSEMBLY_H__ # define __RLC_AM_REASSEMBLY_H__ -# ifdef RLC_AM_REASSEMBLY_C # define private_rlc_am_reassembly(x) x # define protected_rlc_am_reassembly(x) x # define public_rlc_am_reassembly(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_reassembly(x) -# define protected_rlc_am_reassembly(x) extern x -# define public_rlc_am_reassembly(x) extern x -# else -# define private_rlc_am_reassembly(x) -# define protected_rlc_am_reassembly(x) -# define public_rlc_am_reassembly(x) extern x -# endif -# endif /*! \fn void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP) * \brief Reset the data cursor index in the output SDU buffer to zero. * \param[in] ctxtP Running context. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h index 9d2978b0f8a6566cef8418f0a112b2c489767e37..eb0f7c6d92ac6990328dfd3b008654e6cdd1e4d6 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h @@ -34,21 +34,9 @@ */ # ifndef __RLC_AM_RECEIVER_H__ # define __RLC_AM_RECEIVER_H__ -# ifdef RLC_AM_RECEIVER_C # define private_rlc_am_receiver(x) x # define protected_rlc_am_receiver(x) x # define public_rlc_am_receiver(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_receiver(x) -# define protected_rlc_am_receiver(x) extern x -# define public_rlc_am_receiver(x) extern x -# else -# define private_rlc_am_receiver(x) -# define protected_rlc_am_receiver(x) -# define public_rlc_am_receiver(x) extern x -# endif -# endif /*! \fn signed int rlc_am_get_data_pdu_infos( const protocol_ctxt_t* const ctxt_pP, const rlc_am_entity_t * const rlc_pP,rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP) * \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU. * \param[in] ctxt_pP Running context. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h index 60fefab84b22c17ce36bd87401d5ee170ca8e088..5bbeeb0d20274e1f06ec2025c93ab22234100d71 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h @@ -35,21 +35,9 @@ # ifndef __RLC_AM_RETRANSMIT_H__ # define __RLC_AM_RETRANSMIT_H__ //----------------------------------------------------------------------------- -# ifdef RLC_AM_RETRANSMIT_C # define private_rlc_am_retransmit(x) x # define protected_rlc_am_retransmit(x) x # define public_rlc_am_retransmit(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_retransmit(x) -# define protected_rlc_am_retransmit(x) extern x -# define public_rlc_am_retransmit(x) extern x -# else -# define private_rlc_am_retransmit(x) -# define protected_rlc_am_retransmit(x) -# define public_rlc_am_retransmit(x) extern x -# endif -# endif /*! \fn boolean_t rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP) * \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields. * \param[in] ctxtP Running context. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h index 9dcc75223dc6d543f1be05dfdfc43af51473760b..f5438e27bfc691c6140fc2746ae4599baa94aa8c 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h @@ -37,22 +37,9 @@ # define __RLC_AM_RX_LIST_H__ # include "UTIL/MEM/mem_block.h" -//----------------------------------------------------------------------------- -# ifdef RLC_AM_RX_LIST_C # define private_rlc_am_rx_list(x) x # define protected_rlc_am_rx_list(x) x # define public_rlc_am_rx_list(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_rx_list(x) -# define protected_rlc_am_rx_list(x) extern x -# define public_rlc_am_rx_list(x) extern x -# else -# define private_rlc_am_rx_list(x) -# define protected_rlc_am_rx_list(x) -# define public_rlc_am_rx_list(x) extern x -# endif -# endif //----------------------------------------------------------------------------- #include "platform_types.h" #include "platform_constants.h" diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h index aa5cb6dceb25ecd00576cea224b1eca1b9909007..10bc563f0dc0c88ecec9614d4f4c7ed5cf38c2da 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h @@ -35,21 +35,9 @@ # ifndef __RLC_AM_SEGMENT_H__ # define __RLC_AM_SEGMENT_H__ //----------------------------------------------------------------------------- -# ifdef RLC_AM_SEGMENT_C # define private_rlc_am_segment(x) x # define protected_rlc_am_segment(x) x # define public_rlc_am_segment(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_segment(x) -# define protected_rlc_am_segment(x) extern x -# define public_rlc_am_segment(x) extern x -# else -# define private_rlc_am_segment(x) -# define protected_rlc_am_segment(x) -# define public_rlc_am_segment(x) extern x -# endif -# endif /*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu) * \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h index 7c22697ac42b08186856287ab4d222c310f9d2cf..2957db367aab8171836051af17c4d39f13fcf3f9 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h @@ -36,21 +36,9 @@ #ifndef __RLC_AM_SEGMENT_HOLES_H__ # define __RLC_AM_SEGMENT_HOLES_H__ //----------------------------------------------------------------------------- -# ifdef RLC_AM_SEGMENT_HOLES_C # define private_rlc_am_segments_holes(x) x # define protected_rlc_am_segments_holes(x) x # define public_rlc_am_segments_holes(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_segments_holes(x) -# define protected_rlc_am_segments_holes(x) extern x -# define public_rlc_am_segments_holes(x) extern x -# else -# define private_rlc_am_segments_holes(x) -# define protected_rlc_am_segments_holes(x) -# define public_rlc_am_segments_holes(x) extern x -# endif -# endif /*! \fn void rlc_am_clear_holes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP) * \brief Remove all marked holes for PDU with sequence number "snP". * \param[in] ctxt_pP Running context. diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h index 41f214d7c6cc54c87d4fcc6b5aefeece7ebd6efc..877625ef0e406c293cad3eae8b81feb3d57a0fa0 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h @@ -37,21 +37,9 @@ # include "UTIL/MEM/mem_block.h" //----------------------------------------------------------------------------- -# ifdef RLC_AM_STATUS_REPORT_C # define private_rlc_am_status_report(x) x # define protected_rlc_am_status_report(x) x # define public_rlc_am_status_report(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_status_report(x) -# define protected_rlc_am_status_report(x) extern x -# define public_rlc_am_status_report(x) extern x -# else -# define private_rlc_am_status_report(x) -# define protected_rlc_am_status_report(x) -# define public_rlc_am_status_report(x) extern x -# endif -# endif //----------------------------------------------------------------------------- #include "platform_types.h" #include "platform_constants.h" diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h index b42800e15f3a3799920075dec308d34fbce530c7..85c87f98097f1c44c0e09b022b711ed5daee9619 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h @@ -32,21 +32,9 @@ */ # ifndef __RLC_AM_TEST_H__ # define __RLC_AM_TEST_H__ -# ifdef RLC_AM_TEST_C # define private_rlc_am_test(x) x # define protected_rlc_am_test(x) x # define public_rlc_am_test(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_test(x) -# define protected_rlc_am_test(x) extern x -# define public_rlc_am_test(x) extern x -# else -# define private_rlc_am_test(x) -# define protected_rlc_am_test(x) -# define public_rlc_am_test(x) extern x -# endif -# endif public_rlc_am_test(rlc_am_entity_t g_am_tx;) public_rlc_am_test(rlc_am_entity_t g_am_rx;) diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h index c5d49268c4d0f95e299eea9dfa1d066bf226e94d..7123abbe9d0f008e54e08b47ae5e6d05916f9cc1 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h @@ -35,21 +35,9 @@ #ifndef __RLC_AM_TIMER_POLL_RETRANSMIT_H__ # define __RLC_AM_TIMER_POLL_RETRANSMIT_H__ -# ifdef RLC_AM_TIMER_POLL_RETRANSMIT_C # define private_rlc_am_timer_poll_retransmit(x) x # define protected_rlc_am_timer_poll_retransmit(x) x # define public_rlc_am_timer_poll_retransmit(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_timer_poll_retransmit(x) -# define protected_rlc_am_timer_poll_retransmit(x) extern x -# define public_rlc_am_timer_poll_retransmit(x) extern x -# else -# define private_rlc_am_timer_poll_retransmit(x) -# define protected_rlc_am_timer_poll_retransmit(x) -# define public_rlc_am_timer_poll_retransmit(x) extern x -# endif -# endif /*! \fn void rlc_am_check_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP) * \brief Check if timer Poll-retransmit has timed-out, if so it is stopped and has the status "timed-out". diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h index a2876d91694b91a66202a66c87f4c3a2943a700b..7727ce6658f89060bac8f0583051e537e1c0b5d5 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h @@ -34,21 +34,9 @@ */ #ifndef __RLC_AM_TIMER_REORDERING_H__ # define __RLC_AM_TIMER_REORDERING_H__ -# ifdef RLC_AM_TIMER_POLL_REORDERING_C # define private_rlc_am_timer_reordering(x) x # define protected_rlc_am_timer_reordering(x) x # define public_rlc_am_timer_reordering(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_timer_reordering(x) -# define protected_rlc_am_timer_reordering(x) extern x -# define public_rlc_am_timer_reordering(x) extern x -# else -# define private_rlc_am_timer_reordering(x) -# define protected_rlc_am_timer_reordering(x) -# define public_rlc_am_timer_reordering(x) extern x -# endif -# endif /*! \fn void rlc_am_check_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP) * \brief Check if timer reordering has timed-out, if so it is stopped and has the status "timed-out". diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h index 31ff985e414a0e1c41e3a63d2786ce9f5000fcf4..824d445ad8eb9c8e7ac2e9766ac18bdceb864094 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h @@ -34,21 +34,10 @@ */ #ifndef __RLC_AM_TIMER_STATUS_PROHIBIT_H__ # define __RLC_AM_TIMER_STATUS_PROHIBIT_H__ -# ifdef RLC_AM_TIMER_STATUS_PROHIBIT_C + # define private_rlc_am_timer_status_prohibit(x) x # define protected_rlc_am_timer_status_prohibit(x) x # define public_rlc_am_timer_status_prohibit(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_timer_status_prohibit(x) -# define protected_rlc_am_timer_status_prohibit(x) extern x -# define public_rlc_am_timer_status_prohibit(x) extern x -# else -# define private_rlc_am_timer_status_prohibit(x) -# define protected_rlc_am_timer_status_prohibit(x) -# define public_rlc_am_timer_status_prohibit(x) extern x -# endif -# endif /*! \fn void rlc_am_check_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP) * \brief Check if timer status-prohibit has timed-out, if so it is stopped and has the status "timed-out". diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h index aff78a15c6e21c4298f7c813372c8822597b3b7d..cb5cd9003a6e4db0efe3a3f287daba372565427e 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h @@ -35,21 +35,9 @@ # ifndef __RLC_AM_WINDOWS_H__ # define __RLC_AM_WINDOWS_H__ //----------------------------------------------------------------------------- -# ifdef RLC_AM_WINDOWS_C # define private_rlc_am_windows(x) x # define protected_rlc_am_windows(x) x # define public_rlc_am_windows(x) x -# else -# ifdef RLC_AM_MODULE -# define private_rlc_am_windows(x) -# define protected_rlc_am_windows(x) extern x -# define public_rlc_am_windows(x) extern x -# else -# define private_rlc_am_windows(x) -# define protected_rlc_am_windows(x) -# define public_rlc_am_windows(x) extern x -# endif -# endif /*! \fn signed int rlc_am_in_tx_window(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP) * \brief Boolean function, check if sequence number is VT(A) <= snP < VT(MS). diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h index a0049e4c2a5d89ab3f315c23ba8247019105eb61..2c5b2d9288df6ed921bb93f113dbe3fd3f207031 100644 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h @@ -34,21 +34,9 @@ */ # ifndef __RLC_TM_H__ # define __RLC_TM_H__ -# ifdef RLC_TM_C -# define private_rlc_tm(x) -# define protected_rlc_tm(x) -# define public_rlc_tm(x) -# else -# ifdef RLC_TM_MODULE -# define private_rlc_tm(x) -# define protected_rlc_tm(x) extern x -# define public_rlc_tm(x) extern x -# else -# define private_rlc_tm(x) -# define protected_rlc_tm(x) -# define public_rlc_tm(x) extern x -# endif -# endif +# define private_rlc_tm(x) x +# define protected_rlc_tm(x) x +# define public_rlc_tm(x) x # include "platform_types.h" # include "rlc_def.h" # include "rlc_def_lte.h" @@ -111,11 +99,12 @@ private_rlc_tm( void rlc_tm_rx ( * \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU. * \return The maximum number of bytes that can be served by RLC instance to MAC. */ -public_rlc_tm( struct mac_status_resp rlc_tm_mac_status_indication ( - const protocol_ctxt_t* const ctxt_pP, - void * const rlcP, - const uint16_t tb_sizeP, - struct mac_status_ind tx_statusP);) +struct mac_status_resp +rlc_tm_mac_status_indication ( + const protocol_ctxt_t* const ctxt_pP, + void * const rlc_pP, + const tb_size_t tb_sizeP, + struct mac_status_ind tx_statusP); /*! \fn struct mac_data_req rlc_tm_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void * const rlcP) diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h index 35e6c792aea248aaabb73ffad819af5de6a47c65..f370f2aab85f40364fa808a4df401423242f57d2 100644 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h @@ -42,21 +42,9 @@ //# include "rlc.h" # include "platform_types.h" //----------------------------------------------------------------------------- -# ifdef RLC_TM_INIT_C # define private_rlc_tm_init(x) x # define protected_rlc_tm_init(x) x # define public_rlc_tm_init(x) x -# else -# ifdef RLC_TM_MODULE -# define private_rlc_tm_init(x) -# define protected_rlc_tm_init(x) extern x -# define public_rlc_tm_init(x) extern x -# else -# define private_rlc_tm_init(x) -# define protected_rlc_tm_init(x) -# define public_rlc_tm_init(x) extern x -# endif -# endif typedef volatile struct rlc_tm_info_s { uint8_t is_uplink_downlink; diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h index abf4f8ad6e991a59fd7e98c086b7d557f51f969f..7fe59eab84f26c50e61e9fe207c788fe158f2f7f 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h @@ -34,21 +34,9 @@ */ # ifndef __RLC_UM_H__ # define __RLC_UM_H__ -# ifdef RLC_UM_C -# define private_rlc_um(x) -# define protected_rlc_um(x) -# define public_rlc_um(x) -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um(x) -# define protected_rlc_um(x) extern x -# define public_rlc_um(x) extern x -# else -# define private_rlc_um(x) -# define protected_rlc_um(x) -# define public_rlc_um(x) extern x -# endif -# endif +# define private_rlc_um(x) x +# define protected_rlc_um(x) x +# define public_rlc_um(x) x # include <errno.h> # include "platform_types.h" # include "rlc_def.h" @@ -141,40 +129,40 @@ * \param[out] stat_rx_data_bytes_out_of_window Number of data bytes received out of the receive window. * \param[out] stat_timer_reordering_timed_out Number of times the timer "reordering" has timed-out. */ -public_rlc_um(void rlc_um_stat_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, - unsigned int* stat_tx_pdcp_sdu, - unsigned int* stat_tx_pdcp_bytes, - unsigned int* stat_tx_pdcp_sdu_discarded, - unsigned int* stat_tx_pdcp_bytes_discarded, - unsigned int* stat_tx_data_pdu, - unsigned int* stat_tx_data_bytes, - unsigned int* stat_rx_pdcp_sdu, - unsigned int* stat_rx_pdcp_bytes, - unsigned int* stat_rx_data_pdus_duplicate, - unsigned int* stat_rx_data_bytes_duplicate, - unsigned int* stat_rx_data_pdu, - unsigned int* stat_rx_data_bytes, - unsigned int* stat_rx_data_pdu_dropped, - unsigned int* stat_rx_data_bytes_dropped, - unsigned int* stat_rx_data_pdu_out_of_window, - unsigned int* stat_rx_data_bytes_out_of_window, - unsigned int* stat_timer_reordering_timed_out);) +void rlc_um_stat_req (rlc_um_entity_t *rlc_pP, + unsigned int* stat_tx_pdcp_sdu, + unsigned int* stat_tx_pdcp_bytes, + unsigned int* stat_tx_pdcp_sdu_discarded, + unsigned int* stat_tx_pdcp_bytes_discarded, + unsigned int* stat_tx_data_pdu, + unsigned int* stat_tx_data_bytes, + unsigned int* stat_rx_pdcp_sdu, + unsigned int* stat_rx_pdcp_bytes, + unsigned int* stat_rx_data_pdus_duplicate, + unsigned int* stat_rx_data_bytes_duplicate, + unsigned int* stat_rx_data_pdu, + unsigned int* stat_rx_data_bytes, + unsigned int* stat_rx_data_pdu_dropped, + unsigned int* stat_rx_data_bytes_dropped, + unsigned int* stat_rx_data_pdu_out_of_window, + unsigned int* stat_rx_data_bytes_out_of_window, + unsigned int* stat_timer_reordering_timed_out); /*! \fn void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP) * \brief Request the segmentation of SDUs based on status previously sent by MAC. * \param[in] ctxt_pP Running context. * \param[in] rlc_pP RLC UM protocol instance pointer. */ -private_rlc_um( void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP);) - +void +rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP); /*! \fn void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication) * \brief Process the received PDUs from lower layer. * \param[in] ctxt_pP Running context. * \param[in] rlc_pP RLC UM protocol instance pointer. * \param[in] data_indication PDUs from MAC. */ -protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication);) - +void +rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP); /*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP) * \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission. * \param[in] ctxt_pP Running context. @@ -183,14 +171,19 @@ protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_ * \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU. * \return The maximum number of bytes that can be served by RLC instance to MAC. */ -public_rlc_um( struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP, const eNB_flag_t enb_flagP);) +struct mac_status_resp +rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP); /*! \fn void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * const rlc_pP, const tb_size_t tb_sizeP) * \brief Set available TBS size for MAC Tx. * \param[in] rlc_pP RLC UM protocol instance pointer. * \param[in] tb_sizeP remaining TBS in bytes. */ -public_rlc_um( void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * const rlc_pP, const tb_size_t tb_sizeP);) +void +rlc_um_set_nb_bytes_requested_by_mac ( + void * rlc_pP, + const tb_size_t tb_sizeP +); /*! \fn struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP) * \brief Gives PDUs to lower layer MAC. @@ -199,8 +192,8 @@ public_rlc_um( void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * \param[in] enb_flagP eNB or UE flag. * \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission. */ -public_rlc_um( struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP);) - +struct mac_data_req +rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP,const eNB_flag_t enb_flagP); /*! \fn void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,struct mac_data_ind data_indP) * \brief Receive PDUs from lower layer MAC. @@ -208,7 +201,6 @@ public_rlc_um( struct mac_data_req rlc_um_mac_data_request (const protocol_ct * \param[in] rlc_pP RLC UM protocol instance pointer. * \param[in] data_indP PDUs from MAC. */ -public_rlc_um( void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP);) /*! \fn uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP) * \brief Gets Tx Buffer Occupancy. @@ -222,6 +214,9 @@ public_rlc_um( uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP) * \param[in] rlc_pP RLC UM protocol instance pointer. * \param[in] sduP SDU. (A struct rlc_um_data_req is mapped on sduP->data.) */ -public_rlc_um( void rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t *sduP);) +void +rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP); +void +rlc_um_data_req (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, mem_block_t *sdu_pP) ; /** @} */ # endif diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h index a73d6f86729c9dc2a622572af12666426e2ba8a6..a3312bb5b781605ce14218894cb6cb49482863b9 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h @@ -43,21 +43,9 @@ # include "DL-UM-RLC.h" # include "UL-UM-RLC.h" //----------------------------------------------------------------------------- -# ifdef RLC_UM_CONTROL_PRIMITIVES_C # define private_rlc_um_control_primitives(x) x # define protected_rlc_um_control_primitives(x) x # define public_rlc_um_control_primitives(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_control_primitives(x) -# define protected_rlc_um_control_primitives(x) extern x -# define public_rlc_um_control_primitives(x) extern x -# else -# define private_rlc_um_control_primitives(x) -# define protected_rlc_um_control_primitives(x) -# define public_rlc_um_control_primitives(x) extern x -# endif -# endif typedef volatile struct { uint32_t is_uplink_downlink; diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h index f62cddfbcae2c2437f8d7b4735635f39f23fc744..0ef1cada90e77c272513e882d99b33abaa8d1d18 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h @@ -40,21 +40,9 @@ # include "rlc_um_constants.h" # include "list.h" //----------------------------------------------------------------------------- -# ifdef RLC_UM_DAR_C # define private_rlc_um_dar(x) x # define protected_rlc_um_dar(x) x # define public_rlc_um_dar(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_dar(x) -# define protected_rlc_um_dar(x) extern x -# define public_rlc_um_dar(x) extern x -# else -# define private_rlc_um_dar(x) -# define protected_rlc_um_dar(x) -# define public_rlc_um_dar(x) extern x -# endif -# endif /*! \fn signed int rlc_um_get_pdu_infos(const protocol_ctxt_t* const ctxt_pP,const rlc_um_entity_t * const rlc_pP,rlc_um_pdu_sn_10_t* header_pP, int16_t total_sizeP, rlc_um_pdu_info_t* pdu_info_pP, uint8_t sn_lengthP) * \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU. * \param[in] ctxt_pP Running context. diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h index 1f7310803be110ccc03916d5f3f92c19ce46772a..510e08338205f53fd62a8e65557fae282312f0ab 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h @@ -35,21 +35,9 @@ # ifndef __RLC_UM_FSM_PROTO_EXTERN_H__ # define __RLC_UM_FSM_PROTO_EXTERN_H__ //----------------------------------------------------------------------------- -# ifdef RLC_UM_FSM_C # define private_rlc_um_fsm(x) x # define protected_rlc_um_fsm(x) x # define public_rlc_um_fsm(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_fsm(x) -# define protected_rlc_um_fsm(x) extern x -# define public_rlc_um_fsm(x) extern x -# else -# define private_rlc_um_fsm(x) -# define protected_rlc_um_fsm(x) -# define public_rlc_um_fsm(x) extern x -# endif -# endif # include "platform_types.h" # include "rlc_um_entity.h" //----------------------------------------------------------------------------- diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h index 95aac89623e6adf29a531f60b871ee6f840e50e8..bcbac576ffeae1aa57b92f28c6da52440942d06b 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h @@ -35,21 +35,9 @@ # ifndef __RLC_UM_REASSEMBLY_PROTO_EXTERN_H__ # define __RLC_UM_REASSEMBLY_PROTO_EXTERN_H__ //----------------------------------------------------------------------------- -# ifdef RLC_UM_REASSEMBLY_C # define private_rlc_um_reassembly(x) x # define protected_rlc_um_reassembly(x) x # define public_rlc_um_reassembly(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_reassembly(x) -# define protected_rlc_um_reassembly(x) extern x -# define public_rlc_um_reassembly(x) extern x -# else -# define private_rlc_um_reassembly(x) -# define protected_rlc_um_reassembly(x) -# define public_rlc_um_reassembly(x) extern x -# endif -# endif # include "rlc_um_entity.h" //----------------------------------------------------------------------------- /*! \fn void rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP) diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h index 5e93f272fdb0140ae1506f32c33c038d8a78350d..ca94e3e467e75fd9a44d9066a160a896ce6586d7 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h @@ -33,22 +33,9 @@ */ # ifndef __RLC_UM_RECEIVER_PROTO_EXTERN_H__ # define __RLC_UM_RECEIVER_PROTO_EXTERN_H__ -# ifdef RLC_UM_RECEIVER_C # define private_rlc_um_receiver(x) x # define protected_rlc_um_receiver(x) x # define public_rlc_um_receiver(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_receiver(x) -# define protected_rlc_um_receiver(x) extern x -# define public_rlc_um_receiver(x) extern x -# else -# define private_rlc_um_receiver(x) -# define protected_rlc_um_receiver(x) -# define public_rlc_um_receiver(x) extern x -# endif -# endif - # include "rlc_um_entity.h" # include "mac_primitives.h" diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h index 9794f9a502fa3628da00afbcfa83fd7f1fcbb06c..1bf5784fc2fb36f48f63ad480fffc0340019a4e5 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h @@ -40,21 +40,9 @@ # include "rlc_um_constants.h" # include "list.h" //----------------------------------------------------------------------------- -# ifdef RLC_UM_SEGMENT_C # define private_rlc_um_segment(x) x # define protected_rlc_um_segment(x) x # define public_rlc_um_segment(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_segment(x) -# define protected_rlc_um_segment(x) extern x -# define public_rlc_um_segment(x) extern x -# else -# define private_rlc_um_segment(x) -# define protected_rlc_um_segment(x) -# define public_rlc_um_segment(x) extern x -# endif -# endif /*! \fn void rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP) * \brief Segmentation procedure with 10 bits sequence number, segment the first SDU in buffer and create a PDU of the size (nb_bytes_to_transmit) requested by MAC if possible and put it in the list "pdus_to_mac_layer". * \param[in] ctxtP Running context. diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h index 2c874b8d2432c32d4cdf7afe86a46e1da3b71478..ffd4de2b6a93023e7fa46f301461a9826d2a8cb6 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h @@ -21,21 +21,9 @@ # ifndef __RLC_UM_TEST_H__ # define __RLC_UM_TEST_H__ -# ifdef RLC_UM_TEST_C # define private_rlc_um_test(x) x # define protected_rlc_um_test(x) x # define public_rlc_um_test(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_test(x) -# define protected_rlc_um_test(x) extern x -# define public_rlc_um_test(x) extern x -# else -# define private_rlc_um_test(x) -# define protected_rlc_um_test(x) -# define public_rlc_um_test(x) extern x -# endif -# endif public_rlc_um_test(rlc_um_entity_t um_tx;) public_rlc_um_test(rlc_um_entity_t um_rx;) diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h index 261183ad1d8be8660725d96b39f22da32d91e649..b4d22ef2f06dbaa5414918c1e59b98f5863b6f52 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h @@ -37,21 +37,9 @@ # include "rlc_um_structs.h" # include "rlc_um_constants.h" //----------------------------------------------------------------------------- -# ifdef RLC_UM_VERY_SIMPLE_TEST_C # define private_rlc_um_very_simple_test(x) x # define protected_rlc_um_very_simple_test(x) x # define public_rlc_um_very_simple_test(x) x -# else -# ifdef RLC_UM_MODULE -# define private_rlc_um_very_simple_test(x) -# define protected_rlc_um_very_simple_test(x) extern x -# define public_rlc_um_very_simple_test(x) extern x -# else -# define private_rlc_um_very_simple_test(x) -# define protected_rlc_um_very_simple_test(x) -# define public_rlc_um_very_simple_test(x) extern x -# endif -# endif #define RLC_UM_TEST_SDU_TYPE_TCPIP 0 #define RLC_UM_TEST_SDU_TYPE_VOIP 1 #define RLC_UM_TEST_SDU_TYPE_SMALL 2 diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index 67bf20d0148d1936bf6f0574baf5814fe6bac926..045fcbc6018102ec3e510b63cf4931d094541f0b 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -30,6 +30,7 @@ #include "rlc.h" #include "mem_block.h" #include "../MAC/mac_extern.h" +#include "LAYER2/RLC/UM_v9.3.0/rlc_um.h" #include "UTIL/LOG/log.h" #include "UTIL/OCG/OCG_vars.h" #include "UTIL/LOG/vcd_signal_dumper.h" @@ -226,8 +227,7 @@ rlc_op_status_t rlc_stat_req ( *stat_rx_data_bytes_out_of_window = 0; *stat_timer_poll_retransmit_timed_out = 0; *stat_timer_status_prohibit_timed_out = 0; - rlc_um_stat_req (ctxt_pP, - &rlc_union_p->rlc.um, + rlc_um_stat_req (&rlc_union_p->rlc.um, stat_tx_pdcp_sdu, stat_tx_pdcp_bytes, stat_tx_pdcp_sdu_discarded, diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index 8f4773a36e246ffb56af4f662ba3682c4ef7cf98..f15286e674e41d6092933b02eaed6bc97b24836b 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -59,49 +59,17 @@ #include "PMCH-InfoList-r9.h" #endif -#ifdef CMAKER typedef uint64_t hash_key_t; #define HASHTABLE_NOT_A_KEY_VALUE ((uint64_t)-1) -#endif -//----------------------------------------------------------------------------- -# ifdef RLC_MAC_C # define private_rlc_mac(x) x # define public_rlc_mac(x) x -# else -# define private_rlc_mac(x) -# define public_rlc_mac(x) extern x -# endif - -# ifdef RLC_MPLS_C # define private_rlc_mpls(x) x # define public_rlc_mpls(x) x -# else -# define private_rlc_mpls(x) -# define public_rlc_mpls(x) extern x -# endif - -# ifdef RLC_RRC_C # define private_rlc_rrc(x) x # define public_rlc_rrc(x) x -# else -# define private_rlc_rrc(x) -# define public_rlc_rrc(x) extern x -# endif - -# ifdef RLC_C # define private_rlc(x) x # define protected_rlc(x) x # define public_rlc(x) x -# else -# define private_rlc(x) -# if defined(RLC_MAC_C) || defined(RLC_MPLS_C) || defined(RLC_RRC_C) || defined(RLC_AM_C) || defined(RLC_TM_C) || defined(RLC_UM_C) || defined (PDCP_C) -# define protected_rlc(x) extern x -# else -# define protected_rlc(x) -# endif -# define public_rlc(x) extern x -# endif - //----------------------------------------------------------------------------- #define RLC_OP_STATUS_OK 1 diff --git a/openair2/LAYER2/RLC/rlc_mac.c b/openair2/LAYER2/RLC/rlc_mac.c index d922a1dae29fd9cae3ec44e751df3b9adbb1061c..ef94dd6f9738f816973d47a131086fb2b05ef024 100644 --- a/openair2/LAYER2/RLC/rlc_mac.c +++ b/openair2/LAYER2/RLC/rlc_mac.c @@ -30,6 +30,7 @@ //----------------------------------------------------------------------------- #define RLC_MAC_C #include "rlc.h" +#include "LAYER2/RLC/UM_v9.3.0/rlc_um.h" #include "LAYER2/MAC/mac_extern.h" #include "UTIL/LOG/log.h" #include "UTIL/OCG/OCG_vars.h" diff --git a/openair2/RRC/LTE/rrc_UE_ral.h b/openair2/RRC/LTE/rrc_UE_ral.h index e2b4a3dadb5debaaaf005ec143bb04ee505bd37d..6384315fc93e7c9a73ac5fbe6cf36cb5dd0a872c 100644 --- a/openair2/RRC/LTE/rrc_UE_ral.h +++ b/openair2/RRC/LTE/rrc_UE_ral.h @@ -30,21 +30,9 @@ #ifndef __RRC_UE_RAL_H__ # define __RRC_UE_RAL_H__ //----------------------------------------------------------------------------- -# ifdef RRC_UE_RAL_C # define private_rrc_ue_ral(x) x # define protected_rrc_ue_ral(x) x # define public_rrc_ue_ral(x) x -# else -# ifdef RRC_UE -# define private_rrc_ue_ral(x) -# define protected_rrc_ue_ral(x) extern x -# define public_rrc_ue_ral(x) extern x -# else -# define private_rrc_ue_ral(x) -# define protected_rrc_ue_ral(x) -# define public_rrc_ue_ral(x) extern x -# endif -# endif //----------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> diff --git a/openair2/RRC/LTE/rrc_eNB_ral.h b/openair2/RRC/LTE/rrc_eNB_ral.h index 143537e45cb1bb8b32af540f675dc93d55851694..f88d5420f0c47f710146717c99f76fa1db73cf91 100644 --- a/openair2/RRC/LTE/rrc_eNB_ral.h +++ b/openair2/RRC/LTE/rrc_eNB_ral.h @@ -30,21 +30,9 @@ #ifndef __RRC_ENB_RAL_H__ # define __RRC_ENB_RAL_H__ //----------------------------------------------------------------------------- -# ifdef RRC_ENB_RAL_C # define private_rrc_enb_ral(x) x # define protected_rrc_enb_ral(x) x # define public_rrc_enb_ral(x) x -# else -# ifdef RRC_ENB -# define private_rrc_enb_ral(x) -# define protected_rrc_enb_ral(x) extern x -# define public_rrc_enb_ral(x) extern x -# else -# define private_rrc_enb_ral(x) -# define protected_rrc_enb_ral(x) -# define public_rrc_enb_ral(x) extern x -# endif -# endif //----------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c index 48e606522c61665a73c084f85e41bb6c929280d4..0b9d63e6376f7326bfc852250310011369d20c96 100644 --- a/openair2/UTIL/LOG/log.c +++ b/openair2/UTIL/LOG/log.c @@ -518,7 +518,7 @@ int logInit (void) extern int oai_exit; void * log_mem_write(void) { - int *fp; + int fp; char f_name[1024]; struct timespec slp_tm; slp_tm.tv_sec = 0; @@ -567,7 +567,7 @@ int logInit_log_mem (void) if ((pthread_mutex_init (&log_mem_lock, NULL) != 0) || (pthread_cond_init (&log_mem_notify, NULL) != 0)) { log_mem_d[1].enable_flag=0; - return; + return 0; } pthread_create(&log_mem_thread, NULL, log_mem_write, (void*)NULL); }else{ @@ -1852,8 +1852,7 @@ void log_set_instance_type (log_instance_type_t instance) #endif void output_log_mem(void){ - int cnt,cnt2; - int *fp; + int fp; char f_name[1024]; if(log_mem_flag==1){