aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/rsl.h
AgeCommit message (Collapse)AuthorFilesLines
2017-09-02trx: avoid deactivating lchan on LCHAN_REL_ACT_REACTMax1-1/+1
* do not deactivate lchan when called with LCHAN_REL_ACT_REACT * add fixme comment It's unclear yet if any special steps are required for osmo-bts-trx so let's just make it compatible with setups [1] using BS_AG_BLKS_RES != 1 for now. Background: CCCH is auto activated by some OsmoBTS - before we receive SI3, see 4a8582846281322e8d7dfc577b18767cf35c24d1. To accommodate for that we deactivate CCCH in common/rsl.c, which triggers BTS-model specific callback sapi_deactivate_cb() which updates parameters and activates it again. In case of osmo-bts-trx there is no auto-activation and (seems to be) no need in special interaction with hw to activate channel (no lchan_activate()) hence we can just skip entire deactivate/setup/activate again routine. [1] "channel-descrption bs-ag-blks-res N" in OpenBSC config file. Related: OS#1575 Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
2017-02-01Fix AMR HR DTX FSM logic.Jean-Francois Dionne1-0/+1
Fix SID_FIRST_INH detection during speech and when SID_FIRST is interrupted by FACCH. Fix SID_UPDATE_INH detection during silence and when SID_UPDATE is interrupted by FACCH. Add a delay for SID_FIRST to appear at the right time after FACCH. Fix extra byte sent in downlink for SID_FIRST and SID_UPDATE. Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69
2016-12-01Fix AGCH/PCH proportional allocationMax1-0/+1
Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: due to current implementation quirks we activate channels before SI3 obtained, than we deactivate channels upon receiving SI3 and activate them again. This might not be necessary once we migrate to proper OML state machines. This affects lc15 and sysmo hw. Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Related: OS#1575
2016-12-01Remove duplicated codeMax1-0/+2
Remove lchan deactivation related code duplication to facilitate future use for dynamic CCCH re-activation. Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9
2016-10-11DTX: fix 1st RTP packet dropYves Godin1-0/+2
Use "impossible" dummy value to initialize last_fn to prevent dropping of 1st RTP frame due to timestamp jump. Fixes: OS#1803 Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed
2016-09-02common/rsl: move decision whether to chan act ack/nack to common functionNeels Hofmeyr1-2/+1
Prepare for a dyn TS patch that needs to call rsl_tx_chan_act_ack() directly without the rel_act_kind decision. Add function rsl_tx_chan_act_acknack() to wrap rsl_tx_chan_act_ack() and rsl_tx_chan_act_nack(). Move the decision whether to drop the ack/nack, based on lchan->rel_act_kind, to the new function, losing some code dup. Change all callers to use the new function; drop the two older ones from rsl.h and make them static. Note: for nack, the exception for dyn TS in PDCH mode was missing (rsl_tx_chan_act_nack() had only the rel_act_kind != LCHAN_REL_ACT_RSL condition, but should also have had the dyn TS exception as in rsl_tx_chan_act_ack()). I already know that this exception will again be removed in an upcoming commit, but for patch readability it logically makes sense to add it here. To easily include the nack case, drop the check for which pchan the dyn TS is operating as, because a rel_act_kind == LCHAN_REL_ACT_PCU implies that it is either already in or trying to become PDCH mode. Change-Id: I57ba60c670730c6d7877a6a9b96ece0a7679a0bb
2016-07-25code dup: join [rsl_]lchan_lookup() from libbsc and osmo-btsNeels Hofmeyr1-2/+0
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-25cosmetic: clarify TCH/F_PDCH related naming and commentsNeels Hofmeyr1-3/+3
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-06-17dyn PDCH: implement main dyn PDCH logic in common/Neels Hofmeyr1-0/+4
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
2015-09-22TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceiversAndreas Eversberg1-0/+2
The code is quite complete, TCH and PDCH channels are not yet tested.
2015-09-22Relace bts_model_get_time() by get_time() at common partAndreas Eversberg1-1/+1
2014-03-10handover: Implement generating HANDOVER DETECTION in rsl_tx_hando_detAndreas Eversberg1-0/+1
2013-11-27sysmobts: Activate the BCCH silently have have state set to activeHolger Hans Peter Freyther1-0/+1
Use the lchan->rel_act_kind field for the BCCH activatiob by OML. The lchan's should be marked as active but no event should be sent to the BSC. This is mostly like the PCU. We can now remove the secnd argument from lchan_activate.
2013-10-25rsl/pcu: Do not send a CHAN ACT to the BSC on PCU usageHolger Hans Peter Freyther1-0/+9
The PCU is forcing the activation of a PDCH. Currently the BSC will receive a channel act ack for a channel that was not activated at all. Use the "release_reason" flag of the lchan to see if we have requested a normal activation or a silent one. It feels a bit odd to do it in the TX function but it is the most easy solution right now. I have added logging so it will not be totally silent.
2013-03-11Added radio link timeout procedure according to TS 05.08 Chapter 5.2Andreas Eversberg1-0/+1
Chapter 5.2 applies to MS procedure, but 5.3 (BSS procedure) defines no exact criterion, so I decided to use the procedure equivalent to MS. The criterion is based on a counter S, which is initialized to a preset RADIO_LINK_TIMEOUT, which can be configured via VTY. Whenever a received SACCH block is bad, S is counted down by one. If SACCH block is successfully decoded, S is counted up by two, but never above initial RADIO_LINK_TIMEOUT value. If S reaches 0, an RSL Connection Failure Indication with cause RF Radio Link Failure is sent to BSC, which then aborts channel. Use link timeout value from BSC via OML attribute. How to test: - Set "debug" for "meas" logging. - Start silent call to an attached mobile. - Remove battery from mobile or shield mobile. - Watch S count down.
2012-06-15RSL: Add CCCH LOAD INDICATION for RACHHarald Welte1-0/+2
We now count the total number of RACH slots, the number with rx level above the busy threshold, and the number of valid access bursts. This data is used to generate RSL CCCH LOAD INDICATION for the RACH.
2012-06-14attempt to make CCCH Load Indications for PCH workHarald Welte1-0/+1
2012-04-19lchan: Send the ACT ACK/NACK after the Layer1 has handled act/deactHolger Hans Peter Freyther1-0/+1
Send the RSL ACT ACK/NACK after the Layer1 firmware has acked the activation/deactivation. In case the channel can not be activated we will send a NACK. In case the channel can not be deactivated we will send an ACK and the next time the channel is activated we will send a NACK. The release ack will be sent once the TxDownlink of the TCH/SDCCH is closed. Change the rsl_tx_chan_nack method to create a new msgb to be used by the hardware layer, change the return value to ask the caller to delete the msgb.
2011-06-27re-work original osmo-bts with support for sysmocom femtobtsHarald Welte1-6/+15
This code re-works osmo-bts to add support for the upcoming sysmocom BTS. It also tries to add some level of abstraction between the generic part of a BTS (A-bis, RSL, OML, data structures, paging scheduling, BCCH/AGCH scheduling, etc.) and the actual hardware-specific bits. The hardware-specific bits are currently only implemented for the sysmocom femtobts, but should be (re-)added for osmocom-bb, as well as a virtual BTS for simulation purpose later. The sysmocom bts specific parts require hardware-specific header files which are (at least currently) not publicly distributed.
2011-03-04Import all C and Header files from jolly/bts branch of osmocom-bb.gitHarald Welte1-0/+12
The BTS code shall reside in a separate git repository, thus I'm importing the C and H files here.