further decouple lapdm code from osmocom_ms and l1ctl
[osmocom-bb.git] / src / host / layer23 / src / misc / app_cbch_sniff.c
index bda9aae..f10b30f 100644 (file)
@@ -35,6 +35,8 @@
 #include <osmocom/core/signal.h>
 #include <osmocom/gsm/rsl.h>
 
+#include <l1ctl_proto.h>
+
 struct osmocom_ms *g_ms;
 struct gsm48_sysinfo g_sysinfo = {};
 
@@ -134,8 +136,9 @@ static int rcv_rll(struct osmocom_ms *ms, struct msgb *msg)
        return 0;
 }
 
-static int rcv_rsl(struct msgb *msg, struct osmocom_ms *ms)
+static int rcv_rsl(struct msgb *msg, struct lapdm_entity *le, void *l3ctx)
 {
+       struct osmocom_ms *ms = l3ctx;
        struct abis_rsl_common_hdr *rslh = msgb_l2(msg);
        int rc = 0;
 
@@ -179,7 +182,7 @@ int l23_app_init(struct osmocom_ms *ms)
        /* don't do layer3_init() as we don't want an actualy L3 */
 
        g_ms = ms;
-       osmol2_register_handler(ms, &rcv_rsl);
+       lapdm_channel_set_l1(&ms->lapdm_channel, &rcv_rsl, ms);
 
        l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL);
        /* FIXME: L1CTL_RES_T_FULL doesn't reset dedicated mode