aboutsummaryrefslogtreecommitdiffstats
path: root/src/abis_rsl.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2008-12-29 06:23:49 +0000
committerHolger Freyther <zecke@selfish.org>2008-12-29 06:23:49 +0000
commit3186bf209a6c692a521c92cce9d56b49032f4ed3 (patch)
treed34aacdd3a158b4dd85f5ade92abf27e9ba990ec /src/abis_rsl.c
parent86f1812105880b5dc3cd9e882d57c0b506769aac (diff)
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...
Diffstat (limited to 'src/abis_rsl.c')
-rw-r--r--src/abis_rsl.c12
1 files changed, 7 insertions, 5 deletions
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)