Commit Graph

1060 Commits

Author SHA1 Message Date
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
Harald Welte 773ab8b2c5 TRX: replace some more 2715648 magic numbers with GSM_HYPERFRAME 2016-01-16 17:48:57 +01:00
Harald Welte 69ace680dd TRX: scheduler: whitespace cleanup 2016-01-16 17:48:53 +01:00
Harald Welte 1bdd08d07d TRX: schedule: remove dead code
the check whether or not to send a dummy burst is done already in
trx_sched_dl_burst(), so no need to have commented-out code doing that
again.
2016-01-16 17:48:45 +01:00
Harald Welte 519a639cf3 TRX: make trx_chan_desc static, it is not used externally 2016-01-16 17:48:40 +01:00
Harald Welte 6323d2e617 use existing #define for FR/EFR frame length (33/31) 2016-01-16 17:48:26 +01:00
Harald Welte 601781f463 move 'GSM_FR_BYTES' and related definitiions to common part 2016-01-16 17:48:20 +01:00
Harald Welte 695d8eb277 TRX: Reduce magic numbers, introduce GSM_HYPERFRAME for 2715648 2016-01-16 17:48:15 +01:00
Harald Welte 5b500f5d8f TRX: use const for dummy and fcch burst definitions 2016-01-16 17:48:04 +01:00
Harald Welte 2bf00d7729 TRX: mark scheduler data structures as 'const'
Those are read-only tables which should end up in the text segment
and not in writable data.
2016-01-16 17:47:59 +01:00
Harald Welte 12992d86dc TRX: some comments dscribing the scheduler.[ch] API 2016-01-16 17:47:54 +01:00
Harald Welte d93bd21185 sysmoBTS: port 'press Ctrl+C twice for immediate exit' from osmo-bts-trx 2016-01-16 17:47:40 +01:00
Harald Welte 8250800d3b TRX: Add stub bts_model_change_power() function
This just fixes linking. It still needs to be properly implemented
2016-01-16 17:47:34 +01:00
Harald Welte 6d101a79a8 TRX: remove obsolete get_mac() function 2016-01-16 17:47:13 +01:00