[PATCH 2/2] sysmobts: Notify the BTS about all muted lchans

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Tue Nov 5 12:43:00 UTC 2013


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
---
 src/osmo-bts-sysmo/l1_if.c |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 71920ac..de8c239 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1103,6 +1103,27 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on)
 	return l1if_req_compl(hdl, msg, activate_rf_compl_cb);
 }
 
+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);
@@ -1116,10 +1137,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);
-- 
1.7.9.5





More information about the OpenBSC mailing list