diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-06-23 23:55:20 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-06-23 23:55:20 +0200 |
commit | 3538c38835b9120d7cf062fa533f7657768bf0d3 (patch) | |
tree | 5d1193b58c7c086fcda1a6c5127291439a70a11b /src/host/layer23/src/misc | |
parent | 5d65fcba6caf949c910dd86e43e7d1bef3b219d2 (diff) |
further decouple lapdm code from osmocom_ms and l1ctl
we introduce a new primitive layer betwen PH and DL, enabling the
use of the LAPDm code in applications that are not based on L1CTL
Diffstat (limited to 'src/host/layer23/src/misc')
-rw-r--r-- | src/host/layer23/src/misc/app_cbch_sniff.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/misc/cell_log.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/misc/rslms.c | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c index 83c54686..f10b30fa 100644 --- a/src/host/layer23/src/misc/app_cbch_sniff.c +++ b/src/host/layer23/src/misc/app_cbch_sniff.c @@ -182,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 diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c index ac0d2063..4e0324f3 100644 --- a/src/host/layer23/src/misc/cell_log.c +++ b/src/host/layer23/src/misc/cell_log.c @@ -786,7 +786,7 @@ int scan_init(struct osmocom_ms *_ms) ms = _ms; osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); memset(&timer, 0, sizeof(timer)); - osmol2_register_handler(ms, &rcv_rsl); + lapdm_channel_set_l3(&ms->lapdm_channel, &rcv_rsl, ms); g.enable = 1; osmo_gps_init(); if (osmo_gps_open()) diff --git a/src/host/layer23/src/misc/rslms.c b/src/host/layer23/src/misc/rslms.c index 02113a38..642840c3 100644 --- a/src/host/layer23/src/misc/rslms.c +++ b/src/host/layer23/src/misc/rslms.c @@ -44,7 +44,7 @@ int rslms_tx_rll_req(struct osmocom_ms *ms, uint8_t msg_type, msg = rsl_rll_simple(msg_type, chan_nr, link_id, 1); - return lapdm_rslms_recvmsg(msg, ms); + return lapdm_rslms_recvmsg(msg, &ms->lapdm_channel); } /* Send a RLL request (including L3 info) to L2 */ @@ -53,7 +53,7 @@ int rslms_tx_rll_req_l3(struct osmocom_ms *ms, uint8_t msg_type, { rsl_rll_push_l3(msg, msg_type, chan_nr, link_id, 1); - return lapdm_rslms_recvmsg(msg, ms); + return lapdm_rslms_recvmsg(msg, &ms->lapdm_channel); } static int rslms_rx_udata_ind(struct msgb *msg, struct osmocom_ms *ms) @@ -144,5 +144,7 @@ static int layer3_from_layer2(struct msgb *msg, struct osmocom_ms *ms) int layer3_init(struct osmocom_ms *ms) { - return osmol2_register_handler(ms, &layer3_from_layer2); + lapdm_channel_set_l3(&ms->lapdm_channel, &layer3_from_layer2, ms); + + return 0; } |