aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-06-24control.adoc: add doc for apply-config-filePhilipp Maier1-0/+1
apply-config-file is not documented in the manual. Change-Id: I469e3925c1079e45eea246e599bcd50ba3fc9dd3 Related: SYS#5369
2021-06-24bsc_ctrl_commands: add command to write vty configPhilipp Maier2-0/+28
we recently added control commands to apply vty config files during runtime using the control interface. However, there is no command that allows us to store the config file modifications. Change-Id: If17095bb86f82dd8feb86eb72c4133ea3aa1c3b3 Related: SYS#5369
2021-06-23use osmo_select_shutdown to get rid of SIGTERM sleepNeels Hofmeyr1-3/+5
Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996
2021-06-23abis_rsl: fix rsl_rx_ccch_load(): properly check the message lengthVadim Yanitskiy1-1/+1
msg->data_len is the total number of bytes available in the buffer, not the actual length of the payload. Use msgb_length(). Change-Id: I35bf0827ff14e84a755c1aa24a6efc06bc7b9f9b
2021-06-22PCUIF protocol: add message definition for interference reportVadim Yanitskiy1-0/+10
Change-Id: I4bd5d4de695a1f9f202870cfd7e43caac9ce6d48 Related: SYS#5313, OS#1569
2021-06-22support A5/4 in inter-BSC HandoverNeels Hofmeyr2-3/+21
inter-BSC into this BSC: from BSSMAP Handover Request, parse and store Kc128. All else is already implemented: depending on the chosen encryption algorithm, Kc128 will end up in the Channel Activation. inter-BSC out of this BSC: nothing is needed to support A5/4, the BSSMAP Handover Required message does not contain any encryption related information. The MSC already knows the chosen algorithm. Related: SYS#5324 Change-Id: I7e9590e8c96aa50086148863ad9a2741b978e614
2021-06-21VTY: fix typo in a command description: s/send/sent/Vadim Yanitskiy1-1/+1
Change-Id: Idb2fda4c2bd8a4e7ee6c4d7c7dc08a7d4f20d00d
2021-06-18implement A5/4 in Ciphering Mode procedureNeels Hofmeyr3-1/+29
Receive and store the Kc128 key from MSC, and use as key sent to BTS if A5/4 is the chosen encryption algorithm. (A5/4 in handover will follow in a separate patch) Related: SYS#5324 Change-Id: I7c458c8a7350f34ff79531b3c891e1b367614469
2021-06-18vty: allow A5/4 encryption in configEric1-1/+1
Add A5/4 to the internal mask of allowed algorithms. (Not actually working yet, A5/4 implementation follows in other patches.) Related: SYS#5324 Change-Id: Icac06ed554fd61bf7c4bfb1d5c3739a01f2915a4
2021-06-18dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()Neels Hofmeyr1-32/+25
An upcoming patch for A5/4 would need to add a kc128 arg and reject cause rc to gsm0808_cipher_mode(). Instead prepare for less cruft by just having a single function. Related: SYS#5324 Change-Id: I7f7c635943990a251ae28ae7a0d69cc3a239a154
2021-06-18rewire build_encr_info() to return errorsNeels Hofmeyr1-4/+35
In build_encr_info(), validate the algorithm and key presence and return negative if errors are encountered. At all callers, handle the error case. An upcoming patch will add handling of Kc128 for A5/4 encryption and also wants to return error codes. This is a preparation for that patch: I7c458c8a7350f34ff79531b3c891e1b367614469 Notice that osmo-bsc does send the key along even if A5/0 is chosen, this patch keeps that behavior unchanged. Related: SYS#5324 Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
2021-06-18rsl_lchan_lookup: drop redundant conditionNeels Hofmeyr1-1/+1
'vamos' is only set to true for osmobts types, hence no need to check that condition again. fixup for commit d37dcb9f6854a4d15dd2ba098fcbaa212251684f 'RSL: rx and tx VAMOS Channel Number cbits for VAMOS lchans' I957eff0d2c33ec795eda75a4bff21965b0179f73 Related: CID#236318 Related: SYS#5315 OS#4940 Change-Id: I4d9afc2996d95fdc15ee1a04e31d781b595023e3
2021-06-18rsl_data_request() check lchan pointer before accessNeels Hofmeyr1-5/+7
fixup for commit 43aeeaf05ad814ccab0e93227b1248a20302c8ec 'RSL chan_nr: replace OSMO_ASSERT with error handling' I71ed6437c403a3f9336e17a94b4948fca295d853 Related: CID#236319 Related: SYS#5315 OS#4940 Change-Id: I873c1a27f9449a56c525984ea50bfcf6daa4b5f8
2021-06-18hodec2: don't apply AFS bias to same-cell lchansNeels Hofmeyr2-12/+9
The AFS bias actually should not apply to local cell lchans, because it makes no sense for intra-cell considerations: - same-cell lchans obviously have identical rxlev; - any nonzero AFS bias thus always raises the TCH/F above the TCH/H; - for intra-cell reassignment, the power budget hysteresis is, naturally, not applied. So, before this patch, setting AFS bias even to only 1 would unconditionally move all (AMR) TCH/H lchans over to free TCH/F lchans in the same cell. Recent patch Id40d1cf8b58410c7d4eb87407fe8b8106e352438 implements explicit upgrade from TCH/H to TCH/F *if* the TCH/H is experiencing low rxqual or low rxlev, as a proper replacement for intra-cell AFS bias. Related: SYS#5198 SYS#5365 Change-Id: I315f24123ae016887ab91666870ce252e096f90f
2021-06-17Introduce counters to track SRVCC proceduresPau Espin Pedrol4-0/+53
Related: SYS#5337 Change-Id: I5c20da56d465dbcf4366130394f7c42635a24cc7
2021-06-17Introduce VTY command to disable srvcc fast-return on target BTSPau Espin Pedrol8-13/+47
Related: SYS#5337 Change-Id: I2ac91b5dffc9b6de60576aabe21a15f24fea38cb
2021-06-16handover_cfg: add missing VTY_CMD_PREFIX in commentPhilipp Maier1-1/+1
The comment that explains HO_CFG_ONE_MEMBER lacks VTY_CMD_PREFIX in the sample macro definistion. Change-Id: I80db198178cfd1e8669589eb3b468766f0c30ea2
2021-06-15vty: reassign: add missing check for valid target lchanNeels Hofmeyr1-0/+4
Make sure that the target lchan has been initialized before attempting to reassign. I ran into this in the VAMOS tests, forgetting to set the BTS_FEAT_VAMOS in osmo-bts-omldummy: the vty command from ttcn attempts to reassign to a non-initialized lchan, and aborts osmo-bsc. Change-Id: Ia77a3312dde0e4b8df9ad2f33339266bae06439d
2021-06-15fixup for vamos: fix wrong cbits in rsl_lchan_lookup()Neels Hofmeyr1-1/+1
The RSL_CHAN_OSMO_VAMOS_MASK mask applies to the chan_nr, but the cbits variable in rsl_lchan_lookup() is chan_nr >> 3. So the mask didn't do its job. Now it does. A bit embarrassing how i took the suggestion to use this mask and put it into code without testing it. It looked good enough... Change-Id: I005c5f319bb6f14651aeb613cdff52e79f761913
2021-06-13hodec2: implement upgrade TCH/H -> TCH/F (without AFS bias)Neels Hofmeyr5-54/+34
Pass flag into find_alternative_lchan() indicating that a TCH/H channel has low ratings (rxqual or rxlev, doesn't matter). Heed this flag in the last round, the requirement A check, and allow candidates that have equal rxlev, if they result in an upgrade from TCH/H to TCH/F. This allows intra-cell upgrades to TCH/F. An important point is that this patch allows upgrade to TCH/F *without* the AFS bias setting. See also I315f24123ae016887ab91666870ce252e096f90f. Related: SYS#5198 SYS#5365 Change-Id: Id40d1cf8b58410c7d4eb87407fe8b8106e352438
2021-06-10gsm_data.h: add comments about immutable activ/modif/assign request infoNeels Hofmeyr1-0/+18
Change-Id: I7997b802d997073ae6a05db2f40e82cb8e83764f
2021-06-10lchan_fsm: lchan_fail() strings should not have a terminating newlineNeels Hofmeyr2-10/+10
Change-Id: I063fd5598add75c39338d90798189c10a0714094
2021-06-10RSL: set default TEI according to TRX numberNeels Hofmeyr1-0/+2
Change-Id: I3c500f7a5afc9143d4ea7102ab96e52aeb67b4b6
2021-06-10cosmetic loop simplification in gsm48_multirate_config()Neels Hofmeyr1-3/+3
Change-Id: I52424ad6a0bf499fe040cf0a1de00e636a0a40fe
2021-06-10get_any_lchan(): reduce minor code dupNeels Hofmeyr1-11/+4
Change-Id: I304a7333adc265e156f04b42a10bac6912f58ad2
2021-06-10clarify bts_chan_loadNeels Hofmeyr1-7/+6
Change-Id: I9bd80a08472018e69360ac5739979c7056d4f063
2021-06-10log: assignment_fsm: tweak err msg for incompatible chanNeels Hofmeyr1-2/+4
Related: SYS#5315 OS#4940 Change-Id: Ifd8790923d54a27061708ff8077d509238b9c7dd
2021-06-10log: assignment_fsm: drop newline from assignment_failNeels Hofmeyr1-1/+1
Drop terminating newline from an assignment_fail() call which causes an erratic line feed in logging. Change-Id: Ib56e1f6a45c7e2c235f8ef0c8dea7151481677ab
2021-06-10VTY: add lchan re-assignment commandNeels Hofmeyr4-0/+129
Add VTY command to trigger an intra-cell re-assignment, also allowing to re-assign to a secondary VAMOS lchan. Related: SYS#5315 OS#4940 Change-Id: If006f5caaf83b07675f57e5665cfa79328da55e6
2021-06-10VTY: add 'vamos-subslot' to activate a secondary lchanNeels Hofmeyr2-10/+27
Related: SYS#5315 OS#4940 Change-Id: If44b6bdb78046502eb0b66529ae190a955d9978c
2021-06-10VTY: 'show lchan': show that lchan is in VAMOS modeNeels Hofmeyr1-1/+4
Related: SYS#5315 OS#4940 Change-Id: I9f38712f941d60531526cc3395875655455909d9
2021-06-10RSL: rx and tx VAMOS Channel Number cbits for VAMOS lchansNeels Hofmeyr7-42/+83
Add the Osmocom-specific extension to indicate VAMOS shadow lchans in RSL, in lchan lookup and RSL message transmission. Note that RR messages containing cbits (Assignment Command, Handover Command, ...) must *not* send Osmocom specific cbits to the MS. Only the RSL messages directed to the BTS send Osmocom specific bits. Related: SYS#5315 OS#4940 Depends: If33c1695922d110c0d2c60d5c0136caf2587194e (libosmocore) Change-Id: I957eff0d2c33ec795eda75a4bff21965b0179f73
2021-06-10RSL chan_nr: replace OSMO_ASSERT with error handlingNeels Hofmeyr8-59/+183
It's bad to abort the program for an incompatible chan_nr. Instead of OSMO_ASSERT(), make sure that error handling happens all they way to the original callers of gsm_lchan2chan_nr etc. This is also preparation to add further error causes: Osmocom specific cbits needed for a non-Osmo BTS. Related: SYS#5315 OS#4940 Change-Id: I71ed6437c403a3f9336e17a94b4948fca295d853
2021-06-10rsl_lchan_lookup(): add comment explaining ts_is_capable_of_pchan()Neels Hofmeyr1-0/+4
Change-Id: Ie3699db496cfb690ac9302ccd177cdd77dc57ebb
2021-06-10rsl_lchan_lookup(): turn cbits if-cascade into a switch()Neels Hofmeyr1-7/+28
There is some odd repetition of macros with all possible subslot indexes, but now we are using the defined macros instead of magic numbers, making it easier to see that it is correct. Also this allows trivially adding VAMOS cbits cases to the existing switch() in a subsequent patch. Change-Id: I4c6ce2f4ca999c19a58909b9adb849a3b8b6ffc8
2021-06-10update the lchan name to always reflect VAMOS shadownessNeels Hofmeyr7-12/+25
Change gsm_lchan_name_compute() to a function that in-place updates the lchan->name. That allows calling it numerous times with the talloc handled internally. Rename it to lchan_update_name(). Add 'shadow' to lchan_update_name() and lchan_fsm_update_id() for VAMOS shadow lchans, and also print the lchan index that it is a shadow for, instead of the index in the lchan array. When set_pchan_is() updates the VAMOSness of the lchans, call lchan_fsm_update_id(). From lchan_fsm_update_id() also call lchan_update_name(). This is a bit convoluted for legacy reasons. There are utility programs and C tests using bts_trx.c but not lchan_fsm.c. lchan_update_name() lives in gsm_data.c for that reason. This patch calls lchan_update_name() from lchan_fsm_update_id() and not vice versa to avoid having to add stubbed lchan_fsm_update_id() functions to all utility programs and C tests. We can't easily unify the lchan->name and lchan->fi->id without lots of refactoring rippling through all those little utility programs and C tests. Change-Id: I7c2bae3b895a91f1b99b4147ecc0e3009cb7439a
2021-06-10add VAMOS secondary lchans to timeslot structNeels Hofmeyr5-12/+105
So far there is a bunch of code setting a primary lchan in VAMOS mode. This patch now adds the actual secondary "shadow" lchans that may be combined with a primary lchan in VAMOS mode to form a multiplex. VAMOS lchans are put in the same ts->lchan[] array that keeps the primary lchans. They are at most two additional usable lchans (for a TCH/H shadow) added to either TCH/F or TCH/H. Keeping these in the same array allows looping over all lchans easily. The ts->max_primary_lchans indicates the index of the first VAMOS shadow lchan. Related: SYS#5315 OS#4940 Change-Id: I928af99498bba488d317693f3144d4fccbbe9af3
2021-06-10RR Assignment for VAMOS: send TSC SetNeels Hofmeyr1-0/+6
We already send the TSC Set in the RSL Channel Activation, telling the BTS about the TSC Set. The MS needs to be instructed of the TSC Set in the RR Assignment Command. The first code to actually do an Assignment to a VAMOS activated lchan will follow in If006f5caaf83b07675f57e5665cfa79328da55e6. Change-Id: Ibf3b6d276fadf724c16a5225c03e96a27a056153
2021-06-10implement CHANnel ACTIVate to VAMOS modeNeels Hofmeyr5-17/+54
Related: SYS#5315 OS#4940 Change-Id: If3ac584e4223ef7656c7fedc3bf11df87e4309ec
2021-06-10add missing AMR config for RTP activation after mode modifyNeels Hofmeyr1-11/+19
Add function lchan_activate_set_ch_mode_rate_and_mr_config() and call it for both plain channel activation and after a mode modify that needs RTP activation. The AMR config was missing after Mode Modify. Related: SYS#5315 OS#4940 Change-Id: I842fe7a14a91d1ec123cb4a3f52afe34456c03e3
2021-06-10lchan_fsm: introduce lchan.activate.ch_mode_rate to allow tweakingNeels Hofmeyr5-13/+20
lchan->activate.info.ch_mode_rate should remain unchanged, it is the immutable request data. However, for VAMOS, we will want to automatically see that the chan_mode is chosen correctly. As a first step, place a mutable ch_mode_rate copy at lchan->activate.ch_mode_rate, i.e. not in .activate.info, but in .activate. Use that everywhere. This is mostly a non-functional change, preparing for a subsequent patch that adds handling of VAMOS shadow lchans. As side effect of adding lchan_activate_set_ch_mode_rate_and_mr_config() after MODE_MODIF_ACK (enabling the voice stream after a channel mode modify), fix AMR config: the call to lchan_mr_config() was missing. Change-Id: Icc9cc7481b3984fdca34eef49ea91ad3388c06fe
2021-06-10vty-test: osmo-bsc.vty: test doc of lchan activate cmdNeels Hofmeyr1-0/+56
A subsequent patch will add to this VTY command, so let's first test the current status as a baseline. Change-Id: I6379e306fb8fa6ec227125c6cf14893d674e7596
2021-06-10add lchan->vamos.is_secondary flagNeels Hofmeyr2-2/+9
VAMOS shadow lchans do not exist yet, but add the indicator flag that tells whether an lchan pointer is a primary or a shadow lchan. In Mode Modify: based on the flag, choose a different default TSC Set for shadow lchans; do BTS type compat checking for shadow lchan use. Actual lchans with vamos.is_secondary == true will be introduced by patch: 'add VAMOS secondary lchans to timeslot struct' I928af99498bba488d317693f3144d4fccbbe9af3 Change-Id: I4072fc7703c592df699fe8e27c02df09acde0909
2021-06-10vty: add lchan modify '(vamos|non-vamos)' commandNeels Hofmeyr2-28/+113
Change-Id: If44c3483d4d3d86f5822c5ad882aaeeaff27e3af
2021-06-10implement Channel Mode Modify to VAMOS modeNeels Hofmeyr4-6/+53
Put a (primary) lchan in VAMOS speech mode. This is not yet about activating shadow lchans, this merely puts any lchan in a VAMOS capable channel- and speech mode. Protocol: In RR Channel Mode Modify, send a spec conforming VAMOS channel mode as well as an Extended TSC Set, wich adds the TSC Set to the training sequence code value. In RSL MODE MODIFY, send Osmocom specific extensions to indicate the TSC Set and TSC, as well as the VAMOS channel mode; only to OsmoBTS type cells. - Set the Channel Mode's Channel Rate to Osmocom specific RSL_CMOD_CRT_OSMO_TCH_VAMOS_Bm / RSL_CMOD_CRT_OSMO_TCH_VAMOS_Lm - Add the Osmocom specific Training Sequence IE containing both TSC Set and TSC. (These are documented in the Abis manual.) Implementation: The internal API to request a Mode Modify is lchan_modify(info). Add to this info the 'vamos' bool, set to true when the modification should put the lchan in VAMOS channel mode or not. When info.vamos == true, make sure the channel mode value is a VAMOS one: in the copy of info->ch_mode_rate at lchan->modify.ch_mode_rate, convert to the right VAMOS/non-VAMOS equivalent channel mode. When the modification is through, set lchan->vamos.enabled appropriately. This patch also builds on Ic665125255d7354f5499d10dda1dd866ab243d24 'allow explixit TSC Set and TSC on chan activ / modif / assignment' placing tsc_set and tsc values in the TSC related IEs. Related: SYS#5315 OS#4940 Change-Id: Ibf53f4797d7491b17a33946fd7d920f038362b4c
2021-06-09vty: Drop unused old node enum fieldsPau Espin Pedrol1-2/+0
Change-Id: Ifccd1e477c36bee976a61760b0fedc395f675c1f
2021-06-09allow mode modify when RTP stream is activeNeels Hofmeyr1-9/+0
Get rid of this artificial barrier, because Modify with active voice stream is supported since commit "lchan and assignment FSMs: make Channel Mode Modify more sane" d5cb0eb8fda3ade89c7b2e23a626b68dfda96f46 I4986844f839b1c9672c61d916eb3d33d0042d747 Change-Id: I25f4a881fa32a07f97d7d6e6b812f8afc699d951
2021-06-08hodec2: fix is_upgrade_to_tchf() for requirement ANeels Hofmeyr1-1/+1
Add missing REQUIREMENT_A_TCHF to form a full REQUIREMENT_TCHF_MASK. That allows detecting TCH/F -> TCH/H upgrades also in the requirement A flags, where we look for any viable lchan. Prepares for upcoming patch Id40d1cf8b58410c7d4eb87407fe8b8106e352438 which implements TCH/H to TCH/F upgrades within the same cell. Related: SYS#5198 SYS#5365 Change-Id: Ic44615b314782423bab0ceef5810311776f92754
2021-06-08cosmetic prep: hodec2: move is_upgrade_to_tchf() further upNeels Hofmeyr1-7/+7
Preparation for Id40d1cf8b58410c7d4eb87407fe8b8106e352438 Related: SYS#5198 SYS#5365 Change-Id: I3fd0e257e033c573017ce62e3efc19b094acf73c
2021-06-08hodec2: add handover_test cases for upgrade of TCH/H -> TCH/FNeels Hofmeyr6-0/+210
Add test_amr_tch_h_and_afs_bias.ho_vty test_amr_tch_h_to_f_rxlev.ho_vty test_amr_tch_h_to_f_rxlev_congested.ho_vty test_amr_tch_h_to_f_rxqual.ho_vty test_amr_tch_h_to_f_rxqual_congested.ho_vty Related: SYS#5198 SYS#5365 Change-Id: Ib88f7e00d8bd77e2b02a7242a0fab4dd79333037