Commit Graph

2500 Commits

Author SHA1 Message Date
Oliver Smith 4906a78fda Bump version: 1.3.2.1-16d3 → 1.3.3
Change-Id: Icf98f2e87c77e90ed8f4dc25924bda17a5f7f615
2021-09-06 15:24:34 +02:00
Oliver Smith 16d3e3abfe debian/control: remove dh-systemd build-depend
Related: OS#5223
Change-Id: Ieb8669a9a43ea1acc6b2d8d2e363f2466c51697a
2021-09-06 15:23:07 +02:00
Vadim Yanitskiy 7281c1adb9 Bump version: 1.3.1.1-1c2c → 1.3.2
Change-Id: I6cb5aeb7ad0fd4cb893c2d8123db909a4a058304
Signed-off-by: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
2021-05-20 19:32:35 +02:00
Vadim Yanitskiy 1c2c92da17 osmo-bts-trx: fix hopping pointer bug in trx_sched_fn()
In change [1] together with the actual implementation I introduced
a serious bug to trx_sched_fn(): if a timeslot is configured to use
frequency hopping, both 'pinst' and 'l1h' pointers are *overwriten*
in the inner loop, so the Downlink burst is re-directed to the
approproate PHY instance.  However, if a subsequent timeslot is not
hopping, the Downlink burst would be re-directed to the wrong PHY
instance because both pointers were overwriten during a previous
iteration.

Let's add another 'struct phy_instance' pointer to the inner loop,
so it's properly re-initialized for each timeslot iteration.

Change-Id: I9afbbef8dc5d885763356470c27d4392dce8e815
Fixes: [1] I68f4ae09fd0789ad0d8f1c1e17e17dfc4de8e462
Related: SYS#4868, OS#4546
2021-05-20 19:03:05 +02:00
Pau Espin f4c2b61e3e Bump version: 1.3.0.1-4f34 → 1.3.1
Change-Id: I9a2b1db3d984aa8c93c661fba6a72d6b015e6ac5
2021-04-21 18:14:28 +02:00
Vadim Yanitskiy 4f346b0458 lchan2lch_par(): fix missing default branch in switch
New channel mode values have recently been added with change [1]
to 'enum gsm48_chan_mode'.  The lack of default branch in
lchan2lch_par() caused build failures on Jenkins:

  oml.c:956:2: error: enumeration value ‘GSM48_CMODE_SPEECH_V2_VAMOS’
                      not handled in switch [-Werror=switch]
  oml.c:956:2: error: enumeration value ‘GSM48_CMODE_SPEECH_V3_VAMOS’
                      not handled in switch [-Werror=switch]
  oml.c:956:2: error: enumeration value ‘GSM48_CMODE_SPEECH_V5_VAMOS’
                      not handled in switch [-Werror=switch]

This function is duplicated in osmo-bts-{lc15,oc2g,octphy,sysmo},
so we unfortunately need to apply the same fix to all copy-pasted files.

Change-Id: I557ff8cac6564d22485c101fba9212f5f0e95bb7
Related: [1] Ie0ea592da5610ae70290106d004e549cf3212a89
2021-04-20 22:49:31 +02:00
Pau Espin 0436fe7fca Bump version: 1.2.0.444-8777-dirty → 1.3.0
Change-Id: I206af3596a714e5e9038b22e84ae6c20dc360e13
2021-02-23 16:35:17 +01:00
Vadim Yanitskiy 8777b63ef8 ta_control: fix Timing Advance control for SDCCH channels
The check in lchan_ms_ta_ctrl() breaks Timing Advance control on
SDCCH channels, because 'num_ul_meas' wraps and never reaches 4.
Neither this check makes any sense for other channel types,
because lchan_ms_ta_ctrl() is always called in the end of the
measurement period.  Let's drop it.

Change-Id: I0b86d49ec00b38d0f309c56b2519e5d487f0b65b
Fixes: If7ddf74db3abc9b9872abe620a0aeebe3327e70a
Related: OS#5024
2021-02-20 22:46:24 +01:00
Pau Espin b1571af864 tests: Replace deprecated API log_set_print_filename
Change-Id: Ifd1ee307252d19ae535d2234523036c319e4c0ec
2021-02-19 13:51:54 +01:00
Pau Espin 3abbb67ded tests: Explicitly drop category from log
Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: I8713f4e04e92b4d7e211c499fc6e78983edfb139
Related: OS#5034
2021-02-19 13:51:18 +01:00
Philipp Maier da084794a6 gsm_data: handle l1_info with structs
in struct gsm_lchan and also in other places l1_info is handled in its
binary form. Libosmocore now offers structs to handle l1 info, so lets
use those structs to get rid of all the manual decoding of l1_info.

Depends: libosmocore I23c1890b89d5a0574eb05dace9f64cc59d6f6df7
Change-Id: I5eb516d7849750f3dd174d48c9f07dabf2c80515
2021-02-16 22:28:18 +00:00
Neels Hofmeyr f8f806ff2a GSMTAP: make remote host for Um logging configurable via VTY
So far, the only way to configure GSMTAP Um logging is to use the
cmdline argument '-i'.  Let's deprecate it, and add a VTY command
to allow setting the remote host from configuration file.

The legacy '-i' option, if provided, overrides the configuration
file option, and will also appear in 'write file'.

Change-Id: I17676a21c4e0c9cbc88f2c5c53a39c6c6c473ca1
Tweaked by: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
2021-02-16 17:35:47 +00:00
Philipp Maier db403a4e3e vty: dont put a colon after vty_out in cfg_out macro
The cfg_out macro is used like a function in the code below its
definition. This means a colon will follow after it is used. When
the vty_out call in the macro already has a colon the final result will
be vty_out(...);;. This works fine as long the macro is not used in one
line if/else if/else constructs without curly braces {}. The compiler
will interpret the double colon as two lines of code and run into an
error then. Lets fix this by removing the colon from the vty_cout in the
macro.

Change-Id: I2c23c38ce892067add0f95f3e504a9c559e24519
2021-02-15 17:24:42 +01:00
Philipp Maier b89632cc67 l1sap: fix comment: sapi number is missing
Change-Id: I7922a5da0cd75eddfe019f3f5bd041ad911f1dd2
2021-02-15 11:01:34 +00:00
Vadim Yanitskiy d37041b1ea ta_control: make 'struct bts_ul_meas' parameters const
The only reason why it was not 'const' is that in lchan_new_ul_meas()
we may need to overwrite 'ulm->is_sub'.  This can still be done after
memcpy()ing a new set of samples to the destination buffer.

Change-Id: I0cabf75f8e0bf793c01225a4a8433e994c93f562
Related: OS#5024
2021-02-15 10:58:54 +00:00
Vadim Yanitskiy 7d29ff9345 ta_control: cosmetic: use correct naming for MIN/MAX constraints
Change-Id: I112e0b51df06984e2e3f9b567d6d9897e9f9ba28
2021-02-15 10:58:54 +00:00
Harald Welte 3215344300 add support for sysmoBTS 1003 aka "1002 with GPS and PoE"
There's a minor derivative version of sysmoBTS 1002 which has built-in
GPS and PoE.  We call it 1003 in the EEPROM. Let's treat it identical
to 1002 in the existing code base.

Related: SYS#5327
Change-Id: Ia558587d36a75a1db1951d25b471b3f2e78ef4c9
2021-02-15 10:57:58 +00:00
Vadim Yanitskiy 6b93f0f366 GSMTAP: move 'struct gsmtap_inst' and masks to 'struct gsm_bts'
Change-Id: I1c5cb8561dfdcbfd1b23ab28cf95aea7a18c7481
2021-02-13 05:15:37 +01:00
Vadim Yanitskiy 9eb37bc3cb GSMTAP: fix wrong naming of per-BTS SAPI commands
Change-Id: Ieb2d74475e4338e9dd5f3962cf14a0448de253f8
2021-02-13 05:11:30 +01:00
Vadim Yanitskiy 58952ac2b4 GSMTAP: move 'gsmtap_sapi_names' from l1sap.c to vty.c
There is no point in having it there, as VTY is the only user.

Change-Id: If919bc1b2d456559ae9ff1ce5dd27d34742ee51c
2021-02-13 04:55:55 +01:00
Vadim Yanitskiy 82aeeacd52 main: cosmetic: tweak deprecation warning messages
Change-Id: I0b87502b1af5b8ef8c235923bf966f0c76062993
2021-02-13 03:43:56 +01:00
Philipp Maier 6664f47ad7 l1sap: be sure that UL-SACCH repetition is turned off
At the beginning of repeated_ul_sacch_active_decision() The UL-SACCH
repetition capability is tested. If no UL-SACCH repetition is enabled
the function exits. However, we should also make sure that the struct
member that enabled UL-SACCH repetition on the lower level is set to
false as well. Normally that should be the case because it was never
set to true before, but it is better to be sure.

Change-Id: I76a841514eb955b93f2114470b2c80402cf6883c
Related: SYS#5114
2021-02-11 23:23:20 +01:00
Philipp Maier 76308ab3fb l1sap.c: be sure that FACCH repetition is turned off
At the beginning of repeated_dl_facch_active_decision() the ACCH
repetition capabilitiy flags (command only or all LAPDM frames) are
tested. If no FACCH repetition is enabled, the function exists. However,
we should also make sure that the struct memeber that enables FACCH
repetition on the lower level is set to false as well. Normally that
should be the case because it was never set to true before, but it is
better to be sure.

Change-Id: Id07091cc89352281b41532d583a8bc004477c71a
Related: SYS#5114
2021-02-11 22:58:34 +01:00
Philipp Maier 2b3aa67a7b l1sap: fix repeated_dl_facch_active_decision()
The function checks meas_res->rxqual_sub against the lower threshold
value in order to decide when to turn FACCH repetition off. This is not
correct. It should compare against rxqual instead.

Change-Id: Id4ab101d52f419583c4f4c8a6cf69af6c9097d25
Related: SYS#5114
2021-02-11 22:49:19 +01:00
Vadim Yanitskiy dabe5d0327 oml: ensure that IPA RSL Connect ACK/NACK contains all IEs
All IEs in the BSC originated message are optional, so we assume
default values for them.  Let's reflect them all in the ACK/NACK.

Change-Id: I5c73e83daad0cea07b9cb674c393e0bfc6268a61
Related: OS#3791
2021-02-10 15:06:54 +00:00
Vadim Yanitskiy 522a33fe82 oml: reuse the given msgb in oml_fom_ack_nack()
This would allow to compose ACK/NACK messages with additional IEs
not present in the original message.  Also, this change basically
eliminates unnecessary msgb_copy() / free().

Change-Id: I17f61636e9a144017e2c46b1540d152c21529391
Related: OS#3791
2021-02-10 15:06:54 +00:00
Vadim Yanitskiy b1485cd590 power_control: implement handling of P_Con_INTERVAL parameter
Change-Id: Ibf9956b2c6d829b38e9fda7d1f29790036219f42
Related: SYS#4918
2021-02-07 23:08:57 +01:00
Vadim Yanitskiy 6b36cce2ea power_control: cosmetic: fix swapped {L,U}_RXQUAL_XX_P comments
Change-Id: I2fe198f9275f4e5407ad6fdfa68d4fa7d603e333
Related: SYS#4918
2021-02-07 23:03:04 +01:00
Vadim Yanitskiy bb04495251 oml: use regular TLVP_PRES() in rx_oml_ipa_rsl_connect()
Both NM_ATT_IPACC_DST_IP and NM_ATT_IPACC_DST_IP_PORT are defined
as TLV_TYPE_FIXED, and NM_ATT_IPACC_STREAM_ID is TLV_TYPE_TV, so
the TLV parser already does check the length for us.

Change-Id: I1e493e552bb22bb42bb196ce71214e28d23fd19e
2021-02-07 03:40:32 +00:00
Vadim Yanitskiy 187effa00d oml: make 'struct tlv_parsed' pointer const where possible
Change-Id: I077f5aba50cc4d1a86feff527784de07394c5c0a
2021-02-07 03:39:53 +00:00
Vadim Yanitskiy fe45b4eb1f oml: avoid redundant ntohl() / htonl() conversion
Change-Id: I2ae84dcd2987ff0cee5ca06ced06e65a30847a81
2021-02-07 03:39:53 +00:00
Vadim Yanitskiy a2da0e96e1 vty: register libosmocore's FSM introspection commands
Change-Id: I1eb203673259b455c339784719e288bac14145c0
2021-02-06 16:50:44 +00:00
Vadim Yanitskiy f7afeb1fa9 oml: cosmetic code style changes in rx_oml_ipa_rsl_connect()
Change-Id: I2841e15865596bbb24cfe1f27691404514d3b6f0
2021-02-06 15:14:05 +01:00
Vadim Yanitskiy 5ca7707e85 osmo-bts-trx/scheduler: use DMEAS in trx_sched_meas_avg()
Change-Id: I68a37e17469ec9f8178fd2027b8860dbc643a4f9
Related: OS#5007
2021-02-05 16:41:27 +01:00
Philipp Maier ed7bca6b33 pcu_sock: fix uninitalized returncode value
In function pcu_tx_si_all(), the variable rc is not initalized. If
pcu_tx_si() fails, then rc is populated with value -EINVAL, but if all
si transmissions succeed, which is the normal case, rc remains
uninitalized.

Change-Id: I571fdb4f175fb259b77f989554f569fc2230dfe6
Related: CID#216932
2021-02-04 14:08:42 +00:00
Vadim Yanitskiy f7c7d2baf6 pcu_sock: pcu_tx_si_all(): fix returning ununitialized rc
Change-Id: Ic78614bebade701db14439aa64ecf89c7104a639
Fixes: CID#216932
2021-02-04 13:40:24 +01:00
Vadim Yanitskiy df80385f26 pcu_sock: pcu_tx_si_all(): cosmetic coding style change
Change-Id: I11f60ecdd3cfa2132d58fd3034bfe7419df0edb6
2021-02-04 12:50:19 +01:00
Vadim Yanitskiy ac38cf8e90 pcu_sock: pcu_tx_si_all(): make 'si_types' const
Change-Id: I0a6b0191187af2e14c9264c571afe53fc256d8ce
2021-02-04 12:49:17 +01:00
Harald Welte 6eb98ab25c Use osmo_fd_*_{disable,enable}
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
Change-Id: I0da17d851ccb83c28a70c9039d0a4d1fe63da0ec
2021-02-03 10:41:16 +01:00
Philipp Maier 98c7b44f8d pcu_sock: send SI1, SI3 and SI13 via PCUIF
This patch PCUIF extends the SAPI 4 that is used
to transfer SI13 only, so that it can transfer SI1 and SI3 as well.

The system information SI1, SI3 and SI13 is needed by the NACC RIM
application which runs inside osmo-pcu.

Depends: osmo-pcu I5138ab183793e7eee4dc494318d984e9f1f56932
Change-Id: Ib7aeb41e634ad6fcab3766a4667b0267c749436a
Related: SYS#5103
2021-02-03 08:26:25 +00:00
Oliver Smith 23ff5f8861 common/measurement.c: fix gcc 4 + -std=gnu11 error
GCC-4 doesn't like static const struct foo bar = (struct foo)...:
  measurement.c:33:1: error: initializer element is not constant

Related: OS#5004
Change-Id: Iec5a4006dfc90abe240fcf8b6c2fefd4f7071a70
2021-02-02 13:33:04 +01:00
Neels Hofmeyr 10272f7702 chan activ: activate DL SACCH only when TA is known
A channel activation for handover to another cell does not know the
Timing Advance until the handover RACH is received. It does not make
much sense to enable downlink SACCH without an accurate TA.

If the BSC omits the Access Delay IE (a.k.a. the Timing Advance), do not
enable downlink SACCH. This is expected to happen only for inter-cell
handover. In all other situations, the TA should be known either from a
Channel Request RACH for Immediate Assignment, or from the previous
lchan on the same cell upon Assignment / intra-cell handover.

Related: OS#4008 OS#4009 SYS#5192
Change-Id: I170b63c9856230d5f1a10654a9d950ada8e730d7
2021-01-28 23:57:10 +01:00
Oliver Smith a666f713ec configure.ac: set -std=gnu11
Change-Id: I234394b2c8bec2a3920fd57bee238b99e4e60c22
2021-01-28 09:28:22 +00:00
Vadim Yanitskiy f7cf5e2612 power_control: clarify the meaning of 'delta' in logging messages
One part of the algorithm simply provides a _suggested_ 'delta' that
needs to be applied to the current power level, while the other part
ensures that this suggested value does not exceed the limits.  Thus
it's possible that some logging messages would state that the power
reduction value remains unchanged, while the 'detla' != 0.

Change-Id: I7496a158b9ac6074a965056d708d8078a98cb1aa
Related: SYS#4918
2021-01-24 16:21:32 +01:00
Vadim Yanitskiy a81dfdb096 l1sap: include Uplink RSSI in GSMTAP packets
Change-Id: I99a257c0320b08b62270a35796bee7f8e862e3ab
Related: SYS#5073
2021-01-23 17:32:56 +01:00
Vadim Yanitskiy 3992249c64 l1sap: fix gsmtap_ph_{data,pdch,rach}(): use 'const'
Change-Id: If353ba78b59af2b0a62bbd0c812a46990b07776f
2021-01-23 17:30:00 +01:00
Vadim Yanitskiy af48e77f23 power_control: add test for inc / red step size limitations
Change-Id: Ic2d4e144b0319d86daa9fbe38727b892081f0c37
Related: SYS#4918
2021-01-21 16:59:25 +01:00
Vadim Yanitskiy dc61d6032b vty: add expert commands for MS/BS power control
These new commands are useful for debugging MS/BS power control
loops, e.g. one can change power control mode, overwrite the
current BS power reduction or MS power level at run-time.

Change-Id: I1ebb033b02c2bc3b1fa7de874e0035a07297f266
Related: SYS#4918
2021-01-20 23:54:54 +01:00
Vadim Yanitskiy f416e5a01c vty: make commands related to the loopback mode hidden
The loopback mode was added for testing, and may be dangerous if
enabled in production.  Let's make it appear only in expert mode.

Change-Id: I3f68acd7f2b0231f78516f59fb5e8ef56fb69dbf
2021-01-20 23:54:05 +01:00
Vadim Yanitskiy 510a47818a vty: extend trx / lchan number range in BTS_T_T_L_CMD
Change-Id: I8d8a4c46909daa0f2682d9662db8dffb4fbd8422
2021-01-20 22:06:08 +00:00