aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-11-05 16:03:58 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-05 16:11:07 +0100
commit897f97f6329d46e21fc80ea4bb2dfbfc11cf8123 (patch)
treec1c075abfa39b6eb0e0f708561d91ca7fe5e18d1 /src/osmo-bts-sysmo/l1_if.c
parent5eef61414a4beb0ba3043bca88d42b6ba68d8c70 (diff)
sysmobts: Notify the BSC about all muted lchans
Currently it takes some time (around 30s) until it is detected that the radio link is down after mute. Not till then the BSC is informed and the call terminated. This patch modifies this behaviour by sending a RSL_MT_CONN_FAIL message with cause RSL_ERR_RADIO_LINK_FAIL for each muted and active lchan immediately after the corresponding Change Administrative State Request has been acknowledged. Ticket: OW#976 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index c6f99885..69dfda32 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1104,6 +1104,27 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on)
}
#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(3,6,0)
+static void mute_handle_ts(struct gsm_bts_trx_ts *ts, int is_muted)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(ts->lchan); i++) {
+ struct gsm_lchan *lchan = &ts->lchan[i];
+
+ if (!is_muted)
+ continue;
+
+ if (lchan->state != LCHAN_S_ACTIVE)
+ continue;
+
+ if (lchan->s <= 0)
+ continue;
+
+ lchan->s = 0;
+ rsl_tx_conn_fail(lchan, RSL_ERR_RADIO_LINK_FAIL);
+ }
+}
+
static int mute_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp)
{
struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
@@ -1117,10 +1138,19 @@ static int mute_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp)
get_value_string(femtobts_l1status_names, status));
oml_mo_rf_lock_chg(&trx->mo, fl1h->last_rf_mute, 0);
} else {
+ int i;
+
LOGP(DL1C, LOGL_INFO, "Rx RF-MUTE.conf with status=%s\n",
get_value_string(femtobts_l1status_names, status));
bts_update_status(BTS_STATUS_RF_MUTE, fl1h->last_rf_mute[0]);
oml_mo_rf_lock_chg(&trx->mo, fl1h->last_rf_mute, 1);
+
+ osmo_static_assert(
+ ARRAY_SIZE(trx->ts) >= ARRAY_SIZE(fl1h->last_rf_mute),
+ ts_array_size);
+
+ for (i = 0; i < ARRAY_SIZE(fl1h->last_rf_mute); ++i)
+ mute_handle_ts(&trx->ts[i], fl1h->last_rf_mute[i]);
}
msgb_free(resp);