aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-28 18:06:21 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-28 19:59:07 +0200
commit1e96e31c106aed9192ed9ea78ff1a711464390d7 (patch)
tree26b8f5f2eca56890c92ab70a6c1b8c9456aceb7a /src/common/rsl.c
parent347fea69a0b97441eaebca488b55d1ff1f539619 (diff)
clear GPRS indicator in SI3 while PCU is disconnected
osmo-bts cannot provide GPRS service while osmo-pcu is not connected. The BSC has no knowledge of the PCU connection state. Prevent MSs from trying to register for GPRS while the PCU is disconnected by erasing the GPRS Indicator in SI3. Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Depends: I690cf308311f910005a325d50f5d5d825678d2b2 (libosmocore.git) Depends: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 (libosmocore.git) Depends: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 (libosmocore.git) Related: OS#3075
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index f76a006b..b96182ff 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1,7 +1,7 @@
/* GSM TS 08.58 RSL, BTS Side */
/* (C) 2011 by Andreas Eversberg <jolly@eversberg.eu>
- * (C) 2011-2017 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2011-2019 by Harald Welte <laforge@gnumonks.org>
*
* All Rights Reserved
*
@@ -360,12 +360,18 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)
bts->si_valid |= (1 << osmo_si);
- if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 &&
- num_agch(trx, "RSL") != 1) {
- lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]);
- /* will be reactivated by sapi_deactivate_cb() */
- trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind =
- LCHAN_REL_ACT_REACT;
+ if (SYSINFO_TYPE_3 == osmo_si) {
+ if (trx->nr == 0 && num_agch(trx, "RSL") != 1) {
+ lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]);
+ /* will be reactivated by sapi_deactivate_cb() */
+ trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind =
+ LCHAN_REL_ACT_REACT;
+ }
+ /* decode original SI3 Rest Octets as sent by BSC */
+ osmo_gsm48_rest_octets_si3_decode(&bts->si3_ro_decoded, GSM_BTS_SI(bts, osmo_si));
+ /* patch out GPRS indicator from binary if PCU is not connected; will be enabled
+ * after PCU connects */
+ regenerate_si3_restoctets(bts);
}
if (SYSINFO_TYPE_13 == osmo_si)
@@ -387,6 +393,8 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)
get_value_string(osmo_sitype_strs, osmo_si));
if (SYSINFO_TYPE_13 == osmo_si)
pcu_tx_si13(trx->bts, false);
+ if (SYSINFO_TYPE_3 == osmo_si)
+ memset(&bts->si3_ro_decoded, 0, sizeof(bts->si3_ro_decoded));
}
osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts);