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/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/14247 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/pcu_sock.c M src/common/rsl.c M src/common/sysinfo.c 5 files changed, 63 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/14247/1 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index d7c4bbf..970fb1b 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -48,6 +48,7 @@ int is_ag_res); uint8_t *bts_sysinfo_get(struct gsm_bts *bts, const struct gsm_time *g_time); +void regenerate_si3_restoctets(struct gsm_bts *bts); uint8_t *lchan_sacch_get(struct gsm_lchan *lchan); int lchan_init_lapdm(struct gsm_lchan *lchan); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 415e6bc..90772e2 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -15,6 +15,7 @@ #include <osmocom/gsm/rxlev_stat.h> #include <osmocom/gsm/sysinfo.h> #include <osmocom/gsm/meas_rep.h> +#include <osmocom/gsm/gsm48_rest_octets.h> #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/gsm/protocol/gsm_12_21.h> @@ -620,6 +621,10 @@ /* offsets used while generating SI2quater */ size_t e_offset; size_t u_offset; + /* decoded SI3 rest octets - *unmodified* as received from BSC */ + struct osmo_gsm48_si_ro_info si3_ro_decoded; + /* is SI3 GPRS Indicator currently disabled due to lack of PCU connection? */ + bool si3_gprs_ind_disabled; /* ip.accesss Unit ID's have Site/BTS/TRX layout */ union { diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index e4f2d66..39b4568 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -1,6 +1,6 @@ /* pcu_sock.c: Connect from PCU via unix domain socket */ -/* (C) 2008-2010 by Harald Welte <laforge at gnumonks.org> +/* (C) 2008-2019 by Harald Welte <laforge at gnumonks.org> * (C) 2009-2012 by Andreas Eversberg <jolly at eversberg.eu> * (C) 2012 by Holger Hans Peter Freyther * All Rights Reserved @@ -598,6 +598,9 @@ oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_CEASED, OSMO_EVT_PCU_VERS, txt->text); osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); + /* patch SI3 to advertise GPRS, *if* the SI3 sent by BSC said so */ + regenerate_si3_restoctets(bts); + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) return pcu_tx_si13(bts, true); @@ -741,6 +744,9 @@ bfd->fd = -1; osmo_fd_unregister(bfd); + /* patch SI3 to remove GPRS indicator */ + regenerate_si3_restoctets(bts); + /* re-enable the generation of ACCEPT for new connections */ state->listen_bfd.when |= BSC_FD_READ; diff --git a/src/common/rsl.c b/src/common/rsl.c index f76a006..b96182f 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 at eversberg.eu> - * (C) 2011-2017 by Harald Welte <laforge at gnumonks.org> + * (C) 2011-2019 by Harald Welte <laforge at gnumonks.org> * * All Rights Reserved * @@ -360,12 +360,18 @@ 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 @@ 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); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index e4a05c8..c41f9d6 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -1,4 +1,4 @@ -/* (C) 2011 by Harald Welte <laforge at gnumonks.org> +/* (C) 2011-2019 by Harald Welte <laforge at gnumonks.org> * * All Rights Reserved * @@ -24,6 +24,7 @@ #include <osmo-bts/logging.h> #include <osmo-bts/gsm_data.h> +#include <osmo-bts/pcu_if.h> /* properly increment SI2q index and return SI2q data for scheduling */ static inline uint8_t *get_si2q_inc_index(struct gsm_bts *bts) @@ -175,3 +176,36 @@ LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "SACCH no SI available\n"); return NULL; } + +/* re-generate SI3 restoctets with GPRS indicator depending on the PCU socket connection state */ +void regenerate_si3_restoctets(struct gsm_bts *bts) +{ + uint8_t *si3_buf = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + size_t si3_size = offsetof(struct gsm48_system_information_type_3, rest_octets); + struct osmo_gsm48_si_ro_info si3ro_tmp; + + /* If BSC has never set SI3, there's nothing to patch */ + if (!GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_3)) + return; + + /* If SI3 from BSC doesn't have a GPRS indicator, we won't have anything to patch */ + if (!bts->si3_ro_decoded.gprs_ind.present) + return; + + /* Create a temporary copy and patch that, if no PCU is around */ + si3ro_tmp = bts->si3_ro_decoded; + if (!pcu_connected()) { + if (!bts->si3_gprs_ind_disabled) + LOGP(DPCU, LOGL_NOTICE, "Disabling GPRS Indicator in SI3 (No PCU connected)\n"); + bts->si3_gprs_ind_disabled = true; + si3ro_tmp.gprs_ind.present = 0; + } else { + if (bts->si3_gprs_ind_disabled) + LOGP(DPCU, LOGL_NOTICE, "Enabling GPRS Indicator in SI3 (PCU connected)\n"); + bts->si3_gprs_ind_disabled = false; + si3ro_tmp.gprs_ind.present = 1; /* is a no-op as we copy from bts->si3_ro_decoded */ + } + + /* re-generate the binary SI3 rest octets */ + osmo_gsm48_rest_octets_si3_encode(si3_buf + si3_size, &si3ro_tmp); +} -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190529/d4edb786/attachment.htm>