Commit Graph

34 Commits

Author SHA1 Message Date
Neels Hofmeyr 76a0ad7fe9 move ts_sublots() to gsm_data_shared.c, it will be used by osmo-bts
Change-Id: I8ba06d7dd6e0ceab3d8d18bb565354d6ed461f7e
2016-08-27 01:23:49 +00:00
Neels Hofmeyr b6f565c97d gsm_pchan2chan_nr(): fix uninitialized cbits
Commit ec1b5a0e9e introduced an unset cbits
value for the 'special hack for BCCH', where I break out of the switch
without setting cbits. Fix that.

Also remove the comment part that says 'return 0', because I don't return 0.

Change-Id: I54129d921807971eeafc23f80c57666c67b71377
2016-08-10 17:14:53 +02:00
Neels Hofmeyr 2f44693fad gsm_pchan2chan_nr: disable a chan_nr assert in BTS, to not break octphy
In https://gerrit.osmocom.org/589 , msuraev reports an assertion on octphy.
So disable this recently added assertion until we clarify the invocation in
question.

Change-Id: Ia0f7ae5b114e179ab56b98adbae9810e81b4b88f
2016-08-10 17:14:48 +02:00
Neels Hofmeyr f58852d117 dyn TS: rsl_lchan_lookup(): add dyn PCHAN
Accept GSM_PCHAN_TCH_F_TCH_H_PDCH for TCH/F and TCH/H if in matching pchan mode
or switching to matching pchan.

Accept RSL_CHAN_OSMO_PDCH chan_nr cbits for GSM_PCHAN_TCH_F_TCH_H_PDCH pchan.

Change-Id: If8f7c118f69e5a9f370bfe25f82f3d5a8de75b51
2016-07-28 11:56:51 +02:00
Neels Hofmeyr 4673b86f3d dyn TS: rsl *2chan_nr(): handle TCH/F_TCH/H_PDCH
In gsm_lchan2chan_nr() use the current pchan type.

In gsm_lchan_as_pchan2chan_nr(), add the special case of non-standard cbits for
activating PDCH on a TCH/F_TCH/H_PDCH dyn TS. This way, gsm_pchan2chan_nr()
conforms to the standard and does not need access to a ts struct.

Change-Id: If248b9073b9f397110a2003d8e1a04afdc1c0e20
2016-07-28 11:56:51 +02:00
Neels Hofmeyr d384110d3d dyn TS: gsm_lchan2chan_nr(): decouple from ts->pchan
For upcoming dynamic TS, the pchan choice for RSL De-/Activation is not
trivial. So in order to pass the desired pchan to generate the RSL chan_nr,
introduce gsm_lchan_as_pchan2chan_nr().

To avoid code dup, this requires decoupling the gsm_ts2chan_nr() pchan from the
actual ts struct, so refactor gsm_ts2chan_nr() to gsm_pchan2chan_nr() with
explicit pchan, ts_nr and lchan_nr arguments.

Change-Id: I1a40e8452fe8120d350a27973e56be0b8c8c517f
2016-07-28 11:56:49 +02:00
Neels Hofmeyr ec1b5a0e9e gsm_ts2chan_nr(): add assertions for lchan_nr
Change-Id: Ibfdef347c85d4a145645a7325cd193ea1b475a54
2016-07-28 11:55:00 +02:00
Neels Hofmeyr 745857277c code dup: join [rsl_]lchan_lookup() from libbsc and osmo-bts
lchan_lookup in abis_rsl.c and rsl_lchan_lookup() from osmo-bts rsl.c are the
same code, except for the log context, which is only set in abis_rsl.c.
Factor out the common code to rsl_lchan_lookup() in gsm_data_shared.c.

Openbsc and osmo-bts each define their own DRSL log constant, so add an int *rc
return code argument and keep the logging part in abis_rsl.c's thin lchan_lookup()
wrapper. Incidentally, this also removes code dup for logging.

To avoid duplicate symbols, the rsl_lchan_lookup() implementation needs to be
removed from osmo-bts, so older osmo-bts git revisions will not build with
this.

Change-Id: Ie89bc5bb9110a0e539d37991dedac6f913211b48
2016-07-25 17:35:47 +02:00
Neels Hofmeyr 34b8b5b29b gsm_data_shared: add gsm_ts_and_pchan_name() for dyn ts logging
Change-Id: I9b6be77c9e5fb9dffa2021a2da72293af15a03a0
2016-07-25 17:35:47 +02:00
Neels Hofmeyr c165876223 dyn TS: add ts->dyn state
Add state fields osmo_bts_trx_ts->dyn.* to record dynamic timeslot state.
Initialize in gsm_bts_trx_alloc().

Change-Id: I0a4049df8500b4f7c864f1355c4e9238932d1b8f
2016-07-25 17:35:47 +02:00
Neels Hofmeyr 17a6bab150 fix ctrl test: dyn TS: use new GSM_PCHAN_TCH_F_TCH_H_PDCH
Add GSM_PCHAN_TCH_F_TCH_H_PDCH in gsm_pchant_names and gsm_pchant_descs: the
VTY and CTRL can now handle the new pchan type.

Adjust the CTRL iface test to expect the new PCHAN type in the output.

Fixes make check with --enable-external-tests after libosmocore commit
fd80f5a04239c2ab7b561401476dd89f2861748b that adds GSM_PCHAN_TCH_F_TCH_H_PDCH.

Change-Id: I4ad9c972d7f76f7e20cf74d6fc3d1928b644a4f8
2016-07-24 13:35:04 +02:00
Neels Hofmeyr 29048b2a80 rm dup: use channel type names from libosmocore
In gsm_lchant_name(enum gsm_chan_t), use the gsm_chan_t_names value strings
from libosmocore instead of redefining the same strings. The list from
libosmocore is also more complete, including CCCH and PDTCH.

Add a todo comment to move to libosmocore.

In consequence, libosmogsm linkage needs to be added to osmo-bsc_mgcp,
mgcp_test, mgcp_transcoding_test and smpp_mirror, smpp_test.

Change-Id: If65ee7c0619cbc0acb0a15045bd5a969442c93cc
2016-06-18 11:34:21 +00:00
Harald Welte c696cc28d8 gsm_data_shared: compute/sprintf the lchan name only once
We now store the pre-printed lchan name in lchan->name to avoid having
to call sprintf every time there is a debug statement somewhere,
particularly as most of those debug statements are going to be inactive
most of the time.
2015-12-05 16:19:21 +01:00
Holger Hans Peter Freyther b8c204cb92 ctrl/bsc: Fix copy and paste error and update text
30f1f37638 introduced new channel
combinations but had a copy and paste error in the description.
The jenkins system didn't run the external tests so this issue
and others were not noticed until now.

Fix the copy and paste and update the test result.
2015-01-31 19:42:42 +01:00
Harald Welte 142d12d829 move gsm_bts_get_cbch() to gsm_data_shared() as its needed in osmo-bts 2014-12-30 00:35:44 +01:00
Harald Welte 30f1f37638 Add basic support for CBCH / SMS-CB (Cell Brroadcast)
We can now configure the pyisical channel types for CBCH either in the
CCCH+SDCCH4 or in the SDCCH8 chanel combination.

Depending on whether a CBCH exists on the BTS, we also generate the SI4
with matching CBCH channel description to notify the phones of the
existance of the CBCH.

There is now a VTY command how a SMS-CB message can be sent to a given
BTS.

We do not yet have any logic at all for actual scheduling of multiple
CBCH RSL messages towards one or multiple BTSs yet, though.
2014-12-30 00:35:28 +01:00
Holger Hans Peter Freyther b92a538d23 bts: Store the bcch_change_mark in the bts structure
Store the BCCH change mark inside the BTS structure. This will
allow us increment the number and re-generate the SIs.

Related: SYS#739
2014-11-21 11:23:47 +01:00
Harald Welte 1449c9f06f move gsm_bts_num() to gsm_data_shared.[ch]
this way we can drop a copy of this function from osmo-bts.
2014-08-24 12:47:12 +02:00
Holger Hans Peter Freyther cb5353d851 oml: Add a missing break switch for NM_OC_BS11
It appears to me that for NM_OC_BS11 mo was either NULL or the
one mo value from NM_OC_BS11_RACK. The break inside the nested
switch case didn't break from the outer one.

Fixes Coverity: CID 1040728
2013-07-18 12:03:31 +02:00
Holger Hans Peter Freyther 30156e1eea sysmobts: Add the necessary data structure and init for the SAPI queue
The sysmobts is now having a SAPI queue with all pending SAPI operations
on the BTS. Add the llist_head to the lchan and make sure it is initialized
by the shared code.
2013-04-05 18:41:45 +02:00
Holger Hans Peter Freyther 638da51a78 lchan: Introduce a BROKEN state for the lchan
If the CHAN ACTIV is NACKED we set the state backto NONE. This is
problematic as our channel allocator will allocate from the front
or from the back and if the channel is early in the list it might
cause permanent failures. Introduce a BROKEN state and use it when
the channel activation is failing for an unknown reason. Copy the
cause so it can be inspected later.
2012-12-23 20:18:18 +01:00
Andreas Eversberg becc89a98e Fix: T3192 and T3193 must be similar
In order to keep mobile at PACCH as long as possible the timer T3192 is
set to 1500ms. This reduces the probablity of long lasting assignment
process on CCCH for subsequent downlink TBFs.
2012-09-29 20:29:16 +02:00
Harald Welte 4ab9d7c012 dynamically generate a proper VTY reference for phys_chan_config
this uses vty_cmd_string_from_valstr() from _very_ recent libosmocore,
so you have to update the library, sorry.
2012-08-17 12:42:06 +02:00
Harald Welte 019f913ca3 gsm_data_shared: add structure for decoded parameters of RLC config
this is primarily needed on the BTS side, but we should also use it on
the BSC side and make the parameters VTY-configurable.
2012-06-28 09:03:07 +02:00
Harald Welte 4f8ad5350a gsm_data_shared: use 'const' whenever applicable 2011-09-26 23:44:48 +02:00
Holger Hans Peter Freyther fe1ca353bb bts-init: Initialize the BTS like it will look after a reset
Reset the BTS MO State on BTS bootstrap. This way we will always
test the BTS disconnect/reconnect case of the BTS.

Do not reset the administrative state of objects. The BSC might
have set these and wants to maintain them across disconnect/
reconnect. Right now this is true for the TRX state.
2011-07-18 11:35:56 +02:00
Harald Welte b7849987e5 properly reset the MO state of all MO on Abis disconnect
When we loose the A-bis link, we should properly re-set the
administrative, operational and availability state of all MOs
2011-06-29 16:49:03 +02:00
Harald Welte f6093a4d0e move {ts,lchan}2chan_nr() functions to gsm_data_shared.c
... this way osmo-bts can use them
2011-06-25 10:02:33 +02:00
Harald Welte df680288a9 initialize NM state for all objects to known state 2011-06-07 00:12:34 +02:00
Harald Welte 850dc6bbfa gsm_data_shared: make sure to initialzie the MO obj_class/obj_inst 2011-06-06 20:31:15 +02:00
Harald Welte 32bc11698a add mo->bts member so we can discover which BTS a MO belong sto 2011-06-06 18:58:48 +02:00
Harald Welte 978714d752 move objclass2{nmstate,mo,}obj() to gsm_data_shared.c (and prefix) 2011-06-06 18:31:20 +02:00
Harald Welte 5ac0179f47 make sure to include gsm_data.h, not gsm_data_shared.h 2011-06-06 17:52:38 +02:00
Harald Welte 3300c01e82 split gsm_data.c in gsm_data_shared.c and gsm_data.c
This facilitates the use of gsm_data.c from osmo-bts
2011-06-05 13:31:33 +02:00