Commit Graph

873 Commits

Author SHA1 Message Date
Harald Welte 9b5cff87ec LC15: Remove unused clk_use_eeprom and clk_src fields
this is part of the copy+paste legacy from sysmobts and can be removed
as it is not used.
2016-02-15 14:27:25 +01:00
Harald Welte 9684099ae9 sysmobts/LC15: Fix startup-time DSP trace flage configuration
Due to the changes introduced by the phy_link API, it's not easy to set
the default DSP trace flags via a command line argument anymore.  We now
rather introduce a persitent VTY configuration command, by which the
default DSP tracing configuration can be set (for each PHY).

The persistent trace flags are stored in the phy_instance, while the
current operational run-time flags are in fl1h->phy_instance.
2016-02-15 14:27:20 +01:00
Harald Welte 38933afdd9 introduce + use new generic vty_get_phy_instance()
this function is intended to be used by VTY commands that need to
resolve a given PHY interface.
2016-02-15 14:27:16 +01:00
Harald Welte 6a0f0f9e21 LC15: fix compiler warning against more recent libosmovty 2016-02-15 14:27:12 +01:00
Harald Welte 4dd8bd84a4 LC15: Fix printed msgq file names in error messages 2016-02-15 14:27:08 +01:00
Harald Welte 8f0266b885 LC15: cosmetic whitespace fixes 2016-02-15 14:27:04 +01:00
Harald Welte 234309878e LC15: Add example configuration file for Litecell 1.5 2016-02-15 14:26:58 +01:00
Harald Welte 1dcb97eaa3 LC15: port litecell 1.5 support to recent osmo-bts master
This includes changes required for
* shared main() function accross all BTS models
* use of the new phy_link / phy_instance infrastructure as the basis
  for true multi-TRX operation
2016-02-15 14:26:55 +01:00
Harald Welte 29a0197ead LC15: configure.ac: Allow specifying an alternate include-dir
The user can now use ./configure --with-litecell15=/my/local/path
2016-02-15 14:26:51 +01:00
Harald Welte ccc7a1bf46 LC15: configure.ac: use --enable-litecell15 insteda of --enable-litecell15-bts 2016-02-15 14:26:47 +01:00
Yves Godin b936bd7162 LC15: use talloc pool for msgb and ortp library
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.

From 2ecbf87130
2016-02-15 14:26:44 +01:00
Yves Godin 6e1aed4b23 LC15: Disable DSP trace flags by default 2016-02-15 14:26:38 +01:00
Yves Godin 2a711887b7 LC15: Add initial support for the NuRAN Wireless Litecell 1.5
This commit adds basic support for the Litecell 1.5. Multi-TRX is not
supported yet. Instead, multiple instances of the BTS can be launched
using command line parameter -n <HW_TRX_NR> to specify if TRX 1 or
2 must be used by the bts. Note that only TRX 1 opens a connection to
the PCU. Full support for GPRS on both TRX will come at the same time
than the multi-TRX support.

The BTS manager has been adapted to match the new hardware but otherwise
it has not been improved or changed compared to the one used on the
SuperFemto/Litecell (sysmobts).
2016-02-15 14:26:33 +01:00
Harald Welte 5a945dad0c sysmobts: make clock calibration eeprom default (again?) 2016-02-15 14:23:57 +01:00
Harald Welte b1d2dd316f abis.c: Fix segfault on OML link loss
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-15 14:23:18 +01:00
Harald Welte f5b42c3421 Merge branch 'laforge/phy-link'
this introduces the new phy_link / phy_instance interface, which is the
basis of clean support for all kinds of multi-trx configurations with
various BTS modules.

WARNING: This breaks configuration file compatibility.  You will need to
introduce config nodes for 'phy' and 'instance', as well as the link
from the 'trx' nodes towards the phy instance.
2016-02-15 14:19:46 +01:00
Harald Welte a02bf125ac port sysmobts to phy_link/phy_instance abstraction 2016-02-15 14:18:59 +01:00
Harald Welte fcef6b2b52 don't touch OML MO when PHY link is established
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-15 14:18:59 +01:00
Harald Welte d784e50747 Introduce new phy_link and phy_instance abstraction
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-15 14:18:59 +01:00
Harald Welte f58542899a Merge branch 'laforge/trx-split'
This splits the TRX scheduler into a generic part and an osmo-bts-trx
specific part.  It is the basis for re-using the scheduler from other
bts modules such as the upcoming osmo-bts-virtual.
2016-02-15 14:18:06 +01:00
Harald Welte 1a5b00ebe2 TRX: Move scheduler to src/common
This is the final step to make the L1 scheduler generally available
to other BTS models than OsmoTRX.
2016-02-15 14:17:55 +01:00
Harald Welte 48726242ad TRX: scheduler: Remove dependency to trx_if.[ch] 2016-02-15 14:17:55 +01:00
Harald Welte 67311cc1f2 TRX: scheduler: Move trx_sched_clock() to scheduler_trx.c
This funciton (and associated static functions) are TRX specific,
and scheduler.c should only contain generic code.
2016-02-15 14:17:55 +01:00
Harald Welte b6b42d150d TRX: scheduler: don't access l1h->config from scheduler 2016-02-15 14:17:55 +01:00
Harald Welte 11db925f15 TRX: call trx_loop_sacch_clock from TRX scheduler backend
this removes the dependency of scheduler.c on loops.h
2016-02-15 14:17:55 +01:00
Harald Welte 2b0e209029 TRX: split scheduler in generic part and backend part
the backend is performing the actual encoding and decoding functions,
while the generic part constsits of the TDMA structures and generating
the RTS.ind
2016-02-15 14:17:55 +01:00
Harald Welte 5538f5cff8 TRX: factor out the scheduler from remaining code
The L1 scheduler is a generally useful component that is unfortunately
tied quite a bit into the OsmoTRX support.  Let's try to separate it out
by having separate per-trx/per-ts/per-chan data structures pre-fixed
with l1sched_

Using this patch it should be one step easier to use the scheduler for
other BTS models, such as the intended upcoming virtual BTS.
2016-02-15 14:17:55 +01:00
Harald Welte 5f17720fcd fix migration of check_for_ciph_cmd() from sysmobts to l1sap
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-09 13:59:55 +01:00
Harald Welte 5d212055b7 L1SAP: Ensure we don't process MPH-TIME.indication on TRX != C0 2016-02-03 18:45:39 +01:00
Harald Welte 6f9beedc48 fix compile warnings 2016-02-03 18:45:39 +01:00
Harald Welte 131ab36e3a abis: Add a queue of OML messages
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-03 18:45:39 +01:00
Harald Welte 2ed116efec Revert "oml: temporary debug hack"
This reverts commit c623c4e589.

That's a commit from 2012, and it was never needed ever since.
2016-02-03 18:45:39 +01:00
Holger Hans Peter Freyther 5f8c85bf9c octphy: Look-up the right timeslot and then the logical chan
Use the right identifier for the timeslot and not the trx number
which would always use ts==0 on the first trx. This should fix
ciphering issues for TS>0 (e.g. SDCCH8 on TS==1)
2016-02-03 18:29:00 +01:00
Harald Welte 3ca59512d2 OML: Ignore T200 settings by BSC for now
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-25 20:46:56 +01:00
Harald Welte 111a02f214 lapdm: Add DEBUGP statement about T200 values being set for lchan 2016-01-25 20:46:53 +01:00
Harald Welte 0d19e48487 Fix T200 default values
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-25 20:46:51 +01:00
Holger Hans Peter Freyther 728448a7f1 main: Return something from the method
Fixes: CID#59923
2016-01-23 10:25:24 +01:00
Harald Welte 0db18d030d OCTPHY: fix 'make dist' (missing header files) 2016-01-22 09:44:17 +01:00
Harald Welte 0048a788dd Merge branch 'laforge/common-main' 2016-01-22 09:33:54 +01:00
Harald Welte 611ef23700 merge bts-specific main function into common/main.c:bts_main()
This removes a lot of copy+paste duplication between different BTS
models.
2016-01-22 09:09:09 +01:00
Harald Welte a0192b859b Add new bts_model_ctrl_cmds_install()
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-22 09:09:09 +01:00
Harald Welte ec3be11ec6 common/support.c: Remove unused file 2016-01-22 09:09:08 +01:00
Andreas Eversberg 69fc57b028 ABIS: Support for multiple RSL connections 2016-01-22 09:09:02 +01:00
Harald Welte 32d681ab98 OCTPHY: Don't have files in EXTRA_DIST that don't exist (anymore)
This fixes a 'make dist' issue.
2016-01-21 16:32:14 +01:00
Harald Welte e60b9d1de6 Make T200 default initialization even more robust
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-17 21:10:13 +01:00
Harald Welte 3d431bb4eb Fix T200 default values
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-17 21:10:09 +01:00
Harald Welte 5e8d8a1e75 Merge branch 'laforge/cleanup' 2016-01-16 17:51:16 +01:00
Harald Welte f9de18ea15 TRX: the L1SAP queue contains mac blocks, not bursts (cosmetic) 2016-01-16 17:49:13 +01:00
Harald Welte 97cb71971a TRX: Don't hard-code 23 bytes, use GSM_MACBLOCK_LEN 2016-01-16 17:49:08 +01:00
Harald Welte dd562d84ba TRX: Don't use magic numbers when we have #defines 2016-01-16 17:49:04 +01:00