Commit Graph

2276 Commits

Author SHA1 Message Date
Pau Espin ac673e107c cosmetic: Clean initiating whitespace
Change-Id: Ide2c13cc80dfabbacfbaee97122b000d708cd07a
2022-08-09 08:38:51 +00:00
Pau Espin ba62898cd8 lchan: Move init logic to a specific function
This way it is a lot easier to find out how and when is an lchan
initialized, simply by looking at the lchan.h header, then seeing the
init function and grepping for it.

Change-Id: I043d1c2ee75d4d2a8b323b7960ee490e567f3865
2022-08-09 08:38:51 +00:00
Pau Espin 3d0fbe387f split lchan specific defines and code to its own file
It is really difficult right now to find out where all the different
stuff relative to operation and lifecycle of an lchan is. Let's move
everything to its own file to have all the related defines and logic
together.

Change-Id: Idd855d126c43ac6576c5f3ba7e0b8014127a65e1
2022-08-09 08:38:51 +00:00
Pau Espin 742bb99ed9 Use libosmocore available API to get value_list
This API has been available since 1.0.0, and we actually require
libosmocore >= 1.7.0 nowadays, so it's totally fine using the
libosmocore API and drops the local duplicate.

Change-Id: I95c59b31cf1b08e1d513b589ef386d2dd55f09a2
2022-08-09 08:38:51 +00:00
Philipp Maier 842592c529 bts_trx_vty: prefix bb_trxc mo with [Virtual] for ericsson BTS
The OM2000 model does not have a separate bb_transc MO, however for
compatibilty reasons we have a virtual MO that just mirrors the state of
the TRX mo. We should mark it as [Virtual] in show trx to reflect this
to the user.

Change-Id: I0f5501f6fbc7ce6d5457676b16c7f93f70db5763
Related: OS#5101
2022-08-08 20:09:15 +00:00
Philipp Maier 2b903e2bab abis_om2000: duplicate nmstate of bb_trxc mo to trx mo
In OM2000 a separate bb_trxc MO does not exist to archive better
compatibilty towards classic ABIS and its MOs. Let's mirror the nmstate of
the BB_TRANSC MO to the RCARRIER MO in order to make it look like if it
were present.

Change-Id: I4611d8af16a30725308bd527098b12a356bfde9f
Related: OS#5634
2022-08-08 20:09:15 +00:00
Philipp Maier 9afecf6beb abis_om2000: om2k_trx_s_done_onenter() does not send signal
the function om2k_trx_s_done_onenter() updates the administrative state
of the TRX oml MO but it does not notify the update to other entities
using S_NM_STATECHG

Change-Id: Iabf9f3a1a345c5d53d9a4d02fa2d6d13ddfd86ae
Related: OS#5634
2022-08-08 20:09:15 +00:00
Harald Welte 6545f72981 bts_nokia_site: Implement channel config for CBCH
Thanks to manawyrm for pointing out that the comments of the file
actually contained the numeric codes for the CBCH variants, but the
cases in the switch statements were missing.

Change-Id: Id5b4da6838f9a34db39fff5c23ad18822cd3347b
2022-08-07 22:30:06 +02:00
Philipp Maier eca195469b abis_om2000: update_op_state() does not send signal
The function update_op_state() updates the OML MO, but it does not
notify the update to other entities using S_NM_STATECHG

Change-Id: Id19c6beb2bc79c4db0ec07ef593aacb57fff8b75
Related: OS#5634
2022-08-05 11:55:41 +02:00
Philipp Maier 914e52e73a abis_om2000: constify mo in mo2obj
The function mo2obj does only read only access to mo, so mo can be
const.

Change-Id: Ia09d0c96c8938e287fdbad343b9605cbfd6ff6a1
Related: OS#5101
2022-08-05 11:55:41 +02:00
Philipp Maier cba82e60e8 abis_om2000: move switch-case to function
The switch-case in update_op_state() and update_mo_state() can be split
off into functions. This makes to code better readable.

Change-Id: I41f0d9d0d498f6f698c2c959baac50424f5ac317
Related: OS#5634
2022-08-05 11:32:02 +02:00
Philipp Maier 99262fd447 abis_om2000: fix missing signal
The normal abis nm FSMs are sending S_NM_RUNNING_CHG signals that
include an object class to notify other entities about state changes.
This also includes paging.c, which only starts paging services when it
sees NM_OC_RADIO_CARRIER becoming enabled.

Change-Id: I305df5b2f962473e33e32484c42a79ff96e53e1a
Fixes: I1b5b1a98115b4e9d821eb3330fc5b970a0e78a44
Related: OS#5634
2022-08-04 10:06:25 +02:00
Philipp Maier b46c62a8b7 bsc_subscr_conn_fsm: fix use after free
In cases where the MGCP client endpoint FSM is terminating early the bsc
sbscr conn FSM receives the signal GSCON_EV_FORGET_MGW_ENDPOINT, which
then calls gscon_forget_mgw_endpoint(). However, this only nulls the
conn->user_plane->mgw_endpoint_ci_msc struct pointer, not the others.
This causes the assignment FSM to access
conn->assignment.created_ci_for_msc whle trying to initiate a DLCX. We
must make sure that when the MGCP client endpoint FSM dies, that all
other CI pointers that reference the same CI are also set to NULL.

Change-Id: Ia857e3af6c17282b7e8178b6d249eb0f99ed98e3
Related: OS#5572
2022-08-01 17:36:13 +02:00
Vadim Yanitskiy ac8acc98a3 call osmo_timer_del() unconditionally, without osmo_timer_pending()
osmo_timer_del() does check if a timer is active internally.

Change-Id: I3e42a74d59b8e8d0d46cc4027676149689cc18a3
2022-07-22 03:39:23 +07:00
Pau Espin a7e5f1613a smscb: Tx Failure and Restart Ind for each Bcast Msg Type
As described in 3GPP TS 48.049:

7.8.2: "The RESTART message is sent once per broadcast message type as
  indicated by the Broadcast Message Type IE."
7.9.2: "The FAILURE message is sent once per broadcast message type as
  indicated by the Broadcast Message Type IE."

Related: SYS#5910
Change-Id: I6668b55868cf534a3b59da5e11542abb8131d604
2022-07-14 19:59:27 +02:00
Pau Espin f3a4844f04 smscb: Tx Failure and Restart Ind using CGI as cellID
Let's use CGI instead of LAC+CI, which contains only a subset of the
information.
Furthermore, It was noted that some third party (non-osmocom, non
open source) CBCs don't support/like receiving LAC+CI,
and expect to receive CGI instead.

Related: SYS#5910
Change-Id: I33a6216f89496484cbb3921609fcd3ab90761c69
2022-07-14 19:48:36 +02:00
Vadim Yanitskiy 41481c7090 osmo-bsc/Makefile.am: fix undefined reference to symbol pow()
When trying to build osmo-bsc using clang 14, I am getting this error:

  make[3]: Entering directory 'src/osmo-bsc'
    CCLD     osmo-bsc
  /usr/bin/ld: ./.libs/libbsc.a(handover_decision_2.o): undefined reference to symbol 'pow@@GLIBC_2.29'
  /usr/bin/ld: /usr/lib/libm.so.6: error adding symbols: DSO missing from command line
  clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
  make[3]: *** [Makefile:656: osmo-bsc] Error 1

We need to link with the math library to resolve this.

Change-Id: I4137cad07a3343882ca77d5ebd5137083941dc11
2022-07-04 21:42:42 +07:00
Vadim Yanitskiy 71b7dc03d9 lchan_select: fix 'chan_alloc_reverse' may be used uninitialized
GCC 12.1.0 emits -Wmaybe-uninitialized when building with '-O2'.

In function 'populate_ts_list',
    inlined from 'lchan_avail_by_type' at src/osmo-bsc/lchan_select.c:356:2:
src/osmo-bsc/lchan_select.c:248:12: warning: 'chan_alloc_reverse' may be used
                                             uninitialized [-Wmaybe-uninitialized]
  248 |         if (chan_alloc_reverse) {
      |            ^
src/osmo-bsc/lchan_select.c: In function 'lchan_avail_by_type':
src/osmo-bsc/lchan_select.c:326:14: note: 'chan_alloc_reverse' was declared here
  326 |         bool chan_alloc_reverse;
      |              ^~~~~~~~~~~~~~~~~~

This could only happen if in 'enum lchan_select_reason' we had items
that are not handled in lchan_avail_by_type(), but this is not the
case.  Make GCC happy by initializing chan_alloc_reverse to false.

Change-Id: I3956621a6ec14ca5ff0ba0b11d2c956e2538efd8
2022-07-04 21:24:50 +07:00
Vadim Yanitskiy a019e9af8b lchan_select: implement dynamic selection mode for assignment
This change implements an additional channel allocation mode, which
can be employed during a TCH channel allocation for assignment.
Selection between ascending and descending order is performed
depending on pre-configured parameters:

* Uplink RxLev threshold and number of samples for averaging,
* C0 (BCCH carrier) channel load threshold.

This is useful in setups where Tx power of the RF carriers cannot be
adjusted +dynamically at run-time and thus BS Power Control cannot
be performed.  In such setups the BCCH carrier is transmitting at
relatively higher power than the other RF carriers.  The key idea
is to allocate channels in a smarter way, so that UEs with poor signal
would get channels on carriers with high Tx power, while UEs with good
signal could use carriers with lower Tx power.

Change-Id: I1b7a0d706976b73cc5c30a8714b830811addfe8d
Related: osmo-ttcn3-hacks.git Ia522f37c1c001b3a36f5145b8875fbb88311c2e5
Related: SYS#5460
2022-06-30 16:36:55 +00:00
Vadim Yanitskiy c2928ac269 lchan_select: allow different alloc order for assignment and handover
A follow-up patch implements a special channel allocation mode, which is
only working for assignment (basically TCH selection for a voice call).
This mode cannot be employed for initial CHANNEL REQUEST or handover due
to the absence of an already established lchan.

Adding this mode to the existing VTY command syntax would be confusing:

  channel allocator (ascending|desscending|dynamic)
                                           ^^^^^^^

so this patch extends the VTY syntax in a way that it becomes possible
to configure different channel allocator modes for different cases:

  OsmoBSC(config-net-bts)# channel allocator mode ?
    set-all     Set a single mode for all variants
    chan-req    Channel allocation for CHANNEL REQUEST (RACH)
    assignment  Channel allocation for assignment
    handover    Channel allocation for handover

The old command syntax, which is basically 'set-all', is kept for
backwards compatibility, but marked as deprecated.

Change-Id: I3ae73b36ee9433cc768376b56f0765e5f416162f
Related: SYS#5460
2022-06-30 16:36:41 +00:00
Vadim Yanitskiy ff9d3a64dc lchan_select: prepare a list of timeslots once, iterate over it
The lchan_avail_by_type() attempts to find an unused lchan for the
given GSM_LCHAN_* value: TCH/F, TCH/H, or SDCCH.  This is achieved
by looking up timeslots with compatible GSM_PCHAN_* values.

For instance, finding an unused SDCCH lchan may involve:

* attempt to find a timeslot with pchan=GSM_PCHAN_CCCH_SDCCH4,
* attempt to find a timeslot with pchan=GSM_PCHAN_CCCH_SDCCH4_CBCH,
* attempt to find a timeslot with pchan=GSM_PCHAN_SDCCH8_SACCH8C,
* attempt to find a timeslot with pchan=GSM_PCHAN_SDCCH8_SACCH8C_CBCH,
* attempt to find a timeslot with pchan=GSM_PCHAN_OSMO_DYN (switched),
* attempt to find a timeslot with pchan=GSM_PCHAN_OSMO_DYN (not switched).

Each attempt involves iterating over all timeslots of each TRX,
either in ascending or in descending order (see _lc_dyn_find_bts()
and _lc_find_trx()).

This patch simplifies the lookup logic by preparing a monolithic
array of timeslot pointers once, and then using that array for
each GSM_PCHAN_* lookup attempt.  This change is required for the
upcoming dynamic channel allocation mode, which is fa more complex
than the existing ascending/descending ones.

A side effect of this change is that the interference aware mode
of allocation is not limited by the scope of a single TRX anymore.
Interference levels are now compared within the scope of the whole
BTS, so that lchans on the other TRXes may be picked if they are
better according to the interference reports from the BTS.

Change-Id: I7ccc56856bfd40fd7c63b7437736de60c2b516ff
Related: SYS#5460
2022-06-30 16:36:41 +00:00
Pau Espin 46fe680944 cbsp: Change log level ERROR->INFO on CBSP tx and link down
Let's decrease the logging since it's fine simply discarding the message
if the link is down. This way all code sending messages doesn't need to
care about the link state.

Change-Id: I64356ec6a7b3a4e11a0e66b17efab2788b1ca5cc
2022-06-29 15:14:10 +00:00
Vadim Yanitskiy adc3e36a3e fix uninitialized err pointer passed to osmo_bssap_le_dec()
osmo_bssap_le_dec() dereferences value of the given pointer and
checks it against NULL.  The caller must always initialize it.

Change-Id: Idb0e6565e362ce383c833d6bfec4fb39d2985a6b
Fixes: CID#272982, CID#272944
2022-06-29 11:27:46 +00:00
Pau Espin 6941a14f56 cbsp: Avoid encoding CBSP message if link is down
Change-Id: I25c8681d2ee987ac6ebfce42ee409926eb88301d
2022-06-28 15:19:02 +00:00
Vadim Yanitskiy a12cc72fcd ipaccess-config: check value returned by abis_nm_tlv_parse()
Change-Id: I38cd35506964efb1441555d16cea998f415e9394
Fixes: CID#272995
2022-06-28 18:18:05 +07:00
Vadim Yanitskiy 9a5bca0b0e VTY: fix wrong enum value s/ACTIVATE_FOR_VTY/ASSIGN_FOR_VTY/
Found by clang:

  warning: implicit conversion from enumeration type
           'enum lchan_activate_for' to different enumeration type
           'enum assign_for' [-Wenum-conversion]

This is indeed a bug, because both enum items have different values:

* ACTIVATE_FOR_VTY (from enum lchan_activate_for) is 4,
* ASSIGN_FOR_VTY (from enum assign_for) is 3.

Change-Id: I44544d4577833e0aed62b07d0c7c1c2821b05dd4
2022-06-28 18:14:20 +07:00
Keith Whyte 61cbc5b322 Improve parsing of om2000 fault reports
Fault Reports are commonly oberved with a TLV id 0xd2
as are reports with up to 20 TLVs.
Let's not have these cause logging at level ERROR.

Closes: OS#5593
Change-Id: Ibe0b38835362c59d1576a206b2f64cea4427295f
2022-06-27 21:42:05 -05:00
Vadim Yanitskiy 152f0586c5 gsm_04_08_rr: ensure lchan info is present in all logging messages
Change-Id: Ic34dd0fbefcd60d60fc8f98230f789c1bf134607
Related: OS#5572
2022-06-27 18:21:03 +07:00
Vadim Yanitskiy 1f6a0decee bts_chan_load(): also calculate per-TRX channel load
This is required for the upcoming dynamic channel allocation mode.

Change-Id: I220145238c23135f7e68ca2d474764312ffb66c5
Related: SYS#5460
2022-06-22 05:49:20 +07:00
Vadim Yanitskiy 6411d95a6e VTY: cosmetic: define and use CHAN_ALLOC_{CMD,DESC}
Change-Id: I8e906a9c16247788eec8cd8d99f019b08dc5a8f1
Related: SYS#5460
2022-06-21 08:12:16 +00:00
Michael Iedema 87cf5dacb4 logs: also record which BTS is signaling a SAPI REJECT
Change-Id: I4d25cc4cf55b03c7311ba58cf6feae06c3028a5d
2022-06-20 13:28:46 +00:00
Pau Espin ac63d39a5a smscb: Tx CBSP FAILURE/RESTART for specific cell when it becomes (un)operational
This way the CBSP peers knows the state of specific cells and can avoid
sending messages to unoperative ones, etc.

Related: SYS#5910
Change-Id: I94f0a1ac3c59cffe5af57f972d5d96fc92281d34
2022-06-17 20:27:41 +00:00
Michael Iedema 0dd0f14877 stats: track TCH/SDCCH lchans reaching fully-established state
When calculating average lchan duration based on the new stats for
BTS_CTR_CHAN_{TCH,SDCCH}_ACTIVE_MILLISECONDS_TOTAL there are
discrepancies which emerge. Specificially in bandwidth-constrained
environments, there are still-unknown failure states which can
occur that cause the TCH or SDCCH activity count to increment but
zero milliseconds of activity on the lchan to accumulate. This
portrays a failure as a success.

These new fully-established stats are intended to provide a more
accurate denominator when calculating average lchan duration as
they are incremented in proximity to the duration timestamp
initialization.

Change-Id: I417940ad9479719f5324fb12d45883cd3cb2c578
2022-06-17 20:26:26 +00:00
Pau Espin 2a77f1780f smscb: Base cell operational life cycle on CBCH being operative
This allows running CBCH/ETWS related procedures only when the CBCH
towards MS under that cell is operative.
This also allows providing awarness of per-cell status to the CBSP peer
as required per specs.

Related: SYS#5910
Change-Id: Ia93919be94132fc010acb5bbfef0a6fd51c42981
2022-06-16 19:07:14 +02:00
Michael Iedema 3ef30f3424 Expand VTY option which controls use of TCH for signalling
For statistical clarity and site tuning, it is sometimes
desirable to completely disable the use of TCH for signaling.

In the existing version of this VTY command, there is no way to
accomplish this. We can only restrict TCH for signaling non-voice
related actions.

This patch deprecates 'allow-tch-for-signalling (0|1)' and
adds 'tch-signalling-policy (never|emergency|voice|always)' to
provide more options.

Change-Id: I4459941ddad4e4a3bec8409b180d9a23a735e640
2022-06-15 06:06:26 -07:00
Pau Espin 927c052136 Move all SMSCB/CBC vty code to its own file
This way we separate all the VTY boilerplate from the actual logic, as
we usually do in all other subsystems.

Change-Id: Ifc7d1693d745dd2a3c31e3ee9610d8c634b50812
2022-06-10 11:30:29 +00:00
Oliver Smith 5f2dd6a876 Cosmetic: bsc_vty: tweak msc pooling strings
Drop "to this MSC" from the NRI_STR, as it is not only used for MSC
specific configuration, but also in cfg_net_nri_* which affect all MSCs.

Drop "for this MSC" from the description of cfg_net_nri_null_del, it
affects all MSCs (unlike cfg_msc_nri_del).

Change-Id: Ic8888775a965b6d607af51b9359bd8ffc2834e16
2022-06-10 11:09:25 +02:00
Neels Hofmeyr c1bfc88b6b fix performance for chan_counts and all_allocated stats
The all_allocated_update_bsc() does inefficient iterating to count
active/inactive lchans, which scales badly for high numbers of TRX
managed by osmo-bsc.

We need to update the all_allocated flags immediately (periodic counting
alone would suffer from undersampling), so, until now, we are calling
this inefficient function every time a channel state changes.

Instead of iterating all channels for any chan state changes anywhere,
keep global state of the current channel counts, and on channel state
change only update those ts, trx, bts counts that actually change.

A desirable side effect: for connection stats and handover decision 2,
we can now also use the globally updated channel counts and save a bunch
of inefficient iterations.

To get accurate channel counts at all times, spread around some
chan_counts_ts_update() calls in pivotal places. It re-counts the given
timeslot and cascades counter changes, iff required.

Just in case I missed some channel accounting, still run an inefficient
iterating count regularly that detects errors, logs them and fixes them.
No real harm done if such error appears. None show in ttcn3 BSC_Tests.
It is fine to do the inefficient iteration once per second; channel
state changes can realistically happen hundreds of times per second.

Related: SYS#5976
Change-Id: I580bfae329aac8d4552723164741536af6512011
2022-06-02 14:24:30 +02:00
Neels Hofmeyr 4c89001ccb code cleanup for all_allocated timers, no functional change
Reduce some code dup in all_allocated accounting and cosmetically
prepare for upcoming performance fix.

Have a struct all_allocated, allow easy re-use of function
all_allocated_update().

Rename function to all_allocated_update_bsc(). Upcoming patch will also
add all_allocated_update_bts().

Related: SYS#5976
Change-Id: Id7a82c65d56a87818fc35bbeedf67e2af2f89f11
2022-06-02 14:17:35 +02:00
Neels Hofmeyr 05154b41e6 drop log from ts_is_usable()
ts_is_usable() returns the current state; logging is the job of calling
functions. An upcoming patch adds some calls to ts_is_usable(), this
avoids the log flaring up with useless messages.

Related: SYS#5976
Change-Id: I0635c47609fd7c7d0195b6658b7da231d6527b4b
2022-06-02 14:17:35 +02:00
Pau Espin 7e10af9ab0 nm_rcarrier_fsm: Trigger S_NM_RUNNING_CHG when Admin st changes in op=Enabled
It was described in [1] that the NM FSM failed to trigger the
S_NM_RUNNNG_CHG signal when locking/unlocking the TRX.
That's because current osmo-bts doesn't fully conform to TS 52.021 and
it doesn't go back to Op=Disabled Avail=Dependency when becoming
Admin=Locked. It's true though that TS 52.021 sec 5.3.1 is not really
helpful since it doesn't explicitly state that specific object should go
into Disabled Dependency, despite saying it for most of the other ones.
Hence, let's account for both possibilities at the BSC side.

[1] https://gerrit.osmocom.org/c/osmo-bsc/+/28205

Related: OS#5576
Change-Id: Ifbdc066fd88bdbf826800d14524e74416815b625
2022-06-02 12:51:35 +02:00
Pau Espin b4269f15eb nm_*_fsm: Remove comment no longer applying
Since b7ef6884f9, the state is updated
before triggering the signal S_NM_STATECHG, so the warning does no
longer hold true.

Change-Id: I7b7dd30b4fcdc92febca42e3e6a75e6f98e184ff
2022-06-02 11:44:52 +02:00
Neels Hofmeyr aae8c2513d fix rare segfault in MGCP client handling
Add missing conn->assignment.created_ci_for_msc to
gscon_forget_mgw_endpoint_ci().

Before this patch, when assignment.created_ci_for_msc lingers after a
DLCX, it can cause a use-after-free on assignment_reset(). Possible
scenario is rx BSSMAP Clear Cmd during ongoing Assignment.

In assignment_reset(), locally cache the ci pointer, because
gscon_forget_mgw_endpoint_ci() now NULLs created_ci_for_msc.

Related: OS#5572
Change-Id: If89610020f47fd6517081dd11b83911b043bd0f1
2022-05-31 00:24:08 +02:00
Vadim Yanitskiy 58ac749424 fix gsm_lchan_and_pchan2chan_nr(): log proper lchan_nr value
VAMOS lchans are behind the primary ones in the ts->lchan[] array.
For example, for TCH/F, there is a primary ts->lchan[0] and a VAMOS
ts->lchan[1].  We should print 'ss 0' for both of them.

Change-Id: I8e7a5a2ecc9b9a33e3ddb76cb1bc04d7802fd320
2022-05-27 17:52:20 +06:00
Vadim Yanitskiy 725781d34e bsc_vty: use llist_for_each_entry in lchan_act_all_cmd
Change-Id: Iaa29696c8de268796da118e7ea3384b6186bf688
2022-05-27 17:52:20 +06:00
Michael Iedema a7628d9cf0 stats: new trackers for lchan life duration (v2)
This patch adds two stats which track cummulative lchan lifetime by
type TCH and SDCCH. These new counters will accomplish two things:

1) Provide a glanceable way to see if lchan durations look healthy. When
examining a site, short-lived (<5s) and long-lived (>30s) TCH lchans
are difficult to tell apart. If we only see short-lived TCH lchans,
there is most likely an RF or signaling problem to investigate. This
new counter will expose channel ages in the VTY output

2) Provide a more accurate count for Erlangs per site. Currently, we
are basing Erlangs on active TCH channel counts per stats period. This
method skews high very quickly. Each active TCH in that period
translates into the full 10s of activity. This counter should improve
accuracy by two orders of magnitude.

Change-Id: Ie3771233ecbd4bc24a24fb22c1064a18e7b8b2b0
2022-05-23 02:20:12 -07:00
Harald Welte 35cac4dba8 smscb: "Warning Security Information is always present in ETWS
As per TS 48.049 Table 8.1.3.1.1 the WRITE-REPLACE message always
has a Warning Security Information IE if it relates to ETWS.  This
is also implemented in the libosmocore CBSP parser.

As the previous Change Id369bb3676ba279bafc234378fbe21dbc7b0614b has
pointed out, the CBSP parser structure doesn't even permit any way
of handing a decoded message to us without the warning_sec_info
static struct member.

So as a result, there's also no need to dynamically allocate
bts_etws_state.input.sec_info via talloc.  We can have it in-line
as a static struct member and reduce code complexity and runtime
memory allocations.

Change-Id: Ib1b8e4af37b1f9f9398b81dad29942e82218c70b
2022-05-15 10:11:28 +02:00
Neels Hofmeyr 7111e00ee5 do not BSSMAP Clear on lchan rel when LCS is still ongoing
The proper way to fix this is having a use count on the SCCP conn, one
each for a busy lchan and a busy Location Request. That would require a
bunch more work and testing.

This patch is the least-effort way to avoid the following scenario:

Emergency call is started;
Location Request is started to locate the emergency;
lchan releases early for any reason;
Perfectly fine Location Request gets canceled by Clear Request;
The information was there, but we did not forward the location;
No help at emergency because of my code.

Allow Location Request to complete for these cases:
- rx RLL REL IND (or any other reason for gscon_lchan_releasing())
- rx RSL CONN FAIL

Related: SYS#5912
Related: Idea690a4aa4aecbe4642a16e96d086cc0538564a (osmo-ttcn3-hacks)
Change-Id: Ib44dd05b0adee84234f671313b156ff6625357cc
2022-05-15 08:09:34 +00:00
Pau Espin e6b8b8201a acc: Simplify start/stop by using new signal S_NM_RUNNING_CHG
ACC used to be stared/stopped based on operational/administrative state
changes. The new S_NM_RUNNING_CHG triggers a single boolean based on the
same logic, so we can now simplify the mechanism.

Change-Id: I2e09bcb18a6c3bb2e88bba98579fb4854a6b0699
2022-05-13 14:06:37 +02:00
Pau Espin 9f8137dc73 paging: start/stop credit_timer based on C0 running
This way we avoid triggering timers and doing extra poll loops for each
BTS which is configured but not up. It also has the effect of removing
logging about estimating paging buffers for BTS which are down, which
can be confusing.
Furthermore, since work is delayed until the TRX and cell in general is
configured, the first estimation is properly done now since the correct
configuration is in place at that time.

Related: SYS#5922
Change-Id: I1b5b1a98115b4e9d821eb3330fc5b970a0e78a44
2022-05-13 14:06:37 +02:00