diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 64902c6be2..96b8681cff 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -866,7 +866,6 @@ void get_samplerate_and_bw(int mu, int n_rb, int8_t threequarter_fs, double *sample_rate, - unsigned int *samples_per_frame, double *tx_bw, double *rx_bw) { @@ -876,12 +875,10 @@ void get_samplerate_and_bw(int mu, if (threequarter_fs) { warn_higher_threequarter_fs(n_rb, mu); *sample_rate=92.16e6; - *samples_per_frame = 921600; *tx_bw = 50e6; *rx_bw = 50e6; } else { *sample_rate=61.44e6; - *samples_per_frame = 614400; *tx_bw = 50e6; *rx_bw = 50e6; } @@ -890,10 +887,8 @@ void get_samplerate_and_bw(int mu, case 188: // 35Mhz if (threequarter_fs) { *sample_rate = 46.08e6; - *samples_per_frame = 460800; } else { *sample_rate = 61.44e6; - *samples_per_frame = 614400; } *tx_bw = (n_rb == 242) ? 45e6 : 35e6; *rx_bw = (n_rb == 242) ? 45e6 : 35e6; @@ -901,13 +896,11 @@ void get_samplerate_and_bw(int mu, case 216: if (threequarter_fs) { *sample_rate=46.08e6; - *samples_per_frame = 460800; *tx_bw = 40e6; *rx_bw = 40e6; } else { *sample_rate=61.44e6; - *samples_per_frame = 614400; *tx_bw = 40e6; *rx_bw = 40e6; } @@ -919,7 +912,6 @@ void get_samplerate_and_bw(int mu, } else { *sample_rate=30.72e6; - *samples_per_frame = 307200; *tx_bw = 20e6; *rx_bw = 20e6; } @@ -927,13 +919,11 @@ void get_samplerate_and_bw(int mu, case 106: if (threequarter_fs) { *sample_rate=23.04e6; - *samples_per_frame = 230400; *tx_bw = 20e6; *rx_bw = 20e6; } else { *sample_rate=30.72e6; - *samples_per_frame = 307200; *tx_bw = 20e6; *rx_bw = 20e6; } @@ -941,13 +931,11 @@ void get_samplerate_and_bw(int mu, case 52: if (threequarter_fs) { *sample_rate=11.52e6; - *samples_per_frame = 115200; *tx_bw = 10e6; *rx_bw = 10e6; } else { *sample_rate=15.36e6; - *samples_per_frame = 153600; *tx_bw = 10e6; *rx_bw = 10e6; } @@ -955,13 +943,11 @@ void get_samplerate_and_bw(int mu, case 25: if (threequarter_fs) { *sample_rate=5.76e6; - *samples_per_frame = 57600; *tx_bw = 5e6; *rx_bw = 5e6; } else { *sample_rate=7.68e6; - *samples_per_frame = 76800; *tx_bw = 5e6; *rx_bw = 5e6; } @@ -976,12 +962,10 @@ void get_samplerate_and_bw(int mu, if (threequarter_fs) { warn_higher_threequarter_fs(n_rb, mu); *sample_rate=184.32e6; - *samples_per_frame = 1843200; *tx_bw = 100e6; *rx_bw = 100e6; } else { *sample_rate=122.88e6; - *samples_per_frame = 1228800; *tx_bw = 100e6; *rx_bw = 100e6; } @@ -989,12 +973,10 @@ void get_samplerate_and_bw(int mu, case 217: if (threequarter_fs) { *sample_rate=92.16e6; - *samples_per_frame = 921600; *tx_bw = 80e6; *rx_bw = 80e6; } else { *sample_rate=122.88e6; - *samples_per_frame = 1228800; *tx_bw = 80e6; *rx_bw = 80e6; } @@ -1002,10 +984,8 @@ void get_samplerate_and_bw(int mu, case 189: if (threequarter_fs) { *sample_rate = 92.16e6; - *samples_per_frame = 921600; } else { *sample_rate = 122.88e6; - *samples_per_frame = 1228800; } *tx_bw = 70e6; *rx_bw = 70e6; @@ -1016,7 +996,6 @@ void get_samplerate_and_bw(int mu, } else { *sample_rate=61.44e6; - *samples_per_frame = 614400; *tx_bw = 60e6; *rx_bw = 60e6; } @@ -1029,7 +1008,6 @@ void get_samplerate_and_bw(int mu, } else { *sample_rate=61.44e6; - *samples_per_frame = 614400; *tx_bw = 50e6; *rx_bw = 50e6; } @@ -1040,10 +1018,8 @@ void get_samplerate_and_bw(int mu, case 92: // 35Mhz if (threequarter_fs) { *sample_rate = 46.08e6; - *samples_per_frame = 460800; } else { *sample_rate = 61.44e6; - *samples_per_frame = 614400; } *tx_bw = (n_rb == 119) ? 45e6 : 35e6; *rx_bw = (n_rb == 119) ? 45e6 : 35e6; @@ -1052,13 +1028,11 @@ void get_samplerate_and_bw(int mu, case 106: if (threequarter_fs) { *sample_rate=46.08e6; - *samples_per_frame = 460800; *tx_bw = 40e6; *rx_bw = 40e6; } else { *sample_rate=61.44e6; - *samples_per_frame = 614400; *tx_bw = 40e6; *rx_bw = 40e6; } @@ -1066,13 +1040,11 @@ void get_samplerate_and_bw(int mu, case 51: if (threequarter_fs) { *sample_rate=23.04e6; - *samples_per_frame = 230400; *tx_bw = 20e6; *rx_bw = 20e6; } else { *sample_rate=30.72e6; - *samples_per_frame = 307200; *tx_bw = 20e6; *rx_bw = 20e6; } @@ -1080,13 +1052,11 @@ void get_samplerate_and_bw(int mu, case 24: if (threequarter_fs) { *sample_rate=11.52e6; - *samples_per_frame = 115200; *tx_bw = 10e6; *rx_bw = 10e6; } else { *sample_rate=15.36e6; - *samples_per_frame = 153600; *tx_bw = 10e6; *rx_bw = 10e6; } @@ -1100,12 +1070,10 @@ void get_samplerate_and_bw(int mu, case 128: if (threequarter_fs) { *sample_rate=184.32e6; - *samples_per_frame = 1843200; *tx_bw = 200e6; *rx_bw = 200e6; } else { *sample_rate = 245.76e6; - *samples_per_frame = 2457600; *tx_bw = 200e6; *rx_bw = 200e6; } @@ -1115,12 +1083,10 @@ void get_samplerate_and_bw(int mu, case 64: if (threequarter_fs) { *sample_rate=92.16e6; - *samples_per_frame = 921600; *tx_bw = 100e6; *rx_bw = 100e6; } else { *sample_rate = 122.88e6; - *samples_per_frame = 1228800; *tx_bw = 100e6; *rx_bw = 100e6; } @@ -1129,12 +1095,10 @@ void get_samplerate_and_bw(int mu, case 32: if (threequarter_fs) { *sample_rate=92.16e6; - *samples_per_frame = 921600; *tx_bw = 50e6; *rx_bw = 50e6; } else { *sample_rate=61.44e6; - *samples_per_frame = 614400; *tx_bw = 50e6; *rx_bw = 50e6; } diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 732e24e501..e62d66658c 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -317,7 +317,6 @@ void get_samplerate_and_bw(int mu, int n_rb, int8_t threequarter_fs, double *sample_rate, - unsigned int *samples_per_frame, double *tx_bw, double *rx_bw); uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB, diff --git a/executables/lte-ru.c b/executables/lte-ru.c index 9c47c92a0d..a62a618516 100644 --- a/executables/lte-ru.c +++ b/executables/lte-ru.c @@ -1251,45 +1251,37 @@ void fill_rf_config(RU_t *ru, if(ru->numerology == 0) { if (fp->threequarter_fs) { cfg->sample_rate=23.04e6; - cfg->samples_per_frame = 230400; cfg->tx_bw = 20e6; cfg->rx_bw = 20e6; } else { cfg->sample_rate=30.72e6; - cfg->samples_per_frame = 307200; cfg->tx_bw = 20e6; cfg->rx_bw = 20e6; } } else if(ru->numerology == 1) { cfg->sample_rate=61.44e6; - cfg->samples_per_frame = 307200; cfg->tx_bw = 20e6; cfg->rx_bw = 20e6; } else if(ru->numerology == 2) { cfg->sample_rate=122.88e6; - cfg->samples_per_frame = 307200; cfg->tx_bw = 40e6; cfg->rx_bw = 40e6; } else { LOG_I(PHY,"Wrong input for numerology %d\n setting to 20MHz normal CP configuration",numerology); cfg->sample_rate=30.72e6; - cfg->samples_per_frame = 307200; cfg->tx_bw = 10e6; cfg->rx_bw = 10e6; } } else if(fp->N_RB_DL == 50) { cfg->sample_rate=15.36e6; - cfg->samples_per_frame = 153600; cfg->tx_bw = 10e6; cfg->rx_bw = 10e6; } else if (fp->N_RB_DL == 25) { cfg->sample_rate=7.68e6; - cfg->samples_per_frame = 76800; cfg->tx_bw = 5e6; cfg->rx_bw = 5e6; } else if (fp->N_RB_DL == 6) { cfg->sample_rate=1.92e6; - cfg->samples_per_frame = 19200; cfg->tx_bw = 1.5e6; cfg->rx_bw = 1.5e6; } else AssertFatal(1==0,"Unknown N_RB_DL %d\n",fp->N_RB_DL); @@ -1299,7 +1291,6 @@ void fill_rf_config(RU_t *ru, else //FDD cfg->duplex_mode = duplex_mode_FDD; - cfg->Mod_id = 0; cfg->num_rb_dl=fp->N_RB_DL; cfg->tx_num_channels=ru->nb_tx; cfg->rx_num_channels=ru->nb_rx; diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c index fc741ec300..322fecae98 100644 --- a/executables/lte-uesoftmodem.c +++ b/executables/lte-uesoftmodem.c @@ -343,28 +343,23 @@ static void init_openair0(LTE_DL_FRAME_PARMS *frame_parms, int rxgain) if(frame_parms->N_RB_DL == 100) { if (frame_parms->threequarter_fs) { openair0_cfg[card].sample_rate=23.04e6; - openair0_cfg[card].samples_per_frame = 230400; openair0_cfg[card].tx_bw = 10e6; openair0_cfg[card].rx_bw = 10e6; } else { openair0_cfg[card].sample_rate=30.72e6; - openair0_cfg[card].samples_per_frame = 307200; openair0_cfg[card].tx_bw = 10e6; openair0_cfg[card].rx_bw = 10e6; } } else if(frame_parms->N_RB_DL == 50) { openair0_cfg[card].sample_rate=15.36e6; - openair0_cfg[card].samples_per_frame = 153600; openair0_cfg[card].tx_bw = 5e6; openair0_cfg[card].rx_bw = 5e6; } else if (frame_parms->N_RB_DL == 25) { openair0_cfg[card].sample_rate=7.68e6; - openair0_cfg[card].samples_per_frame = 76800; openair0_cfg[card].tx_bw = 2.5e6; openair0_cfg[card].rx_bw = 2.5e6; } else if (frame_parms->N_RB_DL == 6) { openair0_cfg[card].sample_rate=1.92e6; - openair0_cfg[card].samples_per_frame = 19200; openair0_cfg[card].tx_bw = 1.5e6; openair0_cfg[card].rx_bw = 1.5e6; } @@ -374,7 +369,6 @@ static void init_openair0(LTE_DL_FRAME_PARMS *frame_parms, int rxgain) else //FDD openair0_cfg[card].duplex_mode = duplex_mode_FDD; - openair0_cfg[card].Mod_id = 0; openair0_cfg[card].num_rb_dl=frame_parms->N_RB_DL; openair0_cfg[card].clock_source = get_softmodem_params()->clock_source; openair0_cfg[card].time_source = get_softmodem_params()->timing_source; diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 7d96eb6772..c088e7cb24 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -819,7 +819,6 @@ static void fill_rf_config(RU_t *ru, char *rf_config_file) N_RB, fp->threequarter_fs, &cfg->sample_rate, - &cfg->samples_per_frame, &cfg->tx_bw, &cfg->rx_bw); @@ -833,7 +832,6 @@ static void fill_rf_config(RU_t *ru, char *rf_config_file) AssertFatal(ru->nb_tx > 0 && ru->nb_tx <= 8, "openair0 does not support more than 8 antennas\n"); AssertFatal(ru->nb_rx > 0 && ru->nb_rx <= 8, "openair0 does not support more than 8 antennas\n"); - cfg->Mod_id = 0; cfg->num_rb_dl = N_RB; cfg->tx_num_channels = ru->nb_tx * ru->num_beams_period; cfg->rx_num_channels = ru->nb_rx * ru->num_beams_period; diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index f1cc659cae..fcf09173c8 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -238,14 +238,12 @@ void init_openair0(PHY_VARS_NR_UE *ue) uint64_t dl_carrier, ul_carrier; cfg->configFilename = NULL; cfg->sample_rate = frame_parms->samples_per_subframe * 1e3; - cfg->samples_per_frame = frame_parms->samples_per_frame; if (frame_parms->frame_type==TDD) cfg->duplex_mode = duplex_mode_TDD; else cfg->duplex_mode = duplex_mode_FDD; - cfg->Mod_id = 0; cfg->num_rb_dl = frame_parms->N_RB_DL; cfg->clock_source = get_softmodem_params()->clock_source; cfg->time_source = get_softmodem_params()->timing_source; diff --git a/openair1/PHY/TOOLS/calibration_test.c b/openair1/PHY/TOOLS/calibration_test.c index 8007040499..834a9917e7 100644 --- a/openair1/PHY/TOOLS/calibration_test.c +++ b/openair1/PHY/TOOLS/calibration_test.c @@ -45,7 +45,6 @@ int main(int argc, char **argv) { CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); lock_memory_to_ram(); - int N_RB=50; int sampling_rate=30.72e6; int DFT=2048; int TxAdvanceInDFTSize=12; @@ -57,20 +56,8 @@ int main(int argc, char **argv) { char * usrp_addrs="type=b200"; openair0_config_t openair0_cfg= { - //! Module ID for this configuration - .Mod_id=0, - //! duplexing mode - .duplex_mode=0, - //! number of downlink resource blocks - .num_rb_dl=N_RB, - //! number of samples per frame - .samples_per_frame=0, //! the sample rate for both transmit and receive. .sample_rate=sampling_rate, - //device is doing mmapped DMA transfers - .mmapped_dma=0, - //! offset in samples between TX and RX paths - .tx_sample_advance=0, //! samples per packet on the fronthaul interface .samples_per_packet=1024, //! number of RX channels (=RX antennas) @@ -83,17 +70,9 @@ int main(int argc, char **argv) { //! \brief Center frequency in Hz for TX. //! index: [0..rx_num_channels[ !!! see lte-ue.c:427 FIXME iterates over rx_num_channels .tx_freq={freq,freq,freq,freq}, - //! \brief memory - //! \brief Pointer to Calibration table for RX gains - .rx_gain_calib_table=NULL, - //! mode for rxgain (ExpressMIMO2) - .rxg_mode={0}, //! \brief Gain for RX in dB. //! index: [0..rx_num_channels] .rx_gain={rxGain,rxGain,rxGain,rxGain}, - //! \brief Gain offset (for calibration) in dB - //! index: [0..rx_num_channels] - .rx_gain_offset={0}, //! gain for TX in dB .tx_gain={txGain,txGain,txGain,txGain}, //! RX bandwidth in Hz @@ -106,32 +85,9 @@ int main(int argc, char **argv) { .time_source=internal, //internal gpsdo external //! Manual SDR IP address .sdr_addrs=usrp_addrs, - //! Auto calibration flag - .autocal={0}, - //! Configuration file for LMS7002M - .configFilename="", - //! remote IP/MAC addr for Ethernet interface - .remote_addr="", - //! remote port number for Ethernet interface - .remote_port=0, - //! local IP/MAC addr for Ethernet interface (eNB/BBU, UE) - .my_addr=0, - //! local port number for Ethernet interface (eNB/BBU, UE) - .my_port=0, - //! record player configuration, definition in record_player.h - .recplay_mode=0, - .recplay_conf=NULL, - //! number of samples per tti - .samples_per_tti=0, }; //----------------------- openair0_device rfdevice= { - /*!tx write thread*/ - //.write_thread={0}, - /*!brief Module ID of this device */ - .Mod_id=0, - /*!brief Component Carrier ID of this device */ - .CC_id=0, /*!brief Type of this device */ .type=NONE_DEV, /*!brief Transport protocol type that the device supports (in case I/Q samples need to be transported) */ diff --git a/openair1/PHY/defs_UE.h b/openair1/PHY/defs_UE.h index 20d5a9ab8d..c1b2b226ae 100644 --- a/openair1/PHY/defs_UE.h +++ b/openair1/PHY/defs_UE.h @@ -551,7 +551,6 @@ typedef struct { uint8_t CC_id; /// \brief Mapping of CC_id antennas to cards openair0_rf_map rf_map; - //uint8_t local_flag; /// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach) runmode_t mode; /// \brief Indicator that UE is configured for FeMBMS functionality (This flag should be avoided) ... just kept for PBCH initical scan (TODO) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 454a23770e..7d6f607071 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -852,13 +852,10 @@ int main(int argc, char **argv) if (g_rbSize < 0) g_rbSize = N_RB_DL - g_rbStart; double fs,txbw,rxbw; - uint32_t samples; - get_samplerate_and_bw(mu, N_RB_DL, frame_parms->threequarter_fs, &fs, - &samples, &txbw, &rxbw); diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 91d6a09569..abf3fd83fe 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -437,9 +437,7 @@ int main(int argc, char **argv) double fs=0, eps; double scs = 30000; double txbw, rxbw; - uint32_t samples; - - get_samplerate_and_bw(mu, N_RB_DL, frame_parms->threequarter_fs, &fs, &samples, &txbw, &rxbw); + get_samplerate_and_bw(mu, N_RB_DL, frame_parms->threequarter_fs, &fs, &txbw, &rxbw); // cfo with respect to sub-carrier spacing eps = cfo/scs; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index db20b21b8f..2db31ec9fa 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -445,13 +445,10 @@ int main(int argc, char **argv) gNB->common_vars.rxdataF[0][i] = malloc16_clear(gNB->frame_parms.samples_per_frame_wCP * sizeof(c16_t)); double fs,txbw,rxbw; - uint32_t samples; - get_samplerate_and_bw(mu, N_RB_DL, frame_parms->threequarter_fs, &fs, - &samples, &txbw, &rxbw); diff --git a/openair1/SIMULATION/NR_PHY/srssim.c b/openair1/SIMULATION/NR_PHY/srssim.c index c86ab2b6a9..0a284a2f6d 100644 --- a/openair1/SIMULATION/NR_PHY/srssim.c +++ b/openair1/SIMULATION/NR_PHY/srssim.c @@ -325,8 +325,7 @@ int main(int argc, char *argv[]) snr1 = snr0 + 10; double sampling_rate, tx_bandwidth, rx_bandwidth; - uint32_t samples; - get_samplerate_and_bw(mu, N_RB_DL, threequarter_fs, &sampling_rate, &samples, &tx_bandwidth, &rx_bandwidth); + get_samplerate_and_bw(mu, N_RB_DL, threequarter_fs, &sampling_rate, &tx_bandwidth, &rx_bandwidth); // Initialize gNB gNB = calloc_or_fail(1, sizeof(PHY_VARS_gNB)); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index d7bd25555f..4ba73ff600 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -711,12 +711,10 @@ int main(int argc, char *argv[]) snr1 = snr0 + 10; double sampling_frequency, tx_bandwidth, rx_bandwidth; - uint32_t samples; get_samplerate_and_bw(mu, N_RB_DL, threequarter_fs, &sampling_frequency, - &samples, &tx_bandwidth, &rx_bandwidth); diff --git a/radio/COMMON/common_lib.h b/radio/COMMON/common_lib.h index 5877506ea2..0b19b27fc3 100644 --- a/radio/COMMON/common_lib.h +++ b/radio/COMMON/common_lib.h @@ -117,7 +117,6 @@ typedef enum { MAX_TRANSP_TYPE } transport_type_t; - /*!\brief openair0 device host type */ typedef enum { MIN_HOST_TYPE = 0, @@ -211,16 +210,10 @@ typedef struct split7_config { /*! \brief RF frontend parameters set by application */ typedef struct openair0_config { - //! Module ID for this configuration - int Mod_id; - //! duplexing mode - duplex_mode_t duplex_mode; + //! duplexing mode + duplex_mode_t duplex_mode; //! number of downlink resource blocks - int num_rb_dl; - //! number of samples per frame - unsigned int samples_per_frame; - //! the sample rate for both transmit and receive. - double sample_rate; + int num_rb_dl; double sample_rate; //! flag to indicate that the device is doing mmapped DMA transfers int mmapped_dma; //! offset in samples between TX and RX paths @@ -254,8 +247,6 @@ typedef struct openair0_config { //! \brief memory //! \brief Pointer to Calibration table for RX gains rx_gain_calib_table_t *rx_gain_calib_table; - //! mode for rxgain (ExpressMIMO2) - rx_gain_t rxg_mode[8]; //! \brief Gain for RX in dB. //! index: [0..rx_num_channels] double rx_gain[8]; @@ -278,23 +269,9 @@ typedef struct openair0_config { int autocal[8]; //! Configuration file for LMS7002M char *configFilename; - //! remote IP/MAC addr for Ethernet interface - char *remote_addr; - //! remote port number for Ethernet interface - unsigned int remote_port; - //! local IP/MAC addr for Ethernet interface (eNB/BBU, UE) - char *my_addr; - //! local port number for Ethernet interface (eNB/BBU, UE) - unsigned int my_port; //! record player configuration, definition in record_player.h uint32_t recplay_mode; recplay_conf_t *recplay_conf; - //! number of samples per tti - unsigned int samples_per_tti; - //! the sample rate for receive. - double rx_sample_rate; - //! the sample rate for transmit. - double tx_sample_rate; //! Flag to indicate this configuration is for NR int nr_flag; //! NR band number @@ -406,17 +383,11 @@ typedef struct { } queue[WRITE_QUEUE_SZ]; } re_order_t; -/*!\brief structure holds the parameters to configure USRP devices */ +/*!\brief structure holds the parameters to configure RF devices */ struct openair0_device_t { /*!tx write thread*/ openair0_thread_t write_thread; - /*!brief Module ID of this device */ - int Mod_id; - - /*!brief Component Carrier ID of this device */ - int CC_id; - /*!brief Type of this device */ dev_type_t type; @@ -435,17 +406,12 @@ struct openair0_device_t { recplay_state_t *recplay_state; /* !brief Indicates if device already initialized */ int is_init; - - /*!brief Can be used by driver to hold internal structure*/ void *priv; /*!brief pointer to FH state, used in ECPRI split 8*/ fhstate_t fhstate; - /*!brief message response for notification fifo*/ - notifiedFIFO_t *respudpTX; - /*!brief UDP TX thread context*/ udp_ctx_t **utx; @@ -678,14 +644,6 @@ struct openair0_device_t { re_order_t reOrder; }; -/* type of device init function, implemented in shared lib */ -typedef int(*oai_device_initfunc_t)(openair0_device *device, openair0_config_t *openair0_cfg); -/* type of transport init function, implemented in shared lib */ -typedef int(*oai_transport_initfunc_t)(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t *eth_params); - -#define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size) - - typedef struct { uint32_t size; // Number of samples per antenna to follow this header uint32_t nbAnt; // Total number of antennas following this header @@ -706,7 +664,6 @@ extern "C" #define DEVICE_SECTION "device" #define CONFIG_HLP_DEVICE "Identifies the oai device (the interface to RF) to use, the shared lib \"lib_.so\" will be loaded" - #define CONFIG_DEVICEOPT_NAME "name" /* inclusion for device configuration */ @@ -727,12 +684,6 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf /*! \brief Initialize transport protocol . It returns 0 if OK */ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t *eth_params); - -/*! \brief Get current timestamp of USRP - * \param device the hardware to use - */ -openair0_timestamp get_usrp_time(openair0_device *device); - /*! \brief Set RX frequencies * \param device the hardware to use * \param openair0_cfg RF frontend parameters set by application diff --git a/radio/ETHERNET/ethernet_lib.c b/radio/ETHERNET/ethernet_lib.c index 038246c998..b4701bf9f5 100644 --- a/radio/ETHERNET/ethernet_lib.c +++ b/radio/ETHERNET/ethernet_lib.c @@ -130,9 +130,6 @@ int trx_eth_start(openair0_device *device) } device->threadPool = (tpool_t*)malloc(sizeof(tpool_t)); initTpool(pool, device->threadPool, cpumeas(CPUMEAS_GETSTATE)); - // ULSCH decoder result FIFO - device->respudpTX = (notifiedFIFO_elt_t*) malloc(sizeof(notifiedFIFO_elt_t)); - initNotifiedFIFO(device->respudpTX); #endif } /* initialize socket */ @@ -498,7 +495,6 @@ int transport_init(openair0_device *device, printf("[ETHERNET]: Initializing openair0_device for %s ...\n", ((device->host_type == RAU_HOST) ? "RAU": "RRU")); printf("[ETHERNET]: num_fd %d\n",eth->num_fd); - device->Mod_id = 0;//num_devices_eth++; device->transp_type = ETHERNET_TP; device->trx_start_func = trx_eth_start; device->trx_get_stats_func = trx_eth_get_stats; @@ -582,7 +578,7 @@ void dump_dev(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; - printf("Ethernet device interface %i configuration:\n" ,device->openair0_cfg->Mod_id); + printf("Ethernet device configuration:\n"); printf(" RB number: %i, sample rate: %lf \n" , device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate); printf(" RAU configured for %i tx/%i rx channels)\n", @@ -598,7 +594,7 @@ void dump_dev(openair0_device *device) void inline dump_txcounters(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; - printf(" Ethernet device interface %i, tx counters:\n" ,device->openair0_cfg->Mod_id); + printf(" Ethernet device interface tx counters:\n"); printf(" Sent packets: %llu send errors: %i\n", (long long unsigned int)eth->tx_count, eth->num_tx_errors); } @@ -606,7 +602,7 @@ void inline dump_txcounters(openair0_device *device) void inline dump_rxcounters(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; - printf(" Ethernet device interface %i rx counters:\n" ,device->openair0_cfg->Mod_id); + printf(" Ethernet device interface rx counters:\n"); printf(" Received packets: %llu missed packets errors: %i\n", (long long unsigned int)eth->rx_count, eth->num_underflows); } diff --git a/radio/fhi_72/oran_isolate.c b/radio/fhi_72/oran_isolate.c index 9b97b58390..1bae168488 100644 --- a/radio/fhi_72/oran_isolate.c +++ b/radio/fhi_72/oran_isolate.c @@ -397,7 +397,6 @@ __attribute__((__visibility__("default"))) int transport_init(openair0_device *d eth->e.if_name = eth_params->local_if_name; eth->last_msg = (rru_config_msg_type_t)-1; - device->Mod_id = 0; device->transp_type = ETHERNET_TP; device->trx_start_func = trx_oran_start; device->trx_get_stats_func = trx_oran_get_stats;