Commit Graph

8010 Commits

Author SHA1 Message Date
Pau Espin 4842443c29 Drop unneeded ax_check_compile_flag.m4
The macro was never used in this repo.

Change-Id: I2c7299937db91f9940edfadafa3319d5e09d840c
2022-01-11 18:15:20 +01:00
Neels Hofmeyr c2dba7c5b9 fix gscon clear 2/n: proper state transition to ST_CLEARING
The way the ST_CLEARING is entered before this patch has various
symptoms of how I / we used osmo_fsm when we were still FSM amateurs in
Osmocom. Patch that up:

- In gscon_bssmap_clear(), ask for a state transition to ST_CLEARING
  first. Go ahead only if it is allowed.

- move the Clear Request messaging to ST_CLEARING's onenter function.

- Fix the timeout behavior: by using conn_fsm_state_chg(), use the
  actual proper X4 timer value for ST_CLEARING from VTY configuration
  instead of hardcoded magic numbers.

Related: OS#5337
Change-Id: I234b2a754d0c98031056981823cdbc187e977741
2022-01-04 13:33:26 +00:00
Neels Hofmeyr c984dc1a86 fix gscon clear 1/n: store clear cause in gscon
Allow returning a context sensitive cause instead of a hardcoded one in
gscon pre_term().

Also, the conn->cause is needed to move message dispatch to an "onenter"
function in patch I234b2a754d0c98031056981823cdbc187e977741. I Split
this part off as a separate patch for better readability.

Related: OS#5337
Change-Id: Ib6432746040899129d1d73ae8dc59add2d88a915
2022-01-04 13:33:26 +00:00
Neels Hofmeyr bd1eac2fb2 lcs: fix bsc_subscr use_count leak
In lcs_ta_req_wait_ta_onenter(), fix use count leak of 'start-paging':
get() the use count only after the early exits.

osmo-ttcn3-hacks patch I69d4c5c6f8d499bb7f0b96a48af045361433c57b
introduces testing against this leak in various LCS tests (e.g.
BSC_Tests.TC_lcs_loc_req_for_active_ms_ta_req).

Related: OS#5355
Change-Id: Ibbfbfe766eafe42c78048ec5b3b503a11ef5535d
2022-01-04 13:33:26 +00:00
Neels Hofmeyr 3b4b7c1efd lchan/gscon: always clear both cross ref pointers
During specific release scenarios, it became clear that an lchan still
pointed at a conn even after it had been deallocated. That was due to
setting conn->lchan = NULL but not lchan->conn = NULL. Fix that.

Do lchan_forget_conn() first, because during gscon_forget_lchan() we may
enter the gscon clearing dance, which in case of no SCCP conn being
present will soon / should immediately deallocate the conn.

Related: OS#5337
Related: I8c8537acf6b47b121903197608636c43ae601a57 (osmo-bsc)
Change-Id: Idbfe4672233ba8105eff5ba77ee07fd871358255
2022-01-04 13:33:26 +00:00
Neels Hofmeyr 9aed5f541f log: always include timeouts in FSM transition logging
Before:
  state_chg to ACTIVE
  state_chg to WAIT_RLL_RTP_RELEASED
  state_chg to WAIT_SCCP_RLSD

After:
  State change to ACTIVE (no timeout)
  State change to WAIT_RLL_RTP_RELEASED (T3109, 5s)
  State change to WAIT_SCCP_RLSD (X4, 60s)

Change-Id: I94b7dc4d9e5e45dc731bcb3a843ede9fb6cc0839
2022-01-04 13:33:26 +00:00
Harald Welte d3b0db5515 om2000: Don't print "should not generate any message" on FAULT_REP
Change-Id: I65184ef5aa90a993491f9393614bb499c6998169
Closes: OS#4643
2022-01-04 13:08:20 +00:00
Harald Welte 9f53838c58 om2000: Don't print "should not generate any message" on CAL_TIME_REQ
Change-Id: Ic6f576250d56707cf325886d70209a3744163d79
Closes: OS#4670
2022-01-04 13:04:22 +00:00
Harald Welte 6e250bbf82 om2000: Fix memory leak in OM2000 message handling
Change-Id: I7a94320f3b3af65003df67c11fe7221dfc7d7d62
2022-01-02 15:15:25 +01:00
Philipp Maier 9b844df27b bts: fix sourcecode formatting (excess whitespace)
Change-Id: Ie4fad0426d1d089156481806a05982a24375b766
2021-12-20 15:29:52 +01:00
Philipp Maier 2544c1058c bts: add missing return -EINVAL statements
The checks that make sure that an ARFCN falls in the correct range do
not return with -EINVAL as they should, instead nothing happens. (Only
the check for GSM1800 is corrct)

Change-Id: Iddadafe3fbc47e2f980d8e4ab4f320998cb454ff
Related: SYS#5369
2021-12-20 15:29:25 +01:00
Oliver Smith 260eb1d256 treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: Ifbbafe185931c0f508ff8148ef244f25a9620fd8
2021-12-14 12:51:44 +00:00
Philipp Maier 3ba9bd7c35 abis_nm: actively block BTSs with invalid configuration
At the moment the BTS configuration is checked, but the check does not
have much consequence other than that some initialization that is not
executed. The BTS will go into the OML bootstrap phase anyway and most
likely fail at some later point due to the invalid configuration. To
reduce noise and unexpected behaviour of the BTS lets make sure that the
OML boostrap phase can only proceed when the BSC conciders the
configuration as valid.

Change-Id: I42c1c26a9b800600787b1266a871f95f2114c26e
Related: SYS#5369
2021-12-13 18:03:12 +01:00
Philipp Maier 5cebdefed6 bts-examples: add example for E1 connected BTS
The manual lacks an example on how to set up an E1 connected BTS.
Especially the relation between trunk number and E1 line number is not
obvious.

Change-Id: I02f5d4fe059e5cc9c3ffc2e3636d812532c09239
Related: OS#5308
2021-12-06 19:03:37 +01:00
Neels Hofmeyr 67fb8b7c17 fix assignment success counters: count *before* cleanup of fsm state
Counting the Assignment success after osmo_fsm_inst_term() meant that we
were counting a cleared out channel mode, which always yielded
signalling mode.

Count the Assignment success *before* terminating, so that we correctly
count the successful assignment as speech mode.

Related: SYS#4878
Related: Icb1386ec2ccd70eb3c026301b9b08ad7177278f7 (osmo-ttcn3-hacks)
Change-Id: Ie9fcd1e86f27ecb2f11e2e8813faac365cb470b8
2021-11-30 14:19:11 +01:00
Neels Hofmeyr c309754ff9 dbg log: also log assignment counters on BTS level
Change-Id: I68b3e794ddf97c80f647c3536ec466217b338af9
2021-11-30 14:19:07 +01:00
Neels Hofmeyr fdf2262968 fix chreq:* counters: typos in chreq:successful_* constants
Related: SYS#4878
Related: I17a7702b151ac03fd9f7ecd6927ef42133aad953 (osmo-ttcn3-hacks)
Change-Id: I1fde77d5d5920093ab037184eb3518876804353d
2021-11-30 14:19:05 +01:00
Neels Hofmeyr 33e687a97e dbg log: abis_rsl print_meas_rep(): clarify rxlev
Change-Id: Ia2c1d59eac556b8f6a56c39abf12b35a3ba807eb
2021-11-29 15:10:49 +00:00
Oliver Smith 2df65db3da stats: add bsc.paging:expired
Similar to paging:attempted, count paging:expired not only per BTS, but
also for the whole BSC. Add active_paging_requests to struct bsc_subscr,
to increase the counter only once if paging expires, and not once per
BTS where paging expired.

Related: SYS#4878
Change-Id: I9c118e7e3d61ed8c9f1951111255b196905eba4d
2021-11-29 11:33:34 +01:00
Oliver Smith 61e041d92a Cosmetic: osmo-bsc/osmo_bsc_bssap: fix formatting
Change-Id: Icc4947e68fa46aab180f2047231e51b997cca71b
2021-11-29 11:28:10 +01:00
Vadim Yanitskiy cc7bdbe62e ipaccess-config: request and print NM_ATT_IPACC_NV_FLAGS
Below is an example output:

"""
  Received SIGNAL S_NM_GET_ATTR_REP
  {
      "primary_oml_ip": "192.168.100.100",
      "primary_oml_port": "0",
      "unit_id": "6969/0/0",
      "nv_flags": {
          "static-ip": "no",
          "static-gw": "no",
          "no-dhcp-vsi": "no",
          "dhcp-enabled": "yes",
          "led-enabled": "yes",
          "secondary-oml-enabled": "yes",
          "diag-enabled": "yes",
          "cli-enabled": "yes",
          "http-enabled": "no",
          "post-enabled": "yes",
          "snmp-enabled": "yes"
      }
  }
"""

Change-Id: Ic901910878529e6d8b152b3417463bae60644b82
2021-11-27 04:51:09 +03:00
Vadim Yanitskiy d260020aa6 ipaccess-config: improve readability of printed attribute response
Change-Id: If99ec89081af4ebd65152fc0a31ebdec491f3876
2021-11-27 04:34:42 +03:00
Pau Espin 90b689b577 Disable C/I based MS Power Control Loop by default
osmo-trx-uhd with a B200 has proven to provide bad (lower than usually
considered good) C/I values due to high noise (even with band filters in
place). Hence, default thresholds (gathered from literature on the topic)
are too high and end up in bad algorithm output decisions.
Furthermore, most users of Osmocom don't use it in densely populated
areas, hence RXLEV based algorithm used when C/I based one is disabled
is good enough.
Let's disable C/I based one by default, and let advanced users which
specific needs to enable and confiure thresholds specifically for their
needs (hardware, cell surrounding conditions, etc.).

Related: SYS#4917
Change-Id: If1a73c60695379bcfcd0f44c6ec6dd659563e279
2021-11-25 14:50:04 +01:00
Neels Hofmeyr 88f3c05202 hodec2: fix segv for inter-BSC ho target
Related: OS#5324 SYS#5259
Change-Id: I5a3345ab0005a73597f5c27207480912a2f5aae6
2021-11-24 19:22:34 +00:00
Oliver Smith 80afda444e bsc_subscr_conn_fsm: fix crash if !conn
Do not crash in gscon_ensure_mgw_endpoint() if conn is NULL.

Related: SYS#5728
Change-Id: Id579243cc9ebbe8f315cd11754166970329dc9cf
2021-11-24 14:38:10 +01:00
Philipp Maier 72bbdfcd35 abis_nm: use struct sdp_firmware from libosmocore
abis_nm locally declares its own struct for the ipaccess firmware
header, even though libosmocore defines it as well. Lets use the
definition from libosmocore.

Change-Id: I69cb45fc40bd20ea2533cc8cd6a68363b59cc408
2021-11-19 11:43:07 +01:00
Philipp Maier 0505e35cb7 abis_nm: fix typo
Change-Id: I2cb7b986db9d394db2c912247db861704d2c7c23
2021-11-19 11:43:00 +01:00
Pau Espin 9cf719889d Bump version: 1.7.0.359-d13ef-dirty → 1.8.0
Change-Id: Ibd4f22f268aa5ec3c1b7839e334ffad69f2e50a9
2021-11-16 17:21:59 +01:00
Neels Hofmeyr d13ef633d2 move time_cc to libosmocore osmo_time_cc
Related: SYS#4878
Depends: Iabb17a08e6e1a86f168cdb008fba05ecd4776bdd (libosmocore)
Change-Id: Ica9f908a1a30f334a24c59471affa11225117e12
2021-11-16 12:06:53 +01:00
Philipp Maier 7f7c83a7de osmo_bsc_main: move generate_ma_for_bts() into bootstrap_bts()
The function generate_ma_for_bts() is called when the OML TEI comes up.
In the same code path boostrap_bts() is called as well. It would be more
logical to call generate_ma_for_bts() from boostrap_bts() since it is
also part of the bootstrapping process.

Change-Id: Ib2ed5b1eac3701cfb3a3e8dd478488ba5404d1fd
Related: SYS#5369
2021-11-15 13:34:15 +01:00
Philipp Maier 4b706fa15d osmo_bsc_main: call bootstrap_bts when OML TEI comes up
At the moment check_bts and bootstrap_bts is called only once on startup.
When a new BTS is set up during runtime bootstrap_bts, nor check_bts is
called. This means that some parameters of the BTS stay uninitalized
until osmo-bsc is restarted. Lets rather call check_bts() and then
bootstrap_bts() when the OML TEI of the BTS comes up.

Change-Id: Ie599f809623efd6ea4ab3f39294195fc1ef84b85
Related: SYS#5369
2021-11-15 13:34:15 +01:00
Vadim Yanitskiy c122c10f34 [overpower] By default, permit only for speech channels using AMR
Change-Id: I087025f9db59348f2f70d4a291f8d887644d6b17
Related: SYS#5319
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy 335361fbeb [overpower] Allow configuring specific channel mode(s)
Change-Id: I34d29d7d0f66c629367f3d6e8a660e199ecbe080
Related: SYS#5319
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy 820b30d8c6 abis_rsl: s/*_acch_cap_for_bts/put_*_acch_cap_ie/g
Change-Id: I663023adb4f2381d4b8debb01786801803b3d741
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy 92442c9309 abis_rsl: {rep,top}_acch_cap_for_bts(): make *lchan const
Change-Id: I3e71bb88db7b1eadff5a73fdb98fe7eee2fc2540
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy f59abedb24 struct gsm_bts: s/temporary_overpower/top_acch_cap/g
Let's have a short and consistent naming for both ACCH repetition
and temporary ACCH overpower structures, like it's done in osmo-bts.

Change-Id: I39b98dcd14219402959646524315d5afea7c08cf
Related: Ib1d51f91139b4c2fe794e37fc8543b2d7a9b9c07
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy c8bd1eeaca struct gsm_bts: s/repeated_acch_policy/rep_acch_cap/g
Let's have a short and consistent naming for both ACCH repetition
and temporary ACCH overpower structures, like it's done in osmo-bts.

Change-Id: Ia12c83ad1af4744ce28ba655ac806784f746e88a
Related: Ib1d51f91139b4c2fe794e37fc8543b2d7a9b9c07
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy ff1328a038 struct gsm_bts: simplify comments for ACCH repetition/overpower
Change-Id: I75b0e289c47841aea22b5966487535cbe855c84f
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy e0b9a7fb6c bts_vty: fix tabs-vs-spaces issues in cfg_bts_rep_dl_facch
The linter (executed by Jenkins) complains:

  src/osmo-bsc/bts_vty.c:653: ERROR:CODE_INDENT: code indent should use tabs where possible
  src/osmo-bsc/bts_vty.c:654: ERROR:CODE_INDENT: code indent should use tabs where possible
  src/osmo-bsc/bts_vty.c:656: ERROR:CODE_INDENT: code indent should use tabs where possible
  src/osmo-bsc/bts_vty.c:657: ERROR:CODE_INDENT: code indent should use tabs where possible

and blocks changes, adding V-1 when I am changing the related code.

Change-Id: If3c8c09ddff7cb945425e74344ceb4da989ddffc
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy 508058ee28 abis_rsl: cosmetic: fix coding style rep_acch_cap_for_bts()
The linter (executed by Jenkins) complains:

  src/osmo-bsc/abis_rsl.c:543: ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"

and blocks changes, adding V-1 when I am changing the related code.

Change-Id: I0cf00ff898e69734850659e8ba0e2ff023f9b2dd
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy 836947918c abis_rsl: simplify checking if channel mode is AMR
Change-Id: If933ce0fa0a162c4518ddab840f186ebaa1bcff9
2021-11-15 11:59:03 +00:00
Pau Espin c672ed8428 Properly handle dyn TS TCH with vamos after updating subslots_per_pchan
In the case of ts->pchan_from_config=GSM_PCHAN_OSMO_DYN,
ts->max_primary_lchans will be 8 due to SDCCH8 support, and we don't
want to set lchan->vamos.is_secondary=true for lchans at the end of the
array.

Related: OS#5278
Change-Id: If86af5fafe059d5e830c1f6d37034f7325d9a96c
2021-11-15 09:49:41 +00:00
Vadim Yanitskiy ff1bd7e361 tests/Makefile.am: do not try removing non-existing files
Change-Id: I4be60c858cea891aa49fd9b8ca1dec9a6e3fc305
2021-11-15 09:05:53 +00:00
Vadim Yanitskiy fa3c917bb1 doc/manuals: fix wrong CI in the inter-BSC handover diagram
The 'bts0' in BSS 'Beta' has LAC=42/CI=3.  There is no LAC=42/CI=6.

Change-Id: I0f2e351e802311d4601579c2e755ca13a9056348
2021-11-14 19:35:00 +03:00
Vadim Yanitskiy a507875ae7 doc/manuals: add documentation for Temporary ACCH Overpower
Change-Id: Ie995dac6c7083a2b0b4d582f71f55b3736381edb
Related: SYS#5319
2021-11-12 22:52:02 +03:00
Philipp Maier 9a310f818f osmo_bsc_ctrl: make sure strtok results are checked
The function set_bts_loc does not check the string pointers resturned by
strtok_r. In this particular case this is not a problem because the
function set_bts_lock will only see verfied input. However, lets check
the results anyway to avoid creating false positives in coverity scan.

Change-Id: Ie21c392e0405fc45811c6d55bf5508e9eb6784de
Fixes: CID#240849
2021-11-11 09:00:39 +00:00
Neels Hofmeyr a249babf20 implement bts.N.cm_serv_rej:<cause> rate counters
Related: I0214b27da18af87eca9715ebf7eeeff945e3e12a (osmo-ttcn3-hacks)
Related: SYS#4878
Change-Id: I79b1261e5a281d9797eaaf9c27d90edd8e27c78b
2021-11-10 17:53:44 +00:00
Philipp Maier c5b16956a7 osmo_bsc_main: move inp_sig_cb() below check_bts and bootstrap_bts
In order to be able to call check_bts() and bootstrap_bts() from
inp_sig_cb(), we must move it below bootstrap_bts.

Change-Id: I1a365bc2278368ec1f5c0db3f3e466b124b16e83
Related: SYS#5369
2021-11-10 15:35:09 +01:00
Philipp Maier 1140216a88 osmo_bsc_main: separate checks from bootstrap_bts
The function bootstrap_bts does a few checks before it does the actual
initialization. To make the code more modular, lets split the function
into two functions, check_bts and bootstrap_bts. Also be sure that we
print the BTS number when the check failes.

Change-Id: Id2b26f147d2f35e156e2da8ee58d2bbbb93de4ac
Related: SYS#5369
2021-11-10 14:33:26 +00:00
Philipp Maier c2a10a739b osmo_bsc_main: bootstrap_bts: print errornous ARFCN number
The function bootstrap_bts verifies that the ARFCN number is within the
valid range of the current band. In case of error it prints that the
ARFCN is out of range, but it does not print the BTS number, nor the
ARFCN number.

Change-Id: I432448b4bd5ea1a209838a6c5105cc1e9f7d80ee
2021-11-10 14:32:58 +00:00