mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
[rsl] Implement the T3111 timer to delay the RF Channel release
This commit is contained in:
@@ -256,6 +256,7 @@ struct gsm_lchan {
|
||||
} encr;
|
||||
|
||||
struct timer_list T3101;
|
||||
struct timer_list T3111;
|
||||
|
||||
/* AMR bits */
|
||||
struct gsm48_multi_rate_conf mr_conf;
|
||||
|
@@ -987,6 +987,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);
|
||||
rsl_lchan_set_state(msg->lchan, LCHAN_S_NONE);
|
||||
lchan_free(msg->lchan);
|
||||
break;
|
||||
@@ -1082,6 +1083,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)
|
||||
{
|
||||
@@ -1260,16 +1269,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
|
||||
|
@@ -1239,7 +1239,7 @@ DECLARE_TIMER(3103, "Set the timeout value for HANDOVER.")
|
||||
DECLARE_TIMER(3105, "Currently not used.")
|
||||
DECLARE_TIMER(3107, "Currently not used.")
|
||||
DECLARE_TIMER(3109, "Currently not used.")
|
||||
DECLARE_TIMER(3111, "Currently not used.")
|
||||
DECLARE_TIMER(3111, "Set the RSL timeout to wait before releasing the RF Channel.")
|
||||
DECLARE_TIMER(3113, "Set the time to try paging a subscriber.")
|
||||
DECLARE_TIMER(3115, "Currently not used.")
|
||||
DECLARE_TIMER(3117, "Currently not used.")
|
||||
|
Reference in New Issue
Block a user