aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
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
2016-06-12Add DTXd support for sysmoBTS and LC15Max1-6/+7
* set/clear DTXd activity indicator for measurement reporting * set DTXd status based on information from RSL Related: OS#1563 Change-Id: I148a75725c4e5089b6f2da6e9adcbe94170d3257 Depends-On: I4a033b03fcd0deb4db7a38273b5407511dbf1d6c Reviewed-on: https://gerrit.osmocom.org/220 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-06-07Fix RTP timestamps in case of DTXMax1-2/+16
Compute RTP user_ts adjustment based on the difference between current and previous FN instead of hard-coded value. Change-Id: If1677ddcf754b29990ff7cd846e11c32e3d30b33 Related: OS#1562 Reviewed-on: https://gerrit.osmocom.org/196 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-05-31Use libosmocore function for uplink measurementsMax2-15/+9
Related: OS#1563 Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 Reviewed-on: https://gerrit.osmocom.org/108 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-03-17Fix typo in error messageMax1-1/+1
2016-03-17Add explicit check for SI2quater index and countMax1-2/+21
Right now we do not support multiple SI2quater messages, so return error if either index or count is non-zero.
2016-03-17Fix SI2ter schedulingMax1-2/+3
According to 3GPP TS 05.02 ยง 6.3.1.3 SI2ter messages should be scheduled in FN with TC=4 only if SI2bis messages are also available.
2016-03-11Fix copy-paste issueMax1-1/+1
This issue prevented scheduling of SI 2quater messages.
2016-02-22Fix ocmo-bts-octphy interaction with OsmoPCUMax2-3/+5
Previously osmo-bts-octphy have not provided in-band presence information which cause off-by-one errors and misinterpretation of ph_data_ind by PCU. This fixed now by adding support for explicitly passing PH-DATA presence info. Corresponding check and in-band passing of presence information are removed. Note: this requires libosmocore version with osmo_ph_pres_info_type support integrated. [hfreyther/max: Remove + 1 from the decoded length]
2016-02-15scheduler: Fix ARRAY_SIZE() in trx_sched_init()Harald Welte1-1/+1
We want the size of the array, not of the pointer to the array. Found by coverity (CID 1351422).
2016-02-15use unsigned int to compare wih ARRAY_SIZEHarald Welte1-1/+1
This is not really an issue, but makes coverity happy (CID 1351422).
2016-02-15make PCU socket and telnet port configurableHarald Welte4-7/+45
In some cases we'd like to run multiple instances of osmo-bts on a single machine. This is the case where we a multi-TRX PHY is to be used for several BTSs, or in case osmo-bts-trx has multple SDRs attached. This wa currently prevented by having a hard-coded PCU socket path and telnet port, which are now configurable via VTY / config file itself.
2016-02-15move auto-band configuration commands to common/vty.cHarald Welte1-0/+24
It remains up to the individual BTS hardware models to decide whether or not to register those commands (depending on whether they support the feature) via cfg_bts_auto_band_cmd / cfg_bts_no_auto_band_cmd
2016-02-15LC15/sysmobts: Don't try to refer to fl1h from PHY configHarald Welte2-0/+38
At the time the phy link / phy instance level VTY configuration commands are parsed, we did not yet call l1if_open() and thus pinst->u.{lc15,sysmobts}.hdl == NULL. PHY or PHY instance specific configuration must thus be stored inside the phy_link or phy_instance itself, and not inside the (not yet existing) handle. We solve this by moving around some parameters: * clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in phy_instance * min_qual_{rach,norm} are moved into the generic part (which means that osmo-bts-octphy and osmo-bts-trx should also implement them)
2016-02-15introduce + use new generic vty_get_phy_instance()Harald Welte1-0/+20
this function is intended to be used by VTY commands that need to resolve a given PHY interface.
2016-02-15abis.c: Fix segfault on OML link lossHarald Welte1-4/+6
When the OML signalling link is lost, first set bts->oml_link = NULL, then iterate over the RSL links and close them. Closing the RSL link will cause a OML state change message to be sent, which in turn tries to use the no-longer-existing OML link. The code should be cleaned up further to distinguish which signalling link was lost, and actually communicate a RSL(only) loss to OML. But for now, it's best to simply close down all links and terminate osmo-bts to ensure all state is properly reset and recovered.
2016-02-15don't touch OML MO when PHY link is establishedHarald Welte2-9/+9
It seems the right thing to do: Once we know a PHY link is established, the associated OML managed objects should change their state accordingly. However, given all the hackery we do with MO states, this actually breaks things, rather than helping. So I'm disabling that part for now, but this needs to be re-visited at some point.
2016-02-15Introduce new phy_link and phy_instance abstractionHarald Welte6-5/+406
This way we can model a flexible mapping between any number of PHYs, each having multiple instances, and then map BTSs with TRXx on top of those PHYs.
2016-02-15TRX: Move scheduler to src/commonHarald Welte2-1/+1624
This is the final step to make the L1 scheduler generally available to other BTS models than OsmoTRX.
2016-02-09fix migration of check_for_ciph_cmd() from sysmobts to l1sapHarald Welte1-0/+12
During the L1SAP related changes, somehow an old version of check_for_ciph_cmd() was re-introduced, which didn't store the N(s) as part of the lchan. To make things worse, the old code was still present in the sysmobts specific part, but never executed.
2016-02-03L1SAP: Ensure we don't process MPH-TIME.indication on TRX != C0Harald Welte1-1/+8
2016-02-03fix compile warningsHarald Welte1-0/+1
2016-02-03abis: Add a queue of OML messagesHarald Welte2-4/+26
When the oml_link is down or not yet established, we currently lost any OML messages that were scheduled for transmission to the BSC. Let's prevent that by keeping a queue of OML messages, which is drained at the time the OML link comes up again.
2016-02-03Revert "oml: temporary debug hack"Harald Welte1-6/+0
This reverts commit c623c4e589d887f8ba779a03543213d55b6d82f4. That's a commit from 2012, and it was never needed ever since.
2016-01-25OML: Ignore T200 settings by BSC for nowHarald Welte1-3/+18
It seems that once we start to respect the T200 values as specified by the BSC, we run into all kinds of issues with LAPDm re-transmissions, REJ frames, unexpected supervisory frames and the like. The libosmogsm LAPDm T200 defaults of 1s/2s are proven to "work" (i.e. not expose the above behavior), so let's revert to them until the root cause of this problem is determined.
2016-01-25lapdm: Add DEBUGP statement about T200 values being set for lchanHarald Welte1-0/+4
2016-01-25Fix T200 default valuesHarald Welte1-7/+7
The T200 default values should be in milli-seconds (as the variable name indicates). They are not expected to be divided by the TS 12.21 OML dividers for T200. This change doesn't really make a difference with OpenBSC, as the BSC always sets its own T200 values via OML, overwriting the defaults here.
2016-01-23main: Return something from the methodHolger Hans Peter Freyther1-0/+2
Fixes: CID#59923
2016-01-22merge bts-specific main function into common/main.c:bts_main()Harald Welte3-2/+334
This removes a lot of copy+paste duplication between different BTS models.
2016-01-22Add new bts_model_ctrl_cmds_install()Harald Welte1-0/+7
This is one step in making the main() functions of different BTS models more similar, so we can share one code rather than multiple copies of it.
2016-01-22common/support.c: Remove unused fileHarald Welte1-86/+0
2016-01-22ABIS: Support for multiple RSL connectionsAndreas Eversberg2-15/+26
2016-01-17Make T200 default initialization even more robustHarald Welte1-2/+3
There's no need to use memcpy(), which adds the risk that the types of source and destination are not the same (see previous commit). Iterating over the array and assigning each element is more robust.
2016-01-17Fix T200 default valuesHarald Welte1-1/+1
t200_ms is an unsigned int [7] array, while the oml_default_t200_ms was an uint8_t[7] array, which we memcpy() to the former as default initializer. Fix this by turning oml_default_t200_ms into unsigned int, too.
2016-01-16OCTPHY: Fix various memory leaks and add comments on msgb ownershipHarald Welte1-1/+1
2016-01-16LAPDm: Use T200 settings from OML rather than libosmocore defaultsHarald Welte2-1/+61
2016-01-16print a NOTICE message if lchan not activ in get_active_lchan_by_chan_nr()Harald Welte1-2/+5
2016-01-15fix some format specifiersAlexander Huemer1-2/+3
2016-01-08l1sap: Whitespace fixes.Alexander Chemeris1-2/+2
2016-01-04fix large amount of compiler warnings in common and sysmobts codeHarald Welte5-4/+9
2015-12-06use talloc pool for msgb and ortp libraryHarald Welte1-1/+5
by using a talloc pool, we avoid having to go back to the libc malloc pool all the time. The msgb allocations and libortp allocations happen quite frequently during processing and show up as one of the high priority items in osmo-bts profiles on sysmoBTS with 14 concurrent TCH/H calls (highest load scenario). talloc still consumes significant CPU, this is mostly due to the zero-initialization of all the associated buffers. Strictly speaking we shouldn't need this, but any change there would require lots of testing, as there might be hidden assumptions in the code? In some percentage of cases, talloc still seems to fall back on malloc for msgb allocations, which is currently a bit of a mystery. The pools certainly are large enough, talloc_reprt() rarely reports more than a few tens of kilobytes used by the msgb pool.
2015-12-05osmo-bts-sysmo: Disable DSP trace flags by defaultHarald Welte1-1/+1
2015-12-05l1sap: Ensure we only pass PHY primitives of active lchansHarald Welte1-45/+41
In some situations, a PHY might send us a primitive for a logical channel that is not (or no longer) active. Passing such primitives higher up the stack is asking for trouble. Specifically, LAPDm instances cannot accept messages once their instance has been released. We introduce two new helper functions: get_lchan_by_chan_nr() as well as get_active_lchan_by_chan_nr(). The former just centralizes the look-up of the lchan by timeslot number and sub-slot number. The latter also checks to ensure the lchan is active, which is used for PH-DATA / PH-RTS primitives. To the contrary, MPH primitives generally don't require the cahnnel to be active for processing.
2015-12-03common/rsl.c: The presence of a valied measurement result is DEBUGHarald Welte1-1/+1
we shouldn't consider the presence of a valid measurement result as something NOTICEable
2015-11-20cope with 'struct gsm_bts' without a tsc memberHarald Welte2-3/+3
This was introduced in openbsc.git a2bbc5ec0e6481bb5b65da7bdbde03a424437af4
2015-10-03amr: Catch up with the amr_mode changesHolger Hans Peter Freyther1-10/+10
Use the bts_modes for all the types. As there are two instances know. One for the ms and one for the bts. Manual compile fix and not tested on HW
2015-09-22Allow TRX 0..254 at VTY, even if less TRX are availableAndreas Eversberg1-5/+4
Instead of limiting the number of TRX at VTY to the actual number of supported TRX, VTY allows to configure any possible number of TRX. If a TRX is configured, which is not supported by BTS model, an error message is returned, which states that the given TRX is not supported.
2015-09-22TRX: Fixup ciphering state names after rebasingAndreas Eversberg1-0/+1
2015-09-22Allow one or more TRX to configure via VTYAndreas Eversberg1-2/+4