summaryrefslogtreecommitdiff
path: root/cesar/test_general/dataplane/src/test_dataplane.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/test_general/dataplane/src/test_dataplane.c')
-rw-r--r--cesar/test_general/dataplane/src/test_dataplane.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/cesar/test_general/dataplane/src/test_dataplane.c b/cesar/test_general/dataplane/src/test_dataplane.c
index fd881ba315..23ec012570 100644
--- a/cesar/test_general/dataplane/src/test_dataplane.c
+++ b/cesar/test_general/dataplane/src/test_dataplane.c
@@ -30,6 +30,7 @@ static test_dataplane_t test_dataplane_global;
#if CONFIG_FCALL_MME
# include "interface/interface.h"
# include "interface/inc/context.h"
+# include "interface/fcall/inc/context.h"
# include "common/defs/spidcom.h"
#endif
@@ -41,10 +42,9 @@ cp_mme_recv (void *user_data,
uint tei,
u8 *buffer,
uint length,
- bool mme_recv,
bool encryption)
{
- interface_mme_recv_done (user_data, buffer, mme_recv);
+ bufmgr_give_back (user_data, buffer);
}
/* Stub. */
@@ -173,21 +173,23 @@ test_dataplane_init (test_dataplane_t *ctx)
ctx->store = mac_store_init ();
ctx->pbproc = pbproc_init (&ctx->config, ctx->store);
mac_ntb_init (&ctx->config);
- ctx->sar = sar_init (ctx->store, ctx->pbproc, pbproc_get_ca
- (ctx->pbproc), ctx->config.seed);
+ ipmbox_t *ipmbox = ipmbox_init ();
+ bufmgr_t *bufmgr = bufmgr_init (ipmbox);
+ ctx->sar = sar_init (
+ ctx->store, ctx->pbproc, pbproc_get_ca (ctx->pbproc),
+ bufmgr, ctx->config.seed);
sar_init_measure_context (ctx->sar, ctx);
sar_init_measurement_cb (ctx->sar, ce_measurements);
- ctx->cl = cl_init (ctx->store, ctx->sar, &ctx->config);
- ctx->hle = hle_init (ctx->cl);
+ ctx->cl = cl_init (ctx->store, ctx->sar, &ctx->config, ipmbox, bufmgr);
ctx->hal_timer = hal_timer_init ();
/* Fcall. */
fcall_ctx_t *fcall;
#if CONFIG_FCALL_MME
ctx->config.sta_mac_address = SPC_OUI;
- interface_t *interface = interface_init (ctx->hle, ctx->cl, ctx->sar,
- &ctx->config);
- interface_callback_init (interface, cp_mme_recv, cp_mme_buffer_add,
- interface);
+ interface_t *interface =
+ interface_init (ctx->cl, cl_mbx_get (ctx->cl), ctx->sar,
+ &ctx->config, bufmgr);
+ interface_callback_init (interface, cp_mme_recv, interface);
fcall = interface->fcall->fcall_ctx;
#else /* !CONFIG_FCALL_MME */
fcall = my_station.fcall;
@@ -205,7 +207,7 @@ test_dataplane_init (test_dataplane_t *ctx)
ctx);
fcall_register (fcall, "add_mac", test_dataplane_add_mac_fcall, ctx);
/* Activate data plane (but not PBProc). */
- hle_activate (ctx->hle, true);
+ ipmbox_activate (ipmbox, true);
sar_activate (ctx->sar, true);
/* Test thread. */
cyg_thread_create (TEST_DATAPLANE_PRIORITY, &test_dataplane_thread,