aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2016-09-02sysmo: Fix build error for sysmobts targetnrw/litecell15-merge-and-rebaseMinh-Quang Nguyen1-1/+4
Change-Id: I29e9bf8db483376cdf5084658a738f1589622e53
2016-09-02LC15: Implementation of TS 12.21 measurement related messages to measure PCU KPIMinh-Quang Nguyen2-1/+514
Change-Id: I352600f964e6c161b9259c62f2e0a0f39f0f60d9
2016-09-02LC15: Allow BTS to forward PCU failure alarms to networkMinh-Quang Nguyen2-0/+31
Change-Id: I39bb8f8b749e94394909aa4a4be000c306ed712a
2016-09-02LC15: Implementation of major BTS alarmsMinh-Quang Nguyen6-7/+405
Change-Id: Ic4e088a3af115d3d5a124b61c1e92eed277d3469
2016-09-01LC15: Implementation of LC15 specific featuresMinh-Quang Nguyen1-0/+4
Change-Id: I79416faaa3ba328c9c2dabcd695a1b880fe666da
2016-08-30cosmetic: common ts_is_pdch()Neels Hofmeyr2-11/+16
Have one common ts_is_pdch(), placed in lchan.c, since this file is pretty empty and pretty close to ts. Publish in gsm_data.h. Remove the if-style implementation from l1sap.c, and instead implement in a switch statement. This prepares for upcoming ts_is_pdch() usage in ph_data_req() for sysmo and lc15. Change-Id: Ib78d663fdbac5a1d7053f1b9d543649b66da00e2
2016-08-30dyn TS: measurement: use correct nr of subslots, rm code dupNeels Hofmeyr1-15/+1
In measurement.c, fix the number of sublots for TCH/F_TCH/H_PDCH, by using ts_subslots() from gsm_data_shared.c. The local dup of subslots_per_pchan[] is no longer needed. (depends on recent commit to openbsc.git for ts_sublots()) Change-Id: I9d9df470c49487bffd56dde42c7bec0da2f50642
2016-08-27log: l1sap: add 0x to hex output of chan_nr, 5 timesNeels Hofmeyr1-5/+5
Change-Id: I187a74fd255dbdfb9bfb1e32786031a66f013efb
2016-08-27Change interface in osmo-bts for 11 bit RACHbhargava2-4/+10
Interface structure between osmo-bts and osmo-pcu is updated with the parameters to differentiate the type of RACH and further support 11 bit RACH. The function prototype and definitions are changed accordingly. Interface version number is increased. Change-Id: I4f4c501b2d86d77c78de32a84b1804172ffb6f4d
2016-08-10dyn TS: measurement.c: replace fixme with commentNeels Hofmeyr1-1/+1
Change-Id: I04668f6f01a48157a98c6326a9ee48982a09ee62
2016-08-10dyn TS: complete for TRXNeels Hofmeyr1-1/+4
Apply similar fixes as for TCH/F_PDCH also for TCH/F_TCH/H_PDCH: Detect dyn TS in PDCH mode in ts_is_pdch(). In trx_set_ts(), enhance the "if (TCH_F_PDCH)" to a switch statement including both dynamic channel types. Adjust the comment to include both kinds. Change-Id: I6669739cd08780cd9ffb9451cdae9f6b9704c4fe
2016-08-08Fill measurements data for L1SAPMax3-4/+17
Fill in values for BER, BTO, Link quality in L1SAP and send them to PCU. Note: this increases the version of BTS <-> PCU protocol. It also requires corresponding changes in libosmocore. All BTS models provide measurements data unless direct DSP access for PCU is enabled. For BTS-specific notes see below. Octphy: conversion from sSNRDb to Link Quality uses formulae which works in practice instead of what's documented for sSNRDb value. Subject to change in future revisions. TRX: C / I link quality estimator is not computed. Change-Id: Ic9693a044756fb1c7bd2ff3cfa0db042c3c4e01c Related: OS#1616
2016-07-28dyn TS, dyn PDCH: common/l1sap.c: properly notice PDCHNeels Hofmeyr1-3/+11
In l1sap_ph_rts_ind(), l1sap_ph_data_ind() and to_gsmtap(), the decision to handle a TS as PDCH was still missing for dynamic TS. It is not yet clear why this did not impact functionality for dynamic timeslots on other BTS models. AFAICT they should not work without this patch, but in fact they do. It would be nice to clarify this some day. Change-Id: I7b873a089a3de70d980885a7539cb91997464743
2016-07-28pcu_sock: use osmo_sock_unix_init() from libosmocoreVadim Yanitskiy1-55/+5
Since the osmo_unixsock_listen() was moved to libosmocore it would be better to use the library's implementation instead of reinventing the wheel again. Change-Id: Id5828649d44ef11e70946793696b0d689d6b35e3
2016-07-28fix comment in common/l1sap.c, function name changedNeels Hofmeyr1-1/+1
Change was in 334df9441a44de00c0dd3f66e73ac6fae28098fb "cosmetic: clarify TCH/F_PDCH related naming and comments" Change-Id: If3e353ea5796ee129bdd95e5f954e6c141cffec8
2016-07-28trx: Enable EGPRS handling through burst lengthsTom Tsou1-11/+15
Existing interfaces are coded with the implicit expectation of using a burst sequence length of 148, which is constant with GSM and GPRS. That changes with EGPRS, where the burst length may be 444 due to the use of 8-PSK instead of GMSK modulation. Setup the interface to accept and return a length value with the burst sequence. This allows 444 length bit vectors to/from the EGPRS decoder/encoder. Length is explicitly used as a identifier for 8-PSK vs. GMSK modulated sequences. Change-Id: I90b46b46b11b6ce280e7f8232d5a2fccec2d4f18 Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-27log typo: trx_sched_set_pchan()Neels Hofmeyr1-1/+1
Change-Id: Icdb193ec6dbb95cf0c3e441c196b309aa599efe6
2016-07-27comment typo: common/l1sap.cNeels Hofmeyr1-1/+1
Change-Id: I053766452ee01bed6136a9742551c664666a7989
2016-07-25dyn TS: common TCH/F_TCH/H_PDCH implementationNeels Hofmeyr4-12/+235
common/l1sap: For dyn TS, the BSC will issue RSL Chan Activ requests with a non-standard chan_nr. While the rest of the code now understands that, the L1 phy will not. Translate to standard PDCH (== TCH/F). common/oml: use dyn TS' current pchan mode for lchans config. common/pcu_sock: detect desired PDCH mode of dyn TS. common/rsl: implement reconnection chain of a TS for changing its pchan: * rsl_rx_chan_activ(): ** Add dyn_pchan_from_chan_nr() to derive the requested pchan from the RSL chan_nr IE. ** Notice the need for a pchan change and invoke dyn_ts_l1_reconnect() (s.b.) ** Make Chan Mode IE presence optional, because the non-standard PDCH activation message is simpler and does not require it. ** Do PDCH activation via PCU. * Add dyn_ts_l1_reconnect(): store state and disconnect the L1 channel; then wait for cb_ts_disconnected(). * Add osmo_dyn_ts_disconnected() to cb_ts_disconnected(): verify state and connect with the new pchan type; then wait for cb_ts_connected(). * Add osmo_dyn_ts_connected() to cb_ts_connected(), which re-issues the cached chan activation message from before disconnecting the L1 channel. * Also send an rf chan rel/act ack for dyn TS upon PDCH de/act via PCU. * Add dyn_ts_pdch_release(): on channel release of a dyn TS in PDCH mode, release via the PCU. Call from rsl_rx_rd_chan_rel(). Change-Id: I463bb6b4e57674f091c3badba9257374961c52c7
2016-07-25code dup: join [rsl_]lchan_lookup() from libbsc and osmo-btsNeels Hofmeyr1-52/+12
lchan_lookup in openbsc abis_rsl.c and rsl_lchan_lookup() rsl.c are the same code, except for the log context, which is only set in abis_rsl.c. The common code was factored out to gsm_data_shared.c in openbsc.git. Use the *rc return code argument to keep the logging part in the newly introduced thin wrapper lchan_lookup() in common/rsl.c. This also removes code dup for logging The rsl_lchan_lookup() implementation is removed from osmo-bts, so a recent openbsc is needed to build this. Change-Id: Ibc469b75e31560271be8633d524366442d27e6fb
2016-07-25trx: Add EGPRS tables, sequences, and mappingsTom Tsou1-0/+27
Includes EGPRS specific convolutional codes, interleaving tables and functions, burst mappings, training sequences, and parity checks from 3GPP TS 44.060 needed to handle MCS codings 1-9. Change-Id: Ie270398dd7a72f282ba53e646853d8de1eabee93 Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-25prepare dyn TS: split/replace conf_lchans_for_pchan()Neels Hofmeyr1-4/+11
Move the actual switch from static conf_lchans_for_pchan() into new 'public' function conf_lchans_as_pchan(), adding an explicit pchan argument. This allows passing a non-trivial pchan, for dynamic TS. conf_lchans_as_pchan() now takes a pchan argument, so distinguish the naming and drop the 'for_pchan' from conf_lchans_for_pchan(), which takes only a ts argument. Change-Id: I8e458501fff5503c243512aeb3469c12b1f2bbc4
2016-07-25dyn PDCH: code dup: use conf_lchans_as_pchan()Neels Hofmeyr1-2/+6
For ip.access dyn PDCH, call conf_lchans_as_pchan() instead of dup'ing the pchan-to-lchan switch. Change-Id: I979828e08953e83ae579a347334536f52939faf0
2016-07-25cosmetic: clarify TCH/F_PDCH related naming and commentsNeels Hofmeyr3-22/+38
We're about to introduce a new kind of dynamic channel, which will also use parts of the ip.access mode dyn PDCH code paths. Make sure the general parts have general names and mark ip.access specific parts as such. Rename dyn_pdch_ts_[dis]connected() to cb_ts_[dis]connected(). Rename dyn_pdch_complete to ipacc_dyn_pdch_complete(). From cb_ts_[dis]connected(), factor out the current code into static functions ipacc_dyn_pdch_[dis]connected() -- this will make sense once the new dynamic kind is added to cb_ts_[dis]connected(). Change-Id: I7da5b7cb7b48572671f50e0dec97d9eec3083df1
2016-07-25cosmetic: pcu_sock.c: rename ts_is_pdch() to ts_should_be_pdch()Neels Hofmeyr1-2/+2
The function checks whether to switch a TS to/from PDCH, not whether it already is PDCH. Change-Id: Ib4036445d09792636bb2f1a8a665b6b28f32e1a0
2016-07-25fix compiler warning: msg_utils.c: fn_chk() constify argNeels Hofmeyr1-1/+1
The only caller dtx_sched_optional() passes const arrays and a warning was issued. Change-Id: I18e0788ef96489d2116a60cae57bd516fe6eae8e
2016-07-25info log: l1sap.c: add '0x' to hex outputNeels Hofmeyr1-2/+2
Change-Id: If29895de238e586b8298d84b6f0b41e08bea8c91
2016-07-25error log: rsl.c: typo x2Neels Hofmeyr1-2/+2
Change-Id: I285fdff8260f008d856b9cda811e9fbb936893eb
2016-07-25doc: move dyn_pdch.msc to osmo-gsm-manuals.gitNeels Hofmeyr1-1/+2
Also remove related cruft: .gitignore, msc-README and adjust an in-code comment that referenced dyn_pdch.msc. Change-Id: Ie41a453bb5070c1f18793f646dc053a978f43fba
2016-07-05Mark array as static constMax1-3/+3
Change-Id: Ia70519c8f10d55084b53acb68e57debc70549246
2016-06-23DTXu: move copy-pasted code to common partMax1-0/+11
Abstract code for checking/setting lchan's UL SID flag and RTP Marker into generic function and use it for LC15 and sysmoBTS. Change-Id: Ica5392e92bab29164711163e7b01adb174272883 Related: OS#1750
2016-06-23Make get_lchan_by_chan_nr globally availableMax1-2/+2
* Remove static qualifier * Remove duplicated code - use generic function instead Change-Id: I37a312648771f58d3087471083cfcebbd97ccf1d
2016-06-23fix compiler warnings: include bts_model.h in phy_link.cNeels Hofmeyr1-0/+1
The file calls bts_model_* API which was yet undeclared. Change-Id: Ib6b30d125906c3abae518fb76da3a158885e3354
2016-06-22dyn PDCH: safeguard: exit if nothing pending in dyn_pdch_ts_disconnected()Neels Hofmeyr1-1/+3
The function would currently only be called in cases where one of the if branches catches on, but for safety's and clarity's sake, don't ts_connect using as_pchan if no reconnect is pending. Change-Id: I52c34065254e902bb80662fc04540901b36cb4c3
2016-06-21Use error values instead of number for RSL errorMax1-2/+2
Change-Id: I0aa695c42a4399828fb8e9c08c905870175b7149
2016-06-18Move copy-pasted code into common partMax4-1/+72
Related: OS#1750 Change-Id: Ic4342eaf7e32a0e9a5f2b16dd196a1f5f03152a9
2016-06-17debug log: log lchan state transitionsNeels Hofmeyr1-0/+6
Change-Id: Id20f61ef535f4ea049da6579e41eb98f31238d23
2016-06-17error log: two minor clarificationsNeels Hofmeyr2-3/+5
Change-Id: I95e4331f51f650d5077eb3a8f897f754d5d2b779
2016-06-17dyn PDCH: implement main dyn PDCH logic in common/Neels Hofmeyr2-0/+280
React on IPAC PDCH ACT and DEACT messages and invoke the PCU and bts_model_ts_* APIs to effect switchover. The dyn PDCH interaction is described in the comment to rsl_rx_dyn_pdch(), the main entry point for PDCH switchover. In case the bts_model_ts_* are not implemented (or return other errors), reply with an IPAC PDCH ACT/DEACT NACK. Add callbacks that mark steps in the PDCH switchover process, dyn_pdch_ts_disconnected(), dyn_pdch_ts_connected() and dyn_pdch_complete(). Add hooks in l1sap.c on channel activation and release confirmation, to call dyn PDCH callbacks. BTS dyn PDCH implementations should invoke dyn_pdch_ts_disconnected() and dyn_pdch_ts_connected() when bts_model_ts_disconnect() or bts_model_ts_connect() are called, respectively. (upcoming for sysmoBTS) Change-Id: Id2f5f77121a65d6c14eac127b3d4fb50e97a77ab
2016-06-17dyn PDCH: pcu_tx_info_ind(): handle TCH/F_PDCH in PDCH modeNeels Hofmeyr1-1/+19
Introduce a static function to encapsulate the decision whether a TS is used for PDCH. Depending on the ts->flags, handle a TCH/F_PDCH TS exactly like a standard PDCH TS. Change-Id: Ic72fd06ecc99609823efa3edcf773007cc514b5b
2016-06-17dyn PDCH: conf_lchans_for_pchan(): handle TCH/F_PDCHNeels Hofmeyr1-3/+8
Depending on the PDCH active flag, handle a TCH/F_PDCH like TCH/F or PDCH. Change-Id: Ifc5561f8e2db172bb692ba26bdeae2fd675d6ec5
2016-06-17fix compiler warning: add missing case (PHY_LINK_CONNECTING)Neels Hofmeyr1-0/+3
Change-Id: I7979e10551023c1f52f04b4e93ea1706cf0bef39
2016-06-17fix compiler warning: printf format for sizeof()Neels Hofmeyr1-1/+1
Change-Id: Id600c5a34ab261736f7595ab2e36e3a30d434175
2016-06-17add missing DSUM entry to bts_log_info_catNeels Hofmeyr1-0/+6
This allows setting the 'sum' log level to debug in osmo-bts.cfg. Change-Id: I1fe1a483f07f0384815f01877f86ffc192052f72
2016-06-17dyn PDCH: rsl rx dchan: also log ip.access message namesNeels Hofmeyr1-2/+2
Before, only standard ABIS RSL message names were logged, add ip.access specific ones. The IPAC_PDCH_ACT and _DEACT msgs are received with an ABIS_RSL_MDISC_DED_CHAN discriminator, and not with _MDISC_IPACCESS like the others. Thus rsl_rx_dchan() should be able to log ip.access message types properly. Change-Id: I9db6826b515bf565fc7ae24fc0760b60928cc89f
2016-06-17oml, Set Chan Attr: treat unknown PCHAN types as errorNeels Hofmeyr1-3/+9
Change-Id: Id79585993df15362ba0e1271d03302597182ceff
2016-06-17fix typo in error message ('at lEast')Neels Hofmeyr1-1/+1
Change-Id: I6ac3606157dc6c81ed17cd6d26227da8ae26c49f
2016-06-17pcu_sock: add pcu_connected() to query PCU availabilityNeels Hofmeyr1-0/+10
Will be used in upcoming dyn PDCH switching. Change-Id: I8031089ad5e9cb9690ca7e22facc53438f28e12a
2016-06-14common/abis.c: fix 100% CPU usage after disconnecting OML/RSL link (Bug #1703)Minh-Quang Nguyen1-1/+0
Change-Id: I24605b8a6d4e778a3280ffba8bc1fc7a284ce12d
2016-06-14DTXu: mark beginning of speech burst in RTPMax1-2/+4
Set Marker bit in RTP header to mark the beginning of talkspurt. Change-Id: I3dd70ad8ff94356e3c3cc5458255f6c23534783e Related: OS#1562