diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-08 23:05:22 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-09 11:53:35 +0200 |
commit | d9ae25c1bfa15a29d3fba5fc20bb96757e31a0fb (patch) | |
tree | 4cd994589d0280bf59c0667965864887a5781fe9 /openbsc/src/abis_rsl.c | |
parent | 5c011366c972cc8d721b7f08d12a614dc6b49a15 (diff) |
[rsl] Implement the T3111 timer to delay the RF Channel release
Diffstat (limited to 'openbsc/src/abis_rsl.c')
-rw-r--r-- | openbsc/src/abis_rsl.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c index d313d054a..e73a1db4d 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -982,6 +982,7 @@ static int abis_rsl_rx_dchan(struct msgb *msg) LOGP(DRSL, LOGL_NOTICE, "%s CHAN REL ACK but state %s\n", gsm_lchan_name(msg->lchan), gsm_lchans_name(msg->lchan->state)); + bsc_del_timer(&msg->lchan->T3111); msg->lchan->state = LCHAN_S_NONE; lchan_free(msg->lchan); break; @@ -1077,6 +1078,14 @@ static void t3101_expired(void *data) rsl_rf_chan_release(lchan); } +/* If T3111 expires, we will send the RF Channel Request */ +static void t3111_expired(void *data) +{ + struct gsm_lchan *lchan = data; + + rsl_rf_chan_release(lchan); +} + /* MS has requested a channel on the RACH */ static int rsl_rx_chan_rqd(struct msgb *msg) { @@ -1249,16 +1258,18 @@ static int rsl_rx_rll_err_ind(struct msgb *msg) static void rsl_handle_release(struct gsm_lchan *lchan) { + struct gsm_bts *bts; if (lchan->state != LCHAN_S_REL_REQ) LOGP(DRSL, LOGL_ERROR, "RF release on %s but state %s\n", gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); - /* we can now releae the channel on the BTS/Abis side */ - /* FIXME: officially we need to start T3111 and wait for - * some grace period */ - rsl_rf_chan_release(lchan); + /* wait a bit to send the RF Channel Release */ + lchan->T3111.cb = t3111_expired; + lchan->T3111.data = lchan; + bts = lchan->ts->trx->bts; + bsc_schedule_timer(&lchan->T3111, bts->network->T3111, 0); } /* ESTABLISH INDICATION, LOCATION AREA UPDATE REQUEST |