Commit f2ae71f6 authored by navid's avatar navid

update the device start func

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7716 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent a1132a41
...@@ -348,6 +348,10 @@ int ethernet_read_data(openair0_device *device,openair0_timestamp *timestamp,voi ...@@ -348,6 +348,10 @@ int ethernet_read_data(openair0_device *device,openair0_timestamp *timestamp,voi
} }
int trx_eth_start(openair0_device *device){
return ethernet_socket_init(device);
}
int trx_eth_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int antenna_id, int flags) { int trx_eth_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int antenna_id, int flags) {
...@@ -394,6 +398,7 @@ int openair0_dev_init_eth(openair0_device *device, openair0_config_t *openair0_c ...@@ -394,6 +398,7 @@ int openair0_dev_init_eth(openair0_device *device, openair0_config_t *openair0_c
printf("ETHERNET: Initializing openair0_device for %s ...\n", ((device->func_type == BBU_FUNC) ? "BBU": "RRH")); printf("ETHERNET: Initializing openair0_device for %s ...\n", ((device->func_type == BBU_FUNC) ? "BBU": "RRH"));
device->Mod_id = num_devices++; device->Mod_id = num_devices++;
device->trx_start_func = trx_eth_start;
device->trx_request_func = trx_eth_request; device->trx_request_func = trx_eth_request;
device->trx_reply_func = trx_eth_reply; device->trx_reply_func = trx_eth_reply;
device->trx_end_func = trx_eth_end; device->trx_end_func = trx_eth_end;
...@@ -402,9 +407,9 @@ int openair0_dev_init_eth(openair0_device *device, openair0_config_t *openair0_c ...@@ -402,9 +407,9 @@ int openair0_dev_init_eth(openair0_device *device, openair0_config_t *openair0_c
memcpy((void*)&device->openair0_cfg,(void*)openair0_cfg,sizeof(openair0_config_t)); memcpy((void*)&device->openair0_cfg,(void*)openair0_cfg,sizeof(openair0_config_t));
if (ethernet_socket_init(device)!=0){ /* if (ethernet_socket_init(device)!=0){
return -1; return -1;
} }*/
return 0; return 0;
} }
...@@ -2961,6 +2961,8 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; ...@@ -2961,6 +2961,8 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
#endif #endif
} }
openair0.func_type = BBU_FUNC;
openair0_cfg[0].log_level = glog_level;
#ifdef ETHERNET #ifdef ETHERNET
openair0.type=ETH_IF; // not used for the moment openair0.type=ETH_IF; // not used for the moment
...@@ -2976,9 +2978,6 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; ...@@ -2976,9 +2978,6 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
openair0.type=BLADERF_IF; openair0.type=BLADERF_IF;
printf("Setting the HW to BLADERF and initializing openair0 ...\n"); printf("Setting the HW to BLADERF and initializing openair0 ...\n");
#endif #endif
openair0.func_type = BBU_FUNC;
openair0_cfg[0].log_level = glog_level;
if ((mode!=loop_through_memory) && if ((mode!=loop_through_memory) &&
(openair0_device_init(&openair0, &openair0_cfg[0]) <0)) { (openair0_device_init(&openair0, &openair0_cfg[0]) <0)) {
...@@ -3307,7 +3306,9 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; ...@@ -3307,7 +3306,9 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
#ifndef EXMIMO #ifndef EXMIMO
#ifndef USRP_DEBUG #ifndef USRP_DEBUG
if (mode!=loop_through_memory) if (mode!=loop_through_memory)
openair0.trx_start_func(&openair0);//request_func(&openair0); if (openair0.trx_start_func(&openair0) != 0 )
LOG_E(HW,"Could not start the device\n");
#endif #endif
#endif #endif
......
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