Commit 8e86edc3 authored by Raymond Knopp's avatar Raymond Knopp

cleanup callback added to thirdparty fronthaul interface

parent d4da46a2
......@@ -398,6 +398,10 @@ struct openair0_device_t {
\param device the hardware configuration to use
*/
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 */
......
......@@ -59,7 +59,7 @@ int trx_eth_start(openair0_device *device) {
if (eth->flags == ETH_UDP_IF5_ORI_MODE) {
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 */
if (eth->flags == ETH_RAW_MODE) {
......@@ -166,6 +166,11 @@ void trx_eth_end(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);
}
......
......@@ -33,8 +33,10 @@
#include <netinet/ether.h>
#include <stdint.h>
#ifndef LITE_COMPILATION
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h"
#endif
// ETH transport preference modes
#ifdef OCP_FRAMEWORK
......
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