diff --git a/executables/nr-softmodem-common.h b/executables/nr-softmodem-common.h index 8541135bb6..a252a10ca9 100644 --- a/executables/nr-softmodem-common.h +++ b/executables/nr-softmodem-common.h @@ -38,7 +38,6 @@ #define CONFIG_HLP_CALPRACH "UE run normal prach with maximum power, but don't continue random-access\n" #define CONFIG_HLP_NOL2CN "bypass L2 and upper layers\n" #define CONFIG_HLP_UERXG "set UE RX gain\n" -#define CONFIG_HLP_UERXGOFF "external UE amplifier offset\n" #define CONFIG_HLP_UETXG "set UE TX gain\n" #define CONFIG_HLP_UENANTR "set UE number of rx antennas\n" #define CONFIG_HLP_UENANTT "set UE number of tx antennas\n" diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 11449fdf32..9b64bea2f1 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -104,8 +104,6 @@ int oai_exit = 0; static int tx_max_power[MAX_NUM_CCs] = {0}; -double rx_gain_off = 0.0; - uint64_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; uint64_t sidelink_frequency[MAX_NUM_CCs][4]; @@ -191,7 +189,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){ NR_DL_FRAME_PARMS *fp = &UE->frame_parms; // Set UE variables - UE->rx_total_gain_dB = (int)nrUE_params.rx_gain + rx_gain_off; + UE->rx_total_gain_dB = (int)nrUE_params.rx_gain; UE->tx_total_gain_dB = (int)nrUE_params.tx_gain; UE->tx_power_max_dBm = nrUE_params.tx_max_power; UE->rf_map.card = 0; @@ -266,8 +264,7 @@ void init_openair0(PHY_VARS_NR_UE *ue) nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier); nr_rf_card_config_freq(cfg, ul_carrier, dl_carrier, freq_off); - - nr_rf_card_config_gain(cfg, rx_gain_off); + nr_rf_card_config_gain(cfg); cfg->configFilename = get_softmodem_params()->rf_config_file; diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h index f14594b0dd..f6c30a16c4 100644 --- a/executables/nr-uesoftmodem.h +++ b/executables/nr-uesoftmodem.h @@ -56,7 +56,6 @@ extern uint16_t ue_id_g; {"reconfig-file", CONFIG_HLP_RE_CFG_FILE, 0, .strptr=&nrUE_params.reconfig_file, .defstrval="./reconfig.raw", TYPE_STRING, 0}, \ {"rbconfig-file", CONFIG_HLP_RB_CFG_FILE, 0, .strptr=&nrUE_params.rbconfig_file, .defstrval="./rbconfig.raw", TYPE_STRING, 0}, \ {"ue-rxgain", CONFIG_HLP_UERXG, 0, .dblptr=&nrUE_params.rx_gain, .defdblval=110, TYPE_DOUBLE, 0}, \ - {"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, .dblptr=&nrUE_params.rx_gain_off, .defdblval=0, TYPE_DOUBLE, 0}, \ {"ue-txgain", CONFIG_HLP_UETXG, 0, .dblptr=&nrUE_params.tx_gain, .defdblval=0, TYPE_DOUBLE, 0}, \ {"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, .iptr=&(nrUE_params.nb_antennas_rx), .defuintval=1, TYPE_UINT8, 0}, \ {"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, .iptr=&(nrUE_params.nb_antennas_tx), .defuintval=1, TYPE_UINT8, 0}, \ @@ -120,7 +119,6 @@ typedef struct { char *uecap_file; double tx_gain; double rx_gain; - double rx_gain_off; int vcdflag; int tx_max_power; int num_ul_actors; 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 e47ff37969..c68de8e3b1 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -275,10 +275,8 @@ void nr_get_carrier_frequencies_sl(PHY_VARS_NR_UE *ue, /*! \brief This function sets the OAI RF card rx/tx params @param openair0_cfg Pointer OAI config for a specific card - @param rx_gain_off Rx gain offset */ -void nr_rf_card_config_gain(openair0_config_t *openair0_cfg, - double rx_gain_off); +void nr_rf_card_config_gain(openair0_config_t *openair0_cfg); void nr_rf_card_config_freq(openair0_config_t *openair0_cfg, uint64_t ul_Carrier, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c index 436ebfe5e0..73b6e35253 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c @@ -50,9 +50,8 @@ void nr_get_carrier_frequencies(PHY_VARS_NR_UE *ue, uint64_t *dl_carrier, uint64 -void nr_rf_card_config_gain(openair0_config_t *openair0_cfg, - double rx_gain_off){ - +void nr_rf_card_config_gain(openair0_config_t *openair0_cfg) +{ uint8_t mod_id = 0; uint8_t cc_id = 0; PHY_VARS_NR_UE *ue = PHY_vars_UE_g[mod_id][cc_id]; @@ -65,7 +64,7 @@ void nr_rf_card_config_gain(openair0_config_t *openair0_cfg, if (tx_gain) openair0_cfg->tx_gain[i] = tx_gain; if (rx_gain) - openair0_cfg->rx_gain[i] = rx_gain - rx_gain_off; + openair0_cfg->rx_gain[i] = rx_gain; openair0_cfg->autocal[i] = 1;