node function interfaces via function pointers. Suggestions from L. Thomas, B. Mongazon, C. Roux.
This commit is contained in:
@@ -73,27 +73,27 @@ int trx_eth_start(openair0_device *device) {
|
||||
/* adjust MTU wrt number of samples per packet */
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
|
||||
|
||||
} else if (eth->flags == ETH_RAW_IF4_MODE) {
|
||||
} else if (eth->flags == ETH_RAW_IF4p5_MODE) {
|
||||
if (eth_socket_init_raw(device)!=0) return -1;
|
||||
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
|
||||
if (device->host_type == BBU_HOST) {
|
||||
if(eth_set_dev_conf_raw_IF4(device)!=0) return -1;
|
||||
if(eth_set_dev_conf_raw_IF4p5(device)!=0) return -1;
|
||||
} else {
|
||||
if(eth_get_dev_conf_raw_IF4(device)!=0) return -1;
|
||||
if(eth_get_dev_conf_raw_IF4p5(device)!=0) return -1;
|
||||
}
|
||||
/* adjust MTU wrt number of samples per packet */
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_IF4_PRACH_SIZE_BYTES)!=0) return -1;
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
|
||||
|
||||
} else if (eth->flags == ETH_UDP_IF4_MODE) {
|
||||
} else if (eth->flags == ETH_UDP_IF4p5_MODE) {
|
||||
|
||||
|
||||
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||
if (eth_socket_init_raw(device)!=0) return -1;
|
||||
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
|
||||
//if (device->host_type == BBU_HOST) {
|
||||
//if(eth_set_dev_conf_raw_IF4(device)!=0) return -1;
|
||||
//if(eth_set_dev_conf_raw_IF4p5(device)!=0) return -1;
|
||||
//} else {
|
||||
//if(eth_get_dev_conf_raw_IF4(device)!=0) return -1;
|
||||
//if(eth_get_dev_conf_raw_IF4p5(device)!=0) return -1;
|
||||
//
|
||||
/* adjust MTU wrt number of samples per packet */
|
||||
// if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
|
||||
@@ -339,9 +339,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
|
||||
} else if (eth_params->transp_preference == 0) {
|
||||
eth->flags = ETH_UDP_MODE;
|
||||
} else if (eth_params->transp_preference == 3) {
|
||||
eth->flags = ETH_RAW_IF4_MODE;
|
||||
eth->flags = ETH_RAW_IF4p5_MODE;
|
||||
} else if (eth_params->transp_preference == 2) {
|
||||
eth->flags = ETH_UDP_IF4_MODE;
|
||||
eth->flags = ETH_UDP_IF4p5_MODE;
|
||||
} else if (eth_params->transp_preference == 4) {
|
||||
eth->flags = ETH_RAW_IF5_MOBIPASS;
|
||||
} else {
|
||||
@@ -368,15 +368,15 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
|
||||
} else if (eth->flags == ETH_UDP_MODE) {
|
||||
device->trx_write_func = trx_eth_write_udp;
|
||||
device->trx_read_func = trx_eth_read_udp;
|
||||
} else if (eth->flags == ETH_RAW_IF4_MODE) {
|
||||
device->trx_write_func = trx_eth_write_raw_IF4;
|
||||
device->trx_read_func = trx_eth_read_raw_IF4;
|
||||
} else if (eth->flags == ETH_RAW_IF4p5_MODE) {
|
||||
device->trx_write_func = trx_eth_write_raw_IF4p5;
|
||||
device->trx_read_func = trx_eth_read_raw_IF4p5;
|
||||
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||
device->trx_write_func = trx_eth_write_raw_IF4;
|
||||
device->trx_read_func = trx_eth_read_raw_IF4;
|
||||
device->trx_write_func = trx_eth_write_raw_IF4p5;
|
||||
device->trx_read_func = trx_eth_read_raw_IF4p5;
|
||||
} else {
|
||||
//device->trx_write_func = trx_eth_write_udp_IF4;
|
||||
//device->trx_read_func = trx_eth_read_udp_IF4;
|
||||
//device->trx_write_func = trx_eth_write_udp_IF4p5;
|
||||
//device->trx_read_func = trx_eth_read_udp_IF4p5;
|
||||
}
|
||||
|
||||
eth->if_name[device->Mod_id] = eth_params->local_if_name;
|
||||
|
||||
Reference in New Issue
Block a user