aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
AgeCommit message (Collapse)AuthorFilesLines
2021-02-17stats: add SIGN/SPEECH assignment subcategoriesMichael Iedema1-0/+12
Change-Id: I73f4dab6edb0951180f2bbcfc352ff34de647679
2021-02-13Move bts_ident_key to neighbor_ident.cPau Espin Pedrol2-2/+2
The function is not really handover specific, and will be used in other places in subsequent patches. Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
2021-02-09Introduce VTY cmd to configure Alpha in SI13Pau Espin Pedrol1-0/+3
Related: SYS#5358 Change-Id: I8b97ea11bad5fe05f2f634945b5703ee9abde81d
2021-02-07power_control: make P_CON_INTERVAL parameter configurableVadim Yanitskiy1-0/+3
Change-Id: I6e0fae81cc60f708e49d5eb8dfc0bbcad926b18f Related: SYS#4918
2021-02-05lchan activation: indicate whether TA is knownNeels Hofmeyr1-0/+2
On lchan activation, we already know the Timing Advance in most situations: from the Channel Request RACH, or from a previous lchan in the same cell. Place this information in lchan->activate.info.ta. So far, the lchan->last_ta (until recently called rqd_ta) was used to store the initial TA for channel activation -- move the initial TA to lchan->activate.info.ta, for proper scoping. Only an inter-cell handover does not yet know a Timing Advance (until the Handover Detection RACH is received), so indicate activate.info.ta_known = false for that case. If ta_known is false, do not include an Access Delay IE in the Channel Activation message, ensuring that the BTS does not use an arbitrary TA that is likely inaccurate. The effect for OsmoBTS is that we will *not* start the downlink SACCH on channel activation for inter-cell handover, but will wait for a HO RACH first, and then use the correct TA when enabling downlink SACCH. Related: OS#4008 SYS#5192 Change-Id: I986bf93e8acd6aef7eaf63ac962480b680aa894f
2021-02-05rename lchan->rqd_ta to last_taNeels Hofmeyr1-1/+3
Originally, the lchan stored only the Timing Advance from the initial channel request, hence it was called rqd_ta. Since quite a while now, rqd_ta also stores the most recent Timing Advance from each received Measurement Report. So rename to last_ta. This is cosmetic preparation for an upcoming patch that clarifies whether the Timing Advance is already known for Channel Activation. Change-Id: I1049526a173819baeb4978db5bf018ba3f1006a0
2021-01-30Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by default on osmo-btsPau Espin Pedrol1-0/+4
This is required in order to tell MS that osmo-pcu now supports Network Assisted Cell Change (NACC). Other BTS are not enabled by default since NACC support is not known to work nor tested there. Depends: libosmocore.git Change-Id I61991266b95d0c13d51b47906cc07846e9cf1390 Related: SYS#4909 Change-Id: If91d85331d402c3ab9c32b70c2c66cd7ba6ceb28
2021-01-30stats: Add granularity to chan:rf_fail stat.Michael Iedema1-0/+2
Add additional counters to track TCH and SDCCH RF failures in separate subcategories. Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
2021-01-19lchan_avail(): omit logging for handover decision 2Neels Hofmeyr1-1/+1
Add bool log argument to lchan_avail_by_type() and omit logging when passed as false. From handover_decision_2.c, pass 'log' as false, from all other callers pass true, i.e. for unchanged behavior. Rationale: Usually, we use lchan_avail_by_type() to select a new lchan to initiate actual service. For that, it is interesting to see how osmo-bsc decides which lchan will be used. For handover decision 2, we since recently call lchan_avail_by_type() for each and every handover candidate, to determine whether it will occupy a dynamic timeslot or not (to know whether we would congest the other TCH kind). So this happens for each permutation of source lchan and target cell. That produces a lot of logging, out of proportion of being useful to the maintainer. Change-Id: Ia403f8fc853ca9ea9e81f7a7395df6b23845ebed
2021-01-18stats: Add granularity to SDCCH/TCH/LU activity.Michael Iedema1-0/+15
Change-Id: I4df275e4770c5ff3643c79ba828e736986f8bb47
2021-01-13Introduce Neighbor Resolution ServicePau Espin Pedrol2-1/+18
This new CTRL interface allows users of this BSC (such as attached PCU) to gather neighbor information. This interface is needed for PCU to translate ARFCN+BSIC keys provided by MS in the Um side into CGI + RAC keys used to identify target cells in RIM procedures against SGSNs on the Gb interface. This patch extends the already existing neighbor information storage in the VTY by allowing storage of CGI + RAC (RAC couldn't be stored beforehand). Related: SYS#4909 Depends: libosmocore.git Change-Id If48f412c32e8e5a3e604a78d12b74787a4786374 Change-Id: Ib07c9d23026332a207d4b7a0f7b4e76c0094e379
2021-01-02abis_om2000: keep OM2K FSMs around, don't terminateHarald Welte3-1/+20
The existing code uses short-lived FSMs which are allocated straight before START, and which are free'd after DONE state is reached. While that works, it makes state introspection a bit hard, as one cannot show the FSM states, etc. Let's change to a different model where the per-OM2k-MO FSMs are always around (in state INIT after object creation). While at it, also introduce a RESET event that can reset each FSM instance back to INIT state, i.e. in case of OML link failure. Change-Id: Ia37cffff5c451e1d79a52ccae41ab5718b4661d4
2020-12-29abis_om2000: make om2k_mo_name() an exported functionHarald Welte1-0/+2
Change-Id: Idb05bcad8059ab2b2be6c7057495d0279a4b62c7
2020-12-29Add a bts_model->bts_init() and trx_init() call-back functionHarald Welte1-0/+8
This allows a given BTS model driver to initialize data structures specific cor this BTS instance (or a TRX for this BTS instance). Change-Id: Icbad9cdc12221c9ad997267d77e5414edcbac538
2020-12-22power_control: add VTY command to set static / maximum BS PowerVadim Yanitskiy1-0/+4
Change-Id: I11ca856aba46aaf84d94cbbdf4c39a01ee8289b9 Related: SYS#4918
2020-12-22power_control: add VTY commands for per-BTS configurationVadim Yanitskiy1-0/+1
Change-Id: Ifd6ea29c3b9dbaccf92856131d5fb2e352b84eb2 Related: SYS#4918
2020-12-19power_control: add encoding/init API to 'struct gsm_bts_model'Vadim Yanitskiy1-0/+5
This change introduces two optional function pointers: - power_ctrl_enc_rsl_params() - this function will be called by the A-bis/RSL code in order to encode MS/BS Power control parameters for CHANnel ACTIVation and MS/BS POWER CONTROL messages. - power_ctrl_send_def_params() - this function will be called for each transceiver on A-bis/RSL link establishment in order to send default MS/BS Power control parameters. Change-Id: Iba3ad5d8d549a6676050272f85b21c9b4c219d21 Related: SYS#4918
2020-12-19power_control: add new structures and default parametersVadim Yanitskiy2-0/+74
Change-Id: I7fb8ccb997490b40a061d09c241359aaabc37c4a Related: SYS#4918
2020-12-19abis_rsl: turn rsl_msgb_alloc() a macro and move it to headerVadim Yanitskiy1-0/+7
Also, take a chance to make talloc chunk names more informative. Change-Id: Id25c4bf1e06f697328d10777d6449c83006e8466
2020-12-15Use rest_octets functionalities from libosmocorePau Espin Pedrol4-124/+2
libosmocore > 1.4.0 is required (master, not yet released) since some fixes done in osmo-bsc code where not cherry-picked to libosmocore APIs. Depends: libosmocore.git I2bf5635b8536b11d69774d17ac1908019633e3af Change-Id: I7d5e5ddd174463c2a3d957c8245d2911ce013681
2020-12-15vty: add new attribute for vendor-specific commandsVadim Yanitskiy1-0/+1
Change-Id: I2254cdf8c4be85c89819d0f831102ee71349b188 Related: SYS#4918
2020-12-10gsm_lchan_name: assert on NULL lchanPau Espin Pedrol1-0/+1
Steve Langasek <steve.langasek@ubuntu.com> submitted some patches against downstream osmo-bsc 1.3.0 because some possible null derefences were detected by the compiler on Ubuntu s390x. Code has eveolved since then and patch doesn't apply directly anymore, since related code changed (we now use osmo_count in bsc_subscr_get). The compiled allegedly claimed some null dereference in gsm_lchan_name. In general code using that function seems to be doing checks for existing lchan before calling it, or assuming the lchan pointer is not null, so I couldn't find any major issue. However, let's add a OSMO_ASSERT to make sure we can easily identify the issue if an issue ever happens there, since the gsm_lchan_name should clearly only be called on non null pointers. Change-Id: If4d12cb1d95ee2a89244bb8f27df839871667387
2020-12-04oml: Delay configuring NSVC until BTS features are negotiatedPau Espin Pedrol2-0/+6
This is needed in order to to proper feature support verification for IPv6 when configuring the NSVC. Before this patch, there could be a race condition where NSVC FSM checked for BTS feature BTS_FEAT_IPV6_NSVC before it was negotiated through BTS Get Attributes (Ack). Fixes: OS#4870 Change-Id: I7c207eee0e331995ae04acec014fbd13d4d16280
2020-12-04Fix typo in function nanobts_attr_nsvc_getPau Espin Pedrol1-1/+1
Change-Id: I50235ba7b045ab7fba2112e61191d2756a67dfdc
2020-12-04Handle BTS/BBTRANSC Get Attributes (Ack) in NM FSMsPau Espin Pedrol2-0/+3
Before this patch, Get Attributes was sent quicklyafter the OML link became up, even if the BTS/BB_TRANSC objects were still powered off, which is wrong since attributes should only be available after the objects transition out of the Power off state. Furthermore, information about get attr response already received will be required in future patches to delay NSVC setting. Related: OS#4870 Change-Id: I8ec39c7e1f956ffce9aecd58a5590c43200ba086
2020-12-04Introduce NM GPRS NSVC FSMAlexander Couzens2-0/+16
Related: OS#4870 Change-Id: I381472532c2622a8dba7c81ae00ea873c2e58ae1
2020-12-03Introduce NM GPRS CELL FSMPau Espin Pedrol1-0/+9
Related: OS#4870 Change-Id: I074f4496aa153b5f84e6ce85f413754efe64d831
2020-12-03Introduce NM GPRS NSE FSMPau Espin Pedrol3-1/+15
Related: OS#4870 Change-Id: I91a5f40324d5373eac885032295690cec97214a6
2020-12-03Store GPRS MOs directly under BTS SiteMgr objectPau Espin Pedrol4-37/+81
The only real 1-1 relationship between BTS NM objects is the one between GPRS Cell and BTS (which is actually a BTS cell). In our current osmo-bts implementation we don't care much since we only handle 1-cell BTSses, but let's make the data structure organization more generic. Implementation notes: The gsm_bts_sm is moved to its own file, APIs to allocate are added and the new public object is hooked correctly in the allocation process of osmo-bsc. Change-Id: I06461b7784fa2a78de37383406e35beae85fbad8
2020-12-01abis_rsl: parse cm3 and indicate ACCH repetition cap to BTSPhilipp Maier1-0/+3
In order to activate FACCH/SACCH repetition on the BTS, the classmark 3 IE in the CLASSMARK CHANGE message must be parsed and depending on the Repeated ACCH Capability bit the RSL_IE_OSMO_REP_ACCH_CAP is added to the RSL CHAN ACT und RSL CHAN MODE MODIFY. Since RSL_IE_OSMO_REP_ACCH_CAP is a propritary IE, it may only be added for BTS type osmo-bts. Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57 Related: OS#4796 SYS#5114
2020-12-01bts: add repeated acch mode flags + vty configPhilipp Maier1-0/+4
To be able to control the FACCH/SACCH repetition behavior inside the BTS a one byte flag is sent to the BTS together with the RSL_IE_OSMO_REP_ACCH_CAP IE. This patch adds the necessary VTY commands. The sending of the flag is implemented in a follow-up patch. See also: I39ae439d05562b35b2e47774dc92f8789fea1a57 Related: SYS#5114, OS#4796, OS#4794, OS#4795 Depends: libosmocore I6dda239e9cd7033297bed1deb5eb1d9f87b8433f Change-Id: I083eaa2c30478912426e9c24a506f0b88836e190
2020-11-17fix TCH/H allocation: use half occupied dyn TS instead of switching more dyn TSNeels Hofmeyr1-1/+1
Change-Id: I5a8d943f31774af00664d037550be14e767d312a
2020-11-17handover vty doc: explain rxqual valuesNeels Hofmeyr1-2/+5
Change-Id: I4f9d6b59c4f4a0550fb6a386342be55dcd777de8
2020-10-19bts: move rate counter / stat item definitions from *.h to *.cVadim Yanitskiy1-168/+4
A header file should only contain declarations, not entire definitions. The fact that we have 'static const struct ...' definitions in a header file means that very C file including this header file will get its own private copy of the entire definition. The header file should only include declarations, while the actual non-static definitions should go to a *.c file. Let's fix this. Also, take a chance to improve readability and apply more consistent formatting (similar to 'struct hf_register_info[]' in Wireshark). Change-Id: Ib5949879902acbe1edda577477d9d51a2cc425d1 Closes: OS#4816
2020-10-17ipa: Fix use of null pointer in log macroPau Espin Pedrol1-0/+3
Fixes: Coverity CID#214962 Fixes: Coverity CID#214963 Change-Id: Iafea915dbbbfbaa710fb5899cb9be5e507ba384c
2020-10-16drop features 'core-location-area-code' and 'core-cell-identity'Neels Hofmeyr1-2/+0
This feature apparently assigned a fixed LAC and CI to a specific MSC, but looking at the implementation was obviously not useful. Keep the vty commands for legacy compat, now without effect besides logging an error via vty_out(). Related: OS#4751 Change-Id: I6bee704e7e5d5b6b86473323bae1fa9fce9241ee
2020-10-15OML: Stay compatible with older osmo-bts versionsPau Espin Pedrol1-0/+6
Older osmo-bts versions (before FSMs) tended to mimic broken behavior from nanoBTS. As so, we detect it because SiteMGr becomes Enabled by default as in nanoBTS, and hence we can manage them also by expecting no Offline state and sending Opstart (and hence finally transitting to Enabled) during Dependency state. Change-Id: Iaa036a2936f609b9b9721b2b4ad8d6deaf023f42
2020-10-15Introduce Radio Channel FSMPau Espin Pedrol2-0/+10
Change-Id: Iddc008c5737afb2fddd32c628bc5278056a64d89
2020-10-15Introduce NM RadioCarrier FSMPau Espin Pedrol2-0/+11
Change-Id: Ieed61d1fb1e896db42545c2c3421b20cb41ad549
2020-10-15Introduce NM BaseBand Transceiver FSMPau Espin Pedrol2-3/+18
Change-Id: Ib4d35316c52eb4c71ea0d352a1e06fd5e600fe08
2020-10-15Introduce NM BTS FSMPau Espin Pedrol3-0/+14
Change-Id: I7756a8ce90b6cc8a502b5665889a7987d7f749cb
2020-10-15Introduce NM BTS Site Manager FSMPau Espin Pedrol5-3/+60
Change-Id: Ic001ce6ebeff6f51470ef58140b0235f4a30265e
2020-10-15LCS: add proper BSSMAP-LE RESET re-using new generalized reset FSMNeels Hofmeyr1-2/+2
Previous commits to generalize the a_reset FSM prepare for this commit: use the same reset FSM for the Lb interface. Change-Id: I8c03716648f8c69d12d8f0a0bcec14f040d7cff2
2020-10-15LCS: disable Lb interface by default, add vty 'smlc' / 'enable'Neels Hofmeyr1-0/+3
To not modify previous SCCP behavior of OsmoBSC, keep the Lb interface disabled by default. The following configuration enables the Lb interface: smlc enable Change-Id: I01314a29a2cad6f325d9f4687a9dedca6b90a3ce
2020-10-15BSSMAP RESET: move RESET-ACK into reset fsmNeels Hofmeyr1-0/+2
The Lb interface will need the same RESET-ACK logic. Change-Id: Idf4682319a0af5665e867dbc0515d1fe343d9daf
2020-10-15BSSMAP RESET: move cancel-paging call to osmo_bsc_sigtran_reset()Neels Hofmeyr1-1/+1
So far we would cancel ongoing Paging for a given MSC only after receiving a RESET message from that BSC. However, the typical operation would be that OsmoBSC *sends* a RESET and receives a RESET-ACK. Instead, move the call to within osmo_bsc_sigtran_reset(). This is also called when OsmoBSC considers the A-interface link to be lost, from the a_reset.c code, after multiple SCCP connection failures. Change-Id: Ia14b916be56563d18632c69a833084e71799a468
2020-10-15BSSMAP RESET: generalize a_reset FSMNeels Hofmeyr6-2/+33
Separate the a_reset FSM implementation from BSSMAP and MSC specifics, so that it can be re-used on the Lb interface. Move the FSM implementation to bssmap_reset.c and tweak, to match common practices we have generally established in our osmo_fsm implementations. Keep a_reset.h and a_reset.c and redirect to bssmap_reset.c. A difficulty is setting a proper logging category: the FSM definition allows only one fixed logging category for FSM state transitions and events. Ideally, the BSSMAP reset fsm would log on DMSC, and the BSSMAP-LE reset fsm would log on DLCS. Since that is not possible, introduce a separate DRESET logging category. This in fact matches an item on my wishlist, because if a given MSC is configured but currently not connected, the previous RESET FSM would continuously "spam" log LOGL_NOTICE messages indicating that it is resending RESET, and I often want to silence those messages without silencing the entire DMSC category. This is now easily possible by setting DRESET logging to LOGL_ERROR. There is additional "link up" / "link lost" logging on DMSC, so all interesting info is still visible on DMSC. Change-Id: Ib3c3a163186c40a93be0dea666230431172136df
2020-10-09remove unused osmo_bsc_reset.hNeels Hofmeyr1-34/+0
Change-Id: Ib315da03d1731a0e79d09ac886e363890ac815b4
2020-10-09LCS: implement the bulk of Location ServicesNeels Hofmeyr10-0/+169
Depends: I4d7302a4853518916b6b425e710c10568eb2ffe5 (libosmocore) Change-Id: I28314ba97df86a118497e9b2770e2e6e2484e872
2020-10-08LCS: SCCP next conn id: prepare Lb-interfaceNeels Hofmeyr1-0/+3
When adding the Lb interface, it is necessary to determine an unused conn id across *all* SCCP users. Prepare adding Lb by moving conn id creation out of the gscon code and generalizing. Change-Id: I12fcb18f6e4380f72929cfe7681bac05330a8c9a