aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-06-11pcu_sock: Transmit SI2Pau Espin Pedrol2-2/+3
OsmoPCU will need this SI2 in order to gain knowledge of the BCCH Frequency List being broadcasted, in order to build a per-MS specific Neighbour List using NC_FREQUENCY_LIST bits in Packet Measurement Order. Related: SYS#5303 Change-Id: If70c64f941f621a9a68aef2c846639b5c7f2f74b
2021-06-10l1sap: fix TDMA frame number arithmetic in fn_ms_adj()Vadim Yanitskiy1-1/+2
Using the normal arithmetic for TDMA frame numbers is wrong. Change-Id: Ie17670d150489014a4a2e140cede42086100bbc0
2021-06-10osmo-bts-octphy: drop talloc_replace(), use osmo_talloc_replace_string()Vadim Yanitskiy1-12/+10
Change-Id: Ied39cc594fedc712d751ab1c7b636bbbff527bd6
2021-06-10rsl: Use switch statement in rsl_rx_bcch_info()Pau Espin Pedrol1-12/+18
This is a preparation for new commit, which makes it easier to add new SIs being sent. Change-Id: I27774ca36d1e740b6a502cfb280aba0ea82b9dbe
2021-06-10vty: ensure all warning messages are prefixed with '%%'Vadim Yanitskiy1-13/+13
Change-Id: I23fc1cd8aa5725de06651f061c9fce6a022adfa8
2021-06-10common/vty: facilitate finding duplicate PHY/TRX associationsVadim Yanitskiy2-2/+9
In cfg_trx_phy_cmd(), use phy_instance_link_to_trx() and ensure that a PHY instance can be bound to a transceiver only once. Change-Id: I132e08fc496abef278b94254cebfac7a4285a7c2
2021-06-09[VAMOS] trx_sched_init_ts(): assign names to per-timeslot countersVadim Yanitskiy2-0/+7
Thanks to [1], it's now possible to associate a human-readable name with a rate counter group. Before this API, we had to use weird index values for each timeslot, and with introduction of the shadow timeslots the situation got even worse. Change-Id: Ie872ab37661fa5d44f219f59c7daaa1033113289 Depends: [1] I0dc510783dd9ae8436dae8005a7b3330e80d36f3 Related: SYS#4895, OS#4941
2021-06-09measurement: remove over-defensive checks in is_meas_complete()Vadim Yanitskiy1-5/+0
The timeslot number ts->nr is set in gsm_bts_trx_alloc() and can never be greater than 7. Regarding the physical channel type returned by ts_pchan(), it's also unlikely to be greater than _GSM_PCHAN_MAX. Change-Id: I6d20d7cba49cc8b6d1dc2192598ca372b7d2c5bf
2021-06-08conf_lchans_as_pchan(): initialize all lchans with GSM_LCHAN_NONEVadim Yanitskiy1-0/+3
This function is called during the OML bootstrapping, and also when a dynamic timeslot switches between PDCH and TCH/{F,H}. In the later case, after switching from TCH/{F,H} to PDCH, some lchans might still have the old type assigned. Let's ensure that all logical channels are properly updated. Change-Id: I44726f2bfb979c2fa2f5f30c5b11700cf4b3399d Related: SYS#5313, OS#1569
2021-06-08conf_lchans_as_pchan(): fix GSM_LCHAN_{CCCH->CBCH} regressionVadim Yanitskiy1-1/+1
This regression was introduced (by me) in [1] and broke CCCH. Change-Id: I403ad06574a8505b69dd06781f7fe0f7cabf416f Fixes: [1] I1c5a033e89d9ca5fb01ebe9ffb521fd67d159bee Related: SYS#4895, OS#4941
2021-06-07l1sap: fix TDMA frame number wrap in l1sap_info_time_ind()Vadim Yanitskiy1-4/+4
Using the normal arithmetic for TDMA frame numbers may result in getting wrong values. Consider the following situation: 'info_time_ind->fn' is 0 (beginning of period) 'bts->gsm_time.fn' is 2715647 (end of period) With these input values the following expression: info_time_ind->fn - bts->gsm_time.fn will be equal to: 0 - 2715647 or -2715647 In this case osmo-bts does not log an error, because: if (-2715647 > 0) // is false As a consequence, we do not increment number of RACH slots that have passed by since the last time indication: for (i = 0; i < -2715647; i++) // is false This is why we introduced GSM_TDMA_FN_{SUB,SUM,DIFF,INC} API. Change-Id: I6168dd75daea50bbe2e19338e637185ac9ac87ef
2021-06-05[VAMOS] osmo-bts-omldummy: allocate shadow timeslotsNeels Hofmeyr1-0/+6
Change-Id: I4aa9a8bb35bd828d6f25d5690297e727dace5974 Related: SYS#4895, OS#4941, SYS#5316, OS#4940
2021-06-05[VAMOS] osmo-bts-trx: schedule bursts on 'shadow' timeslotsVadim Yanitskiy5-20/+91
Change-Id: I3e0bdf8c03273f66991aa1764029ab1dd3528d7e Related: SYS#4895, OS#4941
2021-06-05[VAMOS] Implement the concept of 'shadow' timeslotsVadim Yanitskiy9-68/+218
Change-Id: I48b44b4df9ffb1cca105aebbd868c29b21f3b1d6 Depends: Ia0bd8695a3f12331b696fe69117189cdd48b584d Related: SYS#4895, OS#4941
2021-06-05[VAMOS] conf_lchans_as_pchan(): improve readabilityVadim Yanitskiy1-33/+21
Change-Id: I1c5a033e89d9ca5fb01ebe9ffb521fd67d159bee
2021-06-05[VAMOS] scheduler: drop meaningless channel number checksVadim Yanitskiy1-10/+0
Change-Id: Icc57e58feece51c2d1c421454352bc821e338973
2021-06-04trx_sched_is_sacch_fn(): fix handling of dynamic timeslotsVadim Yanitskiy1-1/+1
There is no GSM_PCHAN_TCH_F{_TCH_H}_PDCH in trx_sched_multiframes[], so find_sched_mframe_idx() would always return -1 for these. Fix this by using ts_pchan(), which returns currently active pchan type. Change-Id: Ia5e337e897b595e7de6e504664c969b583cc02a1
2021-06-04osmo-bts-trx: fix NULL pointer dereference in trx_if_send_burst()Vadim Yanitskiy1-2/+2
Starting from TRXDv2 [1], trx_if_send_burst() would keep batching PDUs to the static buffer, unless it's called with br = NULL, so we cannot dereference br in the logging statement. Of course, we could also store TDMA frame number in a static variable, but I don't think it's worth it just for logging. Change-Id: I4a361777fc40bdedcebbe54df6274bc5573f77a8 Fixes: [1] I9b4cc8e10cd683b28d22e32890569484cd20372d Fixes: CID#236232
2021-06-04manuals/abis/rsl.adoc: add VAMOS specific Channel Number valuesVadim Yanitskiy1-0/+5
Change-Id: Ib3ad7652dfcbd104d25b031ac89f5491da2673a6 Related: SYS#4895, OS#4941
2021-06-04manuals/abis/rsl.adoc: add missing CBCH Channel Number valuesVadim Yanitskiy1-0/+2
Change-Id: Iab64c35a384978ba2eb1878f619de2c3827cd8c5 Related: SYS#4895, OS#4941
2021-06-04manuals/abis/rsl.adoc: rework Channel Number descriptionVadim Yanitskiy1-6/+11
Change-Id: I3013c6b2c38db33d7d80e174b3d4910f8b01963d Related: SYS#4895, OS#4941
2021-06-04manuals/abis/rsl.adoc: s/TS 08.58/TS 48.058/Vadim Yanitskiy1-76/+76
Change-Id: Iae8e184f98f089c95dce4c51f512971521c4b059 Related: SYS#4895, OS#4941
2021-06-04[VAMOS] oml_rx_set_chan_attr(): clarify NM_ATT_CHAN_COMB handlingVadim Yanitskiy1-7/+8
Change-Id: I8a4aace97515ca59ac4c6b5d50a9ee242edfe409
2021-06-04[VAMOS] l1sap: get_lchan_by_chan_nr() may return NULLVadim Yanitskiy1-0/+12
Change-Id: Ic309622d0ee818302dfc66d69fd2914ae28261d6
2021-06-04[VAMOS] gsm_data: rework and rename gsm_lchan_name_compute()Vadim Yanitskiy3-11/+12
Change-Id: Id5cc40db04a654d94f5f75d4aad45439d66528cc Related: SYS#4895, OS#4941
2021-06-04[VAMOS] rsl_lchan_lookup(): make it more readableVadim Yanitskiy1-7/+28
Change-Id: I3160929c739a521fe494716c3da3d3b72370a98a Related: SYS#4895, OS#4941
2021-06-04[VAMOS] rsl_lchan_lookup(): use ABIS_RSL_CHAN_NR_CBITS_* macrosVadim Yanitskiy1-4/+4
Change-Id: Iec3250e3a59f8d428d7e7be2ceb71f7086a68e7b Related: SYS#4895, OS#4941
2021-06-04[VAMOS] gsm_pchan2chan_nr(): use ABIS_RSL_CHAN_NR_CBITS_* macrosVadim Yanitskiy1-10/+7
Change-Id: I2b1480d3c330951cccc15333450cf7243b9505fc Related: SYS#4895, OS#4941
2021-06-04[VAMOS] common/oml: generalize checking BTS_FEAT_MULTI_TSCVadim Yanitskiy4-44/+7
Change-Id: Iaa5aced70e166963106c27ebdb09adaae22daea4 Related: SYS#4895, OS#4941
2021-06-04[VAMOS] l1sap_chan_act(): handle Osmocom specific TSC IEVadim Yanitskiy1-0/+33
This is an Osmocom specific RSL IE that, if present, takes precedence over the values indicated via the A-bis/OML. Change-Id: I717e5b2a6ca5b4faeaab9cae4bb971907945871b Related: SYS#4895, OS#4941
2021-06-04[VAMOS] scheduler: add new GMSK training sequences from 3GPP 45.002Vadim Yanitskiy3-12/+44
Change-Id: I03fe712da5a3cc1a59f40a98a57f43306c3586c6 Related: SYS#4895, OS#4941
2021-06-04[VAMOS] osmo-bts-trx: properly handle per-timeslot TSC valuesVadim Yanitskiy8-59/+85
Each timeslot can have its own Training Sequence Code value, which may optionally be included in the NM_MT_SET_CHAN_ATTR message sent over the A-bis/OML. If it's not present, then the TSC value for a timeslot is derived from the BCC part of BSIC, which is always included in the NM_MT_SET_BTS_ATTR message. On the TRXC interface, the BTS global TSC value is indicated to the transceiver using either of the 'SETTSC' or 'SETBSIC' commands. The transceiver then applies this value for all timeslots by default, however it can be redefined for each timeslot individually using additional arguments of the 'SETSLOT' command (see section 25.2.4.1 in the user manual [1] for more details). Currently, trx_set_ts_as_pchan() sends TRX_PROV_EV_CFG_TSC to the transceiver provisioning FSM, together with the per-timeslot TSC value. This event causes the FSM to modify the global TSC value, that is going to be or has already been sent to the transceiver. This is wrong, the global TSC value shall not be overwritten. Remove the TRX_PROV_EV_CFG_TSC, and include per-timeslot Training Sequence Code and Set in the data structure that gets passed together with the TRX_PROV_EV_CFG_TS instead. Implement handling of the optional per-timeslot TSC in trx_if_cmd_setslot(). [1] https://downloads.osmocom.org/docs/latest/osmobts-usermanual.pdf Change-Id: Idc5796151e3e83f42d60c2d4cb7c35890d76a7f5 Related: SYS#4895, OS#4941
2021-06-04[VAMOS] osmo-bts-trx: rework handling of Training SequenceVadim Yanitskiy12-23/+23
The TSC (Training Sequence Code) value in 'struct gsm_bts_trx_ts' is always initialized in oml_rx_set_chan_attr() during the OML bootstrapping, so there is no need for gsm_ts_tsc() - remove it. Store the initial TSC value in 'struct gsm_bts_trx_ts', so we can apply a different TSC value during the RSL CHANnel ACTIVation. Store the Training Sequence Code/Set in 'struct trx_dl_burst_req'. These values are indicated to the transceiver (TRXDv2 PDUs, 'MTS' field) and used by the new TRX_{GMSK,8PSK}_NB_TSC macros. Change-Id: I3744bc308b99ef941e6e9d139444e414abebc14b Related: SYS#4895, OS#4941
2021-06-04Use new stat item/ctr getter APIsPau Espin Pedrol1-3/+3
Generated with spatch: """ @@ expression E1, E2; @@ - &E2->ctr[E1] + rate_ctr_group_get_ctr(E2, E1) """ Change-Id: I9b8e31adcbb3142d3d09f1f0e0ae7e435bb2c5ca
2021-06-02main,abis: change model name from sysmoBTS to osmo-btsPhilipp Maier2-2/+2
The model name when used when abis_open() is called is sysmoBTS, since we recently decided to deprecate the type name "sysmobts" in osmo-bsc we might consider the same thing here. Change-Id: I3c61d92f5527ae0145316b5ff92660f8b467a8dc
2021-06-01[VAMOS] common/scheduler: unify symbol names for training sequencesVadim Yanitskiy7-12/+12
Change-Id: Ice464e5b02b11b0f13df247fe6a01420a29bf1c5 Related: SYS#4895, OS#4941
2021-06-01[VAMOS] bts_supports_cm(): handle RSL_CMOD_CRT_OSMO_TCH_VAMOS_{Bm,Lm}Vadim Yanitskiy1-0/+8
Change-Id: I61040df30246ff79c9b13055bb1fec92fe64f3dd Related: SYS#5315, OS#4940
2021-06-01[VAMOS] rsl: call bts_supports_cm() from rsl_handle_chan_mod_ie()Vadim Yanitskiy4-35/+69
Ensure that we check the PHY capabilities in both cases: * RSL CHANnel ACTIVation, and * RSL CHANnel MODE MODIFY, by calling bts_supports_cm() from rsl_handle_chan_mod_ie(). Modify bts_supports_cm() to accept a 'struct rsl_ie_chan_mode', so we can handle VAMOS enabled channel modes and CSD later on. Change-Id: I31a444592436705ec9d6ddade3cbfa7f8cb4bb91 Related: SYS#5315, OS#4940
2021-06-01[VAMOS] rsl_rx_mode_modif(): handle Channel Identification IEVadim Yanitskiy2-17/+32
For some reason, handling of the Channel Identification IE was done in l1sap_chan_act(). This function is being called on reciept of the CHANnel ACTIVation message, but not on MODE MODIFY. Change-Id: I07f95e69e6230a1daca62cc0a7c64954f191fa8a Related: SYS#5315, OS#4940
2021-06-01[VAMOS] osmo-bts-trx: indicate MTS in Downlink TRXDv2 PDUsVadim Yanitskiy3-2/+19
Change-Id: I1a17a25883214c068f9b1a6d651128b8f760d1fb Related: SYS#4895, OS#4941
2021-06-01[VAMOS] osmo-bts-trx: implement and enable PDU batching for TRXDv2Vadim Yanitskiy3-5/+23
This change implements TRXD PDU batching approach b), which is described in section 25.3.4 of the user manual [1]. This approach is quite easy to implement on the transceiver side, so we can enable it by default. .Example: datagram structure for combination b) ---- +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=0 | BATCH=1 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=1 | BATCH=1 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=2 | BATCH=1 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=7 | BATCH=0 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ ---- Other PDU batching approaches can be introduced later. [1] https://downloads.osmocom.org/docs/latest/osmobts-usermanual.pdf Change-Id: I9b4cc8e10cd683b28d22e32890569484cd20372d Related: SYS#4895, OS#4941
2021-05-31pcuif: Set missing bsic field during Tx of info_indPau Espin Pedrol1-0/+1
Change-Id: I5c0194644083f04799174464445ec21dae82f368
2021-05-28sysmobts-mgr: Fix path to hwmon in /sysKeith1-1/+1
The path to the temperature sensor was wrong which results in the SysmoBTS manager always considering that the state is critical and hence powering OFF the PA on startup. (with the default config) As a further side-effect, the temperatures were not available in the vty 'show manager' command. Redacted log previous to this patch: sysmobts_misc.c:128 Error reading temperature sysmobts_mgr_2050.c:323 Going to enable the PA. sysmobts_mgr_temp.c:252 Failed to read the digital temperature. rc=-1 sysmobts_mgr_temp.c:267 Failed to read the RF temperature. rc=-1 sysmobts_mgr_temp.c:203 Moving from state NORMAL to CRITICAL. sysmobts_mgr_temp.c:185 System has reached critical warning. sysmobts_mgr_temp.c:236 OML alert sent: 0 and in the vty: Temperature control state: CRITICAL Current Temperatures Digital: -0.001000 Celsius RF: -0.001000 Celsius With this patch we correctly enable the PA and now can show in the vty: Temperature control state: NORMAL Current Temperatures Digital: 39.000000 Celsius RF: 35.125000 Celsius Change-Id: Iac8e9a866ad6326874af91bd12a981f39a9a24c7
2021-05-27Fix regression in 'osmo-bts-trx: rework and split up bts_sched_fn()'Vadim Yanitskiy1-2/+2
In [1] I forgot to update tx_fcch_fn(), where we assume that the burst buffer is already zero-initialized and do not call memset(). This results in sending dummy bursts on FCCH (instead of zeros). Change-Id: I491b3b5702b3cfca45c12c002b41e60c629b05b9 Fixes: [1] Iec78989517865b3275a9784d1042a5ebd1d2815f
2021-05-27Add missing value_string for NM_EV_* introduced recentlyPau Espin Pedrol1-0/+2
Fixes: 0277cddab2bb6b09f02e998c0aa9ff78d41c327c Change-Id: I70266767d4f85e8c14ecf477af7fab0706698067
2021-05-26Fix regression in 'bts: Clean up TS selection in sign_link_up'Pau Espin Pedrol1-4/+2
Fixes: 518ada9414755ab859e0139289090a1ef7ba9be3 Change-Id: I63af96235eb6e0a7334936f65e1f44d4422198a5
2021-05-25bts: Clean up TS selection in sign_link_upPau Espin Pedrol2-18/+22
Change-Id: I0c92dfd05bf2ae40887980ef10b7e4c679213b6a
2021-05-23[VAMOS] osmo-bts-trx: rework and split up bts_sched_fn()Vadim Yanitskiy2-51/+76
Currently, in bts_sched_fn() we send a Downlink burst to the PHY immediately after calling the associated logical channel handler. Together with the obvious performance advantages, this approach imposes some serious limitations. The code has already become quite complex with the introduction of the baseband frequency hopping, and now it's not possible anymore to extend it further. TRXD PDU batching, which is essential for VAMOS implementation, requires us to make the scheduler more flexible at the expense of increased memory consumption and additional CPU cycles. This patch splits up Downlink burst scheduling into 3 main steps: 1. bts_sched_init_buffers(): initialization of per-TRX Downlink burst buffers allocated by phy_instance_create(). For C0/TRX0 all timeslots are pre-initialized with dummy burst. 2. bts_sched_fn(): generating burst bits for all active lchans. 3. bts_sched_flush_buffers(): sending everything to the PHY. This approach allows us to a) get rid of the ugly tail in bts_sched_fn() that was responsible for sending dummy bursts on C0/TRX0; b) implement the PDU batching and have several variants of bts_sched_flush_buffers() providing the alternative batching approaches later on; c) implement PDU merging for the upcoming shadow transceivers. Change-Id: Iec78989517865b3275a9784d1042a5ebd1d2815f Related: SYS#4895, OS#4941
2021-05-23common: phy_links_open(): warn about dangling PHY instancesVadim Yanitskiy1-0/+9
Change-Id: I8d84bf7a00da6b985cb3dc314e86cacac8d4f48c
2021-05-23[VAMOS] gsm_data.h: introduce and use BTS_TSC macroVadim Yanitskiy8-14/+15
Change-Id: I0cf915d2d3a640aa1442cf6abe9a314261b4a64e Related: SYS#5315, OS#4940