cleanup callback added to thirdparty fronthaul interface
This commit is contained in:
@@ -398,6 +398,10 @@ struct openair0_device_t {
|
|||||||
\param device the hardware configuration to use
|
\param device the hardware configuration to use
|
||||||
*/
|
*/
|
||||||
int (*thirdparty_init)(openair0_device *device);
|
int (*thirdparty_init)(openair0_device *device);
|
||||||
|
/*! \brief Callback for Third-party RRU Cleanup routine
|
||||||
|
\param device the hardware configuration to use
|
||||||
|
*/
|
||||||
|
int (*thirdparty_cleanup)(openair0_device *device);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* type of device init function, implemented in shared lib */
|
/* type of device init function, implemented in shared lib */
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ int trx_eth_start(openair0_device *device) {
|
|||||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||||
|
|
||||||
if (eth->flags == ETH_UDP_IF5_ORI_MODE) {
|
if (eth->flags == ETH_UDP_IF5_ORI_MODE) {
|
||||||
AssertFatal(device->thirdparty_init != NULL, "device->thirdparty_init is null\n");
|
AssertFatal(device->thirdparty_init != NULL, "device->thirdparty_init is null\n");
|
||||||
device->thirdparty_init(device);
|
AssertFatal(device->thirdparty_init(device) == 0, "third-party init failed\n");
|
||||||
}
|
}
|
||||||
/* initialize socket */
|
/* initialize socket */
|
||||||
if (eth->flags == ETH_RAW_MODE) {
|
if (eth->flags == ETH_RAW_MODE) {
|
||||||
@@ -166,6 +166,11 @@ void trx_eth_end(openair0_device *device) {
|
|||||||
|
|
||||||
|
|
||||||
int trx_eth_stop(openair0_device *device) {
|
int trx_eth_stop(openair0_device *device) {
|
||||||
|
if (eth->flags == ETH_UDP_IF5_ORI_MODE) {
|
||||||
|
AssertFatal(device->thirdparty_cleanup != NULL, "device->thirdparty_cleanup is null\n");
|
||||||
|
AssertFatal(device->thirdparty_cleanup(device) == 0, "third-party cleanup failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,10 @@
|
|||||||
#include <netinet/ether.h>
|
#include <netinet/ether.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifndef LITE_COMPILATION
|
||||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||||
#include "PHY/LTE_TRANSPORT/if5_tools.h"
|
#include "PHY/LTE_TRANSPORT/if5_tools.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ETH transport preference modes
|
// ETH transport preference modes
|
||||||
#ifdef OCP_FRAMEWORK
|
#ifdef OCP_FRAMEWORK
|
||||||
|
|||||||
Reference in New Issue
Block a user