aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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
2021-05-23[VAMOS] gsm_data.h: fix wrong bit-mask in BSIC2BCC macroVadim Yanitskiy1-1/+1
BCC takes 3 LSB bits of the BSIC, so we should apply 0b111 or 0x07. The BSIC is specified in 3GPP TS 03.03 section 4.3.2. Change-Id: Id24ad64e6c6de080ab43faa272daf844fbba6954 Related: SYS#5315, OS#4940
2021-05-23[VAMOS] common: make 'struct gsm_bts_trx_ts' pointers constVadim Yanitskiy2-7/+7
Change-Id: I0369ef4ae603a4afed0661a5894df6a7135b1919
2021-05-19common: make the arguments of phy_{link,instance}_name() constVadim Yanitskiy2-4/+4
Change-Id: Ic01d131148065c9143d3a90f8020e2e133941292 Related: CID#236092 "Dereference before null check"
2021-05-19osmo-bts-{trx,virtual}: fix: pinst->trx may be NULLVadim Yanitskiy6-9/+24
We assume that it's legal to have dangling PHY instances that are not associated with any TRX instances in the configuration file. Obviously, such PHY instances have pinst->trx set to NULL. The DSP based models seem to handle dangling PHY instances without any problems, so let's ensure that we always check pinst->trx against NULL in the osmo-bts-{trx,virtual} specific code. Change-Id: Ib7d9cb7ae47fead723fa46454cd64bf6e88756bb Fixes: CID#236092 "Dereference before null check"
2021-05-19osmo-bts-trx: clarify logging messages in trx_if_{open,close}()Vadim Yanitskiy1-2/+2
Change-Id: I48e64b5b52fc476f915d3a93535b21f0f192b7a9
2021-05-18[VAMOS] Re-organize osmo-bts-trx specific structuresVadim Yanitskiy21-510/+399
Together with the 'generic' structures which used to be shared between osmo-bsc and osmo-bts some time ago, we also have the following osmo-bts-trx specific structures (in hierarchical order): - struct l1sched_trx (struct gsm_bts_trx), - struct l1sched_ts (struct gsm_bts_trx_ts), - struct l1sched_chan_state (struct gsm_lchan). These structures are not integrated into the tree of the generic structures, but maintained in a _separate tree_ instead. Until recently, only the 'l1sched_trx' had a pointer to generic 'gsm_bts_trx', so in order to find the corresponding 'gsm_lchan' for 'l1sched_chan_state' one would need to traverse all the way up to 'l1sched_trx' and then tracerse another three backwards. + gsm_network | --+ gsm_bts (0..255) | --+ l1sched_trx --------------------> gsm_bts_trx (0..255) | | --+ l1sched_trx_ts --+ gsm_bts_trx_ts (8) | | --+ l1sched_chan_state --+ gsm_lchan (up to 8) I find this architecture a bit over-complicated, especially given that 'l1sched_trx' is kind of a dummy node containing nothing else than a pointer to 'gsm_bts_trx' and the list of 'l1sched_trx_ts'. In this path I slightly change the architecture as follows: + gsm_network | --+ gsm_bts (0..255) | --+ gsm_bts_trx (0..255) | --+ l1sched_trx_ts <----------------> gsm_bts_trx_ts (8) | | --+ l1sched_chan_state --+ gsm_lchan (up to 8) Note that unfortunately we cannot 1:1 map 'l1sched_chan_state' to 'gsm_lchan' (like we do for 'l1sched_trx_ts' and 'gsm_bts_trx_ts') because there is no direct mapping. The former is a higl-level representation of a logical channel, while the later represents one specific logical channel type like FCCH, SDCCH/0 or SACCH/0. osmo-bts-virtual re-uses the osmo-bts-trx hierarchy, so it's also affected by this change. Change-Id: I7c4379e43a25e9d858d582a99bf6c4b65c9af481
2021-05-18osmo-bts-trx: fix hopping pointer bug in bts_sched_fn()Vadim Yanitskiy1-5/+5
In change [1] together with the actual implementation I introduced a serious bug to bts_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 move the '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-18osmo-bts-trx: remove redundant assert() in bts_sched_fn()Vadim Yanitskiy1-1/+1
trx_phy_instance() does assert() that the given TRX pointer is not NULL. In bts_sched_fn() it can never be NULL, so drop it. Change-Id: I896ff5117588f2229cc54619ce62fd027a9ef25f
2021-05-18osmo-bts-trx: cosmetic: s/trx_sched_fn/bts_sched_fn/gVadim Yanitskiy1-5/+5
Change-Id: I47e05b5b3f586430aa0b56c3d3c9a1da23077513
2021-05-18scheduler.h: cosmetic: use #pragma onceVadim Yanitskiy1-4/+1
Change-Id: I551ce74f8cec8ec8d80768ec6c0559a203a8143c
2021-05-17sysmo,oc2g,lc15: Make RadioChannel MO depend on RadioCarrier MOPau Espin Pedrol7-7/+55
lower layer specific APIs require first to enable the TRX object (GsmL1_PrimId_MphInitReq, which requires ARFCN received during Set Radio Carrier Attributes) before enabling the per-TS structure. Hence, OPSTART must happen in RCARRIER MO before OPSTART can be sent to the Radio Channel MOs, otherwise the initialization of the TS objet will fail and OPSTART for the RadioChannel MO will send back a NACK. In order to avoid this, we need to keep the RadioChannel MO announced as "Disabled Dependency" until RCARRIER is OPSTARTed. Related: OS#5157 Change-Id: I8c6e5ff98c32a3cd5006f5e5ed6875bcabb1d85f
2021-05-11osmo-bts-trx: implement TRXDv2 protocol supportVadim Yanitskiy3-69/+170
Change-Id: I3532a6693bb335043ec390049138308991083e66 Related: SYS#4895, OS#4941, OS#4006
2021-05-11[VAMOS] osmo-bts-trx: move {chan,bid} to trx_{dl,ul}_burst_{req,ind}Vadim Yanitskiy11-353/+312
Historically the logical channel handlers like rx_data_fn() used to accept quite a lot of arguments. With the introduction of additional measurement parameters it has become clear that we need to group the arguments into structures. This is why both 'trx_{dl,ul}_burst_{req,ind}' structures were introduced. However, both channel type and burst ID were kept untouched, so until now we had them being passed between the scheduler functions here and there. This change is a logical conclusion of the original change mentioned above. As a part of this change, the new LOGL1SB() macro is introduced. It does accept a pointer to 'trx_{dl,ul}_burst_{req,ind}' and expands the context information for the old LOGL1S() macro. Change-Id: Ic5a02b074662b3e429bf18e05a982f3f3e7b7444
2021-05-11[VAMOS] Merge bts_trx_init() into gsm_bts_trx_alloc()Vadim Yanitskiy6-44/+11
gsm_bts_trx_alloc() already does initialize some fields of the allocated 'struct gsm_bts_trx' instance, and having an additional function for initializing the other fields makes no sense. Note that I intentionally didn't merge a call to bts_model_trx_init() into gsm_bts_trx_alloc(), because this would break some assumptions regarding the order of initialization and cause regressions. This also allows us to not call bts_model_trx_init() from tests. Change-Id: I4aefaf47b05a67ec0c4774c1ee7abcc95e04cc13
2021-05-09[VAMOS] struct gsm_bts_trx: fix the PHY instance pointerVadim Yanitskiy8-14/+15
First of all, there is no reason to use a void pointer because it's always 'struct phy_instance'. Also, no need to encapsulate this pointer into 'role_bts' because there are no other roles in osmo-bts (we used to have shared headers years ago). This commit also fixes a bug in test_sysmobts_auto_band(), where a pointer to 'struct femtol1_hdl' was directly assigned to trx.pinst. Change-Id: I9bd6f0921e0c6bf824d38485486ad78864cbe17e
2021-05-09osmo-bts-{lc15,oc2g}: drop redundant checks in VTY commandsVadim Yanitskiy2-84/+6
Change-Id: I4fea6d661b7193c3a04e88c9399a9e2bc402254f
2021-05-08common/sysinfo: make struct gsm_bts_trx const in num_agch()Vadim Yanitskiy2-4/+4
Change-Id: I776defc7e9699a378c9a03304c63e15d023476d0
2021-05-06struct gsm_bts_trx: remove unused leftovers from openbscVadim Yanitskiy1-7/+0
Change-Id: I667fc1d6a5eaccb69b45197da71d4a699f52fcfc
2021-05-05rsl: fix wrong value printed in rsl_handle_chan_mod_ie()Vadim Yanitskiy1-1/+1
Change-Id: I724504a39702393402fae20b0e9775c3486da966
2021-04-30osmo-bts-trx: refactor parse_rsp(), fix compilation warningsVadim Yanitskiy1-12/+20
For a long time, we see this annoying -Wstringop-truncation warning: In function ‘parse_rsp’, inlined from ‘trx_ctrl_read_cb’ at trx_if.c:647:6: trx_if.c:416:2: warning: ‘strncat’ output may be truncated copying between 0 and 45 bytes from a string of length 1495 416 | strncat(rsp->cmd, buf_in + 4, p - buf_in - 4); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There is no real need to use strncat() in parse_rsp(), because we do not concatenate any strings but simply copy TRXC response parts from the input buffer to the corresponding 'name' and 'parameters' buffers. Let's use memcpy() instead. This also fixes the warning. Change-Id: Ia10adf7d76abe9a423b07e828852fbfb53b95125
2021-04-30common/abis: fix the use of deprecated e1inp_line_get() APIVadim Yanitskiy1-3/+3
We need curly braces becausee1inp_line_get2() is basically a macro that calls OSMO_ASSERT(), which in its turn contains an 'if' stmt. Change-Id: I41a5fd13a7fa40e16bcf1a8099624b654274cee3