remove l1ctl data structure form l2_ph_chan_conf()

This brings us one step closer to de-couple LAPDm from L1CTL
This commit is contained in:
Harald Welte 2011-06-22 23:04:20 +02:00
parent 4d5f74375a
commit f36e4fe86c
3 changed files with 6 additions and 8 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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));