From 3186bf209a6c692a521c92cce9d56b49032f4ed3 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 29 Dec 2008 06:23:49 +0000 Subject: Add callback for allocated lchannels Currently it is not possible to know for which tmsi the channel is going to be allocated. The bsc_hack will guess.. in the future it might be forced to ask for the tmsi after the channel has been opened... --- src/abis_rsl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/abis_rsl.c') diff --git a/src/abis_rsl.c b/src/abis_rsl.c index 31b43c76b..03498e9fe 100644 --- a/src/abis_rsl.c +++ b/src/abis_rsl.c @@ -579,6 +579,7 @@ static int rsl_rx_chan_rqd(struct msgb *msg) enum gsm_chreq_reason_t chreq_reason; struct gsm_lchan *lchan; u_int8_t rqd_ta; + int ret; u_int16_t arfcn; u_int8_t ts_number, subch; @@ -599,10 +600,6 @@ static int rsl_rx_chan_rqd(struct msgb *msg) lctype = get_ctype_by_chreq(bts, rqd_ref->ra); chreq_reason = get_reason_by_chreq(bts, rqd_ref->ra); - if (chreq_reason == GSM_CHREQ_REASON_PAG) { - DEBUGP(DPAG, "CHAN RQD due PAG %d\n", lctype); - } - /* check availability / allocate channel */ lchan = lchan_alloc(bts, lctype); if (!lchan) { @@ -636,8 +633,13 @@ static int rsl_rx_chan_rqd(struct msgb *msg) DEBUGP(DRSL, "Activating ARFCN(%u) TS(%u) SS(%u) lctype %u chan_nr=0x%02x r%d\n", arfcn, ts_number, subch, lchan->type, ia.chan_desc.chan_nr, chreq_reason); + /* send IMMEDIATE ASSIGN CMD on RSL to BTS (to send on CCCH to MS) */ - return rsl_imm_assign_cmd(bts, sizeof(ia), (u_int8_t *) &ia); + ret = rsl_imm_assign_cmd(bts, sizeof(ia), (u_int8_t *) &ia); + + /* inform the bsc that a channel has been allocated */ + if (bts->network->channel_allocated) + (*bts->network->channel_allocated)(lchan, chreq_reason); } static int abis_rsl_rx_cchan(struct msgb *msg) -- cgit v1.2.3