summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte2011-06-22 23:04:20 +0200
committerHarald Welte2011-06-22 23:04:20 +0200
commitf36e4fe86c68e52e9714c0b9e9ec9a86b4a76bde (patch)
tree64a9f693300511bf8656fa84c9580e899a7ee934 /src
parentremove l1ctl data structure from l2_ph_data_ind() (diff)
downloadosmocom-f36e4fe86c68e52e9714c0b9e9ec9a86b4a76bde.tar.gz
osmocom-f36e4fe86c68e52e9714c0b9e9ec9a86b4a76bde.tar.xz
osmocom-f36e4fe86c68e52e9714c0b9e9ec9a86b4a76bde.zip
remove l1ctl data structure form l2_ph_chan_conf()
This brings us one step closer to de-couple LAPDm from L1CTL
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/include/osmocom/bb/common/lapdm.h5
-rw-r--r--src/host/layer23/src/common/l1ctl.c2
-rw-r--r--src/host/layer23/src/common/lapdm.c7
3 files changed, 6 insertions, 8 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/lapdm.h b/src/host/layer23/include/osmocom/bb/common/lapdm.h
index ad5933b..7f39920 100644
--- a/src/host/layer23/include/osmocom/bb/common/lapdm.h
+++ b/src/host/layer23/include/osmocom/bb/common/lapdm.h
@@ -6,8 +6,6 @@
#include <osmocom/core/timer.h>
#include <osmocom/core/msgb.h>
-#include <l1ctl_proto.h>
-
enum lapdm_state {
LAPDm_STATE_NULL = 0,
LAPDm_STATE_IDLE,
@@ -102,8 +100,7 @@ int l2_ph_data_ind(struct msgb *msg, struct lapdm_entity *le, uint8_t chan_nr, u
int l2_ph_data_conf(struct msgb *msg, struct lapdm_entity *le);
/* L1 confirms channel request */
-int l2_ph_chan_conf(struct msgb *msg, struct osmocom_ms *ms,
- struct l1ctl_info_dl *dl);
+int l2_ph_chan_conf(struct msgb *msg, struct osmocom_ms *ms, uint32_t frame_nr);
/* input into layer2 (from layer 3) */
int lapdm_rslms_recvmsg(struct msgb *msg, struct lapdm_channel *lc);
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index 46c1ebf..f3c2b74 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -122,7 +122,7 @@ static int rx_l1_rach_conf(struct osmocom_ms *ms, struct msgb *msg)
dl = (struct l1ctl_info_dl *) msg->l1h;
- l2_ph_chan_conf(msg, ms, dl);
+ l2_ph_chan_conf(msg, ms, ntohl(dl->frame_nr));
return 0;
}
diff --git a/src/host/layer23/src/common/lapdm.c b/src/host/layer23/src/common/lapdm.c
index 8b5690e..c766e0b 100644
--- a/src/host/layer23/src/common/lapdm.c
+++ b/src/host/layer23/src/common/lapdm.c
@@ -69,6 +69,8 @@
#include <osmocom/bb/common/lapdm.h>
#include <osmocom/bb/common/logging.h>
+#include <osmocom/bb/common/l1ctl.h>
+
/* TS 04.06 Figure 4 / Section 3.2 */
#define LAPDm_LPD_NORMAL 0
#define LAPDm_LPD_SMSCB 1
@@ -2080,14 +2082,13 @@ static int rslms_rx_chan_rqd(struct lapdm_channel *lc, struct msgb *msg)
}
/* L1 confirms channel request */
-int l2_ph_chan_conf(struct msgb *msg, struct osmocom_ms *ms,
- struct l1ctl_info_dl *dl)
+int l2_ph_chan_conf(struct msgb *msg, struct osmocom_ms *ms, uint32_t frame_nr)
{
struct abis_rsl_cchan_hdr *ch;
struct gsm_time tm;
struct gsm48_req_ref *ref;
- gsm_fn2gsmtime(&tm, htonl(dl->frame_nr));
+ gsm_fn2gsmtime(&tm, frame_nr);
msgb_pull_l2h(msg);
msg->l2h = msgb_push(msg, sizeof(*ch) + sizeof(*ref));