Commit 97d503ba authored by Teodora Vladić's avatar Teodora Vladić

Move `host_type` to `device_init()`; move `host_type` and `eth_params` to `transport_init()`

`eth_params` removed for split 7.2, as not needed.
Signed-off-by: default avatarTeodora Vladić <teodora.vladic@openairinterface.org>
parent fab28f64
......@@ -896,7 +896,6 @@ void set_function_spec_param(RU_t *ru)
ru->feptx_ofdm = nr_feptx_tp; // this is fep with idft and precoding
ru->feptx_prec = NULL;
ru->nr_start_if = NULL; // no if interface
ru->rfdevice.host_type = RAU_HOST;
ru->fh_south_in = rx_rf; // local synchronous RF RX
ru->fh_south_out = tx_rf; // local synchronous RF TX
ru->start_rf = start_rf; // need to start the local RF interface
......@@ -914,8 +913,6 @@ void set_function_spec_param(RU_t *ru)
ru->stop_rf = NULL;
ru->start_write_thread = NULL;
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
break;
case REMOTE_IF4p5:
......@@ -928,8 +925,6 @@ void set_function_spec_param(RU_t *ru)
ru->stop_rf = NULL;
ru->start_write_thread = NULL;
ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5
ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
break;
default:
......@@ -1160,7 +1155,6 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
} else if (strcmp(str, "raw_if4p5") == 0) {
ru->if_south = REMOTE_IF4p5;
ru->function = NGFI_RAU_IF4p5;
ru->eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
}
} /* strcmp(local_rf, "yes") != 0 */
......
......@@ -888,6 +888,8 @@ int aw2s_oriinit(openair0_device_t *device)
int transport_init(openair0_device_t *device, openair0_config_t *openair0_cfg, eth_params_t *eth_params)
{
printf("Initializing AW2S (%p,%p,%p)\n",aw2s_oriinit,aw2s_oricleanup,aw2s_startstreaming);
device->host_type = RAU_HOST;
device->eth_params = eth_params;
device->thirdparty_init = aw2s_oriinit;
device->thirdparty_cleanup = aw2s_oricleanup;
device->thirdparty_startstreaming = aw2s_startstreaming;
......
......@@ -1056,6 +1056,7 @@ extern "C" {
return 0;
}
device->host_type = RAU_HOST;
device->openair0_cfg = openair0_cfg;
device->trx_start_func = trx_usrp_start;
device->trx_get_stats_func = trx_usrp_get_stats;
......
......@@ -310,6 +310,7 @@ __attribute__((__visibility__("default"))) int transport_init(openair0_device_t
eth->nCC = fh_config->nCC;
eth->num_ports = fh_init.xran_ports;
device->host_type = RAU_HOST;
device->transp_type = ETHERNET_TP;
device->trx_start_func = trx_oran_start;
device->trx_get_stats_func = trx_oran_get_stats;
......
......@@ -1627,6 +1627,7 @@ extern "C" __attribute__((__visibility__("default"))) int device_init(openair0_d
}
/* let's pretend to be a b2x0 */
device->type = RFSIMULATOR;
device->host_type = RAU_HOST;
openair0_cfg->rx_gain[0] = 0;
device->openair0_cfg = openair0_cfg;
device->priv = rfsimulator;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment